Abstract

A shortage or backlog of inventory can easily occur due to the backward forecasting method typically used, which will affect the normal flow of funds in pharmacies. This paper proposes a replenishment decision model with back propagation neural network multivariate regression analysis methods. With the regular pattern between sales and individual variables, supplemented with the safety stock empirical formula, an accurate replenishment quantity can be obtained. In the case analysis, this paper takes the sales situation of a pharmacy as an example and tests the accuracy and stability of the model. The results show that the model has good prediction accuracy which can be introduced into the intelligent pharmacy system and used in the replenishment of the intelligent pharmacy to prevent overstocking or a shortage of stock, thus improving the financial situation, reducing the manpower burden of typical retail pharmacy, and helping residents buy medicines.

1. Introduction

The pharmacy business model has gradually entered the public view. It refers to the upgrading of the pharmaceutical industry and retail terminals from traditional business models to innovative industrial models through innovative technologies such as the Internet, big data, and artificial intelligence. Compared with traditional pharmacies, the intelligence of pharmacies is mainly reflected in the client, enabling customers to purchase medicines more conveniently. However, the method for forecasting the amount of resupply for a pharmacy is still backward. Many companies estimate safety stocks based on experience (Trapero et al.) or simply use software provided by software vendors to make predictions for decades without updating the system [1]. The data provided by software vendors are too conservative which has resulted in low turnover of goods and slow financial flows [2]. To solve this problem, two aspects should be considered. The first is how to determine when and how much to replenish, and the second is how to predict demand.

Many scholars have expressed their opinions on the first aspect. The classic single models are the moving average (Holt [3]), index smoothing method, and linear regression method (Galton, 1855), [4, 5]. Because these methods have limitations, many new models have emerged, such as the grey model [6, 7], wavelet smoothing model [8], autoregressive model (Arima) [9], and neural network [1012]. However, these methods have their own limitations. The grey model when the absolute value of the development coefficient is large (), the model deviation is large, and it cannot be used for medium- and long-term predictions, and even short-term predictions are not appropriate. The wavelet smoothing model can flexibly adapt to sudden data changes but performs very poorly in smooth time series prediction. The autoregressive model is effective. However, this method also has its own applicability; that is, these data must be autocorrelated, and the autocorrelation coefficient must be greater than 0.5; otherwise, the prediction result will be extremely inaccurate. The neural network model also has its applicability most notably because the model is input and then learned by each data when learning, which causes it to be easily confined to a small branch of the entire data [13].

After discovering that a single model has its own defects and applicability, many scholars began to study the combination model to reduce the prediction error. Wang et al. found that combination forecasting is one of the most important and effective methods in time series forecasting, so they proposed a combination forecasting model based on the neural network linear integration framework and compared other four single neural network models and other forecasting models. The results show that the performance of NNSLEF is better than that of the four component neural network model and other recognized models [14]. Choi et al. proposed a hybrid prediction model. By combining the classic SARIMA method and the wavelet transform model, they were able to predict the sales data and test it against real data to prove its effectiveness [15]. Christodoulos et al. with limited historical data and short-term projections of the penetration rate of broadband and mobile communications in the world, combined with ARIMA and the diffusion model, proved the accuracy of their method when applied to broadband and mobile phone penetration worldwide [16]. Zhang et al. proposed a novel solution by using common spatial pattern (CSP) and convolutional neural network (CNN) on disease prediction, and the experimental result demonstrates that the proposed approach outperforms most methods [17]. Wang et al. proposed a new monthly tourism demand forecasting method by combining improved chaotic particle swarm optimization (ICPSO) with backpropagation neural network (BPNN) to forecast monthly tourism demand. The results show that the performance of the ICPSO-BPNN model is better than that of the basic BPNN model, autoregressive comprehensive moving average model, support vector regression model, and other popular models [18].

