E-commerce inventory dynamic regulation method and system based on multi-source data

By using a dynamic e-commerce inventory control method based on multi-source data, the contribution of factors is quantified and inventory adjustment priorities are generated. Combined with logistics space optimization, this solves the problem of mismatch between existing inventory control schemes and business needs, and achieves dynamic balance of inventory resources.

CN122243364APending Publication Date: 2026-06-19SHENZHEN BOJIANG INTELLIGENT INNOVATION CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN BOJIANG INTELLIGENT INNOVATION CO LTD
Filing Date
2026-03-23
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies cannot accurately quantify the contribution of multiple influencing factors to e-commerce inventory data, resulting in a mismatch between inventory control plans and actual business needs, and a failure of resource allocation plans to match the dynamically changing logistics space carrying capacity.

Method used

By acquiring historical business data and multi-source impact indicators, data cleaning and external event labeling are performed to quantify the contribution of factors. Real-time impact weights are used for linear fusion processing to generate inventory adjustment priorities. Combined with logistics space optimization and parameter backtracking correction, dynamic control of inventory resources is achieved.

🎯Benefits of technology

It accurately extracts and quantifies the impact of different external events on business data, dynamically quantifies the sensitivity to external shocks, ensures that inventory control is synchronized with market demand, solves the problem of mismatch between resource allocation and logistics space, and achieves dynamic balance in inventory control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122243364A_ABST
    Figure CN122243364A_ABST
Patent Text Reader

Abstract

This invention relates to the fields of big data processing and supply chain management technology, and discloses a method and system for dynamic control of e-commerce inventory based on multi-source data. The method includes acquiring historical business data and multi-source influence indicators, performing data cleaning and external event labeling; quantifying and weighting contributions based on historical influence records to obtain real-time influence weights; linearly fusing real-time influence weights with business fluctuation indicators to obtain a comprehensive influence score; determining inventory adjustment priorities based on the comprehensive influence score and performing logistics space optimization to obtain a synchronous allocation scheme; and allocating inventory resources and backtracking parameters according to the synchronous allocation scheme to obtain a final equilibrium state. This method can accurately quantify the contribution of multi-source influencing factors and dynamically optimize the allocation of inventory resources, improving supply chain response speed and inventory balance accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of big data processing and supply chain management technology, and in particular to a method and system for dynamic control of e-commerce inventory based on multi-source data. Background Technology

[0002] Currently, how to utilize big data processing technology to extract key features from massive amounts of e-commerce inventory data to achieve dynamic control of inventory and synchronous optimization of resource allocation has become an important research area in supply chain management.

[0003] In existing technologies, traditional inventory management solutions primarily rely on historical statistical business data, using time-series forecasting models to fit future demand trends. These solutions typically utilize single-dimensional features for regression calculations and trigger inventory alerts through static threshold logic. However, inventory fluctuations caused by external factors often exhibit nonlinear and intertwined characteristics. When multiple influencing factors create a cumulative impact, traditional forecasting algorithms struggle to accurately quantify the true contribution of each independent factor to the fluctuations in heterogeneous inventory data. This results in existing technologies failing to characterize the true sensitivity of different heterogeneous inventory data to external events, further complicating inventory adjustment priority determination and preventing resource allocation schemes from matching the dynamically changing logistics space capacity.

[0004] Existing technologies suffer from a mismatch between inventory control solutions and actual business needs. Summary of the Invention

[0005] This invention provides a method and system for dynamic control of e-commerce inventory based on multi-source data, in order to solve the technical problem in the prior art where the inventory control scheme is mismatched with actual business needs due to the inability to accurately quantify the contribution of multi-source influencing factors.

[0006] Firstly, in order to solve the above-mentioned technical problems, the present invention provides a method for dynamic control of e-commerce inventory based on multi-source data, comprising: Acquire historical business data and multi-source impact indicators, perform data cleaning based on the historical business data to obtain a cleaned data sequence, and label external events based on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records; The cleaned data sequence is divided into time intervals based on the historical impact records to obtain time series sub-intervals, and the contribution is quantified based on the time series sub-intervals to obtain the factor contribution. The weights are calculated based on the contribution of the factors to obtain the factor weights, and the multi-source influence indicators are weighted based on the factor weights to obtain the real-time influence weights. The sliding window difference is calculated based on the cleaned data sequence to obtain the business fluctuation index. The business fluctuation index is then linearly fused based on the real-time impact weight to obtain a comprehensive impact score. When the comprehensive impact score exceeds a preset risk threshold, a preliminary risk identifier is generated. Based on the preliminary risk identification, the corresponding business identification is extracted, and the inventory balance data is obtained based on the business identification. Based on the inventory balance data, demand fluctuations are monitored to determine the priority of inventory adjustment. The inventory parameters are adjusted according to the inventory adjustment priority to obtain the adjusted inventory parameters, and the logistics space is optimized according to the adjusted inventory parameters to obtain a synchronous allocation scheme. The inventory resources are allocated according to the synchronous allocation scheme to obtain the inventory configuration result, and the system status is updated according to the inventory configuration result to obtain the updated inventory status. Based on the updated inventory status, inventory demand matching detection is performed to obtain a detection deviation value. When the detection deviation value exceeds a preset deviation threshold, the adjusted inventory parameters are backtracked and corrected to obtain the final inventory status.

[0007] Secondly, the present invention provides an e-commerce inventory dynamic control device based on multi-source data, comprising: The data acquisition module acquires historical business data and multi-source impact indicators, performs data cleaning based on the historical business data to obtain a cleaned data sequence, and performs external event labeling based on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records. The sequence partitioning module divides the cleaned data sequence into time intervals based on the historical impact records to obtain time series sub-intervals, and quantifies the contribution of the time series sub-intervals to obtain the factor contribution. The weight calculation module performs weight calculation based on the contribution of the factors to obtain the factor weight results, and performs weighted calculation on the multi-source influence indicators based on the factor weight results to obtain the real-time influence weights. The fluctuation analysis module calculates the sliding window difference based on the cleaned data sequence to obtain the business fluctuation index, and performs linear fusion processing on the business fluctuation index according to the real-time impact weight to obtain the comprehensive impact score. When the comprehensive impact score exceeds the preset risk threshold, a preliminary risk label is generated. The inventory monitoring module extracts the corresponding business identifier based on the preliminary risk identifier, obtains inventory balance data based on the business identifier, monitors demand fluctuations based on the inventory balance data, and determines the priority of inventory adjustment. The inventory adjustment module adjusts the inventory parameters according to the inventory adjustment priority to obtain the adjusted inventory parameters, and performs logistics space optimization processing based on the adjusted inventory parameters to obtain a synchronous allocation scheme. The resource allocation module allocates inventory resources according to the synchronization allocation scheme to obtain inventory configuration results, and updates the system status according to the inventory configuration results to obtain the updated inventory status. The backtracking correction module performs inventory demand matching detection based on the updated inventory status to obtain a detection deviation value. When the detection deviation value exceeds a preset deviation threshold, the adjusted inventory parameters are backtracked to obtain the final inventory status.

[0008] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention obtains multi-source impact indicators and combines them with cleaned data sequences to label external events, and then quantifies the contribution of factors based on the time series sub-intervals. Compared with existing technologies that rely solely on single-dimensional business data, this solution can accurately extract and quantify the true impact of different external events on business data fluctuations from massive heterogeneous big data, solving the problem that existing technologies are unable to characterize the multi-factor relationships in complex environments.

[0009] (2) This invention performs linear fusion processing on business fluctuation indicators by real-time influence weights and generates preliminary risk indicators using preset risk thresholds, thereby determining the priority of inventory adjustments. This derivation process realizes dynamic quantitative assessment of sensitivity to external shocks, avoids the risk capture lag caused by the static thresholds of existing technologies, and ensures that inventory control decisions can be highly synchronized with the ever-changing market business demands.

[0010] (3) This invention obtains a synchronous allocation scheme by combining the adjusted inventory parameters with logistics space optimization processing, and uses a parameter backtracking correction mechanism to compensate for the detection deviation value in real time. This processing chain realizes the deep coupling of inventory resource allocation and physical warehousing carrying capacity, effectively solving the problem of mismatch between resource allocation scheme and logistics space in the prior art. Through the closed-loop feedback adjustment mechanism, the delay in system state update is eliminated, so that inventory control can eventually reach a dynamic equilibrium state. Attached Figure Description

