A material preparation prediction method, device, equipment and storage medium

By using the Transformer model and de-stable attention mechanism in material preparation forecasting, the problems of low forecast accuracy and inefficient disturbance handling in existing technologies are solved, achieving more accurate material demand forecasting and disturbance response.

CN118228854BActive Publication Date: 2025-11-07GUANGZHOU JIAFAN COMPUTER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410060622.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-15
Publication Date
2025-11-07
Estimated Expiration
2044-01-15

AI Technical Summary

Technical Problem

Existing material preparation forecasting methods suffer from low forecasting accuracy and inefficient handling of occasional disturbances.

Method used

By employing the Transformer model combined with a de-stationary attention mechanism, and processing production characteristics and disturbance information through normalization and de-normalization, a symmetric structure is constructed to extract temporal features and fuse disturbance features, thereby achieving material preparation prediction.

Benefits of technology

It improves the accuracy of material preparation forecasting, effectively copes with occasional disturbances, and ensures accurate calculation of material requirements during the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118228854B_ABST
    Figure CN118228854B_ABST
Patent Text Reader

Abstract

The application discloses a material preparation prediction method, device and equipment and a storage medium. In the application, production information is subjected to feature extraction, the screened time sequence features are normalized, then the normalized second production features are input into a Transformer model comprising a destabilization attention mechanism, and finally the output of the Transformer model is denormalized to realize material preparation prediction, thereby eliminating the scale difference between different variables in multivariate time sequence data. In addition, in the process of predicting the material preparation, the disturbance information is normalized and input into a second encoder, the target disturbance features are obtained, the target disturbance features are fused with the third production features, the fused features are input into the decoder of the Transformer model, and then denormalization is performed to obtain the target preparation prediction result, so that various disturbances are considered in the production process of the product and the required material quantity is recalculated, and the accuracy of predicting the preparation quantity of the material is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of material preparation, and particularly relate to a material preparation prediction method, device, equipment and storage medium. BACKGROUND

[0002] In the production task of enterprise resource management, the relevant production operation person needs to know the nature and characteristics of the produced material very well, and the past production number and production time sequence of the material very clearly, so as to predict how much material is needed for future production. However, due to many influencing factors of human prediction, the prediction accuracy is low, which easily leads to the phenomenon of redundant accumulation or extreme lack of materials. At the same time, due to the possible failure of equipment in the production process of products, the product in-out warehouse, sales and delivery process is affected, thereby affecting the material preparation amount, so a reliable prediction model is needed to dynamically predict and generate the material preparation list. However, the existing mainstream prediction model has the technical problems of low prediction accuracy and inefficient processing of occasional disturbances.

[0003] In summary, the method for predicting material preparation in the prior art has the technical problems of low prediction accuracy and inefficient processing of occasional disturbances. SUMMARY

[0004] Embodiments of the present application provide a material preparation prediction method, device, equipment and storage medium, which solve the technical problems of low prediction accuracy and inefficient processing of occasional disturbances in the prior art method for predicting material preparation.

[0005] In a first aspect, embodiments of the present application provide a material preparation prediction method, comprising:

[0006] obtaining production information of a product and obtaining disturbance information in the production process of the product;

[0007] extracting a first production feature from the production information;

[0008] respectively normalizing the first production feature and the disturbance information to obtain a second production feature and normalized disturbance information;

[0009] inputting the second production feature into a first encoder of a Transformer model to obtain a detrended third production feature, the Transformer model comprising a detrended attention mechanism;

[0010] inputting the normalized disturbance information into a second encoder to obtain a target disturbance feature, the structure of the second encoder being the same as that of the first encoder;

[0011] According to the third production feature and the target disturbance feature, a fusion feature is obtained;

[0012] The fusion feature is input into a decoder of the Transformer model to obtain an initial material preparation prediction result;

[0013] The initial material preparation prediction result is denormalized to obtain a target material preparation prediction result.

[0014] In a second aspect, an embodiment of the present application provides a material preparation prediction device, which comprises:

[0015] An information acquisition module is configured to acquire production information of a product and acquire disturbance information in a production process of the product;

[0016] A feature extraction module is configured to extract a first production feature from the production information;

