Chemical price prediction method and device based on multivariable time sequence modeling, equipment and storage medium

Through the method based on multivariate time series modeling, the problems of low accuracy and large calculation volume of chemical product price prediction in the prior art are solved, and efficient and accurate chemical product price prediction is achieved.

CN120181886APending Publication Date: 2025-06-20TSINGHUA UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510156432.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, the accuracy of chemical product price prediction is low, the calculation amount is large, and the prediction efficiency is also low, making it difficult to meet industrial needs.

Method used

The chemical product price prediction method based on multivariate time series modeling is adopted. By obtaining the chemical product feature sample set, including multivariate feature training samples and price feature testing samples, data processing and feature extraction are carried out, and prediction is performed using neural network models.

Benefits of technology

It realizes the low-complexity and high-efficiency prediction price generation, improves the accuracy of prediction, and meets industrial needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120181886A_ABST
    Figure CN120181886A_ABST
Patent Text Reader

Abstract

The invention provides a chemical price prediction method and device based on multivariable time sequence modeling, equipment and a storage medium, and relates to the technical field of chemical data analysis. The method comprises the following steps: acquiring a target predicted chemical; inputting the target prediction chemical into the trained chemical price prediction model to obtain a price prediction result of the target prediction chemical output by the chemical price prediction model; wherein the chemical price prediction model is obtained by training based on a chemical feature sample set; the chemical feature sample set at least comprises a chemical multivariable feature training sample and a chemical price feature test sample. According to the embodiment of the invention, the defects of low prediction accuracy, large calculation amount and low prediction efficiency in the prior art are overcome, the chemical product price prediction model based on multivariable time sequence modeling is utilized, the chemical product predicted price can be generated with low complexity and high efficiency, and the accuracy of the generated chemical product predicted price is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chemical product data analysis, and particularly to a method, device, equipment and storage medium for predicting chemical product prices based on multivariate time series modeling. Background Art

[0002] With the increasing saturation of the global petrochemical industry, the market competition is becoming increasingly fierce, and the profit margin of chemical enterprises is constantly compressed, making it particularly important to improve production efficiency and optimize market decisions. Enterprises urgently need reliable prediction models to master the price fluctuation trends of small-category chemical products for scientific and reasonable production scheduling and cost control. However, the price volatility of chemical products is usually affected by the cross-influence of multiple factors, such as supply and demand relationships, production costs, the international economic environment, and the fluctuations of the upstream and downstream industrial chains. The complex correlations of these factors have increased the difficulty of price prediction.

[0003] Taking 1,4-butanediol (BDO), methyl methacrylate (MMA), and aniline as examples, these small-category chemical products are widely used as raw materials in multiple downstream fields such as plastics, fibers, fuels, and pharmaceuticals, and their prices are affected by many external factors. For example, fluctuations in raw material supply, seasonal demand changes, and changes in macroeconomic policies will all have varying degrees of impact on their prices. Traditional time series prediction models such as ARIMA and SARIMA models have certain advantages in dealing with single variables and short-term predictions, but they usually assume that the variance of the time series is fixed, which does not conform to the actual volatility of chemical product prices and is difficult to accurately simulate multi-dimensional and multi-variable correlation relationships. Machine learning methods such as support vector machines (SVM), decision trees, etc. although perform well in non-linear problems, have limited ability to capture time dependence and long-term trends, and have insufficient efficiency in processing a large amount of multi-dimensional data.

[0004] The prediction accuracy of traditional models for chemical product prices is low, the calculation amount is large, and the prediction efficiency is also low, resulting in a greatly reduced reference value for the prediction results of chemical product prices and making it difficult to meet industrial requirements. Summary of the Invention

[0005] The present invention provides a method, device, equipment and storage medium for predicting chemical product prices based on multivariate time series modeling to solve the defects of low prediction accuracy and large calculation amount and low prediction efficiency in the prior art, and to realize that the chemical product price prediction model based on multivariate time series modeling can generate chemical product prediction prices with low complexity and high efficiency, and the generated chemical product prediction prices are highly accurate.

[0006] In a first aspect, the present invention provides a method for predicting chemical product prices based on multivariate time series modeling, including the following steps.

[0007] Obtain the target predicted chemical product; Input the target predicted chemical product into the trained chemical product price prediction model to obtain the price prediction result of the target predicted chemical product output by the chemical product price prediction model; Wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0008] Preferably, according to a chemical product price prediction method based on multivariate time series modeling provided by the present invention, the determining step of the chemical product feature sample set includes: Collect a chemical product price impact data sample set that affects the price fluctuation of chemical products; Perform missing value processing on the price impact data sample set to obtain a chemical product price impact data sample set with a unified data length; Perform data normalization processing on the chemical product price impact data sample set with the unified data length to obtain a standard chemical product price impact data sample set; Perform sample feature extraction processing on the standard chemical product price impact data sample set to determine the chemical product feature sample set.

