Safety stock prediction method, device and product based on material correlation

By clustering the historical time series of materials and constructing the correlation matrix and inputting the spatio-temporal prediction network, the existing security inventory prediction methods are solved, and higher prediction accuracy and feasibility are achieved.

CN117114182BActive Publication Date: 2024-11-26TSINGHUA UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311055606.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2024-11-26
Estimated Expiration
2043-08-21

AI Technical Summary

Technical Problem

The calculation results of the existing safety inventory prediction methods are low in accuracy, low in practical operation feasibility, and it is difficult to accurately judge the material demand. In addition, there are ideal assumptions such as the Hungarian inventory control model method, which leads to the ineffectiveness of safety inventory settings.

Method used

Using a safe inventory prediction method based on material correlation, clustering the historical time series of materials, constructing an association matrix, inputting a pre-trained spatio-temporal prediction network, predicting the security inventory results, and improving prediction using multi-channel network and weighted average technology Accuracy.

Benefits of technology

The accuracy and feasibility of safety inventory prediction are improved, and the accuracy of prediction results is enhanced by mining the correlation between materials, which exceeds the prediction effect of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117114182B_ABST
    Figure CN117114182B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device and storage medium for predicting safety stock based on material correlation, and relates to the field of data processing technology. In an embodiment of the present invention, a two-stage prediction network structure of clustering first and then prediction is adopted, and in an embodiment of the present invention, by imitating the modeling of the spatial domain of the spatiotemporal sequence, a correlation matrix is ​​proposed, that is, the co-occurrence frequency of materials in the product, and the correlation matrix is ​​used as the correlation prior knowledge, and is input into the spatiotemporal prediction network together with the clustering prior knowledge, which can better mine the correlation between materials and improve the prediction accuracy to a greater extent. In addition, in an embodiment of the present invention, through the concept of clustering first and then prediction, the time series corresponding to multiple materials can be processed simultaneously while considering the intrinsic correlation between time series, and the safety stock prediction results of multiple materials can be predicted at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a safety inventory forecasting method, device and product based on material correlation. Background Art

[0002] Safety stock is the stock set up by the enterprise to deal with the randomness and risk of each link of supply, production and sales. For a wide variety of materials, how to set up safety stock for each material to avoid production interruption due to low inventory and avoid goods backlog and cost loss caused by high inventory is an urgent problem to be solved in the actual production process. The existing safety stock models mainly include the Hungarian inventory control model method, marginal analysis method, utility value method, etc.

[0003] Among them, the classic formula method of safety stock comprehensively considers the impact of uncertainty in demand, supply, and service level. However, in actual production, it is difficult to accurately judge the demand for each material. Therefore, it is generally necessary to assume that the demand is stable and obeys the normal distribution. The demand for each material is determined based on simple empirical rules and substituted into the formula.

[0004] The Hungarian inventory control model makes very idealized assumptions about material usage, delivery cycle, and each delivery quantity, thereby transforming the setting of safety stock into a constrained optimization problem. Its theoretical significance is far greater than its practical significance.

[0005] The marginal analysis method and the utility value method respectively modify the safety stock forecast results according to the marginal cost of material storage and the enterprise's own risk tolerance. Both of them are heuristic methods with low feasibility in actual operation.

[0006] In short, the calculation results of existing safety stock forecasting methods have low accuracy and low practical feasibility.

[0007] Therefore, a new safety stock forecasting method is urgently needed. Summary of the invention

[0008] The embodiments of the present invention provide a method, device and product for predicting safety stock based on material association, so as to at least partially solve the problems existing in the related art.

[0009] A first aspect of an embodiment of the present invention provides a safety stock prediction method based on material relevance, the method comprising:

[0010] Clustering the first historical time series corresponding to each material to obtain a clustering result;

[0011] Determine the co-occurrence frequency of each pair of materials based on the usage frequency of the product that includes the two materials;

[0012] Based on the clustering results, according to the co-occurrence frequency of every two materials in the same category, a correlation matrix of materials in the same category is constructed to obtain a correlation matrix corresponding to each category;

[0013] The clustering results, the correlation matrix corresponding to each category, and the second historical time series of each material are input into a pre-trained spatiotemporal prediction network to predict and obtain the safety inventory prediction results of each material.

[0014] Optionally, the first historical time series corresponding to each material used for clustering and the second historical time series corresponding to each material used for prediction are time series of different time periods.