[0017] A normalization module is configured to perform normalization processing on the first production feature and the disturbance information respectively to obtain a second production feature and normalized disturbance information;

[0018] A first feature input module is configured to input the second production feature into a first encoder of a Transformer model to obtain a third production feature that is detrended, wherein the Transformer model comprises a detrended attention mechanism;

[0019] A second feature input module is configured to input the normalized disturbance information into a second encoder to obtain a target disturbance feature, wherein a structure of the second encoder is the same as a structure of the first encoder;

[0020] A feature fusion module is configured to obtain a fusion feature according to the third production feature and the target disturbance feature;

[0021] A feature decoding module is configured to input the fusion feature into a decoder of the Transformer model to obtain an initial material preparation prediction result;

[0022] A denormalization module is configured to perform denormalization on the initial material preparation prediction result to obtain a target material preparation prediction result.

[0023] In a third aspect, an embodiment of the present application provides a material preparation prediction device, which comprises a processor and a memory;

[0024] The memory is configured to store a computer program and transmit the computer program to the processor;

[0025] The processor is configured to execute a material preparation prediction method according to instructions in the computer program.

[0026] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, which when executed by a computer processor, are used to perform a material preparation prediction method as described in the first aspect.

[0027] In summary, an embodiment of the present application constructs a normalized and denormalized symmetrical structure. After feature extraction is performed on production information, the extracted time-series features are normalized. Then, the normalized second production features are input into a Transformer model including a detrending attention mechanism, so that the Transformer model can extract the required features and the internal relationship between the nodes of each process. The lost time-series information after normalization is retained and predicted. Finally, the output of the Transformer model is denormalized to realize material preparation prediction, thereby eliminating the scale difference between different variables in multivariate time-series data and restoring the different scales of the prediction results. In addition, in the process of predicting material preparation, the disturbance information is normalized and input into a second encoder with the same structure as the first encoder of the Transformer model. After obtaining the target disturbance features, the target disturbance features and the third production features are fused to obtain fusion features. The fusion features are input into the decoder of the Transformer model and then denormalized to obtain the target material preparation result, so as to ensure that various disturbances occurring occasionally in the production process of products can be responded to and the required material quantity can be recalculated, thereby improving the accuracy of predicting the material preparation quantity. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 A flowchart of a material preparation prediction method provided by an embodiment of the present application.

[0029] Figure 2 A structural schematic diagram of a first encoder provided by an embodiment of the present application.

[0030] Figure 3 A framework schematic diagram of a material preparation prediction method provided by an embodiment of the present application.

[0031] Figure 4 A structural schematic diagram of a material preparation prediction device provided by an embodiment of the present application.

[0032] Figure 5 A structural schematic diagram of a material preparation prediction device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following description and drawings are illustrative of specific embodiments of the application and are not intended to be limiting thereof. The examples represent the possible variations. Separate elements and functions of the embodiments can be combined in other embodiments and can be performed in a different sequence. Parts and features of different embodiments can be interchanged and exchanged without departing from the scope of the application. The scope of the embodiments of this application encompasses the entire scope of the following claims and all available equivalents thereof. In this document, each of the embodiments can be individually or collectively referred to as the "application" merely for convenience, and no limitation is intended on the scope of the application as encompassed by the claims, unless specifically recited therein. In this document, relational terms such as first and second, and the like, can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. The embodiments are described with progression in this document for ease of description only. The same or similar parts and features of different embodiments can be described in different sections of this document, and can be mutually substituted for each other without departing from the scope of the application.

[0034] In the prior art, the current mainstream application in material preparation prediction model includes ARIMA (autoregressive moving average) model and ETS (error trend seasonality) model, etc.

