Medical market data analysis system and method based on big data
Through the big data analysis system, Apriori and ARIMA models are used to establish drug data item sets and calculate production conversion ratios, solving the data lag and interaction evaluation problems in pharmaceutical market data analysis, and achieving more accurate and timely market insights and Production regulation.
Patent Information
- Application Number
- CN202410685549.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-08-23
AI Technical Summary
Existing pharmaceutical market data analysis methods have problems with data lag and insufficient depth. Especially for the assessment of seasonal drugs and drug-drug interactions, it is difficult to accurately reflect market dynamics and consumer needs.
Adopting a pharmaceutical market data analysis system based on big data, including data displacement module, item set association module, production impact module and production adjustment module, through the Apriori algorithm and ARIMA model, the drug data item set is established, the influence coefficient and the production conversion ratio are calculated. Forecast future production needs.
It improves the accuracy and timeliness of market data analysis, helps companies better understand consumer purchasing habits and trends, reduces information lag, and enhances market competitiveness.
Smart Images

Figure CN118537047A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to a pharmaceutical market data analysis system and method based on big data. Background Art
[0002] Pharmaceutical market data analysis refers to the process of analyzing pharmaceutical industry-related data sets to gain insights and make decisions. Conventional pharmaceutical market data is obtained by analyzing drug purchase records and conducting market research. It can help pharmaceutical companies and pharmaceutical companies understand market dynamics, develop effective market strategies, optimize product positioning, and increase market share and growth opportunities.
[0003] At present, information-based market analysis methods can automatically obtain drug purchase records and evaluate drug demand based on the records. However, due to the long feedback cycle between obtaining demand assessment results and factories adjusting production, the data obtained in this way usually has a high lag. Especially for some seasonal drugs, the reference value of the evaluation data will decrease, and the data mining process of drug purchase records is not deep enough.
[0004] In addition, customers often buy multiple drugs at a time, and the interactions and promotion effects between various drugs are different. The sales of some drugs are easily affected by other drugs. In this case, evaluating drug demand requires more than simple sales statistics. It is also necessary to evaluate the correlation and stability of the drug market. Summary of the invention
[0005] The purpose of the present invention is to provide a pharmaceutical market data analysis system and method based on big data to solve the problems raised in the above background technology.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a pharmaceutical market data analysis system based on big data, comprising: a data displacement module, an item set association module, a production impact module, a conversion evaluation module and a production adjustment module;
[0007] The data displacement module is used to collect the drug purchase data of customers within a preset period, clean the collected drug purchase data, and store the data in the database in the order of collection time to form a displacement database;
[0008] The item set association module is used to process the database using the Apriori algorithm to generate all frequent item sets, calculate the support of each item set according to the number of times the item set appears in the database, screen out the item sets with support higher than a threshold as a class of item sets, calculate the confidence of all the class of item sets, calculate the lift of the item set according to the confidence, calculate the level parameter of the item set according to the lift and the stability of the item set, and thus establish item set connections with different level parameters;
[0009] The production impact module is used to obtain the production data of the factory's drugs, and according to the average time from the factory's production to sales, after shifting an average time, obtain the production data corresponding to the drug sales data in the current cycle, and calculate the impact coefficient of the drug production volume and the corresponding item set level parameter according to the production data;
[0010] The conversion evaluation module is used to evaluate the importance of each drug in the item set according to the influence coefficient of each drug production on the item set, and calculate the production conversion ratio between factory production and drug sales according to the importance of the drug in all item sets and in combination with factory production data;
[0011] The production adjustment module is used to generate a scatter point sequence of production conversion ratios that change with the cycle based on the production conversion ratios in multiple historical cycles, use the ARIMA model to predict the next item of the scatter point sequence, obtain the predicted value of the production conversion ratio for the next cycle, and calculate the stability of the scatter point sequence. According to the predicted value and stability of the production conversion ratio, the factory's production of drugs is adjusted.
[0012] Further, the data displacement module includes: a platform drug purchasing unit and a database unit;
[0013] The platform drug purchasing unit is used to collect drug purchasing data of customers and send the drug purchasing data to the management platform. The drug purchasing data includes: drug purchasing time, drug purchasing type and drug purchasing quantity;
[0014] The database unit is used to store the collected drug purchase data in chronological order.
[0015] Furthermore, the item set association module includes: an element combination unit, a confidence screening unit and a weak connection unit;
[0016] The element combination unit is used to execute the Apriori algorithm on the drug purchase data stored in the database and output an item set;
[0017] The confidence screening unit is used to calculate the support, confidence and lift of each item set and screen all item sets;
[0018] The weakly connected unit is used to calculate the level parameters of each item set in combination with the stability of the item set.
[0019] Further, the production impact module includes: a production displacement unit and a market impact unit;
[0020] The production displacement unit is used to obtain drug production data corresponding to the current sales data collection cycle from the factory;
[0021] The market impact unit is used to calculate the impact coefficient between the drug production volume and the corresponding item set level parameter.
[0022] Further, the conversion evaluation module includes: a drug characteristic unit and a benefit conversion unit;
[0023] The drug characteristic unit is used to calculate the characteristic coefficient of each drug in each item set containing the drug according to the level parameter of the item set and the influence coefficient of the drug production volume;
[0024] The benefit conversion unit is used to calculate the production conversion ratio between factory production and drug sales.
[0025] Further, the production adjustment module includes: a scatter plotting unit, a stability prediction unit and a value suggestion unit;
[0026] The scatter plotting unit is used to generate a scatter sequence corresponding to the drug according to the historical production conversion ratio of the drug;
[0027] The stable prediction unit is used to calculate the stability of the scattered point sequence and predict the next item of the scattered point sequence;
[0028] The value suggestion unit is used to adjust the drug production volume in the next cycle of the factory according to the predicted value of the next item of the scattered point sequence and the stability of the scattered point sequence.
[0029] A pharmaceutical market data analysis method based on big data comprises the following steps:
[0030] Step S1. Determine a sampling period according to the average time from drug production to shelf-loading, obtain drug purchase data of customers within the sampling period, and store the drug purchase data as item sets in a database in chronological order to form a drug data set;
[0031] Step S2. The drug data set is processed using the Apriori algorithm to generate an item set containing the customer's single drug purchase data, and the support of each item set is calculated according to the proportion of the item set appearing in the drug data set, and the item set with a support higher than a threshold is screened out as a class of item sets, and the influence confidence between each two drugs is calculated according to the arrangement of the elements in the class of item sets;
[0032] Step S3. Obtain the drug production volume of the factory in the previous cycle, calculate the correlation coefficient between the production ratio of the two drugs and the impact confidence, sum the correlation coefficients and multiply them by the impact confidence to obtain the weight of the drug;
[0033] Step S4. Calculate the ratio of the weight to the purchase quantity based on the sum of the drug weights and the sum of the purchase quantities of each drug in the item set, multiply it by the weight of each drug, and obtain the demand quantity of the drug. Calculate the production conversion ratio of the drug based on the demand quantity and actual production volume of the drug.
[0034] Step S5. Based on the production conversion ratio in the historical period, generate a scatter sequence of production conversion ratio changes with the period, use the ARIMA model to predict the next item of the scatter sequence, obtain the predicted value of the production conversion ratio for the next period, and adjust the factory's production quantity of drugs according to the revised predicted value.
[0035] Further, step S1 includes:
[0036] Step S11. According to the logistics records of the drugs, the time from the completion of the production of each drug to the sale of the drug is counted, and the average time from the production of all drugs to the sale of the drug is used as the sampling period;
[0037] Step S12. When a customer purchases medicines, the customer's medicine purchase data is recorded, and the medicine purchase data includes: the time of purchase, the type of medicine purchased, and the quantity of medicine purchased;
[0038] Step S13. Send the drug purchase data of all customers within a sampling period to the database, add index numbers to the drug purchase data in chronological order, and generate an item set based on each drug purchase data. The item set is a sequence, and the elements in the sequence are the types of drugs purchased by the customers. The positions of the elements are arranged in descending order according to the quantity of drugs purchased. All item sets are combined to generate a drug data set.
[0039] Further, step S2 includes:
[0040] Step S21. Use the Apriori algorithm to process the drug data set and filter out the infrequent item sets therein;
[0041] Step S22. Calculate the support A of each item set, where A = m1 / M, where m1 represents the number of times the item set appears in the database, and M represents the total number of times all item sets appear in the database. Filter out all item sets whose support is lower than a preset threshold, and the item sets finally obtained constitute a class of item set set {W1, W2, ..., Wn}, where n represents the number of item sets, and Wn represents the item set with index number n;
[0042] Step S23. Arrange and combine the drugs in pairs. If two drugs in the combination have appeared in the same item set, execute the influence confidence calculation method to obtain the influence confidence between the two drugs. The influence confidence calculation method is as follows:
[0043]
[0044] Among them, C (r,h) represents the confidence level of the impact between drug r and drug h, E (r,h) represents the number of all item sets containing drug r and drug h, Er represents the number of item sets containing drug r, Eh represents the number of item sets containing drug h, G irepresents the distance between drug r and drug h in the i-th item set containing drug r and drug h, Ur i represents the purchase quantity of drug r in the i-th item set containing drug r and drug h, Uh i represents the purchase quantity of drug h in the i-th item set containing drug r and drug h;
[0045] If the two drugs in the combination have never appeared in the same item set, the impact confidence is set to 0.
[0046] Further, step S3 includes:
[0047] Step S31. Obtain the production quantity of each drug in the factory in the previous cycle, and execute steps S32-S34 for each drug to calculate the weight of the drug;
[0048] Step S32. Obtain the confidence of the impact of drug r and other drugs to form a sequence L1: [C (r,1) ,C (r,2) ,…,C (r,n)] , where C (r,n) represents the impact confidence between drug r and drug n, and generates a sequence L2 according to the production quantity of the drug: [D1, D2, ..., Dn], where Dn = Ur / Un, where Ur represents the total purchase quantity of drug r, and Un represents the total purchase quantity of drug n;
[0049] Step S33. Calculate the correlation coefficient between sequence L1 and sequence L2 according to the following formula:
[0050]
[0051] Among them, a represents the correlation coefficient between sequence L1 and sequence L2, C1 j Represents the jth element in sequence C1, C1 v represents the average value of all elements in sequence C1, C2 j Represents the jth element in sequence C2, C2 v Represents the average value of all elements in sequence C2;
[0052] Step S34: Multiply the sum of all elements in the sequence L1 by the correlation coefficient to obtain the weight K of the drug.
[0053] Further, step S4 includes:
[0054] Step S41. The sum obtained by adding the weights of all drugs is recorded as KP, the sum obtained by adding the purchase quantities of all drugs is recorded as UP, and the weight ratio P is calculated, where P=UP / KP;
[0055] Step S42. Execute the production conversion ratio calculation method for each drug, the production conversion ratio calculation method is as follows:
[0056] The demand quantity X of the drug is calculated, where X=P·K, where K represents the weight of the drug. According to the production quantity of the drug, the production conversion ratio Y of the drug is calculated, where Y=X / D, where D represents the production quantity of the drug.
[0057] Further, step S5 includes:
[0058] Step S51. Obtain the production conversion ratio of each drug in the historical g cycles, and perform correction S52-S53 for each drug to adjust the production volume of the drug;
[0059] Step S52. Generate a scattered point sequence L3 using the period as the number: [Y g ,Y g-1 ,…,Y 0 ], where Y0 represents the production conversion ratio of drugs in the current cycle, and Yg represents the production conversion ratio of drugs in the gth cycle before the current cycle. The ARIMA model is used to predict the next item of the scattered point sequence to obtain the predicted value YF;
[0060] Step S53. According to the predicted value YF, the factory's production of drugs in the current cycle is adjusted so that the adjusted production volume DF satisfies DF=YF·DS, where DS represents the production volume of drugs in the previous cycle.
[0061] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0062] 1. The present invention can establish a displacement database based on the drug purchase data of users within a preset period, establish item sets for the displacement database, perform support screening and confidence analysis on all item sets, and establish drug data connections of different levels, which can help companies understand consumers' purchasing habits and trends, and determine the combination purchase of drugs, thereby improving the accuracy of market data analysis and better meeting consumer needs.
[0063] 2. The present invention can calculate the influence coefficient according to the drug production data, establish the characteristic value of the drug in each item set, calculate the production conversion ratio of the drug according to the characteristic value of the drug in all items set, analyze the main drug and auxiliary drug, so as to improve the timeliness of the pharmaceutical market analysis data, analyze the profit of the factory producing each drug, and realize more efficient drug production.
[0064] 3. The present invention can draw a value scatter function based on the production conversion ratio in multiple historical cycles, predict the production conversion ratio of future drugs, and calculate the stability of the value scatter function, so that the factory can adjust the production volume of drugs in advance and avoid information lag, which helps enterprises adapt to market changes more quickly and improve their market competitiveness. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0066] Figure 1 It is a structural schematic diagram of a pharmaceutical market data analysis system based on big data of the present invention;
[0067] Figure 2 It is a schematic diagram of the steps of a pharmaceutical market data analysis method based on big data of the present invention. DETAILED DESCRIPTION
[0068] 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.
[0069] See also Figure 1 ,The present invention provides a technical solution: a pharmaceutical market data analysis system based on big data, comprising: a data displacement module, an item set association module, a production impact module, a conversion evaluation module and a production adjustment module;
[0070] The data displacement module is used to collect the drug purchase data of customers within a preset period, clean the collected drug purchase data, and store the data in the database in the order of collection time to form a displacement database;
[0071] The data displacement module includes: a platform drug purchasing unit and a database unit;
[0072] The platform drug purchasing unit is used to collect drug purchasing data of customers and send the drug purchasing data to the management platform. The drug purchasing data includes: drug purchasing time, drug purchasing type and drug purchasing quantity;
[0073] The database unit is used to store the collected drug purchase data in chronological order.
[0074] The item set association module is used to process the database using the Apriori algorithm to generate all frequent item sets, calculate the support of each item set according to the number of times the item set appears in the database, screen out the item sets with support higher than a threshold as a class of item sets, calculate the confidence of all the class of item sets, calculate the lift of the item set according to the confidence, calculate the level parameter of the item set according to the lift and the stability of the item set, and thus establish item set connections with different level parameters;
[0075] The item set association module includes: an element combination unit, a confidence screening unit and a weak connection unit;
[0076] The element combination unit is used to execute the Apriori algorithm on the drug purchase data stored in the database and output an item set;
[0077] The confidence screening unit is used to calculate the support, confidence and lift of each item set and screen all item sets;
[0078] The weakly connected unit is used to calculate the level parameters of each item set in combination with the stability of the item set.
[0079] The production impact module is used to obtain the production data of the factory's drugs, and according to the average time from the factory's production to sales, after shifting an average time, obtain the production data corresponding to the drug sales data in the current cycle, and calculate the impact coefficient of the drug production volume and the corresponding item set level parameter according to the production data;
[0080] The production impact module includes: a production displacement unit and a market impact unit;
[0081] The production displacement unit is used to obtain drug production data corresponding to the current sales data collection cycle from the factory;
[0082] The market impact unit is used to calculate the impact coefficient between the drug production volume and the corresponding item set level parameter.
[0083] The conversion evaluation module is used to evaluate the importance of each drug in the item set according to the influence coefficient of each drug production on the item set, and calculate the production conversion ratio between factory production and drug sales according to the importance of the drug in all item sets and in combination with factory production data;
[0084] The conversion evaluation module includes: a drug feature unit and a benefit conversion unit;
[0085] The drug characteristic unit is used to calculate the characteristic coefficient of each drug in each item set containing the drug according to the level parameter of the item set and the influence coefficient of the drug production volume;
[0086] The benefit conversion unit is used to calculate the production conversion ratio between factory production and drug sales.
[0087] The production adjustment module is used to generate a scatter point sequence of production conversion ratios that change with the cycle based on the production conversion ratios in multiple historical cycles, use the ARIMA model to predict the next item of the scatter point sequence, obtain the predicted value of the production conversion ratio for the next cycle, and calculate the stability of the scatter point sequence. According to the predicted value and stability of the production conversion ratio, the factory's production of drugs is adjusted.
[0088] The production adjustment module includes: a scatter plotting unit, a stable prediction unit and a value suggestion unit;
[0089] The scatter plotting unit is used to generate a scatter sequence corresponding to the drug according to the historical production conversion ratio of the drug;
[0090] The stable prediction unit is used to calculate the stability of the scattered point sequence and predict the next item of the scattered point sequence;
[0091] The value suggestion unit is used to adjust the drug production volume in the next cycle of the factory according to the predicted value of the next item of the scattered point sequence and the stability of the scattered point sequence.
[0092] like Figure 2 As shown, a pharmaceutical market data analysis method based on big data includes the following steps:
[0093] Step S1. Determine a sampling period according to the average time from drug production to shelf-loading, obtain drug purchase data of customers within the sampling period, and store the drug purchase data as item sets in a database in chronological order to form a drug data set;
[0094] Step S1 includes:
[0095] Step S11. According to the logistics records of the drugs, the time from the completion of the production of each drug to the sale of the drug is counted, and the average time from the production of all drugs to the sale of the drug is used as the sampling period;
[0096] Step S12. When a customer purchases medicines, the customer's medicine purchase data is recorded, and the medicine purchase data includes: the time of purchase, the type of medicine purchased, and the quantity of medicine purchased;
[0097] Step S13. Send the drug purchase data of all customers within a sampling period to the database, add index numbers to the drug purchase data in chronological order, and generate an item set based on each drug purchase data. The item set is a sequence, and the elements in the sequence are the types of drugs purchased by the customers. The positions of the elements are arranged in descending order according to the quantity of drugs purchased. All item sets are combined to generate a drug data set.
[0098] Step S2. The drug data set is processed using the Apriori algorithm to generate an item set containing the customer's single drug purchase data, and the support of each item set is calculated according to the proportion of the item set appearing in the drug data set, and the item set with a support higher than a threshold is screened out as a class of item sets, and the influence confidence between each two drugs is calculated according to the arrangement of the elements in the class of item sets;
[0099] Step S2 includes:
[0100] Step S21. Use the Apriori algorithm to process the drug data set and filter out the infrequent item sets therein;
[0101] Step S22. Calculate the support A of each item set, where A = m1 / M, where m1 represents the number of times the item set appears in the database, and M represents the total number of times all item sets appear in the database. Filter out all item sets whose support is lower than a preset threshold, and the item sets finally obtained constitute a class of item set set {W1, W2, ..., Wn}, where n represents the number of item sets, and Wn represents the item set with index number n;
[0102] Step S23. Arrange and combine the drugs in pairs. If two drugs in the combination have appeared in the same item set, execute the influence confidence calculation method to obtain the influence confidence between the two drugs. The influence confidence calculation method is as follows:
[0103]
[0104] Among them, C (r,h) represents the confidence level of the impact between drug r and drug h, E (r,h) represents the number of all item sets containing drug r and drug h, Er represents the number of item sets containing drug r, Eh represents the number of item sets containing drug h, G i represents the distance between drug r and drug h in the i-th item set containing drug r and drug h, Ur i represents the purchase quantity of drug r in the i-th item set containing drug r and drug h, Uh i represents the purchase quantity of drug h in the i-th item set containing drug r and drug h;
[0105] If the two drugs in the combination have never appeared in the same item set, the impact confidence is set to 0.
[0106] Step S3. Obtain the drug production volume of the factory in the previous cycle, calculate the correlation coefficient between the production ratio of the two drugs and the impact confidence, sum the correlation coefficients and multiply them by the impact confidence to obtain the weight of the drug;
[0107] Step S3 includes:
[0108] Step S31. Obtain the production quantity of each drug in the factory in the previous cycle, and execute steps S32-S34 for each drug to calculate the weight of the drug;
[0109] Step S32. Obtain the confidence of the impact of drug r and other drugs to form a sequence L1: [C (r,1) ,C (r,2) ,…,C (r,n)] , where C (r,n) represents the impact confidence between drug r and drug n, and generates a sequence L2 according to the production quantity of the drug: [D1, D2, ..., Dn], where Dn = Ur / Un, where Ur represents the total purchase quantity of drug r, and Un represents the total purchase quantity of drug n;
[0110] Step S33. Calculate the correlation coefficient between sequence L1 and sequence L2 according to the following formula:
[0111]
[0112] Among them, a represents the correlation coefficient between sequence L1 and sequence L2, C1 j Represents the jth element in sequence C1, C1 v represents the average value of all elements in sequence C1, C2 j Represents the jth element in sequence C2, C2 v Represents the average value of all elements in sequence C2;
[0113] Step S34: Multiply the sum of all elements in the sequence L1 by the correlation coefficient to obtain the weight K of the drug.
[0114] Step S4. Calculate the ratio of the weight to the purchase quantity based on the sum of the drug weights and the sum of the purchase quantities of each drug in the item set, multiply it by the weight of each drug, and obtain the demand quantity of the drug. Calculate the production conversion ratio of the drug based on the demand quantity and actual production volume of the drug.
[0115] Step S4 includes:
[0116] Step S41. The sum obtained by adding the weights of all drugs is recorded as KP, the sum obtained by adding the purchase quantities of all drugs is recorded as UP, and the weight ratio P is calculated, where P=UP / KP;
[0117] Step S42. Execute the production conversion ratio calculation method for each drug, the production conversion ratio calculation method is as follows:
[0118] The demand quantity X of the drug is calculated, where X=P·K, where K represents the weight of the drug. According to the production quantity of the drug, the production conversion ratio Y of the drug is calculated, where Y=X / D, where D represents the production quantity of the drug.
[0119] Step S5. Based on the production conversion ratio in the historical period, generate a scatter sequence of production conversion ratio changes with the period, use the ARIMA model to predict the next item of the scatter sequence, obtain the predicted value of the production conversion ratio for the next period, and adjust the factory's production quantity of drugs according to the revised predicted value.
[0120] Step S5 includes:
[0121] Step S51. Obtain the production conversion ratio of each drug in the historical g cycles, and perform correction S52-S53 for each drug to adjust the production volume of the drug;
[0122] Step S52. Generate a scattered point sequence L3 using the period as the number: [Y g ,Y g-1 ,…,Y 0 ], where Y0 represents the production conversion ratio of drugs in the current cycle, and Yg represents the production conversion ratio of drugs in the gth cycle before the current cycle. The ARIMA model is used to predict the next item of the scattered point sequence to obtain the predicted value YF;
[0123] Step S53. According to the predicted value YF, the factory's production of drugs in the current cycle is adjusted so that the adjusted production volume DF satisfies DF=YF·DS, where DS represents the production volume of drugs in the previous cycle.
[0124] Example: A factory produces three kinds of drugs, with a shelf life of 7 days, and the output is 2000 boxes, 1500 boxes and 1000 boxes respectively. Within 7 days, a total of 10 users purchase these three drugs. The time, type and quantity of the drugs purchased by the users are recorded and stored in the database as 10 item sets. According to all the item sets, the influence confidence of drug 1 and drug 2 is calculated to be 0.17, the influence confidence of drug 1 and drug 3 is 0.01, and the influence confidence of drug 2 and drug 3 is 0.12;
[0125] The purchase quantities of drugs 1, 2, and 3 in the database are 400 boxes, 100 boxes, and 700 boxes, respectively. The weights of the three drugs are calculated to be 1.2, 0.60, and 1.8, respectively. The production conversion ratios of the three drugs are 0.6, 0.4, and 1.8, respectively. The output of the drugs in the next cycle is adjusted to 1,200 boxes, 600 boxes, and 1,800 boxes, respectively.
[0126] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0127] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A pharmaceutical market data analysis method based on big data, characterized in that: The method comprises the following steps: Step S1. Determine a sampling period according to the average time from drug production to shelf-loading, obtain drug purchase data of customers within the sampling period, and store the drug purchase data as item sets in a database in chronological order to form a drug data set; Step S2. The drug data set is processed using the Apriori algorithm to generate an item set containing the customer's single drug purchase data, and the support of each item set is calculated according to the proportion of the item set appearing in the drug data set, and the item set with a support higher than a threshold is screened out as a class of item sets, and the influence confidence between each two drugs is calculated according to the arrangement of the elements in the class of item sets; Step S3. Obtain the drug production volume of the factory in the previous cycle, calculate the correlation coefficient between the production ratio of the two drugs and the impact confidence, sum the correlation coefficients and multiply them by the impact confidence to obtain the weight of the drug; Step S4. Calculate the ratio of the weight to the purchase quantity based on the sum of the drug weights and the sum of the purchase quantities of each drug in the item set, multiply it by the weight of each drug, and obtain the demand quantity of the drug. Calculate the production conversion ratio of the drug based on the demand quantity and actual production volume of the drug. Step S5. Based on the production conversion ratio in the historical period, generate a scatter sequence of production conversion ratio changes with the period, use the ARIMA model to predict the next item of the scatter sequence, obtain the predicted value of the production conversion ratio for the next period, and adjust the factory's production quantity of drugs according to the predicted value.
2. The pharmaceutical market data analysis method based on big data according to claim 1, characterized in that: Step S1 includes: Step S11. According to the logistics records of the drugs, the time from the completion of the production of each drug to the sale of the drug is counted, and the average time from the production of all drugs to the sale of the drug is used as the sampling period; Step S12. When a customer purchases medicines, the customer's medicine purchase data is recorded, and the medicine purchase data includes: the time of purchase, the type of medicine purchased, and the quantity of medicine purchased; Step S13. Send the drug purchase data of all customers within a sampling period to the database, add index numbers to the drug purchase data in chronological order, and generate an item set based on each drug purchase data. The item set is a sequence, and the elements in the sequence are the types of drugs purchased by the customers. The positions of the elements are arranged in descending order according to the quantity of drugs purchased. All item sets are combined to generate a drug data set.
3. The method for analyzing pharmaceutical market data based on big data according to claim 2, characterized in that: Step S2 includes: Step S21. Use the Apriori algorithm to process the drug data set and filter out the infrequent item sets therein; Step S22. Calculate the support A of each item set, where A = m1 / M, where m1 represents the number of times the item set appears in the database, and M represents the total number of times all item sets appear in the database. Filter out all item sets whose support is lower than a preset threshold, and the item sets finally obtained constitute a class of item set set {W1, W2, ..., Wn}, where n represents the number of item sets, and Wn represents the item set with index number n; Step S23. Arrange and combine the drugs in pairs. If two drugs in the combination have appeared in the same item set, execute the influence confidence calculation method to obtain the influence confidence between the two drugs. The influence confidence calculation method is as follows: Among them, C (r,h) represents the confidence level of the impact between drug r and drug h, E (r,h) represents the number of all item sets containing drug r and drug h, Er represents the number of item sets containing drug r, Eh represents the number of item sets containing drug h, G i represents the distance between drug r and drug h in the i-th item set containing drug r and drug h, Ur i represents the purchase quantity of drug r in the i-th item set containing drug r and drug h, Uh i represents the purchase quantity of drug h in the i-th item set containing drug r and drug h; If the two drugs in the combination have never appeared in the same item set, the impact confidence is set to 0.
4. The method for analyzing pharmaceutical market data based on big data according to claim 3, characterized in that: Step S3 includes: Step S31. Obtain the production quantity of each drug in the factory in the previous cycle, and execute steps S32-S34 for each drug to calculate the weight of the drug; Step S32. Obtain the confidence of the impact of drug r and other drugs to form a sequence L1: [C (r,1) ,C (r,2) ,…,C (r,n)] , where C (r,n) represents the impact confidence between drug r and drug n, and generates a sequence L2 according to the production quantity of the drug: [D1, D2, ..., Dn], where Dn = Ur / Un, where Ur represents the total purchase quantity of drug r, and Un represents the total purchase quantity of drug n; Step S33. Calculate the correlation coefficient between sequence L1 and sequence L2 according to the following formula: Among them, a represents the correlation coefficient between sequence L1 and sequence L2, C1 j Represents the jth element in sequence C1, C1 v represents the average value of all elements in sequence C1, C2 j Represents the jth element in sequence C2, C2 v Represents the average value of all elements in sequence C2; Step S34: Multiply the sum of all elements in the sequence L1 by the correlation coefficient to obtain the weight K of the drug.
5. The method for analyzing pharmaceutical market data based on big data according to claim 4, characterized in that: Step S4 includes: Step S41. The sum obtained by adding the weights of all drugs is recorded as KP, the sum obtained by adding the purchase quantities of all drugs is recorded as UP, and the weight ratio P is calculated, where P=UP / KP; Step S42. Execute the production conversion ratio calculation method for each drug, the production conversion ratio calculation method is as follows: Calculate the demand quantity X of the drug, where X=P·K, where K represents the weight of the drug, and calculate the production conversion ratio Y of the drug according to the production quantity of the drug, where Y=X / D, where D represents the production quantity of the drug; Step S5 includes: Step S51. Obtain the production conversion ratio of each drug in the historical g cycles, and perform correction S52-S53 for each drug to adjust the production volume of the drug; Step S52. Generate a scattered point sequence L3 using the period as the number: [Y g ,Y g-1 ,…,Y0], where Y0 represents the production conversion ratio of drugs in the current cycle, and Yg represents the production conversion ratio of drugs in the gth cycle before the current cycle. The ARIMA model is used to predict the next item of the scattered point sequence to obtain the predicted value YF; Step S53. According to the predicted value YF, the factory's production of drugs in the current cycle is adjusted so that the adjusted production volume DF satisfies DF=YF·DS, where DS represents the production volume of drugs in the previous cycle.
6. A pharmaceutical market data analysis system based on big data, characterized in that: The system includes the following modules: a data displacement module, an item set association module, a production impact module, a conversion evaluation module, and a production adjustment module; The data displacement module is used to collect drug purchase data of customers within a preset period, clean the collected drug purchase data, and store the data in a database in the order of collection time to form a displacement database; The item set association module is used to process the database using the Apriori algorithm to generate all frequent item sets, calculate the support of each item set according to the number of times the item set appears in the database, screen out the item sets with support higher than a threshold as a class of item sets, calculate the confidence of all the class of item sets, calculate the lift of the item set according to the confidence, calculate the level parameter of the item set according to the lift and the stability of the item set, and thus establish item set connections with different level parameters; The production impact module is used to obtain the production data of the factory's drugs, and according to the average time from the factory's production to sales, after shifting an average time, obtain the production data corresponding to the drug sales data in the current cycle, and calculate the impact coefficient of the drug production volume and the corresponding item set level parameter according to the production data; The conversion evaluation module is used to evaluate the importance of each drug in the item set according to the influence coefficient of each drug production on the item set, and calculate the production conversion ratio between factory production and drug sales according to the importance of the drug in all item sets and in combination with factory production data; The production adjustment module is used to generate a scatter point sequence of production conversion ratios that change with the cycle based on the production conversion ratios in multiple historical cycles, use the ARIMA model to predict the next item of the scatter point sequence, obtain the predicted value of the production conversion ratio for the next cycle, and calculate the stability of the scatter point sequence. According to the predicted value and stability of the production conversion ratio, the factory's production of drugs is adjusted.
7. The pharmaceutical market data analysis system based on big data according to claim 6, characterized in that: The data displacement module includes: a platform drug purchasing unit and a database unit; The platform drug purchasing unit is used to collect drug purchasing data of customers and send the drug purchasing data to the management platform. The drug purchasing data includes: drug purchasing time, drug purchasing type and drug purchasing quantity; The database unit is used to store the collected drug purchase data in chronological order.
8. The pharmaceutical market data analysis system based on big data according to claim 7, characterized in that: The item set association module includes: an element combination unit, a confidence screening unit and a weak connection unit; The element combination unit is used to execute the Apriori algorithm on the drug purchase data stored in the database and output an item set; The confidence screening unit is used to calculate the support, confidence and lift of each item set and screen all item sets; The weakly connected unit is used to calculate the level parameters of each item set in combination with the stability of the item set.
9. The pharmaceutical market data analysis system based on big data according to claim 8, characterized in that: The production impact module includes: a production displacement unit and a market impact unit; The production displacement unit is used to obtain drug production data corresponding to the current sales data collection cycle from the factory; The market impact unit is used to calculate the impact coefficient between the drug production volume and the corresponding item set level parameter; The conversion evaluation module includes: a drug feature unit and a benefit conversion unit; The drug characteristic unit is used to calculate the characteristic coefficient of each drug in each item set containing the drug according to the level parameter of the item set and the influence coefficient of the drug production volume; The benefit conversion unit is used to calculate the production conversion ratio between factory production and drug sales.
10. The pharmaceutical market data analysis system based on big data according to claim 9, characterized in that: The production adjustment module includes: a scatter plotting unit, a stable prediction unit and a value suggestion unit; The scatter plotting unit is used to generate a scatter sequence corresponding to the drug according to the historical production conversion ratio of the drug; The stable prediction unit is used to calculate the stability of the scattered point sequence and predict the next item of the scattered point sequence; The value suggestion unit is used to adjust the drug production volume in the next cycle of the factory according to the predicted value of the next item of the scattered point sequence and the stability of the scattered point sequence.