[0011] Figure 1 This is a schematic diagram of the e-commerce inventory dynamic control method based on multi-source data provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an e-commerce inventory dynamic control system based on multi-source data provided in the second embodiment of the present invention. Detailed Implementation

[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] Reference Figure 1 The first embodiment of the present invention provides a method for dynamic control of e-commerce inventory based on multi-source data, including the following steps: S11, acquire historical business data and multi-source impact indicators, perform data cleaning based on the historical business data to obtain a cleaned data sequence, and perform external event labeling based on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records; S12, the cleaned data sequence is divided into time intervals according to the historical impact records to obtain time series sub-intervals, and the contribution is quantified according to the time series sub-intervals to obtain the factor contribution. S13, calculate the weights based on the contribution of the factors to obtain the factor weights, and calculate the weights of the multi-source influence indicators based on the factor weights to obtain the real-time influence weights. S14. The sliding window difference is calculated based on the cleaned data sequence to obtain the business fluctuation index. The business fluctuation index is linearly fused based on the real-time impact weight to obtain the comprehensive impact score. When the comprehensive impact score exceeds the preset risk threshold, a preliminary risk label is generated. S15, extract the corresponding business identifier based on the preliminary risk identifier, obtain inventory balance data based on the business identifier, monitor demand fluctuations based on the inventory balance data, and determine the inventory adjustment priority. S16, adjust the inventory parameters according to the inventory adjustment priority to obtain the adjusted inventory parameters, and perform logistics space optimization processing according to the adjusted inventory parameters to obtain a synchronous allocation scheme. S17. Allocate inventory resources according to the synchronization allocation scheme to obtain inventory configuration results, and update the system status according to the inventory configuration results to obtain the updated inventory status. S18, perform inventory demand matching detection based on the updated inventory status to obtain a detection deviation value. When the detection deviation value exceeds a preset deviation threshold, perform parameter backtracking correction on the adjusted inventory parameters to obtain the final inventory status.

[0014] In step S11, historical business data and multi-source impact indicators need to be acquired. Data cleaning is performed on the historical business data to obtain a cleaned data sequence. External event annotation is then performed on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records, including: Historical business data and multi-source impact indicators are acquired, outlier removal is performed on the historical business data to obtain outlier business data, and missing value imputation is performed on the outlier business data to obtain a cleaned data sequence. The cleaned data sequence is aligned with the multi-source impact indicators in the time dimension to obtain aligned data. Business numerical features and impact indicator features are extracted from the aligned data. The business numerical features and impact indicator features are concatenated according to time nodes to form feature vectors. All feature vectors are stacked vertically in time order to form a multi-dimensional feature matrix. Text semantic features are extracted from the multidimensional feature matrix, and positive and negative influence annotations are applied to the text semantic features based on a preset influence rule base to obtain an annotated feature set. Historical impact records are obtained by clustering based on the similarity between features in the labeled feature set.

[0015] It should be noted that historical business data refers to the sequence of product business data recorded within a preset statistical time period, which originates from the e-commerce platform's order system. The multi-source influence indicators refer to external or internal indicators that can affect changes in product business data, including promotional activity information, price change information, platform traffic change information, holiday information, climate change information, and user review information. The preset statistical time period is a data statistical interval determined based on the historical turnover cycle of the target product. Specifically, the average inventory turnover days of the target product in the previous year are calculated, and the statistical period multiple is determined based on the average length of the historical replenishment cycle. The product of the average inventory turnover days and the statistical period multiple is dynamically configured. The preferred value for the statistical period multiple is 3, to ensure that the preset statistical time period fully covers at least three inventory replenishment and consumption cycles, thereby improving the stability of the statistical analysis of influence indicators.

[0016] Then, outlier removal is performed on the historical business data. Specifically, firstly, statistical analysis is conducted on the business data sequence to calculate the mean μ and standard deviation σ, and further, the coefficient of variation (CV) is calculated. The CV is the ratio of the standard deviation to the mean, used to quantify the volatility of the sales sequence. The number of standard deviations to use as a criterion is determined based on the comparison between the calculated CV and a preset volatility characteristic threshold. If the business data at a certain time point... Satisfy | When −μ∣>kσ, the business data is identified as an outlier and removed, thus obtaining a cleaned data sequence with outlier interference removed.

[0017] A preset volatility characteristic threshold is used to distinguish the business stability type of a product. Its initial value is set to 0.1 according to the XYZ material classification criteria in supply chain management, and parameter adjustments are allowed for different product categories or business scenarios. When the coefficient of variation (CV) is less than or equal to the preset volatility characteristic threshold, it indicates that the business data fluctuation is small. In this case, k=3 is used, which means three times the standard deviation is used as the anomaly identification range to retain normal random fluctuation information. When the CV is greater than the preset volatility characteristic threshold, it indicates that the business data has significant disturbances. In this case, k=2 is used, which means two times the standard deviation is used to improve the sensitivity of outlier identification.

[0018] Missing value imputation is achieved by using a cubic spline interpolation algorithm to estimate the missing value based on curve fitting of business data from adjacent time points before and after the missing time point, thereby obtaining a continuous cleaned data sequence.

[0019] Specifically, the recording period of business data is used as the baseline time granularity, and the arithmetic mean method is used to perform time aggregation processing on the impact indicators with higher update frequency. The mean of all original sampling points within the baseline time granularity is calculated as the indicator feature value within the recording period, thereby obtaining aligned data.

[0020] Business numerical features are extracted from the aligned data, specifically by using the sales value corresponding to each time point in the cleaned data sequence as the business numerical feature for that time point. Influence indicator features include numerical influence indicator features and numerical vectors. Numerical influence indicator features are obtained by performing min-max normalization on multi-source influence indicators.

[0021] The pre-trained Word2Vec word vector model is used to transform unstructured text data extracted from multi-source influence indicators into numerical forms, resulting in numerical vectors. Examples include user reviews of products on e-commerce platforms, descriptions of promotional activities, and event descriptions in external public opinion information. The Word2Vec word vector model is pre-built using unsupervised training based on training corpora constructed from order reviews, product descriptions, promotional copy, and external public opinion texts from e-commerce platforms. It is used to map text words to a high-dimensional numerical space.

[0022] According to the preset feature order, the feature vector is composed of three parts connected end-to-end. The starting position is the business numerical feature, with a dimension of 1; the middle position is the numerical influence indicator feature, with a dimension equal to the number of numerical indicators in the multi-source influence indicators, denoted as M; and the ending position is the text semantic feature, with a dimension equal to the fixed vector dimension output by the Word2Vec word vector model, denoted as N. In the multi-dimensional feature matrix, the starting column index corresponding to the text semantic feature column is 1+M+1, that is, the next column number after the business numerical feature column and the numerical influence indicator feature column have been fully occupied. The ending column index is 1+M+N.

[0023] Based on the determined start and end column indices, a submatrix is ​​extracted from the multidimensional feature matrix, containing all rows within the corresponding column range. The number of rows in the multidimensional feature matrix equals the total number of time nodes obtained by dividing the preset statistical time period by the baseline time granularity. Each row corresponds to a comprehensive feature vector for one recording period. A column slicing operation is performed on each row to extract the values ​​within the range from the start to the end column index, forming a row vector of length N.

[0024] The extracted row vectors are arranged sequentially according to the row order of the original matrix to form a two-dimensional array, where the number of rows represents the total number of time nodes and the number of columns is N. This two-dimensional array represents the text semantic features, with each row corresponding to a numerical representation of the text information within a recording period and each column corresponding to a semantic dimension in the Word2Vec word vector model.

[0025] Based on a pre-defined influence rule base, the semantic features of the text are labeled with positive and negative influences to obtain a set of labeled features. The pre-defined influence rule base is constructed based on the association between keywords and the fluctuation trend of business data. First, words appearing in historical texts with a frequency higher than a pre-defined frequency threshold are extracted as keywords. Specifically, by statistically analyzing the frequency distribution of all words in the historical corpus, low-frequency words at the end of the long tail distribution and not statistically significant for business fluctuations are removed. The lowest frequency value retaining the core semantic information of high-frequency words is set as the pre-defined frequency threshold, thus extracting words with a frequency higher than the pre-defined frequency threshold as keywords. For each keyword, historical text events containing that keyword are extracted, and the average value of business data at the 30 baseline time granularities preceding each historical text event is obtained as the baseline prediction value. Calculate the actual business data y at the time the event occurs and compare it with the baseline forecast value. The mean residual r between: If the expected residual value of the same keyword in historical samples is greater than 0, it is labeled as a positive influence; otherwise, it is labeled as a negative influence, thus forming a set of labeled features.

[0026] After obtaining the labeled feature set, clustering is performed using the DBSCAN algorithm based on the similarity between features in the labeled feature set to generate structured historical impact records. Specifically, Euclidean distance is used to quantify semantic similarity. When the distance is less than the neighborhood radius determined by optimization on the historical sample set using a grid search method, the features are considered semantically similar, thus grouping labeled features with common characteristics into different clusters. Based on this, high-frequency keywords within the clusters are extracted as core semantic labels and mapped to corresponding historical impact types. The original sampling time points of each event within the clusters are retrieved from the aligned data, and the earliest and latest time points are set as the start and end times to construct the impact occurrence interval. Furthermore, the absolute value of the mean residual of each event within the cluster during positive and negative impact labeling is used as a weight. A weighted average method is used to statistically analyze the distribution of positive and negative labels within the clusters. When the weighted result is greater than zero, it is determined as a positive impact; when the weighted result is less than zero, it is determined as a negative impact, thus obtaining the comprehensive impact direction attribute. Finally, by filling in the fields with the determined impact type, impact occurrence interval, and overall impact direction attributes, the historical impact record is obtained.

[0027] In step S12, the cleaned data sequence is divided into time intervals based on the historical impact records to obtain time series sub-intervals, and the contribution is quantified based on the time series sub-intervals to obtain the factor contribution, including: The cleaned data sequence is divided into time intervals based on the event annotation information in the historical impact record to obtain time series sub-intervals; The magnitude of change in business data is calculated based on the time series sub-intervals, and the magnitude of change in influencing factors within the time series sub-intervals is statistically analyzed based on the historical impact records. The correlation coefficients are calculated based on the magnitude of change in the business data and the magnitude of change in the influencing factors, and the factor contribution of each influencing factor is determined based on the correlation coefficients.

[0028] It should be noted that the event annotation information in the historical impact record includes the occurrence time of external events such as promotional activities, price adjustments, changes in platform resource exposure, and holidays. Time interval division is achieved by setting event impact time windows, based on the time point of occurrence of the external event. Based on this, a lead time is set according to the event type. and the post-decline period , and The specific values ​​are determined through sensitivity analysis of historical business data fluctuations. Using the occurrence time of similar historical events as the center, the critical time points where business data deviates from the normal average level are retrieved bidirectionally forward and backward. The normal average level is determined by the moving arithmetic mean of business data from historical non-event periods. The time from when the business data begins to show a trend of deviation to when the event occurs is defined as the leading effect period. The period from the end of the event to the return of business data to the normal range is defined as the post-decline period. For example, in promotional campaign scenarios, settings can be made based on historical pre-sale characteristics. Set for 3 days, based on the characteristics of the sales decline. The time interval is set to 2 days. - to + This is divided into a complete time series sub-interval. Multiple time series sub-intervals constructed around external events can be obtained using the above method.

[0029] Specifically, daily business data within a specific time series sub-interval is extracted from the cleaned data series, and the average sales value within that sub-interval is calculated. Simultaneously, historical business data of the same consecutive time period preceding that sub-interval is extracted from the cleaned data series as a baseline period, and the average sales value for that baseline period is calculated. Subsequently, the average sales value of the time series sub-interval is compared with the average sales value of the baseline period to obtain the magnitude of change in the business data.

[0030] While calculating the magnitude of changes in business data, influencing factor data within the corresponding time series sub-intervals are extracted based on historical impact records, and each influencing factor undergoes quantitative statistical processing. To eliminate the differences in the dimensions of different influencing factors and solve the problem of multi-dimensional information transformation, a uniform normalization process based on the relative change rate of the benchmark period is adopted. Specifically, for price-related factors, the percentage decrease in the average selling price of goods within the time series sub-interval relative to the average selling price of the benchmark period is calculated as the price change magnitude. For promotion-related factors, the full reduction amount and discount ratio recorded within the time series sub-interval are first extracted, and the full reduction amount is divided by the corresponding unit price of the goods to convert it into an equivalent discount rate; then, a linear weighted sum of the equivalent discount rate and the original discount ratio is performed using preset weighting coefficients to obtain a comprehensive discount rate between 0 and 1. For factors related to resource placement exposure or advertising placement, the total exposure and total clicks within the time series sub-intervals are statistically analyzed. The historical maximum and minimum values ​​of the corresponding indicators are obtained by retrieving the full historical business data. The minimum-maximum normalization method is used to map the indicators to a dimensionless standard interval consisting of 0 to 1. The growth rate of the normalized indicator mean within the sub-interval relative to the normalized mean of the base period is calculated to obtain the magnitude of change of the influencing factors.

[0031] The preset weighting coefficients are determined by performing multiple linear regression analysis on historical promotional samples. Specifically, the standardized regression coefficients are fitted with the historical sales growth rate as the dependent variable and the historical equivalent discount rate and historical original discount rate as independent variables. Finally, the percentage increase of the mean of the comprehensive discount rate in this sub-interval relative to the mean of the comprehensive discount rate in the base period is calculated as the change in promotional intensity.

[0032] Subsequently, correlation analysis was performed on the statistical results of multiple time series sub-intervals. Specifically, by traversing all time series sub-intervals, the magnitude of change in business data corresponding to each sub-interval was extracted and arranged in chronological order to construct a one-dimensional business data change sequence. Simultaneously, for each type of influencing factor, the magnitude of change in the corresponding influencing factor within each sub-interval was extracted and arranged according to a time index order completely consistent with the business data change sequence to construct a factor change sequence, thereby achieving a one-to-one mapping between the two sequences and corresponding observation points on the time axis.

[0033] It is worth noting that, to ensure statistical significance and avoid interference from missing or stagnant data on the sensitivity of the correlation coefficient, a sample validity check is first performed. Specifically, for each type of influencing factor, the values ​​in the factor change sequence are retrieved. If the change amplitude corresponding to a certain sub-interval is zero or there is missing data, the sample point is determined to be an invalid sample, and the corresponding business data change amplitude and factor change amplitude are simultaneously removed to ensure that only samples with substantial fluctuations in the factor are retained in the sequence. The number of valid samples after removal is counted. If the number of valid samples is less than a preset sample size threshold, a result indicating that it does not have statistical significance is output, and the factor is removed. The preset sample size threshold is determined based on the significance level Alpha of the correlation test and the preset minimum degrees of freedom requirement. Specifically, it is obtained by consulting the statistical critical value table to obtain the minimum sample size that makes the correlation coefficient statistically significant at a specified confidence level. In this embodiment, the preset sample size threshold is set to five groups. The five sets of values ​​were determined based on the following: under a significance level of Alpha equal to 0.05 and a two-tailed test, the minimum degrees of freedom required to satisfy the significance test of the Pearson correlation coefficient is 3. According to the calculation rule that the effective sample size equals the degrees of freedom plus 2, the minimum effective sample size to ensure the preliminary representativeness of the statistical results was calculated to be five sets. If the number of effective samples reaches the preset sample size threshold, the filtered business data change sequence and the influencing factor change sequence are substituted into the Pearson correlation coefficient formula for calculation, and the absolute value of the obtained correlation coefficient is confirmed as the factor contribution of the corresponding influencing factor. The larger the correlation coefficient value, the higher the statistical correlation between the change in the influencing factor and the change in sales volume.

[0034] In step S13, weights are calculated based on the contribution of the factors to obtain factor weight results, and the multi-source influence indicators are weighted based on the factor weight results to obtain real-time influence weights, including: The contribution values ​​of the factors are normalized to obtain standardized contribution values. Calculate the factor weights corresponding to each indicator in the multi-source influence index based on the standardized contribution values, and obtain the factor weight results; The factor weight results are mapped to the values ​​of each indicator in the multi-source influence indicators to obtain the indicator weight set. The real-time influence weight is obtained by weighting the set of indicator weights with the multi-source influence indicators.

[0035] It should be noted that the factor contribution is normalized by min-max to obtain the standardized contribution value. All values ​​in the standardized contribution value are summed and statistically analyzed. The factor weight corresponding to each influencing indicator is calculated based on the proportion of each standardized contribution value in the sum, thus obtaining the factor weight result. The sum of the factor weights corresponding to each influencing indicator is 1.

[0036] After obtaining the factor weights, the values ​​of each influence indicator corresponding to the current time point are extracted from the multi-source influence indicators. Specifically, influence indicator numbers are established according to the data field order of the multi-source influence indicators, and the values ​​of each indicator are extracted sequentially according to the influence indicator number order, thus forming a set of indicator values; at the same time, the factor weights are arranged in the order of the same influence indicator number to form a weight set.

[0037] Subsequently, the set of indicator values ​​and the set of weights are matched one-to-one according to the same numbering order to construct the indicator weight set. Each set of data in the indicator weight set includes an influencing indicator value and its corresponding factor weight. The product of each influencing indicator value and its corresponding factor weight in the indicator weight set is performed to obtain the weighted indicator value corresponding to each influencing indicator. All weighted indicator values ​​are then summed to obtain the real-time influence weight corresponding to the current time point.

[0038] In step S14, a sliding window difference calculation is performed based on the cleaned data sequence to obtain a business fluctuation index. The business fluctuation index is then linearly fused according to the real-time impact weight to obtain a comprehensive impact score. When the comprehensive impact score exceeds a preset risk threshold, a preliminary risk indicator is generated, including: The cleaned data sequence is divided into multiple cleaned data sub-sequences according to a preset sliding window length, and the difference between adjacent cleaned data sub-sequences is calculated to obtain the business data change sequence for the corresponding time interval. Calculate the business fluctuation index for each time interval based on the business data change sequence, and then perform a linear weighted calculation on the business fluctuation index and the real-time impact weight to obtain the comprehensive impact score; The comprehensive impact score is compared with a preset risk threshold. When the comprehensive impact score exceeds the preset risk threshold, a preliminary risk label is generated for the corresponding product.

[0039] It should be noted that the preset sliding window length is determined through periodic analysis of historical business data. Specifically, autocorrelation analysis or fast Fourier transform spectral analysis is performed on the historical sales series to identify significant periods in the sales series. When the spectral analysis shows an energy peak at a certain frequency, the sales period is determined based on the period length corresponding to that frequency, and this period length is used as the preset sliding window length.

[0040] After determining the sliding window length, the cleaned data sequence is divided into multiple cleaned data subsequences by the sliding window. To adapt to the sales fluctuation characteristics of different products, this embodiment adaptively sets the sliding step size based on the coefficient of variation of the sales sequence. When the coefficient of variation of the sales sequence is greater than 0.1, the sliding step size is set to 1, thereby using an overlapping window method to obtain continuous subsequences, so that each newly added business data in the sequence can participate in the window difference calculation, thereby improving the sensitivity to sudden changes in sales or demand disturbances; when the coefficient of variation is less than or equal to 0.1, it is determined that the sales change is relatively stable, and at this time the sliding step size is set to the same as the sliding window length, thereby using a non-overlapping window method to divide the sequence, filtering random noise by reducing the calculation frequency, and reducing computational overhead. According to the determined preset sliding window length and sliding step size, the cleaned data sequence is divided by moving the sliding window sequentially according to the sliding step size, so that each cleaned data subsequence contains continuous business data of the preset window length, and slides towards the end of the sequence in sequence, thereby obtaining multiple cleaned data subsequences arranged in chronological order.

[0041] Subsequently, the difference between adjacent cleaned data subsequences is calculated to obtain the sales change value for the corresponding time interval. Specifically, the average sales of the current cleaned data subsequence and the previous cleaned data subsequence are calculated separately, and the sales change value is determined based on the difference between the two. The difference calculation can use either absolute difference or relative rate of change. The absolute difference represents the direct difference between the average sales of adjacent time windows, while the relative rate of change represents the proportion of change in the average sales of the current window relative to the average sales of the previous window.

[0042] It should be noted that, in order to determine the method for calculating the difference, historical sales data is divided into stages. The time intervals in historical sales data marked with promotional activities or with sales significantly higher than the historical average are defined as promotional stages, while the remaining time intervals without promotional activities and with sales within the normal fluctuation range are defined as normal sales stages.

[0043] Subsequently, the business data change sequences for the two difference calculation methods were calculated for the promotion and normal sales phases, and the magnitude of change in the promotion phase was compared. When the magnitude of change in the absolute difference was more significant in the promotion phase than in the normal sales phase, the absolute difference method was used for calculation; when the magnitude of change in the relative rate of change was more significant in the promotion phase, the relative rate of change method was used for calculation, thus obtaining a business data change sequence arranged in chronological order.

[0044] After obtaining the business data change sequence, the sales change values ​​for each time interval are statistically processed to calculate the business volatility index. The business volatility index is used to quantify the overall dispersion of the business data change sequence within the corresponding time interval, and can be characterized by statistics such as root mean square (RMS) or standard deviation. Through backtesting analysis of historical sales data, it was found that the RMS statistic has better stability and robustness in identifying abnormal demand peaks. Therefore, in this embodiment, the RMS statistic is preferably used as the calculation result of the business volatility index.

[0045] After obtaining the business fluctuation index, it is linearly fused with the real-time impact weights to obtain a comprehensive impact score. To eliminate the dimensional differences between different influencing factors, the real-time impact weights are min-max normalized before participating in the fusion calculation.

[0046] Subsequently, a comprehensive impact score is calculated by linearly weighting the business fluctuation indicators and the normalized real-time impact weights, and then compared with a preset risk threshold. When the comprehensive impact score exceeds the risk threshold, a preliminary risk label is generated for the corresponding product. Statistical analysis is performed on samples that have experienced stockouts or inventory backlogs in historical operating cycles, and the high percentile of the historical comprehensive impact score distribution is calculated as the preset risk threshold, thereby reducing the probability of false alarms while ensuring the sensitivity of early warnings.

[0047] In step S15, the corresponding business identifier is extracted based on the preliminary risk identifier, and inventory balance data is obtained based on the business identifier. Demand fluctuation monitoring is performed based on the inventory balance data to determine inventory adjustment priorities, including: Extract the business identifier from the preliminary risk identifier, and retrieve the inventory balance data from the preset inventory management database based on the business identifier; The inventory balance data is divided by the historical business data to obtain the inventory consumption rate. The mean drift detection is performed on the inventory consumption rate to obtain the degree of demand fluctuation. The degree of demand fluctuation and the inventory balance data are input into a preset risk matrix to obtain the inventory adjustment priority.

[0048] It should be noted that the extraction of the business identifier from the initial risk identifier is achieved through a field matching algorithm. The initial risk identifier is stored in structured JSON format. The business identifier is obtained by parsing the key field Product_ID, and this identifier is used as the primary key for indexing and retrieving data from the real-time inventory data table in the preset inventory management database. The preset inventory management database connects to the inventory data table in the Enterprise Resource Planning (ERP) system via a data interface to extract the current inventory balance data for the product. The inventory balance data includes the current physical inventory quantity, safety stock value, and the timestamp of the most recent inbound or outbound update, used to characterize the real-time inventory status of the target product.

[0049] After obtaining the inventory balance data, the cleaned data sequence is statistically processed to calculate the average sales volume of the product in the most recent inventory turnover cycle. The length of the inventory turnover cycle is determined by the average interval in days of the target product's historical replenishment records. The inventory balance data is then divided by the average sales volume to obtain the inventory depletion rate.

[0050] Furthermore, mean drift detection is performed on the inventory consumption rate. The inventory consumption rate is acquired at two consecutive monitoring times, and the absolute value of the difference between the current sampling time's inventory consumption rate and the previous sampling time's inventory consumption rate is calculated to obtain the degree of demand volatility. By statistically analyzing historical demand volatility data, the degree of demand volatility is divided into intervals. The historical demand volatility data is arranged in ascending order, and the boundary values ​​of the volatility intervals are determined based on the statistical distribution results, thus dividing the region into low volatility, medium volatility, and high volatility intervals. The boundary values ​​of each interval are pre-determined and stored based on the statistical results of historical demand volatility data.

[0051] The preset risk matrix is ​​a data structure pre-established based on historical replenishment deviation data statistics and inventory management experience rules, and is stored in the inventory management database before operation. The preset risk matrix uses inventory percentage as the horizontal division dimension. The inventory percentage is calculated by comparing the current inventory level (Inv) with the maximum inventory capacity of the storage node where the product is located. The storage node is the warehouse or sub-warehouse location storing the product, and its maximum inventory capacity is pre-set based on physical storage conditions such as warehouse space dimensions, number of shelves, and storage location volume.

[0052] Furthermore, the inventory balance percentage is divided into several inventory level ranges. For example, an inventory balance percentage below 30% indicates a low inventory level, an inventory balance percentage between 30% and 60% indicates a medium inventory level, and an inventory balance percentage above 60% indicates a relatively sufficient inventory level. These ranges are predetermined based on historical inventory management statistics.

[0053] The vertical dimension of the preset risk matrix corresponds to the gradation of demand fluctuation levels. Each intersection area within the matrix corresponds to a different inventory adjustment priority label, including first-level, second-level, and third-level priorities. The lower the priority value, the higher the urgency of replenishment, and the earlier the corresponding inventory adjustment operation is executed. After calculating the inventory percentage and demand fluctuation level, these are input into the preset risk matrix as the horizontal and vertical coordinates. The corresponding matrix cell is then located according to the pre-defined interval mapping rules within the matrix to determine the inventory adjustment priority for that product.

[0054] For example, in an inventory monitoring task, the risk identifier is parsed to obtain the product ID T-SHIRT-001. The current inventory balance (Inv) retrieved from the ERP database is 220 units. The maximum inventory capacity for this product in the corresponding warehouse node is 1000 units, resulting in an inventory balance percentage of 22%. The historical cleaned data sequence for this product is retrieved, and the average sales volume during the replenishment cycle is calculated to be 38 units per day, thus yielding a current inventory consumption rate of 5.8. If the inventory consumption rate at the previous monitoring time was 4.0, the absolute value of the difference between the two is 1.8, resulting in a demand volatility level of 1.8. The 22% inventory balance percentage and the corresponding volatility range for demand volatility are then input into a preset risk matrix. If the matrix mapping result corresponds to a first-level priority area, a first-level inventory adjustment priority identifier for this product is generated, and the product enters the subsequent inventory adjustment processing flow.

[0055] In step S16, inventory parameters are adjusted according to inventory adjustment priority to obtain adjusted inventory parameters. Logistics space optimization is then performed based on these adjusted inventory parameters to obtain a synchronous allocation scheme, including: The inventory adjustment level of the product corresponding to the business identifier is determined according to the inventory adjustment priority, and the inventory gap value is obtained by calculating the difference between the inventory balance data and the degree of demand fluctuation. The inventory gap value is adjusted proportionally according to the inventory adjustment level to obtain the adjusted inventory parameters; The preset warehouse node database is retrieved based on the business identifier to obtain the logistics space remaining for each warehouse node. Based on the adjusted inventory parameters and the remaining logistics space, space occupancy is calculated to construct a logistics space distribution matrix; Based on the logistics spatial distribution matrix, perform inbound location mapping processing to generate a synchronous allocation scheme.

[0056] It should be noted that the inventory adjustment level is determined by the priority mapping relationship pre-defined in the inventory management rule table. The inventory management rule table is set during the deployment phase based on statistical analysis of historical inventory adjustment records and stored in the parameter database. It is used to convert inventory adjustment priorities into corresponding inventory adjustment levels. First, historical inventory adjustment records are read, including historical inventory balance data, historical demand fluctuation records, and corresponding executed inventory adjustment operation records. These historical records are then categorized and statistically analyzed according to the inventory adjustment priority dimension, calculating the actual inventory adjustment magnitude and corresponding inventory recovery effect under different inventory adjustment priority conditions. Subsequently, the average value of the inventory adjustment magnitude data under each priority category is calculated, and the resulting average inventory adjustment magnitudes are sorted by numerical value.

[0057] Inventory adjustment levels are categorized based on the sorting results. The category with the largest average inventory adjustment magnitude is designated as the highest inventory adjustment level, the category with the middle range of average inventory adjustment magnitude is designated as the medium inventory adjustment level, and the category with the smallest average inventory adjustment magnitude is designated as the lowest inventory adjustment level. This establishes a mapping relationship between inventory adjustment priority and inventory adjustment level, which is then stored in the inventory management rule table. When performing inventory parameter adjustments, the correspondence between inventory adjustment priority and inventory adjustment level is retrieved from the inventory management rule table, and the corresponding inventory adjustment level is retrieved based on the target product's inventory adjustment priority. This ensures that the inventory adjustment priority judgment result can be stably converted into inventory parameter adjustment intensity.

[0058] After determining the inventory adjustment level, the numerical difference between the inventory balance data and the degree of demand fluctuation is calculated. That is, the inventory balance value is subtracted from the demand fluctuation value, and the calculation result is used as the inventory gap value to characterize the degree of deviation between the current inventory level and demand fluctuation.

[0059] Subsequently, the inventory gap value is proportionally adjusted according to the inventory adjustment level to obtain the adjusted inventory parameters. Specifically, based on the currently determined inventory adjustment level, the corresponding proportional coefficient is looked up in the preset level mapping table, and the inventory gap value and the proportional coefficient are multiplied to calculate the adjusted inventory parameters, which represent the scale of inventory replenishment or transfer required under the current demand fluctuation conditions. The preset level mapping table is established after statistical analysis of historical inventory adjustment records. First, historical inventory adjustment records are read, including historical inventory gap values ​​and the corresponding actual inventory adjustment quantities, and these historical records are categorized and statistically analyzed according to the inventory adjustment level dimension. Then, the proportional relationship between the historical inventory gap value and the actual inventory adjustment quantity under each inventory adjustment level category is calculated, and the average value of the calculated proportional values ​​is calculated to obtain the proportional coefficient corresponding to each inventory adjustment level. A mapping relationship is established between each inventory adjustment level and its corresponding proportional coefficient, and the data is stored in the level mapping table in tabular form.

[0060] After obtaining the adjusted inventory parameters, a search is performed in the pre-set warehouse node database based on the business identifier to obtain the remaining logistics space for each warehouse node. It should be noted that the pre-set warehouse node database is established and stored based on warehouse structure information. Specifically, the basic configuration data of each warehouse node is first read from the warehouse management system, including warehouse node identifier, storage location number, storage location capacity, and storage location occupancy status. This information is then organized according to the warehouse node dimension, and a structured storage table is created for the storage location information corresponding to each warehouse node, thus forming the pre-set warehouse node database. The pre-set warehouse node database records the storage location number, storage location capacity, and storage location occupancy status of each warehouse node. The storage location capacity is set based on the warehouse rack size, storage location volume, and standard loading specifications, while the storage location occupancy status is periodically updated based on the real-time inventory records of the warehouse management system. During a search, the set of warehouse nodes that can store the corresponding product is read based on the business identifier, and the current storage location occupancy status data of each warehouse node is obtained. Subsequently, the capacity of vacant storage locations in each warehousing node is counted, and the vacant storage locations are accumulated to obtain the logistics space surplus of each warehousing node, which is used for subsequent logistics space allocation calculations.

[0061] After obtaining the remaining logistics space, space occupancy is calculated based on the adjusted inventory parameters and the remaining logistics space of each warehouse node, and a logistics space distribution matrix is ​​constructed accordingly. Specifically, for each warehouse node, the space occupancy ratio between the adjusted inventory parameters and the remaining logistics space of that warehouse node is calculated. The space occupancy ratio is obtained by dividing the adjusted inventory parameter value by the corresponding remaining logistics space value of the warehouse node. The space occupancy ratio characterizes the proportion of logistics space occupied by that warehouse node under the current inventory adjustment demand. After calculating the space occupancy ratio for each warehouse node, the space occupancy ratios corresponding to all warehouse nodes are sequentially arranged using the warehouse node identifier as an index, and the warehouse node identifier and the corresponding space occupancy ratio are combined to form a set of node occupancy records. Subsequently, the set of node occupancy records is organized into a matrix according to the warehouse node number order, where the row index of the matrix corresponds to the warehouse node identifier, and the matrix element value is the space occupancy ratio of the corresponding warehouse node, thereby constructing a logistics space distribution matrix. The logistics space distribution matrix is ​​used to record the proportion of space occupied by each warehouse node under the current inventory adjustment demand conditions.