Another point of concern is to determine the safety of stocks, the replenishment points, and the spacing of replenishment. Cui et al. and Foster et al. studied the tendency of goods to be out of stock with customers still wanting to buy them and elaborated on the impact of the lack of goods on the purchases of customers in different situations [19, 20]. When making replenishment decisions, Puga et al. found that the two-stage supply chain model, which uses a service-level integration (s, Q) supply strategy, was the best and could improve inventory turnover [21]. Trapero et al. used the GARCH model to calculate the safe inventory and compared it with the kernel density estimation and found that the kernel density estimation GARCH model is suitable for shorter periods of time, while the GARCH model is more suitable for longer periods of time [1]. Predicted intervals are generally calculated using empirical algorithms, unless it is not a fixed replenishment interval, but some scholars used the neural network approach instead [22].

Although some commonly used methods and scholarly research results related to drug replenishment currently exist, these methods have some limitations, such as the index smooth method, which is applicable only for short-term measurements. Applying this method to long-term predictions can easily yield inaccurate results. The wavelet smoothing method is very sensitive to data fluctuations, but the prediction error for stable data is very large [8]. Although the grey system analysis model looks very precise on the surface, the error should be small, and the prediction time must be very accurate. However, when the value of “a” (the basic relations of the grey system model is as follows: ) is large, the error will become large, and large deviations in the prediction will occur [7]. To address the limitations of these methods, this paper combines the back propagation neural network and regression analysis in the demand forecasting stage and brings together the highly similar characteristics of neural networks and the sensitivity of multiple regression to seasonal changes to better predict the demand for future drugs. Moreover, this method has not yet been studied by scholars in drug replenishment; hence, the research space is very large. It is suitable for short-term and medium-term predictions and can meet the replenishment of commonly used drugs, especially for seasonally sensitive drugs. For safety stock and replenishment points, this paper uses the traditional empirical formula, which is simple but can effectively calculate the location of safety stock and replenishment points.

The rest of the contents are organized as follows. Section 2 introduces the model and methods used in the paper. In Section 3, the framework of the replenishment decision model is introduced, and an example of cold medicine in a pharmacy is taken to examine the model validity. Section 4 shows the result of the replenishment decision and analyses the predictive effect of the methods. Finally, the conclusions are given in Section 5.

2. Model Background

2.1. Replenishment Decision Model

The empirical formula helps to build up the replenishment decision model and is commonly used to calculate the safety stock, replenishment points, prediction interval, and replenishment quantity. Because medicines are stored in obsolete stocks, excessive stocks can lead to a backlog of stocks, a low turnover of funds, and a tendency to strain financial flows, while the scarcity of stocks, increasing inventory turnover, may lead to stock-outs. Therefore, a proper inventory is essential for the operation of pharmacies. Hence, this paper must use the formula to accurately fill in the amount of goods to achieve the maximum benefit.

Here, the paper assumes that the spacing of the replenishment is not fixed and does not consider the cost of transporting drugs because each drug delivery involves several orders carried together, the variety of drugs is large, and the cost of sharing each package is negligible. At the same time, the inventory cost of storing drugs in pharmacies is not considered here. Since the paper is based on the sales quantity and stock limit to set the amount of replenishment, the shelf life of drugs will not be exceeded. The paper considers only the point of replenishment, the safety stock, the upper and lower levels of the inventory, and the predicted demand. Finally, the replenishment quantity is determined based on these main factors.

First, the symbols needed in the paper are defined in Table 1:

The safety stock empirical formula is as follows:

The formula for calculating the replenishment point is as follows:

When the pharmacy inventory is less than this point, the restocking action begins.

This paper assumes that the turnover rate of the inventory is not fixed, and the predicted interval is the time at which the inventory is roughly turned over once. Here, we set the forecast period as the average time for drug inventory turnover and assume that the demand is approximately equal to the sales forecast for a certain range in the future.

If replenishment is required, the demand for replenishment intervals is compared with the safety stock ceiling. If the former is smaller than the latter, the replenishment quantity is equal to the demand for replenishment intervals; otherwise, it is the upper limit of the inventory. Replenishment can be carried out according to this premeasurement. Then, the drug replenishment forecast concludes.

