Product demand information prediction method, device, prediction platform and medium based on big data

By using the TCN-LSTM model and grid search method for preprocessing and prediction in production demand forecasting, and combining the EM-GMM model to process multi-date production demand data, the problems of weak generalization ability and limited application scope in the existing technology are solved, and more accurate and timely production demand forecasting is achieved.

CN118674491BActive Publication Date: 2025-02-28JINAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410842824.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2025-02-28
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

In the prior art, production demand forecasting methods have problems such as weak generalization ability and limited application scope, and it is difficult to achieve accurate predictions in the face of complex demand and market fluctuations.

Method used

Using a neural network model based on time convolution network (TCN) and long-term memory network (LSTM) and a grid search method, combined with the expected maximum Gaussian hybrid (EM-GMM) model, historical production data are preprocessed and predicted to generate weekly production demand probability distribution parameters of product demand.

Benefits of technology

By improving the preprocessing and prediction capabilities of the model, the accuracy and timeliness of the demand for target products are enhanced, and the problems of weak generalization capabilities and limited application scope are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674491B_ABST
    Figure CN118674491B_ABST
Patent Text Reader

Abstract

The present application relates to a product demand information prediction method, device, prediction platform and medium based on big data. The method comprises: obtaining a first production data time series corresponding to a target product in historical production data corresponding to the target product, and scaling the first production data time series according to a preset rule to generate a second production data time series; inputting the second production data time series into a trained demand prediction model to obtain target demand prediction data corresponding to the target product; using the constructed EM‑GMM model to process all the daily production demand prediction data of the target demand prediction data to generate a production demand prediction result, wherein the production demand prediction result includes a weekly production demand probability distribution parameter corresponding to the target product, and preprocessing and predicting the historical production data by using a TCN‑LSTM model in combination with a grid search method, thereby improving the accuracy of the target product demand prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, platform and medium for predicting product demand information based on big data. Background Art

[0002] Market competition is becoming increasingly fierce and consumer demand is becoming more diversified, which makes accurate prediction of production demand an important means for enterprises to achieve efficient operations, optimize resource allocation, reduce inventory costs and improve customer satisfaction. In the context of constant market fluctuations, it has become crucial for enterprises to design solutions and technologies that can accurately predict the probability distribution of production demand.

[0003] Demand forecasting methods in related technologies, such as linear regression, can predict the trend of production demand to a certain extent, but their prediction accuracy and stability cannot be guaranteed when faced with complex demands and market fluctuations. At the same time, the linear regression model can only predict the trend on a straight line and cannot meet the prediction of complex demands.

[0004] In the related technologies, the use of big data and artificial intelligence technologies to predict production demand can quickly and accurately obtain real-time prediction results. However, the technical solutions that use big data and artificial intelligence to predict the probability distribution of production demand have the problems of insufficient data, weak generalization ability, and limited application scope of the prediction model.

[0005] Currently, the methods for production demand forecasting in related technologies have weak generalization capabilities and limited application scope, and no effective solutions have been proposed yet. Summary of the invention

[0006] The embodiments of the present application provide a product demand information prediction method, device, prediction platform and medium based on big data, so as to at least solve the problems of weak generalization ability and limited application scope of the production demand prediction methods in the related art.

[0007] In a first aspect, an embodiment of the present application provides a product demand information prediction method based on big data, comprising: obtaining a first production data time series corresponding to a target product in the historical production data corresponding to the target product, and scaling the first production data time series according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes the daily production data of a preset number of days; inputting the second production data time series into a trained demand forecasting model to obtain target demand forecasting data corresponding to the target product, wherein the target demand forecasting data is used to characterize all daily production demand forecasts corresponding to the target product within a preset period. The demand forecasting model is a neural network model trained based on a time convolution network (TCN) and a long short-term memory network (LSTM) and a grid search method, and is trained to predict the demand forecasting data of the first product within a preset period based on the historical production data time series corresponding to the first product. The grid search method is used to search for a target hyperparameter combination during the demand forecasting model training process. The historical production data time series is used to characterize the historical daily production data of the first product for a preset number of days. The constructed expectation-maximization Gaussian mixture EM-GMM model is used to process all the daily production demand forecasting data of the target demand forecasting data to generate a production demand forecasting result, wherein the production demand forecasting result includes the weekly production demand probability distribution parameters corresponding to the target product.

[0008] In a second aspect, an embodiment of the present application provides a product demand information prediction device based on big data, comprising:

[0009] an acquisition module, configured to acquire a first production data time series corresponding to the target product from the historical production data corresponding to the target product, and perform scaling processing on the first production data time series according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes the daily production data of a preset number of days;

[0010] A prediction module, used for inputting the second production data time series into a trained demand prediction model to obtain target demand prediction data corresponding to the target product, wherein the target demand prediction data is used to characterize all daily production demand prediction data corresponding to the target product within a preset period, the demand prediction model is a neural network model trained based on a time convolution network TCN and a long short-term memory network LSTM and an introduction of a grid search method, and is trained to predict the demand prediction data of the first product within a preset period based on the historical production data time series corresponding to the first product, the grid search method is used to search for a target hyperparameter combination during the training process of the demand prediction model, and the historical production data time series is used to characterize the historical daily production data of the first product for a preset number of days;

[0011] A processing module is used to use the constructed expectation-maximization Gaussian mixture EM-GMM model to process all the daily production demand forecast data of the target demand forecast data to generate a production demand forecast result, wherein the production demand forecast result includes the weekly production demand probability distribution parameters corresponding to the target product.

[0012] In a third aspect, an embodiment of the present application provides a prediction platform, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the product demand information prediction method based on big data described in the first aspect.

[0013] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the product demand information prediction method based on big data as described in the first aspect above.

[0014] Compared with the related art, the product demand information prediction method, device, prediction platform and storage medium based on big data provided by the embodiments of the present application obtain a first production data time series corresponding to the target product from the historical production data corresponding to the target product, and scale the first production data time series according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset acquisition period, and the first production time series includes the daily production data of a preset number of days; the second production data time series is input into a trained demand prediction model to obtain target demand prediction data corresponding to the target product, wherein the target demand prediction data is used to characterize all daily production demand prediction data corresponding to the target product within a preset period, and the demand prediction model is a neural network model trained based on a time convolutional network TCN and a long short-term memory network LSTM and an introduction of a grid search method, and is trained to predict the demand prediction data of the first product within a preset period based on the historical production data time series corresponding to the first product, and the grid search method is used to During the training process of the demand forecasting model, a target hyperparameter combination is searched, and the historical production data time series is used to characterize the historical daily production data of a preset number of days for the first product; the constructed expectation-maximization Gaussian mixture EM-GMM model is used to process all the daily production demand forecasting data of the target demand forecasting data to generate a production demand forecasting result, wherein the production demand forecasting result includes the weekly production demand probability distribution parameter corresponding to the target product; the historical production data is preprocessed and predicted by using the TCN-LSTM model in combination with the grid search method, thereby improving the accuracy of the target product demand forecasting; by introducing the grid search method, the optimal hyperparameters can be automatically found when training the demand forecasting model, thereby accelerating the model convergence speed; at the same time, the EM-GMM model is used to process the production demand forecasting data of multiple dates, which can optimize the forecasting results and better retain the prior information of the data, thereby improving the forecasting accuracy; by using the historical production data time series for forecasting, it can ensure that the forecasting results have strong timeliness and stability, and solve the problems of weak generalization ability and limited application scope of the production demand forecasting methods in related technologies.

