Method for realizing drug sales prediction model
By using Arima, LightGBM, and LSTM models to predict drug sales data, and weighted fusion, solve the problem of calculating complexity and result uncertainty in the existing technology, and achieved more accurate and stable drug sales forecast forecasting Essence
Patent Information
- Application Number
- CN202411336149.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art is difficult to accurately calculate the similarity between labels when there are many labels and complex relationships, resulting in uncertainty in the results and not using more powerful machine learning or deep learning models to capture complex patterns and relationships in the data.
Adopt the Arima model, LightGBM model, and LSTM models to predict drug sales data, combined with the prediction results of these models for weighted fusion, as the final drug sales prediction results.
Through the weighted fusion of a variety of models, the accuracy and stability of drug sales prediction have been improved, and the shortcomings of a single model have been made up and the volatility of the result is reduced.
Smart Images

Figure CN119379342A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for realizing a drug sales forecasting model, and belongs to the field of pharmaceutical marketing. Background Art
[0002] In the modern pharmaceutical industry, drug sales forecasting is of great significance to the company's market strategy, inventory management and financial planning. With the development of data science and machine learning technology, traditional sales forecasting methods are gradually replaced by more advanced models. These traditional methods usually rely on historical sales data and market research, but in the face of a rapidly changing market environment, they often cannot accurately capture sales fluctuations.
[0003] The ARIMA model, full name Autoregressive Integrated Moving Average Model, is a statistical method for predicting and analyzing time series data. LightGBM (Light Gradient Boosting Machine) is an integrated learning model released by Microsoft in 2016, mainly used for classification, regression and other machine learning tasks. It builds a strong learner by integrating multiple weak learners (usually decision trees) to achieve better prediction results. The LSTM (Long Short-Term Memory) model is a special recursive neural network (RNN) proposed by Hochreiter and Schmidhuber in 1997. It is widely used in natural language processing, speech recognition, image processing, and time series prediction.
[0004] Prior art, such as the Chinese patent with patent number "CN107845424A", discloses a method for processing and analyzing diagnostic information. The method for processing and analyzing diagnostic information includes the following steps: establishing a feature space and a label space through multiple sample features and label information, and establishing a feature vector and a first label vector of the sample; calculating the number of occurrences of each label information; calculating the number of times each two label information appear in a sample at the same time; calculating the similarity of each two label information, and establishing a label-label similarity matrix; reconstructing the first label vector to obtain a second label vector, and calculating the probability of occurrence of the target sample label information according to the second label vector; selecting a preset number of label information as the recommended label information of the target sample.
[0005] The problem with the above-mentioned prior art is that the label vector is reconstructed by calculating the similarity between labels. This method may become complicated and difficult to calculate accurately when there are many labels and the relationships are complex. Similarity calculation depends on specific algorithms and parameter settings. Different algorithms and parameters may lead to different results, increasing the uncertainty of the results. Labels are recommended mainly based on statistics and similarity calculations, without using more powerful models such as machine learning or deep learning to capture complex patterns and relationships in the data. Summary of the invention
[0006] In order to solve the above problems existing in the prior art, the present invention proposes a method for realizing a drug sales prediction model.
[0007] The technical solution of the present invention is as follows:
[0008] In one aspect, the present invention provides a method for implementing a drug sales prediction model, comprising the following steps:
[0009] Collect drug characteristic data and drug sales data of several drug prescribing units, wherein the drug characteristic data includes billing details data, basic attribute data, and consultation data; fill missing parts in the drug characteristic data with 0, and filter out abnormal drug characteristic data; the abnormal drug characteristic data refers to drug characteristic data whose deviation from the average value of the drug characteristic data exceeds three times the standard deviation;
[0010] Normalizing the filtered drug characteristic data;
[0011] For prescribing units with missing drug sales data, the association substitution method based on Euclidean distance is used to complete the drug sales data;
[0012] Obtain drug feature data and drug sales data from the prescribing unit, use the drug sales data as label data, and use the drug feature data and label data to train the ARIMA model, LightGBM model, and LSTM model;
[0013] The prediction results of the ARIMA model, LightGBM model and LSTM model are weighted and fused as the prediction results of the drug sales data of the prescribing unit.
[0014] As a preferred implementation, the normalization method is:
[0015]
[0016] Among them, x new represents the drug characteristic data after normalization, x represents the drug characteristic data before normalization, and x min represents the minimum value of the drug characteristic data before normalization, x maxIndicates the maximum value of drug characteristic data before normalization.
[0017] As a preferred embodiment, the association alternative method based on Euclidean distance is expressed as:
[0018] Let the prescription units with complete sales data of several drugs within a week be:
[0019] (Q1...Q i ...Q m );
[0020] Among them, Q i represents the prescribing unit with complete sales data of the i-th drug, i∈[1,m];
[0021] The drug prescribing unit Q that makes drug sales data complete i The drug characteristic data are:
[0022] (x i1 ...x ij ...x in );
[0023] Among them, x ij Represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, j∈[1,n];
[0024] Let the prescribing units with missing drug sales data in the same time period be:
[0025] (W1...W v ...W g );
[0026] Among them, W v represents the prescribing unit with the vth missing drug sales data, v∈[1,g], g≤m;
[0027] Let the prescribing unit W with missing drug sales data v The drug characteristic data are:
[0028] (t v1 ...t vj ...t vn );
[0029] Among them, t vj It represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data;
[0030] In the same time period, obtaining the Euclidean distance between the drug characteristic data of each prescribing unit with missing drug sales data and the drug characteristic data of each prescribing unit with complete drug sales data includes the following steps:
[0031] S1, let v = 1;
[0032] S2,
[0033] Among them, d(Q i ,W v ) represents the Euclidean distance between the vth prescribing unit with missing drug sales data and the ith prescribing unit with complete drug sales data; x ij represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, t vj It represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data;
[0034] S3, repeating step S2 until the Euclidean distance between the vth prescribing unit with missing drug sales data and the prescribing unit with complete drug sales data is obtained;
[0035] S4. Sort the Euclidean distances between the vth prescribing unit with missing drug sales data and the prescribing units with complete drug sales data from small to large, take out the first k prescribing units with complete drug sales data corresponding to the closest distances, calculate the mean of the drug sales data of these k prescribing units with complete drug sales data, and use the mean to fill in the drug sales data of the vth prescribing unit with missing drug sales data;
[0036] S5, let v = v + 1, and repeat S2 until v = g;
[0037] Based on the fluctuation range of the drug sales data of the drug prescribing unit for 7 days, the drug sales data of the drug prescribing unit for the whole month is estimated:
[0038]
[0039] Among them, Sales month Sales represents the drug sales data of the prescribing unit for the whole month. week_i represents the complete drug sales data of the prescribing unit on the i-th day in week_day, day_num i represents the number of the ith week_day in a month, rand(0,ΔY) represents the random number function, ΔY represents the fluctuation threshold, ajust_ratio ij It represents the jth adjustment coefficient corresponding to the ith week_day, ajust_ratio∈(0,1].
[0040] As a preferred implementation, the method for weighted fusion of the prediction results of the ARIMA model, the LightGBM model and the LSTM model is:
[0041]
[0042] Among them, Sales predict represents the final sales forecast result, w i Represents the weight coefficient of the model, Sales i Indicates the sales forecast result of the model. When i is 1, it indicates the ARIMA model; when i is 2, it indicates the LightGBM model; when i is 3, it indicates the LSTM model.
[0043] On the other hand, the present invention also provides a system for implementing a drug sales forecasting model, comprising:
[0044] Data collection module: collects drug characteristic data and drug sales data of several drug prescribing units, the drug characteristic data includes billing details data, basic attribute data and consultation data; fills missing parts in the drug characteristic data with 0, and filters abnormal drug characteristic data; the abnormal drug characteristic data refers to drug characteristic data whose deviation from the average value of the drug characteristic data exceeds three times the standard deviation;
[0045] Data processing module: normalize the filtered drug characteristic data;
[0046] Data completion module: For prescribing units with missing drug sales data, the drug sales data is completed using the association substitution method based on Euclidean distance;
[0047] Model training module: obtain drug feature data and drug sales data of the prescribing unit, use the drug sales data as label data, and use the drug feature data and label data to train the ARIMA model, LightGBM model, and LSTM model;
[0048] Result prediction module: The prediction results of the ARIMA model, LightGBM model and LSTM model are weighted and integrated as the prediction results of the drug sales data of the prescribing unit.
[0049] On the other hand, the present invention further provides an electronic device having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for implementing a drug sales prediction model as described in any embodiment of the present invention.
[0050] On the other hand, the present invention also provides a computer-readable medium for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method for implementing a drug sales prediction model as described in any embodiment of the present invention.
[0051] The present invention has the following beneficial effects:
[0052] The present invention uses an association substitution method based on Euclidean distance to complete the drug sales data for the prescribing units with missing drug sales data, thereby improving the integrity and availability of the data. The present invention is not limited to a single model, but selects the ARIMA model, the LightGBM model and the LSTM model for training. These three models have their own advantages in the field of prediction. For example, the ARIMA model is good at processing the trend and seasonal changes of time series data, the LightGBM model performs well in classification and regression problems, and the LSTM model is good at capturing long-term dependencies. By combining these three models, Scheme 2 can make full use of their respective advantages, make up for the shortcomings of a single model, and improve the accuracy and stability of the prediction results. The prediction results of the ARIMA model, the LightGBM model and the LSTM model are weighted and fused to obtain the final prediction results. This weighted fusion strategy can comprehensively consider the prediction results of different models, reduce the volatility of the prediction results of a single model, and improve the accuracy of the overall prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The present invention is a flow chart of the implementation method. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0056] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0057] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0058] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0059] Embodiment 1:
[0060] See also Figure 1 The present invention provides a method for realizing a drug sales prediction model, comprising the following steps:
[0061] Collect drug characteristic data and drug sales data of several drug prescribing units, wherein the drug characteristic data includes billing details data, basic attribute data, and consultation data; fill missing parts in the drug characteristic data with 0, and filter out abnormal drug characteristic data; the abnormal drug characteristic data refers to drug characteristic data whose deviation from the average value of the drug characteristic data exceeds three times the standard deviation;
[0062] Normalizing the filtered drug characteristic data;
[0063] For prescribing units with missing drug sales data, the association substitution method based on Euclidean distance is used to complete the drug sales data;
[0064] Obtain drug feature data and drug sales data from the prescribing unit, use the drug sales data as label data, and use the drug feature data and label data to train the ARIMA model, LightGBM model, and LSTM model;
[0065] The prediction results of the ARIMA model, LightGBM model and LSTM model are weighted and fused as the prediction results of the drug sales data of the prescribing unit.
[0066] As a preferred implementation, the normalization method is:
[0067]
[0068] Among them, x new represents the drug characteristic data after normalization, x represents the drug characteristic data before normalization, and x min represents the minimum value of the drug characteristic data before normalization, x max Indicates the maximum value of drug feature data before normalization. Normalization can eliminate the influence of different dimensions or magnitudes, improve the efficiency of model training, and accelerate model convergence.
[0069] As a preferred embodiment, the association alternative method based on Euclidean distance is expressed as:
[0070] Let the prescription units with complete sales data of several drugs within a week be:
[0071] (Q1...Q i ...Q m );
[0072] Among them, Q irepresents the prescribing unit with complete sales data of the i-th drug, i∈[1,m];
[0073] The drug prescribing unit Q that makes drug sales data complete i The drug characteristic data are:
[0074] (x i1 ...x ij ...x in );
[0075] Among them, x ij Represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, j∈[1,n];
[0076] Let the prescribing units with missing drug sales data in the same time period be:
[0077] (W1...W v ...W g );
[0078] Among them, W v represents the prescribing unit with the vth missing drug sales data, v∈[1,g], g≤m;
[0079] Let the prescribing unit W with missing drug sales data v The drug characteristic data are:
[0080] (t v1 ...t vj ...t vn );
[0081] Among them, t vj It represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data;
[0082] In the same time period, obtaining the Euclidean distance between the drug characteristic data of each prescribing unit with missing drug sales data and the drug characteristic data of each prescribing unit with complete drug sales data includes the following steps:
[0083] S1, let v = 1;
[0084] S2,
[0085] Among them, d(Q i ,W v ) represents the Euclidean distance between the vth prescribing unit with missing drug sales data and the ith prescribing unit with complete drug sales data; x ij represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, t vjIt represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data;
[0086] S3, repeating step S2 until the Euclidean distance between the vth prescribing unit with missing drug sales data and the prescribing unit with complete drug sales data is obtained;
[0087] S4. Sort the Euclidean distances between the vth prescribing unit with missing drug sales data and the prescribing units with complete drug sales data from small to large, take out the first k prescribing units with complete drug sales data corresponding to the closest distances, calculate the mean of the drug sales data of these k prescribing units with complete drug sales data, and use the mean to fill in the drug sales data of the vth prescribing unit with missing drug sales data;
[0088] S5, let v = v + 1, and repeat S2 until v = g;
[0089] Based on the fluctuation range of the drug sales data of the drug prescribing unit for 7 days, the drug sales data of the drug prescribing unit for the whole month is estimated:
[0090]
[0091] Among them, Sales month Sales represents the drug sales data of the prescribing unit for the whole month. week_i represents the complete drug sales data for the i-th day in the prescription unit week_day (week_day represents the seven days of the prescription unit with complete drug sales data, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday), day_num i represents the number of the ith week_day in a month, rand(0,ΔY) represents the random number function, ΔY represents the fluctuation threshold, ajust_ratio ij It represents the jth adjustment coefficient corresponding to the i-th week_day, ajust_ratio∈(0,1]. By completing the data, more comprehensive information can be provided, making the model more reliable and contributing to more accurate decision analysis.
[0092] As a preferred implementation, the method for weighted fusion of the prediction results of the ARIMA model, the LightGBM model and the LSTM model is:
[0093]
[0094] Among them, Sales predict represents the final sales forecast result, w i Represents the weight coefficient of the model, Sales iIndicates the sales forecast result of the model. When i is 1, it indicates the ARIMA model; when i is 2, it indicates the LightGBM model; when i is 3, it indicates the LSTM model.
[0095] Model fusion can overcome the shortcomings of a single model and improve the prediction effect by integrating the advantages of different models.
[0096] Embodiment 2:
[0097] The present invention also provides a system for implementing a drug sales forecasting model, comprising:
[0098] Data collection module: collects drug characteristic data and drug sales data of several drug prescribing units, the drug characteristic data includes billing details data, basic attribute data and consultation data; fills missing parts in the drug characteristic data with 0, and filters abnormal drug characteristic data; the abnormal drug characteristic data refers to drug characteristic data whose deviation from the average value of the drug characteristic data exceeds three times the standard deviation;
[0099] Data processing module: normalize the filtered drug characteristic data;
[0100] Data completion module: For prescribing units with missing drug sales data, the drug sales data is completed using the association substitution method based on Euclidean distance;
[0101] Model training module: obtain drug feature data and drug sales data of the prescribing unit, use the drug sales data as label data, and use the drug feature data and label data to train the ARIMA model, LightGBM model, and LSTM model;
[0102] Result prediction module: The prediction results of the ARIMA model, LightGBM model and LSTM model are weighted and integrated as the prediction results of the drug sales data of the prescribing unit.
[0103] Embodiment three:
[0104] This embodiment provides an electronic device having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for realizing a drug sales prediction model as described in any embodiment of the present invention is implemented.
[0105] Embodiment 4:
[0106] This embodiment provides a computer-readable medium for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for implementing a drug sales prediction model as described in any embodiment of the present invention.
[0107] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0108] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0110] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0111] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for implementing a drug sales prediction model, characterized in that: The following steps are involved: Collect drug characteristic data and drug sales data of several drug prescribing units, wherein the drug characteristic data includes billing details data, basic attribute data, and consultation data; fill missing parts in the drug characteristic data with 0, and filter out abnormal drug characteristic data; the abnormal drug characteristic data refers to drug characteristic data whose deviation from the average value of the drug characteristic data exceeds three times the standard deviation; Normalizing the filtered drug characteristic data; For prescribing units with missing drug sales data, the association substitution method based on Euclidean distance is used to complete the drug sales data; Obtain drug feature data and drug sales data from the prescribing unit, use the drug sales data as label data, and use the drug feature data and label data to train the ARIMA model, LightGBM model, and LSTM model; The prediction results of the ARIMA model, LightGBM model and LSTM model are weighted and fused as the prediction results of the drug sales data of the prescribing unit.
2. The method for realizing a drug sales prediction model according to claim 1, characterized in that: The normalization method is: Among them, x new represents the drug characteristic data after normalization, x represents the drug characteristic data before normalization, and x min represents the minimum value of the drug characteristic data before normalization, x max Indicates the maximum value of drug characteristic data before normalization.
3. The method for realizing a drug sales prediction model according to claim 1, characterized in that: An alternative approach using association based on Euclidean distance is expressed as: Let the prescription units with complete sales data of several drugs within a week be: (Q1...Q i ...Q m ); Among them, Q i represents the prescribing unit with complete sales data of the i-th drug, i∈[1,m]; The drug prescribing unit Q that makes drug sales data complete i The drug characteristic data are: (x i1 ...x ij ...x in ); Among them, x ij Represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, j∈[1,n]; Let the prescribing units with missing drug sales data in the same time period be: (W1...W v ...IN g ); Among them, W v represents the prescribing unit with the vth missing drug sales data, v∈[1,g], g≤m; Let the prescribing unit W with missing drug sales data v The drug characteristic data are: (t v1 ...t vj ...t vn ); Among them, t vj It represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data; In the same time period, obtaining the Euclidean distance between the drug characteristic data of each prescribing unit with missing drug sales data and the drug characteristic data of each prescribing unit with complete drug sales data includes the following steps: S1, let v = 1; S2、 Among them, d(Q i ,W v ) represents the Euclidean distance between the vth prescribing unit with missing drug sales data and the ith prescribing unit with complete drug sales data; x ij represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, t vj It represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data; S3, repeating step S2 until the Euclidean distance between the vth prescribing unit with missing drug sales data and the prescribing unit with complete drug sales data is obtained; S4. Sort the Euclidean distances between the vth prescribing unit with missing drug sales data and the prescribing units with complete drug sales data from small to large, take out the first k prescribing units with complete drug sales data corresponding to the closest distances, calculate the mean of the drug sales data of these k prescribing units with complete drug sales data, and use the mean to fill in the drug sales data of the vth prescribing unit with missing drug sales data; S5, let v = v + 1, and repeat S2 until v = g; Based on the fluctuation range of the drug sales data of the drug prescribing unit for 7 days, the drug sales data of the drug prescribing unit for the whole month is estimated: Among them, Sales month Sales represents the drug sales data of the prescribing unit for the whole month. week_i represents the complete drug sales data of the prescribing unit on the i-th day in week_day, day_num i represents the number of the ith week_day in a month, rand(0,ΔY) represents the random number function, ΔY represents the fluctuation threshold, ajust_ratio ij It represents the jth adjustment coefficient corresponding to the ith week_day, ajust_ratio∈(0,1].
4. The method for realizing a drug sales prediction model according to claim 1, characterized in that: The method for weighted fusion of the prediction results of the ARIMA model, LightGBM model and LSTM model is: Among them, Sales predict represents the final sales forecast result, w i Represents the weight coefficient of the model, Sales i Indicates the sales forecast result of the model. When i is 1, it indicates the ARIMA model; when i is 2, it indicates the LightGBM model; when i is 3, it indicates the LSTM model.
5. A system for implementing a drug sales prediction model, characterized in that: include: Data collection module: collects drug characteristic data and drug sales data of several drug prescribing units, the drug characteristic data includes billing details data, basic attribute data and consultation data; fills missing parts in the drug characteristic data with 0, and filters abnormal drug characteristic data; the abnormal drug characteristic data refers to drug characteristic data whose deviation from the average value of the drug characteristic data exceeds three times the standard deviation; Data processing module: normalize the filtered drug characteristic data; Data completion module: For prescribing units with missing drug sales data, the drug sales data is completed using the association substitution method based on Euclidean distance; Model training module: obtain drug feature data and drug sales data of the prescribing unit, use the drug sales data as label data, and use the drug feature data and label data to train the ARIMA model, LightGBM model, and LSTM model; Result prediction module: The prediction results of the ARIMA model, LightGBM model and LSTM model are weighted and integrated as the prediction results of the drug sales data of the prescribing unit.
6. The system for realizing a drug sales prediction model according to claim 5, characterized in that: The data processing module, the normalization method is: Among them, x new represents the drug characteristic data after normalization, x represents the drug characteristic data before normalization, and x min represents the minimum value of the drug characteristic data before normalization, x max Indicates the maximum value of drug characteristic data before normalization.
7. The system for realizing a drug sales prediction model according to claim 5, characterized in that: The data completion module is expressed as follows using an association substitution method based on Euclidean distance: Let the prescription units with complete sales data of several drugs within a week be: (Q1...Q i ...Q m ); Among them, Q i represents the prescribing unit with complete sales data of the i-th drug, i∈[1,m]; The drug prescribing unit Q that makes drug sales data complete i The drug characteristic data are: (x i1 ...x ij ...x in ); Among them, x ij Represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, j∈[1,n]; Let the prescribing units with missing drug sales data in the same time period be: (W1...W v ...IN g ); Among them, W v represents the prescribing unit with the vth missing drug sales data, v∈[1,g], g≤m; Let the prescribing unit W with missing drug sales data v The drug characteristic data are: (t v1 ...t vj ...t vn ); Among them, t vj It represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data; In the same time period, obtaining the Euclidean distance between the drug characteristic data of each prescribing unit with missing drug sales data and the drug characteristic data of each prescribing unit with complete drug sales data includes the following steps: S1, let v = 1; S2、 Among them, d(Q i ,W v ) represents the Euclidean distance between the vth prescribing unit with missing drug sales data and the ith prescribing unit with complete drug sales data; x ij represents the characteristic data of the jth drug of the prescribing unit with complete sales data of the i-th drug, t vj It represents the j-th drug characteristic data of the prescribing unit with the v-th missing drug sales data; S3, repeating step S2 until the Euclidean distance between the vth prescribing unit with missing drug sales data and the prescribing unit with complete drug sales data is obtained; S4. Sort the Euclidean distances between the vth prescribing unit with missing drug sales data and the prescribing units with complete drug sales data from small to large, take out the first k prescribing units with complete drug sales data corresponding to the closest distances, calculate the mean of the drug sales data of these k prescribing units with complete drug sales data, and use the mean to fill in the drug sales data of the vth prescribing unit with missing drug sales data; S5, let v = v + 1, and repeat S2 until v = g; Based on the fluctuation range of the drug sales data of the drug prescribing unit for 7 days, the drug sales data of the drug prescribing unit for the whole month is estimated: Among them, Sales month Sales represents the drug sales data of the prescribing unit for the whole month. week_i represents the complete drug sales data of the prescribing unit on the i-th day in week_day, day_num i represents the number of the ith week_day in a month, rand(0,ΔY) represents the random number function, ΔY represents the fluctuation threshold, ajust_ratio ij It represents the jth adjustment coefficient corresponding to the ith week_day, ajust_ratio∈(0,1].
8. The system for realizing a drug sales prediction model according to claim 5, characterized in that: The method for weighted fusion of the prediction results of the result prediction module, ARIMA model, LightGBM model and LSTM model is as follows: Among them, Sales predict represents the final sales forecast result, w i Represents the weight coefficient of the model, Sales i Indicates the sales forecast result of the model. When i is 1, it indicates the ARIMA model; when i is 2, it indicates the LightGBM model; when i is 3, it indicates the LSTM model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for realizing a drug sales prediction model as described in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for realizing a drug sales prediction model as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method and system of processing and analyzing diagnosis information
CN107845424A