[0009] Preferably, according to a chemical product price prediction method based on multivariate time series modeling provided by the present invention, the performing sample feature extraction processing on the standard chemical product price impact data sample set to determine the chemical product feature sample set includes: Perform sample set classification processing on the standard chemical product price impact data sample set, and screen out initial chemical product price impact data sample sets with different proportions from the standard chemical product price impact data sample set according to the sample set proportion of each category; Perform first feature extraction processing on the initial chemical product price impact data sample sets with different proportions by using a first feature extraction model to obtain a first chemical product impact sample; Perform second feature extraction processing on the initial chemical product price impact data sample sets with different proportions by using a second feature extraction model to obtain a second chemical product impact sample; Based on the union features of the first chemical product impact sample and the second chemical product impact sample, determine the chemical product feature sample set.

[0010] Preferably, according to a chemical product price prediction method based on multivariate time series modeling provided by the present invention, the first feature extraction model is a LASSO regression model, and the formula of the LASSO regression model is: , Wherein, is the first chemical product impact sample, is the feature matrix of the initial chemical product price impact data sample set, is the regression coefficient, controls the intensity of feature selection.

[0011] Preferably, according to a chemical product price prediction method based on multivariate time series modeling provided by the present invention, the second feature extraction model performs feature extraction based on the LightGBM model, and the formula of the LightGBM model is: , Wherein, Gain is the total gain of the second chemical product impact sample, is the left gain of the jth impact sample, is the right gain of the jth impact sample.

[0012] Preferably, according to a chemical product price prediction method based on multivariate time series modeling provided by the present invention, the determination steps of the trained chemical product price prediction model include: Obtain the initial hidden state of the initial time step corresponding to the chemical product multivariate feature training sample; Perform vector conversion processing on the chemical product multivariate feature training sample to obtain a feature embedding vector; Input the feature embedding vector and the initial hidden state into a preset neural network model for training, and output a chemical product prediction price set; the chemical product prediction price set at least includes a chemical product prediction price and model training parameters; Based on the chemical product prediction price and the chemical product price feature test sample, determine the optimal model training parameters; Use the neural network model corresponding to the optimal model training parameters as the trained chemical product price prediction model; Wherein, the model training parameters at least include sequence length, number of model layers, hidden layer size, batch size, number of training rounds, output size; the neural network model at least includes one or more of a recurrent neural network, a long short-term memory network, and a gated recurrent unit.

[0013] Preferably, according to a chemical product price prediction method based on multivariate time series modeling provided by the present invention, the determination of the optimal model training parameters based on the chemical product prediction price and the chemical product price feature test sample includes: Calculate the root mean square error between the chemical product prediction price output in each round of training and the corresponding chemical product price feature test sample; Calculate the threshold difference between the root mean square error and a preset variance threshold; Determine whether the threshold difference is less than a preset training stop threshold; If so, stop the training, determine the predicted price of the chemical product corresponding to the training round corresponding to the threshold difference, and use the model training parameters corresponding to the predicted price of the chemical product as the optimal model training parameters; If not, continue the training until the optimal model training parameters are determined.

[0014] In a second aspect, the present invention also provides a chemical product price prediction device based on multivariate time series modeling, including the following modules: An acquisition module for acquiring a target chemical product to be predicted; A prediction module for inputting the target chemical product to be predicted into a trained chemical product price prediction model to obtain a price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0015] In a third aspect, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, it implements the chemical product price prediction method based on multivariate time series modeling as described in any one of the above.

[0016] In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the chemical product price prediction method based on multivariate time series modeling as described in any one of the above.

[0017] In a fifth aspect, the present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the chemical product price prediction method based on multivariate time series modeling as described in any one of the above.

[0018] A chemical product price prediction method, device, equipment and storage medium based on multivariate time series modeling provided by the present invention obtain a target chemical product to be predicted; input the target chemical product to be predicted into a trained chemical product price prediction model to obtain a price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample. It is used to solve the defects of low prediction accuracy, large calculation amount and low prediction efficiency in the prior art, and realize that the chemical product price prediction model based on multivariate time series modeling can generate the predicted price of chemical products with low complexity and high efficiency, and the accuracy of the generated predicted price of chemical products is relatively high. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0020] Figure 1 FIG. is a schematic flowchart of the chemical product price prediction method based on multivariate time series modeling provided by the present invention.

[0021] Figure 2 FIG. is a schematic flowchart of determining a chemical product feature sample set provided by the present invention.

[0022] Figure 3 FIG. is a schematic flowchart of determining a trained chemical product price prediction model provided by the present invention.

[0023] Figure 4 FIG. is a schematic structural diagram of the chemical product price prediction device based on multivariate time series modeling provided by the present invention.

[0024] Figure 5 FIG. is a schematic structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] To make the objectives, technical solutions and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0026] First, several terms involved in the present invention are analyzed: Deep learning model: It is a type of machine learning model based on artificial neural networks. They identify patterns and features by simulating the processing methods of the human brain. Compared with traditional machine learning models, deep learning models usually contain more layers (i.e., "depth") and can automatically learn complex feature representations from data.

[0027] Multivariate Time Series (MTS): It refers to a data set containing multiple related time series. Different from univariate time series (which only contain one time series), each series in multivariate time series can be regarded as a variable or feature in the system, and there may be complex interactions and dependencies among these variables.