[0015] Optionally, the spatiotemporal prediction network is a multi-channel network, and the number of channels corresponds to the number of categories obtained by clustering; different channels of the spatiotemporal prediction network are used to process the correlation matrix corresponding to different categories and the second historical time series of each material.

[0016] Optionally, the clustering results, the correlation matrix corresponding to each category, and the second historical time series of each material are input into the spatiotemporal prediction network to obtain the safety inventory prediction results of each material, including:

[0017] Using each channel of the spatiotemporal prediction network, based on the correlation matrix corresponding to each category and the second historical time series of each material, a safety stock prediction value of each material in each channel is obtained;

[0018] Determining the weight of each category based on the clustering result;

[0019] Based on the weight of each category, the safety stock forecast values ​​obtained from different channels are weighted averaged to obtain the safety stock forecast results for each material.

[0020] Optionally, clustering the first historical time series corresponding to each material includes:

[0021] Collect the industrial scene source data generated by each material in the first historical time;

[0022] Cleaning the source data to construct a data set in a two-dimensional matrix form;

[0023] Based on the cleaned data set, determine the first historical time series of each material;

[0024] Cluster the first historical time series of each material.

[0025] Optionally, clustering the first historical time series corresponding to each material includes:

[0026] Clustering is performed based on the shape of the first historical time series corresponding to each material, or clustering is performed based on the characteristics of the first historical time series corresponding to each material.

[0027] A second aspect of an embodiment of the present invention provides a safety stock prediction device based on material association, the device comprising:

[0028] A clustering module is used to cluster the first historical time series corresponding to each material to obtain a clustering result;

[0029] A co-occurrence frequency determination module, used to determine the co-occurrence frequency of every two materials according to the usage frequency of the product including the two materials;

[0030] A correlation matrix determination module is used to construct a correlation matrix of materials in the same category based on the clustering results and according to the co-occurrence frequency of every two materials in the same category, so as to obtain a correlation matrix corresponding to each category;

[0031] The prediction module is used to input the clustering results, the correlation matrix corresponding to each category, and the second historical time series of each material into a pre-trained spatiotemporal prediction network to predict the safety inventory prediction results of each material.

[0032] Optionally, the first historical time series corresponding to each material used for clustering and the second historical time series corresponding to each material used for prediction are time series of different time periods.

[0033] Optionally, the spatiotemporal prediction network is a multi-channel network, and the number of channels corresponds to the number of categories obtained by clustering; different channels of the spatiotemporal prediction network are used to process the correlation matrix corresponding to different categories and the second historical time series of each material.

[0034] Optionally, the prediction module is specifically used to:

[0035] Using each channel of the spatiotemporal prediction network, based on the correlation matrix corresponding to each category and the second historical time series of each material, a safety stock prediction value of each material in each channel is obtained;

[0036] Determining the weight of each category based on the clustering result;

[0037] Based on the weight of each category, the safety stock forecast values ​​obtained from different channels are weighted averaged to obtain the safety stock forecast results for each material.

[0038] Optionally, the clustering module includes:

[0039] The collection submodule is used to collect the industrial scene source data generated by each material at the first historical time;

[0040] A cleaning submodule, used for cleaning the source data to construct a data set in a two-dimensional matrix form;

[0041] A determination submodule, used to determine the first historical time series of each material based on the data set obtained after cleaning;

[0042] The clustering submodule is used to cluster the first historical time series of each material.

[0043] Optionally, the clustering submodule is specifically used to:

[0044] Clustering is performed based on the shape of the first historical time series corresponding to each material, or clustering is performed based on the characteristics of the first historical time series corresponding to each material.

[0045] A third aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the safety stock prediction method based on material relevance as described in the first aspect of the present invention.

[0046] A fourth aspect of an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes, the steps in the safety stock prediction method based on material correlation as described in the first aspect of the present invention are implemented.

[0047] In the embodiment of the present invention, a two-stage prediction network structure of clustering first and then prediction is adopted. In addition, in the embodiment of the present invention, by imitating the modeling of the spatial domain of the spatiotemporal sequence, a correlation matrix, that is, the co-occurrence frequency of materials in the product, is proposed to model the correlation between materials. The correlation matrix is ​​input into the spatiotemporal prediction network as correlation prior knowledge, which can better explore the correlation between materials and greatly improve the prediction accuracy.