[0015] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1It is a hardware structure block diagram of a terminal of a product demand information prediction method based on big data according to an embodiment of the present application;

[0018] Figure 2 is a flowchart of a method for predicting product demand information based on big data according to an embodiment of the present application;

[0019] Figure 3 It is a structural block diagram of a product demand information prediction device based on big data according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.

[0021] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0022] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation and may represent the singular or plural. The terms "including", "comprising", "having" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include unlisted steps or units, or may also include other steps or units inherent to these processes, methods, products or devices. The "multiple links" involved in this application refer to links greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific ordering of objects.

[0023] Before describing the specific embodiments of the present application, the related technologies of the present application are described as follows:

[0024] Grid Search is a method used in machine learning to determine the best model hyperparameters. By setting a list of candidate values ​​for hyperparameters, Grid Search will traverse all possible parameter combinations and perform model training and evaluation for each set of parameters. Finally, the parameter combination with the best performance is selected as the model's hyperparameters.

[0025] TCN-LSTM Time Series Convolution

[0026] Temporal Convolutional Network (TCN)

[0027] TCN is a neural network architecture specifically designed for processing time series data. TCN has two basic principles: one is to keep the input and output lengths of the sequence unchanged; the other is to ensure that future information does not leak into the past when processing time series. TCN includes:

[0028] 1. Causal Convolution

[0029] TCN uses causal convolutions to ensure that when predicting values ​​at future time steps, it can only rely on information from the current and previous time steps. This is achieved by restricting the convolution operation to only operate on the sequence before the current time step.

[0030] 2. Dilated convolution

[0031] Through dilated convolutions (also called expanded convolutions or hole convolutions), TCN can expand its receptive field (the range of historical information that the model can observe) without losing temporal resolution. For example, a 3x3 convolution kernel with a dilation rate of 2 actually covers a 5x5 area but uses only 9 weights, which allows TCN to capture dependencies over a longer range.

[0032] 3. No offset filling

[0033] To keep the temporal length of the output the same as the input, TCN ensures temporal alignment by adding appropriate zero padding before the convolutional layers. This way, the length of the output sequence will be the same as the length of the input sequence even when using a larger dilation rate.

[0034] Long Short-Term Memory (LSTM)

[0035] LSTM is a special type of RNN (recurrent neural network) designed specifically to learn long-term dependent information. During the calculation process of LSTM, nodes pass information through a special connection called "cell state", which is responsible for storing the information that the network wants to remember and controls the flow of information through three gates - forget gate, input gate and output gate.

[0036] The forget gate determines what information to discard from the cell state. It reads the hidden state h of the previous sequence. t-1 and the current input x t , and then the sigmoid function outputs a value between 0 and 1, which determines the degree to which each element in the cell state is retained; the input gate determines which new information should be added to the cell state. This process is done in two steps: first, the sigmoid layer determines which values ​​need to be updated, and then a tanh layer creates a new candidate cell state vector ; The results of the forget gate and the input gate are combined to update the cell state. First, the result of the forget gate is multiplied by the old cell state to discard the information that needs to be discarded. Then, the product of the result of the input gate and the new candidate cell state is added to obtain the new cell state. The output gate determines which part of the information will be output. First, the sigmoid layer determines which part of the cell state will be output. Then, the cell state is processed by the tanh function (mapping the value between -1 and 1) and multiplied by the output of the sigmoid layer to obtain the final output.

[0037] EM-GMM algorithm

[0038] The EM (Expectation-Maximization) algorithm is often referred to as the EM algorithm or the expectation maximization algorithm. It is often used to estimate the parameters of probability models with hidden variables, especially when the data is missing or contains hidden variables. The core idea is to find the maximum likelihood estimate of the model parameters in an iterative way. When processing GMM, it is assumed that the observed random variable X is a mixture of K different Gaussian distributions. These Gaussian distributions have their own weights, means, and variances. , , ; In the EM algorithm, each observation data point is considered to be generated by some unknown mixture component (implicit parameter z). This implicit parameter z represents the data point Which Gaussian distribution does it belong to? Since this information is unknown, it needs to be estimated through the iterative process of the EM algorithm. The algorithm starts by giving the mean of each component of the GMM ,variance and weight Assign initial values, and then gradually update the values ​​of these parameters through the iteration of the E step (expectation step) and M step (maximization step) of the EM algorithm until a certain convergence condition is met. In the E step, the probability that each data point belongs to each component is calculated based on the current parameter estimate (that is, the expectation of the implicit parameter z). In the M step, these probabilities are used to re-estimate the parameters of the model to maximize the likelihood function of the observed data. Through such an iterative process, the EM algorithm can gradually find the GMM parameter estimates that maximize the likelihood of the observed data.

[0039] The specific embodiments of the present application are described below:

[0040] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 1 1 is a hardware structure block diagram of a terminal of a product demand information prediction method based on big data according to an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0041] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the product demand information prediction method based on big data in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0042] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0043] This embodiment provides a product demand information prediction method based on big data running on the above terminal. Figure 2 is a flowchart of a method for predicting product demand information based on big data according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0044] Step S201, in the historical production data corresponding to the target product, obtain the first production data time series corresponding to the target product, and scale the first production data time series according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes daily production data of a preset number of days.

[0045] In this embodiment, the prediction of product demand information refers to the production demand information (for example, production demand probability distribution) of a certain product or a certain category of products (for example, popular and representative coating products) that are currently being processed and produced in the future (for example, 1 year); in order to improve the accuracy of the forecast of the target product demand, the historical production data is preprocessed and forecasted. Therefore, the historical production data corresponding to the target product is obtained before the forecast is made; at the same time, because the corresponding historical production data is the production data corresponding to the target product in a longer period of time (for example, 10 years), by obtaining part of the data close to the current time (favorable to the production data within the past 1 year), that is, the first production data time series, and then using this part of the data for subsequent demand information forecasting; in this embodiment, in order to eliminate the influence of dimensional differences and outliers, the first production data time series is scaled to generate a second production data time series for input into the demand forecasting model.

[0046] Step S202: input the second production data time series into the trained demand forecasting model to obtain target demand forecasting data corresponding to the target product, wherein the target demand forecasting data is used to characterize all daily production demand forecasting data corresponding to the target product within a preset period. The demand forecasting model is a neural network model trained based on the time convolution network TCN and the long short-term memory network LSTM and the introduction of the grid search method, and is trained to predict the demand forecasting data of the first product within a preset period based on the historical production data time series corresponding to the first product. The grid search method is used to search for the target hyperparameter combination during the demand forecasting model training process, and the historical production data time series is used to characterize the historical daily production data of the first product for a preset number of days.

[0047] In this embodiment, the demand forecasting model is trained by using deep learning technologies such as temporal convolutional network TCN and long short-term memory network LSTM, combined with grid search method. By introducing the grid search method, it is possible to automatically find the optimal hyperparameters when training the demand forecasting model, thereby accelerating the model convergence speed. In this embodiment, the demand forecasting model is used to obtain the daily production demand forecast data corresponding to each day of the preset period (for example: the next 1 year).