[0035] Wherein, the ARIMA model is a time series-based statistical model for analyzing and predicting future values of time series data, and the ARIMA model includes three parameters: p, d and q, representing the number of autoregressive terms, the number of differences and the number of moving average terms, respectively. In material forecasting, first, the historical data of material demand needs to be collected, including the amount of material demand and time information. Then, time series analysis is performed on the historical data to view the trend and seasonality of the historical data. If the collected historical data is a non-stationary time series, the historical data needs to be differenced to make it a stationary time series. Difference can be achieved by subtracting the lagged value of the time series from the value of the time series. Then, according to the differenced time series data, the ACF (autocorrelation function) and PACF (partial autocorrelation function) diagrams are used to determine the parameters p, d and q of the ARIMA model. The historical data is used to fit the ARIMA model and calculate the parameter values of the ARIMA model to obtain the established ARIMA model. Finally, the established ARIMA model and the latest information in the historical data are used to predict the demand for materials in a certain period of time in the future.

[0036] And the ETS (Error Trend Seasonal) model is a time series-based statistical model that can be used to predict time series data such as material demand. The ETS model can handle trends, seasonality and random factors, and is suitable for predicting a variety of time series data. The ETS model also requires certain domain knowledge and experience to ensure correct selection of ETS model parameters and data fitting, and the prediction accuracy of the ETS model also depends on the reliability and completeness of the historical data. Compared with the ARIMA model, the ETS model has stronger interpretability and can clearly reflect the trend, seasonality and random factors of time series data, so it is more suitable in some scenarios. At the same time, the ETS model can also be extended by combining external factors to improve the prediction ability of the model.

[0037] However, whether it is an ARIMA model or an ETS model, there are the following problems:

[0038] (1) After normalizing non-stationary data, part of the time series information is lost, resulting in inaccurate prediction.

[0039] (2) The existing material forecasting method is not efficient enough in dealing with occasional disturbances.

[0040] In summary, in order to solve the above technical problems, the embodiments of the present application provide a material preparation prediction method, as shown in Figure 1 Figure 1 ​A flowchart of a material preparation prediction method provided by an embodiment of the present application. The material preparation prediction method provided by the embodiment of the present application can be executed by a material preparation prediction device, which can be implemented in the form of software and / or hardware, and can be composed of two or more physical entities or one physical entity. For example, the material preparation prediction device can be a computer, an upper computer, a tablet, etc. The method comprises the following steps:

[0041] Step 101: Obtain production information of a product and obtain disturbance information in a production process of the product.

[0042] In the embodiment, the production information of the product is first obtained, and the disturbance information in the production process of the product is obtained in real time. The production information of the product refers to the relevant information in the production process of the product. In an embodiment, the production information of the product comprises production plan information, production scheduling information and bill of material (BOM) information. The production plan information comprises the production plan of the product, such as the batch and quantity of the product to be produced, etc. The production scheduling information comprises the production sequence of the product. The BOM information comprises the list of materials required for producing the product. In the embodiment, the production information can be uploaded to a server by a user in advance, and the material preparation prediction device obtains the production information from the server, or the user can directly input the material information into the material preparation prediction device.

[0043] The disturbance information is information that disturbs the production process in the production process of the product, such as equipment failure in the production process of the product, etc. In an embodiment, the disturbance information comprises a production process node where the disturbance occurs and a specific reason for the disturbance. The specific reason for the disturbance can be software failure or hardware failure, such as database deadlock or production management platform downtime, etc. The hardware failure can be physical failure or damage of equipment in the production process, etc. The software failure information can be actively reported by software, and the hardware failure information can be detected by setting sensors or cameras. In an embodiment, the disturbance information in the production process of the product is obtained by monitoring each production process in the production process of the product, and obtaining the disturbance information when an error in the production process is detected. Specifically, the embodiment needs to monitor each production process in the production process of the product, and obtain the relevant disturbance information from the production process where the error occurs when an error in the production process is detected.

[0044] Step 102: Extract a first production feature from the production information.

[0045] After obtaining the production information, the first production feature can be extracted from the production information. The first production feature in this embodiment refers to the feature in the time dimension during the production process of the product. In one embodiment, the first production feature is extracted from the production information, including: according to the production plan information, the production scheduling information and the bill of materials information, extracting the time series feature of the production product, and taking the time series feature as the first production feature. Specifically, the production plan information, the production scheduling information and the bill of materials information within a period of time can be obtained, and a time series can be constructed. Then, the time series feature extraction tool such as Time Series Feature Extraction Library (TSFEL), pythontsfresh, cesium, fats, hctsa or machine learning can be used to extract the time series feature, so as to obtain the first production feature of the production product.

