Drug e-commerce sales data processing and displaying method
By carefully classifying and processing the sales data of pharmaceutical e-commerce, calculating the sales share of each single drug and single SKU, and reasonably allocating sales, the distortion and complexity of the sales data processing of existing traditional Chinese medicine e-commerce is solved, and a more accurate and objective display of sales situations is achieved.
Patent Information
- Application Number
- CN202411726725.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-04
AI Technical Summary
When processing drug e-commerce sales data, the existing technology cannot accurately reflect the true performance of each drug in the sales process, resulting in distortion of sales data. It is affected by the sales logic of e-commerce platforms, and the allocation is complex and difficult to solve.
By finely classifying the sales data of drug e-commerce into three types: single drug, single SKU and multi-SKU transactions, and processing them separately, the sales share of each single drug and single SKU is calculated, and the sales of the main drug and supporting drugs are calculated, the proportion coefficient is calculated, and the sales are reasonably allocated.
It realizes a more accurate and objective display of drug sales, avoids the generality and distortion of sales calculations, and ensures the reasonable allocation of sales and the integrity of data.
Smart Images

Figure CN119558937A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of Internet big data, and in particular relates to a method for processing and displaying pharmaceutical e-commerce sales data. Background Art
[0002] With the rapid development of Internet technology, the pharmaceutical e-commerce industry has ushered in unprecedented development opportunities. The continuous expansion of the market size not only reflects consumers' high recognition of convenient ways to buy medicines, but also reflects the strong growth trend of the global pharmaceutical e-commerce market. Against this background, major e-commerce platforms such as JD.com, Taobao, and Douyin have all entered the field of pharmaceutical sales, and by providing a wealth of drug options and convenient ways to buy medicines, they have greatly met the diverse needs of consumers.
[0003] However, behind the prosperity of the pharmaceutical e-commerce market, there are also some problems that need to be solved. Among them, how to scientifically and reasonably process sales data to more objectively and accurately display the sales of pharmaceuticals has become a difficult point that has attracted much attention.
[0004] At present, although mainstream e-commerce platforms cover multiple dimensions such as product name, brand, sales volume, and sales volume when providing product parameters, in the actual sales process, there are often bundled sales and multiple package types. This means that many products are not only sold individually, but are also combined with other products to form a SKU (Stock Keeping Unit) for sale. In addition, the same drug may exist in multiple SKUs, and may play the role of the main selling drug or the supporting selling drug in different SKUs. This complex sales model makes the distribution of sales extremely difficult.
[0005] When processing sales data, the existing technology often adopts a simple accumulation or average distribution method. Although this method is simple and easy, it cannot accurately reflect the actual performance of each drug in the sales process. Because the sales share of each drug in different SKUs may be significantly different, if a simple distribution method is used, it will lead to distortion of sales data. In addition, the distribution problem of sales is also affected by the sales logic of the e-commerce platform. In the statistical logic of the e-commerce platform, no matter how many goods the consumer purchases, it will only be counted as one order number. This means that sales have become the only indicator to measure drug sales. However, due to the existence of bundled sales and multiple package types, the distribution of sales has become more complicated and difficult. In summary, there are many problems in the existing technology when processing drug e-commerce sales data. The core problem is how to reasonably distribute sales to show drug sales more objectively and accurately. The reason why this problem is difficult to solve is, on the one hand, the complexity of the sales model, and on the other hand, the particularity of the sales logic of the e-commerce platform.
[0006] Therefore, how to reasonably distribute sales so as to more reasonably and objectively display the current drug sales situation on the pharmaceutical e-commerce platform has become an urgent problem to be solved. Summary of the invention
[0007] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for processing and displaying pharmaceutical e-commerce sales data, which can reasonably allocate sales volume, thereby more reasonably and objectively displaying the current pharmaceutical sales situation on the pharmaceutical e-commerce platform.
[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions: A method for processing and displaying drug e-commerce sales data, comprising the following steps: The following steps are involved: S1. Obtain e-commerce sales data of drugs, including transaction type, drug information and transaction amount; S2. Classify the e-commerce sales data of drugs into three types of transactions: single drug, single SKU and multi-SKU; among them, single SKU includes multiple single drugs, and the first single drug is the main selling drug, and the other single drugs are supporting sales drugs; multi-SKU includes two or more single SKUs or a combination of single drugs and single SKUs, and the single drug and the main selling drug in each single SKU are the same drug; S3. For each transaction of single drug type, the total sales of each single drug is accumulated according to the drug information and stored in Table A; S4. For each transaction of the single SKU type, the transaction amount of each single SKU of the same type is accumulated to obtain the total transaction amount of each single SKU, and the total transaction amount is stored in Table B. At the same time, the proportion factor of each single drug sold separately as a non-main drug is calculated by combining the main drugs in each single SKU and the total sales of each single drug in Table A, and the factor is stored in Table B. S5. For each single SKU transaction, split it into multiple single drugs; and calculate the sales proportion of each single drug in the single SKU transaction after splitting according to the preset method; then use the sales proportion of each single drug multiplied by the amount of the single SKU transaction to obtain the sales proportion of each single drug in the single SKU, and feedback to S3; if all single SKU transactions are processed, go to S6; S6. For each multi-SKU transaction, split it and determine whether there is a single drug after the split; if there is a single drug, go to S7; if not, go to S8; S7, query the factor coefficient of the split single drug from Table B, and calculate the sales ratio coefficient of each single SKU after the split, combined with the total sales of each single SKU after the split or the total sales of the supporting drugs in each single SKU; then calculate the sales of the split single drug / sales of each single SKU by factor coefficient / sales ratio coefficient×the transaction amount of the multi-SKU, and feed back the sales of the split single drug to S3; then return to S5 to calculate the sales of each single drug in each single SKU after the split; S8. Calculate the sales ratio coefficient of each SKU after splitting according to the total sales of each SKU after splitting or the total sales of the supporting drugs in each SKU, and then multiply it by the transaction amount of the multiple SKUs to obtain the sales of each SKU after splitting; then return to S5 to calculate the sales of each drug in each SKU after splitting; S9. When executing a sales data query, read the corresponding data in Table A and / or Table B as required, and display the sales data of each single drug and / or each single SKU.
[0009] Compared with the prior art, the present invention has the following beneficial effects: 1. Compared with the existing technology, this method first finely classifies the drug e-commerce sales data into three types of transactions: single drug, single SKU and multiple SKU. This classification method is more detailed and can more accurately reflect the actual sales situation. By processing different types of transactions separately, sales can be calculated more accurately, avoiding the problem of general and inaccurate sales calculation in the existing technology.
[0010] 2. This method ensures the rationality of sales distribution. For single-drug transactions, sales are directly accumulated, which is simple and clear. For single-SKU transactions, not only the total transaction amount is calculated, but also the sales of the main-selling drugs and the supporting-selling drugs are combined to calculate the proportion coefficient factor of each single drug sold separately as a non-main-selling drug. This step is often ignored in the prior art, but this method can more reasonably allocate sales to each single drug through this coefficient. For multi-SKU transactions, this method splits and determines whether there is a single drug after the split, and then calculates the sales proportion coefficient separately, and allocates sales accordingly. This process is more complicated but more accurate than the prior art, and can ensure the reasonable distribution of sales.
[0011] 3. About sales feedback and redistribution. After calculating the sales of each single drug in single SKU and multi-SKU transactions, this method will feed back these sales to step S3 for accumulation. This step ensures the integrity and accuracy of sales. Through this feedback mechanism, this method can continuously optimize the distribution of sales, making the final sales data closer to the actual situation.
[0012] 4. This method can display the sales data of each single drug and / or each single SKU as needed. The diversity of this display method meets the needs of different users and improves the availability of data.
[0013] In summary, this method can reasonably distribute sales. Through innovations in refined classification and processing, rationality of sales distribution, sales feedback and redistribution, and diversity of display methods, it can more accurately and objectively display the current drug sales situation on the pharmaceutical e-commerce platform than the existing technology.
[0014] Preferably, S7 includes: S71, query the factor coefficient of the split single drug from Table B, then multiply the transaction amount of the multiple SKUs by the factor coefficient to obtain the sales share of the single drug, and feed it back to S3; then, determine whether the total sales of each single SKU after the split can be queried in Table B, if so, go to S72, if there is a single SKU whose total sales cannot be queried, go to S73; S72, obtain the total sales of each SKU, and calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the amount of the multi-SKU transaction to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU; S73. For each SKU obtained by splitting, query the total sales of its supporting drugs in Table A and sum them up to obtain the total sales of supporting drugs FXS for each SKU; then calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the transaction amount of the multiple SKUs to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU.
[0015] This setting can 1. improve the accuracy of sales distribution. In step S71, by querying the factor coefficient of the split single drug in Table B and multiplying it by the amount of multi-SKU transactions, the sales of the single drug in multi-SKU transactions can be more accurately calculated. This step takes into account the proportion of single drugs sold separately as non-main drugs, making the distribution of sales more reasonable.
[0016] 2. It can ensure the flexibility of processing complex transactions. Step S7 includes branch processing (S72 and S73) for different situations, which can flexibly deal with various complex situations that may exist in multi-SKU transactions. For example, when the total sales of all split single SKUs can be queried in Table B, the processing method of S72 is adopted; when there is a single SKU whose total sales cannot be queried, the processing method of S73 is adopted. This flexibility ensures the accuracy and completeness of sales calculation.
[0017] 3. Ensure the integrity of sales calculation. In step S73, for single SKUs whose total sales cannot be found in Table B, the total sales of each supporting drug sold in Table A is queried and summed to obtain the total sales of supporting drugs sold for each single SKU, FXS. This step ensures that even if the total sales of some single SKUs cannot be directly obtained, their sales can be calculated by other means, thereby ensuring the integrity of sales calculation.
[0018] 4. Optimization and reuse of sales data. The sales of each drug and each SKU calculated in step S7 will be fed back to S3 and subsequent steps for accumulation and redistribution. This optimization and reuse of data not only improves the accuracy of sales calculation, but also provides a more reliable basis for subsequent data analysis and presentation.
[0019] In summary, the accuracy and reliability of pharmaceutical e-commerce sales data processing and display methods have been further improved through innovations in accurately allocating sales, flexibly handling complex transactions, ensuring the integrity of sales calculations, and optimizing and reusing sales data.
[0020] Preferably, in S72, the method for calculating the sales ratio coefficient of each single SKU is: Factor K=(Amount K / (amount1+amount2+...+amountN))×(1-factor); In the formula, Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; Amount K is the total sales of the K-th single SKU.
[0021] With this setup, 1. Through this technical formula, the sales ratio coefficient of each single SKU in a multi-SKU transaction can be accurately calculated. This coefficient reflects the proportion of each single SKU in sales relative to other single SKUs, providing an accurate basis for the subsequent distribution of sales. The (1-factor) part of the formula takes into account the impact of the proportion of a single drug sold separately as a non-main drug on the sales ratio coefficient. This means that when calculating the sales ratio coefficient of a single SKU, not only the sales of the single SKU itself is taken into account, but also the sales of other single drugs, thereby more comprehensively reflecting the actual sales situation.
[0022] 2. By using the sales ratio coefficient calculated by the above formula, the sales in multi-SKU transactions can be more reasonably allocated to each single SKU. This allocation method takes into account both the sales of the single SKU itself and other relevant factors (such as the sales ratio of a single drug), making the sales distribution more in line with the actual sales situation and enhancing the rationality of sales distribution.
[0023] Preferably, in S73, the method for calculating the sales ratio coefficient of each single SKU is: Factor K=(FXS K / (FXS 1+FXS 2+...+FXS N))×(1-factor). ; Where Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; FXS K is the total sales of the K-th single SKU.
[0024] This setting can 1. adapt to sales allocation in special situations. In step S73, for a single SKU whose total sales cannot be directly queried in Table B, the sales of the single SKU are indirectly obtained by calculating the total sales (FXS) of its supporting sales drugs in Table A. This method adapts to the sales allocation needs in specific situations (such as missing or abnormal data) and ensures the continuity and integrity of sales calculation.
[0025] 2. Using the above formula to calculate the sales ratio coefficient of each single SKU can ensure the accuracy of the coefficient. This formula not only takes into account the sales of each single SKU (FXS K), but also normalizes it through the sum (FXS 1+FXS 2+...+FXS N) so that the sum of the coefficients is 1 (ignoring the influence of factor), thereby more accurately reflecting the relative proportion of each single SKU in sales. In addition, the (1-factor) part of the formula once again reflects the consideration of the sales ratio of a single drug. This treatment method makes the calculation of the sales ratio coefficient more comprehensive, not only considering the sales of the single SKU itself, but also considering the impact of the sales of other single drugs (especially single drugs that are not the main selling drugs) on the coefficient.
[0026] Preferably, S8 includes: S81, determine whether the total sales of each SKU after the split can be queried in Table B. If so, go to S82; if there is a single SKU whose total sales cannot be queried, go to S83; S82, obtain the total sales of each SKU, and calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the amount of the multi-SKU transaction to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU; S83. For each SKU obtained by splitting, query the total sales of its supporting drugs in Table A and sum them up to obtain the total sales FXS of supporting drugs for each SKU; then calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the transaction amount of the multiple SKUs to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU.
[0027] This setting can flexibly handle multi-SKU transactions. Step S8 first determines whether the total sales of each single SKU after splitting can be queried in Table B. This step reflects the flexible handling of different situations. When the total sales of all single SKUs can be queried in Table B, the processing method S82 is adopted; when there is a single SKU whose total sales cannot be queried, the processing method S83 is adopted. This flexibility ensures the comprehensiveness and accuracy of multi-SKU transaction processing.
[0028] The sales ratio coefficient can also be accurately calculated. In both S82 and S83, the sales ratio coefficient of each SKU is calculated. This step obtains the total sales of each SKU (or the total sales of supporting drugs FXS obtained by querying Table A in S83) and calculates its proportion to obtain an accurate sales ratio coefficient. This coefficient provides an accurate basis for the subsequent distribution of sales.
[0029] In addition, it supports complex transaction scenarios. The S8 step can handle multi-SKU transactions that include multiple single SKUs and complex sales combinations. Whether it is a single SKU with total sales directly queried in Table B, or a single SKU that needs to obtain sales indirectly by querying Table A, the S8 step can provide an effective processing solution. This enables the S8 step to support a wider range of more complex transaction scenarios.
[0030] Preferably, in S82, the method for calculating the sales ratio coefficient of each single SKU is: Factor K= Amount K / (amount1+amount2+...+amountN); In the formula, Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; Amount K is the total sales of the K-th single SKU.
[0031] With this setting, the formula can accurately calculate the sales proportion of each single SKU in the multi-SKU transaction, that is, the sales ratio coefficient. This coefficient directly reflects the relative size of each single SKU in sales relative to other single SKUs, providing an accurate basis for the subsequent sales distribution. With the sales ratio coefficient, the total sales of multi-SKU transactions can be easily distributed to each single SKU in proportion. This method avoids complex distribution rules, simplifies the sales distribution process, and improves processing efficiency.
[0032] Moreover, this method is applicable to sales combinations that include multiple single SKUs. No matter how many single SKUs are included in the sales combination, this method can be used to calculate the sales ratio coefficient of each single SKU and distribute the sales. This makes this method widely applicable.
[0033] Preferably, in S83, the method for calculating the sales ratio coefficient of each single SKU is: Factor K= FXS K / (FXS 1+FXS 2+...+FXS N); Where Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; FXS K is the total sales of the K-th single SKU.
[0034] With this setting, when the total sales of some split single SKUs cannot be directly queried in Table B, this method obtains the total sales of supporting drugs (FXS) of these single SKUs by querying Table A, and calculates the sales ratio coefficient based on this. This processing method adapts to the situation of missing data and ensures that the sales ratio coefficient can be calculated and the sales can be allocated even when some data is incomplete.
[0035] Preferably, in S3, accumulating the total sales of each single drug according to the drug information includes: accumulating the transaction amounts of each single drug transaction involving the same drug, the same manufacturer, and the same brand to obtain the total sales of the corresponding single drug.
[0036] This setting can ensure that the total sales of the corresponding single drug are calculated accurately by accumulating the transaction amounts of each single drug transaction involving the same drug, the same manufacturer, and the same brand. This accumulation method avoids sales calculation errors caused by data duplication or omission, and improves data accuracy.
[0037] Preferably, in S4, the ratio factor of a single drug sold separately as a non-main drug is calculated according to the following formula: Factor = total_amount / (total_amount+amount); In the formula, total_amount represents the total sales of the single drug in Table A; amount represents the total sales of each SKU of the single drug as the main selling drug.
[0038] With this setting, 1. the proportion of a single drug sold as a non-main drug in the overall sales can be quantitatively calculated through the formula. This proportion coefficient directly reflects the sales importance of the single drug as a non-main drug, providing data support for the subsequent sales strategy formulation.
[0039] 2. This method can clearly distinguish the different roles of single drugs in the sales of main and non-main drugs. By calculating the ratio coefficient, companies can understand which single drugs are more suitable for promotion as main drugs and which are more suitable as auxiliary or collocation non-main drugs, thereby optimizing product portfolio and sales strategy.
[0040] 3. It also supports sales decisions. The ratio coefficient can serve as an important basis for sales decisions. For example, when the ratio coefficient of a single drug as a non-main selling drug is high, the company can consider increasing the promotion of the drug's separate sales, or looking for more opportunities for bundled sales; when the ratio coefficient is low, it may be necessary to re-evaluate the market positioning and sales strategy of the drug.
[0041] Preferably, in S5, the method for calculating the sales proportion of each single drug in the single SKU transaction is: searching the total sales of each single drug after splitting in Table A, and calculating the sales proportion of each single drug according to the following formula; DZB K= (DZE K / (DZE 1+ DZE 2+...+ DZE N)); In the formula, 1≤K≤N, N is the number of single drugs split out; DZB K represents the sales proportion of the Kth single drug; DZE K represents the total sales of the Kth single drug.
[0042] With this setup, the formula can accurately calculate the sales share of each single drug in a single SKU transaction, that is, the sales distribution. This provides companies with intuitive data on the sales performance of each single drug, which helps to gain a deeper understanding of market demand and product popularity. Accurate sales share data helps companies arrange inventory more reasonably. For single drugs with a high sales share, the inventory can be appropriately increased to meet market demand; for single drugs with a low sales share, the inventory can be reduced to avoid backlogs and improve inventory turnover. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which: Figure 1 Flowchart of this method. DETAILED DESCRIPTION
[0044] The following is a further detailed description through specific implementation methods: Example: like Figure 1 As shown, this embodiment discloses a method for processing and displaying drug e-commerce sales data, including the following steps: S1. Obtain e-commerce sales data of drugs, including transaction type, drug information, and transaction amount.
[0045] S2. Classify the e-commerce sales data of drugs into three types of transactions: single drug, single SKU and multiple SKU; among them, single drug means there is only one drug; single SKU includes multiple single drugs, and the first single drug is the main drug for sale, and the other single drugs are supporting drugs for sale; multiple SKU includes two or more single SKUs or a combination of single drugs and single SKUs, and the single drug and the main drug in each single SKU are the same drug; To facilitate understanding of single-drug, single-SKU and multi-SKU transactions, the transaction types are explained using the package content of an e-commerce platform.
[0046] The package content on the platform is: Standard package: Standard package: 1 box of toothache medicine [gum pain] 1 box of this product + 1 box of toothache and anti-inflammatory granules [toothache, periodontitis and bad breath] 1 box of this product + 1 box of Koutai compound chlorhexidine mouthwash [toothache caused by internal heat] 1 box of this product + 1 box of Tongrentang Niuhuang Jiedu Tablets (8S*10 bottles); After data extraction, the package format is: Extraction: Standard package: Standard package: 1 box of toothache medicine / / 1 box of this product + 1 box of toothache and anti-inflammatory granules / / 1 box of this product + 1 box of Koutai compound chlorhexidine gargle / / 1 box of this product + 1 box of Tongrentang Niuhuang Jiedu tablets (8S*10 bottles).
[0047] In the above package, "Standard Package: 1 box of toothache syrup" refers to a single drug, and a single drug transaction refers to a transaction in which only the single drug is purchased.
[0048] "1 box of this product + 1 box of Toothache and Anti-inflammatory Granules", "1 box of this product + 1 box of Koutai Compound Chlorhexidine Gargle" etc. are single SKUs. A transaction in which only one single SKU is purchased is a single SKU transaction.
[0049] If you purchase a combination of a single drug and a single SKU at the same time, or if you purchase two or more different single SKUs at the same time, it is a multi-SKU transaction.
[0050] In each SKU, there will be a drug that is promoted as the main selling drug; other single drugs in the SKU are sold as supporting drugs, which are sold in conjunction with the main selling requirements to form a drug combination SKU (Stock Keeping Unit, minimum inventory unit).
[0051] S3. For each transaction of single drug type, the total sales of each single drug is accumulated according to the drug information and stored in Table A.
[0052] In specific implementation, the total sales amount of each single drug according to the drug information includes: accumulating the transaction amount of each single drug transaction containing the same drug, the same manufacturer, and the same brand to obtain the total sales amount of the corresponding single drug. In this way, by accumulating the transaction amount of each single drug transaction containing the same drug, the same manufacturer, and the same brand, it can be ensured that the total sales amount of the corresponding single drug is calculated accurately. This accumulation method avoids sales calculation errors caused by data duplication or omission, and improves the accuracy of the data.
[0053] S4. For each transaction of single SKU type, add up the transaction amounts of the same single SKU to obtain the total transaction amount of each single SKU, and store it in Table B. At the same time, combine the main selling drugs in each single SKU and the total sales of each single drug in Table A to calculate the proportion factor of each single drug sold separately as a non-main selling drug, and store it in Table B.
[0054] In specific implementation, the ratio factor of a single drug sold separately as a non-main drug is calculated according to the following formula: Factor = total_amount / (total_amount+amount); In the formula, total_amount represents the total sales of the single drug in Table A; amount represents the total sales of each SKU of the single drug as the main selling drug.
[0055] In this way, the formula can quantitatively calculate the proportion of a single drug sold separately as a non-main drug in the overall sales. This ratio coefficient directly reflects the sales importance of the single drug as a non-main drug, providing data support for the subsequent sales strategy formulation. In addition, this method can clearly distinguish the different roles of single drugs in the sales of main drugs and non-main drugs. By calculating the ratio coefficient, companies can understand which single drugs are more suitable for promotion as main drugs and which are more suitable as auxiliary or matching non-main drugs, thereby optimizing product portfolios and sales strategies. In addition, it also supports sales decisions. The ratio coefficient can serve as an important basis for sales decisions. For example, when the ratio coefficient of a single drug as a non-main drug is high, the company can consider increasing the promotion of the drug's separate sales, or looking for more matching sales opportunities; when the ratio coefficient is low, it may be necessary to re-evaluate the market positioning and sales strategy of the drug.
[0056] S5: For each single SKU transaction, split it into multiple single drugs; and calculate the sales proportion of each single drug in the single SKU transaction according to the preset method; then use the sales proportion of each single drug × the amount of the single SKU transaction to obtain the sales proportion of each single drug in the single SKU, and feedback to S3. If all single SKU transactions are processed, go to S6.
[0057] In specific implementation, the method for calculating the sales share of each single drug in the single SKU transaction is: find the total sales of each single drug after splitting in Table A, and calculate the sales share of each single drug according to the following formula; DZB K= (DZE K / (DZE 1+ DZE 2+...+ DZE N)); where 1≤K≤N, N is the number of single drugs split out; DZB K represents the sales share of the Kth single drug; DZE K represents the total sales of the Kth single drug.
[0058] With this setup, the formula can accurately calculate the sales share of each single drug in a single SKU transaction, that is, the sales distribution. This provides companies with intuitive data on the sales performance of each single drug, which helps to gain a deeper understanding of market demand and product popularity. Accurate sales share data helps companies arrange inventory more reasonably. For single drugs with a high sales share, the inventory can be appropriately increased to meet market demand; for single drugs with a low sales share, the inventory can be reduced to avoid backlogs and improve inventory turnover.
[0059] S6. For each multi-SKU transaction, split it and determine whether there is a single drug after the split; if there is a single drug, go to S7; if not, go to S8; S7. Query the factor coefficient of the split single drug from Table B, and calculate the sales ratio coefficient of each single SKU after the split, combined with the total sales of each single SKU after the split or the total sales of the supporting drugs in each single SKU; then obtain the sales of the single drug after the split / sales of each single SKU by factor coefficient / sales ratio coefficient×the transaction amount of the multiple SKUs, and feed back the sales of the single drug after the split to S3; then return to S5 to calculate the sales of each single drug in each single SKU after the split.
[0060] In specific implementation, S7 includes: S71, query the factor coefficient of the split single drug from Table B, then multiply the transaction amount of the multiple SKUs by the factor coefficient to obtain the sales share of the single drug, and feed it back to S3; then, determine whether the total sales of each single SKU after the split can be queried in Table B, if so, go to S72, if there is a single SKU whose total sales cannot be queried, go to S73; S72, obtain the total sales of each SKU, and calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the amount of the multi-SKU transaction to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU; In specific implementation, the method for calculating the sales ratio coefficient of each SKU is: Factor K=(Amount K / (amount1+amount2+...+amountN))×(1-factor); In the formula, Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; Amount K is the total sales of the K-th single SKU.
[0061] Through this technical formula, the sales ratio coefficient of each single SKU in a multi-SKU transaction can be accurately calculated. This coefficient reflects the proportion of each single SKU in sales relative to other single SKUs, providing an accurate basis for the subsequent sales distribution. The (1-factor) part of the formula takes into account the impact of the proportion of a single drug sold separately as a non-main drug on the sales ratio coefficient. This means that when calculating the sales ratio coefficient of a single SKU, not only the sales of the single SKU itself is taken into account, but also the sales of other single drugs, thereby more comprehensively reflecting the actual sales situation. In addition, by using the sales ratio coefficient calculated by the above formula, the sales in a multi-SKU transaction can be more reasonably allocated to each single SKU. This allocation method takes into account both the sales of the single SKU itself and other relevant factors (such as the sales ratio of a single drug), making the sales distribution more in line with the actual sales situation and enhancing the rationality of the sales distribution.
[0062] S73. For each SKU obtained by splitting, query the total sales of its supporting drugs in Table A and sum them up to obtain the total sales of supporting drugs FXS for each SKU; then calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the transaction amount of the multiple SKUs to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU.
[0063] In specific implementation, the method for calculating the sales ratio coefficient of each SKU is: Factor K=(FXS K / (FXS 1+FXS 2+...+FXS N))×(1-factor). ; Where Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; FXS K is the total sales of the K-th single SKU.
[0064] In step S73, for the single SKU whose total sales cannot be directly queried in Table B, the sales of the single SKU are indirectly obtained by calculating the total sales (FXS) of its supporting sales drugs in Table A. This method adapts to the sales distribution requirements in specific situations (such as missing data or abnormal data) and ensures the continuity and integrity of sales calculation. In addition, the sales ratio coefficient of each single SKU is calculated using the above formula to ensure the accuracy of the coefficient. This formula not only takes into account the sales of each single SKU (FXS K), but also normalizes it through the sum (FXS 1+FXS 2+...+FXS N) so that the sum of the coefficients is 1 (ignoring the influence of factor), thereby more accurately reflecting the relative proportion of each single SKU in sales. In addition, the (1-factor) part in the formula once again reflects the consideration of the sales ratio of single drugs. This processing method makes the calculation of the sales ratio coefficient more comprehensive, not only taking into account the sales of the single SKU itself, but also taking into account the influence of the sales of other single drugs (especially single drugs that are not the main selling drugs) on the coefficient.
[0065] Such a setting can improve the accuracy of sales distribution. In step S71, by querying the factor coefficient of the split single drug in table B and multiplying it by the amount of multi-SKU transactions, the sales of the single drug in multi-SKU transactions can be calculated more accurately. This step takes into account the proportion of single drugs sold separately as non-main drugs, making the distribution of sales more reasonable. It can also ensure the flexibility of handling complex transactions. Step S7 includes branch processing (S72 and S73) for different situations, which can flexibly deal with various complex situations that may exist in multi-SKU transactions. For example, when the total sales of all split single SKUs can be queried in table B, the processing method of S72 is adopted; when there is a single SKU whose total sales cannot be queried, the processing method of S73 is adopted. This flexibility ensures the accuracy and completeness of sales calculation.
[0066] In addition, the integrity of sales calculation can be guaranteed. In step S73, for single SKUs whose total sales cannot be queried in table B, the total sales of each supporting sales drug in table A is queried and summed to obtain the total sales of supporting sales drugs FXS for each single SKU. This step ensures that even if the total sales of some single SKUs cannot be directly obtained, their sales can be calculated by other means, thereby ensuring the integrity of sales calculation. In addition, optimization and reuse of sales data. The sales of each single drug and each single SKU calculated in step S7 will be fed back to S3 and subsequent steps for accumulation and redistribution. This optimization and reuse of data not only improves the accuracy of sales calculation, but also provides a more reliable basis for subsequent data analysis and display. Through innovations in accurate allocation of sales, flexible handling of complex transactions, ensuring the integrity of sales calculation, and optimizing and reusing sales data, the accuracy and reliability of the drug e-commerce sales data processing and display methods have been further improved.
[0067] S8. Calculate the sales ratio coefficient of each SKU after splitting based on the total sales of each SKU after splitting or the total sales of the supporting drugs in each SKU, and then multiply it by the transaction amount of the multiple SKUs to obtain the sales of each SKU after splitting; then return to S5 to calculate the sales of each drug in each SKU after splitting.
[0068] In specific implementation, S8 includes: S81, determine whether the total sales of each SKU after the split can be queried in Table B. If so, go to S82; if there is a single SKU whose total sales cannot be queried, go to S83; S82, obtain the total sales of each SKU, and calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the amount of the multi-SKU transaction to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU; Among them, the method for calculating the sales ratio coefficient of each SKU is: Factor K= Amount K / (amount1+amount2+...+amountN); In the formula, Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; Amount K is the total sales of the K-th single SKU.
[0069] The formula can be used to accurately calculate the sales proportion of each single SKU in a multi-SKU transaction, that is, the sales ratio coefficient. This coefficient directly reflects the relative size of each single SKU in sales relative to other single SKUs, and provides an accurate basis for the subsequent sales distribution. With the sales ratio coefficient, the total sales of multi-SKU transactions can be easily allocated to each single SKU in proportion. This method avoids complex allocation rules, simplifies the sales allocation process, and improves processing efficiency. In addition, this method is applicable to sales combinations containing multiple single SKUs. Regardless of how many single SKUs are included in the sales combination, this method can be used to calculate the sales ratio coefficient of each single SKU and distribute sales. This makes this method widely applicable.
[0070] S83. For each SKU obtained by splitting, query the total sales of its supporting drugs in Table A and sum them up to obtain the total sales FXS of supporting drugs for each SKU; then calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the transaction amount of the multiple SKUs to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU.
[0071] Among them, the method for calculating the sales ratio coefficient of each SKU is: Factor K= FXS K / (FXS 1+FXS 2+...+FXS N); Where Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; FXS K is the total sales of the K-th single SKU.
[0072] When the total sales of some split single SKUs cannot be directly queried in Table B, this method obtains the total sales of supporting drugs (FXS) of these single SKUs by querying Table A, and calculates the sales ratio coefficient based on this. This processing method adapts to the situation of missing data and ensures that the sales ratio coefficient can be calculated and the sales can be allocated even when some data is incomplete.
[0073] This setting can flexibly handle multi-SKU transactions. Step S8 first determines whether the total sales of each single SKU after splitting can be queried in Table B. This step reflects the flexible handling of different situations. When the total sales of all single SKUs can be queried in Table B, the processing method S82 is adopted; when there is a single SKU whose total sales cannot be queried, the processing method S83 is adopted. This flexibility ensures the comprehensiveness and accuracy of multi-SKU transaction processing.
[0074] The sales ratio coefficient can also be accurately calculated. In both S82 and S83, the sales ratio coefficient of each SKU is calculated. This step obtains the total sales of each SKU (or the total sales of supporting drugs FXS obtained by querying Table A in S83) and calculates its proportion to obtain an accurate sales ratio coefficient. This coefficient provides an accurate basis for the subsequent distribution of sales.
[0075] In addition, it supports complex transaction scenarios. The S8 step can handle multi-SKU transactions that include multiple single SKUs and complex sales combinations. Whether it is a single SKU with total sales directly queried in Table B, or a single SKU that needs to obtain sales indirectly by querying Table A, the S8 step can provide an effective processing solution. This enables the S8 step to support a wider range of more complex transaction scenarios.
[0076] S9. When executing a sales data query, read the corresponding data in Table A and / or Table B as required, and display the sales data of each single drug and / or each single SKU.
[0077] Compared with the prior art, this method first finely classifies the drug e-commerce sales data into three types of transactions: single drug, single SKU and multi-SKU. This classification method is more detailed and can more accurately reflect the actual sales situation. By processing different types of transactions separately, the sales can be calculated more accurately, avoiding the problem of general and inaccurate sales calculation in the prior art. In addition, this method ensures the rationality of sales distribution. For single drug transactions, the sales are directly accumulated, which is simple and clear. For single SKU transactions, not only the total transaction amount is calculated, but also the sales of the main selling drugs and the supporting selling drugs are combined to calculate the proportion factor of each single drug sold separately as a non-main selling drug. This step is often ignored in the prior art, but this method can more reasonably allocate sales to each single drug through this coefficient. For multi-SKU transactions, this method splits and determines whether there is a single drug after the split, and then calculates the sales proportion coefficient separately, and allocates sales accordingly. This process is more complicated but more accurate than the prior art, which can ensure the reasonable distribution of sales.
[0078] In addition, about sales feedback and redistribution. After calculating the sales of each single drug in single SKU and multi-SKU transactions, this method will feed back these sales to step S3 for accumulation. This step ensures the integrity and accuracy of sales. Through this feedback mechanism, this method can continuously optimize the distribution of sales, so that the final sales data is closer to the actual situation. In addition, this method can display the sales data of each single drug and / or each single SKU as needed. The diversity of this display method meets the needs of different users and improves the availability of data. This method can reasonably distribute sales, and through innovations in refined classification and processing, rationality of sales distribution, sales feedback and redistribution, and diversity of display methods, it can more accurately and objectively display the current sales of drugs on the pharmaceutical e-commerce platform than the existing technology.
[0079] Embodiment 2 In order to help those skilled in the art better understand the technical content of the present method, the present method is further explained through an example.
[0080] Application example: Sales data processing and display of a pharmaceutical e-commerce platform Background Description A pharmaceutical e-commerce platform hopes to better understand the sales of different drugs and their combinations (SKUs) through data analysis in order to optimize inventory management, formulate marketing strategies and display sales data. The platform decided to use the above technical solution to process the sales data of the past year.
[0081] Data preparation Transaction type: including direct purchase, discount for purchases above a certain amount, package purchase, etc.
[0082] Drug information: including drug name, manufacturer, brand, specifications, etc.
[0083] Transaction amount: The total amount of each transaction.
[0084] Data processing flow Data acquisition (S1) All drug sales records for the past year were extracted from the database, including transaction type, drug information, and transaction amount.
[0085] Data classification (S2) Single drug: For example, the user only purchased one box of "Amoxicillin Capsules".
[0086] Single SKU: For example, if a user purchases a package containing "Amoxicillin Capsules + Vitamin C Tablets", "Amoxicillin Capsules" is the main drug sold.
[0087] Multiple SKUs: If a user purchases two or more different combination packages, each package contains "Amoxicillin Capsules", but other supporting drugs are different.
[0088] Cumulative sales of single drugs (S3) For all single drug transactions, sales are accumulated by drug name, manufacturer, and brand. For example, the total sales of "Amoxicillin Capsules" (a certain manufacturer, a certain brand) is 100,000 yuan.
[0089] Single SKU transaction amount accumulation and proportional coefficient calculation (S4) The total transaction amount of each single SKU is accumulated. For example, the total transaction amount of "Amoxicillin Capsules + Vitamin C Tablets" is 50,000 yuan.
[0090] Calculate the ratio coefficient (factor) of "Amoxicillin Capsules" sold separately as a non-main drug. Assuming that the total sales of "Amoxicillin Capsules" as a main drug is 80,000 yuan, and the total sales of separate sales is 100,000 yuan, then factor = 10 / (10 + 8) = 0.56.
[0091] Single SKU transaction splitting and sales calculation (S5) Each single SKU transaction is split into individual drugs, and the sales are allocated in proportion. For example, in the "Amoxicillin Capsules + Vitamin C Tablets" transaction, the sales share of "Amoxicillin Capsules" can be calculated based on its total sales in Table A. Assuming it is 60%, the sales of "Amoxicillin Capsules" in this SKU is 50,000 yuan * 60% = 30,000 yuan, which is fed back to S3 for accumulation.
[0092] Multi-SKU transaction processing (S6-S8) Split multi-SKU transactions and check whether they contain a single drug.
[0093] If a single drug (S7) is included, the sales of each single drug are calculated using the factor coefficient and the split single SKU sales. For example, if a multi-SKU transaction includes "Amoxicillin Capsules + Vitamin C Tablets" and "Amoxicillin Capsules + Cold Medicine", and the factor of "Amoxicillin Capsules" is 0.56, the total sales of "Amoxicillin Capsules" are calculated based on the split single SKU sales and the factor coefficient, and fed back to S3 for accumulation.
[0094] If single drugs (S8) are not included, the sales of each single SKU will be calculated directly based on the sales of the split single SKU.
[0095] Display sales data (S9) Based on the processed data, a sales report is generated to display the sales data of each single drug and single SKU, including sales volume, sales share, etc.
[0096] Specific cases Single drug sales: The total sales of "Amoxicillin Capsules" alone was RMB 100,000.
[0097] Sales of a single SKU: The total transaction amount of "Amoxicillin Capsules + Vitamin C Tablets" was 50,000 yuan. After the split, the sales of "Amoxicillin Capsules" was 30,000 yuan, and the sales of "Vitamin C Tablets" was 20,000 yuan.
[0098] Multi-SKU sales: A multi-SKU transaction including "Amoxicillin Capsules + Vitamin C Tablets" and "Amoxicillin Capsules + Cold Medicine" has a total amount of 120,000 yuan. Based on the factor coefficient and the sales of the single SKU after splitting, the sales of "Amoxicillin Capsules" are calculated to be 67,200 yuan (multi-SKU transaction part), plus the sales of single drugs and single SKUs, the final total sales of "Amoxicillin Capsules" is 207,200 yuan.
[0099] Through the above processing flow, combined with the sales volume of "Amoxicillin Capsules" as a single drug, as well as the sales volume of the main drug SKU and the supporting drug SKU (various sales volumes can be obtained through simple screening statistics, which will not be repeated here), the e-commerce platform can clearly understand the sales of each drug and its combination, and provide strong support for subsequent operational decisions.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. A method for processing and displaying drug e-commerce sales data, characterized in that: The following steps are involved: S1. Obtain e-commerce sales data of drugs, including transaction type, drug information and transaction amount; S2. Classify the e-commerce sales data of drugs into three types of transactions: single drug, single SKU and multi-SKU; among them, single SKU includes multiple single drugs, and the first single drug is the main selling drug, and the other single drugs are supporting sales drugs; multi-SKU includes two or more single SKUs or a combination of single drugs and single SKUs, and the single drug and the main selling drug in each single SKU are the same drug; S3. For each transaction of single drug type, the total sales of each single drug is accumulated according to the drug information and stored in Table A; S4. For each transaction of the single SKU type, the transaction amount of each single SKU of the same type is accumulated to obtain the total transaction amount of each single SKU, and the total transaction amount is stored in Table B. At the same time, the proportion factor of each single drug sold separately as a non-main drug is calculated by combining the main drugs in each single SKU and the total sales of each single drug in Table A, and the factor is stored in Table B. S5. For each single SKU transaction, split it into multiple single drugs; and calculate the sales proportion of each single drug in the single SKU transaction after splitting according to the preset method; then use the sales proportion of each single drug multiplied by the amount of the single SKU transaction to obtain the sales proportion of each single drug in the single SKU, and feedback to S3; if all single SKU transactions are processed, go to S6; S6. For each multi-SKU transaction, split it and determine whether there is a single drug after the split; if there is a single drug, go to S7; if not, go to S8; S7, query the factor coefficient of the split single drug from Table B, and calculate the sales ratio coefficient of each single SKU after the split, combined with the total sales of each single SKU after the split or the total sales of the supporting drugs in each single SKU; then calculate the sales of the split single drug / sales of each single SKU by factor coefficient / sales ratio coefficient×the transaction amount of the multi-SKU, and feed back the sales of the split single drug to S3; then return to S5 to calculate the sales of each single drug in each single SKU after the split; S8. Calculate the sales ratio coefficient of each SKU after splitting according to the total sales of each SKU after splitting or the total sales of the supporting drugs in each SKU, and then multiply it by the transaction amount of the multiple SKUs to obtain the sales of each SKU after splitting; then return to S5 to calculate the sales of each drug in each SKU after splitting; S9. When executing a sales data query, read the corresponding data in Table A and / or Table B as required, and display the sales data of each single drug and / or each single SKU.
2. The method for processing and displaying drug e-commerce sales data according to claim 1, characterized in that: S7 includes: S71, query the factor coefficient of the split single drug from Table B, then multiply the transaction amount of the multiple SKUs by the factor coefficient to obtain the sales share of the single drug, and feed it back to S3; then, determine whether the total sales of each single SKU after the split can be queried in Table B, if so, go to S72, if there is a single SKU whose total sales cannot be queried, go to S73; S72, obtain the total sales of each SKU, and calculate the sales ratio coefficient of each SKU; then, use the sales ratio coefficient of each SKU × the amount of the multi-SKU transaction to obtain the sales of each SKU; then, return to S5 to calculate the sales of each drug in each SKU; S73. For each SKU obtained by splitting, the total sales of each supporting drug is queried in Table A and summed to obtain the total sales of supporting drugs FXS for each SKU; then the sales ratio coefficient of each SKU is calculated; Then, the sales volume of each SKU is obtained by multiplying the sales volume ratio coefficient of each SKU by the transaction amount of the multi-SKU. After that, the sales volume of each SKU is calculated by returning to S5.
3. The method for processing and displaying drug e-commerce sales data according to claim 2, characterized in that: In S72, the method for calculating the sales ratio coefficient of each SKU is: Factor K=(Amount K / (amount1+amount2+...+amountN))×(1-factor); In the formula, Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; Amount K is the total sales of the K-th single SKU.
4. The method for processing and displaying pharmaceutical e-commerce sales data according to claim 3, characterized in that: In S73, the method for calculating the sales ratio coefficient of each SKU is: Factor K=(FXS K / (FXS 1+FXS 2+...+FXS N))×(1-factor); Where Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; FXS K is the total sales of the K-th single SKU.
5. The method for processing and displaying drug e-commerce sales data according to claim 1, characterized in that: S8 includes: S81, determine whether the total sales of each SKU after the split can be queried in Table B. If so, go to S82; if there is a single SKU whose total sales cannot be queried, go to S83; S82, obtaining the total sales of each SKU and calculating the sales ratio coefficient of each SKU; Then, the sales volume of each SKU is obtained by multiplying the sales volume ratio coefficient of each SKU by the transaction amount of the multi-SKU. Then, S5 is returned to calculate the sales volume of each drug in each SKU. S83. For each SKU obtained by splitting, the total sales of its supporting drugs are queried in Table A and summed to obtain the total sales of supporting drugs FXS for each SKU; then the sales ratio coefficient of each SKU is calculated; Then, the sales volume of each SKU is obtained by multiplying the sales volume ratio coefficient of each SKU by the transaction amount of the multi-SKU. After that, the sales volume of each SKU is calculated by returning to S5.
6. The method for processing and displaying drug e-commerce sales data according to claim 5, characterized in that: In S82, the method for calculating the sales ratio coefficient of each SKU is: Factor K= Amount K / (amount1+amount2+...+amountN); In the formula, Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; Amount K is the total sales of the K-th single SKU.
7. The method for processing and displaying drug e-commerce sales data according to claim 6, characterized in that: In S83, the method for calculating the sales ratio coefficient of each SKU is: Factor K= FXS K / (FXS 1+FXS 2+...+FXS N); Where Factor K is the sales ratio coefficient of the K-th single SKU; 1≤K≤N, N is the number of single SKUs obtained by splitting; FXS K is the total sales of the K-th single SKU.
8. The method for processing and displaying pharmaceutical e-commerce sales data according to claim 1, characterized in that: In S3, accumulating the total sales of each single drug according to the drug information includes: accumulating the transaction amounts of each single drug transaction involving the same drug, the same manufacturer, and the same brand to obtain the total sales of the corresponding single drug.
9. The pharmaceutical e-commerce sales data processing and display method according to claim 1, characterized in that: In S4, the ratio factor of a single drug sold separately as a non-main drug is calculated according to the following formula: Factor = total_amount / (total_amount+amount); In the formula, total_amount represents the total sales of the single drug in Table A; amount represents the total sales of each SKU of the single drug as the main selling drug.
10. The method for processing and displaying pharmaceutical e-commerce sales data according to claim 1, characterized in that: In S5, the method for calculating the sales share of each single drug in the single SKU transaction is: find the total sales of each single drug after splitting in Table A, and calculate the sales share of each single drug according to the following formula; DZB K= (DZE K / (DZE 1+ DZE 2+...+ DZE N)); In the formula, 1≤K≤N, N is the number of split single drugs; DZB K represents the sales proportion of the Kth single drug; DZEK represents the total sales of the Kth single drug.