2.2. Multiple Regression Analysis

Multiple regression analysis refers to the selection of one variable as the dependent variable and other variables as independent variables among all the relevant variables. Then, according to these variables, a linear or nonlinear mathematical expression among several variables is established, and the sample data are used to test and analyse the statistical method. The expression for the multiple regression analysis is as follows:where Y is the dependent variable, Xk is the independent variable, m0 is the constant term, m1, m2, …, mk are the regression coefficients, and e is the error, which follows the normal distribution with a mean value of zero. The regression coefficient can be solved by the least square method as . The general form of the multiple regression analysis method is as follows:where . After variable replacement, the multiple regression analysis method can be converted into a multiple linear regression method and solved.

2.3. Back Propagation Neural Network

The back propagation neural network (BPNN) is one type of ANN. It was proposed in 1986 by a team of scientists, including McCelland and Rumelhart, and is one of the most commonly used neural network methods. The method is a multilayer feed-forward neural network trained by the error back propagation algorithm. The basic principle is to learn the input sample, judge the error, modify the weight and the threshold value to reduce the error, and then iterate many times to obtain the optimal mapping relationship.

The BPNN is composed of many layers, including the input layer, hidden layer, and output layer. The structure of the BPNN prediction method is shown in Figure 1. In the figure, xn is the input layer, which shows the time series data of each index, zq is the hidden layer, and ym is the output layer, which shows the predicted value of each index.

The BPNN is calculated as follows:Step 1. Each weight value is limited to an interval, and each weight value is randomly assigned within the interval.Step 2. The error function is set, given the accuracy of the calculation and the maximum number of learning times.Step 3. The input independent variables and corresponding dependent variables are randomly extracted.Step 4. The input and output of each layer of neurons are calculated.Step 5. Based on the calculated output results and the original sample dependent variables, the partial derivative of the error function relative to the output layer results is calculated.Step 6. Using the randomly set weight, the partial derivative of the output layer, and the output result of the neural network calculation, the partial derivative of the error function relative to the neurons of the hidden layers is calculated.Step 7. Then, the results just calculated and the output of each neuron in the hidden layer are used to correct each weight.Step 8. The weight value is corrected by the input value of each neuron in the input layer and the partial derivative function of each neuron in the implicit layer.Step 9. The global error is calculated.Step 10. Whether the global error meets the requirements is determined, and the entire process is ended when the error meets the requirements or the current number of learning times is greater than the maximum number of settings. Otherwise, the next independent variable and corresponding dependent variable are selected, and the next calculation begins.

2.4. BPNN Multivariate Regression Analysis

This paper uses BPNN multivariate regression analysis to forecast the drug demand. After regression analysis with the BPNN and multivariate regression, the method is obtained by taking the weighted combination of each method. The neural network method is Q1, the multivariate regression analysis method is Q2, and the weights of the neural network method and the multivariate regression analysis method are K1 and K2, respectively. To ensure that the results of the combination processing are unbiased, the following must be satisfied:

The expression of its combination method is as follows:

Set .

Set ϵ to the error between the actual sales value and the predicted result value so that the actual forecast value is QS, then

According to Lagrange’s rule, the variance and minimum of the predicted value and the actual value can be obtained when the following formula is satisfied:where i represents the number of measurements and n represents the number of measurements. Then, the final weight values of K1 and K2 are calculated and brought into the combination method to find its predicted values.

3. Replenishment Decision Model

This section describes in detail the decision model used to predict the amount of replenishment in pharmacies, including the data, the methods used, and the modelling process.

3.1. Establishing a Model Framework