[0046] In step 103, the first production feature and the disturbance information are normalized respectively to obtain the second production feature and the normalized disturbance information.

[0047] After the first production feature is extracted, the first production feature and the disturbance information need to be normalized respectively to obtain the second production feature and the normalized disturbance information. Since the first production feature extracted from the production plan information, the production scheduling information and the bill of materials information constitutes a set of multivariate time series data X = {x1,..., x q In order to eliminate the scale difference of different variables, the embodiment of the present application needs to be normalized in the time dimension to obtain the normalized data X' = {x'1,..., x' q Since the input received by the subsequent Transformer model during the training stage is sampled from the whole time series through a sliding window, the window normalization in the time dimension is actually an instance normalization of each input, so that the subsequence in the final adjacent window will conform to the same mean and variance, and the distribution difference of the whole training sample in the time dimension is weakened, thereby improving the stationarity of the input data. Therefore, the embodiment simultaneously stores the original mean and variance of the subsequence in each window during the normalization process, so as to restore the distribution information lost in the normalization process in the subsequent de-stationarization process. The specific formula is as follows:

[0048]

[0049]

[0050]

[0051] wherein μ x is the mean of the subsequence, and σx is the variance of the subsequence, S is the number of data within the subsequence, x i is the i-th data in the subsequence, x′ i is the i-th data after normalization.

[0052] De-normalization is used to restore the output y′ i of the Transformer model to the distribution y i of the original input, as follows:

[0053] y i = σ x ·(y′ i + μ x )

[0054] Step 104, input the second production feature into the first encoder of the Transformer model to obtain a de-stationary third production feature, the Transformer model comprising a de-stationary attention mechanism.

[0055] After obtaining the second production feature, it is further needed to input the second production feature into the first encoder of the Transformer model comprising a de-stationary attention mechanism, so as to obtain a de-stationary third production feature. The de-stationary attention mechanism is mainly used to recombine the non-stationary information of the original sequence to prevent over-stationary, and the specific principle can refer to the prior art.

[0056] In this embodiment, since the input obtained in the Transformer model is after normalization, the time sequence dependence between the original data cannot be well captured. Therefore, it is needed to use the normalized input (i.e., the second production feature) and the mean and variance of the original subsequence stored during normalization to maximize the attention map that should be obtained when the original input (i.e., the first production feature) is not normalized, so as to alleviate the over-stationary problem after non-time sequence processing.

[0057] Based on the linear assumption of the embedding layer and the forward propagation layer of the Transformer model in the time dimension, the inputs Q', K' and V' of the attention layer can be obtained from the outputs Q, K and V of the embedding layer, respectively, as follows:

[0058]

[0059]

[0060]

[0061] wherein μ Q , μK and μ V Let Q, K, and V be the mean values ​​corresponding to the time dimension.

[0062] According to the attention formula of Transformer:

[0063]

[0064] The inputs Q′ and K′ of the attention layer can be substituted to obtain:

[0065]

[0066] Where 1∈R S×1 , is a vector of all 1s, d k Let be the dimension of the vector. Based on the translation invariance of the Softmax operator, the formula can be simplified to:

[0067]

[0068] Two variables can be derived from the above formula. and Δ=Kμ Q These two variables will act as de-stableization factors on the attention map obtained from the normalized input, thereby maximizing the approximation of the attention map that could be obtained from the original input before normalization. Through the de-stableization factors τ and Δ in the encoder (i.e., the first encoder) structure of the Transformer model, the attention map of the normalized data is transformed into an attention map containing temporal information of the data before normalization. The structure of the first encoder in this embodiment is as follows: Figure 2 As shown.

[0069] Step 105: Input the second perturbation feature into the second encoder to obtain the target perturbation feature. The structure of the second encoder is the same as that of the first encoder.

[0070] Simultaneously, in this embodiment, the second perturbation feature needs to be input into the second encoder to obtain the target perturbation feature output by the second encoder. It should be noted that the structure of the second encoder is the same as that of the first encoder, and can be found in the following reference. Figure 2 .

[0071] Step 106: Obtain the fused features based on the third production feature and the target disturbance feature.

[0072] After obtaining the target perturbation features, the third production features and the target perturbation features can be fused to obtain fused features. In one embodiment, obtaining fused features based on the third production features and the target perturbation features includes:

[0073] Step 1061, splicing the third production feature and the target disturbance feature to obtain a spliced feature.

[0074] Step 1062, generating a fusion feature according to the spliced feature.

[0075] In one embodiment, the third production feature and the target disturbance feature can be spliced first to obtain a spliced feature. Then, a fusion feature is generated according to the spliced feature, for example, the spliced feature is input into a linear layer to obtain the fusion feature output by the linear layer.

[0076] Step 107, inputting the fusion feature into a decoder of a Transformer model to obtain an initial material preparation prediction result.

[0077] After obtaining the fusion feature, the fusion feature can be input into the decoder of the Transformer model to obtain the initial material preparation prediction result.

[0078] Step 108, denormalizing the initial material preparation prediction result to obtain a target material preparation prediction result.

[0079] After obtaining the initial material preparation prediction result, the initial material preparation prediction result is further denormalized to obtain the target material preparation prediction result of the final production product, and the specific process is as shown in Figure 3 .

[0080] In addition, it needs to be further explained that when the production process does not have errors, that is, there is no disturbance information at this time, the third production feature can be directly input into the decoder of the Transformer model as the fusion feature to obtain the initial material preparation prediction result, and then the initial material preparation prediction result is denormalized to obtain the final target material preparation prediction result, that is, the third production feature and the target disturbance feature do not need to be fused, and the expression formula of the fusion feature F f is as follows:

[0081]

[0082] Where F is the third production feature, F r is the target disturbance feature,

[0083] In another embodiment, in the production process of the product, a monitoring program can also be set in the ERP (Enterprise Resource Planning, enterprise resource planning) system. If the data of the material preparation prediction appears to be wrong in the production process, an early warning report is issued, and whether the error of each production process causes the early warning is analyzed.

[0084] The embodiment of the present application provides a material preparation prediction method, and the embodiment of the present application constructs a normalized and denormalized symmetrical structure. After feature extraction is performed on production information, the screened time sequence features are normalized, and then the normalized second production features are input into a Transformer model including a destabilization attention mechanism, so that the Transformer model can extract required features and internal relations among process nodes, retain time sequence information lost after normalization and perform prediction. Finally, the output of the Transformer model is denormalized to realize material preparation prediction, thereby eliminating scale differences between different variables in multivariate time sequence data and restoring different scales of the prediction result. In addition, in the process of predicting the material preparation, the disturbance information is normalized and input into a second encoder having the same structure as a first encoder of the Transformer model, target disturbance features are obtained, the target disturbance features and third production features are fused to obtain fused features, the fused features are input into a decoder of the Transformer model, and then denormalization is performed to obtain a target material preparation result, so that various disturbances occurring occasionally in the production process of a product can be responded to and the required material quantity can be recalculated, and the accuracy of predicting the material preparation quantity is improved.

[0085] The embodiment of the present application further provides a material preparation prediction device. Figure 4 As shown in the figure, Figure 4 The embodiment of the present application provides a structure diagram of a material preparation prediction device, and the material preparation prediction device comprises:

[0086] An information acquisition module 201 is configured to acquire production information of a product and acquire disturbance information in a production process of the product.

[0087] A feature extraction module 202 is configured to extract first production features from the production information.

[0088] A normalization module 203 is configured to perform normalization processing on the first production features and the disturbance information respectively to obtain second production features and normalized disturbance information.

[0089] A first feature input module 204 is configured to input the second production features into a first encoder of a Transformer model to obtain destablized third production features, and the Transformer model includes a destablization attention mechanism.

[0090] A second feature input module 205 is configured to input the normalized disturbance information into a second encoder to obtain target disturbance features, and the structure of the second encoder is the same as that of the first encoder.

[0091] a feature fusion module 206, configured to obtain a fusion feature according to the third production feature and the target disturbance feature;

[0092] a feature decoding module 207, configured to input the fusion feature into a decoder of a Transformer model to obtain an initial material preparation prediction result;

[0093] a denormalization module 208, configured to denormalize the initial material preparation prediction result to obtain a target material preparation prediction result.

[0094] On the basis of the above-mentioned embodiments, the production information includes production plan information, production scheduling information and bill of materials information of the product.

[0095] On the basis of the above-mentioned embodiments, the feature extraction module 202 is specifically configured to extract time sequence features of the production product according to the production plan information, the production scheduling information and the bill of materials information, and take the time sequence features as the first production feature.

[0096] On the basis of the above-mentioned embodiments, the feature fusion module 206 is specifically configured to splice the third production feature and the target disturbance feature to obtain spliced features, and generate the fusion feature according to the spliced features.

[0097] On the basis of the above-mentioned embodiments, the feature fusion module 206 is specifically configured to input the spliced features into a linear layer to obtain the fusion feature output by the linear layer.

[0098] On the basis of the above-mentioned embodiments, the information acquisition module 201 is specifically configured to monitor each production process in the production process of the product, and acquire disturbance information when detecting that an error occurs in the production process.

[0099] On the basis of the above-mentioned embodiments, the disturbance information includes a production process node where the disturbance occurs and a specific reason for the disturbance.

[0100] The material preparation prediction device provided in the embodiments of the present application is contained in a material preparation prediction equipment, and can be used to execute the material preparation prediction method provided in the above-mentioned embodiments, and has corresponding functions and beneficial effects.

[0101] It is worth noting that in the above-mentioned embodiments of the material preparation prediction device, each unit and module included is only divided according to the function logic, but is not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for the convenience of mutual differentiation, and are not used to limit the protection scope of the present application.

[0102] The present embodiment also provides a material preparation prediction equipment, such as Figure 5As shown, the material preparation prediction device 30 comprises a processor 300 and a memory 301.

[0103] The memory 301 is configured to store a computer program 302 and transmit the computer program 302 to the processor 300.

[0104] The processor 300 is configured to execute the steps of the above-mentioned material preparation prediction method embodiment according to the instructions in the computer program 302.

[0105] For example, the computer program 302 can be divided into one or more modules / units, which are stored in the memory 301 and executed by the processor 300 to complete the present application. One or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 302 in the material preparation prediction device 30.

[0106] The material preparation prediction device 30 can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The material preparation prediction device 30 can include, but is not limited to, the processor 300, the memory 301. Those skilled in the art can understand that the material preparation prediction device 30 can include more or less components, or combine certain components, or different components, for example, the material preparation prediction device 30 can also include an input / output device, a network access device, a bus, etc. Figure 5 The above-mentioned material preparation prediction device 30 is only an example and does not constitute a limitation on the material preparation prediction device 30, which can include more or less components than the illustration, or combine certain components, or different components, for example, the material preparation prediction device 30 can also include an input / output device, a network access device, a bus, etc.

[0107] The processor 300 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0108] The memory 301 can be an internal storage unit of the material preparation prediction device 30, for example, a hard disk or a memory of the material preparation prediction device 30. The memory 301 can also be an external storage device of the material preparation prediction device 30, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like equipped on the material preparation prediction device 30. Further, the memory 301 can also include both the internal storage unit and the external storage device of the material preparation prediction device 30. The memory 301 is used to store a computer program and other programs and data required by the material preparation prediction device 30. The memory 301 can also be used to temporarily store data that has been output or is to be output.