[0048] Furthermore, in the embodiment of the present invention, by adopting the concept of clustering first and then predicting, the time series corresponding to multiple materials can be processed simultaneously while considering the intrinsic correlation between the time series, and the safety inventory prediction results of multiple materials can be predicted at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0050] Figure 1is a flow chart of a safety stock forecasting method based on material relevance according to an embodiment of the present invention;

[0051] Figure 2 is a flow chart of another method for safety stock prediction based on material relevance according to an embodiment of the present invention;

[0052] Figure 3 It is a data processing flow diagram of a safety stock forecasting method based on material association according to an embodiment of the present invention;

[0053] Figure 4 It is a structural block diagram of a safety stock prediction device based on material association according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0055] Reference Figure 1 , shows a flow chart of a safety stock prediction method based on material relevance according to an embodiment of the present invention. As shown in the figure, the safety stock prediction method based on material relevance provided by an embodiment of the present invention may include the following steps:

[0056] S101, clustering the first historical time series corresponding to each material to obtain a clustering result.

[0057] In the embodiment of the present invention, the materials may be all the parts used to construct a machine product in industrial production. For an enterprise, each material may be all the parts used by all the machine products constructed by the enterprise in industrial production.

[0058] In the embodiment of the present invention, the first historical time series corresponding to each material includes: the usage of each material in each unit time included in the first historical time.

[0059] In the embodiment of the present invention, all production data in the industrial scenario can be collected to determine the usage of each material at different times, and then obtain the historical time series corresponding to each material.

[0060] For example, in an embodiment of the present invention, a first historical time series of a material may consist of the daily usage of the material in a certain year.

[0061] Clustering methods can unsupervisedly divide data sets into a certain number of clusters based on the intrinsic similarities of the data, providing basic information for further data mining.

[0062] Commonly used time clustering methods can be divided into two categories, namely model-based clustering and shape-based clustering. Model-based clustering selects a set of features based on prior knowledge, reconstructs the time series into static data, and then uses traditional clustering methods to divide the data points. The result is semantically clear, but it is heavily dependent on feature engineering; it can be further subdivided into feature-based clustering (such as K-means algorithm, etc.) and density-based clustering (DBSCAN algorithm, etc.). The former requires the user to specify the number of clusters desired; the latter defines the cluster as the maximum set of densely connected points, and can find clusters of any shape, but it is difficult to control the number of clusters, and when the density of sample points is uneven, it is difficult to adjust the parameters and the clustering effect is poor. Shape-based clustering (such as K-shape algorithm, etc.) clusters directly on the time series without feature extraction. It does not rely on specific domain knowledge and can cluster based on the original sequence morphology according to the characteristics of data fluctuation trend and fluctuation amplitude.

[0063] In the embodiment of the present invention, any feasible method in the relevant technology can be used to cluster the first historical time series corresponding to each material to obtain multiple time series classifications.

[0064] In the embodiment of the present invention, materials with similar time series distribution patterns can be clustered into one category based on the clustering method. The shape distributions of different categories are quite different, and the peak values ​​of clustering results of different categories are different.

[0065] In the embodiment of the present invention, the first historical time series corresponding to each material is clustered first, and then the safety stock of each category of materials is predicted based on the clustering result, which can reduce the prediction budget and improve the prediction accuracy.

[0066] S102, determining the co-occurrence frequency of every two materials according to the usage frequency of the product including the two materials co-existing.

[0067] In spatiotemporal sequence prediction, the distance between sensors is generally used to model the correlation of the spatial domain, or the distance is appropriately converted through a function. In an embodiment of the present invention, by imitating the modeling of the spatial domain of the spatiotemporal sequence, a correlation matrix, that is, the co-occurrence frequency of materials in the product, is proposed to model the correlation between materials. In an embodiment of the present invention, each value in the correlation matrix can be used as the value of the corresponding position of the adjacency matrix in the convolutional neural network.

[0068] Specifically, in an embodiment of the present invention, products in which two materials coexist are regarded as associated products of the two materials, and then the co-occurrence frequency of the two materials is determined by counting the usage frequencies of all associated products containing the two materials within the target time period. For example, assuming that material A and material B coexist in product a and product b, the number of times product a and product b are used within a week can be counted as the co-occurrence frequency of material A and material B, where one week is the target time period used in this example. Specifically, the target time period can be determined based on the time period used in the security prediction. Assuming that the time series used in the prediction is a time series within a week, the target time period can be determined as one week.