This paper uses a model combining multiple regression analysis and the BPNN and an empirical formula to build the replenishment decision model. The detailed steps for its realization are as follows:Step 1. Establish the replenishment decision modelThe historical sales data and empirical formula are used to establish a replenishment decision model. The drug safety inventory, replenishment point, replenishment interval, and replenishment forecast formulas are included.Step 2. Analyse and collect the dataUse the historical sales data of a drug in a pharmacy as the dependent variable of the demand forecast. Then, an analysis is conducted to identify all the factors that affect the sales of the drug as its independent variables.Step 3. Process the dataThe numerical and standardized treatment of these factors makes their regression expression neater and easier to calculate. The correlation between the data is tested. By testing the correlation between the various variables, we analyse and eliminate the correlation among the nonsignificant factors. We then observe whether a phenomenon exists in which the correlation between independent variables is greater than that between the independent variables and dependent variables. If it is, one of the factors is discarded to prevent multicollinearity.Step 4. Forecast the replenishmentMultiple regression analysis and the BPNN model are used to find the relationship between the variables and check whether multicollinearity occurs. If not, the combined multiple regression analysis and BPNN model are used to obtain a new expression for sales and their variables. Then, the safety stock and replenishment point obtained from step 1 are employed to forecast the replenishment quantity.The overall model structure is shown in Figure 2.

3.2. Establish the Replenishment Decision Model

To examine the effect of the decision model, a cold medicine from a pharmacy in Beijing was selected for analysis. The data used in this article were processed due to the partial design of commercial secrets, and the rest of the data are real data. The daily sales quantity of the drug from 2016 to 2018 and the factors that may affect the sales quantity were studied.

Among them, the standard differences in the demand, safety factors, and stock ceilings are all known. The sales forecast of the replenishment interval can be obtained by the multivariate regression model of the neural network established above. The remaining variables can be calculated by the known quantities.

By looking at these data, we found that a large difference in sales exists between different seasons. Therefore, this paper divides the sales time of the cold medicine into the off-season and the busy season and performs separate calculations to obtain a more accurate safety inventory that is more suitable. The off-season period is from May to October, and the busy season is from November to April.

Among these variables, the lead time T = 3, the level of service is 0.99, R = 2.33, the standard deviation of demand in the off-season is 1.46, and that in the busy season is 2.07. These values are entered into formula (1) separately to solve; the off-season safety stock is 6, and the busy season safety inventory is 8. The demand for the preseason period is obtained by multiplying the average daily sales quantity in the light season, of which the average daily sales quantity in the off-season is 3 and the average daily sales quantity in the busy season is 7. These values are entered into formula (2) separately to solve the off-season replenishment point, which is 15, and the busy season replenishment point, which is 29.

Due to the different stock turnover rates in the light season, this paper calculates the approximate turnover rates for the light season separately based on the historical data and then sets the forecast sales days for the off-season to 30 days and for the busy season to 15 days. When more than half the number of days in the forecast range are in another quarter, the paper makes up for this in another quarter. Therefore, when the stock reaches the replenishment point, this paper chooses different demand forecasts according to the light busy season, forecasts the sales quantity for the next 30 days during the off-season, and forecasts the sales quantity for the next half-month during the busy season. That is, K = 30 in the off-season, and K = 15 in the busy season.

3.3. Analysis and Collection of Data

This paper analyses all the possible factors that impact cold medicine sales (as follows) and collects the relevant data.Incidence Factors. These factors are directly related to the number of medicines purchased. When the incidence of colds increases, more people will buy drugs. Since a cold is a “small” disease, people are more likely to go to the pharmacy to buy medicine when they have a cold.Appropriate Travel Factors. Whether people will buy medicines or not may be affected by the appropriateness of travel. For example, when the weather is good, people may prefer to go out and buy medicine. This factor is a combination of factors, including multiple indicators such as weather, average temperature, wind power, and air pollution index.Population Mobility Factors. When the important and long holiday season comes, people may go out to play or return home, which may lead to changes in the level of drug purchase on these days.Promotion Factors. Although the frequency of sales promotions is not very high for drugs, the number of medicines purchased may change during a promotional period. Therefore, this factor must be explored.

3.4. Data Processing