[0028] In the related art, at least the following technical problems exist: In recent years, deep learning models such as Recurrent Neural Network (RNN), Long Short-Term Memory Network (LSTM), etc. have made significant progress in time series prediction, especially in dealing with data with long cycles and complex dependencies. However, the practical applications of these models still face the following challenges in the price prediction of small-category products in the chemical industry: Complexity of multi-dimensional factors: The price fluctuations of small-category chemical products are closely related to multiple variables such as the upstream and downstream markets, inventory data, and macroeconomic indicators. Existing prediction models are difficult to effectively model the correlation relationships of various variables in multiple dimensions. These factors include both the supply and demand changes and seasonal fluctuations within the market, as well as the price conduction effects of raw materials and upstream and downstream products. How to reasonably introduce and select these variables in the model is crucial for the accuracy of prediction.

[0029] Requirement for real-time and high-frequency updates: The petrochemical industry has high requirements for the accuracy and real-time performance of chemical product price prediction. The prices of small-category chemical products need to be adjusted multiple times in a short period to adapt to the rapidly changing market demand and volatile international economic environment. However, traditional model training takes a long time and has high complexity, making it difficult to meet industrial requirements. Therefore, an efficient prediction method is needed that can be updated quickly to ensure that chemical enterprises can make timely production and supply chain decisions in the ever-changing market environment.

[0030] The following combines Figures 1 - 5 Describe the chemical product price prediction method, device, equipment, and storage medium based on multivariate time series modeling of the present invention to solve the defects of low prediction accuracy and low prediction efficiency with large computational amounts in the prior art, and realize that the chemical product prediction price can be generated with low complexity and high efficiency by using the chemical product prediction model based on multivariate time series modeling, and the accuracy of the generated chemical product prediction price is relatively high.

[0031] Figure 1 is a schematic flowchart of a chemical product price prediction method based on multivariate time series modeling provided by the present invention. As Figure 1 shown, this method may include but is not limited to steps S100 to S200: S100, obtain the target chemical product to be predicted; S200, input the target chemical product to be predicted into the trained chemical product price prediction model, and obtain the price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0032] In step S100 of some embodiments, obtain the target chemical product to be predicted.

[0033] For example, if the target chemical product to be predicted is aniline, then the name of aniline can be obtained to predict the price of aniline through the chemical product prediction model according to the name of aniline.

[0034] The target chemical product to be predicted may include but is not limited to 1,4 - butanediol, MMA, and aniline.

[0035] In step S200 of some embodiments, input the target chemical product to be predicted into the trained chemical product price prediction model, and obtain the price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0036] It can be understood that input the target chemical product such as aniline into the trained chemical product price prediction model, and obtain the price prediction result of the target chemical product aniline output by the chemical product price prediction model.

[0037] Furthermore, it should be noted that the chemical product price prediction model is trained based on a chemical product feature sample set.

[0038] The chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0039] The chemical product multivariate feature training sample is the key feature sample for training the chemical product price prediction model, and the chemical product price feature test sample is the price feature sample for testing the chemical product price prediction model to determine the finally trained chemical product price prediction model.

[0040] In some embodiments of the present invention, the step of determining the chemical product characteristic sample set includes: Collect a chemical product price impact data sample set that affects the price fluctuation of chemical products; Process the missing values in the price impact data sample set to obtain a chemical product price impact data sample set with a unified data length; Perform data normalization processing on the chemical product price impact data sample set with the unified data length to obtain a standard chemical product price impact data sample set; Perform sample feature extraction processing on the standard chemical product price impact data sample set to determine the chemical product characteristic sample set.

[0041] It can be understood that Figure 2 is a schematic flow chart of determining the chemical product characteristic sample set provided by the present invention. Collect a chemical product price impact data sample set that affects the price fluctuation of chemical products. The chemical product price impact data sample set may include, but is not limited to, about 300 variables in four categories: chemical product price, chemical product-related market index data, inventory data, and macroeconomic impact factors.

[0042] Process the missing values in the price impact data sample set to obtain a chemical product price impact data sample set with a unified data length, which is convenient for data processing and improves data processing efficiency.

[0043] The specific steps of missing value processing include: 1. Check the missing types of the price impact data sample set: Include ignorable missingness (such as part of the research design or censored data).

[0044] And include non-ignorable missingness (such as data entry errors, invalid coding, etc.).

[0045] 2. Check the missing degree of the price impact data sample set: The missing proportion of each subject on all variables, the case proportion of missing data on each variable, and the case proportion of no missing data on all variables.

[0046] 3. Diagnose the missing mechanism of the price impact data sample set: Missing Completely at Random (MCAR): The missingness occurs completely randomly and does not depend on all variables.

[0047] Missing at Random (MAR): The missingness of variable Y depends on other variables X in the data set and does not depend on Y itself.

[0048] Missing Not at Random (MNAR): The missingness of variable Y depends on Y itself or other variables not involved in the data set.

[0049] 4. Select the final missing value imputation method: Delete data: Delete columns (delete if there are any), pairwise deletion (exclude cases according to the tests to be performed).

[0050] Replace data: Mean replacement, regression imputation, multiple imputation (MI), model-based estimation methods (such as the EM algorithm).

