CN117787867A - Medicine inventory demand analysis method and system - Google Patents
Medicine inventory demand analysis method and system Download PDFInfo
- Publication number
- CN117787867A CN117787867A CN202410210929.0A CN202410210929A CN117787867A CN 117787867 A CN117787867 A CN 117787867A CN 202410210929 A CN202410210929 A CN 202410210929A CN 117787867 A CN117787867 A CN 117787867A
- Authority
- CN
- China
- Prior art keywords
- medicine
- analysis
- medicines
- data
- inventory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 239000003814 drug Substances 0.000 title claims abstract description 214
- 229940079593 drug Drugs 0.000 title claims abstract description 111
- 238000004458 analytical method Methods 0.000 title claims abstract description 73
- 239000011159 matrix material Substances 0.000 claims abstract description 38
- 238000000611 regression analysis Methods 0.000 claims abstract description 19
- 238000012300 Sequence Analysis Methods 0.000 claims abstract description 10
- 238000000034 method Methods 0.000 claims description 41
- 239000013598 vector Substances 0.000 claims description 15
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 238000007405 data analysis Methods 0.000 claims description 7
- 238000012805 post-processing Methods 0.000 claims description 7
- 230000004913 activation Effects 0.000 claims description 6
- 229940126532 prescription medicine Drugs 0.000 claims description 6
- 230000009466 transformation Effects 0.000 claims description 6
- 230000004931 aggregating effect Effects 0.000 claims description 5
- 230000002123 temporal effect Effects 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims description 3
- 238000011176 pooling Methods 0.000 claims description 3
- 238000013459 approach Methods 0.000 claims description 2
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 238000004140 cleaning Methods 0.000 claims description 2
- 239000004576 sand Substances 0.000 claims description 2
- 238000010030 laminating Methods 0.000 abstract 1
- 230000008447 perception Effects 0.000 abstract 1
- 230000000694 effects Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000003860 storage Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 201000010099 disease Diseases 0.000 description 2
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 2
- 230000036541 health Effects 0.000 description 2
- 238000005065 mining Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000007781 pre-processing Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 208000024172 Cardiovascular disease Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 208000026106 cerebrovascular disease Diseases 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000002526 effect on cardiovascular system Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 239000000825 pharmaceutical preparation Substances 0.000 description 1
- 229940127557 pharmaceutical product Drugs 0.000 description 1
- 238000013138 pruning Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 208000023504 respiratory system disease Diseases 0.000 description 1
- 230000036962 time dependent Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000007306 turnover Effects 0.000 description 1
Landscapes
- Medical Treatment And Welfare Office Work (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a medicine inventory requirement analysis method and a system, which are used for acquiring medicine sales data of enterprises to be analyzed to establish an original data set and analyzing association relations among medicine sales; according to the requirements, the characteristics are processed by using the python language, the data are preprocessed by using the characteristic engineering, and a time sequence analysis prediction characteristic value matrix and an association relation medicine classification relation matrix are obtained by arrangement; and according to the obtained matrix, the constructed regression analysis model is used for analyzing and predicting the demands and simultaneously carrying out early warning on medicines which do not meet the demands in stock. Can carry out more accurate to enterprise's medicine demand, the demand future change analysis prediction of more laminating actual conditions can help the better perception market demand of medicine retail enterprises, handles and deals with market variation.
Description
Technical Field
The invention relates to the technical field of data analysis, in particular to a method and a system for analyzing medicine inventory requirements.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
The pharmaceutical retail business stores a certain amount of medicine to deal with different needs, and some pharmaceutical retail businesses determine the inventory needs of the next cycle by analyzing historical sales data. The medicines are different from the bulk commodities, and some medicines have correlations in efficacy and influence the data analysis process and the final inventory requirement result. The inventory of medicines can also be affected by weather, for example, common diseases such as cold in winter are increased, and then medicine retail enterprises can store more medicines related to the cold and other related diseases.
For inventory analysis requirements of medicines, an analysis model can be adopted for calculation at present, and the model is designed for a large number of commodities, lacks special design for the inventory requirements of medicines, for example, does not consider the multi-element relation among medicines, and the correlation between medicines and other attribute characteristics or time sequence characteristics, so that the inventory requirement result obtained through the current analysis model is not ideal.
Disclosure of Invention
In order to solve the technical problems in the background art, the invention provides the medicine inventory demand analysis method and the medicine inventory demand analysis system, which can analyze and predict the medicine demands of enterprises more accurately and more fit the actual conditions, reduce the inventory backlog and reduce the logistics cost.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a first aspect of the present invention provides a pharmaceutical inventory requirement analysis method comprising the steps of:
acquiring historical medicine sales data, medicine information and meteorological data of an enterprise to be analyzed and predicted to construct an original data set, and determining association relations among medicines in the original data set based on a data association rule algorithm;
according to analysis requirements, a set of medicine sets are selected from an original data set by utilizing association relations, corresponding input features are determined, and a time sequence analysis prediction feature value matrix and a multi-element relation matrix are obtained through post-processing;
and according to the obtained analysis prediction matrix, obtaining a prediction result corresponding to the analysis demand by using a regression analysis prediction model, and when the prediction result exceeds the set inventory holding quantity limit value, sending out inventory early warning.
Further, the historical medicine sales data includes sales data of medicines in a set period of time and sales promotion information during sales, the medicine information includes medicine production places, whether medicines are medical insurance medicines, whether medicines are prescription medicines, efficacy types of medicines and classifications to which the medicines belong, and weather data of places where enterprises are located includes highest air temperature, lowest air temperature, weather conditions and air quality conditions.
Further, based on a data association rule algorithm, determining association relations among medicines in the original data set, specifically: and calculating frequent item sets in the historical sales data orders by using the support degree and the confidence degree to determine the association relation between medicines by using the probability of the simultaneous occurrence of the medicine A and the medicine B as the support degree and the ratio of the probability of the simultaneous occurrence of the medicine A and the probability of the simultaneous occurrence of the medicine B to the probability of the occurrence of the medicine A as the confidence degree.
Further, a time sequence analysis prediction characteristic value matrix and a multi-element relation matrix are obtained through post-processing, and the method specifically comprises the following steps: and performing label conversion on the selected characteristics through data cleaning, generating a classification relation matrix according to the classification to which the medicine belongs, and generating an association relation matrix according to the analysis result of the association rule.
Further, in the regression analysis prediction model, a group of regression analysis prediction models is selectedSeed medicine set->Collect past->Historical price record within the trade day window, expressed as +.>Wherein->Is a medicine->In->Input features for the respective sales dates; hypergraph by belonging classification relationship>And association relation hypergraph->Modeling a collective relationship between drugs, wherein +.>For node set, ++>For the superside inner collection belonging to the same class of medicines, < > the medicine>Is a superside weight vector, element->Representing superb->Is of importance.
Further, in the regression analysis prediction model, the following is the firstmHidden state of heavenAs->Vector and define temporal attention weight +.>The following formula is shown: />The method comprises the steps of carrying out a first treatment on the surface of the Wherein->Scoring the attention function->The hidden states of each moment are respectively +.>And->Vector->Mapping to hidden space, obtaining +.A. by calculating its dot product>And>correlation between the two; hidden state after linear conversion->Weighted summation is performed to update the embedded vector +.>To describe global time dynamics of individual drugs.
Further, in the regression analysis prediction model, the method comprises the following steps ofQuantifying target drug nodessAnd its neighbor nodesuThe approach degree is weighted and aggregated to obtain update embedding; wherein the method comprises the steps ofPIs a transformation matrix to be learned, [ ·]Representing a stitching operation, ad is a shared attention vector for calculating the degree of relatedness between nodes, +.>Is a nonlinear activation function.
Further, in the regression analysis prediction model, it is assumed thatFor being in hypergraph->The medicine node is contained->For the hyperedge ++>Defining semantic features of each superside according to nodes in the superside, and generating superside embedding for the nodes:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Representing a maximum pooling operation at the element-by-element level.
Further, in the regression analysis prediction model, the medicine nodesHypergraph of classification of drugs>Is obtained by aggregating all the superside embedding thereof with a specific attention weight; medicine node->Global feature representation in the association relationship hypergraph is obtained through the intra-hyperedge attention and inter-hyperedge attention; updating and embedding the target medicine nodes based on weighting by comparing importance priorities represented by hypergraphs, and obtaining an analysis result by utilizing a full-connection layer with an activation function.
A second aspect of the present invention provides a pharmaceutical inventory requirement analysis system comprising:
a data acquisition unit configured to: acquiring historical medicine sales data, medicine information and meteorological data of a place where an enterprise is to be analyzed and predicted to construct an original data set;
an association rule analysis unit configured to: based on a data association rule algorithm, determining association relations among medicines in an original data set;
a feature engineering unit configured to: according to analysis requirements, a set of medicine sets are selected from an original data set by utilizing association relations, corresponding input features are determined, and a time sequence analysis prediction feature value matrix and a multi-element relation matrix are obtained through post-processing;
a data analysis prediction unit configured to: according to the obtained analysis prediction matrix, a regression analysis prediction model is utilized to obtain a prediction result corresponding to the analysis demand;
an inventory warning unit configured to: and when the predicted result exceeds the set inventory holding quantity limit value, an inventory early warning is sent out.
A third aspect of the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above-described method of analyzing a demand for inventory of pharmaceutical products.
A fourth aspect of the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps in the above-described method of analysing drug inventory requirements when the program is executed by the processor.
Compared with the prior art, the above technical scheme has the following beneficial effects:
a demand prediction method based on a time sequence hypergraph convolution attention network (HGAN) constructs a hypergraph model according to information of each medicine so as to fit a multi-element relation among medicines (namely various different relations among medicines like a certain attribute and a certain order) and analyze and predict inventory demands, so that a medicine enterprise can be helped to better control the inventory quantity, the cost of a supply chain is reduced, the overall operation efficiency of the supply chain is improved, the enterprise is effectively helped to reduce backlog inventory, and the cost is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention.
FIG. 1 is a schematic diagram of a drug inventory requirement analysis process provided by one or more embodiments of the invention;
FIG. 2 is a schematic diagram of a model during analysis of drug inventory requirements provided by one or more embodiments of the invention;
FIG. 3 is a schematic diagram of dynamic time series modeling during drug inventory demand analysis provided by one or more embodiments of the invention;
FIG. 4 is a schematic diagram of a regression prediction module during drug inventory requirement analysis provided by one or more embodiments of the invention;
FIG. 5 is a schematic diagram of a constructed collective relational hypergraph during drug inventory requirement analysis provided by one or more embodiments of the invention;
FIG. 6 is a schematic diagram of a hypergraph attention network during analysis of drug inventory requirements provided by one or more embodiments of the invention.
Detailed Description
The invention will be further described with reference to the drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
As described in the background, for inventory analysis requirements of medicines, an analysis model may be used to perform calculation, and such model is designed for a large amount of commodities, lacks a special design for inventory requirements of medicines, for example, does not consider multiple relationships between medicines, and correlation between medicines and other attribute features or time sequence features, so that the inventory requirement result obtained by the current analysis model is not ideal.
Therefore, the following embodiments provide a method and a system for analyzing inventory requirements of medicines, which are based on a method for predicting requirements of a time-series hypergraph convolutional attention network (HGAN), and construct a hypergraph model according to information of each medicine to fit a multivariate relationship between medicines (i.e., various relationships between medicines, as if there is a certain attribute, and as in a certain order) and analyze and predict inventory requirements, so as to help a medicine enterprise to better control inventory quantity, thereby reducing cost of a supply chain, improving overall operation efficiency of the supply chain, effectively helping the enterprise to reduce backlog inventory, and reducing cost.
Embodiment one:
as shown in fig. 1-6, the medicine inventory requirement analysis method comprises the following steps:
s100, a data acquisition unit: and acquiring historical sales data of the enterprise medicines to be analyzed and predicted to establish an original data set, wherein the original data set comprises the historical sales data, the enterprise management medicine category data, specific information data of the medicines, promotion data of the enterprise, the atmospheric data of the place where the enterprise is located and the like.
S200, an association rule analysis unit: and analyzing the medicines with stronger association relations by using the aproir association rules in combination with the actual orders of the enterprises to be analyzed.
S300, a feature engineering unit: and selecting the self characteristics, meteorological characteristics, enterprise promotion characteristics and the like of the medicines as analysis and prediction characteristics, processing the characteristics by utilizing characteristic engineering and python language according to analysis and prediction requirements, and finishing to obtain a time sequence analysis and prediction characteristic value matrix and a multivariate relation matrix.
S400, data analysis prediction unit: and constructing a regression analysis prediction model based on a time sequence hypergraph attention network (Hyper Graph Attention Network, HGAN) according to the obtained analysis prediction matrix, and carrying out analysis prediction on the demand.
S500, an inventory early warning unit: the inventory early warning unit feeds back the demand values of ten days in the future obtained through analysis and prediction to the inventory management system, and if the demand analysis and prediction values of the medicines exceed the inventory holding quantity in the inventory management system, inventory early warning is initiated.
Specifically, in S100, basic data of a pharmaceutical enterprise to be analyzed is acquired to create an original data set, and data in the data set mainly includes characteristic data of a drug itself: medicine producing area, whether medicine is a medical insurance medicine, whether medicine is a prescription medicine, the special effect type of the medicine, GSP classification of the medicine and inventory management classification of the medicine; the local meteorological information of the medical retail enterprises: highest air temperature, lowest air temperature, weather conditions, and air quality conditions; promotion information: sales promotion day setting information for a pharmaceutical retail business; the established original data set not only comprises sales data of a medicine retail enterprise, but also comprises management data of the medicine retail enterprise, and an analysis prediction index system is established by comprehensively considering internal and external data of the medicine retail enterprise, so that a comprehensive analysis prediction data set is established.
Specifically, in S100, the data in the original data set is mainly divided into two parts, namely, enterprise internal data and external data, where the data in the original data set is mainly divided into two parts, namely, enterprise internal data and external data, the collection of the data includes two parts, one part is data outside the enterprise, the main source is internet public data, the data of the part is obtained by adopting a web crawler, and the main data sources are various weather information networks; the other part is the data inside the enterprise, mainly enterprise operation data, and the data is provided by the enterprise to be analyzed.
S200, analyzing the association relation among medicines by using the aproir association rule in combination with the actual order of the enterprise to be analyzed, and finding out frequent item sets among medicines so as to model the association relation among medicines.
Apriori is a common data association rule mining method, and is used for finding out frequently-occurring data sets in a data set, so that decision of determining relationships among medicines is facilitated, and shelf placement can be designed better by finding out frequent item sets of supermarket shopping cart data.
Aproir association rule analysis finds the relationships of item sets in a database using an iterative method of layer-by-layer searching to form rules, the process of which consists of concatenating (class matrix operations) with pruning (removing those unnecessary intermediate results). The concept of term sets in the algorithm is the set of terms. The set of K items is a K-item set. The frequency of occurrence of an item set is the number of transactions that contain the item set, referred to as the frequency of the item set. If a set of items meets a minimum support, it is referred to as a frequent item set.
The support (support) is defined as:representing the probability that a and B occur simultaneously.
Confidence (confidence) is defined as:representing the ratio of the probability of the simultaneous occurrence of A and B to the probability of the occurrence of A.
The definition of frequent item sets is: the frequent pattern is a set, sequence, or substructure of items in the data set that frequently occur. The frequent item set is a set with a support degree equal to or greater than the minimum support degree (min_sup). Where support refers to the frequency with which a certain set appears in all transactions. A classical application of frequent item sets is the shopping basket model.
The strong association rule is: the association rule of minimum support and minimum confidence is satisfied.
The largest frequent k term set is output by inputting the data set D and the support threshold α. The method comprises the following steps:
(1) Scanning the whole data set to obtain all the data which appear as candidate frequent 1 item sets;
(2) Mining frequent k sets of items: the support degree of the candidate frequent k item set is calculated by the scanning data; and removing the data set with the support degree lower than the threshold value in the candidate frequent k item sets to obtain the frequent k item sets. If the obtained frequent k item set is empty, the set of frequent k-1 item sets is directly returned as an algorithm result, and the algorithm is ended. If the obtained frequent k item set has only one item, the set of the frequent k item set is directly returned as an algorithm result, and the algorithm is ended: based on the frequent k item set, generating a candidate frequent k+1 item set by connection;
(3) Let k=k+1, go to step 2.
S300, analyzing and selecting the characteristics of the medicine, the meteorological characteristics, the sales promotion characteristics of the enterprise and the like as time-allowable analysis prediction characteristics and preprocessing the time-allowable analysis prediction characteristics by combining the current situation of the enterprise to be analyzed, and selecting the GSP classification characteristics of the medicine and the inventory management classification characteristics of the retail enterprise of the medicine as the multiple relation matrix generation characteristics.
The self-characteristics of a medicine refer to the self-attribute characteristics of the medicine, such as whether the medicine belongs to a prescription medicine, whether the medicine belongs to a medicine within a medical insurance range, whether the medicine belongs to a special effect medicine, and the like. The medicine is a special commodity, and has special properties such as prescription medicines and non-prescription medicines, belongs to medicines in medical insurance range, and does not belong to medicines in medical insurance range, special effect medicines, non-special effect medicines and the like. These different properties also affect the fluctuations in the demand of the drug. For example, the primary client S of the F enterprise can pay by using the medical insurance card in a store under the flag of a chain of medical stores, and the medicine demand is larger than that of non-medical insurance medicines. For special effect types, the requirements of different special effect types corresponding to different seasons are also different, and the special effect types influence the fluctuation of the requirements.
The meteorological features are the highest air temperature, the lowest air temperature, weather conditions and air quality conditions of the place where the medicine retail enterprises are located. The influence of weather factors on human health cannot be ignored, for example, the risk of respiratory diseases caused by atmospheric pollution is increased, and some research results also show that the death rate of cardiovascular and cerebrovascular diseases has a great relation with the weather factors, and the air factors are closely related to the human health, so that the purchase types and the quantity of medicines can be influenced, and therefore, the weather factors are added in the analysis and prediction of medicine demands.
At the end of the business promotion, features are provided for the date of sales promotion for the pharmaceutical retail business. Because the relationship among promotion, demand and inventory management is inseparable, inventory can be cleaned to increase inventory turnover and increase sales of enterprises. The sales promotion factors directly affect sales data, and generally, the original stable data can fluctuate greatly, so that the sales promotion factors are considered in the demand analysis prediction model in addition to factors of medicines, and accuracy of the model is improved.
And (3) preprocessing the time sequence analysis characteristics, deleting repeated data, correcting error data, complementing data by using zero values, empty character strings or actual data, and carrying out regularization and dimensionless processing on the data.
Selecting GSP classification characteristics and inventory management classification characteristics of a medicine retail enterprise as multivariate relation matrix generation characteristics; the medicines are special commodities, the use situation is quite special, and meanwhile, a plurality of relations exist among the medicines, for example, a plurality of medicines need to be matched for use, so that the medicines frequently appear in an order. F, classifying medicines according to GSP classification by a medicine enterprise taking the enterprise as a main distribution store; meanwhile, for convenience management, enterprises carry out classification management on medicines, and medicines with similar functions can be classified into the same classification. Therefore, there are relations between medicines based on GSP medicines classified into classes, and relations between medicines based on enterprise autonomous classification. These multiple relationships affect the variation in demand between different drugs. Therefore, the multi-element relation among medicines is described by establishing an association matrix, and the multi-element relation among medicines is modeled by utilizing a hypergraph convolutional neural network and is integrated into the medicine demand analysis prediction modeling process.
S400, the principle of the analysis and prediction model established in the embodiment is as follows, and the structure is shown in FIG. 3.
Given a group ofSeed medicine set->Collect past->Historical price records within a trade day window, expressed asWherein->Is a medicine->In->Input features for the sales date. In addition, two hypergraphs are introduced to model the aggregate relationship among medicines, namely the belonging classification relationship and the association relationship among medicines. Is provided with->For the category relationship hypergraph of +.>For node set, ++>For the superside inner collection belonging to the same class of medicines, < > the medicine>Is a superside weight vector, element->Representing superb->The importance of each superside is generally considered to be equally important. Similarly, a->And representing the association relationship hypergraph extracted by Apriori.
Since the drug requirements are known, they are defined as regression problems. According to the related theory, a regression analysis prediction model based on a time sequence hypergraph attention network (Hyper Graph Attention Network, HGAN) is established, and future demands are analyzed and predicted to obtain demand results. The analysis predicts that the objective is to minimize the MSELoss function,。
first, dynamic time series attention modeling is a time dependent factor that considers demand trends, first utilizing the time dynamic characteristics captured by the GRU network. In the first placeEach medicine is respectively processed according to the sales dayIs->Input to the GRU model (here, subscript s is omitted), the GRU of the root is updated, and hidden states of the past m sales days are output, namely +.>Etc. The importance of future distinguishing of demand information at different times in the past to analyze predicted future trends of drugs further introduces a temporal attention layer that selectively emphasizes key hidden states of past sales days and suppresses insignificant states, specifically, the importance of hidden states is measured by their similarity to query vectors. Based on the recent deviation assumption that future trends in demand have a strong correlation with fluctuations in its recent period, select the hidden state of the recent date (i.e. day m)>As->Vector.
Then the time attention weightThe definition is as follows: />The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>For the attention scoring function, the hidden states of the individual moments are first of all respectively +.>And->Vector->Mapping to hidden space and then obtaining +.A. by calculating its dot product>The method comprises the steps of carrying out a first treatment on the surface of the And->The degree of correlation between the two is expressed as: />The method comprises the steps of carrying out a first treatment on the surface of the Subsequently, the hidden state after the linear transition +.>Then, the weighted summation is carried out to update the embedded vector +.>Global time dynamic features to describe individual drugs: />The method comprises the steps of carrying out a first treatment on the surface of the In the above-mentioned temporal attention layer, +.>、/>And->Is three transformation matrices that need to be learned. All +.>The updates of the individual drugs are embedded into the representation.
Second, a collective relationship construct. The HGAN is composed of a superside internal attention unit, selectively aggregates multi-source information by considering the importance of different nodes, and adaptively determines the optimal mode of information propagation in the medicine supergraph.
The intra-superside attention unit aims to learn the importance of neighbor nodes of medicines in the same superside, and firstly, for a target medicine node s and neighbor nodes u thereof, the approaching degree of s is quantized by the following formula:the method comprises the steps of carrying out a first treatment on the surface of the Wherein P is a transformation matrix to be learned, [. Cndot.]Representing a stitching operation, ad is a shared attention vector for calculating the degree of relatedness between nodes, +.>For non-linear activation functions such as LeakyReLU.
To better distribute over the edgesMiddle node->And->Attention weight of (a) to the current target node and all its neighbor nodes +.>The obtained correlation is normalized by softmax: />The method comprises the steps of carrying out a first treatment on the surface of the By node of medicineThe local overtlimit->All neighbor nodes in->And (5) weighting and aggregating to obtain update embedding: />The method comprises the steps of carrying out a first treatment on the surface of the The attention units among the supersides are further designed to be used for fusing node embedding of all specific supersides where the target medicine nodes are located.
Assume thatRepresented in hypergraph->The medicine node is contained->For the hyperedge ++>The unit first defines semantic features of each superside according to node representations in the superside, and generates superside embedding for the semantic features: />The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Representing a maximum pooling operation at the element-by-element level. In the graph theory, a specific hyperborder +.>Can be used to match the importance of all hyperedges in the hypergraph by means of it>Is measured by the proximity of (a): />The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is a transformation matrix to be learned, < >>Is a shared attention vector that calculates the degree of correlation between the superedges.
Still according to the attention mechanism thought, the medicine nodeThe specific superside is->By normalization can be expressed as: />The method comprises the steps of carrying out a first treatment on the surface of the Then, drug node->Hypergraph of classification of drugs>Can be obtained by aggregating all their superside embeddings with a specific attention weight: />The method comprises the steps of carrying out a first treatment on the surface of the Similarly, drug node->In Apriori association hypergraph +.>The global feature representation in (a) can also be obtained by the above intra-and inter-superside attention units and is denoted +.>。
Next, consider adaptively aggregating information of different relationship types. I.e. for the target drug nodeThe layer of attention units represents ++the obtained heterogeneous hypergraphs of different relations>And->Selective summarization is performed to measure the importance of different relationship types in a complex environment. The resulting combinations of representations of different hypergraph relationship types are first compared to each other:the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Is a transformation matrix to be learned, < >>Is a shared attention vector that calculates the degree of correlation between hypergraphs.
Respectively calculating the relative weights of the two in the combination, namely aiming at the medicine nodesImportance priority for two classes of hypergraph representations: />The method comprises the steps of carrying out a first treatment on the surface of the Finally, the hypergraph attention unit updates the entry of the target drug node by simple weighting: />By adding the combination drug->Embedding input into a device havingIn the fully connected layer of the activation function, the final analysis predicts its specific requirements.
Thirdly, modeling is completed to output analysis prediction analysis results.
S500, an inventory early warning unit, which starts data comparison analysis after obtaining the demand information of the data analysis and prediction unit, judges whether to initiate inventory early warning according to the analysis result, namely whether the demand for 10 days in the future exceeds the existing inventory, if so, displays early warning, and if the demand exceeds the inventory, displays the classified excess medicines in a display column of the inventory early warning system. Meanwhile, the inventory early warning unit can also display the percentage of the inventory early warning medicines in the whole medicines.
Embodiment two:
a pharmaceutical inventory requirement analysis system comprising:
a data acquisition unit configured to: acquiring historical medicine sales data, medicine information and meteorological data of a place where an enterprise is to be analyzed and predicted to construct an original data set;
an association rule analysis unit configured to: based on a data association rule algorithm, determining association relations among medicines in an original data set;
a feature engineering unit configured to: according to analysis requirements, a set of medicine sets are selected from an original data set by utilizing association relations, corresponding input features are determined, and a time sequence analysis prediction feature value matrix and a multi-element relation matrix are obtained through post-processing;
a data analysis prediction unit configured to: according to the obtained analysis prediction matrix, a regression analysis prediction model is utilized to obtain a prediction result corresponding to the analysis demand;
an inventory warning unit configured to: and when the predicted result exceeds the set inventory holding quantity limit value, an inventory early warning is sent out.
Embodiment III:
the present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the medicine inventory requirement analysis method as described in the above embodiment.
Embodiment four:
the present embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the program to implement the steps in the method for analyzing a drug inventory requirement according to the first embodiment.
The steps involved in the second to fourth embodiments correspond to the first embodiment, and the detailed description of the second embodiment refers to the related description section of the first embodiment. The term "computer-readable storage medium" should be taken to include a single medium or multiple media including one or more sets of instructions; it should also be understood to include any medium capable of storing, encoding or carrying a set of instructions for execution by a processor and that cause the processor to perform any one of the methods of the present invention.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. The medicine inventory requirement analysis method is characterized by comprising the following steps of:
acquiring historical medicine sales data, medicine information and meteorological data of an enterprise to be analyzed and predicted to construct an original data set, and determining association relations among medicines in the original data set based on a data association rule algorithm;
according to analysis requirements, a set of medicine sets are selected from an original data set by utilizing association relations, corresponding input features are determined, and a time sequence analysis prediction feature value matrix and a multi-element relation matrix are obtained through post-processing;
and according to the obtained analysis prediction matrix, obtaining a prediction result corresponding to the analysis demand by using a regression analysis prediction model, and when the prediction result exceeds the set inventory holding quantity limit value, sending out inventory early warning.
2. The medicine inventory requirement analysis method according to claim 1, wherein the historical medicine sales data includes sales data of medicines for a set period of time and sales promotion information during sales, the medicine information includes medicine producing place, whether medicines are medical insurance medicines, whether medicines are prescription medicines, efficacy types of medicines and classifications to which the medicines belong, and weather data of places where enterprises are located includes highest air temperature, lowest air temperature, weather conditions and air quality conditions.
3. The method for analyzing medicine inventory requirements according to claim 1, wherein the determining of the association relationship between the medicines in the original data set based on the data association rule algorithm is specifically: and calculating frequent item sets in the historical sales data orders by using the support degree and the confidence degree to determine the association relation between medicines by using the probability of the simultaneous occurrence of the medicine A and the medicine B as the support degree and the ratio of the probability of the simultaneous occurrence of the medicine A and the probability of the simultaneous occurrence of the medicine B to the probability of the occurrence of the medicine A as the confidence degree.
4. The method for analyzing the inventory requirement of the medicine according to claim 1, wherein the time sequence analysis prediction characteristic value matrix and the multivariate relation matrix are obtained through post-processing, specifically: and performing label conversion on the selected characteristics through data cleaning, generating a classification relation matrix according to the classification to which the medicine belongs, and generating an association relation matrix according to the analysis result of the association rule.
5. The method of claim 1, wherein the regression analysis prediction model is selected from a group consisting ofSeed medicine set->Collect past->Historical price records within a trade day window, expressed asWherein->Is a medicine->In->Input features for the respective sales dates; hypergraph by belonging classification relationship>And association relation hypergraph->Modeling drugsA collective relation between>For node set, ++>For the superside inner collection belonging to the same class of medicines, < > the medicine>Is a superside weight vector, element->Representing superb->Is of importance.
6. The method of claim 1, wherein the regression analysis prediction model is used for the first step ofmHidden state of heavenAs->Vector and define temporal attention weight +.>The following formula is shown:
;
wherein the method comprises the steps ofScoring the attention function->Concealing each timeStatus->And->Vector->Mapping to hidden space, obtaining +.A. by calculating its dot product>And>correlation between the two; hidden state after linear conversion->Weighted summation is performed to update the embedded vector +.>To describe global time dynamics of individual drugs.
7. The drug inventory requirement analysis method of claim 1, in which the regression analysis prediction model is used to calculate the drug inventory requirement byQuantifying target drug nodessAnd its neighbor nodesuThe approach degree is weighted and aggregated to obtain update embedding; wherein the method comprises the steps ofPIs a transformation matrix to be learned, [ ·]Representing a stitching operation, ad is a shared attention vector for calculating the degree of relatedness between nodes, +.>Is a nonlinear activation function.
8. Drug inventory requirement analysis as claimed in claim 1The method is characterized in that in a regression analysis prediction model, the assumption is that ,For being in hypergraph->The medicine node is contained->According to the hyperedge ++>Defining semantic features of each superside for which a superside embedding is generated: />The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Representing a maximum pooling operation at the element-by-element level.
9. The drug inventory requirement analysis method of claim 1, in which in the regression analysis prediction model, drug nodesHypergraph of classification of drugs>Is obtained by aggregating all the superside embedding thereof with a specific attention weight; medicine node->Global feature representation in the association relationship hypergraph is obtained through the intra-hyperedge attention and inter-hyperedge attention; updating embedment based on weighted updating of target drug nodes by comparing importance priorities of hypergraph representations and utilizing full with activation functionsThe connection layer gave the analysis result.
10. A pharmaceutical inventory requirement analysis system, comprising:
a data acquisition unit configured to: acquiring historical medicine sales data, medicine information and meteorological data of a place where an enterprise is to be analyzed and predicted to construct an original data set;
an association rule analysis unit configured to: based on a data association rule algorithm, determining association relations among medicines in an original data set;
a feature engineering unit configured to: according to analysis requirements, a set of medicine sets are selected from an original data set by utilizing association relations, corresponding input features are determined, and a time sequence analysis prediction feature value matrix and a multi-element relation matrix are obtained through post-processing;
a data analysis prediction unit configured to: according to the obtained analysis prediction matrix, a regression analysis prediction model is utilized to obtain a prediction result corresponding to the analysis demand;
an inventory warning unit configured to: and when the predicted result exceeds the set inventory holding quantity limit value, an inventory early warning is sent out.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410210929.0A CN117787867A (en) | 2024-02-27 | 2024-02-27 | Medicine inventory demand analysis method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410210929.0A CN117787867A (en) | 2024-02-27 | 2024-02-27 | Medicine inventory demand analysis method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117787867A true CN117787867A (en) | 2024-03-29 |
Family
ID=90394889
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410210929.0A Pending CN117787867A (en) | 2024-02-27 | 2024-02-27 | Medicine inventory demand analysis method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117787867A (en) |
Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100138281A1 (en) * | 2008-11-12 | 2010-06-03 | Yinying Zhang | System and method for retail store shelf stock monitoring, predicting, and reporting |
US20120303411A1 (en) * | 2011-05-25 | 2012-11-29 | International Business Machines Corporation | Demand modeling and prediction in a retail category |
KR101774329B1 (en) * | 2017-03-08 | 2017-09-04 | 김종훈 | Inventory management system of drug in drug distribution corporation |
KR101774327B1 (en) * | 2017-03-08 | 2017-09-19 | 김종훈 | Method for managing orders of medicine in drug distribution corporation |
US20200250688A1 (en) * | 2019-02-05 | 2020-08-06 | Target Brands, Inc. | Method and system for attributes based forecasting |
CN113326974A (en) * | 2021-05-01 | 2021-08-31 | 北京工业大学 | Multi-source traffic flow prediction method based on multitask hypergraph convolution network |
CN113990427A (en) * | 2021-11-05 | 2022-01-28 | 北方健康医疗大数据科技有限公司 | Target data determination method and device, electronic equipment and storage medium |
CN114219169A (en) * | 2021-12-23 | 2022-03-22 | 上海颖幡技术有限公司 | Script banner supply chain sales and inventory prediction algorithm model and application system |
CN114611798A (en) * | 2022-03-06 | 2022-06-10 | 北京工业大学 | OD passenger flow prediction method based on dynamic hypergraph convolutional neural network |
CN115099842A (en) * | 2022-05-30 | 2022-09-23 | 城云科技(中国)有限公司 | Commodity sales prediction model, construction method and application thereof |
WO2023016173A1 (en) * | 2021-08-10 | 2023-02-16 | 北京沃东天骏信息技术有限公司 | Inventory adjustment method and apparatus, electronic device, and computer readable medium |
CN115760210A (en) * | 2022-11-17 | 2023-03-07 | 江西药葫芦科技有限公司 | Medicine sales prediction system and method based on IPSO-LSTM model |
CN115830865A (en) * | 2022-11-18 | 2023-03-21 | 浙江大学 | Vehicle flow prediction method and device based on adaptive hypergraph convolution neural network |
CN115866658A (en) * | 2023-02-06 | 2023-03-28 | 湖北工业大学 | Traffic prediction method and system based on dynamic spatiotemporal hypergraph convolutional network |
CN116579803A (en) * | 2022-12-22 | 2023-08-11 | 北京数势云创科技有限公司 | Multi-class joint demand prediction method and device based on substitution and association effects |
CN116703455A (en) * | 2023-08-02 | 2023-09-05 | 北京药云数据科技有限公司 | Medicine data sales prediction method and system based on time series hybrid model |
CN117131979A (en) * | 2023-08-14 | 2023-11-28 | 北京交通大学 | Traffic flow speed prediction method and system based on directed hypergraph and attention mechanism |
CN117174272A (en) * | 2023-09-20 | 2023-12-05 | 叮当快药科技集团有限公司 | Medicine control method, equipment and medium based on big data model |
-
2024
- 2024-02-27 CN CN202410210929.0A patent/CN117787867A/en active Pending
Patent Citations (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100138281A1 (en) * | 2008-11-12 | 2010-06-03 | Yinying Zhang | System and method for retail store shelf stock monitoring, predicting, and reporting |
US20120303411A1 (en) * | 2011-05-25 | 2012-11-29 | International Business Machines Corporation | Demand modeling and prediction in a retail category |
KR101774329B1 (en) * | 2017-03-08 | 2017-09-04 | 김종훈 | Inventory management system of drug in drug distribution corporation |
KR101774327B1 (en) * | 2017-03-08 | 2017-09-19 | 김종훈 | Method for managing orders of medicine in drug distribution corporation |
US20200250688A1 (en) * | 2019-02-05 | 2020-08-06 | Target Brands, Inc. | Method and system for attributes based forecasting |
CN113326974A (en) * | 2021-05-01 | 2021-08-31 | 北京工业大学 | Multi-source traffic flow prediction method based on multitask hypergraph convolution network |
WO2023016173A1 (en) * | 2021-08-10 | 2023-02-16 | 北京沃东天骏信息技术有限公司 | Inventory adjustment method and apparatus, electronic device, and computer readable medium |
CN113990427A (en) * | 2021-11-05 | 2022-01-28 | 北方健康医疗大数据科技有限公司 | Target data determination method and device, electronic equipment and storage medium |
CN114219169A (en) * | 2021-12-23 | 2022-03-22 | 上海颖幡技术有限公司 | Script banner supply chain sales and inventory prediction algorithm model and application system |
CN114611798A (en) * | 2022-03-06 | 2022-06-10 | 北京工业大学 | OD passenger flow prediction method based on dynamic hypergraph convolutional neural network |
CN115099842A (en) * | 2022-05-30 | 2022-09-23 | 城云科技(中国)有限公司 | Commodity sales prediction model, construction method and application thereof |
CN115760210A (en) * | 2022-11-17 | 2023-03-07 | 江西药葫芦科技有限公司 | Medicine sales prediction system and method based on IPSO-LSTM model |
CN115830865A (en) * | 2022-11-18 | 2023-03-21 | 浙江大学 | Vehicle flow prediction method and device based on adaptive hypergraph convolution neural network |
CN116579803A (en) * | 2022-12-22 | 2023-08-11 | 北京数势云创科技有限公司 | Multi-class joint demand prediction method and device based on substitution and association effects |
CN115866658A (en) * | 2023-02-06 | 2023-03-28 | 湖北工业大学 | Traffic prediction method and system based on dynamic spatiotemporal hypergraph convolutional network |
CN116703455A (en) * | 2023-08-02 | 2023-09-05 | 北京药云数据科技有限公司 | Medicine data sales prediction method and system based on time series hybrid model |
CN117131979A (en) * | 2023-08-14 | 2023-11-28 | 北京交通大学 | Traffic flow speed prediction method and system based on directed hypergraph and attention mechanism |
CN117174272A (en) * | 2023-09-20 | 2023-12-05 | 叮当快药科技集团有限公司 | Medicine control method, equipment and medium based on big data model |
Non-Patent Citations (5)
Title |
---|
尚庆生;王丽华;: "基于频繁项集挖掘的零售医药企业药品关联研究", 重庆科技学院学报(自然科学版), no. 06, 15 December 2019 (2019-12-15), pages 102 - 104 * |
崔盛楠: "基于处方数据的医院药品需求量的关联性预测方法研究", 中国优秀硕士学位论文全文数据库 医药卫生科技辑》, no. 03, 15 March 2016 (2016-03-15), pages 079 - 153 * |
李晓杰: "基于超图注意力网络的股票市场投资预测研究", 《中国优秀硕士学位论文全文数据库 (基础科学辑)》, no. 11, 15 November 2022 (2022-11-15), pages 140 - 78 * |
李晓杰等: "基于时序超图卷积神经网络的股票趋势预测方法", 《计算机应用》, vol. 42, no. 03, 9 August 2021 (2021-08-09), pages 797 - 803 * |
王丽华: "医药零售企业的销量预测与库存优化研究", 《中国优秀硕士学位论文全文数据库经济与管理科学辑》, no. 02, 15 February 2021 (2021-02-15), pages 152 - 1151 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Topuz et al. | Predicting pediatric clinic no-shows: a decision analytic framework using elastic net and Bayesian belief network | |
Venkatesh et al. | Cash demand forecasting in ATMs by clustering and neural networks | |
Ghazal et al. | Application of knowledge discovery in database (KDD) techniques in cost overrun of construction projects | |
Cheng et al. | Classifying the segmentation of customer value via RFM model and RS theory | |
JP2020115346A (en) | AI driven transaction management system | |
Morid et al. | Learning hidden patterns from patient multivariate time series data using convolutional neural networks: A case study of healthcare cost prediction | |
Baghla et al. | Performance evaluation of various classification techniques for customer churn prediction in e-commerce | |
Butt et al. | Intelligence based accurate medium and long term load forecasting system | |
Hua et al. | Markdowns in e-commerce fresh retail: a counterfactual prediction and multi-period optimization approach | |
US11816539B1 (en) | Selection system for machine learning module for determining target metrics for evaluation of health care procedures and providers | |
Zheng et al. | Graph-convolved factorization machines for personalized recommendation | |
CN117195061B (en) | Event response prediction model processing method and device and computer equipment | |
Purnamasari et al. | Demand forecasting for improved inventory management in small and medium-sized businesses | |
Li et al. | Study of E-business applications based on big data analysis in modern hospital health management | |
Karthik et al. | A Survey of Price Prediction using Deep Learning Classifier for Multiple Stock Datasets | |
Ni et al. | Robust factorization machines for credit default prediction | |
Cheri | Optimizations of training dataset on house price estimation | |
Rofi'i | Analysis of E-Commerce Purchase Patterns Using Big Data: An Integrative Approach to Understanding Consumer Behavior | |
Duchemin et al. | Forecasting customer churn: Comparing the performance of statistical methods on more than just accuracy | |
CN117787867A (en) | Medicine inventory demand analysis method and system | |
Liu et al. | Predicting hospital readmission using graph representation learning based on patient and disease bipartite graph | |
Khakpour | Data science for decision support: Using machine learning and big data in sales forecasting for production and retail | |
Satpathy et al. | Sparse index tracking using sequential Monte Carlo | |
Bertsimas et al. | Holistic prescriptive analytics for continuous and constrained optimization problems | |
Nguyen et al. | A personalized product recommendation model in e-commerce based on retrieval strategy |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |