Inventory prediction method, system and equipment based on multi-source information and medium
By constructing a multi-source information inventory forecasting method, utilizing distributed storage and microservice architecture, and combining multi-dimensional feature analysis and time series forecasting algorithms, the method solves the problem of insufficient accuracy in traditional inventory forecasting methods, achieves accurate inventory forecasting and dynamic optimization, and improves the scientific nature and efficiency of inventory management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SHANDONG ELECTRIC POWER CO
- Filing Date
- 2025-12-01
- Publication Date
- 2026-05-08
AI Technical Summary
Traditional inventory forecasting methods rely on human experience and lack multi-dimensional analysis of influencing factors, resulting in large deviations between forecast results and actual demand. They are unable to effectively cope with complex market environments, leading to both inventory backlog and stockouts, which affect production schedules and increase costs.
A multi-source information inventory forecasting method is constructed. Through distributed storage and microservice architecture, multi-dimensional business data is collected, and multi-dimensional feature analysis and time series forecasting algorithms are used to establish an inventory time series forecasting model to achieve accurate forecasting and dynamic optimization.
It significantly improves the accuracy and timeliness of inventory forecasting, reduces the risk of inventory backlog and warehousing management costs, ensures timely supply of materials, and optimizes inventory management decisions.
Smart Images

Figure CN121997288A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent warehouse management technology, and more specifically relates to an inventory forecasting method, system, equipment and medium based on multi-source information. Background Technology
[0002] In current enterprise inventory management practices, traditional inventory forecasting methods mainly rely on the historical experience of managers or make decisions based on simple statistical models. This approach is overly dependent on subjective judgment, lacks a systematic analysis of multi-dimensional influencing factors, and struggles to accurately capture the dynamic fluctuations and seasonal patterns of market demand. Because it fails to adequately consider key factors such as investment plans and supply chain cycles, it often leads to significant discrepancies between forecasts and actual demand, resulting in the contradictory phenomenon of both inventory backlog and stockouts. This increases warehousing costs and disrupts normal production and operations.
[0003] Especially in the management of large-scale projects and critical materials, traditional inventory management models have revealed significant limitations. Because some key materials have long manufacturing cycles, relying solely on experience for procurement decisions often fails to effectively match the project's progress. This supply-demand mismatch can lead to untimely material delivery, directly delaying project schedules and impacting critical production progress. Conversely, adopting excessive pre-stocking strategies to avoid stockout risks can result in a series of derivative problems, such as excessive working capital occupation, increased complexity in warehouse management, and low inventory turnover efficiency.
[0004] While some existing information-based inventory management systems have achieved electronic data recording to a certain extent, their core forecasting models still largely rely on relatively simple statistical methods and lack in-depth integration and intelligent analysis of multi-source business data, such as investment plans, supply cycles, and inventory turnover. These systems struggle to establish accurate time-series forecasting models and cannot effectively adapt to complex and ever-changing market environments, resulting in insufficient flexibility and accuracy in inventory strategies. Summary of the Invention
[0005] To address the above problems, the present invention aims to provide an inventory forecasting method, system, device, and medium based on multi-source information. By constructing a time-series forecasting model that integrates multi-source data and combining it with distributed storage and microservice architecture, accurate forecasting, dynamic optimization, and efficient decision-making in inventory management are achieved.
[0006] To achieve the above objectives, the present invention employs the following technical solution: In a first aspect, embodiments of this application provide an inventory forecasting method based on multi-source information, including: Historical business data is collected through a preset data interface and stored in a distributed storage system with a storage-compute separation architecture. The historical business data is read from the distributed storage system, preprocessed to obtain regularized historical data, and the target material set is determined from the regularized historical data based on the material classification system. Based on the target material set and the corresponding well-organized historical data, key influencing factors are extracted through multi-dimensional feature analysis. Based on key influencing factors and regularized historical data, an inventory time-series forecasting model was constructed and trained using a time-series forecasting algorithm. The microservice API receives forecast requests and calls the inventory time-series forecasting model to perform forecast calculations based on the forecast requests. The prediction results are returned to the front-end interface for visualization.
[0007] In an optional implementation, the step of collecting historical business data through a preset data interface and storing the historical business data in a distributed storage system with a storage-compute separation architecture includes: Historical business data is collected from enterprise resource planning systems and warehouse management systems through a pre-defined standard data interface based on RESTful API and a JDBC data connector; the historical business data includes investment plan data, historical inventory data, and material inbound and outbound data. Hadoop HDFS is used as the distributed storage system. The NameNode node uniformly manages the file system's namespace and metadata, as well as the mapping relationship between files and data blocks and the location information of data blocks. The distributed storage system includes a metadata server, a storage server, and a load balancer server. The collected historical business data is divided into multiple data blocks according to the preset block division rules, a unique identifier is generated for each data block, and the mapping relationship between the block identifier and the storage location is recorded in the metadata server; The data block is replicated into multiple data replicas according to a preset number of replicas, and these data replicas are distributed and stored on different storage server nodes to form a storage resource pool; Based on the mapping relationship in the metadata server, the load balancer routes data access requests to the corresponding storage server nodes, while dynamically monitoring the load of each node and adjusting the data distribution.
[0008] In an optional implementation, the step of reading the historical business data from the distributed storage system, preprocessing the historical business data to obtain regularized historical data, and determining the target material set from the regularized historical data based on the material classification system includes: Based on preset query conditions, historical business data is read from the distributed storage system through the data access interface, and the read data is verified for integrity and format. The verified historical business data is processed sequentially for missing value handling, outlier detection and correction, and data format standardization to generate well-organized historical data with a unified spatiotemporal dimension. Based on a pre-defined material classification system, materials in the regularized historical data are classified hierarchically into major, medium, and minor categories. The K-means clustering algorithm is used to identify material groups with similar inventory characteristics using the material's inventory turnover rate, average inventory level, and seasonal fluctuation coefficient as clustering feature vectors. The target material set is determined from the material groups based on the pre-defined clustering feature vector threshold. The major categories include power distribution equipment, cables, and switchgear; the medium categories include prefabricated substations, ring main units, power cables, and control cables; and the minor categories include the voltage levels and specifications of the medium categories.
[0009] In an optional implementation, the step of extracting key influencing factors based on the target material set and corresponding regularized historical data through multidimensional feature analysis includes: Extract investment plan data, historical inventory data, and material entry and exit data related to the target material set from the organized historical data. The investment plan data includes the investment amount and execution time, the historical inventory data includes the inventory quantity and inventory value, and the material entry and exit data includes the entry and exit time and quantity. Based on the extracted data, the investment plan ratio is generated by calculating the ratio of the current investment amount to the total investment amount, the production supply lead time is generated by calculating the difference between the purchase order creation time and the warehousing time, and the inventory turnover rate is generated by calculating the ratio of the outbound cost to the average inventory cost, which serve as characteristic factors. The Pearson correlation coefficient analysis method was used to calculate the correlation coefficient between each characteristic factor and the change in inventory, and the characteristic factors with an absolute value of the correlation coefficient greater than the preset threshold were selected as key influencing factors.
[0010] In an optional implementation, the step of constructing and training an inventory time-series forecasting model based on key influencing factors and regularized historical data using a time-series forecasting algorithm includes: The inventory amount in the regularized historical data is used as the target time series, and the key influencing factors are used as the exogenous variable series. They are aligned and reorganized according to the preset time granularity to form the model training dataset. Based on the data characteristics, either the ARIMA model or the LSTM neural network model is selected to construct an inventory time series forecasting model. When the ARIMA model is selected, the autoregressive order p, the differencing order d, and the moving average order q of the model are determined through autocorrelation plots and partial autocorrelation plots. When the LSTM model is selected, a network structure containing an input layer, an LSTM hidden layer, and an output layer is constructed. The model training dataset is divided into a training set and a validation set in chronological order. The parameters of the inventory time-series prediction model are trained using the training set. If the inventory time-series prediction model uses the ARIMA model, the maximum likelihood estimation method is used for parameter estimation. If the inventory time-series prediction model uses the LSTM model, the backpropagation algorithm is used and the mean squared error between the predicted and the true values is used as the loss function for optimization. The model performance is evaluated on the validation set using a rolling prediction method, and the model hyperparameters are optimized using a grid search method. Select the inventory time-series forecasting model parameter configuration that minimizes the root mean square error on the validation set as the final model, and save the model structure and parameters.
[0011] In an optional implementation, the step of receiving a prediction request via a microservice API and invoking an inventory time-series prediction model to perform prediction calculations based on the prediction request includes: The prediction request is received through a microservice API gateway based on the Spring Cloud framework. The prediction request includes JSON format data of the prediction date, material code and plant information. The forecast request is parsed and the data validity is verified to ensure that the forecast date is within the valid range, the material code exists in the target material set, and the factory information has the required access permissions; after the verification is successful, the request parameters are generated. Based on the request parameters, the corresponding regularized historical data and key influencing factors are queried from the distributed storage system, and the queried data is standardized according to the input requirements of the inventory time series prediction model to generate model input data containing time series window data and corresponding key influencing factor values. Load the inventory time-series forecasting model, input the model input data into the model for forward calculation, and generate forecast result data including current inventory amount, expected consumption amount, expected consumption amount, and expected current period inventory amount.
[0012] In an optional implementation, returning the prediction calculation results to the front-end interface for visualization includes: The prediction results data are encapsulated according to a preset JSON data format; The encapsulated prediction results data are returned to the front-end interface via the microservice API; On the front-end interface, based on the Vue.js framework and ElementUI component library, the ECharts chart library is used to visualize and render the encapsulated prediction results, generating a comprehensive display interface that includes inventory trend charts, amount comparison charts, and detailed data tables. The comprehensive display interface provides interactive functions such as data drill-down, time range filtering, and multi-dimensional comparison, and supports users to trigger new prediction requests through interface operations.
[0013] Secondly, embodiments of this application also provide an inventory forecasting system based on multi-source information, including: The data acquisition and storage module is used to collect historical business data through a preset data interface and store the historical business data in a distributed storage system with a storage-compute separation architecture. The data preprocessing and target determination module is used to read the historical business data from the distributed storage system, preprocess the historical business data to obtain regularized historical data, and determine the target material set from the regularized historical data based on the material classification system. The feature analysis and factor extraction module is used to extract key influencing factors based on the target material set and its corresponding regularized historical data through multidimensional feature analysis. The model building and training module is used to build and train an inventory time-series forecasting model based on key influencing factors and regularized historical data, using a time-series forecasting algorithm. The forecasting calculation module is used to receive forecasting requests through the microservice API and call the inventory time-series forecasting model to perform forecasting calculations based on the forecasting requests. The prediction result feedback and display module is used to return the prediction calculation results to the front-end interface for visualization.
[0014] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the inventory forecasting method based on multi-source information as described in any of the above.
[0015] Fourthly, embodiments of this application also provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the inventory forecasting method based on multi-source information as described in any of the above claims.
[0016] As can be seen from the above technical solutions, the present invention has the following advantages: The inventory forecasting method based on multi-source information provided in this application integrates multi-source business data such as investment plans, historical inventory, and inbound / outbound records. It employs a distributed storage architecture with storage-compute separation and microservice technology to construct an intelligent time-series forecasting model based on material subcategories, achieving accurate forecasting of inventory value and demand. This application effectively overcomes the limitations of traditional manual experience-based decision-making, significantly improving the accuracy and timeliness of inventory forecasting. It can ensure timely supply of materials while reducing the risk of inventory backlog and warehousing management costs, providing reliable technical support for scientific decision-making in enterprise inventory management.
[0017] This application establishes a comprehensive data analysis foundation by integrating multi-dimensional business information such as investment plans, historical inventory data, and material inbound / outbound records. Employing a time-series forecasting model based on material subcategories, it accurately captures the inventory change patterns of different materials and effectively identifies complex characteristics such as seasonal fluctuations and cyclical changes. Compared to traditional forecasting methods relying on manual experience or single historical data, this application significantly reduces biases caused by subjective judgment, making forecast results closer to actual business needs and providing scientific and reliable data support for inventory management decisions.
[0018] This application adopts a distributed storage architecture with storage and compute separation, enabling independent management and elastic scaling of data storage and computing resources. Through distributed data storage and load balancing technologies, it can efficiently process massive amounts of historical business data, supporting concurrent access by multiple users and real-time predictive computation. This architecture not only improves data processing capabilities but also significantly shortens the prediction response time, ensuring stable and efficient operation in complex business scenarios.
[0019] This application establishes a comprehensive material classification system, identifying material groups with similar inventory characteristics through scientific cluster analysis. Based on multi-level classification of materials into major, medium, and minor categories, and combined with key indicators such as inventory turnover rate and average inventory level, it achieves accurate classification and characteristic analysis of inventory materials. This approach enables enterprises to formulate differentiated inventory strategies based on the characteristics of different material groups, effectively improving the targeting and effectiveness of inventory management.
[0020] This application effectively balances the relationship between ensuring material supply and controlling inventory costs through precise inventory forecasting and scientific inventory control strategies. Accurate forecasting helps companies optimize their procurement plans and inventory levels, avoiding both the risk of production disruptions due to insufficient inventory and the pressure of capital tied up and warehousing costs caused by excessive inventory. This refined inventory management approach significantly improves the efficiency of capital utilization and supply chain operations for enterprises. Attached Figure Description
[0021] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart illustrating the inventory forecasting method based on multi-source information provided in this application.
[0023] Figure 2 A schematic diagram of the structure of the inventory forecasting system based on multi-source information provided in this application.
[0024] Figure 3 A schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0025] Various embodiments of this disclosure will be described more fully in the detailed steps of the inventory forecasting method based on multi-source information described below. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.
[0026] In the following, the terms “comprising” or “may include”, which may be used in various embodiments of this disclosure, indicate the presence of the disclosed functions, operations, or elements, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in various embodiments of this disclosure, the terms “comprising,” “having,” and their cognates are intended only to indicate a particular feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or the possibility of adding one or more combinations of the foregoing.
[0027] 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.
[0028] Please see Figure 1 The diagram shows a flowchart of an inventory forecasting method based on multi-source information in a specific embodiment. The method includes: S1: Collect historical business data through a preset data interface and store the historical business data in a distributed storage system with a storage-compute separation architecture.
[0029] In a specific implementation, firstly, comprehensive collection of multi-source business data is achieved by constructing a multi-layered data acquisition channel. Specifically, a standard data interface based on a RESTful API is used to collect investment plan data for the past 5 years from the Oracle database of the enterprise ERP system, including detailed information such as project number, investment amount, planned execution time, required material list and its quantity; simultaneously, historical inventory data for the past 5 years is collected from the MySQL database of the WMS system through a JDBC data connector, including fields such as material code, inventory quantity, inventory amount, storage location information and inventory timestamp; in addition, material inbound and outbound flow data for the past 5 years is collected in real time through the message queue Kafka, including complete business information such as transaction number, material code, inbound / outbound type, quantity, timestamp and associated business document number.
[0030] Then, a distributed storage system is built using Hadoop HDFS. The NameNode node manages the file system's namespace and metadata, including the mapping relationship between files and data blocks and the location information of the data blocks. In specific implementation, the collected business data is divided according to a preset 128MB sharding rule. A unique identifier based on the MD5 algorithm is generated for each data block, and the mapping relationship between the block identifier and the storage location is recorded in the metadata server maintained by the ZooKeeper coordination service.
[0031] Next, a data replica distribution and storage mechanism is implemented. Data shards are replicated to a preset number of three replicas, using a rack-aware replica placement strategy to distribute replicas across DataNode nodes in different racks. For example, the first replica is stored on a local rack node, the second replica is stored on a node in a different rack, and the third replica is stored on a different node in the same rack as the second replica, thus ensuring data reliability and access efficiency.
[0032] Finally, a data access and load balancing mechanism is established. Data access requests are received by the load balancing server, which routes the requests to the corresponding storage server nodes based on the mapping relationships provided by the metadata server. Simultaneously, load metrics such as disk utilization and network bandwidth of each storage node are dynamically monitored. When the disk utilization of a node exceeds 85%, a data shard migration operation is automatically triggered, achieving dynamic rebalancing of storage resources.
[0033] S2: Read the historical business data from the distributed storage system, preprocess the historical business data to obtain regularized historical data, and determine the target material set from the regularized historical data based on the material classification system.
[0034] In a specific implementation, the first step is to implement a data acquisition and verification process. Based on preset query conditions, historical business data is read from the distributed storage system through the HDFS data access interface, and the read data is then subjected to integrity and format verification. Specifically, this includes checking the integrity of data records to ensure that the time series is unbroken; verifying the standardization of data formats, including consistent date formats and correct numerical data formats; and checking the logical consistency of data, such as the matching relationship between inbound and outbound quantities and inventory changes.
[0035] Next, data cleaning and normalization operations are performed. For the verified historical business data, missing value processing is performed sequentially, using Lagrange interpolation to fill in missing inventory data; outlier detection and correction are implemented, identifying and removing abnormal inbound and outbound records based on the 3σ principle; data format standardization is performed, using one-hot encoding for categorical variables and converting continuous numerical data to the [0,1] interval using the maximum-minimum normalization method; finally, using days as the smallest time unit, forward imputation is used to fill in missing time points, generating normalized historical data with a unified spatiotemporal dimension.
[0036] Next, target material screening and analysis were conducted. Based on a pre-defined material classification system, materials in the organized historical data were hierarchically classified into major, intermediate, and minor categories. Major categories included power distribution equipment, cables, and switchgear; intermediate categories included prefabricated substations, ring main units, power cables, and control cables; and minor categories included voltage levels and specifications. The K-means clustering algorithm was used, with inventory turnover rate, average inventory level, and seasonal fluctuation coefficient as cluster feature vectors. The optimal number of clusters was determined using the silhouette coefficient method to identify material groups with similar inventory characteristics.
[0037] Finally, the target material set was determined based on preset screening criteria. The criteria for similar inventory included an inventory turnover rate difference of no more than 20%, a seasonal fluctuation pattern similarity greater than 85%, and inventory levels within the same order of magnitude. Additionally, the materials were required to appear in investment plans more than 60% of the time, rank in the top 80% of average consumption over the past three years, and have supply stability indicators higher than preset thresholds. Through multi-dimensional screening, a target material set of 6015 items across 8 categories, including prefabricated substations and low-voltage power cables, was ultimately determined.
[0038] S3: Based on the target material set and the corresponding well-organized historical data, extract key influencing factors through multidimensional feature analysis.
[0039] In the specific implementation, the first step is data extraction and preparation. Multi-source data related to the target material set is extracted from the organized historical data, including project investment amounts and execution timelines from investment plan data, daily inventory quantities and value changes from historical inventory data, and detailed inbound and outbound times, quantities, and related business information from material inbound and outbound data. This ensures that the extracted data covers a complete business cycle of nearly five years, providing a sufficient data foundation for subsequent feature analysis.
[0040] Next, characteristic factors are calculated. Based on the extracted data, multiple characteristic factors are calculated using professional statistical methods: the investment plan ratio is calculated as a percentage of the investment budget amount for a single material during the planning period to the total investment budget amount for that material category; the production supply lead time is estimated by taking the moving average of the time difference between the creation and acceptance of historical purchase orders; and the inventory turnover rate is calculated as the ratio of the cost of outbound materials to the average inventory cost during the same period, using a weighted average method to eliminate the impact of seasonal fluctuations. Other auxiliary characteristic factors, such as inventory consumption rate and safety stock level, are also calculated simultaneously.
[0041] Next, multidimensional feature analysis was conducted. Simulation analysis and cross-validation were performed on the calculated feature factors across the major, intermediate, and minor categories of materials. Principal component analysis was used to reduce the dimensionality of the feature factors. First, the Pearson correlation coefficient between each factor and inventory level was calculated. Then, factors with a cumulative contribution rate exceeding 85% were selected as candidate key influencing factors based on their importance ranking. For example, the analysis revealed a correlation coefficient of 0.67 between the proportion of investment plans and inventory changes, 0.52 between production supply lead time and inventory level, and 0.71 between inventory turnover rate and inventory changes.
[0042] Finally, key influencing factors were identified. Based on the multidimensional analysis results, characteristic factors with absolute correlation coefficients greater than a preset threshold of 0.5 were selected as key influencing factors. The variance inflation factor method was used to test for multicollinearity among the factors, ensuring that the three key influencing factors—investment plan proportion, production supply lead time, and inventory turnover rate—have independent explanatory power. Simultaneously, a regular update mechanism for key influencing factors was established to ensure they can adapt to changes in the business environment.
[0043] S4: Based on key influencing factors and regularized historical data, a time series forecasting model for inventory is constructed and trained using a time series forecasting algorithm.
[0044] In the specific implementation, the first step is data preparation and preprocessing. Inventory amount data from the regularized historical data is used as the target time series, and key influencing factors (investment plan ratio, production supply lead time, and inventory turnover rate) are used as exogenous variable sequences, aligned and reorganized at a daily time granularity. A sliding window method is used to construct the model training dataset, using historical data from the past 30 days, including inventory amount sequences and key influencing factor values, as input features, and the inventory amount for the next 7 days as the prediction target, forming a complete supervised learning sample set.
[0045] Next, model selection and construction are implemented. Appropriate time series forecasting algorithms are selected based on the data feature analysis results. When the data exhibits clear linear characteristics and stationarity, the ARIMA model is used, and the autoregressive order p, differencing order d, and moving average order q are determined through autocorrelation and partial autocorrelation plots. Specifically, the stationarity of the sequence is judged using the ADF test, necessary differencing operations are performed, and the optimal parameter combination is determined according to the AIC criterion. When the data exhibits complex nonlinear characteristics, an LSTM neural network model is used, constructing a network structure including an input layer, two LSTM hidden layers (64 and 32 neurons respectively), a dropout layer (dropout rate 0.2), and a fully connected layer.
[0046] Next, model training and validation were performed. The model training dataset was divided into training, validation, and test sets in a 7:2:1 ratio. For the ARIMA model, maximum likelihood estimation was used for parameter estimation, and residual analysis was used to verify the model's fit. For the LSTM model, backpropagation was used for training, with the mean squared error between predicted and true values used as the loss function. The Adam optimizer was used for parameter optimization, with a learning rate of 0.001 and a batch size of 32. Rolling prediction was used to evaluate model performance on the validation set, and a grid search method was used to optimize model hyperparameters. Early stopping was implemented to prevent overfitting.
[0047] Finally, the model is finalized and deployed. The model parameter configuration with the smallest root mean square error on the validation set is selected as the final model, and the complete model structure and parameters are saved. A model performance monitoring mechanism is established, and the model is retrained regularly using the latest business data to ensure its continued effectiveness. The finalized inventory time-series forecasting model is deployed to the model server, providing service support for subsequent forecast calculations through standardized interfaces.
[0048] S5: Receives forecast requests via the microservice API and calls the inventory time-series forecasting model to perform forecast calculations based on the forecast requests.
[0049] In the specific implementation, firstly, a prediction request receiving mechanism is established. Prediction requests are received through a microservice API gateway based on the Spring Cloud framework. The request data is transmitted in JSON format and includes necessary parameters such as the prediction date, material code, and factory information. The microservice architecture uses a Eureka server for service registration and discovery, a Ribbon component for client-side load balancing, and a Hystrix component for service circuit breaker protection to ensure stable system operation under high concurrency scenarios.
[0050] Next, request parsing and verification are performed. Parameters of the received forecast request are parsed, checking if the forecast date is within the model's validity period, if the material code exists in the target material set, and if the plant information has the necessary access permissions. The verification process employs a multi-layered validation mechanism: first, format validation is performed to ensure the data format conforms to specifications; then, logical validation is performed to verify the rationality of the parameter combinations; finally, permission validation is performed to confirm that the user has access permissions to the requested data. For requests that fail verification, specific error messages and correction suggestions are immediately returned.
[0051] Next, data preparation and processing are performed. Based on the validated request parameters, the corresponding standardized historical data and key influencing factors are queried from the distributed storage system. A multi-level caching strategy is employed for data querying, prioritizing data retrieval from the Redis cache, and only querying the HDFS storage system if a cache miss occurs. The retrieved data is then standardized according to the input requirements of the inventory time-series forecasting model, including data format unification, numerical normalization, and time series alignment, generating model input data containing time-series window data and corresponding key influencing factor values.
[0052] Finally, model invocation and computation are performed. A pre-trained inventory time-series prediction model is loaded via TensorFlow Serving, and pre-processed model input data is fed into the model for forward computation. The computation process uses batch processing, supporting concurrent processing of multiple prediction requests, and GPU acceleration improves computational efficiency. Complete prediction results are generated, including current inventory value, estimated inbound consumption value, estimated consumption value, and estimated current period inventory value. The results are then validated for reasonableness to ensure they align with business logic.
[0053] S6: Return the prediction calculation results to the front-end interface for visualization.
[0054] In a specific implementation, the first step is to encapsulate the prediction results. The structured data obtained from the prediction calculation is standardized and encapsulated according to a preset JSON data format. The encapsulation format includes three layers: the status code layer contains system information such as request processing status and error codes; the metadata layer contains descriptive information such as prediction timestamp, data version, and data source; and the data body layer contains the specific prediction result data, including detailed values and confidence intervals for the current inventory amount, the expected amount of inventory consumed, the expected amount consumed, and the expected inventory amount for the current period.
[0055] Next, a data transmission channel is established. The encapsulated prediction results are returned to the front-end interface via a Spring Cloud-based microservice API. Sensitive data is encrypted using national cryptographic algorithms during data transmission to ensure data security. Simultaneously, data transmission optimization is implemented: a paginated transmission strategy is used for large volumes of prediction results, transmitting summary data initially and loading detailed data on demand to improve interface response speed.
[0056] Next, the visualization rendering is implemented. The front-end interface is based on the Vue.js framework and the ElementUI component library, and uses the ECharts chart library to perform multi-dimensional visualization rendering of the prediction results. The inventory trend chart uses a line chart to display the historical and predicted inventory value change trends, using different colors to distinguish between actual and predicted values; the amount comparison chart uses a stacked bar chart to compare and display the composition of the current inventory value, the expected consumption of inbound inventory value, the expected consumption value, and the expected current period inventory value; the detailed data table displays detailed numerical information in a paginated table format, supporting sorting by indicators such as amount size and change rate.
[0057] Finally, interactive analysis functions are provided. The comprehensive display interface offers rich data interaction features: data drill-down allows users to click on chart elements to view detailed data; time range filtering allows viewing forecast results at different granularities such as day, week, and month; multi-dimensional comparison function supports comparative analysis of inventory status for different materials and factories. Simultaneously, the interface provides a forecast result export function, supporting multiple formats such as Excel and PDF, facilitating offline analysis and report writing. All interactive operations exchange data with the backend system asynchronously, ensuring smooth interface response.
[0058] In this embodiment, by constructing a multi-source data acquisition and distributed storage system, the complete integration and efficient management of inventory business data are achieved; by leveraging intelligent clustering algorithms and multi-dimensional feature analysis, key influencing factors of inventory are accurately identified; a dynamic prediction mechanism is established using a time-series prediction model, significantly improving the accuracy of inventory prediction; and by combining a microservice architecture and a visualization platform, a complete technical closed loop from data acquisition and intelligent analysis to decision support is formed, effectively solving problems such as inaccurate prediction, delayed response, and unreasonable resource allocation in traditional inventory management, and comprehensively improving the level of inventory management and the efficiency of supply chain operation.
[0059] like Figure 2 As shown, the following are embodiments of the inventory forecasting system based on multi-source information provided in this disclosure. This system and the inventory forecasting method based on multi-source information in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the inventory forecasting system based on multi-source information, please refer to the embodiments of the inventory forecasting method based on multi-source information described above.
[0060] An inventory forecasting system based on multi-source information includes: The data acquisition and storage module is used to collect historical business data through a preset data interface and store the historical business data in a distributed storage system with a storage-compute separation architecture.
[0061] The data preprocessing and target determination module is used to read the historical business data from the distributed storage system, preprocess the historical business data to obtain regularized historical data, and determine the target material set from the regularized historical data based on the material classification system.
[0062] The feature analysis and factor extraction module is used to extract key influencing factors based on the target material set and its corresponding regularized historical data through multidimensional feature analysis.
[0063] The model building and training module is used to build and train an inventory time series forecasting model based on key influencing factors and regularized historical data, using a time series forecasting algorithm.
[0064] The forecasting calculation module is used to receive forecasting requests through the microservice API and, based on the forecasting requests, call the inventory time-series forecasting model to perform forecasting calculations.
[0065] The prediction result feedback and display module is used to return the prediction calculation results to the front-end interface for visualization.
[0066] The inventory forecasting system based on multi-source information provided in this embodiment integrates multi-source business data such as investment plans, historical inventory, and inbound / outbound records to construct a time-series forecasting model based on material classification. By adopting a distributed storage and microservice architecture, it achieves accurate forecasting and dynamic optimization of inventory demand, effectively improving forecast accuracy, system response speed, and management sophistication. While ensuring timely supply of materials, it significantly reduces the risk of inventory backlog and operating costs.
[0067] Figure 3 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0068] The inventory forecasting method based on multi-source information provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the electronic device includes, but is not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0069] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.
[0070] A processor may include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0071] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0072] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.
[0073] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.
[0074] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0075] Wireless communication functionality in electronic devices can be achieved through antennas, wireless communication modules, modem processors, and baseband processors.
[0076] Wireless communication modules can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
[0077] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.
[0078] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.
[0079] Electronic devices can achieve display functions through GPUs, displays, and application processors.
[0080] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0081] A display screen is used to display images, videos, etc. A display screen includes a display panel.
[0082] The aforementioned electronic device realizes the inventory forecasting method based on multi-source information of this application. By constructing a time-series forecasting model that integrates multi-source data and adopting a distributed architecture, it achieves the beneficial effects of improving inventory forecasting accuracy, optimizing inventory levels, reducing operating costs, enhancing system efficiency, and ensuring the supply of materials.
[0083] The storage medium provided in this application stores a program product capable of implementing an inventory forecasting method based on multi-source information.
[0084] Inventory forecasting methods based on multi-source information include: Historical business data is collected through a preset data interface and stored in a distributed storage system with a storage-compute separation architecture. The historical business data is read from the distributed storage system, preprocessed to obtain regularized historical data, and the target material set is determined from the regularized historical data based on the material classification system. Based on the target material set and the corresponding well-organized historical data, key influencing factors are extracted through multi-dimensional feature analysis. Based on key influencing factors and regularized historical data, an inventory time-series forecasting model was constructed and trained using a time-series forecasting algorithm. The microservice API receives forecast requests and calls the inventory time-series forecasting model to perform forecast calculations based on the forecast requests. The prediction results are returned to the front-end interface for visualization. In some possible implementations, the inventory forecasting method based on multi-source information of this disclosure can be implemented as a program product that includes program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.
[0085] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0086] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An inventory forecasting method based on multi-source information, characterized in that, include: Historical business data is collected through a preset data interface and stored in a distributed storage system with a storage-compute separation architecture. The historical business data is read from the distributed storage system, preprocessed to obtain regularized historical data, and the target material set is determined from the regularized historical data based on the material classification system. Based on the target material set and the corresponding well-organized historical data, key influencing factors are extracted through multi-dimensional feature analysis. Based on key influencing factors and regularized historical data, an inventory time-series forecasting model was constructed and trained using a time-series forecasting algorithm. The microservice API receives forecast requests and calls the inventory time-series forecasting model to perform forecast calculations based on the forecast requests. The prediction results are returned to the front-end interface for visualization.
2. The inventory forecasting method based on multi-source information according to claim 1, characterized in that, The step of collecting historical business data through a preset data interface and storing the historical business data in a distributed storage system with a storage-compute separation architecture includes: Historical business data is collected from enterprise resource planning systems and warehouse management systems through a pre-defined standard data interface based on RESTful API and a JDBC data connector; the historical business data includes investment plan data, historical inventory data, and material inbound and outbound data. Hadoop HDFS is used as the distributed storage system. The NameNode node uniformly manages the file system's namespace and metadata, as well as the mapping relationship between files and data blocks and the location information of data blocks. The distributed storage system includes a metadata server, a storage server, and a load balancer server. The collected historical business data is divided into multiple data blocks according to the preset block division rules, a unique identifier is generated for each data block, and the mapping relationship between the block identifier and the storage location is recorded in the metadata server; The data block is replicated into multiple data replicas according to a preset number of replicas, and these data replicas are distributed and stored on different storage server nodes to form a storage resource pool; Based on the mapping relationship in the metadata server, the load balancer routes data access requests to the corresponding storage server nodes, while dynamically monitoring the load of each node and adjusting the data distribution.
3. The inventory forecasting method based on multi-source information according to claim 2, characterized in that, The process of reading historical business data from a distributed storage system, preprocessing the historical business data to obtain regularized historical data, and determining the target material set from the regularized historical data based on a material classification system includes: Based on preset query conditions, historical business data is read from the distributed storage system through the data access interface, and the read data is verified for integrity and format. The verified historical business data is processed sequentially for missing value handling, outlier detection and correction, and data format standardization to generate well-organized historical data with a unified spatiotemporal dimension. Based on a pre-defined material classification system, materials in the regularized historical data are classified hierarchically into major, medium, and minor categories. The K-means clustering algorithm is used to identify material groups with similar inventory characteristics using the material's inventory turnover rate, average inventory level, and seasonal fluctuation coefficient as clustering feature vectors. The target material set is determined from the material groups based on the pre-defined clustering feature vector threshold. The major categories include power distribution equipment, cables, and switchgear; the medium categories include prefabricated substations, ring main units, power cables, and control cables; and the minor categories include the voltage levels and specifications of the medium categories.
4. The inventory forecasting method based on multi-source information according to claim 3, characterized in that, The key influencing factors, extracted through multidimensional feature analysis based on the target material set and corresponding well-organized historical data, include: Extract investment plan data, historical inventory data, and material entry and exit data related to the target material set from the organized historical data. The investment plan data includes the investment amount and execution time, the historical inventory data includes the inventory quantity and inventory value, and the material entry and exit data includes the entry and exit time and quantity. Based on the extracted data, the investment plan ratio is generated by calculating the ratio of the current investment amount to the total investment amount, the production supply lead time is generated by calculating the difference between the purchase order creation time and the warehousing time, and the inventory turnover rate is generated by calculating the ratio of the outbound cost to the average inventory cost, which serve as characteristic factors. The Pearson correlation coefficient analysis method was used to calculate the correlation coefficient between each characteristic factor and the change in inventory, and the characteristic factors with an absolute value of the correlation coefficient greater than the preset threshold were selected as key influencing factors.
5. The inventory forecasting method based on multi-source information according to claim 4, characterized in that, The aforementioned inventory time-series forecasting model, constructed and trained using a time-series forecasting algorithm based on key influencing factors and regularized historical data, includes: The inventory amount in the regularized historical data is used as the target time series, and the key influencing factors are used as the exogenous variable series. They are aligned and reorganized according to the preset time granularity to form the model training dataset. Based on the data characteristics, either the ARIMA model or the LSTM neural network model is selected to construct an inventory time series forecasting model. When the ARIMA model is selected, the autoregressive order p, the differencing order d, and the moving average order q of the model are determined through autocorrelation plots and partial autocorrelation plots. When the LSTM model is selected, a network structure containing an input layer, an LSTM hidden layer, and an output layer is constructed. The model training dataset is divided into a training set and a validation set in chronological order. The parameters of the inventory time-series prediction model are trained using the training set. If the inventory time-series prediction model uses the ARIMA model, the maximum likelihood estimation method is used for parameter estimation. If the inventory time-series prediction model uses the LSTM model, the backpropagation algorithm is used and the mean squared error between the predicted and the true values is used as the loss function for optimization. The model performance is evaluated on the validation set using a rolling prediction method, and the model hyperparameters are optimized using a grid search method. Select the inventory time-series forecasting model parameter configuration that minimizes the root mean square error on the validation set as the final model, and save the model structure and parameters.
6. The inventory forecasting method based on multi-source information according to claim 5, characterized in that, The step of receiving prediction requests via microservice API and invoking the inventory time-series prediction model to perform prediction calculations based on the prediction requests includes: The prediction request is received through a microservice API gateway based on the Spring Cloud framework. The prediction request includes JSON format data of the prediction date, material code and plant information. The forecast request is parsed and the data validity is verified to ensure that the forecast date is within the valid range, the material code exists in the target material set, and the factory information has the required access permissions; after the verification is successful, the request parameters are generated. Based on the request parameters, the corresponding regularized historical data and key influencing factors are queried from the distributed storage system, and the queried data is standardized according to the input requirements of the inventory time series prediction model to generate model input data containing time series window data and corresponding key influencing factor values. Load the inventory time-series forecasting model, input the model input data into the model for forward calculation, and generate forecast result data including current inventory amount, expected consumption amount, expected consumption amount, and expected current period inventory amount.
7. The inventory forecasting method based on multi-source information according to claim 6, characterized in that, The step of returning the prediction calculation results to the front-end interface for visualization includes: The prediction results data are encapsulated according to a preset JSON data format; The encapsulated prediction results data are returned to the front-end interface via the microservice API; On the front-end interface, based on the Vue.js framework and ElementUI component library, the ECharts chart library is used to visualize and render the encapsulated prediction results, generating a comprehensive display interface that includes inventory trend charts, amount comparison charts, and detailed data tables. The comprehensive display interface provides interactive functions such as data drill-down, time range filtering, and multi-dimensional comparison, and supports users to trigger new prediction requests through interface operations.
8. An inventory forecasting system based on multi-source information, characterized in that, The system employs the inventory forecasting method based on multi-source information as described in any one of claims 1 to 7; The system includes: The data acquisition and storage module is used to collect historical business data through a preset data interface and store the historical business data in a distributed storage system with a storage-compute separation architecture. The data preprocessing and target determination module is used to read the historical business data from the distributed storage system, preprocess the historical business data to obtain regularized historical data, and determine the target material set from the regularized historical data based on the material classification system. The feature analysis and factor extraction module is used to extract key influencing factors based on the target material set and its corresponding regularized historical data through multidimensional feature analysis. The model building and training module is used to build and train an inventory time-series forecasting model based on key influencing factors and regularized historical data, using a time-series forecasting algorithm. The forecasting calculation module is used to receive forecasting requests through the microservice API and call the inventory time-series forecasting model to perform forecasting calculations based on the forecasting requests. The prediction result feedback and display module is used to return the prediction calculation results to the front-end interface for visualization.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the inventory forecasting method based on multi-source information as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the inventory forecasting method based on multi-source information as described in any one of claims 1 to 7.