[0069] In the embodiment of the present invention, considering that materials only co-occur when the machine is used, the number of times the machine is used, to a certain extent, represents the number of times the materials are used together. For example, in the manufacture of machine A, 3 materials a and 4 materials b are used, but the co-occurrence frequency cannot be said to be 3 or 4. However, if machine A is produced twice, then the embodiment of the present invention can roughly define that a and b co-occur twice. The number of times machine A is used can reflect the co-occurrence frequency of a and b to a certain extent.

[0070] In the embodiment of the present invention, the degree of association between the two materials can be determined by counting the usage frequencies of products that exist together with the two materials, and the usage rates of the associated products of the two materials can also be considered.

[0071] S103, based on the clustering result, according to the co-occurrence frequency of every two materials in the same category, construct a correlation matrix of materials in the same category, and obtain a correlation matrix corresponding to each category.

[0072] In the embodiment of the present invention, the method in step S102 can be used to determine the co-occurrence frequency between every two materials. Furthermore, the co-occurrence frequency of every two materials of the same category can be constructed into a correlation matrix according to the clustering result obtained in step S101.

[0073] In the embodiment of the present invention, clustering is performed first and then the correlation matrix corresponding to each category is determined, so that the subsequent prediction results can be more accurate.

[0074] S104, inputting the clustering result, the correlation matrix corresponding to each category, and the second historical time series of each material into a pre-trained spatiotemporal prediction network to predict and obtain the safety stock prediction result of each material.

[0075] In the embodiment of the present invention, the correlation matrix and the clustering results can be input into the spatiotemporal prediction network as prior knowledge, so that the spatiotemporal prediction network can better mine the correlation between materials and obtain prediction results.

[0076] In an embodiment of the present invention, the values ​​in the correlation matrix can be used as the values ​​of the corresponding positions of the adjacency matrix in the convolutional neural network.

[0077] In an embodiment of the present invention, the corresponding position in the adjacency matrix is ​​set to the co-occurrence frequency, and the prediction MAE (Mean Absolute Error) when the spatiotemporal prediction network learns the adjacency matrix value is significantly smaller than the prediction MAE when the prediction network does not learn the adjacency matrix value.

[0078] In the embodiment of the present invention, the first historical time series corresponding to each material used for clustering and the second historical time series corresponding to each material used for prediction are time series of different time periods.

[0079] In the embodiment of the present invention, the first historical time series used in clustering and the second time series used in prediction can be time series of different time periods. It only needs to be determined that each material used in clustering corresponds to each material used in prediction.

[0080] In an embodiment of the present invention, the spatiotemporal prediction network is a multi-channel network, and the number of channels corresponds to the number of categories obtained by clustering; different channels of the spatiotemporal prediction network are used to process the correlation matrix corresponding to different categories and the second historical time series of each material.

[0081] Specifically, in the embodiment of the present invention, a correlation matrix is ​​constructed among materials of the same category. By utilizing the correlation matrix, the prediction accuracy of each channel in the multiple channels can be improved. The results obtained from each channel are weighted averaged as the final result, and the overall prediction accuracy is improved. Taking RMSE as an indicator, the result exceeds the static naive method by 16.25%, HA by 16.05%, and GRU by 46.01%.

[0082] In the embodiment of the present invention, different channels can be used to process the second time series of each material based on the correlation matrix corresponding to different categories to obtain prediction results respectively, and then based on the clustering results, the prediction results obtained by the correlation matrix of different categories are weighted averaged to obtain the final prediction result. Therefore, under the joint action of the two prior knowledge of clustering results and correlation matrix, a more accurate prediction result can be obtained.

[0083] In the embodiment of the present invention, "predicting the safety stock of multiple materials based on the time series of multiple materials at the same time" is regarded as a spatiotemporal sequence problem. Based on this, in the embodiment of the present invention, the correlation problem is modeled as a diffusion convolution process, and Sequence to Sequence and GRU are integrated in the time domain. For example, first, the data of 2018 can be clustered into three categories through K-shape, and then the correlation matrices belonging to the three categories of materials are constructed respectively, and the correlation prior knowledge and clustering prior knowledge, as well as the 2019 material usage data processed by sliding windows, are input into the spatiotemporal prediction network. Therefore, in the embodiment of the present invention, the spatiotemporal prediction network used can obtain the prediction results based on the correlation relationship between materials.