[0048] Step S203, using the constructed expectation-maximization Gaussian mixture EM-GMM model, process all daily production demand forecast data of the target demand forecast data to generate a production demand forecast result, wherein the production demand forecast result includes the weekly production demand probability distribution parameters corresponding to the target product.

[0049] In this embodiment, the daily production demand forecast data of the target product within a certain period in the future (preset period) is fitted using the EM-GMM model to obtain a daily production demand probability density curve, and then the daily production demand probability density curve is converted into a daily production demand discrete probability distribution. After that, all daily production demand discrete probability distributions within a certain period in the future are converted into weekly production demand discrete probability distributions, that is, converted into weekly production demand probability distribution parameters to obtain corresponding production demand forecast results; in some embodiments, the daily production demand discrete probability distribution and the weekly production demand discrete probability distribution are represented by corresponding histograms; in this embodiment, the EM-GMM model is used to process production demand forecast data for multiple dates, which can better retain the prior information of the data and improve the prediction accuracy.

[0050] Through the above steps S201 to S203, a first production data time series corresponding to the target product is obtained from the historical production data corresponding to the target product, and the first production data time series is scaled according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes daily production data of a preset number of days; the second production data time series is input into the trained demand forecasting model to obtain target demand forecasting data corresponding to the target product, wherein the target demand forecasting data is used to characterize all daily production demand forecasting data corresponding to the target product within a preset period, and the demand forecasting model is a neural network model trained based on a time convolutional network TCN and a long short-term memory network LSTM and an introduction of a grid search method, and is trained to predict the demand forecasting data of the first product within a preset period based on the historical production data time series corresponding to the first product, and the grid search method is used to search for target hyperparameter combinations during the demand forecasting model training process The historical production data time series is used to characterize the historical daily production data of the preset days of the first product; the constructed expectation-maximization Gaussian mixture EM-GMM model is used to process all daily production demand forecast data of the target demand forecast data to generate production demand forecast results, where the production demand forecast results include the weekly production demand probability distribution parameters corresponding to the target product. The historical production data is preprocessed and predicted by using the TCN-LSTM model in combination with the grid search method, thereby improving the accuracy of the target product demand forecast. By introducing the grid search method, the optimal hyperparameters can be automatically found when training the demand forecast model, accelerating the model convergence speed; at the same time, the EM-GMM model is used to process the production demand forecast data of multiple dates, which can optimize the forecast results and better retain the prior information of the data, thereby improving the forecast accuracy; by using the historical production data time series for forecasting, it can ensure that the forecast results have strong timeliness and stability, and solve the problems of weak generalization ability and limited application scope of the production demand forecasting methods in related technologies.

[0051] It should be noted that the embodiment of the present application uses deep learning technologies such as time convolution network TCN and long short-term memory network LSTM, combined with grid search method, to preprocess and predict historical production data, thereby improving the accuracy of target product demand forecasting, and also proposes a method based on expectation-maximization Gaussian mixture EM-GMM model to process and predict daily production demand forecast data for multiple dates to further optimize the forecast results.

[0052] In some embodiments, scaling the first production data time series according to a preset rule to generate a second production data time series is achieved by the following steps:

[0053] Step 21, determining the production data mean and the production data standard deviation corresponding to the first production data time series according to the data volume of all daily production data in the first production data time series and the corresponding preset number of days.

[0054] In this embodiment, the data volume of all daily production data in the first production data time series and the number of daily production data represented by the corresponding preset days are first counted, and then the mean value and standard deviation of the production data corresponding to the first production data time series are calculated, wherein the mean value of the production data is calculated according to the following formulas: and standard deviation :

[0055]

[0056]

[0057] n is the number of daily production data, x i is the daily production data of the i-th day.

[0058] Step 22, based on the production data mean and the production data standard deviation, calculate the standard score corresponding to each daily production data, wherein the second production data time series includes the standard scores corresponding to all daily production data.

[0059] In this embodiment, the standard score corresponding to each daily production data is obtained by subtracting the mean value of the production data from each daily production data and dividing it by the standard deviation of the production data, thereby converting all daily production data into a standard normal distribution with a mean of 0 and a standard deviation of 1. In this embodiment, the standard score is calculated according to the following formula: .

[0060] Through the above steps 21 to 22, the production data used to predict production demand can be scaled using preset rules to eliminate the randomness and complexity in the historical daily production data, making the production data analysis more accurate and effective; at the same time, by standardizing the historical daily production data, the corresponding daily production data can be converted into comparable standard scores, thereby facilitating comparative analysis at different time points or under different production conditions.

[0061] In some embodiments, the constructed expectation-maximization Gaussian mixture EM-GMM model is used to process all daily production demand forecast data of the target demand forecast data to generate a demand forecast result, including the following steps:

[0062] Step 31, using the EM-GMM model, perform E-step and M-step calculation iterations on all daily production demand forecast data of the target demand forecast data, until the fitted daily production demand probability density curve converges.

[0063] In some optional implementations, performing E-step and M-step calculation iterations on all daily production demand forecast data of the target demand forecast data includes the following steps:

[0064] Step 1: Initialize parameters

[0065] Set the number of Gaussian distributions k and initialize the model parameters of each Gaussian distribution (including mean ,variance , weight ), randomly select k non-repeated daily production demand forecast data from all the input daily production demand forecast data as the initial mean, calculate the standard deviation of all the input daily production demand forecast data, and use the standard deviation as the initial standard deviation of all Gaussian distributions. The initial weight is .

[0066] Step 2: E (expectation step)

[0067] Use the model parameters obtained in the previous iteration (If it is the first iteration, use the given initial value) and calculate the implicit parameters as follows The expectation of (representing the Gaussian distribution to which each predicted demand data belongs) is to calculate the probability that each demand data comes from each Gaussian distribution.

[0068] Step 2.1. Create a Gaussian distribution object using the initialized model parameters, and use the Gaussian distribution probability density function (PDF) formula to calculate the probability that each demand data belongs to each Gaussian distribution. :

[0069]

[0070] Among them, x is a daily production data, μ is the mean of the current Gaussian distribution, is the standard deviation of the current Gaussian distribution.

[0071] Step 2.2: The probability of Multiply it by the weight ε of the corresponding Gaussian distribution and normalize all weighted probabilities to obtain the normalized probability that each demand data belongs to each Gaussian distribution.

[0072] Step 3: M step (maximization step)

[0073] Using the expectation of the implicit parameter z obtained in step 2 (i.e., the normalized weighted probability), update the model parameters of each Gaussian distribution according to the following formula, including updating the mean, updating the variance, and updating the weight, where: Update the mean by Update the variance by Update the weights, is the probability that the i-th day production data belongs to the k-th Gaussian distribution, , is the production data of the ith day, n k is the weighted probability sum of all daily production data being assigned to the kth Gaussian distribution, n is the total number of daily production data, , K is the total number of Gaussian distributions.

[0074] In this embodiment, when calculating the variance, in order to avoid division by 0, a very small positive number is added to the denominator in each calculation. After the calculation is completed, the updated .

[0075] Step 4: Repeat steps 2 and 3 until the model parameter θ converges (i.e., the change is within a certain range) or the maximum number of iterations is reached.