[0062] After obtaining the logistics spatial distribution matrix, a warehouse location mapping process is performed to generate a synchronous allocation scheme. Specifically, firstly, the space occupancy ratios corresponding to each warehouse node in the logistics spatial distribution matrix are read and sorted in ascending order of space occupancy ratios to obtain a space carrying capacity priority sequence for the warehouse nodes. Then, based on the space carrying capacity priority sequence, the replenishment quantities corresponding to the adjusted inventory parameters are allocated to each warehouse node sequentially, and the allocated quantities are mapped to the corresponding physical warehouse location codes according to the warehouse location number information in each node's database. After completing the allocation and warehouse location mapping, a synchronous allocation scheme is generated. The synchronous allocation scheme records the business identifier, warehouse node identifier, corresponding allocated quantity, and corresponding warehouse location mapping relationship for subsequent inventory resource allocation processing.

[0063] In step S17, inventory resources are allocated according to the synchronization allocation scheme to obtain inventory configuration results, and the system status is updated according to the inventory configuration results to obtain the updated inventory status, including: Based on the synchronous allocation scheme, extract the business identifier, allocation quantity, and storage location mapping relationship to obtain the allocation instruction set; According to the allocation instruction set, the preset inventory management database is processed to perform inventory pre-occupancy locking to obtain pre-occupancy locking records. Then, according to the pre-occupancy locking records, the preset warehouse node database of each warehouse node is processed to perform inventory write operation to obtain node write confirmation information. The transaction is committed based on the confirmation information written by the node to obtain the inventory configuration result. The system status is then synchronized and updated based on the inventory configuration result to obtain the updated inventory status.

[0064] It should be noted that the data structure of the synchronous allocation scheme includes a business identifier field and a warehouse node allocation list field. The warehouse node allocation list field is an array structure, and the array elements contain the warehouse node identifier, allocation quantity, and storage location mapping relationship. By extracting the business identifier, traversing the warehouse node allocation list field, and splitting the array elements to obtain the allocation sub-items corresponding to each warehouse node, the business identifier is bound to the warehouse node identifier, allocation quantity, and storage location mapping relationship in each allocation sub-item to generate the allocation instructions corresponding to each warehouse node. All allocation instructions are arranged and combined according to the order of the warehouse node identifiers to form an allocation instruction set.

[0065] Specifically, the system reads the available inventory quantity of the target product from the preset inventory management database, calculates the cumulative value of the allocated quantities at each warehouse node to obtain the total allocation demand quantity, and compares the available inventory quantity with the total allocation demand quantity. When the available inventory quantity is greater than or equal to the total allocation demand quantity, the allocation condition is met, a pre-reservation locking operation is performed on the total allocation demand quantity, a pre-reservation locking record is created in the preset inventory management database, the status of the corresponding quantity of available inventory is marked as "pre-reserved", and the pre-reservation transaction identifier is recorded.

[0066] After obtaining the pre-reservation lock record, an inventory write operation is performed on the preset warehouse node database of each warehouse node based on the pre-reservation lock record. Specifically, according to the warehouse node identifier in the allocation instruction set, an inventory write request is sent to the preset warehouse node database corresponding to each warehouse node. The inventory write request includes the pre-reservation transaction identifier, the target business identifier, the allocated quantity, and the storage location mapping relationship. Each warehouse node writes the allocated quantity into the corresponding storage location inventory record according to the storage location mapping relationship, updates the storage location occupancy status, and returns node write confirmation information.

[0067] The transaction commit process is executed based on the node write confirmation information. When the node write confirmation information of all warehouse nodes indicates successful writing, the pre-reservation lock record in the preset inventory management database is updated to the "deducted" status according to the pre-reservation transaction identifier, the available inventory quantity is deducted synchronously, and the inventory transaction log is recorded to obtain the inventory configuration result; when the node write confirmation information of any warehouse node indicates that the writing has failed, the transaction is rolled back, the pre-reservation lock in the preset inventory management database is released, the available inventory status is restored, and an inventory rollback instruction is sent to the warehouse nodes that have successfully written, deleting the written inventory record and restoring the storage location occupancy status to vacant.

[0068] It should be noted that the inventory configuration result is written to the message queue, the inventory data in the preset cache database is updated synchronously, and an updated inventory status record is generated. The updated inventory status record includes the inventory configuration result, message queue delivery status, and cache synchronization status, which are used to indicate that the inventory resource allocation process is complete and the consistency of the status of various system components.

[0069] In step S18, inventory demand matching detection is performed based on the updated inventory status to obtain a detection deviation value. When the detection deviation value exceeds a preset deviation threshold, parameter backtracking correction is performed on the adjusted inventory parameters to obtain the final inventory status, including: Read the current inventory data based on the updated inventory status, obtain the corresponding demand forecast data, perform deviation quantification calculation on the current inventory data and the demand forecast data, and obtain the inventory demand deviation rate. The weighted absolute percentage deviation is calculated based on the inventory demand deviation rate to obtain the detection deviation value, and the detection deviation value is compared with the preset deviation threshold to obtain the deviation comparison result. When the deviation comparison result exceeds the preset deviation threshold, the correction increment of the adjusted inventory parameter is calculated based on the inventory demand deviation rate to obtain the corrected inventory parameter; The updated synchronous allocation scheme is regenerated based on the corrected inventory parameters. The updated synchronous allocation scheme is executed and iterated. The number of iterations is counted. When the number of iterations reaches a preset upper limit or the detection deviation value during the iteration process converges to a preset tolerance range, the final inventory status is obtained.

[0070] It should be noted that reading the current inventory data based on the updated inventory status is achieved by parsing the cache synchronization status field in the updated inventory status record. When the cache synchronization status is "successful," a current inventory query request is sent to the preset inventory management database to obtain the current available inventory quantity of the target product, forming the current inventory data. The current inventory data is then matched and aligned with the demand forecast data according to the target business identifier and time period to establish an inventory-demand data pair.

[0071] After obtaining the inventory-demand data pair, the deviation between the current inventory data and the demand forecast data is quantified and calculated to obtain the inventory-demand deviation rate. Specifically, the absolute difference between the current available inventory quantity and the forecasted demand quantity is calculated, and the absolute difference is divided by the forecasted demand quantity to obtain the inventory-demand deviation rate. The formula for calculating the inventory-demand deviation rate is: in, Indicates the current available inventory quantity. This indicates the predicted demand. It also records the direction of deviation, when... The time mark is a positive deviation, when The time mark is a negative deviation.

[0072] Specifically, a historical inventory deviation sample set of the target product's category is obtained. Based on this sample set, business loss weights are calculated for various deviation directions. The inventory demand deviation rate is multiplied by the corresponding business loss weight to obtain a weighted deviation value. The weighted deviation values ​​of all products within the monitoring scope are summed and divided by the total number of products to obtain the weighted absolute percentage deviation, which is used as the detection deviation value. The preset deviation threshold is determined based on the stable state statistics in historical inventory control records, taking the 95th percentile of the historical weighted absolute percentage deviation distribution. After obtaining the detection deviation value, it is compared with the preset deviation threshold. When the detection deviation value is less than or equal to the preset deviation threshold, the current inventory state is marked as a stable inventory state, and the final equilibrium state is directly output.

[0073] When the detected deviation exceeds the preset deviation threshold, the correction increment of the adjusted inventory parameters is calculated based on the inventory demand deviation rate, resulting in the corrected inventory parameters. An incremental PID control algorithm is used to calculate the correction increment, which is then superimposed on the current adjusted inventory parameters to obtain the corrected inventory parameters. These parameters include the corrected safety stock level, the corrected reorder point, and the corrected replenishment batch limit. The proportional coefficient, integral coefficient, and derivative coefficient are determined through systematic identification of historical inventory control records.