[0084] Reference Figure 2 , shows a flow chart of a safety stock prediction method based on material relevance according to an embodiment of the present invention. The safety stock prediction method based on material relevance provided by the embodiment of the present invention may specifically include the following steps:

[0085] S201, clustering the first historical time series corresponding to each material to obtain a clustering result.

[0086] In the embodiment of the present invention, firstly, the real material data in the industrial scenario can be processed to obtain the historical time series corresponding to each material.

[0087] Specifically, in the embodiment of the present invention, step S201 includes:

[0088] S2011, collect the industrial scene source data generated by each material at the first historical time.

[0089] S2012, cleaning the source data to construct a data set in a two-dimensional matrix form.

[0090] In the embodiment of the present invention, a data set in the form of a two-dimensional matrix can be obtained from complex real industrial scene source data through data cleaning and construction.

[0091] In the embodiment of the present invention, the historical records of material usage may be organized into a matrix form. For example, each row of the matrix may store the usage record of each material, and each column may store the usage record of all materials in a day.

[0092] In the embodiment of the present invention, the rows corresponding to the materials whose annual usage is less than a preset threshold value may also be filtered out from the two-dimensional matrix of material usage.

[0093] In the embodiment of the present invention, the all-zero columns may also be deleted from the two-dimensional matrix of material usage.

[0094] In the embodiment of the present invention, the above-mentioned two-dimensional matrix of material usage can also be normalized to make the subsequent calculation process faster.

[0095] For example, after data cleaning, there are 8517 materials whose annual usage is greater than the preset threshold, which are used as the IDs of the two-dimensional matrix rows. There are 365 days in a year. After deleting all zero columns, there are 352 columns, forming a two-dimensional matrix of 8517*352.

[0096] S2013: Determine the first historical time series of each material based on the data set obtained after cleaning.

[0097] S2014, clustering the first historical time series of each material.

[0098] Specifically, the step S2014 may specifically include: clustering based on the shape of the first historical time series corresponding to each material, or clustering based on the characteristics of the first historical time series corresponding to each material.

[0099] Among them, the shape-based clustering method can start from the original sequence form of the first historical time series of each material and cluster according to the characteristics of data fluctuation trend and fluctuation amplitude. The feature-based clustering method needs to select a set of features based on prior knowledge, reconstruct the time series into static data, and then use the traditional clustering method to divide the data points. The result has clear semantics, but it is heavily dependent on feature engineering. The specific selection can be based on actual needs.

[0100] In the embodiment of the present invention, a shape-based clustering method is preferred, and specifically, clustering can be performed based on the distribution law of the shapes of the time series of each material.

[0101] Specifically, reference factors for the distribution law of the shape of the time series may include: peak value, fluctuation pattern, etc.

[0102] S202, determining the co-occurrence frequency of every two materials according to the usage frequency of the product including the two materials co-existing.

[0103] The step S202 is similar to the above step S102, and will not be described in detail in this embodiment of the present invention.

[0104] S203, based on the clustering result, according to the co-occurrence frequency of every two materials in the same category, construct a correlation matrix of materials in the same category, and obtain a correlation matrix corresponding to each category.

[0105] The step S203 is similar to the above step S103, and will not be described in detail in this embodiment of the present invention.

[0106] S204, using each channel of the spatiotemporal prediction network, respectively based on the correlation matrix corresponding to each category and the second historical time series of each material, obtain the safety stock prediction value of each material in each channel.

[0107] In the embodiment of the present invention, the spatiotemporal prediction network may include multiple channels, and each channel may use the correlation matrix corresponding to each category as prior knowledge, and obtain the safety inventory prediction value of each material in the channel based on the second historical time series of each material. Thus, the corresponding safety inventory prediction value of each material in each channel may be obtained based on the correlation matrix corresponding to different categories and the second historical time series of each material.

[0108] S205: Determine the weight of each category based on the clustering result.

[0109] In the embodiment of the present invention, the weight of each category may be determined based on the proportion of the number of materials included in each category in the clustering result to the total number of materials.

[0110] S206, based on the weights of each category, weighted average is performed on the safety stock forecast values ​​obtained from different channels to obtain the safety stock forecast result of each material.

[0111] Reference Figure 3 , shows a schematic diagram of a data processing flow of a safety stock prediction method based on material relevance according to an embodiment of the present invention. The safety stock prediction method based on material relevance provided by an embodiment of the present invention may specifically include:

[0112] Step 1: Collect industrial scene source data.