[0076] Step 32, perform probability distribution P-step calculation on all daily production demand probability density curves to generate daily production demand probability distribution parameters corresponding to each daily production demand forecast data, wherein the daily production demand probability distribution parameters are used to characterize the integral of the daily production demand probability density curve within a preset value range.

[0077] In this embodiment, after obtaining the daily production demand probability density curve corresponding to each day, in order to obtain the daily discrete probability distribution corresponding to each daily production demand forecast data, the integral within each forecast demand value interval is calculated, that is, the integral within each daily production demand forecast data rank interval is calculated according to the following formula: , where i is any integer within the value range of the daily production demand probability density curve.

[0078] Step 33, based on the daily production demand probability distribution parameters, generate alternative weekly production demand probability distribution parameters, select target weekly production demand probability distribution parameters from the alternative weekly production demand probability distribution parameters, and use the target weekly production demand probability distribution parameters as the weekly production demand probability distribution parameters corresponding to the target product to generate a demand forecast result.

[0079] In some optional implementations, step 33 generates alternative weekly production demand probability distribution parameters based on daily production demand probability distribution parameters, and selects target weekly production demand probability distribution parameters from the alternative weekly production demand probability distribution parameters, which is achieved by the following steps:

[0080] Step 311, performing polynomial distribution calculation on all daily production demand probability distribution parameters to generate multiple candidate weekly production demand probability distribution parameters.

[0081] In this embodiment, after obtaining the daily production demand probability distribution parameters, a polynomial distribution calculation is performed, and the daily discrete probability distribution of each day is assumed to be independent and the same, according to the following formula: (x1, x2, ..., x n )~PN(n:p1,p2,…,p n ) to obtain the probability distribution parameters of multiple alternative weekly production demands, where x1, x2, …, x n is the daily production data that can be obtained every day, n: p1, p2, ..., p n To obtain the corresponding probability of each possible daily production data.

[0082] Step 312, determine the probability value corresponding to each alternative weekly production demand probability distribution parameter, and select the alternative weekly production demand probability distribution parameter with a probability value greater than a preset probability threshold from multiple alternative weekly production demand probability distribution parameters to obtain the target weekly production demand probability distribution parameter.

[0083] In this embodiment, after obtaining multiple candidate weekly production demand probability distribution parameters, the corresponding probability values ​​less than the preset threshold (for example, 1×10 -4 ) to obtain the probability distribution parameters of production demands in multiple target weeks.

[0084] Through steps 31 to 33, by performing multiple rounds of E-step and M-step calculation iterations on all daily production demand forecast data of the target demand forecast data, a more accurate daily production demand probability density curve is obtained, thereby improving the accuracy of the prediction of the actual daily production demand; by performing the probability distribution P-step calculation, the corresponding integral parameter of each daily production demand probability density curve can be obtained, and then used to characterize the impact of demand changes within a preset value range, thereby making the sensitivity prediction of demand changes more accurate; at the same time, the EM-GMM model is used to reduce the calculation complexity, improve the operation efficiency, and improve the processing efficiency of product demand forecasting.

[0085] In order to evaluate the error of the production demand forecast result and judge the forecast effect, in some embodiments, the production demand forecast result also includes the forecast deviation value corresponding to the weekly production demand probability distribution parameter. After the demand forecast result is generated, the following steps are further implemented:

[0086] Step 41: acquiring a third production data time series from the historical production data, wherein the third production data time series includes daily production data of a preset number of days before the first production data time series.

[0087] Step 42, after the third production data time series is scaled, the processed third production data series is input into the demand forecasting model for forecasting, and the historical demand forecasting data obtained by the forecasting is processed using the EM-GMM model to generate the historical weekly production demand probability distribution parameters corresponding to the third production data time series.

[0088] In this embodiment, daily production data of a preset number of days before the last 365 days are selected and input into the trained TCN-LSTM model to obtain historical demand forecast data corresponding to the target product in the last 365 days, that is, the daily production data in the year before the nth year (for example: the next year is the 11th year, and the nth year is the 10th) (that is, all daily production data in the 9th year, corresponding to the third production data time series) is used as input data to predict all daily production demand forecast data corresponding to the target product in the nth year (corresponding to the historical demand forecast data); then, the EM-GMM model is used to process the historical demand forecast data corresponding to the last 365 days (nth year), for example: the EM-GMM model is used to fit all daily production data corresponding to the historical demand forecast data to obtain the daily production demand probability density curve for each day in the last 365 days, and then the daily production demand probability density curve is converted into a daily production demand discrete probability distribution, and then all daily production demand discrete probability distributions in the last 365 days are converted into weekly production demand discrete probability distributions, that is, converted into historical weekly production demand probability distribution parameters.

[0089] Step 43, all daily production data in the first production data time series are merged by week to obtain historical weekly total production data, and the frequency of each historical weekly total production data is determined among all historical weekly total production data, and the first probability corresponding to each historical weekly total production data is calculated based on the frequency and the total number of weeks corresponding to the first production data time series.

[0090] In this embodiment, from back to front, on a weekly basis, all daily production data in the corresponding first production data time series within the last 365 days are merged to obtain the historical weekly total production data corresponding to each week. If the last remaining number of days is less than 7 days, these incomplete daily production data are not included in the merger. Afterwards, the occurrence frequency of the historical weekly total production data corresponding to the historical weekly total production data is calculated, and the occurrence frequency of all historical weekly total production data within the last 365 days is divided by the total number of weeks to obtain the probability of the historical weekly total production data.

[0091] Step 44, based on the difference between the probability value corresponding to each historical weekly production demand probability distribution parameter and the corresponding first probability, calculate the root mean square error and the average percentage error corresponding to the historical weekly production demand probability distribution parameter, and use the root mean square error and the average percentage error as the prediction deviation value corresponding to the weekly production demand probability distribution parameter.

[0092] In this embodiment, two evaluation indicators can be calculated by using the predicted historical weekly production demand probability distribution parameters and the calculated probability of historical weekly total production data: RMSE (root mean square error) and MAPE (mean percentage error), so as to evaluate the prediction accuracy of the model.

[0093] Through the above steps 41 to 44, a statistical evaluation of the error of the production demand forecast result is achieved to determine the accuracy and acceptability of the forecast result.

[0094] It can and should be understood that by calculating the error between the actual demand information and the predicted demand information before the current production demand forecast year, the deviation of the production demand forecast results obtained by the corresponding method can be evaluated, and the error evaluation is carried out using the forecast data and actual data in a cycle close to the current cycle. While ensuring that the evaluation can be achieved, the forecast results are ensured to have strong timeliness and stability. At the same time, it is also necessary to understand that because the current production demand forecast results are production demand forecast information for a period of time in the future, and the actual production data for a period of time in the future is unknown, it is impossible to evaluate the corresponding forecast error based on the comparison of the current production demand forecast results with the corresponding actual data.

[0095] In some embodiments, the training of the demand forecasting model includes the following steps:

[0096] Step 51, divide the pre-collected historical production data corresponding to the target product into a training data set and a test data set according to a set period, and scale the training sequences corresponding to the training data set and the test data set respectively to generate multiple standard training sequences and multiple standard test sequences, wherein the training data set and the test data set both include corresponding daily production data, and each training sequence includes multiple daily production data obtained by evenly dividing all daily production data corresponding to the training data set or the test data set.