Incidence Factors. For the incidence factors, this paper was able to obtain comparative data from 2016 to 2018 through the website of the Beijing Center for Diseases Prevention and Control. The first day of January 2016 was used as a benchmark. The difference between these data values and the baseline values determines the strength of the incidence rate. The prevalence rate is determined, and the incidence rate is expressed as 1–3, of which 1 is the weakest and 3 is the strongest.Appropriate Travel Factors. Here, this paper took the day, weather (cloudy, sunny, rainy, and snowy), average temperature, wind, and air pollution index as factors that affect travel. The website (weather forecast 2345) was searched for daily weather data from 2016 to 2018, and these factors were quantified. The specific treatment criteria are shown in Tables 25.Then, each factor has been quantified according to the data processing criteria based on the weight obtained in the questionnaire (approximately 2.3 : 1 : 1 : 1, of which the weather is 2.3 and the rest are 1). After adding the weighted data, the final suitable travel degree data are obtained.Population Mobility Factors. Here, the paper looks for data to obtain the total population of the district covered by the pharmacy. The resident population knows that its population is more mobile; thus, greater population mobility may occur during the holiday period. Therefore, obtain the data of legal holidays from 2016 to 2018 through the China Government Website, and the size of each value is used to indicate the mobility of the population. The specific criteria are shown in Table 6.Promotional Factors. This thesis obtained the in-store promotion time data for 2016–2018 (to protect the privacy of the business, the data are processed here). After that, the data are in numeric form, represented by the number 2 at the time of promotion, with the remaining time represented by 1.Sale Quantity. To determine the quantity forecast, this paper needs to predict the future demand, but the demand has an inseparable relationship with the historical sales quantity. Thus, this paper studies whether and to what extent historical sales are related to these factors and then obtains an expression of the relationship between sales quantity and these factors, after which a forecast of future demand is made. Here, the paper surveys the daily sales of a drug from 2016 to 2018 at a pharmacy and studies the 2016 and 2017 data as dependent variables (to protect the privacy of the business, the data are processed here; however, this does not affect the accuracy of the predictions).

To investigate whether independent variables exist, whether dependencies between the independent variables and dependent variables can be found, and how these variables relate to each other, the paper studies the daily sales data of a cold medicine at a pharmacy from 2016 to 2018, along with the incidence factors, appropriate travel factors, population mobility factors, and promotion factors mentioned in the previous section. A correlation test is then performed to observe the relationship .

Table 7 shows the results obtained through a one-sided test. Among them, the daily sales quantity and incidence rate, suitable travel rate, population mobility, and promotion factors are all significantly related (at the level of 0.05).

In particular, the correlation coefficient between daily sales and morbidity = 0.808 > 0.8 is highly related. The remaining daily sales are relatively weak in relation to the suitability of travel, population mobility, and promotion. Among them, daily sales are negatively related to population mobility. The correlation between independent variables is weak or not significant; thus, multi collinearity is not possible.

3.5. Forecast Replenishment

BPNN regression and multivariate regression analysis was carried out with the variables tested earlier. The results are as follows.

Because the BPNN model is prone to local overlearning during learning, the results of each test may be different. Therefore, the paper trains and analyses these data several times and takes the highest degree of similarity as the output.

The degree of influence of the independent variables on the daily sales quantity is expressed in Table 8. From high to low, the order is as follows: incidence rate, promotion factor, suitable travel degree, and population mobility. Their levels of importance are 100%, 58.4%, 57.7%, and 45.7%, respectively.

Multivariate regression considers the daily data from 2016 to 2017. The regression method adopts a step-by-step approach. The following results are obtained. Table 9 reveals that the goodness of fit (R2) is improving because the closer R2 is to 1, the higher the degree of similarity. In the fourth model, the goodness of fit (R2) is 0.768, indicating that this model can explain 76.8% of the variable changes and that the degree of fit is better.

Table 10 indicates that the regression equation is meaningful. The F value is an indicator of the significance of multiple regression. The results are all greater than 2.38. The original assumption is rejected; that is, the independent variables of the model are considered to have a sufficiently significant effect on the dependent variables.