[0051] Furthermore, the normalization process is to uniformly convert data with different frequencies into the same time scale, such as converting hourly data into daily data, weekly data, or monthly data, etc.

[0052] The normalization process can be specifically carried out through the following steps: Downsampling: Reduce the frequency of collecting the chemical product price impact data sample set with a unified data length by extracting subsets from the original chemical product price impact data sample set with a unified data length. For example, take data every n elements, or only select data for specific seasons for analysis.

[0053] Upsampling: To some extent, it is a way to obtain higher-frequency data out of thin air, which allows us to obtain more data labels without adding extra information. For example, it is used to handle the problem of irregular time axes in multi-table associations, or to convert monthly data into daily data.

[0054] Smoothing data: Data smoothing is to eliminate extreme values or measurement errors in the chemical product price impact data sample set with a unified data length. Even if some extreme values are real themselves, they do not reflect the underlying data pattern. Simple moving average method or exponential smoothing method are both commonly used smoothing techniques.

[0055] By reasonably processing and converting the chemical product price impact data sample set, the quality and comparability of the standard chemical product price impact data sample set can be improved, providing a more accurate basis for subsequent analysis.

[0056] Furthermore, in some embodiments of the present invention, the sample feature extraction process for the standard chemical product price impact data sample set to determine the chemical product feature sample set includes: Perform sample set classification processing on the standard chemical product price impact data sample set, and screen out initial chemical product price impact data sample sets with different proportions from the standard chemical product price impact data sample set according to the sample set proportion of each category; Use the first feature extraction model to perform the first feature extraction process on the initial chemical product price impact data sample sets with different proportions to obtain the first chemical product impact samples; Using the second feature extraction model, perform second feature extraction processing on the initial chemical product price impact data sample sets with different proportions to obtain second chemical product impact samples; Based on the union features of the first chemical product impact samples and the second chemical product impact samples, determine the chemical product feature sample set.

[0057] Furthermore, according to the guidance of chemical product field experts, the sample set classification processing of the standard chemical product price impact data sample set can be divided into five categories: the target chemical product itself, chemical products in the upstream and downstream industrial chains, related chemical products outside the industrial chain, inventory data, and macro data. The screening criteria are that 80% of the features of the target chemical product itself are retained, 50% of the chemical products in the upstream and downstream industrial chains are retained, and 10% of each of the three types of variable samples of related chemical products outside the industrial chain, inventory data, and macro data are retained.

[0058] Even further, use the first feature extraction model to perform first feature extraction processing on the initial chemical product price impact data sample sets with different proportions to obtain first chemical product impact samples.

[0059] The first feature extraction model is the LASSO regression model, and the formula of the LASSO regression model is: , In the formula, is the first chemical product impact sample, is the feature matrix of the initial chemical product price impact data sample set, is the regression coefficient, controls the intensity of feature selection.

[0060] Even further, LASSO regression is a regularized form of linear regression. By introducing the L1 regularization term (i.e., the sum of the absolute values of the coefficients), it constrains the model parameters. This regularization method tends to make some coefficients become zero, thus realizing feature selection and model simplification.

[0061] Using the first feature extraction model to obtain the first chemical product impact samples can effectively handle the problem of multicollinearity of parameters. Automatically perform variable selection through sparse solutions to simplify the model. It is suitable for analyzing high-dimensional data, where the number of features may be greater than the number of samples.

[0062] Using the second feature extraction model to perform second feature extraction processing on the initial chemical product price impact data sample sets with different proportions to obtain second chemical product impact samples. The second feature extraction model is based on the LightGBM model for feature extraction, and the formula of the LightGBM model is: , In the formula, Gain is the total gain of the second chemical product impact sample, is the left gain of the j-th impact sample, is the right gain of the j-th impact sample.

[0063] LightGBM is an efficient algorithm based on the gradient boosting framework. It gradually reduces the error by constructing a series of decision trees, thereby improving the prediction performance of the model. It adopts the histogram-based decision tree algorithm and introduces multiple optimization techniques such as the leaf node growth strategy by depth and GOSS (Gradient-based One-Side Sampling) to improve the training speed and resource utilization.

[0064] LightGBM itself does not directly use L1 or L2 regularization. Instead, it controls the model complexity and prevents overfitting through its unique decision tree construction method and optimization techniques.

[0065] LightGBM has significant advantages in computational efficiency and is especially suitable for processing large-scale datasets. It accelerates the training process through the histogram algorithm, Leaf-wise growth strategy, and various parallel and distributed computing techniques.

[0066] Take the union of the first chemical product impact samples and the second chemical product impact samples to determine the chemical product feature sample set. For example, the first chemical product impact samples include four impact sample sets A, B, C, and D, and the second chemical product impact samples include five impact sample sets C, D, E, M, and N. The union is two impact sample sets C and D. The impact sample set composed of C and D is the chemical product feature sample set. It can be determined that the chemical product feature sample set is an effective impact sample feature, and the impact sample features with little impact are kicked out, which can improve the model training efficiency of the chemical product price prediction model.