[0097] In this embodiment, the historical production data corresponding to the target product collected in advance are divided according to years. For example, among the historical production data of 10 years, the historical production data of the first six years are used as the training set, and the historical production data of the last four years are used as the test set. For each data set (training set and test set), only the daily production data of the time series is retained; in this embodiment, after the training set and the test set are divided, a corresponding training sequence is created, that is, multiple daily production data in the training data set and the test data set (the corresponding number is the number of time windows w for training) are created as a training sequence, and a target sequence is also created. The target sequence is initially empty training, and the number of daily production data corresponding to it is the number of prediction steps n. The target sequence is used to store the daily production data generated by the prediction of the model during the training process; it should be understood that the training sequence is created at each time point of the training set and contains a sequence of the next w daily production data, and the target sequence includes the predicted values ​​of the next n daily production data obtained based on the corresponding training sequence. At the same time point, the existing predicted values ​​will be overwritten by the new predicted values ​​in subsequent iterations.

[0098] In this embodiment, after creating the corresponding training sequence, each daily production data in all training sequences is preprocessed including a scaling operation to eliminate the influence of dimensional differences and outliers; it should be noted that the steps of the corresponding scaling operation refer to the above-mentioned scaling processing operation of the relevant input data used for prediction, and will not be repeated here.

[0099] Step 52, after the first features obtained by extracting features from multiple standard training sequences using TCN are sequentially input into the LSTM model, the model is trained through a back-propagation algorithm to generate multiple alternative LSTM models and a hyperparameter combination corresponding to each alternative LSTM model, and the average loss value currently corresponding to each alternative LSTM model is determined based on the loss values ​​of the multiple first predicted daily production data output by the training of each alternative LSTM model and the daily production data corresponding to the corresponding standard training sequences.

[0100] In this embodiment, the use of TCN to extract features from multiple standard training sequences includes: the input training sequence first passes through a one-dimensional convolution layer to achieve weight normalization, the output after the convolution operation is cropped to remove the extra part caused by padding, and then, after passing through the ReLU activation function, the activated output will randomly set some elements to zero according to the discard rate to prevent overfitting, and then, the first one-dimensional convolution layer performs a similar operation on the first data corresponding to the daily production data in the training sequence after processing through the second one-dimensional convolution layer, and the obtained second data is output as the main path, that is, a new time series corresponding to the training sequence is generated, which contains the temporal feature representation of the daily production data; when the feature dimensions of the corresponding training sequence and the output new time series are different, a 1×1 convolution layer (also called a point convolution layer) is used to adjust the number of channels of the input data so that it can be added to the features of the output new time series; if the feature dimensions are the same, no additional processing is performed on the input data. The third data thus obtained is used as the output of the residual path; then, the second data feature (time series feature) output by the main path and the data feature of the third data output by the residual path are added element by element, and the final feature representation of the sequence data is obtained through the ReLU activation function as the feature output, which is the first feature.

[0101] In this embodiment, after the first feature is extracted by TCN, the first feature is sequentially input into the LSTM model. Prior to this, the LSTM state is initialized, and the hidden state and the cell state are all set to zero. Then, the input first feature is combined with the current hidden state and the cell state and input into the LSTM layer. The LSTM layer performs iterative processing in the order of the time series. Each iteration updates the output, hidden state and cell state according to the input, hidden state and cell state. After several iterations, the final hidden state is obtained. In the iterative process of LSTM, the update of each time step includes: forget gate, input gate and output gate, among which the forget gate reads the output of the previous sequence model. and the input of the current model To decide which information in the cell state to keep or forget, press f t =α(W f [h t-1 , x t +b f ]) Calculate the forget gate output f t , α represents the sigmoid activation function, W f represents the weight of the forget gate, b f represents the bias of the forget gate; the input gate is divided into two parts, one part determines which new information needs to be updated to the cell state, and the other part calculates what the new information is; in this embodiment, according to formula i t =α(Wi [h t-1 , x t ]+b i ]) Calculate the input gate input i t And according to the formula =tanh(W c ·[h t-1 , x t ]+b c ) Calculate new candidate cell states ,i t It also indicates the cell state to be updated, W i and W c are the weights of the input gate and cell state update, b i and b c is the corresponding bias, tanh() is the tanh activation function; in this embodiment, the cell state update includes replacing the old cell state C t-1 And forget gate output f t Multiply, forget unnecessary information, and then add input gate i t and the new cell state The product of to update the cell state, the corresponding formula is C t =f t ×C t-1 +i t × The output gate determines which information needs to be output from the cell state, where, according to formula O t =α(W o [h t-1 , x t ]+b o ]) Calculate the output gate output O t , according to the formula h t =O t ×tanh(C t ) calculates the LSTM output of the current time step, W o is the weight of the output gate, b o is the bias of the output gate.

[0102] In this embodiment, the ReLU activation function is used to perform a nonlinear transformation on the time series output of the hidden state of the LSTM to obtain the first predicted daily production data; in this embodiment, the nonlinear response of the model to the demand data at a specific time and the feature selection results are passed as input to a fully connected layer, which is used to capture the long-term dependencies of the sequence data. Then, the output data with the same length as the number of prediction steps is taken as the predicted data features of the first predicted daily production data, and the obtained predicted data features are subjected to an inverse standard scaling operation, that is, multiplied by the standard deviation of the training set data and added to its mean, so as to convert back to the scale of the original data to obtain the first predicted daily production data.

[0103] In this embodiment, the predicted data of the training set (corresponding to the first predicted daily production data) and the original data (corresponding to the daily production data corresponding to the standard training sequence) are used to calculate the loss value of each data point, and then all the loss values ​​are added and divided by the number of data to obtain the average loss value; in some optional implementations, the mean square error (MST) is selected as the evaluation index to measure the sum of the squares of the differences between the predicted data and the actual data (corresponding to the daily production data corresponding to the standard training sequence) on the same day. The smaller the MSE value, the better the fitting effect. The corresponding calculation formula is: , where xi is the daily production data of the i-th day, is the first predicted daily production data of the i-th day, and n is the total number of daily production data.

[0104] Step 53, using the grid search method and the average loss value currently corresponding to each candidate LSTM model, search for the current optimal LSTM model and target hyperparameters from multiple candidate LSTM models, where the target hyperparameters are the hyperparameter combination corresponding to the current optimal LSTM model, and the target hyperparameters include at least the learning rate, the number of hidden layer units, and the dimension of the hidden layer state.

[0105] In some of the optional implementations, the current optimal LSTM model and target hyperparameters are searched from multiple alternative LSTM models using a grid search method and the average loss value currently corresponding to each alternative LSTM model, including: using a grid search method to traverse the average loss values ​​and hyperparameter combinations currently corresponding to multiple alternative LSTM models, and selecting the alternative LSTM model with the smallest average loss value as the current optimal LSTM model, and using the hyperparameter combination corresponding to the alternative LSTM model with the smallest average loss value as the target hyperparameter.

[0106] In this embodiment, the average loss value will be used as the basis for hyperparameter optimization. The grid search method is used to find the optimal hyperparameter combination within the set hyperparameter range, including the learning rate, the number of hidden layer units, and the dimension of the hidden layer state, to determine the optimal hyperparameter combination that minimizes the average loss value. After determining the optimal hyperparameters, the trained model is used, combined with historical data and predicted days, to calculate the predicted values ​​within the historical time and the predicted time.

