Regional drug demand prediction method and medium
By collecting drug use data in primary medical institutions, using long-term and short memory networks and recurrent neural networks to predict drug demand and performing fusion processing, the problem of lagging drug demand forecast in primary medical institutions is solved, and more accurate drug demand forecast is achieved, reducing the lack of drugs and overstock.
Patent Information
- Application Number
- CN202510084938.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-02-28
AI Technical Summary
Due to the lagging forecast of drug demand in primary medical institutions, there are often problems such as lack of drugs or overstock, which leads to the inability to meet the demand or failure to perform due to the short shelf life.
A regional-wide drug demand prediction method is adopted to collect drug use data from primary medical institutions, use long-term and short memory networks and recurrent neural networks to predict, and the outputs of the two models are fused to obtain more accurate drug use demand.
A more accurate prediction of drug demand in the future has been achieved, reducing the lack of drugs and overstocking, and improving the efficiency of drug management.
Smart Images

Figure CN119541756A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical information technology, and in particular to a method and medium for predicting regional drug demand. Background Art
[0002] Grassroots medical institutions include township health centers, village clinics and community health service stations. Due to the relatively poor medical capabilities of grassroots medical institutions, in order to ensure safety, all drug services including prescriptions are centralized in the management of the next higher level medical institutions (county hospitals). In the current management, for drug issues, the grassroots medical institutions generally first put forward the demand, and then the next higher level medical institutions distribute them. However, in this management method, the next higher level medical institutions have to clarify the drug demand only when the grassroots medical institutions put forward the demand, which is relatively lagging. This leads to frequent drug shortages and cannot fully meet the drug needs of grassroots medical institutions. If a large number of drugs are stored in advance, due to the greater uncertainty, there will be a serious inventory situation, resulting in excessive accumulation of drugs, and even drug failure for some drugs with a short shelf life. Summary of the invention
[0003] The technical problem to be solved by the present application is to provide a method and medium for predicting regional drug demand, which has the characteristics of being able to more accurately predict the drug demand within a preset regional scope for a period of time in the future, thereby reducing drug shortages and drug accumulation.
[0004] In a first aspect, an embodiment provides a method for predicting regional drug demand, including: Collecting the amount of medication used by the drug-demanding subjects in the preset area in the preset time period as the first medication amount; Processing the first medication dosage through a long short-term memory network to obtain a predicted medication quantity in a predicted time period as a second medication dosage; Processing the first medication dosage through a recurrent neural network to obtain a predicted medication quantity for a predicted time period as a third medication dosage; The second dosage amount and the third dosage amount are combined to obtain a fourth dosage amount; Based on the fourth medication amount, the medication quantity required by the medication object in the predicted time period is obtained.
[0005] In one embodiment, the step of collecting the amount of medication used by the drug-demanding subjects in the preset area in the preset time period as the first medication amount includes: Collect prescriptions of each primary medical institution in a preset area during the preset time period, where the prescriptions are prescriptions involved in the drug demand object; Extracting the amount of medication used by each primary medical institution in the preset time period based on the prescription; A first medication dosage in the preset area within the preset time period is calculated.
[0006] In one embodiment, the preset time period includes a plurality of time periods arranged in time and the step length of each time period is the same.
[0007] In one embodiment, the predicted time period includes a time period next to the last time period in the multiple time periods arranged in time, and the step length of the next time period is the same as the step length of any time period in the multiple time periods.
[0008] In one embodiment, the step of processing the first medication dosage through a long short-term memory network to obtain a predicted medication quantity for a predicted time period as the second medication dosage includes: , in, represents the second dosage of any drug object i in the preset area, represents the second medication amount of any drug object i by the j-th primary medical institution in the preset area, 1≤j≤M, M represents the total amount of primary medical institutions in the preset area, t represents the last time period of the multiple time periods, t+1 represents the next time period after the last time period, , represents the long short-term memory network model, It represents the quantity of medication used by the jth primary medical institution for any drug object i in the tkth time period, k=0,1,2,3.
[0009] In one embodiment, the step of processing the first medication dosage through a recurrent neural network to obtain a predicted medication quantity for a predicted time period as the third medication dosage includes: , in, represents the third dosage of any drug object i in the preset area, represents the third medication amount of any drug object i by the j-th primary medical institution in the preset area, 1≤j≤M, M represents the total amount of primary medical institutions in the preset area, t represents the last time period of the multiple time periods, t+1 represents the next time period after the last time period, , represents a recurrent neural network model, It represents the quantity of medication used by the jth primary medical institution for any drug object i in the tkth time period, k=0,1,2,3.
[0010] In one embodiment, the time period represented by t has a step size of one week.
[0011] In one embodiment, the step of fusing the second dosage amount and the third dosage amount to obtain a fourth dosage amount includes: , in, Indicates the fourth dosage, Represents the weight coefficient, which is obtained based on model training.
[0012] In one embodiment, obtaining the required medication quantity of the drug-demanding object in the predicted time period based on the fourth medication quantity includes: using the fourth medication quantity as the required medication quantity of the drug-demanding object in the predicted time period.
[0013] In a second aspect, an embodiment provides a computer-readable storage medium, in which a program is stored, and the program can be loaded by a processor to execute the regional drug demand forecasting method described in any one of the above embodiments.
[0014] The beneficial effects of the present invention are: On the one hand, for any kind of demand medicine, the demand quantity for a preset future period of time can be predicted through a trained neural network based on the dosage of the previous time series, so as to obtain the accurate demand quantity for the future period of time, which can prompt drug procurement decisions based on the predicted accurate demand quantity, thereby reducing drug shortages and drug accumulation. On the other hand, since a drug demand is predicted based on the long short-term memory network and the recurrent neural network respectively, and another drug demand is obtained based on the fusion processing of the two predicted drug demands, the accuracy of the prediction is improved, and a more accurate drug demand can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flow chart of a method for predicting regional drug demand according to an embodiment of the present application; Figure 2 This application Figure 1 FIG. 1 is a schematic diagram of a method flow chart of an embodiment of step S10 in FIG. DETAILED DESCRIPTION
[0016] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0017] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0018] The serial numbers assigned to the components in this article, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.
[0019] To facilitate the description of the inventive concept of the present application, the regional drug demand forecasting technology is briefly described below.
[0020] In order to solve the problem of drug shortage in primary medical institutions, among the current plans, the desirable plan is to establish and improve the linkage allocation and use mechanism of primary medicines, improve the centralized supply and distribution mechanism of primary medicines, and improve the early warning and processing mechanism of primary medicine shortages. Although these mechanisms and institutional arrangements can alleviate this problem to a certain extent, they cannot fundamentally and accurately locate demand and achieve periodic dynamic prediction.
[0021] In view of this, a method and medium for predicting regional drug demand is provided in the embodiments of the present application. In the scheme, on the one hand, for any kind of demand drug, the demand quantity of a preset future period of time can be predicted based on the dosage of the previous time series through a trained neural network, so that the accurate demand quantity of the future period of time can be obtained, which can prompt drug procurement decisions based on the predicted accurate demand quantity of the drug, thereby reducing drug shortages and drug accumulation. On the other hand, since a drug demand is predicted based on the long short-term memory network and the recurrent neural network respectively, and another drug demand is obtained based on the fusion processing of the two predicted drug demands, the accuracy of the prediction is improved, and a more accurate drug demand can be obtained.
[0022] In one embodiment of the present application, a method for predicting regional drug demand is provided. Figure 1 ,include: Step S10, collecting the medication quantity of the drug-demanding objects in the preset area in the preset time period as the first medication quantity.
[0023] Those skilled in the art can understand that the preset area here can be all primary medical institutions under the jurisdiction of a higher-level medical institution, or can be part of the primary medical institutions.
[0024] In one embodiment, please refer to Figure 2 , step S10 may include: Step S101, collecting prescriptions of each primary medical institution in a preset area in a preset time period, wherein the prescriptions are prescriptions involved in the drug demand object.
[0025] Those skilled in the art can understand that for the first dosage, the upper-level medical institution can directly obtain it from the primary medical institution, however, this increases the cumbersome interactive processing process. The applicant found in the study that the prescriptions of primary medical institutions within a certain area need to be concentrated in the upper-level medical institution for review, which provides a basis for regional drug demand forecasting: after the upper-level medical institution reviews the prescriptions of primary medical institutions within the jurisdiction area, it can extract the types and quantities of drugs in the prescriptions.
[0026] Therefore, in order to obtain the first dosage of a specific drug in demand, the type and quantity of the drug in the prescription can be directly extracted and saved after the prescription is reviewed, and then classified and calculated. However, in order to avoid calculation distortion caused by prescription changes, in one embodiment, the prescription is saved, and when the prescription needs to be changed, the changed prescription is directly replaced with the original prescription for saving. When the first dosage of a specific drug in demand is needed, the prescription involved in the drug demand object is collected to extract the dosage. On the one hand, it can correspond to the corresponding prescription for later verification, and on the other hand, it is more convenient to classify prescriptions and medications by region.
[0027] Step S102, extracting the amount of medicine used in each primary medical institution in a preset time period based on the prescription.
[0028] In one embodiment, the preset time period includes multiple time periods arranged in time and the step length of each time period is the same. The time period can be in days, for example, obtaining the number of medications per day for the past 30 time periods, that is, the past 30 days, or in weeks, for example, obtaining the number of medications per week for the past 4 weeks. The step length can also be set according to demand, for example, setting the step length to 3 days or 10 days, and obtaining the number of medications for the past 10, 15 or 20 3 days or 10 days. Those skilled in the art can understand that the step length of the time period and the number of time periods can be set based on their own needs, all within the scope of protection of this application.
[0029] In an embodiment of the present application, an example is given in which the step length of the time period is one week and the preset time period includes 4 time periods.
[0030] Step S103, calculating the first medication dosage in the preset area within the preset time period.
[0031] Taking a preset area including M primary medical institutions as an example, calculate the first weekly medication amount of the drug demand subjects in the M primary medical institutions in each primary medical institution over the past 4 weeks.
[0032] Those skilled in the art will appreciate that the above process can automatically extract and calculate the first dosage based on the stored prescription by performing keyword search and context semantic association, which will not be described in detail here.
[0033] Step S20, the first medication dosage is processed by a long short-term memory network to obtain a predicted medication quantity for a predicted time period as the second medication dosage.
[0034] In one embodiment, the predicted time period includes the next time period of the last time period in the multiple time periods arranged in time, and the step length of the next time period is the same as the step length of any time period in the multiple time periods. For example, if the step length of the time period is one week, the predicted time period is the next week.
[0035] In one embodiment, step S20 may include: , in, represents the second dosage of any drug object i in the preset area, represents the second dosage of any drug object i by the jth primary medical institution in the preset area, 1≤j≤M, M represents the total amount of primary medical institutions in the preset area, t represents the last time period among multiple time periods, t+1 represents the next time period after the last time period, , represents the long short-term memory network model, It represents the quantity of medication used by the jth primary medical institution for any drug object i in the tkth time period, k=0,1,2,3.
[0036] Here, the long short-term memory network includes multiple sub-long short-term memory networks. First, based on each sub-long short-term memory network, the long short-term memory network model is used to , calculate the second medication amount of any drug object i in the preset area in each primary medical institution, and then accumulate the second medication amount of each primary medical institution to obtain the second medication amount of any drug object i in the preset area.
[0037] Step S30, the first medication dosage is processed by a recurrent neural network to obtain a predicted medication quantity for a predicted time period as the third medication dosage.
[0038] In one embodiment, step S30 includes: , in, represents the third dosage of any drug object i in the preset area, represents the third medication amount of any drug object i in the jth primary medical institution in the preset area, 1≤j≤M, M represents the total amount of primary medical institutions in the preset area, t represents the last time period among multiple time periods, t+1 represents the next time period after the last time period, , represents a recurrent neural network model, It represents the quantity of medication used by the jth primary medical institution for any drug object i in the tkth time period, k=0,1,2,3.
[0039] Here, the recurrent neural network includes multiple sub-recurrent neural networks. First, based on each sub-recurrent neural network, the recurrent neural network model is used , calculate the third medication amount of any drug object i in the preset area in each primary medical institution, and then accumulate the third medication amount of each primary medical institution to obtain the third medication amount of any drug object i in the preset area.
[0040] Step S40, merging the second medication dosage and the third medication dosage to obtain a fourth medication dosage.
[0041] In one embodiment, step S40 includes: , in, Indicates the fourth dosage, Represents the weight coefficient, which is obtained based on model training.
[0042] The above process can be obtained by combining the drug demand prediction neural network obtained by loss function training. The drug demand prediction neural network includes a parallel long short-term memory network and a recurrent neural network, and a weighted fusion layer for weighted fusion processing of the outputs of the long short-term memory network and the recurrent neural network. Among them, the long short-term memory network includes multiple parallel sub-long short-term memory networks and an accumulation layer for accumulating the outputs of multiple sub-long short-term memory networks; the recurrent neural network includes multiple parallel sub-recurrent neural networks and an accumulation layer for accumulating the outputs of multiple sub-recurrent neural networks. For each sub-long short-term memory network, it includes a long short-term memory network model including an input layer, an LSTM layer (including a forget gate, an input gate, and an output gate) and an output layer. For each sub-recurrent neural network, it includes a recurrent neural network model including an input layer, an RNN layer, and an output layer.
[0043] In the training of the demand prediction neural network, a large amount of medication quantity data containing time series information is first collected and preprocessed to obtain a data set, and the data set is divided into a training set, a validation set, and a test set. For example, it can be divided according to the ratio of 70%, 15%, and 15%. Construct a suitable loss function, and train the constructed prediction neural network infrastructure in combination with the training set, validation set, and test set to obtain the final prediction neural network.
[0044] Step S50: based on the fourth medication amount, obtaining the medication quantity required by the medication object in the predicted time period.
[0045] In one embodiment, the fourth dosage can be directly used as the dosage required by the drug demand object in the forecast period. In one embodiment, the fourth dosage can also be adjusted according to actual conditions, and the adjusted fourth dosage can be used as the dosage required by the drug demand object in the forecast period.
[0046] Based on the above scheme, the upper-level medical institution can easily and accurately predict the required drug quantity of each drug-demand object in the predicted time period based on the conventional existing data, and then, based on the required drug quantity, check whether the inventory is met or the satisfaction degree, thereby providing a basis for purchasing decisions and avoiding drug shortages or drug accumulation.
[0047] In one embodiment of the present application, a computer-readable storage medium is provided, on which a program is stored. The stored program includes a method that can be loaded by a processor and process any of the above embodiments.
[0048] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0049] The above specific examples are used to illustrate the present invention, which are only used to help understand the present invention and are not used to limit the present invention. For those skilled in the art to which the present invention belongs, some simple deductions, modifications or substitutions can be made according to the idea of the present invention.
Claims
1. A method for predicting regional drug demand, characterized in that: include: Collecting the amount of medication used by the drug-demanding subjects in the preset area in the preset time period as the first medication amount; Processing the first medication dosage through a long short-term memory network to obtain a predicted medication quantity in a predicted time period as a second medication dosage; Processing the first medication dosage through a recurrent neural network to obtain a predicted medication quantity for a predicted time period as a third medication dosage; The second dosage amount and the third dosage amount are combined to obtain a fourth dosage amount; Based on the fourth medication amount, the medication quantity required by the medication object in the predicted time period is obtained.
2. The regional drug demand forecasting method according to claim 1, characterized in that: The step of collecting the medication quantity of the drug-demanding subjects in the preset area in the preset time period as the first medication quantity includes: Collect prescriptions of each primary medical institution in a preset area during the preset time period, where the prescriptions are prescriptions involved in the drug demand object; Extracting the amount of medication used by each primary medical institution in the preset time period based on the prescription; A first medication dosage in the preset area within the preset time period is calculated.
3. The regional drug demand forecasting method according to claim 2, characterized in that: The preset time period includes a plurality of time periods arranged in time and the step length of each time period is the same.
4. The regional drug demand forecasting method according to claim 3, characterized in that: The predicted time period includes a time period next to the last time period of the multiple time periods arranged in time, and the step length of the next time period is the same as the step length of any time period of the multiple time periods.
5. The regional drug demand forecasting method according to claim 4, characterized in that: The step of processing the first medication dosage through a long short-term memory network to obtain a predicted medication quantity in a predicted time period as the second medication dosage includes: , in, represents the second dosage of any drug object i in the preset area, represents the second medication amount of any drug object i by the j-th primary medical institution in the preset area, 1≤j≤M, M represents the total amount of primary medical institutions in the preset area, t represents the last time period of the multiple time periods, t+1 represents the next time period after the last time period, , represents the long short-term memory network model, It represents the quantity of medication used by the jth primary medical institution for any drug object i in the tkth time period, k=0,1,2,3.
6. The regional drug demand forecasting method according to claim 4, characterized in that: The step of processing the first medication dosage through a recurrent neural network to obtain a predicted medication quantity for a predicted time period as the third medication dosage includes: , in, represents the third dosage of any drug object i in the preset area, represents the third medication amount of any drug object i by the j-th primary medical institution in the preset area, 1≤j≤M, M represents the total amount of primary medical institutions in the preset area, t represents the last time period of the multiple time periods, t+1 represents the next time period after the last time period, , represents a recurrent neural network model, It represents the quantity of medication used by the jth primary medical institution for any drug object i in the tkth time period, k=0,1,2,3.
7. The regional drug demand forecasting method according to claim 5 or 6, characterized in that: The time period represented by t has a step length of one week.
8. The regional drug demand forecasting method according to claim 1, characterized in that: The step of fusing the second dosage amount and the third dosage amount to obtain a fourth dosage amount includes: , in, Indicates the fourth dosage, Represents the weight coefficient, which is obtained based on model training.
9. The regional drug demand forecasting method according to claim 1, characterized in that: The obtaining, based on the fourth medication amount, the medication quantity required by the drug-demanding object in the predicted time period includes: using the fourth medication amount as the medication quantity required by the drug-demanding object in the predicted time period.
10. A computer-readable storage medium, characterized in that: The medium stores a program, which can be loaded by a processor and execute the regional drug demand forecasting method as described in any one of claims 1 to 9.