[0067] In some embodiments of the present invention, the steps for determining the trained chemical product price prediction model include: Obtain the initial hidden state at the initial time step corresponding to the chemical product multivariate feature training sample; Perform vector conversion processing on the chemical product multivariate feature training sample to obtain a feature embedding vector; Input the feature embedding vector and the initial hidden state into a preset neural network model for training, and output a chemical product predicted price set; the chemical product predicted price set at least includes the chemical product predicted price and model training parameters; Based on the chemical product predicted price and the chemical product price feature test sample, determine the optimal model training parameters; Take the neural network model corresponding to the optimal model training parameters as the trained chemical product price prediction model; Among them, the model training parameters at least include sequence length, number of model layers, hidden layer size, batch size, number of training epochs, and output size; the neural network model at least includes one or more of recurrent neural network, long short-term memory network, and gated recurrent unit.

[0068] It can be understood that Figure 3 is a schematic flow chart of determining the trained chemical product price prediction model provided by the present invention. The neural network model at least includes one or more of recurrent neural network, long short-term memory network, and gated recurrent unit.

[0069] A typical artificial neural network consists of the following parts: Input Layer: Receives the original data and extracts features. The number of hidden layers and the number of neurons in each hidden layer determine the depth and complexity of the network.

[0070] Hidden Layers: Processes the input data Output Layer: Generates the final result.

[0071] Training Process: The training process of an artificial neural network mainly includes the following steps: 1. Forward Propagation: The input data is passed through the network to calculate the output.

[0072] 2. Loss Calculation: Calculates the error between the predicted output and the actual output.

[0073] 3. Backpropagation: Calculates the gradient through the chain rule and updates the network weights to minimize the loss function.

[0074] 4. Optimization: Updates the weights using an optimization algorithm (such as gradient descent).

[0075] Furthermore, the neural network model of the deep learning model can include but is not limited to: I. Recurrent Neural Network (RNN), the state update formula of RNN: Where is the hidden state, is the input, is the weight of the input data, is the weight matrix of the hidden state, is the tanh activation function, is the bias of the hidden state.

[0076] The RNN is a neural network structure capable of processing sequential data. By introducing recurrent connections, the model can capture dependencies in time series.

[0077] The output at each time step depends not only on the current input but also on the hidden state of the previous time step.

[0078] The chemical product price prediction model generated using the RNN as the neural network to be trained has a simple structure and is easy to understand and implement.

[0079] II. Long Short-Term Memory Network (LSTM): The LSTM controls the flow of information through forget gates, input gates, and output gates: Forget gate: Determines which information needs to be discarded from the cell state, and its calculation formula is: In the formula, is the sigmoid activation function, and are the weight matrix and bias term of the forget gate respectively.

[0080] Input gate: Determines which new information needs to be added to the cell state, and its calculation formula includes two parts: Activation value of the input gate: Candidate cell state: In the formula, and are the sigmoid and tanh activation functions respectively, , , , are the weight matrix and bias term of the input gate and candidate cell state respectively.

[0081] Cell state update: Updates the cell state according to the decisions of the forget gate and input gate, and its calculation formula is: Among them, is the cell state at the current moment, is the cell state at the previous moment.

[0082] Output gate: Determines which parts of the cell state at the current moment are used as the output of the LSTM unit, and its calculation formula includes two parts: Activation value of the output gate: Output of the LSTM unit: Among them, and are the weight matrix and bias term of the output gate respectively.

[0083] The memory cell of the LSTM can remember long-term information and control the flow of information through the gating mechanism, so as to better retain important information and forget unimportant information.

[0084] Forget gate: determines which information needs to be forgotten.

[0085] Input gate: determines which new information needs to be remembered.

[0086] Output gate: determines the output value of the current memory cell.

[0087] Using the long short-term memory network as the neural network to be trained, the chemical product price prediction model effectively solves the problem of gradient disappearance and is suitable for processing long sequence data; it performs excellently in tasks such as machine translation and language modeling.

[0088] III. Gated Recurrent Unit (GRU): The state update formula of GRU: Update gate: The role of the update gate is to determine how much past information needs to be retained to the current moment and how much current input information needs to be integrated into the new hidden state. Its calculation formula is: is the sigmoid activation function, and are the weight matrix and bias term of the update gate respectively.

[0089] The reset gate is used to determine whether to ignore the past state, and its role is to control the influence degree of the past state on the current state. Its calculation formula is: where, and are the weight matrix and bias term of the reset gate respectively.

[0090] The candidate hidden state is a temporary hidden state introduced in GRU, which is calculated from the input of the current time step, the hidden state of the previous time step, and the reset gate. Its calculation formula is: where, ⊙ represents the Hadamard product (i.e., element-wise product), and are the weight matrix and bias term of the candidate hidden state respectively.

[0091] Based on the update gate and the reset gate, the hidden state update formula of GRU is as follows: Among them, is the hidden state at the current moment, and is the hidden state at the previous moment.

[0092] GRU is another variant of RNN. It simplifies the gate mechanism of LSTM, combines the cell state and the hidden state into one, and combines the forget gate and the input gate into an update gate.

