A pharmaceutical sales forecasting system and method based on the IPSO-LSTM model
By combining historical and epidemiological data on pharmaceuticals with the IPSO-LSTM model, the inaccuracy of pharmaceutical demand forecasting in the pharmaceutical sales system is solved, and accurate forecasting of pharmaceutical demand and supply-demand balance are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGXI CHANGHE PHARM SUPPLY CHAIN MANAGEMENT CO LTD
- Filing Date
- 2022-11-17
- Publication Date
- 2026-05-26
AI Technical Summary
The existing pharmaceutical sales system is unable to predict the impact of environmental factors and sudden epidemics on drug demand, leading to an imbalance between supply and demand and problems such as unsold or out-of-stock drugs.
An improved particle swarm optimization algorithm-long short-term memory neural network (IPSO-LSTM) model is used, combined with historical drug data, environmental factors and epidemiological data, to predict drug demand through data collection, classification, prediction and visualization modules.
It enables accurate forecasting of drug demand, balances supply and demand under the influence of the environment and epidemics, and reduces the risk of drug overstocking or stockouts.
Smart Images

Figure CN115760210B_ABST
Abstract
Description
Technical fields:
[0001] This invention belongs to the field of pharmaceutical sales forecasting technology, and specifically relates to a pharmaceutical sales forecasting system and method based on the IPSO-LSTM model. Background technology:
[0002] In recent years, the surge in national drug procurement, the flurry of new policies and regulations, the accelerated reforms of medical institutions, the increasing complexity of the overall healthcare market, and rising cost pressures have severely impacted traditional marketing. Under the influence of industry transformation and post-pandemic prevention, poor drug supply stability has become a major problem plaguing my country's drug distributors. This is because distributors cannot predict future market demand trends for drugs in their regions, making it difficult to balance supply and demand and easily leading to unsold or out-of-stock items for certain drugs in specific areas. While relatively mature solutions exist for modern pharmaceutical sales systems in China, most of these solutions only consider pharmaceutical sales themselves and do not leverage advanced information technology to form a complete chain of "data analysis - real-time demand forecasting - visual sales assistance" to improve the reliability and accuracy of pharmaceutical sales.
[0003] Patent application number ZL2018115562758 discloses a pharmaceutical sales system based on cloud computing and big data. Its solution uses a multiple regression model to calculate the relationship between patient drug demand and patient health management data, then uses real-time patient health data generated by the health management module to predict patient drug demand, and finally aggregates massive amounts of individual demand data within a region to predict the total drug demand in the region. However, this system does not consider the impact of factors such as the environment on drug sales.
[0004] A master's thesis by Mei Xuedan from China University of Mining and Technology, titled "A Study on Influencing Factors and Prediction of Drug Sales in Retail Pharmacies Based on Machine Learning," describes a method that uses exponential smoothing to obtain sales trend information, performs principal component analysis to extract principal components rich in scale and price information, and uses trend, price, scale, medical insurance, and month as independent variables, with drug sales as the dependent variable, to train and predict a neural network. However, this model does not consider the impact of factors such as sudden epidemics on drug sales.
[0005] Therefore, there is a need for a pharmaceutical sales forecasting system that can effectively predict the demand for drugs in hospitals based on their past drug needs, combined with environmental factors and the occurrence of sudden epidemics.
[0006] The information disclosed in this background section is intended only to enhance the understanding of the overall background of the invention and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention:
[0007] The purpose of this invention is to provide a pharmaceutical sales forecasting system and method based on the IPSO-LSTM model. It upgrades modern pharmaceutical sales by using an improved particle swarm optimization algorithm-long short-term memory neural network (IPSO-LSTM) technology, and improves the reliability and accuracy of pharmaceutical sales through a new "analysis-prediction-assistance" model, thereby overcoming the defects in the existing technology.
[0008] To achieve the above objectives, this invention provides a pharmaceutical sales forecasting system based on the IPSO-LSTM model, comprising a data acquisition and processing module, a drug classification module, a drug demand forecasting module, and a data visualization module connected in sequence. The data acquisition and processing module collects historical drug sales data, including historical sales volume data and past epidemic data, and performs normalization preprocessing on the historical sales data to obtain normalized data. The drug classification module classifies drugs according to their indications and uses. The drug demand forecasting module combines the normalized data with historical drug sales data to predict future drug sales volume. The data visualization module visualizes the collected historical drug sales data and the predicted drug sales data.
[0009] A forecasting method for a pharmaceutical sales forecasting system based on the IPSO-LSTM model, comprising the following steps:
[0010] S01: Collect real-time datasets, which include environmental conditions in the sales region, types and functions of medicines, the quantity of medicines demanded by hospitals in previous years, and data on the spread of epidemics in previous years.
[0011] S02: Use the Naive Bayes classification algorithm to classify drugs by function; the classification process includes decomposing the features in the drug data and calculating the conditional probability of the features in the drugs, decomposing the features of the classification samples and calculating the category probability; the sample with the largest probability result is judged as the category of the sample drug.
[0012] S03: LSTM regression data is optimized using an improved particle swarm optimization algorithm, improving the inertia weight w and learning factors c1 and c2; considering that drug sales are mainly affected by seasonality and replacement fluctuations, the seasonal demand m of a certain type of drug is selected. i and updated alternative n i Given the particle's position and velocity, the improved particle swarm optimization algorithm returns the optimal parameter values; based on the optimal parameter m returned by the improved particle swarm optimization algorithm... i and n i An LSTM model is constructed, trained using training and validation data, and tested using historical drug sales datasets to predict the normal drug sales volume Z in each region.i ;
[0013] S04: Collect environmental factor data from various regions, extract several features from them, construct a random forest model by randomly extracting features, calculate the entropy to filter features, and then predict the sales change M(t) of drugs under the influence of environmental factors in various regions by constructing a model.
[0014] S05: Collect data on the spread of epidemics in previous years. Based on the number of infections in previous years, set the proportion of infections a under normal circumstances as state 1, and set the proportions b, c, and d under epidemic outbreak circumstances as state 2, 3, and 4 respectively. Based on state 1-4, obtain the probability vector S(1) for this year, and predict whether an epidemic will break out this year.
[0015] S06: Based on the results of step S05, if an epidemic outbreak is predicted this year, the number of infected people R(t) and the amount of medicine required for recovery need to be predicted based on step S05. i Considering that the amount of medication used by infected individuals and their immunity are related to the drug resistance of the infected virus, the immunity index x was selected. i and viral resistance v i Using the particle's position and velocity as parameters, an improved particle swarm optimization algorithm is used to return optimal parameters. Based on these optimal parameters, an LSTM model is constructed to predict the amount of medication D required for recovery in infected individuals. i ;
[0016] S07: Based on the normal drug sales volume Z in each region obtained in step S03. i The changes in drug sales M(t) under the influence of environmental factors in various regions obtained in step S04, the number of infected people R(t) obtained in step S06, and the amount of drugs required for recovery D i Calculate the sales volume Y of medicines in each region. i :
[0017] Y i = M(t)+Z i +D i ×R(t) (1);
[0018] S08: The data analyzed by the sales forecasting model is visualized through the data visualization module to visualize the sales areas. The interface displays real-time information about the regional environment, the functional categories of drugs, real-time sales records of drugs, and demand forecast information for drugs in the region. Through this interface, sales personnel can understand the situation in each region in real time, as well as the demand for drugs in each region, thereby providing assistance to sales personnel.
[0019] Preferably, in the technical solution, in step S03, the inertia weight w is:
[0020] w = w start -(w start -w end )×(max-iter) / max (2)
[0021] Where w start As the initial value, w end Here, `max` represents the final value, `iter` represents the maximum number of iterations in the algorithm, and `iter` represents the current iteration number. The learning factors c1 and c2 are respectively:
[0022] c1 = c start -(c start -c end )×(max-iter) / max (3)
[0023] c2 = 4 - c1 (4)
[0024] Among them, c start c end These are the initial and final values of the learning factor.
[0025] Preferably, in the technical solution, in step S03, the improved particle swarm optimization algorithm is used to calculate the seasonal demand degree m. i and updated alternative n i The optimal parameter values returned are:
[0026] n i iter+1 =w×n i iter +c1×r1× (p i iter -m i iter )+c2×r2× (q i iter -m i iter (5)
[0027] m i iter+1 =m i iter +n i iter (6)
[0028] Where m i iter For the seasonality of drug demand, n i iter For drug updates and substitutions, p i iter q represents the usage of a certain drug in various hospitals in previous years. iiter The values represent the usage of a certain type of drug in various hospitals over the years, with r1 and r2 being random numbers between 0 and 1.
[0029] Preferably, in the technical solution, in step S04, the environmental factor data for each region include temperature, temperature variation, humidity, air quality, and oxygen content.
[0030] Preferably, in the technical solution, in step S04, the entropy is calculated as follows:
[0031]
[0032] Where k represents the number of features to be screened, p(k) represents the probability of the kth feature occurring, and H(Y) represents the impact of environmental factors on the change in drug sales. The smaller this value is, the greater the impact.
[0033] Preferably, in the technical solution, in step S05, the probability vector S(1) for this year is:
[0034] S(1)=S(0)×P={p1, p2, p3, p4} (8)
[0035] Where S(0) is the probability vector of the previous year, P is the probability transition matrix, p1, p2, p3, and p4 are the probabilities of states 1-4 respectively, p1 is the probability of the normal situation, and p2, p3, and p4 are the probabilities of the epidemic outbreak situation.
[0036] Preferably, in the technical solution, in step S06, the number of infected people R(t) is:
[0037]
[0038] Where X(0) is the number of healthy people at the initial moment, V is the area of the region, J is the intensity of virus transmission between infected and susceptible individuals, J is determined according to S(1), t is the time that infected and susceptible individuals are in the same area, h is the proportionality coefficient, which is fitted and estimated according to the actual infection situation or estimated according to the results of etiological research, D is the secondary infection index, the maximum value is 1, which means that recovered patients will not be reinfected in a short period of time. The smaller the value, the better the disinfection situation, I is the number of people initially carrying the virus, and f is the virus transmission speed.
[0039] Preferably, in the technical solution, in step S06, an improved particle swarm optimization algorithm is used to analyze the immunity index x. i and viral resistance v i The optimal parameter value returned is:
[0040] x i iter+1 =w×x i iter+c1×r1× (y i iter -v i iter )+c2×r2× (z i iter -v i iter (10)
[0041] v i iter+1 =v i iter +x i iter (11)
[0042] Where x i iter As an indicator of the immunity of infected individuals, v i iter As an indicator of viral drug resistance in infected individuals, y i iter As an indicator of the age of infected individuals, z i iter The activity index of the infected person is r1 and r2, which are random numbers between 0 and 1.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] This invention employs an IPSO-LSTM model, combined with historical hospital drug demand data, environmental factors, and the occurrence of sudden epidemics, to conduct comprehensive predictive analysis. This addresses the problem that distributors cannot predict future market demand trends for drugs in a given region, making it difficult to balance supply and demand and potentially leading to unsold or out-of-stock drugs in certain areas. Furthermore, this invention can also predict drug demand in regional hospitals under the influence of environmental factors and during sudden epidemics. Attached image description:
[0045] Figure 1 This is a schematic diagram of the pharmaceutical sales forecasting system based on the IPSO-LSTM model of the present invention;
[0046] Figure 2 This is a flowchart of the prediction method of the pharmaceutical sales prediction system based on the IPSO-LSTM model of the present invention;
[0047] Figure 3 This is a diagram illustrating the spread of an epidemic according to the present invention;
[0048] Figure 4 This is a diagram showing the rate of epidemic transmission in this invention;
[0049] Figure 5 This is a graph showing the rate of change in the spread of the epidemic according to the present invention. Detailed implementation method:
[0050] The specific embodiments of the present invention will be described in detail below, but it should be understood that the scope of protection of the present invention is not limited to the specific embodiments.
[0051] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or its variations such as "including" or "comprises" shall be understood to include the stated elements or components without excluding other elements or other components.
[0052] like Figure 1 As shown, a pharmaceutical sales forecasting system based on the IPSO-LSTM model includes a data acquisition and processing module, a drug classification module, a drug demand forecasting module, and a data visualization module, which are connected in sequence via communication. The data acquisition and processing module is used to collect historical drug sales data, including historical drug sales volume data and past epidemic data, and to perform normalization preprocessing on the historical drug sales data to obtain normalized data. The drug classification module classifies drugs according to their indications and uses. The drug demand forecasting module combines the normalized data with historical drug sales data to predict future drug sales volume. The data visualization module visualizes the collected historical drug sales data and the predicted drug sales data.
[0053] like Figure 2 As shown, a prediction method for a pharmaceutical sales forecasting system based on the IPSO-LSTM model includes the following steps:
[0054] S01: Collect real-time datasets, which include environmental conditions in the sales region, types and functions of medicines, the quantity of medicines demanded by hospitals in previous years, and data on the spread of epidemics in previous years.
[0055] S02: Use the Naive Bayes classification algorithm to classify drugs by function; the classification process includes decomposing the features in the drug data and calculating the conditional probability of the features in the drugs, decomposing the features of the classification samples and calculating the category probability; the sample with the largest probability result is judged as the category of the sample drug.
[0056] S03: Optimize LSTM regression data using an improved particle swarm optimization algorithm, improving the inertia weight w and learning factors c1 and c2; the inertia weight w is:
[0057] w = w start -(w start -w end )×(max-iter) / max (2)
[0058] Where w start As the initial value, w endHere, `max` represents the final value, `iter` represents the maximum number of iterations in the algorithm, and `iter` represents the current iteration number. The learning factors c1 and c2 are respectively:
[0059] c1 = c start -(c start -c end )×(max-iter) / max (3)
[0060] c2 = 4 - c1 (4)
[0061] Among them, c start c end These are the initial and final values of the learning factor;
[0062] Considering that drug sales are mainly affected by seasonality and replacement fluctuations, we select the seasonality m of a certain type of drug. i and updated alternative n i Given the particle's position and velocity, the improved particle swarm optimization algorithm returns the optimal parameter values; based on the optimal parameter m returned by the improved particle swarm optimization algorithm... i and n i An LSTM model is constructed, trained using training and validation data, and tested using historical drug sales datasets to predict the normal drug sales volume Z in each region. i Using an improved particle swarm optimization algorithm to determine the seasonal demand degree m i and updated alternative n i The optimal parameter values returned are:
[0063] n i iter+1 =w×n i iter +c1×r1× (p i iter -m i iter )+c2×r2× (q i iter -m i iter (5)
[0064] m i iter+1 =m i iter +n i iter (6)
[0065] Where m i iter For the seasonality of drug demand, n i iter For drug updates and substitutions, p iiter q represents the usage of a certain drug in various hospitals in previous years. i iter The data represents the usage of a certain type of drug in various hospitals over the years, with r1 and r2 being random numbers between 0 and 1.
[0066] S04: Collect environmental factor data for each region, including temperature, temperature variation, humidity, air quality, and oxygen content. Extract several features from these data, construct a random forest model by randomly selecting features, and calculate the entropy to filter features. The entropy is calculated as follows:
[0067]
[0068] Where k represents the number of features to be screened, p(k) represents the probability of the kth feature occurring, and H(Y) is the impact of environmental factors on the change in drug sales. The smaller this value is, the greater the impact.
[0069] Then, by constructing a model, the sales change M(t) of the drug under the influence of environmental factors in various regions can be predicted;
[0070] S05: Collect data on the spread of epidemics in previous years. Based on the number of infections in previous years, set the proportion of infections under normal circumstances, a, as state 1, which is considered as no epidemic outbreak. Set the proportions of infections, b, c, and d, under epidemic outbreak conditions as states 2, 3, and 4, respectively, and the epidemic spread intensities as g1, g2, and g3, respectively. Based on states 1-4, derive this year's probability vector S(1) to predict whether an epidemic will break out this year. This year's probability vector S(1) is:
[0071] S(1)=S(0)×P={p1, p2, p3, p4} (8)
[0072] Where S(0) is the probability vector of the previous year, P is the probability transition matrix, p1, p2, p3, and p4 are the probabilities of states 1-4 respectively, p1 is the probability of the normal situation, and p2, p3, and p4 are the probabilities of the epidemic outbreak situation.
[0073] S06: Based on the results of step S05, if an epidemic outbreak is predicted this year, the number of infected people R(t) and the amount of medicine required for recovery need to be predicted based on step S05. i The number of infections, R(t), is:
[0074]
[0075] Where X(0) is the number of healthy people at the initial moment, V is the area of the region, J is the intensity of virus transmission between infected and susceptible individuals, J is determined according to S(1) and takes values from g1, g2, and g3, t is the time when infected and susceptible individuals are in the same area, h is the proportionality coefficient, which is fitted and estimated according to the actual infection situation or estimated according to the results of etiological research, D is the secondary infection index, with a maximum value of 1, indicating that recovered patients will not be reinfected in a short period of time. The smaller the value, the better the disinfection situation, I is the number of people initially carrying the virus, and f is the virus transmission speed;
[0076] For example, in the case of an influenza outbreak in a 1000 square meter area, with an initial number of 100 healthy people, 5 people initially infected with influenza, a transmission intensity of 10 for the influenza virus, an infected person and a susceptible person in the same area for two weeks (14 days), a proportionality coefficient h of 0.005, a reinfection index of 0.15 for recovered patients, and an influenza transmission rate of 160 kilometers per day, then after two weeks, the number of infected people would be approximately 13. Figure 2 This shows the spread of the epidemic. The horizontal axis represents the number of days the epidemic lasts, and the vertical axis represents the total number of infections. It can be seen that when the number of days is about 13, the total number of infections shows a significant upward trend. Figure 3 This is a graph of the rate of spread of an epidemic. The horizontal axis represents the number of days the epidemic lasts, and the vertical axis represents the rate of spread of the epidemic. It can be seen that the rate of spread is greater than 1 around the 13th day, and reaches its maximum value around the 34th day. Figure 4 This is a graph showing the rate of change in the spread of an epidemic. The horizontal axis represents the number of days the epidemic lasts, and the vertical axis represents the rate of change in the epidemic rate. This graph can be used to estimate the moment when the epidemic spreads the fastest.
[0077] Considering that the amount of medication used by infected individuals and their immunity are related to the drug resistance of the infected virus, the immunity index x was selected. i and viral resistance v i Using the particle's position and velocity as parameters, an improved particle swarm optimization algorithm is used to return optimal parameters. Based on these optimal parameters, an LSTM model is constructed to predict the amount of medication D required for recovery in infected individuals. i The improved particle swarm optimization algorithm was used to analyze the immunity index x. i and viral resistance v i The optimal parameter value returned is:
[0078] x i iter+1 =w×x i iter +c1×r1× (y i iter -v i iter)+c2×r2× (z i iter -v i iter (10)
[0079] v i iter+1 =v i iter +x i iter (11)
[0080] Where x i iter As an indicator of the immunity of infected individuals, v i iter As an indicator of viral drug resistance in infected individuals, y i iter As an indicator of the age of infected individuals, z i iter The activity index of the infected person is r1 and r2, which are random numbers between 0 and 1.
[0081] S07: Based on the normal drug sales volume Z in each region obtained in step S03. i The changes in drug sales M(t) under the influence of environmental factors in various regions obtained in step S04, the number of infected people R(t) obtained in step S06, and the amount of drugs required for recovery D i Calculate the sales volume Y of medicines in each region. i :
[0082] Y i = M(t)+Z i +D i ×R(t) (1);
[0083] S08: The data analyzed by the sales forecasting model is visualized through the data visualization module to visualize the sales areas. The interface displays real-time information about the regional environment, the functional categories of drugs, real-time sales records of drugs, and demand forecast information for drugs in the region. Through this interface, sales personnel can understand the situation in each region in real time, as well as the demand for drugs in each region, thereby providing assistance to sales personnel.
[0084] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
Claims
1. A forecasting method for a pharmaceutical sales forecasting system based on the IPSO-LSTM model, comprising the following steps: S01: Collect real-time datasets, which include environmental conditions in the sales region, types and functions of medicines, the quantity of medicines demanded by hospitals in previous years, and data on the spread of epidemics in previous years. S02: Use the Naive Bayes classification algorithm to classify drugs by function; the classification process includes decomposing the features in the drug data and calculating the conditional probability of the features in the drugs, decomposing the features of the classification samples and calculating the category probability. The one with the highest probability result value is determined to be the category of the sample drug; S03: optimize LSTM regression data by improved particle swarm optimization algorithm, improve inertia weight w and learning factor c1, c2; considering that the sales volume of drugs is mainly affected by seasonal and replacement fluctuations, select the seasonal demand m of a certain type of drug i and replacement n i The position and speed of the particle, the optimal parameter value returned by the improved particle swarm optimization algorithm; according to the optimal parameters m i and n i returned by the improved particle swarm optimization algorithm, construct an LSTM model, train the model through training data and validation data, and test the prediction through the drug sales data set in previous years to predict the normal drug sales volume Z i in each region; S04: Collect environmental factor data from various regions, extract several features from them, construct a random forest model by randomly extracting features, calculate the entropy to filter features, and then predict the sales change M(t) of drugs under the influence of environmental factors in various regions by constructing a model. S05: Collect data on the spread of epidemics in previous years. Based on the number of infections in previous years, set the proportion of infections a under normal circumstances as state 1, and set the proportions b, c, and d under epidemic outbreak circumstances as state 2, 3, and 4 respectively. Based on state 1-4, obtain the probability vector S(1) for this year, and predict whether an epidemic will break out this year. S06: Based on the results of step S05, if an epidemic outbreak is predicted this year, the number of infected people R(t) and the amount of medicine required for recovery need to be predicted based on step S05. i Considering that the amount of medication used by infected individuals and their immunity are related to the drug resistance of the infected virus, the immunity index x was selected. i and viral resistance v i Using the particle's position and velocity as parameters, an improved particle swarm optimization algorithm is used to return optimal parameters. Based on these optimal parameters, an LSTM model is constructed to predict the amount of medication D required for recovery in infected individuals. i ; S07: Based on the normal drug sales volume Z in each region obtained in step S03. i The changes in drug sales M(t) under the influence of environmental factors in various regions obtained in step S04, the number of infected people R(t) obtained in step S06, and the amount of drugs required for recovery D i Calculate the sales volume Y of medicines in each region. i : Y i = M(t)+Z i +D i ×R(t) (1); S08: The data analyzed by the sales forecasting model is visualized through the data visualization module to visualize the sales area. The interface displays real-time information about the regional environment, the function and category of drugs, real-time sales records of drugs, and demand forecast information for drugs in the region, thereby assisting sales personnel.
2. The prediction method for the pharmaceutical sales forecasting system based on the IPSO-LSTM model according to claim 1, characterized in that: In step S03, the inertia weight w is: w=w start -(w start -w end )×(max-iter) / max (2) Where w start As the initial value, w end Here, `max` represents the final value, `iter` represents the maximum number of iterations in the algorithm, and `iter` represents the current iteration number. The learning factors `c1` and `c2` are respectively: c1=c start -(c start -c end )×(max-iter) / max (3) c2 = 4 - c1 (4) Among them, c start c end These are the initial and final values of the learning factor.
3. The prediction method for the pharmaceutical sales forecasting system based on the IPSO-LSTM model according to claim 1, characterized in that: In step S03, the improved particle swarm optimization algorithm is used to determine the seasonal demand degree m. i and updated alternative n i The optimal parameter values returned are: n i iter+1 =w×n i iter +c1×r1× (p i iter -m i iter )+c2×r2× (q i iter -m i iter ) (5) m i iter+1 =m i iter +n i iter (6) Where m i iter For the seasonality of drug demand, n i iter For drug updates and substitutions, p i iter q represents the usage of a certain drug in various hospitals in previous years. i iter The values represent the usage of a certain type of drug in various hospitals over the years, with r1 and r2 being random numbers between 0 and 1.
4. The prediction method for the pharmaceutical sales forecasting system based on the IPSO-LSTM model according to claim 1, characterized in that: In step S04, the environmental factor data for each region includes temperature, temperature variation, etc. Chemical composition, humidity, air quality, and oxygen content.
5. The prediction method for the pharmaceutical sales forecasting system based on the IPSO-LSTM model according to claim 1, characterized in that: In step S04, the entropy is calculated as follows: (7) Where k represents the number of features to be screened, p(k) represents the probability of the kth feature occurring, and H(Y) represents the impact of environmental factors on the change in drug sales. The smaller this value is, the greater the impact.
6. The prediction method for the pharmaceutical sales forecasting system based on the IPSO-LSTM model according to claim 1, characterized in that: In step S05, the probability vector S(1) for this year is: S(1)=S(0)×P={p1, p2, p3, p4} (8) Where S(0) is the probability vector of the previous year, P is the probability transition matrix, p1, p2, p3, and p4 are the probabilities of states 1-4 respectively, p1 is the probability of the normal situation, and p2, p3, and p4 are the probabilities of the epidemic outbreak situation.
7. The prediction method for the pharmaceutical sales forecasting system based on the IPSO-LSTM model according to claim 1, characterized in that: In step S06, the number of infected people R(t) is: R(t)=X(0){1-exp( )} (9) Where X(0) is the number of healthy people at the initial moment, V is the area of the region, J is the intensity of virus transmission between infected and susceptible individuals, J is determined according to S(1), t is the time that infected and susceptible individuals are in the same area, h is the proportionality coefficient, which is fitted and estimated according to the actual infection situation or estimated according to the results of etiological research, D is the secondary infection index, the maximum value is 1, which means that recovered patients will not be reinfected in a short period of time. The smaller the value, the better the disinfection situation, I is the number of people initially carrying the virus, and f is the virus transmission speed.
8. The prediction method for the pharmaceutical sales forecasting system based on the IPSO-LSTM model according to claim 1, characterized in that: In step S06, the improved particle swarm optimization algorithm is used to analyze the immunity index x. i and viral resistance v i The optimal parameter value returned is: x i iter+1 =w×x i iter +c1×r1× (y i iter -v i iter )+c2×r2× (z i iter -v i iter ) (10) v i iter+1 =v i iter +x i iter (11) Where x i iter As an indicator of the immunity of infected individuals, v i iter As an indicator of viral drug resistance in infected individuals, y i iter As an indicator of the age of infected individuals, z i iter The activity index of the infected person is r1 and r2, which are random numbers between 0 and 1.
9. A pharmaceutical sales forecasting system based on the IPSO-LSTM model, characterized in that: It includes a data acquisition and processing module, a drug classification module, a drug demand forecasting module, and a data visualization module that are connected in sequence via communication; and it adopts the forecasting method described in any one of claims 1-8.