[0107] Step 54, based on the target hyperparameters corresponding to each training and multiple standard training sequences, the current optimal LSTM model obtained by each training is trained iteratively, and the candidate LSTM model generated by the iterative training is tested using multiple standard test sequences to detect the target LSTM model whose average loss value meets the preset loss value threshold, and obtain the demand forecasting model.

[0108] In this embodiment, the test set data is input into the trained model, and the prediction effect of the model is evaluated by the MSE indicator.

[0109] Through the above steps 51 to 54, the demand forecasting model is trained by using deep learning technologies such as temporal convolutional network TCN and long short-term memory network LSTM, combined with grid search method training. By introducing the grid search method, it is possible to automatically find the optimal hyperparameters when training the demand forecasting model, thereby accelerating the model convergence speed.

[0110] This embodiment also provides a product demand information prediction device based on big data, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the terms "module", "unit", "subunit", etc. can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0111] Figure 3 is a structural block diagram of a product demand information prediction device based on big data according to an embodiment of the present application, such as Figure 3 As shown, the device includes an acquisition module 31, a prediction module 32 and a processing module 33, wherein:

[0112] The acquisition module 31 is used to acquire a first production data time series corresponding to the target product from the historical production data corresponding to the target product, and perform scaling processing on the first production data time series according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes daily production data of a preset number of days;

[0113] The prediction module 32 is coupled to the acquisition module 31 and is used to input the second production data time series into the trained demand prediction model to obtain the target demand prediction data corresponding to the target product, wherein the target demand prediction data is used to characterize all daily production demand prediction data corresponding to the target product within a preset period, and the demand prediction model is a neural network model trained based on the time convolution network TCN and the long short-term memory network LSTM and the introduction of the grid search method, and is trained to predict the demand prediction data of the first product within a preset period based on the historical production data time series corresponding to the first product. The grid search method is used to search for the target hyperparameter combination during the demand prediction model training process, and the historical production data time series is used to characterize the historical daily production data of the first product for a preset number of days;

[0114] The processing module 33 is coupled to the prediction module 32, and is used to use the constructed expectation-maximization Gaussian mixture EM-GMM model to process all daily production demand forecast data of the target demand forecast data, and generate production demand forecast results, wherein the production demand forecast results include the weekly production demand probability distribution parameters corresponding to the target product.

[0115] Through the product demand information prediction device based on big data of the embodiment of the present application, a first production data time series corresponding to the target product is obtained from the historical production data corresponding to the target product, and the first production data time series is scaled according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes daily production data of a preset number of days; the second production data time series is input into a trained demand prediction model to obtain target demand prediction data corresponding to the target product, wherein the target demand prediction data is used to characterize all daily production demand prediction data corresponding to the target product within a preset period, and the demand prediction model is a neural network model trained based on a time convolutional network TCN and a long short-term memory network LSTM and an introduction of a grid search method, and is trained to predict the demand prediction data of the first product within a preset period based on the historical production data time series corresponding to the first product, and the grid search method is used to search for target hyperparameters during the demand prediction model training process. The historical production data time series is used to characterize the historical daily production data of the preset days of the first product; the constructed expectation-maximization Gaussian mixture EM-GMM model is used to process all daily production demand forecast data of the target demand forecast data to generate production demand forecast results, where the production demand forecast results include the weekly production demand probability distribution parameters corresponding to the target product. The historical production data are preprocessed and predicted by using the TCN-LSTM model in combination with the grid search method, thereby improving the accuracy of the target product demand forecast. By introducing the grid search method, the optimal hyperparameters can be automatically found when training the demand forecast model, accelerating the model convergence speed; at the same time, the EM-GMM model is used to process the production demand forecast data of multiple dates, which can optimize the forecast results and better retain the prior information of the data, thereby improving the forecast accuracy; by using the historical production data time series for forecasting, it can ensure that the forecast results have strong timeliness and stability, and solve the problems of weak generalization ability and limited application scope of the production demand forecasting methods in related technologies.

[0116] In some embodiments, the acquisition module 31 further includes:

[0117] The determination unit is used to determine the production data mean and the production data standard deviation corresponding to the first production data time series according to the data volume of all daily production data in the first production data time series and the corresponding preset number of days.

[0118] The calculation unit is coupled to the determination unit and is used to calculate the standard score corresponding to each daily production data based on the production data mean and the production data standard deviation, wherein the second production data time series includes the standard scores corresponding to all daily production data.

[0119] In some embodiments, the processing module 33 further includes:

[0120] The iteration unit is used to use the EM-GMM model to perform E-step and M-step calculation iterations on all daily production demand forecast data of the target demand forecast data, until the fitted daily production demand probability density curve converges;

[0121] A generation unit, coupled with the iteration unit, is used to perform a P-step probability distribution calculation on all daily production demand probability density curves, and generate daily production demand probability distribution parameters corresponding to each daily production demand forecast data, wherein the daily production demand probability distribution parameters are used to characterize the integral of the daily production demand probability density curve within a preset value range;

[0122] The processing unit is coupled to the generating unit and is used to generate alternative weekly production demand probability distribution parameters based on the daily production demand probability distribution parameters, select the target weekly production demand probability distribution parameters from the alternative weekly production demand probability distribution parameters, and use the target weekly production demand probability distribution parameters as the weekly production demand probability distribution parameters corresponding to the target product to generate a demand forecast result.

[0123] In some of the embodiments, the processing unit is also used to perform polynomial distribution calculations on all daily production demand probability distribution parameters to generate multiple alternative weekly production demand probability distribution parameters; determine the probability value corresponding to each alternative weekly production demand probability distribution parameter, and select the alternative weekly production demand probability distribution parameter with a probability value greater than a preset probability threshold from the multiple alternative weekly production demand probability distribution parameters to obtain the target weekly production demand probability distribution parameter.

[0124] In some embodiments, the production demand forecast result also includes a forecast deviation value corresponding to the weekly production demand probability distribution parameter. After generating the demand forecast result, the device is further used to obtain a third production data time series from the historical production data, wherein the third production data time series includes daily production data of a preset number of days before the first production data time series; after the third production data time series is scaled, the processed third production data series is input into the demand forecast model for forecasting, and the historical demand forecast data obtained by forecasting is processed using the EM-GMM model to generate the historical weekly production demand probability distribution parameter corresponding to the third production data time series. number; merge all daily production data in the first production data time series by week to obtain the historical weekly total production data, and determine the frequency of each historical weekly total production data in all historical weekly total production data, and calculate the first probability corresponding to each historical weekly total production data according to the frequency and the total number of weeks corresponding to the first production data time series; calculate the root mean square error and average percentage error corresponding to the historical weekly production demand probability distribution parameter according to the difference between the probability value corresponding to each historical weekly production demand probability distribution parameter and the corresponding first probability, and use the root mean square error and the average percentage error as the prediction deviation value corresponding to the weekly production demand probability distribution parameter.