[0093] GRU controls the flow of information through the reset gate and the update gate, so as to capture the long-term dependencies in the sequence. Given the input and the hidden state , the state update formula of GRU involves the calculation of the reset gate and the update gate. The specific formula is relatively complex, but the core idea is to use these two gates to control the flow of information.

[0094] The chemical product price prediction model generated by using GRU as the neural network to be trained has a relatively simple structure, low computational complexity, and fast convergence speed; while maintaining good performance, it reduces the number of parameters and the amount of calculation.

[0095] It should be noted that the model training parameters of the model include sequence length, number of model layers, hidden layer size, batch size, number of training epochs, output size, etc. The optimal combination is selected through experimental parameter tuning.

[0096] Training method: For each prediction target (product - prediction period), multiple parameter combinations are used for training. Finally, the optimal model training parameter combination is determined through RMSE, and then the evaluation optimal model, that is, the trained chemical product price prediction model, is determined according to the optimal model training parameter combination.

[0097] RNN is the basic structure of the recurrent neural network. They have recurrent connections, enabling the model to process time series data. LSTM is a variant of RNN. It introduces the gate mechanism to solve the problem of long-term dependencies.

[0098] GRU is a simplified version of LSTM. It simplifies the gate mechanism into two gates to reduce the number of parameters and the computational complexity.

[0099] For example, if the chemical product multivariate feature training sample contains three sample data A, B, and C arranged in time series, then first initialize the first hidden state h0, which is generally a vector of all zeros. Then, perform word embedding on the first sample data A of the chemical product multivariate feature training sample, convert it into a vector representation, and send it to the first time step. Then, output the hidden state h1 and y1. h1 includes A and h0. Then, input h1 and the second sample data B of the chemical product multivariate feature training sample into the second time step to obtain the hidden state h2 and y2. h2 includes h1 and B. Send h2 and the third sample data C of the chemical product multivariate feature training sample to the fully connected network to obtain the predicted probability of the price prediction of the chemical product multivariate feature training sample and the hidden state h3. h3 includes h2 and B.

[0100] Each input will contain two values: the hidden state of the previous time step and the input value of the current state, and output the hidden state of the current time step and the prediction result of the current time step.

[0101] In some embodiments of the present invention, determining the optimal model training parameters based on the predicted price of the chemical product and the chemical product price feature test sample includes: Calculating the root mean square error between the predicted price of the chemical product output in each round of training and the corresponding chemical product price feature test sample; Calculating the threshold difference between the root mean square error and a preset variance threshold; Judging whether the threshold difference is less than a preset training stop threshold; If so, stop training, and determine the predicted price of the chemical product in the training round corresponding to the threshold difference, and use the model training parameters corresponding to the predicted price of the chemical product as the optimal model training parameters; If not, continue training until the optimal model training parameters are determined.

[0102] Furthermore, each output of a price prediction result corresponds to a set of model training parameters.

[0103] Then calculate the root mean square error between the predicted price of the chemical product output in each round of training and the corresponding chemical product price feature test sample.

[0104] The calculation formula of the root mean square error (RMSE) as a measurement standard is: In the formula, is the chemical product price feature test sample, is the predicted price of the chemical product output in each round of training, is the root mean square error.

[0105] RMSE is a commonly used metric to measure the prediction error of a model. It takes into account the deviation between each predicted value and the actual value, amplifies these deviations by squaring them, and finally takes the square root to obtain a comprehensive evaluation result.

[0106] It should be noted that the preset variance threshold is 0, and the training stop threshold can be 0.01.

[0107] When the RMSE value is closer to 0, it indicates that the deviation between the model's predicted value and the actual value is smaller, and the model fitting effect is better.

[0108] When it is determined whether the threshold difference is less than the preset training stop threshold, the training is stopped, and the predicted price of the chemical product corresponding to the training round of the threshold difference is determined, and the model training parameters corresponding to the predicted price of the chemical product are used as the optimal model training parameters.

[0109] Furthermore, by comparing the RMSE values of different models, the model with the smallest RMSE can be selected as the optimal model. This is because a model with a smaller RMSE produces a smaller average error during prediction, thus having higher prediction accuracy.

[0110] In some embodiments of the present invention, the code file can be packaged and compiled, together with the data file, to form an operation software that can be directly used, and a usage instruction is written, so that the final chemical product price prediction model and software can be updated and maintained. Only by updating the input sample training data can the chemical product price prediction model be updated, increasing the scalability of the chemical product price prediction model.

[0111] A method, device, equipment, and storage medium for predicting the price of chemical products based on multivariate time series modeling provided by the present invention. By obtaining the target chemical product to be predicted; inputting the target chemical product to be predicted into the trained chemical product price prediction model to obtain the price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample. It is used to solve the defects of low prediction accuracy, large computational amount, and low prediction efficiency in the prior art, and realizes that the chemical product prediction price can be generated with low complexity and high efficiency by using the chemical product price prediction model based on multivariate time series modeling, and the accuracy of the generated chemical product prediction price is relatively high.

[0112] The chemical product price prediction device based on multivariate time series modeling provided by the present invention will be described below. The chemical product price prediction device based on multivariate time series modeling described below can be mutually referred to the chemical product price prediction method based on multivariate time series modeling described above.

