Information management method and system for warehouse management
By obtaining transaction records in real time and dynamically dividing transaction windows, combining heuristic connections and adaptive pruning strategies, the limitations of traditional association rule mining algorithms in dynamic demand scenarios are solved, and accuracy and efficiency improvements in warehouse management are achieved.
Patent Information
- Application Number
- CN202510598254.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional association rule mining algorithms cannot respond to changes in commodity demand in a timely manner in dynamic demand scenarios, resulting in lagging inventory decisions and affecting the accuracy and efficiency of warehouse information management.
By obtaining transaction records in real time, dynamically dividing transaction windows, using heuristic connections and adaptive pruning strategies, combining potential correlation analysis, frequent item sets and association rules are generated, and inventory management is optimized.
It realizes accurate matching of transaction characteristics in a dynamic environment, deeply explores the hidden relationships between commodities, improves the accuracy and efficiency of warehouse information management, and reduces inventory backlog and out of stock.
Smart Images

Figure CN120450593A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and more particularly to an information management method and system for warehouse management. Background Art
[0002] In the field of warehouse information management, as the core link of the logistics supply chain, its management efficiency directly affects the company's operating costs and market competitiveness. Analyzing the relationship between commodity items is the key to optimizing inventory management, adjusting commodity layout, formulating replenishment plans and improving warehousing efficiency.
[0003] The traditional association rule mining algorithm (such as the Apriori algorithm) is a classic algorithm for mining frequent item sets. Its core idea is to generate candidate data sets and their support through connection, and then generate frequent item sets by pruning the candidate data sets. Based on the frequent item sets, association rules between data items are generated, and then the association relationship between data is mined.
[0004] Traditional association rule mining algorithms are usually targeted at stable data environments and usually rely on static strategies during connection and pruning operations. When using this algorithm to analyze the association relationship between products, the algorithm is suitable for a stable market environment.
[0005] However, for warehouse information management scenarios with large demand fluctuations, such as supermarkets, traditional association rule mining algorithms have certain limitations, specifically: In this dynamic environment, this static connection and pruning strategy cannot adapt to situations where demand changes frequently. For example, during promotions, holidays or special events, the demand for certain products may suddenly increase or decrease. In this dynamic environment, traditional association rule mining algorithms cannot obtain accurate frequent item sets in a timely manner and cannot adjust the association rules between product items in a timely manner, resulting in delayed inventory decisions and an inability to quickly respond to changes in demand. This can easily lead to inventory shortages or surpluses, affecting the accuracy of warehouse information management.
[0006] Therefore, there is an urgent need to improve the real-time and dynamic adaptability of traditional association rule mining algorithms so that they can update frequent item sets and association rules in a timely manner based on real-time commodity data for accurate warehouse information management. Summary of the Invention
[0007] In order to solve the problem that in warehouse information management scenarios with large demand fluctuations, traditional association rule mining algorithms have a lag in obtaining frequent item sets, commodity association rules cannot be updated in a timely manner, and the accuracy and efficiency of warehouse information management are affected, the present invention proposes an information management method and system for warehouse management.
[0008] In one aspect, the present invention provides an information management method for warehouse management, comprising: Acquire transaction records in real time, dynamically divide the transaction windows into multiple windows at any given moment, each of which includes multiple transaction records; each transaction record includes multiple commodity items and the transaction type of the transaction record; Heuristic connection is performed based on the frequent 1-item sets of the previous transaction window and the current transaction window: Frequent itemsets and current transaction window Take one element from each item set; if the first two elements If the items are the same, connect the two elements and remove the duplicates, and use them as a candidate for the current trading window. Itemset; if the first two elements The items are different, and whether to connect is determined based on the potential correlation between the two elements; ,frequently Each element of the itemset is A combination of product items; For all candidates in the current trading window Itemset performs adaptive pruning: for any candidate Item set, if the candidate All subsets of the itemset are frequent Item set, keep the candidate Itemset, as a frequent Itemset; if there is a subset that is infrequent Item set, according to the candidate The stability of the itemset determines whether to prune; Based on all frequent The item set generates all product association rules and manages warehouse information based on the product association rules.
[0009] This technical solution can accurately match transaction characteristics of different time periods by acquiring transaction records in real time and performing dynamic window division, making subsequent frequent item set mining and association rule analysis more in line with actual conditions.
[0010] Furthermore, a heuristic connection strategy combines conventional matching with latent association analysis, fully leveraging information from frequent itemsets in both the previous and current transaction windows. By identifying potential associations, it can mine seemingly dissimilar but actually related combinations of items. This expands the scope of association rule mining and avoids missing valuable relationships. This ensures rapid mining of conventional relationships while enhancing the ability to discover complex, latent relationships. Furthermore, adaptive pruning prevents blindly deleting or retaining candidate itemsets, improving the quality and reliability of frequent itemsets. Furthermore, accurate product association rules are generated based on reliable frequent itemsets. These accurate product association rules can optimize inventory management, reduce inventory overstocks and stockouts, and improve the accuracy and efficiency of warehouse information management.
[0011] Furthermore, the potential relevance is determined based on the following formula: ; In the formula, for and The potential relevance of The frequency of the previous trading window Elements of the itemset, Frequent trading in the current trading window Elements of the itemset, for The corresponding product items and The number of duplicate items for the corresponding product item, for and The total number of corresponding product items, and They are and support, is the natural exponential function, for and The joint support of for The number of times it appears in all transaction records in the previous transaction window, for The number of times it appears in all transaction records in the current transaction window, To obtain the maximum value function, is the absolute value symbol.
[0012] This technical solution takes into account data changes in different transaction windows, and comprehensively considers factors in multiple dimensions such as product item duplication, support, joint support, and differences in transaction times. It can accurately identify associations in a dynamic environment, screen out deeper implicit associations, and improve the quality of the generated candidate item set.
[0013] Furthermore, the candidate The stability of an itemset is determined as follows: Calculate each candidate The fluctuation factor of the commodity item combination corresponding to the item set: ; In the formula, Candidate The volatility factor of the commodity item combination corresponding to the item set, is the smoothing factor, Candidate The rate of change of the transaction frequency of the commodity item combination corresponding to the item set in the current transaction window, 、 Candidates The standard deviation and mean of the transaction frequency of the commodity item combination corresponding to the item set in all transaction windows before the current transaction window; The candidate The inverse of the volatility factor of the commodity item combination corresponding to the item set is used as the candidate Stability of itemsets.
[0014] This technical solution analyzes the volatility of each candidate item set's corresponding commodity combination, taking into account short-term fluctuations while maintaining appropriate reliance on historical volatility patterns. By adjusting the smoothing factor, the volatility factor assessment is more closely aligned with actual trading conditions, and the accurate inverse of the volatility factor accurately reflects the stability of the candidate item set.
[0015] Furthermore, the method of dynamically dividing multiple trading windows is as follows: Get all transaction records before the current moment, sort all transaction records by length Divide into multiple trading windows and divide the most recent one into The transaction record of the specified length is used as the initial transaction window at the current moment, and the current transaction window is dynamically calculated: ; In the formula, is the length of the current trading window, is the length of the initial trading window at the current moment, is the entropy value of the transaction type in the initial transaction window at the current moment, is the reference value of entropy, It is the average length of all trading windows before the initial trading window at the current moment.
[0016] This technical solution dynamically adjusts the transaction window length based on the complexity of the transaction type, improving the system's responsiveness to dynamic changes in real-time transactions. By comprehensively considering historical transaction window lengths, it avoids excessive fluctuations in transaction window lengths and makes transaction window division more stable and reasonable. This facilitates more accurate analysis of transaction data across different time periods, providing a more precise data foundation for subsequent frequent itemset mining.
[0017] Furthermore, the method for managing warehouse information according to product association rules is as follows: Calculate the confidence threshold for each product association rule: ; In the formula, Product association rules Adaptive confidence threshold for for Serial number, yes The volatility factor of the corresponding commodity item, for The preset confidence threshold, for The support level of the corresponding commodity item in the current transaction window, for The average sales volume of the corresponding product item in all transaction windows before the current transaction window; Filter out product association rules with a confidence greater than a confidence threshold, and manage corresponding product items based on the filtered product management rules.
[0018] This technical solution uses adaptive confidence thresholds to adjust in real time based on actual sales and fluctuations of product items, ensuring that the selected association rules are more aligned with current transaction needs. When transaction frequency fluctuates significantly, raising the confidence threshold can prevent accidental associations from being misidentified as valid rules. When transaction frequency fluctuates less, lowering the threshold can uncover potentially valuable association rules.
[0019] Furthermore, the method for obtaining the frequent one-item sets of the previous transaction window and the current transaction window is as follows: for any transaction window, all commodity items contained in all transaction records within the transaction window and the support of each commodity item are obtained; and the commodity items with support greater than a preset support threshold are regarded as the frequent one-item sets of the transaction window.
[0020] Furthermore, the method of determining whether to connect two elements according to their potential relevance is as follows: if the potential relevance of the two elements is greater than a preset potential relevance threshold, the two elements are connected and duplicates are removed to generate a candidate Item set; if the potential correlation between two elements is not greater than the preset potential correlation threshold, skip the connection operation.
[0021] Furthermore, according to the candidate The stability of the item set determines whether to prune: if the stability is greater than the stability threshold, the candidate is retained. Itemset, as a frequent Item set; if the stability is not greater than the preset stability threshold, the candidate Item sets are pruned.
[0022] Furthermore, the support degree of each commodity item is determined based on the following method: the number of times each commodity item appears in all transaction records is counted, and the ratio of the number of times to the total number of transaction records is used as the support degree of the commodity item.
[0023] On the other hand, the present invention provides an information management system for warehouse management, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any one of the information management methods.
[0024] The present invention has the following effects: The present invention overcomes the limitations of traditional association rule mining algorithms in dynamic demand scenarios through operations such as dynamic division of transaction windows, heuristic connection and potential correlation analysis, as well as adaptive pruning and association rule screening. It can respond to transaction changes in real time, accurately match data characteristics of different transaction periods, deeply mine implicit correlations between commodity items, avoid missing key information, ensure the reliability and quality of frequent item sets, obtain more accurate correlation relationships between commodity items, and thus improve the accuracy and effectiveness of warehouse information management. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0027] The present invention provides an information management method for warehouse management, such as Figure 1 As shown in , including: S1: Get transaction records in real time.
[0028] Capturing transaction records from the sales system helps warehouse systems update inventory information in real time. When a product is sold, the sales system immediately generates a transaction record. The warehouse management system needs to adjust inventory based on these transaction records to avoid overstocking or stockouts.
[0029] Therefore, this step uses a real-time data streaming interface (such as Kafka) to capture transaction records. Specifically, in the supermarket scenario, transaction data is obtained from the sales system. Each transaction record should include basic information such as product ID, purchase quantity, and timestamp. The calendar API is used to mark each transaction type as a holiday, regular business day, or promotional day. Next, data cleaning and conversion are performed. All collected transaction records are preprocessed to remove missing values and outliers, and the time format is converted and standardized.
[0030] S2: Dynamically divide the trading window.
[0031] In warehouse information management, traditional association rule mining algorithms are typically based on the concept of fixed windows, employing fixed-size windows to mine frequent itemsets. This approach, when dealing with dynamic, real-time data, ignores the dynamics of market and transaction data. Dynamically partitioning transaction windows, on the other hand, is a more flexible approach that can cope with market fluctuations. It can more accurately reflect data trends, and is particularly efficient and accurate in situations of uncertainty and significant volatility.
[0032] In the process of obtaining transaction records in real time, take any moment as the current moment, obtain all transaction records before the current moment, and start from the current moment forward, and sort all transaction records by length. Divide into multiple trading windows. If the length of the last trading window is insufficient , discard it, and eventually multiple trading windows will be obtained, and the most recent trading window at the current moment will be used as the initial trading window at the current moment. (Experience points).
[0033] Market demand and trading behavior often fluctuate significantly over time. For example, sales may surge during holidays or promotions, while remaining relatively stable on weekdays. Using a fixed trading window cannot accurately reflect these sudden trading fluctuations.
[0034] Therefore, we dynamically divide transaction windows based on the changing characteristics of transaction records to ensure that the current transaction window accurately reflects the current transaction status. For example, during peak sales periods, the current transaction window will be appropriately expanded to capture more data, while during stable periods, the current transaction window will be reduced to reduce interference from irrelevant data.
[0035] In one embodiment, the method for dynamically dividing the current transaction window is:
[0036] In this formula, is the length of the current trading window, is the length of the initial trading window at the current moment, The entropy value of transaction types within the initial transaction window at the current moment is used to measure the diversity and volatility of transaction types within the initial transaction window. A higher entropy value indicates more complex transaction types (such as a mix of promotional days and holidays), and the transaction window needs to be expanded to capture trends. A lower entropy value indicates more stable transaction types (such as long-term normal days), and the transaction window can be shortened. is the reference value of the entropy value, specifically the mean entropy value of the transaction type in all transaction windows before the initial transaction window at the current moment, It is the average length of all trading windows before the initial trading window at the current moment, which reflects the average level of historical trading window lengths.
[0037] In this formula, Part of it is to adjust the transaction window length according to the difference between the entropy value of the transaction type in the initial transaction window at the current moment and the reference entropy value. , indicating that the greater the diversity and volatility of transaction types within the initial transaction window at the current moment, If it is greater than 1, the initial trading window will be If ,at this time, Less than 1, the initial trading window will be Based on the reduction.
[0038] In this formula, Partly by introducing the influence of the average length of the historical trading window, if the average length of the historical trading window is greater than the initial trading window length at the current moment, then If the value is greater than 1, the initial trading window length at the current moment will be increased; otherwise, it will be reduced. This operation helps ensure smooth adjustment of the window length. Without historical trading window information, excessive adjustment of the current trading window length can easily lead to unstable results. Using the average length of historical trading windows can avoid sudden changes in the current trading window size and increase the smoothness and rationality of the adjustment.
[0039] In short, through the multiplication method, we can reasonably combine the current transaction volatility and the changing trend of historical transactions, set a reasonable current transaction window, and dynamically divide the current transaction window so that the transaction records contained in the current transaction window can timely reflect the dynamic characteristics of the current transaction, avoiding the problem that the fixed window method cannot cope with fluctuations and demand changes.
[0040] S3: Get the frequent 1-item sets of the previous transaction window and the current transaction window respectively.
[0041] For the current trading window or the previous trading window of the current trading window, the method for obtaining the frequent 1-item set of any of the two trading windows is the same. Specifically: First, obtain all the product items included in all transaction records within the transaction window and count the number of times each product item appears in all transaction records (within the transaction window). A transaction record typically contains multiple product items. The ratio of the number of times each product item appears in all transaction records to the total number of transaction records is used as the support of the product item. In association rule mining, support is used to measure the frequency of occurrence of a product item or product item combination in a dataset. Specifically, support reflects the degree to which a product or product combination appears in all transaction records. A higher support means that the product or product combination appears more frequently in transactions and is generally considered a more important candidate item set.
[0042] For example, the transaction window includes 100 transaction records, and all commodity items contained in all transaction records are A, B, C, D and E. The number of times these commodity items appear in all transaction records is 85, 75, 60, 40 and 20 respectively. Then the support is 0.85, 0.75, 0.6, 0.4 and 0.2 respectively.
[0043] Then, set the support threshold of the frequent 1-item set in the transaction window, and take the commodity items with support greater than the support threshold as the frequent 1-item set of the transaction window. The support threshold is usually set to 0.3 (empirical value).
[0044] For example, if the support of commodity items A, B, C, and D is greater than the support threshold, and the support of commodity item E is less than the support threshold, then commodity items A, B, C, and D are regarded as the frequent 1-item set of the transaction window, and are recorded as {A}, {B}, {C}, and {D}.
[0045] In one embodiment, the support threshold of the frequent 1-item set in the transaction window can also be calculated according to the following formula:
[0046] In the formula, is the support threshold of the frequent 1-item set in the transaction window, is the preset support threshold (0.3), and is the maximum and minimum support value of all commodity items in the transaction window, is the entropy value of the transaction type of all transaction records within the transaction window, is the reference value of entropy.
[0047] In this formula, The difference between the maximum and minimum support values for all items within the transaction window reflects the dispersion of the item support distribution. A larger difference indicates greater dispersion, meaning some items are frequently sold while others are less frequently sold. This often occurs during periods of high market volatility (such as promotional periods and holidays). In this case, the support threshold should be lowered to capture more frequent itemsets. Conversely, a smaller difference indicates more stable and uniform item sales. In this case, the support threshold should be increased to mitigate the impact of noise data.
[0048] In this formula yes The larger the normalized value, the greater the difference between the maximum and minimum support values. The smaller it is, the lower the support threshold is. Conversely, the smaller the normalized value is, the smaller the difference between the maximum and minimum support values is. The larger it is, the more it amplifies the support threshold.
[0049] In this formula, Part of it is As a benchmark, a relative size indicator is constructed. The larger it is, the more complex the transaction type within the transaction window is. The smaller it is, the lower the threshold will be to adapt to complex scenarios and capture more temporary frequent item sets. The smaller, The larger the value, the higher the support threshold is. In scenarios with relatively stable demand (such as weekdays), it effectively avoids interference from noise and abnormal data.
[0050] In summary, this formula deeply integrates information theory concepts with warehouse management scenarios, allowing the support threshold to respond to demand fluctuations (such as promotions and holidays) in real time. In scenarios with large demand fluctuations (such as promotions and holidays), the support threshold automatically decreases to capture more frequent item sets. In scenarios with relatively stable demand (such as weekdays), the support threshold automatically increases, effectively avoiding the interference of noise and abnormal data and solving the defects of traditional static support thresholds.
[0051] This step yields the frequent 1-item set for the current transaction window and the frequent 1-item set for the previous transaction window. Each element in the frequent 1-item set contains one item. For example, the frequent 1-item set includes {A}, {B}, {C}, and {D}, and the first element {A} contains item A.
[0052] S4: Perform heuristic connections based on frequent 1-item sets to generate candidates for the current transaction window Itemset.
[0053] In scenarios where commodity transactions fluctuate greatly, such as supermarkets, transaction records are constantly updated. The purpose of the join operation is to generate a larger candidate item set based on the existing frequent item set. Specifically, after obtaining the frequent item set, the frequent item set of the current transaction window is added to the candidate item set. Frequent item set and previous transaction window Item sets are connected to generate candidates for the current transaction window Itemset, where ,frequently Each element of the itemset is Combinations of product items, candidate Each element of the itemset is A combination of product items.
[0054] The connection operation usually follows certain rules to ensure that the generated candidate item set has a greater probability of being a frequent item set. The heuristic connection in this step mainly uses transaction information in different time periods to connect more accurately and generate an accurate candidate item set.
[0055] Specifically: Frequent trading in the previous trading window Frequent itemsets and current transaction window Take one element from each item set, if the first two elements If the items are the same, connect the two elements and remove the duplicates, and use them as a candidate for the current trading window. Itemset; if the first two elements If the potential correlation of the two elements is different, the potential correlation of the two elements is analyzed. If the potential correlation of the two elements is greater than the potential correlation threshold, the two elements are connected and deduplicated as a candidate for the current trading window. For item sets, if the potential correlation between two elements is not greater than the preset potential correlation threshold, the connection operation is skipped.
[0056] For example, the frequent 2-item sets in the previous trading window are {AB} and {AC}, and the frequent 2-item sets in the current trading window are {AD} and {BC}. The cases of taking one element from each are: {AB} and {AD}, {AB} and {BC}, {AC} and {AD}, {AC} and {BC}; For {AB} and {AD}, the first item is the same. Concatenate the two elements and remove duplicates to get {ABD} as a candidate for the current trading window. Item set; for {AB} and {BC}, if the first item is different, then calculate the potential correlation between {AB} and {BC}. If the correlation is greater than the correlation threshold, connect the two elements and remove duplicates to obtain {ABC} as a candidate for the current transaction window. Item set, if the correlation is not greater than the correlation threshold, skip the connection; for {AC} and {AD}, the first item is the same, connect the two elements and remove duplicates, and get {ACD} as a candidate for the current transaction window Item set; for {AC} and {BC}, if the first item is different, then calculate the potential correlation between {AC} and {BC}. If the correlation is greater than the correlation threshold, connect the two elements and remove duplicates to obtain {ABC} as a candidate for the current transaction window. If the item set's correlation is not greater than the correlation threshold, the connection is skipped.
[0057] If all candidates The item sets are: {ABD}{ABC}{ACD}{ABC}, then perform a deduplication operation to obtain all candidate items. The itemset is: {ABD}{ABC}{ACD}.
[0058] This heuristic connection method fully utilizes transaction information from different time periods by connecting the frequent k-item sets of the current transaction window with the frequent k-item sets of the previous transaction window. The frequent item sets of the previous transaction window reflect past transaction patterns and customer purchasing preferences. Combining these with the information from the current transaction window can better adapt to transaction fluctuations and capture potential changes in correlations between products. For example, product sales may vary across seasons or during promotional events. Leveraging historical transaction information can help identify product combinations that have persistent or newly emerging correlations across time periods. Furthermore, by calculating the potential correlation for the first k-1 different elements and comparing it with a threshold to determine whether to connect them, the algorithm can more accurately screen for potentially correlated product combinations, avoiding the blind generation of candidate itemsets and improving the accuracy of candidate item set generation.
[0059] In supermarket scenarios, although the sales combinations of certain products may be different when viewed individually in different time periods, potential correlation analysis reveals hidden correlations between them. For example, promotional activities may lead to correlations between originally unrelated products. Heuristic connections can detect such special cases and accurately generate relevant candidate item sets.
[0060] In one embodiment, the potential relevance is determined based on the following formula:
[0061] In the formula, The frequency of the previous trading window An element of an itemset, Frequent trading in the current trading window An element of an itemset, for and The potential relevance of is the natural exponential function, for The corresponding product items and The number of duplicate items for the corresponding product item, for and The total number of corresponding product items, and They are and The support of the corresponding commodity items is used to reflect the probability of the commodity items corresponding to the two elements appearing in their respective transaction windows. for and The joint support of is used to reflect the previous transaction window and the current transaction window. and The probability of corresponding product items appearing at the same time, for The number of times it appears in all transaction records in the previous transaction window, for The number of times it appears in all transaction records in the current transaction window, To obtain the maximum value function, is the absolute value symbol.
[0062] In this formula, reflects and The similarity between the two elements' product items. The higher this ratio, the greater the overlap between E1 and E2's product items, and the stronger their potential correlation. For example, if E1 and E2 contain exactly the same product items, the value is 1, indicating a strong correlation. If there are no duplicate product items, the value is 0, indicating no direct correlation from the perspective of product item composition.
[0063] In this formula, The larger it is, the more likely that E1 and E2 appear together than independently, and the more likely that there is a potential correlation between them, and vice versa.
[0064] In this formula, part, It is used to measure the relative difference between the number of occurrences of E1 and E2. When the number of occurrences of E1 and E2 is close, The smaller, The larger the value is, the closer it is to 1, indicating that E1 and E2 are more similar in frequency and contribute more to the potential correlation. On the contrary, when the number of occurrences of E1 and E2 is significantly different, it means that their frequencies are significantly different, which may weaken the potential correlation between them. The bigger, The smaller it is, the less likely it is to have a potential correlation.
[0065] This formula comprehensively and meticulously calculates the potential correlation by taking into account multiple aspects such as the degree of repetition of product items, the relationship between support and the stability of the number of occurrences, and can accurately reflect the relationship between two frequent The potential connections between the elements of an itemset provide an effective quantitative method for analyzing the correlation in transaction data.
[0066] S5: Candidates for the current trading window The item set performs adaptive pruning to generate the frequent Itemset.
[0067] The purpose of pruning is to select Eliminate itemsets that are unlikely to be frequent itemsets in the itemset to reduce the workload of subsequent support calculations. The pruning operation of the traditional method is based on the property of Apriori, that is, all subsets of frequent itemsets must be frequent. Therefore, if a candidate A subset of the itemset is not frequent Item set, then the candidate Itemsets are unlikely to be frequent itemsets and can be removed. However, in dynamic, real-time environments (such as supermarkets where market demand fluctuates significantly), the uncertainty of product demand means that static pruning may miss some potentially frequent itemsets. To adapt to such complex environments, this step introduces adaptive pruning. This method further refines the pruning process by incorporating stability analysis.
[0068] Specifically, the adaptive pruning operation is: Get all candidates in the current trading window After the item set, for any candidate in the current transaction window Item set, first determine the candidate Are all subsets of the itemset frequent? Item set, if the candidate All subsets of the itemset are frequent Item set, keep the candidate Itemset, as a frequent Item set. If the candidate A subset of the itemsets is infrequent Item set, analyze the candidate The stability of the itemset is that if the candidate If the stability of the item set is greater than or equal to the stability threshold, the candidate is retained. Item set, which is regarded as a frequent Item set. If the candidate The stability of the item set is less than the stability threshold, and the candidate Itemset performs pruning (eliminating the candidate Itemset). The stability threshold is preset to 0.6 (empirical value).
[0069] For example, candidates for the current trading window The item sets are {ABD} and {ACD}, where the subsets of {ABD} include {AB}, {AD} and {BD}. If {AB}, {AD} and {BD} are all frequent 2-item sets, then {ABD} is a frequent item set in the current transaction window. Itemset. Among them, the subsets of {ACD} include {AC}, {AD} and {CD}. If {CD} is a non-frequent 2-itemset, it is necessary to further analyze the stability of {ACD}. If its stability is greater than the threshold, {ACD} is then used as a frequent item in the current transaction window. Item set, otherwise, perform pruning operation on {ACD}.
[0070] This adaptive pruning method can adapt to market demand fluctuations. If a candidate itemset is an infrequent itemset in certain transaction windows but is highly stable (i.e., maintains a certain frequency of occurrence across transactions in different time periods), it can still be retained as a frequent itemset, avoiding the loss of potentially related items caused by traditional static pruning strategies.
[0071] In one embodiment, if the candidate A subset of the itemsets is infrequent Item set, then the candidate The stability of an itemset is determined as follows: Calculate the candidates first The fluctuation factor of the commodity item combination corresponding to the item set:
[0072] In this formula, Candidate The volatility factor of the commodity item combination corresponding to the item set, is the smoothing factor. Candidate The rate of change of the transaction frequency of the commodity item combination corresponding to the item set in the current transaction window Candidate The standard deviation of the transaction frequency of the commodity item combination corresponding to the item set in all transaction windows before the current transaction window is used to measure the volatility of historical transaction frequency. Candidate The average transaction frequency of the commodity item combination corresponding to the item set in all transaction windows before the current transaction window.
[0073] In this formula, , Is a candidate The transaction frequency of the commodity item combination corresponding to the item set in the current transaction window (the number of times the commodity item combination appears in all transaction records in the current transaction window), Is a candidate The transaction frequency of the commodity item combination corresponding to the item set in the window before the current transaction window (the number of times the commodity item combination appears in all transaction records of the transaction window before the current transaction window), It is an absolute value symbol. By calculating the transaction frequency change rate, we can effectively capture short-term transaction frequency fluctuations. It is suitable for identifying some sudden and short-term demand changes.
[0074] In this formula, It indicates the size of historical fluctuations relative to the long-term average fluctuations, and quantifies the degree of dispersion of commodity demand. The larger the value of this part, the greater the fluctuation in the transaction frequency of this commodity combination relative to the long-term average.
[0075] In this formula, , The size of the candidate is used to balance The fluctuation degree of the commodity item combination corresponding to the item set in the current transaction window and the fluctuation degree in the historical transaction window. The bigger, Plays a dominant role, and the degree of volatility is mainly determined by the current trading window. The smaller the volatility, the more volatility is determined by the historical trading window. The smoothing factor allows the volatility factor to respond to changes in current trading frequency while balancing historical volatility. When historical volatility is high, the smoothing factor reduces its dependence on current volatility and reduces the impact of noise.
[0076] Then, since each candidate The item set corresponds to a product item combination, and each product item combination corresponds to a volatility factor. Item sets correspond to a volatility factor. For example, the candidate The commodity item combination corresponding to the item set {ACD} is ACD, and a fluctuation factor is calculated.
[0077] Finally, each candidate The inverse of the volatility factor corresponding to the item set is used as the candidate The stability of the itemset is calculated, and all the calculated stabilities are normalized to their maximum and minimum values so that the stability is between 0 and 1, which is convenient for comparison and analysis.
[0078] In short, through the adaptive pruning operation in this step, all the frequent Itemset, each frequent Each item set corresponds to a A combination of product items.
[0079] S6: Based on frequency Item sets generate product association rules, and warehouse information management is performed based on the product association rules.
[0080] For all frequent transactions in the current trading window Itemset, which contains multiple elements, each frequent Item sets are For example, there are commodity items A, B, C and D. The frequent three-item set in the current transaction window is {ABC} and {ABD}. , {ABC} is a combination of 3 commodity items A, B and C, and {ABD} is a combination of 3 commodity items A, B and D.
[0081] Will frequently Each element of the item set is split into two subsets to generate all the corresponding product association rules. A product association rule X→Y is a conditional rule. The left side is called the antecedent (also called the premise), and the right side is called the consequent (also called the conclusion). A product association rule X→Y states that if certain conditions (confidence level) are met, if X occurs in a transaction, then Y is very likely to also occur. For example, when X={AB} and Y={C}, AB→C means that if a customer purchases product A and product B, then they are very likely to also purchase product C.
[0082] For example, for {ABC}, it is split into two subsets X and Y. All the split results are: X={AB} and Y={C}; X={AC} and Y={B}; X={BC} and Y={A}. According to the split results, all the product association rules X→Y are obtained, that is, there are a total of 3 X→Y: AB→C, AC→B, and BC→A.
[0083] After all product association rules are generated, confidence evaluation is required. Confidence is a standard evaluation indicator in association rule mining. The higher the confidence level of a product association rule, the more accurately it can reflect the association relationship between product items.
[0084] Therefore, first evaluate the confidence of each product association rule:
[0085] In this formula, Product association rules The confidence level of When it exists, the consequent The probability of occurrence, for and The joint support of for support.
[0086] when and hour: ; ; In this formula, for and The joint support of for support, for The number of times it appears in the same transaction record in the current transaction window at the same time, for The number of times it appears in the same transaction record. The total number of transaction records in the current trading window.
[0087] at this time, It measures the probability that C also appears in a transaction record containing both A and B. For example, a confidence level of 0.8 means that 80% of all transaction records containing both A and B also contain C. The larger it is, the more credible the association rule: AB→C is, and the stronger the correlation between A, B and C is.
[0088] This step takes into account the impact of market volatility on the confidence of commodity association rules: When demand fluctuates slightly (low volatility) and is relatively stable, the transaction frequency of a product changes little. In this case, the market's forecast of product demand is relatively accurate and can rely on past transaction records and rules. In this case, the confidence threshold for product association rules does not need to be too high, as even a low confidence threshold can be considered a valid product association rule. Conversely, when demand fluctuates significantly (high volatility), when market demand experiences significant fluctuations, the transaction frequency of a product may fluctuate dramatically. In this case, the product association rules may be subject to more noisy data (for example, sudden promotions or seasonal changes). To prevent inaccurate product association rules from being filtered out, the confidence threshold should be increased to ensure that only strong associations are considered valid.
[0089] In one embodiment, the confidence threshold of each product association rule is calculated based on the following formula: ; In the formula, Product association rules Adaptive confidence threshold for for and The serial number, 1 means , 2 means , for example, when X={AB}, Y={C}, =1, The corresponding product item is {AB}, =2, The corresponding product item is {C}. for The preset confidence threshold is 0.6 (empirical value), for The support level of the corresponding commodity item in the current transaction window, for The average support of the corresponding commodity item in all transaction windows before the current transaction window, yes The fluctuation factor of the corresponding commodity item (calculated in the same way as in step S5 for each candidate The fluctuation factors of the commodity item combinations corresponding to the item set are consistent), reflecting the fluctuation of the transaction frequency of the commodity items.
[0090] In this formula, reflects The importance of the corresponding product item. When the support of the product item is higher than the historical average, appropriately increasing the confidence threshold can avoid misjudging some association rules that may be caused by accidental factors as valid rules. When the support of the product item is lower than the historical average, appropriately lowering the threshold can capture some potential and relatively stable association rules.
[0091] In this formula, Part is used to dynamically adjust the confidence threshold of commodity association rules according to the fluctuation factor. When it is larger, it means that the market fluctuation is larger and the reliability of the correlation between commodities is reduced. It will be very small. The bigger it will be, the Improve the confidence threshold of product association rules to ensure that more accurate product association rules are obtained. When it is smaller, it means the market volatility is smaller. Will be larger, The smaller it is, the more reliable the association relationship between the products is. Therefore, the confidence threshold can be appropriately reduced to include more association rules.
[0092] In this formula, In some cases, when the support of a product item is relatively high compared to the historical average and the historical transaction fluctuations are large, by raising the threshold (increasing the confidence requirement), we can ensure that the association rules are retained only when the demand is significant and the credibility is high. This can reduce the impact of market fluctuations on the rules and avoid unnecessary noise interference. In the case that the support of a product item is relatively low compared to the historical average and the historical transaction fluctuations are small, the confidence threshold can be appropriately lowered to improve the sensitivity of the model and help discover potential association rules.
[0093] Finally, according to each product association rule and the confidence threshold of the product association rule, it is judged whether the product association rule meets the confidence requirement. The confidence level is greater than , indicating that the product association rule meets the confidence requirement and is retained ,like The confidence level is less than or equal to , indicating that the product association rule does not meet the confidence requirement and is removed .
[0094] Subsequently, warehouse information management is performed based on the retained commodity association rules, including: Adjust product positions: Place the products corresponding to each product association rule in adjacent positions to facilitate the staff's picking operations.
[0095] Dynamic replenishment: For the reserved product association rules, it reflects the degree of association between products, such as the rules for the reservation ,like , When goods A and B need to be replenished, since C is highly correlated with AB, it is also checked whether C also needs to be replenished. Through this operation, accurate management of warehouse information is achieved.
[0096] The present invention also provides an information management system for warehouse management. The information management system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of an information management method for warehouse management.
Claims
1. A warehouse management information management method, characterized in that: include: Acquire transaction records in real time, dynamically divide multiple transaction windows with any moment as the current moment; each transaction window includes multiple transaction records; each transaction record includes multiple commodity items; Heuristic connection is performed based on the frequent 1-item sets of the previous transaction window and the current transaction window: Frequent itemsets and current transaction window Take one element from each item set; if the first two elements If the items are the same, connect the two elements and remove the duplicates, and use them as a candidate for the current trading window. Itemset; if the first two elements The items are different, and whether to connect is determined based on the potential correlation between the two elements; ,frequently Each element of the itemset is A combination of product items; For all candidates in the current trading window Itemset performs adaptive pruning: for any candidate Item set, if the candidate All subsets of the itemset are frequent Item set, keep the candidate Itemset, as a frequent Itemset; if a subset is non-frequent Item set, according to the candidate The stability of the itemset determines whether to prune; Based on all frequent The item set generates all product association rules and manages warehouse information based on the product association rules.
2. The warehouse management information management method according to claim 1, wherein: Potential relevance is determined based on the following formula: ; In the formula, for and The potential relevance of The frequency of the previous trading window Elements of the itemset, Frequent trading in the current trading window Elements of the itemset, for The corresponding product items and The number of duplicate items for the corresponding product item, for and The total number of corresponding product items, and They are and support, is the natural exponential function, for and The joint support of for The number of times it appears in all transaction records in the previous transaction window, for The number of times it appears in all transaction records in the current transaction window, To obtain the maximum value function, is the absolute value symbol.
3. The warehouse management information management method according to claim 1, wherein: candidate The stability of an itemset is determined as follows: Calculate each candidate The volatility factor of the commodity item combination corresponding to the item set; ; In the formula, Candidate The volatility factor of the commodity item combination corresponding to the item set, is the smoothing factor, Candidate The rate of change of the transaction frequency of the commodity item combination corresponding to the item set in the current transaction window, 、 Candidates The standard deviation and mean of the transaction frequency of the commodity item combination corresponding to the item set in all transaction windows before the current transaction window; The inverse of the volatility factor of the commodity item combination corresponding to the item set is used as the candidate Stability of itemsets.
4. The warehouse management information management method according to claim 1, wherein: The method of dynamically dividing multiple trading windows is: Get all transaction records before the current moment, sort all transaction records by length Divide into multiple trading windows and divide the most recent one into The transaction record of the specified length is used as the initial transaction window at the current moment, and the current transaction window is dynamically calculated: ; In the formula, is the length of the current trading window, is the length of the initial trading window at the current moment, is the entropy value of the transaction type in the initial transaction window at the current moment, is the reference value of entropy, It is the average length of all trading windows before the initial trading window at the current moment.
5. The warehouse management information management method according to claim 1, wherein: The method for managing warehouse information based on commodity association rules is as follows: Calculate the confidence threshold for each product association rule: ; In the formula, Product association rules The confidence threshold of for and Serial number, yes The volatility factor of the corresponding commodity item, for The preset confidence threshold, for The support level of the corresponding commodity item in the current transaction window, for The average sales volume of the corresponding product item in all transaction windows before the current transaction window; Filter out product association rules with a confidence greater than a confidence threshold, and manage corresponding product items based on the filtered product management rules.
6. The warehouse management information management method according to claim 1, wherein: The method for obtaining the frequent 1-item set of the previous transaction window and the current transaction window is: For any transaction window, all commodity items contained in all transaction records within the transaction window and the support of each commodity item are obtained; commodity items with support greater than a preset support threshold are regarded as frequent 1-item sets of the transaction window.
7. The warehouse management information management method according to claim 2, wherein: The method to determine whether to connect two elements based on their potential correlation is: If the potential correlation between two elements is greater than the preset potential correlation threshold, the two elements are connected and duplicated to generate a candidate Item set; if the potential correlation between two elements is not greater than the preset potential correlation threshold, skip the connection operation.
8. The warehouse management information management method according to claim 3, wherein: According to the candidate The method to determine whether to prune based on the stability of the itemset is: If the stability is greater than the stability threshold, the candidate is retained. Itemset, as a frequent Itemset; If the stability is not greater than the preset stability threshold, the candidate Item sets are pruned.
9. The warehouse management information management method according to claim 6, wherein: The support of each product item is determined based on the following method: the number of times each product item appears in all transaction records is counted, and the ratio of this number to the total number of transaction records is used as the support of the product item.
10. An information management system for warehouse management, characterized in that: The information management system includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the steps of the information management method according to any one of claims 1 to 9.