A bulk commodity price data processing method based on enhanced ensemble learning
Patent Information
- Application Number
- CN202610910289.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-10-30
AI Technical Summary
1、该一种基于增强式集成学习的大宗商品价格数据处理方法,通过融合变分模态分解与自适应噪声完备集成经验模态分解,结合互信息、排列熵与样本熵的多准则联合筛选机制,能够有效分离高频噪声与真实价格信号,剔除混沌伪分量,保留关键模态信息,利用加权线性重构策略在抑制冗余扰动的同时维持主要能量成分,显著提升降噪后序列的信噪比与真实信号保真度。
Smart Images

Figure CN123015073A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of commodity trading data processing technology, and in particular to a commodity price data processing method based on augmented ensemble learning. Background Technology
[0002] Commodities (such as iron ore, crude oil, coal, and steel) are the basic raw materials of the global industrial system. Their price fluctuations directly affect production, trade, financial investment, and national economic security. Commodity price data has complex characteristics such as nonlinearity, non-stationarity, high volatility, and multi-factor coupling. It is affected by multiple factors such as supply and demand, geopolitics, exchange rate fluctuations, shipping costs, and financial market sentiment, resulting in a price series that exhibits high uncertainty and long-term and short-term dependence. With the widespread application of data-driven decision-making models in the industrial and financial fields, how to extract effective trend and structural information from massive, noisy, and non-stationar commodity price data has become an important foundation for risk management.
[0003] In existing raw commodity price data, multi-source heterogeneous events cause severe interweaving of non-stationary fluctuations and underlying real signals. Single decomposition algorithms struggle to effectively distinguish between high-frequency noise and effective fluctuation components, resulting in a large amount of redundant disturbances remaining in the denoised data sequence. Furthermore, short-term price shocks and long-term trend drivers in the denoised sequence are highly coupled. Traditional single encoding structures struggle to independently decouple and express these two types of information at different time scales within a unified feature space. Since the decoupled spatiotemporal features are continuously affected by conditional distribution drift caused by market state switching during recursive prediction, a single prediction model with a fixed structure struggles to dynamically adjust its decoding logic and state response path based on real-time feedback. Therefore, the problem this invention aims to solve is how to construct an integrated learning data processing framework that can adapt to market state evolution and optimize prediction paths in real time after achieving effective denoising and multi-scale feature decoupling. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, the present invention provides a commodity price data processing method based on reinforcement ensemble learning, which can effectively solve the problems involved in the prior art.
[0005] The objective of this invention can be achieved through the following technical solution: This invention provides a method for processing commodity price data based on enhanced ensemble learning, comprising the following steps: Step 1: Collect time-series price data of the target bulk commodity, perform missing data imputation and anomaly detection, use min-max normalization to complete data cleaning and quality assessment, and output a high signal-to-noise ratio initial sequence to ensure the integrity and reliability of the input data and provide a high-quality foundation for subsequent decomposition. Step 2: Integrate variational mode decomposition and adaptive noise complete integration empirical decomposition, dynamically select modal components based on mutual information criteria, effectively separate high-frequency noise from the real price signal, output the denoised historical price time series, effectively suppress noise interference, and significantly improve the real fidelity of the price signal; Step 3: Based on the filtered denoised historical price time series, a parallel encoding network is constructed using multi-head convolution and gated recurrent units to extract multi-scale spatiotemporal features covering short-term shocks and long-term trends, thereby achieving parallel extraction of multi-scale features and enhancing the model's ability to capture price dynamics. Step 4: Introduce an attention alignment module to adaptively fuse multi-scale spatiotemporal features, complete the decoupling encoding of short-term fluctuations and long-term driving factors, strengthen key driving information, suppress redundant interference, enhance feature expression capabilities, realize feature decoupling and key information enhancement, and improve feature expression efficiency. Step 5: Based on the decoupled features, construct a hybrid decoder network model based on deep Q network and stacked long short-term memory. Use prediction error as reward signal to adjust the decoding path online, realize dynamic adaptive modeling, realize online path adaptive adjustment, and improve the responsiveness to changes in market status. Step 6 introduces a data quality assessment feedback mechanism to monitor the modality decomposition and feature decoupling effects, trigger resampling or re-decomposition operations, ensure input reliability, and output decoupled spatiotemporal feature codes and data quality assessment indicators that can be traced back, forming an enhanced ensemble learning data processing framework for bulk commodity price data processing, forming a closed-loop self-optimization mechanism to ensure the long-term stability of the data processing process.
[0006] Preferably, step 1 specifically includes: We collect time-series data of historical transaction prices of target commodities, use a combination strategy of linear interpolation and cubic spline interpolation assisted by dynamic time warping to fill missing values, and use an improved local outlier factor and sliding interquartile range joint algorithm to detect and correct abnormal price records, ensuring data integrity and price authenticity, and reducing interference from human pricing errors. The corrected time series data is mapped to the [0, 1] interval using minimum-maximum normalization. Quantile truncation is introduced to eliminate the distortion effect of extreme outliers on the normalization boundary, generate a standardized price vector, eliminate the influence of dimensionality and boundary distortion, and improve the stability of model training. Output a high signal-to-noise ratio initial sequence with timestamp quality labels, establish a sequence integrity evaluation index matrix, and use it as a unified input basis for subsequent mode decomposition and feature extraction. Provide traceable data quality identification to ensure the reliability of input for decomposition and extraction.
[0007] Preferably, step 2 specifically includes: The normalized high signal-to-noise ratio initial sequence is input in parallel into the variational mode decomposition and adaptive noise complete integrated empirical mode decomposition module. Different bandwidth constraints and intrinsic mode selection criteria are applied respectively, and multiple sets of modal components and residual terms are output. Complementary modal information is obtained through parallel decomposition, which improves the comprehensiveness of signal decomposition. Calculate the normalized mutual information value between each modal component and the original sequence, dynamically set the screening threshold based on the information entropy gain rate, retain the effective modes that are strongly correlated with the real price signal, and effectively remove irrelevant components by dynamic threshold screening to enhance signal fidelity. High-frequency pseudo-modes and redundant perturbation components with mutual information below the threshold are removed. The retained modes are then reconstructed by weighting according to their variance contribution rate to form a denoised historical price time series. The weighted reconstruction retains the principal energy components, which significantly improves the signal-to-noise ratio of the series.
[0008] Preferably, step 2 further includes: Based on mutual information screening, the joint statistics of permutation entropy and sample entropy of each retained modal component are further calculated to eliminate pseudo-components with random chaotic characteristics or noise-dominated properties, thereby enhancing the fidelity of the real signal, effectively filtering out random noise, and improving signal purity and reliability. The selected modal components are sorted according to their energy-entropy ratio, and the dynamic threshold of cumulative contribution rate is adaptively determined. The first few modes are retained for sequence reconstruction, the interference of low-energy high-entropy components is suppressed, high-value signal components are retained first, and invalid information is reduced. The reconstructed sequence and the original sequence are subjected to residual white noise test and autocorrelation analysis. If the residual statistical characteristics exceed the tolerance range, the penalty factor and the number of modes in the decomposition module are adaptively adjusted and the screening and reconstruction process is repeated to ensure that the noise of the output sequence meets the randomness assumption and improve the consistency of noise reduction.
[0009] Preferably, step 3 specifically includes: The denoised historical price time series is divided into time windows and input into a multi-head convolutional network and a gated recurrent unit network in parallel to extract local fluctuation patterns and long-term dependencies, effectively separating price fluctuation features at different time scales and improving the completeness of feature extraction. Multi-head convolutional networks use one-dimensional convolutional kernels with different expansion rates to capture the characteristics of short-term price shocks across cycles. Gated recurrent units stitch together the bidirectional hidden states of trend evolution through forward and reverse time series modeling, enhancing the model's ability to characterize multi-cycle coupling patterns in price series. The design incorporates a cross-modal feature interaction layer that performs element-wise gating fusion of local features from convolutional outputs and temporal features from recurrent unit outputs, forming a decoupled and initialized multi-scale spatiotemporal feature representation. This achieves adaptive decoupling between local shocks and long-term trends, suppressing mutual interference between features.
[0010] Preferably, step 3 further includes: In parallel coding networks, feature alignment layers are introduced to map the local features output by multi-head convolutions and the temporal features output by gated recurrent units to a common latent semantic space. Domain discriminators and gradient inversion layers are used to eliminate heterogeneity bias, eliminate feature distribution bias, and improve semantic consistency. A temporal position encoding injection mechanism is constructed to add learnable relative position embeddings to each time step before feature fusion, preserving temporal sequence information and periodic phase features, thereby enhancing temporal modeling capabilities; The output is a multi-scale spatiotemporal feature matrix after alignment and fusion. This matrix is organized in a time step-feature channel-scale hierarchy, supporting dynamic backtracking and dimensional reconstruction.
[0011] Preferably, step 4 specifically includes: The multi-scale spatiotemporal feature matrix is input into the attention alignment module, and a learnable positional encoding and multi-head attention mechanism are introduced to generate a query vector that is adapted to the decoupling target of short-term shocks and long-term trends. The scaled dot product attention score is calculated with the features of each time step to enhance the recognition accuracy of key time steps. Attention weights are obtained by segmented Softmax normalization. Based on the weight distribution, the feature matrix is differentially weighted and fused to dynamically suppress redundant interference dimensions that are irrelevant to the prediction task, strengthen the feature response amplitude of key driving information, and improve the purity and robustness of feature representation. The output is a compact weighted feature vector after decoupling and encoding, which completes the explicit structural separation of short-term fluctuation patterns and long-term trend drivers, enhances the ability of features to discriminate and express market state evolution, and realizes the decoupling and encoding of dual time scale information.
[0012] Preferably, step 5 specifically includes: The decoupled and encoded weighted feature vectors are input into a stacked long short-term memory network (SLSTM). The hidden state is recursively calculated step by step through a multi-layer gating mechanism to build an initial prediction path generator with state memory capability, thereby enhancing the model's ability to remember price trends over long periods of time. Using the mean squared error between the current predicted value and the true value as the reward signal, the deep Q network is driven to construct a state-action value function, and an interactive joint decision interface is established with the SLSTM hidden layer to realize online optimization of decoding behavior driven by prediction error. The deep Q-network dynamically selects and adjusts the combination of SLSTM forget gate and input gate activation thresholds based on the ε-greedy strategy, realizing fine-grained adaptive correction of the online decoding path and improving the model's real-time response flexibility to sudden changes in market state.
[0013] Preferably, step 5 further includes: A composite reward function that integrates temporal difference error and prediction residual is constructed. The prediction error, selected action and state transition quadruple are stored in the experience replay pool for priority sampling training of deep Q network, which accelerates the learning convergence of key state transition scenarios. A competitive architecture deep Q-network is introduced to estimate the state value and action advantage function respectively. The target network periodically replicates parameters from the evaluation network to suppress overestimation and improve the sensitivity to market state switching, stabilize value estimation, and avoid price fluctuations. The output is the final hidden state sequence after dynamic gating modulation, forming an online reconstruction mechanism for the decoding path driven by reinforcement learning. This completes the adaptive decoding modeling of market state evolution, corrects the recursive behavior in real time, and adapts to implicit market switching.
[0014] Preferably, step 6 specifically includes: Establish a data quality assessment module to calculate three monitoring indicators in real time: modal reconstruction error, feature mutual information decay, and rolling mean of prediction residuals, to ensure that data processing quality can be quantified and tracked, and to detect abnormal fluctuations in a timely manner. When any indicator exceeds the preset dynamic threshold, a resampling operation is triggered to update the training time window, or a re-decomposition operation is triggered to re-execute the modality screening process, ensuring that the prediction model always runs in an effective state. The system outputs an enhanced ensemble learning data package with quality labels and a traceable feature encoding chain, and writes the trigger record to the feedback log to form a closed-loop self-optimizing data processing framework. This enables dynamic evaluation and adaptive compensation of the modality decomposition and feature decoupling effects, builds continuously evolving data processing capabilities, and improves robustness under different market conditions.
[0015] Compared with the prior art, the beneficial effects of the present invention are: 1. This method for processing commodity price data based on enhanced ensemble learning integrates variational mode decomposition and adaptive noise-complete ensemble empirical mode decomposition, combined with a multi-criteria joint screening mechanism of mutual information, permutation entropy and sample entropy. It can effectively separate high-frequency noise from the real price signal, eliminate chaotic pseudo-components, retain key mode information, and use a weighted linear reconstruction strategy to maintain the main energy components while suppressing redundant disturbances, thus significantly improving the signal-to-noise ratio and the fidelity of the real signal of the denoised sequence.
[0016] 2. This method for processing commodity price data based on enhanced ensemble learning employs multi-head convolution and bidirectional gated recurrent units to construct a parallel encoding network. Combined with the adversarial alignment mechanism of the domain discriminator and learnable positional encoding, it can independently extract the differentiated features of short-term price shocks and long-term trend drivers. By utilizing a cross-modal gated fusion layer, it achieves adaptive weighted combination of the two types of features, forming a decoupled and initialized multi-scale spatiotemporal feature representation, effectively avoiding the mutual coupling interference of information at different time scales in the traditional single encoding structure.
[0017] 3. This method for processing commodity price data based on reinforcement ensemble learning constructs a hybrid decoder of a deep Q-network and a stacked long short-term memory network. The reinforcement learning process is driven by a composite reward function. The gating parameters of the forget gate and the input gate are adjusted online through an ε-greedy strategy, so that the decoding path can dynamically correct the state response logic according to the real-time prediction error. This adapts to the implicit switching and non-stationary evolution of commodity market states, and significantly improves the model's sensitivity and robustness to conditional distribution drift. Attached Figure Description
[0018] Figure 1 This is a schematic diagram illustrating the workflow of a commodity price data processing method based on enhanced ensemble learning according to the present invention. Figure 2 This is a schematic diagram of the method flow for processing commodity price data based on enhanced ensemble learning according to the present invention. Figure 3 This is a schematic diagram of the overall architecture of a prediction model for a commodity price data processing method based on enhanced ensemble learning according to the present invention. Figure 4 This is a schematic diagram illustrating the feature extraction process of an encoder model based on a convolutional neural network, which is part of a commodity price data processing method based on enhanced ensemble learning according to the present invention. Detailed Implementation
[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0020] Example 1, please refer to Figures 1 to 4 This invention provides a technical solution: a method for processing commodity price data based on reinforced ensemble learning, comprising the following steps: Step 1: Collect time-series price data of the target commodity, perform missing imputation and anomaly detection, use min-max normalization to complete data cleaning and quality assessment, and output a high signal-to-noise ratio initial sequence to ensure the integrity and reliability of the input data and provide a high-quality foundation for subsequent decomposition. Collect time-series data of historical transaction prices of the target commodity, use a combination strategy of linear imputation assisted by dynamic time warping and cubic spline imputation to fill missing values, and detect and correct abnormal price records based on an improved local outlier factor and sliding interquartile range joint algorithm to ensure data integrity and price authenticity and reduce human price error interference. The corrected time-series data is mapped to the [0, 1] interval using min-max normalization, and quantile truncation is introduced to eliminate the distortion effect of extreme outliers on the normalization boundary, generate a standardized price vector, eliminate the influence of dimensionality and boundary distortion, improve the stability of model training, and output a high signal-to-noise ratio initial sequence with timestamp quality label. Establish a sequence integrity evaluation index matrix as a unified input basis for subsequent modal decomposition and feature extraction, provide traceable data quality identification, and ensure the input reliability of decomposition and extraction. It should be noted that the sampling frequency of the time-series data is set to daily or minute-based based on the commodity trading activity. For missing values encountered during data collection, a combination strategy of linear interpolation assisted by dynamic time warping and cubic spline interpolation is used for imputation. Dynamic time warping is used to measure the sequence similarity within adjacent complete time windows to determine the optimal interpolation reference interval. Linear interpolation is suitable for short-term missing segments (no more than 3 consecutive time steps), while cubic spline interpolation is used for long-term missing segments (more than 5 consecutive time steps). After interpolation, anomaly price records are detected based on an improved joint algorithm of local outlier factor and sliding interquartile range. The neighbor parameter k of the local outlier factor is set to 20, and the window length of the sliding interquartile range is set to 30 time steps. The anomaly detection threshold is three times the interquartile range. Detected anomaly records are corrected using median substitution, with a correction window width of five time steps before and after. After processing, an intermediate sequence with timestamps and processing markers is generated. Min-max normalization is performed on the corrected time series data, mapping the target interval to [0, 1]. A quantile truncation step is introduced before normalization to prevent extreme outliers from distorting the normalization boundary. The lower quantile is set to 0.01, and the upper quantile to 0.99. Values below the lower quantile or above the upper quantile are truncated to their corresponding quantile values. After truncation, the minimum and maximum values of the sequence are calculated, and a linear mapping is performed accordingly to generate a standardized price vector. The normalization formula uses the standard form: ,in and The minimum and maximum values of the truncated sequence are used to ensure that all price data are compressed to a uniform numerical range while retaining the main characteristics of the original distribution and eliminating the boundary stretching effect caused by extreme prices. The standardized price vector is stored in floating-point format. After normalization, context-related quality labels are added to the output vector of each time step. The quality labels include: missing imputation flag (0 for original value, 1 for linear imputation, 2 for spline imputation), anomaly correction flag (0 for normal, 1 for local outlier correction, 2 for sliding interquartile range correction), and quantile truncation flag (0 for no truncation, 1 for lower limit truncation, 2 for upper limit truncation). All labels are organized with timestamp as the primary key to form a high signal-to-noise ratio initial sequence. At the same time, a sequence integrity evaluation index matrix is established, which includes the following four indicators: missing rate (the proportion of missing values to the total length), anomaly rate (the proportion of outliers to the total length), signal-to-noise ratio estimate (the ratio of signal variance to noise variance), and kurtosis and skewness coefficients of the normalized sequence. This index matrix is output in JSON format along with the data sequence. Step 2: Integrating variational mode decomposition and adaptive noise complete integration empirical decomposition, modal components are dynamically screened based on mutual information criteria to effectively separate high-frequency noise from the real price signal, outputting a denoised historical price time series. This effectively suppresses noise interference and significantly improves the real fidelity of the price signal. The normalized high signal-to-noise ratio initial sequence is input in parallel into the variational mode decomposition and adaptive noise complete integration empirical mode decomposition modules, with different bandwidth constraints and intrinsic mode screening criteria applied respectively. Multiple sets of modal components and residual terms are output. Complementary modal information is obtained through parallel decomposition, improving the comprehensiveness of signal decomposition. The normalized mutual information value between each modal component and the original sequence is calculated. The screening threshold is dynamically set based on the information entropy gain rate to retain effective modes that are strongly correlated with the real price signal. Dynamic threshold screening effectively removes irrelevant components, enhancing signal fidelity. High-frequency pseudo-modes and redundant disturbance components with mutual information below the threshold are removed. The retained modes are weighted and reconstructed according to the variance contribution rate to form a denoised historical price time series. Weighted reconstruction retains the main energy components, significantly improving the sequence signal-to-noise ratio. It should be noted that the variational mode decomposition module sets the number of modes K to a range determined by the adaptive pre-analysis results of empirical mode decomposition, typically ranging from 8 to 12. The penalty factor α is set to 2000, and the convergence accuracy ε is set to 10. -7The alternating direction multiplier method is used to solve the center frequency and bandwidth constraints of each modal component. The adaptive noise-complete ensemble empirical mode decomposition module sets the white noise standard deviation to 0.2 times the standard deviation of the original sequence, the ensemble number to 100, and the maximum number of iterations to 5000. Both modules output their respective intrinsic modal component sets and corresponding residual terms, where each modal component carries independent frequency characteristics and energy distribution attributes. After parallel decomposition, the normalized mutual information value between each modal component and the original normalized sequence is calculated. The mutual information estimation uses the histogram method, with 64 segments. The joint probability distribution is obtained through frequency statistics. The screening threshold is dynamically set based on the information entropy gain ratio. Specifically, the mean and standard deviation of the mutual information values of all modal components are first calculated, and the mean plus 0.5 times the standard deviation is used as the base threshold. Then, based on the... The information entropy gain rate corresponding to the modal components is weighted and corrected, and the final threshold range is set between 0.15 and 0.40. Modal components with normalized mutual information values higher than the dynamic threshold are retained as effective modes that are strongly correlated with the real price signal, while components with values lower than the threshold are removed. For the retained effective modal components, the variance contribution rate of each component in the total energy of the original sequence is calculated. Specifically, the variance of each modal component is calculated first, and then divided by the sum of the variances of all retained modal components to obtain the energy proportion coefficient of each component. Based on this coefficient, the retained modes are reconstructed by weighted linear reconstruction to form a denoised historical price time series. The reconstruction value of each time step is the sum of the value of each modal component at that time multiplied by its variance contribution rate. While retaining the main signal energy, the residual disturbance of low contribution modes is weakened, resulting in a sequence output with a significantly improved signal-to-noise ratio. Furthermore, step 2 also includes: based on mutual information screening, further calculating the joint statistics of permutation entropy and sample entropy of each retained modal component, eliminating pseudo-components with random chaotic characteristics or noise-dominant properties, enhancing the fidelity of the real signal, effectively filtering out random noise, improving signal purity and reliability, sorting the screened modal components according to energy-entropy ratio, adaptively determining the dynamic threshold of cumulative contribution rate, retaining the first few modes for sequence reconstruction, suppressing interference from low-energy high-entropy components, prioritizing the retention of high-value signal components, reducing invalid information residue, performing residual white noise test and autocorrelation analysis on the reconstructed sequence and the original sequence, if the residual statistical characteristics exceed the tolerance range, adaptively adjusting the penalty factor and number of modes of the decomposition module and repeating the screening and reconstruction process to ensure that the output sequence noise meets the randomness assumption and improve noise reduction consistency; It should be noted that, based on the mutual information screening that retains effective modal components, a joint statistical evaluation mechanism of permutation entropy and sample entropy is further introduced to eliminate pseudo-components with random chaotic characteristics or noise-dominated properties. For each retained modal component, its permutation entropy and sample entropy values are calculated separately. The embedding dimension of permutation entropy is set to 6, the delay time to 1, and the matching dimension of sample entropy to 2. The similarity tolerance is set to 0.15 times the standard deviation of the original sequence. Permutation entropy reflects the local orderliness of the sequence; an entropy value approaching 1 indicates a high degree of randomness. Sample entropy measures the self-similarity of the sequence; a high entropy value indicates a lack of regularity. The joint judgment criterion is set as follows: components with permutation entropy greater than 0.85 and sample entropy greater than 1.2 are judged... Noise-dominated pseudo-components are eliminated, while the remaining components are retained as candidate effective modes. A dual-threshold joint screening process effectively filters out chaotic disturbances, enhancing the fidelity of the true price signal in each retained mode. The candidate mode components, after joint screening using permutation entropy and sample entropy, are sorted in descending order by their energy-entropy ratio. This order is used to adaptively determine the number of modes used for sequence reconstruction. The energy-entropy ratio is defined as the ratio of the mode component variance contribution rate to the permutation entropy. This index comprehensively characterizes the signal strength and orderliness of the mode component; a higher ratio indicates richer effective information and a more regular structure carried by the mode. A dynamic threshold for the cumulative contribution rate is set at 85%, and the energy-entropy ratios of each mode are accumulated sequentially from front to back. When the accumulated value first reaches or exceeds the threshold, all current and previous modes are truncated as the final retained modes, and subsequent components with low energy-entropy ratios are removed. This strategy prioritizes the retention of high-energy, low-entropy ordered modes and suppresses interference from low-energy, high-entropy components, achieving an adaptive balance between information preservation and noise suppression, and avoiding the loss of key information or redundant noise residue caused by fixed-quantity truncation. The reconstructed sequence is compared with the original normalized sequence using residual white noise testing and autocorrelation analysis to evaluate whether the noise reduction effect meets the preset quality standards. The residual sequence is obtained by calculating the difference between the original sequence and the reconstructed sequence at each time step. The Ljung-Box white noise test is performed on the residual sequence, with the lag order set to 1. 20, with a significance level of 0.05; simultaneously calculate the autocorrelation function of the residual sequence and observe whether its absolute value in the first 10 lags is all below 0.1. If the p-value corresponding to the test statistic is less than 0.05 or there is a significant non-zero autocorrelation, it is determined that the residual statistical characteristics exceed the tolerance range, indicating that the current decomposition parameters have failed to fully separate noise and signal. At this time, the penalty factor α of the VMD module is adaptively adjusted to search in steps within the range of 1000 to 3000, while the number of modes K is increased or decreased in the range of 6 to 14. The decomposition, screening and reconstruction process is re-executed until the residuals pass the white noise test and the autocorrelation function has no obvious tailing or truncation characteristics, ensuring that the noise component of the output sequence satisfies the random distribution assumption. Step 3: Based on the filtered denoised historical price time series, a parallel encoding network is constructed using multi-head convolution and gated recurrent units to extract multi-scale spatiotemporal features covering short-term shocks and long-term trends. This achieves parallel extraction of multi-scale features, enhancing the model's ability to capture price dynamics. The denoised historical price time series is segmented according to time windows and input into the multi-head convolutional network and gated recurrent unit network in parallel to extract local fluctuation patterns and long-term dependencies, effectively separating price fluctuation features at different time scales and improving the completeness of feature extraction. The multi-head convolutional network uses one-dimensional convolutional kernels with different expansion rates to capture cross-cycle short-term price shock features. The gated recurrent unit splices bidirectional hidden states of trend evolution through forward and reverse time series modeling, enhancing the model's ability to characterize multi-cycle coupling patterns in the price series. A cross-modal feature interaction layer is designed to perform element-wise gated fusion of the local features output by the convolution and the time series features output by the recurrent unit, forming a decoupled and initialized multi-scale spatiotemporal feature representation. This achieves adaptive decoupling of local shocks and long-term trends and suppresses mutual interference between features. It should be noted that the window length is set to 30 time steps based on the short-term memory characteristics of commodity price fluctuations. A sliding segmentation method with a stride of 1 is used to expand the training samples. The segmented window subsequences are input in parallel into a multi-head convolutional network and a gated recurrent unit network. The multi-head convolutional network has four parallel convolutional heads, each using a one-dimensional convolutional kernel with dilation rates set to 1, 2, 4, and 8, respectively, to capture short-term price shock features of different spans. Each convolutional head is followed by a batch normalization layer and a ReLU activation function, and then downsampled by max pooling with a pooling window size of 2 and a stride of 2 to compress feature dimensions and retain significant local patterns. The outputs of each convolutional head are flattened and concatenated to form a local fluctuation feature vector. The same time window subsequences are input in parallel into a bidirectional gated recurrent unit network to extract long-term dependencies in the price sequence. This network contains two stacked bidirectional GRU layers with 64 hidden units per layer. The forward and backward time branches handle the forward and backward dependencies of the sequence, respectively, and the outputs are displayed at each time step. The forward and backward hidden states are concatenated along the feature dimension to form a bidirectional hidden state sequence. To alleviate the gradient vanishing problem in long sequence training, gradient clipping is introduced into the network with a clipping threshold of 1.0. A Dropout layer with a dropout rate of 0.3 is applied to the output of each layer. The temporal features output by the bidirectional GRU retain complete contextual dependency information. After the independent extraction of local fluctuation features and bidirectional temporal features, a cross-modal feature interaction layer is designed to achieve gated fusion of the two. The interaction layer first copies and expands the local features output by the convolution along the time dimension to align them with the temporal features output by the GRU in time steps. Then, the fusion gate vector is calculated step by step. This vector is generated by concatenating the local features and temporal features and activating them with Sigmoid. The final multi-scale spatiotemporal feature representation is obtained by weighted summation of the local features and temporal features by the gate vector. This allows the network to adaptively adjust the contribution ratio of short-term shocks and long-term trends for each time step, achieving decoupling initialization of the two and outputting a structured multi-scale spatiotemporal feature representation. Furthermore, step 3 also includes: introducing a feature alignment layer in the parallel encoding network to map the local features output by the multi-head convolution and the temporal features output by the gated recurrent unit to the common latent semantic space; using a domain discriminator and a gradient inversion layer to eliminate heterogeneity bias, eliminate feature distribution bias, improve semantic consistency; constructing a temporal position encoding injection mechanism to add learnable relative position embeddings to each time step before feature fusion, retaining temporal sequence information and periodic phase features, enhancing temporal modeling capabilities; and outputting a multi-scale spatiotemporal feature matrix after alignment and fusion, which is organized in a time step-feature channel-scale hierarchy to support dynamic backtracking and dimension reconstruction. It should be noted that the feature alignment layer uses linear projection transformation to align the dimensions of the two types of features separately, with the projection dimension set to 128. Furthermore, an adversarial alignment mechanism is introduced with a domain discriminator and a gradient inversion layer to eliminate the heterogeneity bias in the distribution of the two types of features. The domain discriminator uses a two-layer fully connected network structure with 64 and 32 hidden layer units respectively. The output layer uses a binary sigmoid activation function to distinguish the source of features. The gradient inversion layer transmits features identically during forward propagation and multiplies the gradient by a fixed negative coefficient of -0.1 during backpropagation, ensuring that the representation learned by the feature extraction network can confuse the domain discriminator. This mechanism forces local and temporal features to align in the latent semantic space, suppressing representation bias caused by differences in feature extraction network structures. Before feature fusion, a temporal positional encoding injection mechanism is constructed, attaching a learnable relative positional embedding to each time step to preserve temporal sequence information and periodic phase features. First, a learnable positional embedding matrix is initialized, with dimensions equal to the maximum time step size multiplied by the embedding dimension. The maximum time step size is set to the maximum window length of the training samples (30), and the embedding dimension is consistent with the common semantic space dimension of 128. For each input sample window, the embedding is calculated based on its actual time step number. The corresponding position vector is retrieved from the embedding matrix and added element-wise to the aligned time-step features. Unlike fixed-position encoding, learnable relative position embedding can adaptively adjust the position representation according to task characteristics, capturing nonlinear temporal dependencies such as transaction calendar effects and monthly cycle features implicit in commodity price series. The feature sequence injected with position encoding retains the original time sequence information while enhancing the model's ability to recognize periodic fluctuation patterns. After position encoding injection and domain alignment, the aligned and fused multi-scale spatiotemporal feature matrix is output. This matrix is organized in the form of a three-dimensional tensor, with dimensions of time step dimension, feature dimension, and domain alignment dimension. The feature matrix has a fixed time step dimension of 30 (sliding window length), a feature channel dimension of 128, and a scale layer dimension of 4 (based on the four dilation rates of multi-head convolution). Each row of the feature matrix corresponds to a fused feature vector at a time step, and each column corresponds to the response of a specific feature channel at different time steps. Each scale layer independently stores local pattern information extracted under different receptive fields, enabling the feature matrix to support dynamic backtracking operations. The activation state of any feature channel in any time interval can be accessed through an indexing mechanism, and dimension reconstruction operations are supported to adapt to different input requirements of the downstream decoding network. Step 4: Introduce an attention alignment module to adaptively fuse multi-scale spatiotemporal features, complete the decoupling encoding of short-term fluctuations and long-term driving factors, strengthen key driving information, suppress redundant interference, enhance feature expression capabilities, realize feature decoupling and key information enhancement, and improve feature expression efficiency. Step 5: Based on the decoupled features, construct a hybrid decoder network model based on deep Q network and stacked long short-term memory. Use prediction error as reward signal to adjust the decoding path online, realize dynamic adaptive modeling, realize online path adaptive adjustment, and improve the responsiveness to changes in market status. Step 6 introduces a data quality assessment feedback mechanism to monitor the modality decomposition and feature decoupling effects, trigger resampling or re-decomposition operations, ensure input reliability, and output decoupled spatiotemporal feature codes and data quality assessment indicators that can be traced back, forming an enhanced ensemble learning data processing framework for bulk commodity price data processing, forming a closed-loop self-optimization mechanism to ensure the long-term stability of the data processing process.
[0021] Example 2, as Figures 1 to 4 As shown, based on Embodiment 1, the present invention provides a technical solution: Step 4 specifically includes: inputting the multi-scale spatiotemporal feature matrix into the attention alignment module, introducing learnable position encoding and multi-head attention mechanism, generating a query vector adapted to the decoupling target of short-term shocks and long-term trends, and calculating the scaled dot product attention score with the features of each time step to enhance the recognition accuracy of key time steps, obtaining attention weights through segmented Softmax normalization, performing differentiated weighted fusion on the feature matrix according to the weight distribution, dynamically suppressing redundant interference dimensions unrelated to the prediction task, strengthening the feature response amplitude of key driving information, improving the purity and robustness of feature representation, and outputting a compact weighted feature vector after decoupling encoding, completing the explicit structural separation of short-term fluctuation patterns and long-term trend driving factors, enhancing the feature's ability to discriminate and express market state evolution, and realizing the decoupling encoding of dual time scale information; It should be noted that the multi-scale spatiotemporal feature matrix is used as the input to the attention alignment module. This matrix is organized in the form of a three-dimensional tensor with dimensions of 30 for the time step length, 128 for the number of feature channels, and 4 for the number of scale levels. First, a set of learnable positional encoding parameters is initialized, with its dimension matching the time step length, and is added element-wise to the features of each time step to preserve temporal sequence information. Subsequently, the multi-head attention mechanism generates a set of query vectors adapted to the decoupling requirements of short-term shocks and long-term trends based on the current prediction task objective. The dimension of the query vector is set to 128, and the number of attention heads is set to 8. For each attention head, calculations are performed separately. The attention score is calculated by scaling the dot product between the query vector and features at each time step. A scaling factor, the reciprocal of the square root of the query vector's dimension, is introduced during the score calculation to control the magnitude range of the dot product result and avoid gradient saturation. The attention score matrix comprehensively characterizes the relevance strength of features at different time steps to the current prediction task. After obtaining the scaling dot product attention score for each time step, the attention alignment module performs piecewise softmax normalization along the time step dimension. This operation converts the original score for each time step into a non-negative probability distribution form that sums to 1, i.e., the attention weight. The temperature parameter of the piecewise softmax is... The number is set to 1.0 to ensure the discriminativeness and stability of the weight distribution. Based on the calculated attention weight distribution, the multi-scale spatiotemporal feature matrix is differentially weighted and fused: for time steps with higher weights, their corresponding feature vectors obtain a larger response amplitude during the fusion process; for time steps with weights close to zero, their contribution is effectively suppressed, redundant interference dimensions irrelevant to the prediction task are dynamically filtered out, and key feature dimensions containing short-term price shocks or long-term trend-driven information are strengthened. The weighted and fused feature vector retains the main information capacity of the original feature matrix. After attention weighted fusion, the attention alignment module outputs a tight... The weighted feature vector is set to 128, consistent with the dimension of the common semantic space. This output vector achieves explicit structural separation of short-term fluctuation patterns and long-term trend drivers: short-term shock-related features are characterized by locally concentrated peaks in the attention weight distribution, while long-term trend-related features are characterized by a smooth distribution across time steps. Information from two different time scales is given differentiated encoding methods in a unified feature representation space, avoiding the problem of mutual coupling and interference between the two types of features in the traditional single encoding structure. The decoupled encoding feature vector output at the end significantly enhances the ability to discriminate and express the evolution of market state. Step 5 specifically includes: inputting the decoupled encoded weighted feature vector into a stacked long short-term memory network (SLSTM), recursively calculating the hidden state step by step through a multi-layer gating mechanism, constructing an initial prediction path generator with state memory capability, enhancing the model's ability to remember price trends over long periods, using the mean square error between the current predicted value and the true value as a reward signal to drive the deep Q network to construct a state-action value function, and establishing an interactive joint decision interface with the SLSTM hidden layer to achieve online optimization of the decoding behavior driven by prediction error. The deep Q network dynamically selects and adjusts the combination of the SLSTM forget gate and input gate activation thresholds according to the ε-greedy strategy to achieve fine-grained adaptive correction of the online decoding path and improve the model's real-time response flexibility to sudden changes in market state. It should be noted that the dimension of the decoupled encoded weighted feature vector is 128, consistent with the dimension of the common semantic space. The stacked long short-term memory network adopts a three-layer stacked structure, with each layer having 64 hidden units. The hidden state is recursively calculated step-by-step through a multi-layer gating mechanism of forget gate, input gate, and output gate. Specifically, the network receives the decoupled feature vector in time step order. Within each time step, the forget gate determines the proportion of historical information to be discarded based on the current input and the hidden state at the previous time step. The input gate controls the degree of new information being written, and the output gate adjusts the expression strength of the current hidden state. The hidden state is propagated vertically, with the output of the upper layer serving as input to the lower layer, forming a progressive feature abstraction. The final output is a 64-dimensional sequence of hidden states, constructing an initial prediction path generator with state memory capabilities. The mean squared error is calculated using a rolling window approach with a window length of 30 time steps. The reward value is the negative logarithm of the mean error within the window, ensuring the reward signal monotonically increases with prediction accuracy. The deep Q-network employs a three-layer fully connected structure. The input layer receives a concatenated vector of the current hidden state and decoupled features from the stacked long short-term memory network, with a dimension of 192. The number of hidden layer units is set to 128 and 64 respectively, and the output layer corresponds to 8 discrete actions. This network establishes a joint decision interface with the hidden layers of the stacked long short-term memory network, and realizes information interaction through shared state representation. At each time step, the joint decision interface transmits the current hidden state, unit state and decoded features to the deep Q network, and returns the selected action parameters, forming a closed-loop decision interaction link. In the ε-greedy strategy, the exploration rate is initially set to 0.5, and decreases linearly to 0.05 with the number of training steps, with a decay step of 10,000 steps. Actions are randomly selected with probability ε to explore the unknown state space. In between, the action with the highest estimated value is selected with a probability of 1-ε. The set of available actions includes 8 combinations of the forget gate bias adjustment in the range of -0.1 to 0.1, and three adjustment levels of the input gate activation threshold in the range of 0.3 to 0.7. When the selected action is applied to the stacked long short-term memory network, the degree to which the forget gate retains historical information changes, and the sensitivity of the input gate to new information is adjusted synchronously. This changes the state response logic of the decoding path at each time step, enabling the prediction model to dynamically correct its recursive behavior based on real-time feedback and adapt to the state evolution of the commodity market. Step 5 also includes: constructing a composite reward function that integrates temporal difference error and prediction residual; storing the prediction error, selected action, and state transition quadruple to the experience replay pool for priority sampling training of the deep Q network to accelerate the learning convergence of key state transition scenarios; introducing a competitive architecture deep Q network to estimate the state value and action advantage function respectively; periodically copying parameters from the evaluation network to suppress overestimation and improve the sensitivity to market state switching; stabilizing value estimation to avoid price mutations causing oscillations; outputting the final hidden state sequence after dynamic gating modulation; forming an online reconstruction mechanism for decoding paths driven by reinforcement learning; completing adaptive decoding modeling of market state evolution; correcting recursive behavior in real time; and adapting to implicit market switching. It should be noted that a composite reward function is constructed by fusing temporal difference error and prediction residual to drive the learning process of the deep Q-network. The temporal difference error adopts a single-step update mode, with a discount factor set to 0.95 to balance the weights of immediate reward and future returns. The prediction residual is calculated based on the negative logarithm of the mean square error within a sliding window, with the window length maintained at 30 time steps. The weighted sum of the two is used as the final reward signal, where the weight of temporal difference error is 0.6 and the weight of prediction residual is 0.4. At each time step, the current state, selected action, immediate reward, and next state are organized into a quadruple and stored in the experience replay pool, with a maximum capacity of 100,000 records. During training, a priority sampling strategy is adopted. Instead of uniform sampling, the deep Q-network prioritizes samples based on the absolute value of their temporal difference errors, with samples having a higher probability of being sampled. This accelerates the model's learning and convergence in key state transition scenarios, ensuring that the deep Q-network can efficiently utilize high-value experiences from historical interactions. The deep Q-network employs a competitive architecture, feeding the output of the shared feature extraction layer into the state value stream and the action advantage stream. The state value stream consists of two fully connected layers with 64 and 32 hidden units respectively, outputting a single scalar representing the baseline value of the current state. The action advantage stream also uses a two-layer fully connected structure with 64 and 32 hidden units, outputting advantage values corresponding to eight discrete actions. The final action value is calculated by subtracting the advantage value from the sum of the state value and the advantage value. Mean value is obtained to eliminate the bias of the dominance function. The target network and the evaluation network have completely identical structures. The evaluation network updates its parameters at each step, and the target network copies all its parameters from the evaluation network every 500 steps. The soft update coefficient is set to 0.001. The target network participates in the calculation of the temporal difference target value to suppress the overestimation problem common in traditional deep Q networks. This ensures that the model maintains stable response sensitivity to market state changes in commodity price prediction tasks such as iron ore, avoiding value estimation oscillations caused by sudden price changes. The action decision output by the deep Q network based on the composite reward signal and the competitive architecture is used to perform online gating modulation on the forget gate and input gate of the stacked long short-term memory network. Specifically, after each action is executed, the forget gate is biased at the baseline. The selected incremental value is superimposed on the base value, with an adjustment range of -0.1 to 0.1 and a step interval of 0.05. The input gate activation threshold is adjusted in two levels within the range of 0.3 to 0.7, corresponding to conservative absorption and active absorption modes respectively. The modulated gate parameters take effect immediately, changing the state recursion logic of the current time step and all subsequent time steps until the next action is executed. The final output hidden state sequence is passed to the output layer in the form of a 64-dimensional tensor. After linear mapping and inverse normalization, the commodity price prediction value is obtained. The entire dynamic adjustment process of the decoding path is executed online, forming a reinforcement learning-driven adaptive decoding and reconstruction mechanism, enabling the prediction model to correct its recursive behavior in real time when the market state undergoes implicit switching. Step 6 specifically includes: establishing a data quality assessment module to calculate three monitoring indicators in real time: modal reconstruction error, feature mutual information decay, and rolling mean of prediction residuals. This ensures that data processing quality is quantifiable and traceable, promptly detects abnormal fluctuations, and triggers a resampling operation to update the training time window or a re-decomposition operation to re-execute the modal screening process when any indicator exceeds a preset dynamic threshold. This ensures that the prediction model always runs in an effective state, outputs an enhanced ensemble learning data package with quality labels and a traceable feature encoding chain, and writes the trigger record to the feedback log, forming a closed-loop self-optimizing data processing framework. This enables dynamic evaluation and adaptive compensation of the modal decomposition and feature decoupling effects, builds continuously evolving data processing capabilities, and improves robustness under different market conditions. It should be noted that the data quality assessment module performs rolling calculations on three monitoring indicators at a fixed time step (every 30 time steps). The first indicator is the modality reconstruction error, calculated as the root mean square error between the original normalized sequence and the reconstructed sequence, with a threshold set at 0.05. The second indicator is the feature mutual information decay, which measures the relative decrease in the normalized mutual information value between the current decoupled encoded features and the original high signal-to-noise ratio initial sequence compared to the initial decomposition, with a dynamic threshold range set between 0.15 and 0.40. The third indicator is the rolling mean of the prediction residual, using a sliding window with a window length of 30 time steps. The dynamic average is used to calculate the mean absolute error between the current predicted value and the true value, with a threshold set at 0.08. Each of the three indicators is compared with its corresponding dynamic threshold after a complete window calculation. When any of the three indicators exceeds its preset dynamic threshold range, the data quality assessment module triggers corresponding compensation operations based on the type and severity of the exceedance. For cases where the modal reconstruction error exceeds the limit or the feature mutual information decay is below the lower limit threshold, it is determined that the current decomposition parameters cannot effectively separate noise and signal, triggering a re-decomposition operation: re-executing VMD and CEEMDAN parallel decomposition, where VMD... The penalty factor α of the block is searched in steps within the range of 1000 to 3000, and the number of modes K is adaptively adjusted within the range of 6 to 14. For cases where the rolling mean of the prediction residual exceeds the limit, it is determined that the current training window cannot represent the recent market state, triggering a resampling operation: the training time window is pushed forward by 30 time steps, and sample data within the corresponding window is re-extracted for model updates. Each trigger operation records the name of the exceeding metric, the trigger time, and the executed action. After quality assessment and adaptive compensation processing, an enhanced ensemble learning data package is output, which includes the following components: noise reduction and reconstruction. The system generates a high signal-to-noise ratio price sequence, a 128-dimensional decoupled coded feature vector, and quality labels for each time step (including missing imputation flags, anomaly correction flags, and quantile truncation flags). Simultaneously, it generates a traceable feature coding chain, recording the feature coding path and gating modulation parameters for each time step using timestamps as the primary key. All trigger records and compensation actions are written to the feedback log in JSON format, serving as the basis for offline analysis and parameter optimization. This enables dynamic evaluation and adaptive compensation of the modality decomposition and feature decoupling effects, ensuring that the data processing workflow maintains stable output quality under different market conditions.
[0022] Example 3, as Figures 1 to 4 As shown, based on Examples 1 and 2, this invention provides a 1-day advance prediction for iron ore futures (Dalian Commodity Exchange). This embodiment uses the daily settlement price of iron ore futures on the Dalian Commodity Exchange as the data source, with a time span from January 2, 2014 to January 3, 2024, totaling 2492 sets of data. The first 1994 sets are used as the training set, and the last 498 sets are used as the test set to verify the performance of the method of the present invention in short-term (1-day) price prediction. First, the original price series is subjected to min-max normalization to eliminate the influence of dimensions. Then, variational mode decomposition (VMD) is used to adaptively decompose the series into 6 intrinsic mode components (IMFs) and a trend term, effectively separating high-frequency noise and low-frequency trend. The decomposed components are input in parallel into a multi-head convolutional encoder (MCNN). Each convolutional head independently extracts spatial features, which are then fused through ReLU activation, pooling, flattening, and a fully connected layer to output a fixed-dimensional feature vector. This encoding structure effectively solves the problems of heterogeneity and multicollinearity of multi-scale subsequences. The encoded features are input into a three-layer stacked long short-term memory (SLSTM) decoder to extract long-term temporal dependencies layer by layer, avoiding gradient vanishing and exploding. An attention mechanism is introduced between the encoder and decoder to calculate the correlation score between the query vector and the features at each time step. After Softmax normalization, key features are weighted and fused to improve prediction accuracy. The model uses the RAdam optimizer with β1=0.01, β2=0.02, learning rate 0.01, batch size 32, and 200 iterations. Dropout=0.09 is introduced to prevent overfitting. The final forecast results, after inverse normalization, yielded the daily iron ore futures price. Experimental results showed that this method achieved an RMSE of 4.847, a MAE of 3.331, and a MAPE of 2.485% in 1-day lead time forecasting, with a coefficient of determination R0. 2 The accuracy reached 0.969, which is significantly better than benchmark models such as LSTM and CNN, verifying the high accuracy and strong robustness of the present invention in short-term prediction.
[0023] Example 4, as Figures 1 to 4 As shown, based on Example 3, this invention provides a 30-day long-term multi-step forecast for iron ore futures (Dalian Commodity Exchange). To verify the advantages of this invention in long-term multi-step prediction, this embodiment uses the same dataset as in embodiment 3, but extends the prediction window to 30 days. The main challenge of this task is the error accumulation problem under a long window. Traditional models often degrade significantly with the increase of prediction step length. This invention uses variational mode decomposition (VMD) to denoise and separate trends in the original sequence, and combines multi-head convolutional encoder (MCNN) to extract multi-scale spatial features in parallel, which significantly reduces the interference of high-frequency noise on long-term prediction. The decoder uses a three-layer stacked long short-term memory network (SLSTM) to enhance the model's ability to model long-term dependencies. The attention mechanism dynamically weights key temporal features during the encoding-decoding process, further suppressing the influence of irrelevant information on multi-step prediction. The optimizer used was RAdam, and the training parameters were the same as in Example 3. Experimental results showed that in a 30-day multi-step prediction task, the RMSE of the method of this invention was 8.42, MAE was 6.456, MAPE was 4.856%, and the coefficient of determination R0 was [missing value]. 2 It remains above 0.945; in contrast, traditional LSTM and models without VMD integration show similar R values within the same prediction window. 2 The values are generally below 0.85, indicating significant error accumulation. This embodiment fully demonstrates that the present invention has significant resistance to error accumulation in long-term multi-step forecasting, and is suitable for steel companies, traders and financial institutions to judge the medium and long-term trend of iron ore prices and manage risks.
[0024] Example 5, as Figures 1 to 4 As shown, based on Example 3, this invention provides a verification method for predicting iron ore prices on the Singapore Exchange. To verify the universality and cross-market adaptability of the method of the present invention, this embodiment uses the Singapore Exchange iron ore price index as the data source, with a time range from January 2, 2014 to January 3, 2024, totaling 2439 sets of data. This dataset differs from the data of the Dalian Commodity Exchange in terms of price fluctuation characteristics, market structure and influencing factors, and is highly representative. Data preprocessing and model structure remain unchanged: after min-max normalization, the data is decomposed into 6 IMF components and a trend term by VMD; multi-head convolutional encoder (MCNN) extracts spatial features in parallel; three-layer stacked LSTM (SLSTM) decoder models temporal dependencies; attention mechanism weights key features; RAdam optimizer is trained with hyperparameters the same as in Example 3; The experiment was conducted on a one-day advance prediction task. The results show that the method of this invention achieved RMSE=4.513, MAE=3.227, MAPE=2.382%, and a coefficient of determination R on Singapore Exchange data. 2 With an excellent performance of 0.971, it outperforms the compared LSTM, CNN and MCNN-SLSTM-AT model without VMD integration; This embodiment verifies the strong generalization ability of the method of the present invention in different markets and different price indices. The method can be directly transferred to overseas iron ore markets without redesigning the network structure. It is also applicable to price forecasting of other bulk commodities such as steel, coal, and crude oil, and has broad industrial application value and technology promotion prospects.
[0025] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. The scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for processing commodity price data based on reinforced ensemble learning, characterized in that, Includes the following steps: Step 1: Collect time-series price data of the target commodity, perform missing data imputation and anomaly detection, use min-max normalization to complete data cleaning and quality assessment, and output an initial sequence with high signal-to-noise ratio; Step 2: Integrate variational mode decomposition and adaptive noise complete integration empirical decomposition, dynamically select modal components based on mutual information criterion, effectively separate high-frequency noise from the real price signal, and output the denoised historical price time series. Step 3: Based on the filtered denoised historical price time series, a parallel encoding network is constructed using multi-head convolution and gated recurrent units to extract multi-scale spatiotemporal features covering short-term shocks and long-term trends. Step 4: Introduce an attention alignment module to adaptively fuse multi-scale spatiotemporal features, complete the decoupling encoding of short-term fluctuations and long-term driving factors, strengthen key driving information, and suppress redundant interference. Step 5: Based on the decoupled features, construct a hybrid decoder network model based on deep Q network and stacked long short-term memory. Use prediction error as reward signal to adjust the decoding path online and achieve dynamic adaptive modeling. Step 6 introduces a data quality assessment feedback mechanism to monitor the modality decomposition and feature decoupling effects, triggering resampling or re-decomposition operations to output decoupled, traceable spatiotemporal feature codes and data quality assessment indicators, forming an enhanced ensemble learning data processing framework for bulk commodity price data processing.
2. The method for processing commodity price data based on reinforcement ensemble learning according to claim 1, characterized in that: Step 1 specifically includes: Collect time-series data of historical transaction prices of target commodities, use a combination strategy of linear interpolation and cubic spline interpolation assisted by dynamic time warping to fill missing values, and detect and correct abnormal price records based on an improved local outlier factor and sliding interquartile range joint algorithm. The corrected time series data is mapped to the [0, 1] interval using minimum-maximum normalization, and quantile truncation is introduced to eliminate the distortion effect of extreme outliers on the normalization boundary, generating a standardized price vector. Output a high signal-to-noise ratio initial sequence with timestamp quality labels and establish a sequence integrity evaluation index matrix.
3. The method for processing commodity price data based on reinforced ensemble learning according to claim 1, characterized in that: Step 2 specifically includes: The normalized high signal-to-noise ratio initial sequence is input in parallel into the variational mode decomposition and adaptive noise complete integrated empirical mode decomposition module. Different bandwidth constraints and intrinsic mode screening criteria are applied respectively, and multiple sets of modal components and residual terms are output. Calculate the normalized mutual information value between each modal component and the original sequence, and dynamically set the screening threshold based on the information entropy gain rate to retain effective modes that are strongly correlated with the real price signal; High-frequency pseudo-modes and redundant disturbance components with mutual information below the threshold are removed, and the retained modes are reconstructed by weighting according to the variance contribution rate to form a denoised historical price time series.
4. The method for processing commodity price data based on reinforcement ensemble learning according to claim 3, characterized in that: Step 2 also includes: Based on mutual information screening, the joint statistics of permutation entropy and sample entropy of each retained modal component are further calculated to eliminate pseudo-components with random chaotic characteristics or noise-dominated properties, thereby enhancing the fidelity of the real signal. The selected modal components are sorted according to their energy-entropy ratio, and the dynamic threshold of cumulative contribution rate is adaptively determined. The first few modes are retained for sequence reconstruction, and interference from low-energy, high-entropy components is suppressed. The reconstructed sequence and the original sequence are subjected to residual white noise test and autocorrelation analysis. If the residual statistical characteristics exceed the tolerance range, the penalty factor and the number of modes of the decomposition module are adaptively adjusted and the screening and reconstruction process is repeated.
5. The method for processing commodity price data based on reinforced ensemble learning according to claim 1, characterized in that: Step 3 specifically includes: The denoised historical price time series is divided into time windows and input into a multi-head convolutional network and a gated recurrent unit network in parallel to extract local fluctuation patterns and long-term dependencies, respectively. Multi-head convolutional networks use one-dimensional convolutional kernels with different expansion rates to capture the characteristics of short-term price shocks across cycles, and gated recurrent units splice together the bidirectional hidden states of trend evolution through forward and reverse time series modeling. A cross-modal feature interaction layer is designed to perform element-wise gating fusion of the local features output by convolution and the temporal features output by recurrent units, forming a decoupled and initialized multi-scale spatiotemporal feature representation.
6. The method for processing commodity price data based on reinforced ensemble learning according to claim 5, characterized in that: Step 3 also includes: A feature alignment layer is introduced into the parallel coding network to map the local features output by the multi-head convolution and the temporal features output by the gated recurrent unit to the common latent semantic space. A domain discriminator and a gradient inversion layer are used to eliminate heterogeneity bias. A temporal position encoding injection mechanism is constructed to add learnable relative position embeddings to each time step before feature fusion, thus preserving temporal sequence information and periodic phase features; Output the aligned and fused multi-scale spatiotemporal feature matrix, which is organized in the order of time step-feature channel-scale hierarchy.
7. The method for processing commodity price data based on reinforcement ensemble learning according to claim 1, characterized in that: Step 4 specifically includes: The multi-scale spatiotemporal feature matrix is input into the attention alignment module, and a learnable positional encoding and multi-head attention mechanism are introduced to generate a query vector that is adapted to the decoupling target of short-term shocks and long-term trends. The scaled dot product attention score is calculated with the features of each time step. Attention weights are obtained by segmented Softmax normalization. Based on the weight distribution, the feature matrix is differentially weighted and fused to dynamically suppress redundant interference dimensions that are irrelevant to the prediction task and enhance the feature response amplitude of key driving information. The output is a compact weighted feature vector after decoupling and encoding, which completes the explicit structural separation of short-term fluctuation patterns and long-term trend drivers, and enhances the feature's ability to discriminate and express the evolution of market state.
8. The method for processing commodity price data based on reinforcement ensemble learning according to claim 1, characterized in that: Step 5 specifically includes: The decoupled and encoded weighted feature vectors are input into a stacked long short-term memory network, and the hidden state is recursively calculated step by step through a multi-layer gating mechanism to construct an initial prediction path generator with state memory capability. The mean squared error between the current predicted value and the true value is used as the reward signal to drive the deep Q network to construct the state-action value function, and to establish an interactive joint decision interface with the SLSTM hidden layer. The deep Q network dynamically selects and adjusts the combination of SLSTM forget gate and input gate activation thresholds according to the ε-greedy strategy, thereby achieving fine-grained adaptive correction of the online decoding path.
9. The method for processing commodity price data based on reinforced ensemble learning according to claim 1, characterized in that: Step 5 further includes: A composite reward function that integrates temporal difference error and prediction residual is constructed. The prediction error, selected action and state transition quadruple are stored in the experience replay pool for priority sampling training of deep Q network. A competitive architecture deep Q-network is introduced to estimate the state value and action advantage functions respectively. The target network periodically replicates parameters from the evaluation network to suppress overestimation and improve the sensitivity to market state switching. The output is the final hidden state sequence after dynamic gating modulation, forming an online reconstruction mechanism for the decoding path driven by reinforcement learning, thus completing the adaptive decoding modeling of market state evolution.
10. The method for processing commodity price data based on reinforced ensemble learning according to claim 1, characterized in that: Step 6 specifically includes: Establish a data quality assessment module to calculate three monitoring indicators in real time: modal reconstruction error, feature mutual information decay, and rolling mean of prediction residuals; When any indicator exceeds the preset dynamic threshold, a resampling operation is triggered to update the training time window, or a re-decomposition operation is triggered to re-execute the modality screening process. The system outputs an enhanced ensemble learning data package with quality labels and a traceable feature encoding chain, and writes the trigger record to the feedback log, forming a closed-loop self-optimizing data processing framework to achieve dynamic evaluation and adaptive compensation of the modality decomposition and feature decoupling effects.