[0113] As Figure 4 shown is a schematic structural diagram of the chemical product price prediction device based on multivariate time series modeling provided by the present invention. A chemical product price prediction device based on multivariate time series modeling includes the following modules: An acquisition module 410, configured to acquire a target chemical product to be predicted; A prediction module 420, configured to input the target chemical product to be predicted into a trained chemical product price prediction model, and obtain a price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0114] Preferably, the chemical product price prediction device based on multivariate time series modeling provided by the present invention is specifically further configured to collect a chemical product price impact data sample set that affects chemical product price fluctuations; Perform missing value processing on the price impact data sample set to obtain a chemical product price impact data sample set with a unified data length; Perform data normalization processing on the chemical product price impact data sample set with the unified data length to obtain a standard chemical product price impact data sample set; Perform sample feature extraction processing on the standard chemical product price impact data sample set to determine the chemical product feature sample set.

[0115] Preferably, the chemical product price prediction device based on multivariate time series modeling provided by the present invention is specifically further configured to perform sample set classification processing on the standard chemical product price impact data sample set, and screen out initial chemical product price impact data sample sets with different proportions from the standard chemical product price impact data sample set according to the sample set proportion of each category; Perform first feature extraction processing on the initial chemical product price impact data sample sets with different proportions by using a first feature extraction model to obtain first chemical product impact samples; Perform second feature extraction processing on the initial chemical product price impact data sample sets with different proportions by using a second feature extraction model to obtain second chemical product impact samples; Based on the union features of the first chemical product impact samples and the second chemical product impact samples, determine the chemical product feature sample set.

[0116] Preferably, the chemical product price prediction device based on multivariate time series modeling provided by the present invention is specifically further configured that the first feature extraction model is a LASSO regression model, and the formula of the LASSO regression model is: , In the formula, is the first chemical product influence sample, is the feature matrix of the initial chemical product price influence data sample set, is the regression coefficient, controls the intensity of feature selection.

[0117] Preferably, the chemical product price prediction device based on multivariate time series modeling provided by the present invention is specifically further configured that the second feature extraction model performs feature extraction based on the LightGBM model, and the formula of the LightGBM model is: , In the formula, Gain is the total gain of the second chemical product influence sample, is the left gain of the jth influence sample, is the right gain of the jth influence sample.

[0118] Preferably, the chemical product price prediction device based on multivariate time series modeling provided by the present invention is specifically further configured to obtain the initial hidden state of the initial time step corresponding to the chemical product multivariate feature training sample; perform vector conversion processing on the chemical product multivariate feature training sample to obtain a feature embedding vector; input the feature embedding vector and the initial hidden state into a preset neural network model for training, and output a chemical product prediction price set; the chemical product prediction price set at least includes a chemical product prediction price and model training parameters; determine optimal model training parameters based on the chemical product prediction price and the chemical product price feature test sample; use the neural network model corresponding to the optimal model training parameters as the trained chemical product price prediction model; wherein, the model training parameters at least include sequence length, number of model layers, hidden layer size, batch size, number of training rounds, output size; the neural network model at least includes one or more of a recurrent neural network, a long short-term memory network, and a gated recurrent unit.

[0119] Preferably, the chemical product price prediction device based on multivariate time series modeling provided by the present invention is specifically further configured to calculate the root mean square error between the chemical product prediction price output in each round of training and the corresponding chemical product price feature test sample; Calculate the threshold difference between the root mean square error and a preset variance threshold; Determine whether the threshold difference is less than a preset training stop threshold; If so, stop the training, determine the predicted price of the chemical product corresponding to the training round corresponding to the threshold difference, and use the model training parameters corresponding to the predicted price of the chemical product as the optimal model training parameters; If not, continue the training until the optimal model training parameters are determined.

[0120] A chemical product price prediction method, device, equipment and storage medium based on multivariate time series modeling provided by the present invention, which obtains a target predicted chemical product; inputs the target predicted chemical product into a trained chemical product price prediction model to obtain a price prediction result of the target predicted chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample. It is used to solve the defects of low prediction accuracy, large calculation amount and low prediction efficiency in the prior art, and realize that the chemical product price prediction model based on multivariate time series modeling can generate the predicted price of chemical products with low complexity and high efficiency, and the accuracy of the generated predicted price of chemical products is relatively high.

[0121] Figure 5 Illustrate a schematic physical structure diagram of an electronic device, as Figure 5 shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 complete mutual communication through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute the chemical product price prediction method based on multivariate time series modeling, and the method includes: obtaining a target predicted chemical product; inputting the target predicted chemical product into a trained chemical product price prediction model to obtain a price prediction result of the target predicted chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0122] In addition, when the logical instructions in the above-mentioned memory 530 can be implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0123] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the chemical product price prediction method based on multivariate time series modeling provided by the above-mentioned various methods. The method includes: obtaining a target chemical product to be predicted; inputting the target chemical product to be predicted into a trained chemical product price prediction model to obtain the price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0124] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the chemical product price prediction method based on multivariate time series modeling provided by the above-mentioned various methods. The method includes: obtaining a target chemical product to be predicted; inputting the target chemical product to be predicted into a trained chemical product price prediction model to obtain the price prediction result of the target chemical product output by the chemical product price prediction model; wherein, the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set at least includes a chemical product multivariate feature training sample and a chemical product price feature test sample.