The VIF in Table 11 is an indicator for common linear diagnosis. When 0 < VIF < 10, the regression model is not collinear; 10 ≤ VIF ≤ 100 is considered to indicate multi collinearity in the model. The VIF in the above table is less than 10; thus, the model does not exhibit multiple collinearity. Let the morbidity variable be X1, the appropriate travel degree be X2, the population mobility be X3, and the promotion factor be X4. The equation for Table 11 is sales = 2.346 X1 + 1.094 X2 − 1.122 X3 + 2.295 X4 − 4.192. Through the BPNN multivariate regression analysis model, K1 = 0.7 and K2 = 0.29 are obtained. The expression of the combination model is Q= 0.71 Q1+ 0.29 Q2.

Then, the error rates of the neural network model, multivariate regression model, and combination model are obtained. Table 12 (the monthly summary sales) shows that the error rate of the combined model is generally less than that of each model; that is, the accuracy is higher than that of the other two models, with the overall error level being less than 10%.

After examining the accuracy and stability of the model, using formulas (3) and (4), we can obtain the replenishment quantity of the cold medicine.

4. Results and Discussion

4.1. Drug Replenishment Process

Refer to [23], the pharmacy replenishment process is shown in Figure 3. The wholesale association that manages pharmacies pays attention to the drug balance information of the pharmacies in real time. If the number of drugs is higher than the replenishment point, then replenishment is unnecessary. When the number of drugs is lower than the replenishment point, an alarm is automatically sent to the wholesaler for replenishment. Artificial intelligence technology exists inside the information system. The intelligent calculation of the replenishment amount is then carried out by the staff to pick up the goods according to the replenishment amount and arrange the goods to depart the warehouse. The drugs are then delivered to pharmacies that need to be replenished to complete the pharmacy replenishment process. Then, one goes to the next replenishment point and repeats the above steps, thus restarting the drug replenishment services cycle.

4.2. Model Simulation Results

In order to test the accuracy and error of the model, this article uses the 2018 data of a cold medicine in one pharmacy. At the beginning of the first day of 2018, the inventory of this cold medicine in the store was the same as the inventory limit, which was 130 boxes. Then, the simulation starts. Other known conditions are the same as those set in the previous chapter. By comparing the real data in 2018 with the replenishment data obtained by simulation, the results are shown in Figure 4 and Table 13.

Figure 4 reflects the comparison between the real data and the simulation data of the drug replenishment quantity in 2018. It can be seen from the figure that the drug replenishment quantity varies greatly in different seasons. Compare the real data and the model fitting data. It shows that the time with large errors is concentrated on the replenishment quantity in late January and early February, as well as in September and October. The forecast accuracy rate at other times is relatively high. From the error rate of the data in Table 13, the overall error is not very large. The absolute value of the error during each replenishment period does not exceed 20%, and the average error rate is 7% and less than 10%. Obviously, the prediction accuracy is better. Better forecast months are June, July, August, November, and December. The month with the smallest error is July, and the premeasured and actual sales quantities are the same. The months with the largest errors between forecast and actual values are the second half of January, March, May, September, and October. At present, this article speculates that the main factors affecting the accuracy of sales forecasts are seasonal changes (alternating seasons) and the time of holidays because these factors are caused by sudden changes in drug sales (rapid decline or surge). The prediction model cannot quickly adapt to changes in actual values, and the prediction error is large.

5. Conclusions

A replenishment model is established to reasonably predict the replenishment quantity of drugs in a pharmacy, which solves the inventory shortage problem of the replenishment quantity prediction technology in this paper. For example, human experience alone determines the amount of drug replenishment; otherwise, the same amount is used each time. Specifically, first, the empirical formula is used to establish the replenishment model, and the safety stock and replenishment point can be obtained from the known historical sales data and other known data related to the replenishment. With the historical inventory turnover rate, the number of days sold for each replenishment, such as the next week, two weeks, or a month, is determined. That number is then used to forecast the demand over the coming days when the drugstore inventory is at or below the replenishment point. Then, the replenishment quantity is forecast by collecting and processing the known influencing factors and historical daily sales data related to the sales quantity of the drug, and the BPNN and regression analysis are used to carry out the regression analysis. Subsequently, the future demand is forecasted by the weighted combination model, and the exact replenishment result is obtained. Finally, the replenishment quantity is obtained by comparing with the known inventory upper limit.