[0074] Calculate a new inventory gap value based on the revised safety stock level and the current inventory balance. Adjust the inventory gap value according to the revised replenishment batch limit to obtain the target replenishment quantity. Generate a new synchronous allocation scheme according to the logistics space optimization processing method in step S16.

[0075] The inventory resource allocation iterative process is executed according to the new synchronous allocation scheme, that is, the inventory resource allocation process in step S17 is repeated to obtain the updated inventory configuration result and the updated inventory status, and the number of iterations is accumulated. The iteration termination conditions include the detection deviation value being less than or equal to the preset tolerance range, or the number of iterations reaching the preset upper limit. The preset tolerance range is determined based on the statistical distribution of deviation convergence to a stable state in historical inventory control records, taking the 90th percentile value of the historical detection deviation value convergence sequence. The preset upper limit is set according to the system response time requirements, and is usually set to 3 times.

[0076] When the iteration termination condition is met, the final inventory status is obtained. If the detected deviation value has converged to a preset tolerance range, the current inventory status is marked as a convergence equilibrium state, and the final inventory configuration result, the final adjusted inventory parameters, and the iteration convergence flag are output. If the number of iterations reaches a preset upper limit but the detected deviation value still has not converged, a manual intervention warning is triggered, the current inventory status is marked as a pending review state, and a downgrade allocation strategy is activated. The downgrade allocation strategy performs a fixed proportion of inventory replenishment based on a conservative estimate of the historical safety stock level. The pending review status and current parameter information are pushed to the operation terminal of the inventory management personnel, waiting for manual review and confirmation before being converted to a final equilibrium state or further adjustments are performed.

[0077] For example, the current available inventory quantity of target product SKU-TSHIRT-001 is read as 180 units, and the demand forecast data is obtained as 300 units. The calculated inventory demand deviation rate is 40%, and the deviation direction is identified as negative deviation. The historical inventory deviation sample set of the apparel category to which this product belongs is queried, and the business loss weight for negative deviation is calculated as 1.5, and the business loss weight for positive deviation is 1.0. Assuming that the monitoring scope includes 5 products, and the weighted deviation values ​​of each product are 0.60, 0.45, 0.30, 0.25, and 0.20 respectively, the sum is 2.80. Dividing this by the total number of products (5) yields a detection deviation value of 0.56, or 56%. The preset deviation threshold is set to 30%. If the detection deviation value of 56% exceeds the preset deviation threshold, the parameter backtracking correction process is initiated.

[0078] The historical inventory demand deviation rate sequence is read, where the deviation rate at the previous time step is 0.32 and the deviation rate at the current time step is 0.40. The proportional coefficient is determined to be 0.8, the integral coefficient to be 0.3, and the derivative coefficient to be 0.1 through system identification. Substituting these values ​​into the incremental PID control algorithm formula, the correction increment is calculated to be 0.185. The safety stock in the current adjusted inventory parameters is 200 units. After adding the correction increment, the corrected safety stock is 237 units. After boundary constraint checks, this value is within the preset reasonable range [100, 500]. Based on the corrected safety stock of 237 units and the current inventory balance of 180 units, the inventory gap is calculated to be 57 units. The upper limit of the corrected replenishment batch is 100 units. The inventory gap does not exceed the upper limit constraint, and the target replenishment quantity is determined to be 57 units. A new synchronous allocation scheme is generated, allocating 57 units to the North China warehouse node and mapping them to storage location C02. Iterative processing of inventory resource allocation is performed, with a cumulative iteration count of 1.

[0079] After the iteration is complete, the updated current available inventory quantity is read again, which is 237 units. The demand forecast data remains at 300 units. The new inventory demand deviation rate is calculated to be 21%. The weighted deviation value is 0.28, or 28%, which is less than the preset deviation threshold of 30%, thus meeting the convergence condition. The final inventory status is obtained, and the final inventory configuration result is output as 237 units. The safety stock quantity in the final adjusted inventory parameters is 237 units. The iteration convergence flag is "converged", and the number of iterations is 1.

[0080] In summary, this invention discloses a method for dynamic control of e-commerce inventory based on multi-source data. By integrating multi-source data and calculating dynamic weights, it achieves accurate identification of inventory risks and synchronous optimization of resource allocation, solving the technical problem of mismatch between existing inventory control schemes and actual business needs.

[0081] Reference Figure 2 The second embodiment of the present invention provides an e-commerce inventory dynamic control system based on multi-source data, comprising: The data acquisition module acquires historical business data and multi-source impact indicators, performs data cleaning based on the historical business data to obtain a cleaned data sequence, and performs external event labeling based on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records. The sequence partitioning module divides the cleaned data sequence into time intervals based on the historical impact records to obtain time series sub-intervals, and quantifies the contribution of the time series sub-intervals to obtain the factor contribution. The weight calculation module performs weight calculation based on the contribution of the factors to obtain the factor weight results, and performs weighted calculation on the multi-source influence indicators based on the factor weight results to obtain the real-time influence weights. The fluctuation analysis module calculates the sliding window difference based on the cleaned data sequence to obtain the business fluctuation index, and performs linear fusion processing on the business fluctuation index according to the real-time impact weight to obtain the comprehensive impact score. When the comprehensive impact score exceeds the preset risk threshold, a preliminary risk label is generated. The inventory monitoring module extracts the corresponding business identifier based on the preliminary risk identifier, obtains inventory balance data based on the business identifier, monitors demand fluctuations based on the inventory balance data, and determines the priority of inventory adjustment. The inventory adjustment module adjusts the inventory parameters according to the inventory adjustment priority to obtain the adjusted inventory parameters, and performs logistics space optimization processing based on the adjusted inventory parameters to obtain a synchronous allocation scheme. The resource allocation module allocates inventory resources according to the synchronization allocation scheme to obtain inventory configuration results, and updates the system status according to the inventory configuration results to obtain the updated inventory status. The backtracking correction module performs inventory demand matching detection based on the updated inventory status to obtain a detection deviation value. When the detection deviation value exceeds a preset deviation threshold, the adjusted inventory parameters are backtracked to obtain the final inventory status.

[0082] It should be noted that the e-commerce inventory dynamic control system based on multi-source data provided in this embodiment of the invention is used to execute all the process steps of the e-commerce inventory dynamic control method based on multi-source data in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0083] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0084] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for dynamic inventory control in e-commerce based on multi-source data, characterized in that, include: Acquire historical business data and multi-source impact indicators, perform data cleaning based on the historical business data to obtain a cleaned data sequence, and label external events based on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records; The cleaned data sequence is divided into time intervals based on the historical impact records to obtain time series sub-intervals, and the contribution is quantified based on the time series sub-intervals to obtain the factor contribution. The weights are calculated based on the contribution of the factors to obtain the factor weights, and the multi-source influence indicators are weighted based on the factor weights to obtain the real-time influence weights. The sliding window difference is calculated based on the cleaned data sequence to obtain the business fluctuation index. The business fluctuation index is then linearly fused based on the real-time impact weight to obtain a comprehensive impact score. When the comprehensive impact score exceeds a preset risk threshold, a preliminary risk identifier is generated. Based on the preliminary risk identification, the corresponding business identification is extracted, and the inventory balance data is obtained based on the business identification. Based on the inventory balance data, demand fluctuations are monitored to determine the priority of inventory adjustment. The inventory parameters are adjusted according to the inventory adjustment priority to obtain the adjusted inventory parameters, and the logistics space is optimized according to the adjusted inventory parameters to obtain a synchronous allocation scheme. The inventory resources are allocated according to the synchronous allocation scheme to obtain the inventory configuration result, and the system status is updated according to the inventory configuration result to obtain the updated inventory status. Based on the updated inventory status, inventory demand matching detection is performed to obtain a detection deviation value. When the detection deviation value exceeds a preset deviation threshold, the adjusted inventory parameters are backtracked and corrected to obtain the final inventory status.

2. The e-commerce inventory dynamic control method based on multi-source data according to claim 1, characterized in that, The process involves acquiring historical business data and multi-source impact indicators, cleaning the historical business data to obtain a cleaned data sequence, and labeling external events based on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records, including: Historical business data and multi-source impact indicators are acquired, outlier removal is performed on the historical business data to obtain outlier business data, and missing value imputation is performed on the outlier business data to obtain a cleaned data sequence. The cleaned data sequence is aligned with the multi-source impact indicators in the time dimension to obtain aligned data. Business numerical features and impact indicator features are extracted from the aligned data. The business numerical features and impact indicator features are concatenated according to time nodes to form feature vectors. All feature vectors are stacked vertically in time order to form a multi-dimensional feature matrix. Text semantic features are extracted from the multidimensional feature matrix, and positive and negative influence annotations are applied to the text semantic features based on a preset influence rule base to obtain an annotated feature set. Historical impact records are obtained by clustering based on the similarity between features in the labeled feature set.