[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0110] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0111] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0112] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0113] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in part, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods according to the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various other media that can store computer programs.

[0114] The embodiments of the present application also provide a storage medium containing computer executable instructions, which are used to execute a material preparation prediction method when executed by a computer processor. The method comprises the following steps:

[0115] obtaining production information of a product and obtaining disturbance information in a production process of the product;

[0116] extracting a first production feature from the production information;

[0117] normalizing the first production feature and the disturbance information respectively to obtain a second production feature and normalized disturbance information;

[0118] inputting the second production feature into a first encoder of a Transformer model to obtain a detrended third production feature, the Transformer model comprising a detrended attention mechanism;

[0119] inputting the normalized disturbance information into a second encoder to obtain a target disturbance feature, the structure of the second encoder being the same as that of the first encoder;

[0120] obtaining a fusion feature according to the third production feature and the target disturbance feature;

[0121] inputting the fusion feature into a decoder of the Transformer model to obtain an initial preparation prediction result;

[0122] denormalizing the initial preparation prediction result to obtain a target preparation prediction result.

[0123] Note that the above only describes the preferred embodiments of the present application and the applied technical principles. Those skilled in the art will understand that the embodiments of the present application are not limited to the specific embodiments described herein, and that various obvious changes, reconfigurations and substitutions can be made by those skilled in the art without departing from the scope of the embodiments of the present application. Therefore, although the embodiments of the present application have been described in detail through the above embodiments, the embodiments of the present application are not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the embodiments of the present application, and the scope of the embodiments of the present application is determined by the appended claims.