[0125] In some of the embodiments, the demand forecasting model is trained by the following steps: the historical production data corresponding to the target product collected in advance is divided into a training data set and a test data set according to a set period, and the training sequences corresponding to the training data set and the test data set are scaled to generate multiple standard training sequences and multiple standard test sequences, wherein the training data set and the test data set both include corresponding daily production data, and each training sequence includes multiple daily production data obtained by evenly dividing all daily production data corresponding to the training data set or the test data set; after the first features obtained by feature extraction of multiple standard training sequences using TCN are sequentially input into the LSTM model, the model is trained by the back propagation algorithm to generate multiple candidate LSTM models and the hyperparameter combination corresponding to each candidate LSTM model, and the multiple outputs of each candidate LSTM model training are output according to the multiple outputs of each candidate LSTM model training. The loss value of the daily production data corresponding to the first predicted day and the corresponding standard training sequence is used to determine the average loss value currently corresponding to each candidate LSTM model; the grid search method and the average loss value currently corresponding to each candidate LSTM model are used to search for the current optimal LSTM model and the target hyperparameters from multiple candidate LSTM models, wherein the target hyperparameters are the hyperparameter combination corresponding to the current optimal LSTM model, and the target hyperparameters at least include the learning rate, the number of hidden layer units, and the dimension of the hidden layer state; based on the target hyperparameters corresponding to each training and multiple standard training sequences, the current optimal LSTM model obtained by each training is trained iteratively, and the candidate LSTM models generated by the iterative training are tested using multiple standard test sequences to detect the target LSTM model whose average loss value meets the preset loss value threshold, and obtain the demand forecasting model.

[0126] In some of the embodiments, the demand forecasting model is also implemented during the training process: using a grid search method to traverse the average loss values ​​and hyperparameter combinations currently corresponding to multiple alternative LSTM models, and selecting the alternative LSTM model with the smallest average loss value as the current optimal LSTM model, and using the hyperparameter combination corresponding to the alternative LSTM model with the smallest average loss value as the target hyperparameter.

[0127] This embodiment further provides a prediction platform, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0128] Optionally, the rating system may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0129] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0130] S1. From the historical production data corresponding to the target product, obtain the first production data time series corresponding to the target product, and scale the first production data time series according to a preset rule to generate a second production data time series. The historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes daily production data of a preset number of days.

[0131] S2, input the second production data time series into the trained demand forecasting model to obtain the target demand forecasting data corresponding to the target product, the target demand forecasting data is used to characterize all daily production demand forecasting data corresponding to the target product within a preset period, the demand forecasting model is a neural network model trained based on the time convolution network TCN and the long short-term memory network LSTM and the introduction of the grid search method, and is trained to predict the demand forecasting data of the first product within a preset period based on the historical production data time series corresponding to the first product. The grid search method is used to search for the target hyperparameter combination during the demand forecasting model training process, and the historical production data time series is used to characterize the historical daily production data of the first product for a preset number of days.

[0132] S3, using the constructed expectation-maximization Gaussian mixture EM-GMM model, processes all daily production demand forecast data of the target demand forecast data to generate production demand forecast results, which include the weekly production demand probability distribution parameters corresponding to the target product.

[0133] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0134] In addition, in combination with the product demand information prediction method based on big data in the above embodiments, the present application embodiment can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the product demand information prediction methods based on big data in the above embodiments is implemented.

[0135] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0136] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A product demand information prediction method based on big data, characterized in that: include: In the historical production data corresponding to the target product, a first production data time series corresponding to the target product is obtained, and the first production data time series is scaled according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes the daily production data of a preset number of days; Input the second production data time series into the trained demand forecasting model to obtain target demand forecasting data corresponding to the target product, wherein the target demand forecasting data is used to characterize all daily production demand forecasting data corresponding to the target product within a preset period, and the demand forecasting model is a neural network model trained based on a time convolution network TCN and a long short-term memory network LSTM and an introduction of a grid search method, and is trained to predict the demand forecasting data of the first product within a preset period based on the historical production data time series corresponding to the first product, and the grid search method is used to search for a target hyperparameter combination during the training process of the demand forecasting model, and the historical production data time series is used to characterize the historical daily production data of the first product for a preset number of days; Using the constructed expectation-maximization Gaussian mixture EM-GMM model, all the daily production demand forecast data of the target demand forecast data are processed to generate a production demand forecast result, wherein the production demand forecast result includes the weekly production demand probability distribution parameter corresponding to the target product; The constructed expectation-maximization Gaussian mixture EM-GMM model is used to process all the daily production demand forecast data of the target demand forecast data to generate demand forecast results, including: Using the EM-GMM model, performing E-step and M-step calculation iterations on all the daily production demand forecast data of the target demand forecast data, until the fitted daily production demand probability density curve converges; Performing probability distribution P-step calculations on all the daily production demand probability density curves to generate daily production demand probability distribution parameters corresponding to each of the daily production demand forecast data, wherein the daily production demand probability distribution parameters are used to characterize the integral of the daily production demand probability density curve within a preset value range; Based on the daily production demand probability distribution parameters, alternative weekly production demand probability distribution parameters are generated, and target weekly production demand probability distribution parameters are selected from the alternative weekly production demand probability distribution parameters, and the target weekly production demand probability distribution parameters are used as the weekly production demand probability distribution parameters corresponding to the target product to generate the demand forecast result; Among them, based on the daily production demand probability distribution parameters, generating alternative weekly production demand probability distribution parameters, and selecting target weekly production demand probability distribution parameters from the alternative weekly production demand probability distribution parameters, including: Performing polynomial distribution calculation on all the daily production demand probability distribution parameters to generate a plurality of alternative weekly production demand probability distribution parameters; Determine the probability value corresponding to each of the alternative weekly production demand probability distribution parameters, and select the alternative weekly production demand probability distribution parameter whose probability value is greater than a preset probability threshold from the multiple alternative weekly production demand probability distribution parameters to obtain the target weekly production demand probability distribution parameter; The production demand forecast result also includes the forecast deviation value corresponding to the weekly production demand probability distribution parameter. After generating the demand forecast result, it also includes: Acquire a third production data time series from the historical production data, wherein the third production data time series includes the daily production data of a preset number of days before the first production data time series; After scaling the third production data time series, the processed third production data series is input into the demand forecasting model for forecasting, and the historical demand forecasting data obtained by forecasting is processed using the EM-GMM model to generate a historical weekly production demand probability distribution parameter corresponding to the third production data time series; Merging all the daily production data in the first production data time series by week to obtain historical weekly total production data, determining the frequency of each historical weekly total production data among all the historical weekly total production data, and calculating a first probability corresponding to each historical weekly total production data according to the frequency and the total number of weeks corresponding to the first production data time series; Calculate the root mean square error and the average percentage error corresponding to the historical weekly production demand probability distribution parameter according to the difference between the probability value corresponding to each of the historical weekly production demand probability distribution parameters and the corresponding first probability, and use the root mean square error and the average percentage error as the forecast deviation value corresponding to the weekly production demand probability distribution parameter; The training of the demand forecasting model includes: The historical production data corresponding to the target product collected in advance is divided into a training data set and a test data set according to a set period, and the training sequences corresponding to the training data set and the test data set are scaled to generate a plurality of standard training sequences and a plurality of standard test sequences, wherein the training data set and the test data set both include the corresponding daily production data, and each of the training sequences includes a plurality of daily production data obtained by evenly dividing all the daily production data corresponding to the training data set or the test data set; After the first features obtained by extracting features from the plurality of standard training sequences using the TCN are sequentially input into the LSTM model, the model is trained by a back-propagation algorithm to generate a plurality of candidate LSTM models and a hyperparameter combination corresponding to each of the candidate LSTM models, and the average loss value currently corresponding to each of the candidate LSTM models is determined according to the loss values ​​of the plurality of first predicted daily production data output by the training of each candidate LSTM model and the daily production data corresponding to the corresponding standard training sequence; Using the grid search method and the average loss value currently corresponding to each of the candidate LSTM models, search for the current optimal LSTM model and target hyperparameters from the multiple candidate LSTM models, wherein the target hyperparameters are the hyperparameter combination corresponding to the current optimal LSTM model, and the target hyperparameters include at least a learning rate, a number of hidden layer units, and a dimension of a hidden layer state; Based on the target hyperparameters corresponding to each training and multiple standard training sequences, the current optimal LSTM model obtained by each training is trained iteratively, and the candidate LSTM models generated by the iterative training are tested using multiple standard test sequences to detect the target LSTM model whose average loss value meets the preset loss value threshold, thereby obtaining the demand forecasting model.