3. The e-commerce inventory dynamic control method based on multi-source data according to claim 1, characterized in that, The process of dividing the cleaned data sequence into time intervals based on the historical impact records to obtain time series sub-intervals, and quantifying the contribution of each time series sub-interval to obtain the factor contribution, includes: The cleaned data sequence is divided into time intervals based on the event annotation information in the historical impact record to obtain time series sub-intervals; The magnitude of change in business data is calculated based on the time series sub-intervals, and the magnitude of change in influencing factors within the time series sub-intervals is statistically analyzed based on the historical impact records. The correlation coefficients are calculated based on the magnitude of change in the business data and the magnitude of change in the influencing factors, and the factor contribution of each influencing factor is determined based on the correlation coefficients.

4. The e-commerce inventory dynamic control method based on multi-source data according to claim 1, characterized in that, The step of calculating the weights based on the contribution of the factors to obtain the factor weights, and then weighting the multi-source influence indicators based on the factor weights to obtain the real-time influence weights, includes: The contribution values ​​of the factors are normalized to obtain standardized contribution values. Calculate the factor weights corresponding to each indicator in the multi-source influence index based on the standardized contribution values, and obtain the factor weight results; The factor weight results are mapped to the values ​​of each indicator in the multi-source influence indicators to obtain the indicator weight set. The real-time influence weight is obtained by weighting the set of indicator weights with the multi-source influence indicators.

5. The e-commerce inventory dynamic control method based on multi-source data according to claim 1, characterized in that, The process involves calculating the sliding window difference based on the cleaned data sequence to obtain a business fluctuation index, and then performing linear fusion processing on the business fluctuation index according to the real-time impact weight to obtain a comprehensive impact score. When the comprehensive impact score exceeds a preset risk threshold, a preliminary risk indicator is generated, including: The cleaned data sequence is divided into multiple cleaned data sub-sequences according to a preset sliding window length, and the difference between adjacent cleaned data sub-sequences is calculated to obtain the business data change sequence for the corresponding time interval. Calculate the business fluctuation index for each time interval based on the business data change sequence, and then perform a linear weighted calculation on the business fluctuation index and the real-time impact weight to obtain the comprehensive impact score; The comprehensive impact score is compared with a preset risk threshold. When the comprehensive impact score exceeds the preset risk threshold, a preliminary risk label is generated for the corresponding product.

6. The e-commerce inventory dynamic control method based on multi-source data according to claim 2, characterized in that, The process of extracting the corresponding business identifier based on the preliminary risk identifier, obtaining inventory balance data based on the business identifier, monitoring demand fluctuations based on the inventory balance data, and determining inventory adjustment priorities includes: Extract the business identifier from the preliminary risk identifier, and retrieve the inventory balance data from the preset inventory management database based on the business identifier; The inventory balance data is divided by the historical business data to obtain the inventory consumption rate. The mean drift detection is performed on the inventory consumption rate to obtain the degree of demand fluctuation. The degree of demand fluctuation and the inventory balance data are input into a preset risk matrix to obtain the inventory adjustment priority.

7. The e-commerce inventory dynamic control method based on multi-source data according to claim 6, characterized in that, The process of adjusting inventory parameters according to the inventory adjustment priority to obtain adjusted inventory parameters, and then performing logistics space optimization based on the adjusted inventory parameters to obtain a synchronous allocation scheme includes: The inventory adjustment level of the product corresponding to the business identifier is determined according to the inventory adjustment priority, and the inventory gap value is obtained by calculating the difference between the inventory balance data and the degree of demand fluctuation. The inventory gap value is adjusted proportionally according to the inventory adjustment level to obtain the adjusted inventory parameters; The database of preset warehouse nodes is retrieved based on the business identifier to obtain the remaining logistics space for each warehouse node. Based on the adjusted inventory parameters and the remaining logistics space, space occupancy is calculated to construct a logistics space distribution matrix; Based on the logistics spatial distribution matrix, perform inbound location mapping processing to generate a synchronous allocation scheme.

8. The e-commerce inventory dynamic control method based on multi-source data according to claim 6, characterized in that, The process of allocating inventory resources according to the synchronization allocation scheme to obtain inventory configuration results, and updating the system status based on the inventory configuration results to obtain the updated inventory status, includes: Based on the synchronous allocation scheme, extract the business identifier, allocation quantity, and storage location mapping relationship to obtain the allocation instruction set; According to the allocation instruction set, the preset inventory management database is processed to perform inventory pre-occupancy locking to obtain pre-occupancy locking records. Then, according to the pre-occupancy locking records, the preset warehouse node database of each warehouse node is processed to perform inventory write operation to obtain node write confirmation information. The transaction is committed based on the confirmation information written by the node to obtain the inventory configuration result. The system status is then synchronized and updated based on the inventory configuration result to obtain the updated inventory status.

9. The e-commerce inventory dynamic control method based on multi-source data according to claim 1, characterized in that, The step of performing inventory demand matching detection based on the updated inventory status to obtain a detection deviation value, and when the detection deviation value exceeds a preset deviation threshold, performing parameter backtracking correction on the adjusted inventory parameters to obtain the final inventory status, includes: Read the current inventory data based on the updated inventory status, obtain the corresponding demand forecast data, perform deviation quantification calculation on the current inventory data and the demand forecast data, and obtain the inventory demand deviation rate. The weighted absolute percentage deviation is calculated based on the inventory demand deviation rate to obtain the detection deviation value, and the detection deviation value is compared with the preset deviation threshold to obtain the deviation comparison result. When the deviation comparison result exceeds the preset deviation threshold, the correction increment of the adjusted inventory parameter is calculated based on the inventory demand deviation rate to obtain the corrected inventory parameter; The updated synchronous allocation scheme is regenerated based on the corrected inventory parameters. The updated synchronous allocation scheme is executed and iterated. The number of iterations is counted. When the number of iterations reaches a preset upper limit or the detection deviation value during the iteration process converges to a preset tolerance range, the final inventory status is obtained.

10. A dynamic inventory control system for e-commerce based on multi-source data, characterized in that, include: The data acquisition module acquires historical business data and multi-source impact indicators, performs data cleaning based on the historical business data to obtain a cleaned data sequence, and performs external event labeling based on the cleaned data sequence and the multi-source impact indicators to obtain historical impact records. The sequence partitioning module divides the cleaned data sequence into time intervals based on the historical impact records to obtain time series sub-intervals, and quantifies the contribution of the time series sub-intervals to obtain the factor contribution. The weight calculation module performs weight calculation based on the contribution of the factors to obtain the factor weight results, and performs weighted calculation on the multi-source influence indicators based on the factor weight results to obtain the real-time influence weights. The fluctuation analysis module calculates the sliding window difference based on the cleaned data sequence to obtain the business fluctuation index, and performs linear fusion processing on the business fluctuation index according to the real-time impact weight to obtain the comprehensive impact score. When the comprehensive impact score exceeds the preset risk threshold, a preliminary risk label is generated. The inventory monitoring module extracts the corresponding business identifier based on the preliminary risk identifier, obtains inventory balance data based on the business identifier, monitors demand fluctuations based on the inventory balance data, and determines the priority of inventory adjustment. The inventory adjustment module adjusts the inventory parameters according to the inventory adjustment priority to obtain the adjusted inventory parameters, and performs logistics space optimization processing based on the adjusted inventory parameters to obtain a synchronous allocation scheme. The resource allocation module allocates inventory resources according to the synchronization allocation scheme to obtain inventory configuration results, and updates the system status according to the inventory configuration results to obtain the updated inventory status. The backtracking correction module performs inventory demand matching detection based on the updated inventory status to obtain a detection deviation value. When the detection deviation value exceeds a preset deviation threshold, the adjusted inventory parameters are backtracked to obtain the final inventory status.