Claims

1. A method for predicting material preparation, characterized in that, The method comprises the following steps: obtaining production information of a product and obtaining disturbance information in the production process of the product; extracting first production features from the production information; normalizing the first production features and the disturbance information respectively to obtain second production features and normalized disturbance information; inputting the second production features into a first encoder of a Transformer model to obtain de-stationarized third production features, the Transformer model comprising a de-stationarization attention mechanism; inputting the normalized disturbance information into a second encoder to obtain target disturbance features, the structure of the second encoder being the same as that of the first encoder; obtaining fusion features according to the third production features and the target disturbance features; inputting the fusion features into a decoder of the Transformer model to obtain an initial material preparation prediction result; denormalizing the initial material preparation prediction result to obtain a target material preparation prediction result; wherein the production information comprises production plan information, production scheduling information and bill of materials information of the product; wherein the first production features are extracted from the production information, comprising: extracting time series features of producing the product according to the production plan information, the production scheduling information and the bill of materials information, and taking the time series features as the first production features; wherein the disturbance information in the production process of the product is obtained, comprising: monitoring each production process in the production process of the product, and obtaining disturbance information when an error in the production process is detected.

2. The method of claim 1, wherein, The fusion features are obtained according to the third production features and the target disturbance features, comprising: splicing the third production features and the target disturbance features to obtain spliced features; generating fusion features according to the spliced features.