2. The method according to claim 1, characterized in that Scaling the first production data time series according to a preset rule to generate a second production data time series includes: Determine the production data mean and the production data standard deviation corresponding to the first production data time series according to the data volume of all the daily production data in the first production data time series and the corresponding preset number of days; Based on the production data mean and the production data standard deviation, a standard score corresponding to each of the daily production data is calculated, wherein the second production data time series includes the standard scores corresponding to all the daily production data.

3. The method according to claim 1, characterized in that: The method uses the grid search method and the average loss value currently corresponding to each of the alternative LSTM models to search for the current optimal LSTM model and the target hyperparameters from the multiple alternative LSTM models, including: using the grid search method to traverse the average loss values ​​and the hyperparameter combinations currently corresponding to the multiple alternative LSTM models, and selecting the alternative LSTM model with the smallest average loss value as the current optimal LSTM model, and using the hyperparameter combination corresponding to the alternative LSTM model with the smallest average loss value as the target hyperparameters.

4. A product demand information prediction device based on big data, characterized in that: include: an acquisition module, configured to acquire a first production data time series corresponding to the target product from the historical production data corresponding to the target product, and perform scaling processing on the first production data time series according to a preset rule to generate a second production data time series, wherein the historical production data includes all daily production data of the target product within a preset collection period, and the first production time series includes the daily production data of a preset number of days; A prediction module is used to input the second production data time series into a trained demand prediction model to obtain target demand prediction data corresponding to the target product, wherein the target demand prediction data is used to characterize all daily production demand prediction data corresponding to the target product within a preset period, the demand prediction model is a neural network model trained based on a time convolution network TCN and a long short-term memory network LSTM and a grid search method, and is trained to predict the demand prediction data of the first product within a preset period based on the historical production data time series corresponding to the first product, the grid search method is used to search for a target hyperparameter combination during the training of the demand prediction model, and the historical production data time series is used to characterize the historical daily production data of the first product for a preset number of days; the prediction module is also used to divide the pre-collected historical production data corresponding to the target product into a training data set and a test data set according to a set period, and respectively scale the training sequences corresponding to the training data set and the test data set to generate multiple standard training sequences and multiple standard test sequences, wherein the training data set and the test data set both include the corresponding daily production data, and each of the training sequences includes a plurality of daily production data obtained by averaging all the daily production data corresponding to the training data set or the test data set. production data; after sequentially inputting the first features obtained by extracting the features of the plurality of the standard training sequences using the TCN into the LSTM model, training the model using the back propagation algorithm to generate a plurality of candidate LSTM models and a hyperparameter combination corresponding to each of the candidate LSTM models, and determining the average loss value currently corresponding to each of the candidate LSTM models according to the loss values ​​of the plurality of first predicted daily production data output by the training of each candidate LSTM model and the daily production data corresponding to the corresponding standard training sequence; using the grid search method and the average loss value currently corresponding to each of the candidate LSTM models, selecting the average loss value currently corresponding to each of the candidate LSTM models from the plurality of candidate LSTM models; The current optimal LSTM model and target hyperparameters are searched out from the TM model, wherein the target hyperparameters are the hyperparameter combination corresponding to the current optimal LSTM model, and the target hyperparameters include at least the learning rate, the number of hidden layer units, and the dimension of the hidden layer state; based on the target hyperparameters corresponding to each training and the multiple standard training sequences, the current optimal LSTM model obtained by each training is trained iteratively, and the candidate LSTM models generated by the iterative training are tested using the multiple standard test sequences to detect the target LSTM model whose average loss value meets the preset loss value threshold, and obtain the demand forecasting model; A processing module is used to use the constructed expectation-maximization Gaussian mixture EM-GMM model to process all the daily production demand forecast data of the target demand forecast data to generate a production demand forecast result, wherein the production demand forecast result includes the weekly production demand probability distribution parameter corresponding to the target product. The processing module is also used to use the EM-GMM model to perform E-step and M-step calculation iterations on all the daily production demand forecast data of the target demand forecast data, respectively, until the fitted daily production demand probability density curve converges; perform probability distribution P-step calculation on all the daily production demand probability density curves to generate daily production demand probability distribution parameters corresponding to each daily production demand forecast data, wherein the daily production demand probability distribution parameters are used to characterize the integral of the daily production demand probability density curve within a preset value range; generate alternatives based on the daily production demand probability distribution parameters. The processing module is also used to perform polynomial distribution calculation on all the daily production demand probability distribution parameters to generate a plurality of the alternative weekly production demand probability distribution parameters; determine the probability value corresponding to each of the alternative weekly production demand probability distribution parameters, and select the alternative weekly production demand probability distribution parameters whose probability value is greater than a preset probability threshold from the plurality of the alternative weekly production demand probability distribution parameters to obtain the target weekly production demand probability distribution parameters; the production demand forecast result also includes a prediction deviation value corresponding to the weekly production demand probability distribution parameter; the processing module is also used to, after generating the demand forecast result, A third production data time series is obtained from the historical production data, wherein the third production data time series includes the daily production data of a preset number of days before the first production data time series; after the third production data time series is scaled, the processed third production data series is input into the demand forecasting model for forecasting, and the historical demand forecasting data obtained by forecasting is processed using the EM-GMM model to generate a historical weekly production demand probability distribution parameter corresponding to the third production data time series; all the daily production data in the first production data time series are merged by week to obtain historical weekly total production data, and the frequency of each historical weekly total production data is determined among all the historical weekly total production data, and the first probability corresponding to each historical weekly total production data is calculated according to the frequency and the total number of weeks corresponding to the first production data time series;According to the difference between the probability value corresponding to each of the historical weekly production demand probability distribution parameters and the corresponding first probability, the root mean square error and the average percentage error corresponding to the historical weekly production demand probability distribution parameter are calculated, and the root mean square error and the average percentage error are used as the forecast deviation value corresponding to the weekly production demand probability distribution parameter. ; 5. A prediction platform, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the product demand information prediction method based on big data as described in any one of claims 1 to 3.

6. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the product demand information prediction method based on big data described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • BiLSTM voltage deviation prediction method based on Bayesian optimization

    CN113554148A

  • Lane departure early warning system evaluation method based on learning and considering driver behavior characteristics

    CN115848398A