[0113] Step 2: Construct a two-dimensional matrix data set based on the industrial scene source data.

[0114] In an embodiment of the present invention, when constructing a data set in the form of a two-dimensional matrix, analysis can be performed for the first historical time and the second historical time respectively. For example, a two-dimensional matrix of material usage corresponding to 2018 and a two-dimensional matrix of material usage corresponding to 2019 can be constructed respectively.

[0115] Step 3: Based on the data set in the form of a two-dimensional matrix, the time series of each material is obtained (not shown in the figure), and then clustering is performed based on the time series to obtain the clustering results.

[0116] In the embodiment of the present invention, the clustering result can be obtained based on the two-dimensional matrix of material usage at the first historical time, and then the two-dimensional matrix of material usage at the second historical time is used for subsequent safety stock forecasting.

[0117] Step 4: Based on the industrial scene source data and clustering results, obtain the correlation matrix corresponding to each category.

[0118] In an embodiment of the present invention, two materials appearing in the same machine product are understood to be related, and then the number of times the machine in which the two materials appear at the same time is used in a preset time period (for example: the time period corresponding to the first historical time) can be counted, and finally the statistical data is normalized to obtain the co-occurrence frequency of every two materials.

[0119] For example, if there are 100 materials in a certain category, the size of the correlation matrix is ​​100*100. The correlation matrix is ​​a symmetric matrix, and the value of a certain cell is the co-occurrence frequency of the materials in a certain row and column.

[0120] Step 5: Take the clustering results and the correlation matrix as prior knowledge, and based on the two-dimensional matrix of material usage at the second historical time, use the pre-trained spatiotemporal prediction model to obtain the safety stock prediction results corresponding to each material.

[0121] For example, in the embodiment of the present invention, the time prediction model adopts the DCRNN network structure obtained by combining seq2seq and GRU, wherein the internal point product of GRU is replaced by diffusion convolution, and the data is processed by sliding window. The input is the historical usage data of the past 14 days, and the output is the predicted usage data of the next 7 days or 14 days. The method provided in the embodiment of the present invention is used for material prediction, and the prediction accuracy exceeds some common baseline methods, such as directly averaging 16.05%, static naive method 16.25%, GRU 46.01%, etc.

[0122] Based on the same inventive concept, the embodiment of the present invention provides a safety inventory prediction device based on material association, referring to Figure 4 , Figure 4 is a schematic diagram of a safety stock prediction device based on material association provided by an embodiment of the present invention, the device comprising:

[0123] The clustering module 401 is used to cluster the first historical time series corresponding to each material to obtain a clustering result;

[0124] A co-occurrence frequency determination module 402, for determining the co-occurrence frequency of each two materials according to the usage frequency of the product including the two materials co-existing;

[0125] A correlation matrix determination module 403 is used to construct a correlation matrix of materials in the same category based on the clustering results and according to the co-occurrence frequency of every two materials in the same category, so as to obtain a correlation matrix corresponding to each category;

[0126] The prediction module 404 is used to input the clustering results, the correlation matrix corresponding to each category, and the second historical time series of each material into a pre-trained spatiotemporal prediction network to predict the safety stock prediction results of each material.

[0127] Optionally, the first historical time series corresponding to each material used for clustering and the second historical time series corresponding to each material used for prediction are time series of different time periods.

[0128] Optionally, the spatiotemporal prediction network is a multi-channel network, and the number of channels corresponds to the number of categories obtained by clustering; different channels of the spatiotemporal prediction network are used to process the correlation matrix corresponding to different categories and the second historical time series of each material.

[0129] Optionally, the prediction module is specifically used to:

[0130] Using each channel of the spatiotemporal prediction network, based on the correlation matrix corresponding to each category and the second historical time series of each material, a safety stock prediction value of each material in each channel is obtained;

[0131] Determining the weight of each category based on the clustering result;

[0132] Based on the weight of each category, the safety stock forecast values ​​obtained from different channels are weighted averaged to obtain the safety stock forecast results for each material.

[0133] Optionally, the clustering module includes:

[0134] The collection submodule is used to collect the industrial scene source data generated by each material at the first historical time;

[0135] A cleaning submodule, used for cleaning the source data to construct a data set in a two-dimensional matrix form;

[0136] A determination submodule, used to determine the first historical time series of each material based on the data set obtained after cleaning;

[0137] The clustering submodule is used to cluster the first historical time series of each material.