BPNN multivariate regression analysis is more reliable than a single model and has better predictions of the timing of seasonal changes or sharp changes in sales over holidays. This point in the last section for the model forecast accuracy test also confirmed the accuracy and validity of its forecast results. The average error rate of approximately 7% means that the proposed model can better forecast the future replenishment quantity. It is more suitable for the prediction of the drug replenishment quantity of a pharmacy, making the replenishment time more reliable, avoiding the phenomenon of stock shortage or backlogs, and improving the capital turnover of the pharmacy, thus enabling the pharmacy to use more funds on other hot-selling drugs to maximize pharmacy profits.

However, this model also has its limitations; it is intuitively that BPNN has better prediction accuracy than the multiple regression model, but the prediction accuracy of BPNN is not as good as that of the multiple regression model when the seasons change. Although the multiple regression model has the above advantages, the prediction fitting degree of it is worse than that of BPNN when the drug demand is stable. Therefore, when the two types of time prediction models are combined, the prediction stability is better than that of BPNN but the prediction accuracy of each month may be not the best, and the specific limitation is mainly due to the following reasons. On the one hand, when the sales quantity regression analysis was conducted in the first phase, it was obtained by analysing the relationship between the factors that affecting sales quantity and sales. In some instances, some of the impact factors are not taken into account, leading to inaccurate results. Another aspect is that the factors that affect sales in the future are the results obtained through the predictions, some of which are based on history and some on technical analyses conducted by professional organizations. Errors are likely, such as in the prediction of future weather due to the long duration considered. Inaccurate phenomena may occur, and certain errors in the conclusions will be reached. If an emergency occurs, it may also affect the accuracy of the results. For example, due to a certain virus in a certain year, the number of people infected with the disease will increase, and the amount of replenishment will not be adjusted in advance by predicting the incidence rate, which will lead to the prediction. The result is far lower than the actual need for replenishment, which may cause a loss in profits. To prevent this from happening, this paper proposed, in the visual interface concept of the model, that the amount of drug resupply be adjusted by manual floating up and down by no more than 20 boxes to make the premeasurement of resupply closer to the actual sales quantity to prevent this kind of problem from occurring.

In addition, this paper has established a model for the individual drug category in the field of pharmacies. However, in practice, many kinds of drugs exist. Many times, they still need to be combined with other drugs. This situation needs to be further studied and resolved.

Data Availability

The data of drug sales and promotion time used in the experiment are from WangJing store of Beijing Jinxiang pharmacy, which is located in Nanhu Dongyuan, Beijing. In the experiment, a cold medicine of a certain brand was used for prediction. The other data source is as follows: the appropriate travel data are from the “2345 weather forecast” website (http://tianqi.2345.com/); incidence rate data are from the website of Beijing Center for Diseases Prevention and Control (https://www.bjcdc.org/); population mobility data are from “China government network” (http://www.gov.cn/).

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Authors’ Contributions

All authors contributed to the study conception and design. Topic guidance was performed by Hao Zhang. Material preparation, data collection, and analysis were performed by Jia-Hui Mu and Hao Zhang. The first draft of the manuscript was written by Jia-Hui Mu, and all authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Acknowledgments

The study was supported by the Beijing Philosophy and Social Science Foundation Project (grant no. 17GLB013), Talent Foundation Project of Organization Department of Beijing Municipal Committee of the CPC in 2018 (grant no. 2018000026833ZS09), Science and Technology Innovation Service Capacity Provincial - Ministerial Scientific Research Platform Construction Social Science Provincial - Ministerial Scientific Research Platform Construction Project (grant no. 19008020111), Construction Project of Humanities and Social Sciences Research Center at Provincial and Ministerial Level (grant no. 19002020217), and National Natural Science Foundation of China (grant no. 91646120).