3. The method of claim 2, wherein, The fusion features are generated according to the spliced features, comprising: inputting the spliced features into a linear layer to obtain fusion features output by the linear layer.

4. The method of claim 1, wherein, The disturbance information comprises a production process node where the disturbance occurs and a specific reason for the disturbance.

5. A material preparation forecasting device, characterized by, The method comprises the following steps: an information acquisition module for acquiring production information of a product and acquiring disturbance information in the production process of the product; a feature extraction module for extracting first production features from the production information; a normalization module for normalizing the first production features and the disturbance information respectively to obtain second production features and normalized disturbance information; a first feature input module for inputting the second production features into a first encoder of a Transformer model to obtain de-stationarized third production features, the Transformer model comprising a de-stationarization attention mechanism; a second feature input module for inputting the normalized disturbance information into a second encoder to obtain target disturbance features, the structure of the second encoder being the same as that of the first encoder; a feature fusion module for obtaining fusion features according to the third production features and the target disturbance features; The feature decoding module is configured to input the fused features into a decoder of the Transformer model to obtain an initial material preparation prediction result. The denormalization module is configured to denormalize the initial material preparation prediction result to obtain a target material preparation prediction result. The production information includes production plan information, production scheduling information, and bill of materials information of the product. The feature extraction module is configured to extract time series features of producing the product according to the production plan information, the production scheduling information, and the bill of materials information, and take the time series features as first production features. The information acquisition module is configured to monitor each production process in the production process of the product, and acquire disturbance information when detecting an error in the production process.

6. A material preparation prediction device characterized by comprising: The material preparation prediction device includes a processor and a memory. The memory is configured to store a computer program and transmit the computer program to the processor. The processor is configured to execute a material preparation prediction method according to the instructions in the computer program.

7. A storage medium storing computer-executable instructions, wherein: The computer executable instructions, when executed by a computer processor, are configured to execute a material preparation prediction method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Material pushing method and device, storage medium and electronic equipment

    CN112507234A

  • Industrial material sales prediction method and device based on LightGBM and Informer models

    CN115641161A