[0138] Optionally, the clustering submodule is specifically used to:

[0139] Clustering based on the shape of the first historical time series corresponding to each material, or

[0140] Clustering is performed based on the characteristics of the first historical time series corresponding to each material.

[0141] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0142] Based on the same inventive concept, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the safety stock prediction method based on material correlation described in any of the above embodiments are implemented.

[0143] Based on the same inventive concept, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the safety stock prediction method based on material correlation described in any of the above embodiments are implemented.

[0144] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0145] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0146] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable terminal device for safety inventory prediction based on material relevance to produce a machine, so that the instructions executed by the processor of the computer or other programmable terminal device for safety inventory prediction based on material relevance generate instructions for implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0147] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable material-related safety inventory forecasting terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0148] These computer program instructions can also be loaded onto a computer or other programmable terminal device for material-related safety inventory forecasting, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions executed on the computer or other programmable terminal device for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0149] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0150] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0151] The above is a detailed introduction to the material-related safety stock forecasting method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A safety stock forecasting method based on material relevance, characterized in that: The method comprises: Clustering the first historical time series corresponding to each material to obtain a clustering result; Determine the co-occurrence frequency of each pair of materials based on the usage frequency of the product that includes the two materials; Based on the clustering results, according to the co-occurrence frequency of every two materials in the same category, a correlation matrix of materials in the same category is constructed to obtain a correlation matrix corresponding to each category; The clustering results, the correlation matrix corresponding to each category, and the second historical time series of each material are input into a pre-trained spatiotemporal prediction network to predict the safety inventory prediction results of each material. The spatiotemporal prediction network adopts a DCRNN network structure combining seq2seq and GRU.

2. The safety stock forecasting method according to claim 1, characterized in that: The first historical time series corresponding to each material used in clustering and the second historical time series corresponding to each material used in prediction are time series of different time periods.

3. The safety stock forecasting method according to claim 2, characterized in that: The spatiotemporal prediction network is a multi-channel network, and the number of channels corresponds to the number of categories obtained by clustering; different channels of the spatiotemporal prediction network are used to process the correlation matrix corresponding to different categories and the second historical time series of each material.

4. The safety stock forecasting method according to claim 3, characterized in that: The clustering results, the correlation matrix corresponding to each category, and the second historical time series of each material are input into the spatiotemporal prediction network to obtain the safety inventory prediction results of each material, including: Using each channel of the spatiotemporal prediction network, based on the correlation matrix corresponding to each category and the second historical time series of each material, a safety stock prediction value of each material in each channel is obtained; Determining the weight of each category based on the clustering result; Based on the weight of each category, the safety stock forecast values ​​obtained from different channels are weighted averaged to obtain the safety stock forecast results for each material.

5. The method according to claim 1, characterized in that The clustering of the first historical time series corresponding to each material includes: Collect the industrial scene source data generated by each material in the first historical time; Cleaning the source data to construct a data set in a two-dimensional matrix form; Based on the cleaned data set, determine the first historical time series of each material; Cluster the first historical time series of each material.

6. The method according to claim 5, characterized in that Clustering the first historical time series corresponding to each material includes: Clustering based on the shape of the first historical time series corresponding to each material, or Clustering is performed based on the characteristics of the first historical time series corresponding to each material.

7. A safety stock prediction device based on material relevance, characterized in that: The device comprises: A clustering module is used to cluster the first historical time series corresponding to each material to obtain a clustering result; A co-occurrence frequency determination module, used to determine the co-occurrence frequency of every two materials according to the usage frequency of the product including the two materials; A correlation matrix determination module is used to construct a correlation matrix of materials in the same category based on the clustering results and according to the co-occurrence frequency of every two materials in the same category, so as to obtain a correlation matrix corresponding to each category; The prediction module is used to input the clustering results, the correlation matrix corresponding to each category, and the second historical time series of each material into a pre-trained spatiotemporal prediction network to predict the safety inventory prediction results of each material. The spatiotemporal prediction network adopts a DCRNN network structure that combines seq2seq and GRU.

8. The safety stock prediction device based on material relevance according to claim 7 is characterized in that: The first historical time series corresponding to each material used in clustering and the second historical time series corresponding to each material used in prediction are time series of different time periods.

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 computer program, the steps of the safety stock forecasting method based on material relevance described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the safety stock forecasting method based on material relevance described in any one of claims 1 to 6 are implemented.