[0125] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative work.

[0126] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or equivalently replace some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting chemical product prices based on multivariate time series modeling, characterized in that: include: Obtain target predicted chemicals; Inputting the target predicted chemical product into a trained chemical product price prediction model to obtain a price prediction result of the target predicted chemical product output by the chemical product price prediction model; Wherein, the chemical product price prediction model is obtained by training based on a chemical product feature sample set; the chemical product feature sample set at least includes chemical product multivariate feature training samples and chemical product price feature test samples.

2. The method for predicting chemical product prices based on multivariate time series modeling according to claim 1, characterized in that: The step of determining the characteristic sample set of chemical products includes: Collect a sample set of data on the impact of chemical product prices that affect the price fluctuations of chemical products; Processing missing values ​​on the price impact data sample set to obtain a chemical product price impact data sample set with uniform data length; Performing data normalization processing on the chemical product price impact data sample set with uniform data length to obtain a standardized chemical product price impact data sample set; The sample feature extraction process is performed on the standardized chemical product price impact data sample set to determine the chemical product feature sample set.

3. The method for predicting chemical product prices based on multivariate time series modeling according to claim 2, characterized in that: The step of performing sample feature extraction processing on the standardized chemical product price impact data sample set to determine the chemical product feature sample set includes: Performing sample set classification processing on the standardized industrial product price impact data sample set, and screening out initial industrial product price impact data sample sets with different proportions from the standardized industrial product price impact data sample set according to the proportion of sample sets of each category; Using a first feature extraction model, performing a first feature extraction process on the initial chemical product price impact data sample set with different proportions to obtain a first chemical product impact sample; Using a second feature extraction model, performing a second feature extraction process on the initial chemical product price impact data sample set with different proportions to obtain a second chemical product impact sample; The chemical product feature sample set is determined based on the union features of the first chemical product impact samples and the second chemical product impact samples.

4. The method for predicting chemical product prices based on multivariate time series modeling according to claim 3, characterized in that: The first feature extraction model is a LASSO regression model, and the formula of the LASSO regression model is: , In the formula, For the first chemical product affected sample, To initialize the feature matrix of the sample set of data on the impact of industrial product prices, is the regression coefficient, Controls the strength of feature selection.

5. The method for predicting chemical product prices based on multivariate time series modeling according to claim 3, characterized in that: The second feature extraction model performs feature extraction based on the LightGBM model, and the formula of the LightGBM model is: , Where Gain is the total gain of the sample affected by the second chemical product, is the left gain of the jth impact sample, is the right gain of the jth impact sample.

6. The method for predicting chemical product prices based on multivariate time series modeling according to any one of claims 1 to 5, characterized in that: The steps of determining the trained chemical product price prediction model include: Obtaining an initial hidden state of an initial time step corresponding to the chemical product multivariate feature training sample; Performing vector conversion processing on the chemical product multivariate feature training sample to obtain a feature embedding vector; Inputting the feature embedding vector and the initial hidden state into a preset neural network model for training, and outputting a set of predicted prices for chemical products; the set of predicted prices for chemical products at least includes predicted prices for chemical products and model training parameters; Determining optimal model training parameters based on the predicted price of the chemical product and the test sample of the price characteristics of the chemical product; Using the neural network model corresponding to the optimal model training parameters as the trained chemical product price prediction model; Among them, the model training parameters include at least sequence length, number of model layers, hidden layer size, batch size, number of training rounds, and output size; the neural network model includes at least one or more of a recurrent neural network, a long short-term memory network, and a gated recurrent unit.

7. The method for predicting chemical product prices based on multivariate time series modeling according to claim 6, characterized in that: The determining of optimal model training parameters based on the predicted price of the chemical product and the test sample of the price characteristics of the chemical product includes: Calculate the root mean square error between the predicted price of the chemical product output in each round of training and the corresponding test sample of the chemical product price characteristics; Calculating a threshold difference between the root mean square error and a preset variance threshold; Determine whether the threshold difference is less than a preset training stop threshold; If yes, stop the training, determine the predicted price of the chemical product in the training round corresponding to the threshold difference, and use the model training parameters corresponding to the predicted price of the chemical product as the optimal model training parameters; If not, continue training until the optimal model training parameters are determined.

8. A chemical product price prediction device based on multivariate time series modeling, characterized in that: include: An acquisition module, used to acquire target predicted chemicals; The prediction module is used to input the target predicted chemical product into a trained chemical product price prediction model to obtain a price prediction result of the target predicted chemical product output by the chemical product price prediction model; wherein the chemical product price prediction model is trained based on a chemical product feature sample set; the chemical product feature sample set includes at least a chemical product multivariate feature training sample and a chemical product price feature test sample.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, it implements the chemical product price prediction method based on multivariate time series modeling as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting chemical product prices based on multivariate time series modeling as described in any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting chemical product prices based on multivariate time series modeling as described in any one of claims 1 to 7 is implemented.