Purchase scene-driven electric power material price multi-cycle AGC-LSTM prediction method and system

By employing multi-level adaptive scene recognition, dynamic causal feature filtering, and attention-enhanced prediction, combined with closed-loop optimization and real-time anomaly intervention, the accuracy and robustness of the power material price prediction model under different procurement scenarios and "black swan" events have been addressed, achieving high accuracy and powerful decision support.

CN121616339APending Publication Date: 2026-03-06JIANGSU ANFANG ELECTRIC POWER TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511765008.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing power material price forecasting models lack accuracy in different procurement scenarios, are unable to cope with "black swan" events, leading to decision failures, and lack the ability to deal with unknown risks.

Method used

A multi-level adaptive scene recognition, scenario-based dynamic causal feature screening, and scenario-based attention enhancement prediction method are adopted, combined with closed-loop adaptive optimization control, to dynamically adjust the model attention to adapt to different procurement scenarios, and adjust the attention allocation through a real-time anomaly intervention mechanism in the event of a "black swan" event.

Benefits of technology

It achieves high-precision forecasting in different procurement scenarios, has the ability to cope with unknown risks, and improves the robustness and decision support capabilities of the forecasting system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121616339A_ABST
    Figure CN121616339A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electric power material purchasing and pricing, and particularly discloses a purchasing scene-driven electric power material price multi-cycle AGC-LSTM prediction method and system, and the method comprises the steps: responding to a purchasing request, and carrying out the prediction of the price of electric power materials based on the purchasing parameters contained in the purchasing request and auxiliary parameters reflecting the market environment; determining a purchase scene type corresponding to the current purchase task through multi-stage adaptive identification logic; wherein the purchasing scene type comprises emergency purchasing, batch purchasing and long-term agreement purchasing. According to the method, most relevant market information input is customized for each prediction task through dynamic scene recognition and causal feature screening, and high matching of prediction logic and business scenes is ensured, so that more targeted and reliable data support is provided for different types of decisions such as emergency purchase; the method breaks through the limitation that a traditional model only depends on historical experience, and endows a prediction system with the emergency response capability of coping with unknown risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power material procurement and pricing technology, and in particular to a multi-period AGC-LSTM prediction method and system for power material prices driven by procurement scenarios. Background Technology

[0002] As the cornerstone of power grid construction and stable operation, the procurement costs of power equipment directly impact the economic benefits of the entire power system. Therefore, accurate multi-period forecasting of power equipment prices is crucial for procurement decisions, budget formulation, and risk mitigation. Currently, the industry primarily employs time-series-based deep learning models for price forecasting, which excel at capturing non-linear trends in historical data.

[0003] However, in practical applications, existing technologies face a deep-seated inherent conflict: the contradiction between the static, universal logic of predictive models and the dynamic, differentiated nature of power material procurement scenarios. Specifically, power material procurement is not a singular act but encompasses vastly different business scenarios, including urgency of demand, procurement volume, and agreement duration. For instance, the core drivers of emergency repair procurement are short-term supply-demand imbalances and logistical efficiency, while annual framework agreement procurement is more influenced by macroeconomic conditions, policy trends, and long-term price trends of upstream raw materials. Existing predictive models typically employ a fixed set of feature variables and model parameters to address all situations. This "one-size-fits-all" approach results in severely insufficient predictive accuracy in specific scenarios, failing to provide truly valuable insights for decision-making in procurement tasks of varying natures.

[0004] Moreover, even when some advanced models attempt to incorporate scenario-based concepts, they still face a more intractable conflict: the contradiction between the model's reliance on historical experience patterns and the suddenness and unpredictability of "black swan" events in the real market. Existing predictive models, regardless of their structural complexity, essentially learn and summarize repeatable patterns from massive amounts of historical data. However, the increasingly complex global supply chain system means that unforeseen "black swan" events such as geopolitical conflicts, extreme weather, major technological breakthroughs, or sudden policy and regulatory changes can instantly disrupt all historical patterns and introduce entirely new price drivers that have never appeared in historical data. In this situation, models trained entirely on historical experience will fall into cognitive blind spots. Their internal attention mechanisms and other key modules, lacking the ability to perceive and respond to unknown anomalies, will stubbornly focus on historical features that are now irrelevant, ignoring the sudden key factors that truly dominate market trends. This causes the predictive model to completely fail at the crisis moments when it is most needed, resulting in huge economic losses. Summary of the Invention

[0005] This invention aims to at least partially address one of the technical problems in related technologies. Therefore, the objective of this invention is to propose a multi-period AGC-LSTM prediction method and system for power material prices driven by procurement scenarios, in order to improve prediction accuracy.

[0006] To achieve the above objectives, a first aspect of the present invention proposes a multi-period AGC-LSTM prediction method for power material prices driven by procurement scenarios, comprising the following steps:

[0007] S1. Multi-level adaptive scenario recognition: In response to a procurement request, based on the procurement parameters contained in the procurement request and auxiliary parameters reflecting the market environment, the procurement scenario type corresponding to the current procurement task is determined through multi-level adaptive recognition logic; wherein, the procurement scenario type includes emergency procurement, bulk procurement and long-term agreement procurement.

[0008] S2. Scenario-based dynamic causal feature screening: In response to the determination of the procurement scenario type, dynamic causal reasoning with scenario-variable adaptation coefficient is introduced to calculate the scenario-based causal strength of multi-source fusion features on the price of power materials, and core features with strong causal relationship with the current scenario are screened out.

[0009] S3. Contextualized Attention Enhancement Prediction: The procurement scenario type is encoded as a scenario embedding vector, and the core features are input into an enhanced long short-term memory network (AGC-LSTM). The AGC-LSTM uses the scenario embedding vector to dynamically modulate the attention weights within the model at each time step, so that the model adaptively focuses on different core features according to the scenario type and outputs the prediction results of the electricity material price in the future multiple periods.

[0010] To achieve the above objectives, a second aspect of the present invention proposes a procurement scenario-driven multi-period AGC-LSTM prediction system for electricity material prices, comprising:

[0011] A multi-level adaptive scene recognition module is used to respond to a procurement request and, based on the procurement parameters and auxiliary parameters reflecting the market environment contained in the procurement request, determine the procurement scene type corresponding to the current procurement task through multi-level adaptive recognition logic; wherein, the procurement scene type includes emergency procurement, bulk procurement, and long-term agreement procurement.

[0012] The scenario-based dynamic causal feature filtering module is used to respond to the determination of the procurement scenario type by introducing scenario-variable adaptation coefficient dynamic causal reasoning, calculating the scenario-based causal strength of multi-source fusion features on the price of power materials, and filtering out core features with strong causal relationship with the current scenario.

[0013] The scenario-based attention enhancement prediction module is used to encode the procurement scenario type into a scenario embedding vector and is configured with an enhanced long short-term memory network AGC-LSTM. The AGC-LSTM is configured to dynamically modulate the attention weights inside the model at each time step using the scenario embedding vector, so as to adaptively focus on different core features according to the scenario type and output the prediction results of the price of the power materials in the future multiple periods.

[0014] A closed-loop adaptive optimization control module is configured to receive the prediction error between the prediction result and the actual price, and generate an adjustment signal through a built-in proportional-integral-derivative PID controller to adaptively adjust the hyperparameters of the scenario-based attention enhancement prediction module until the prediction error converges to within the error tolerance preset for the procurement scenario type.

[0015] To achieve the above objectives, a third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory. When the computer program is executed by the processor, it implements the above-described procurement scenario-driven multi-period AGC-LSTM prediction method for electricity material prices.

[0016] The procurement scenario-driven multi-period AGC-LSTM prediction method and system for power material prices in this invention, through dynamic scenario identification and causal feature filtering, tailors the most relevant market information input for each prediction task, ensuring a high degree of fit between the prediction logic and the business scenario. This provides more targeted and reliable data support for different types of decisions, such as emergency procurement, bulk procurement, and long-term agreement procurement. More importantly, this invention breaks through the limitations of traditional models that rely solely on historical experience, endowing the prediction system with immunity to unknown risks and emergency response capabilities. When a black swan event occurs in the market that cannot be explained by historical patterns, the system can immediately identify the anomaly in data distribution and forcibly override the conventional attention allocation logic, instantly guiding the model's focus to the newly emerging, decisive market shock factor. This makes the entire prediction system not only perform excellently in daily operations but also demonstrate strong robustness and decision support resilience in a market environment full of uncertainty. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the multi-period AGC-LSTM prediction method for power material prices driven by procurement scenarios provided by this invention.

[0018] Figure 2 This is a schematic diagram illustrating the implementation of the multi-period AGC-LSTM prediction system for power material prices driven by procurement scenarios provided by this invention.

[0019] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0020] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0021] The following describes, with reference to the accompanying drawings, a procurement scenario-driven multi-period AGC-LSTM prediction method, system, and electronic device for power material prices according to embodiments of the present invention.

[0022] Example 1:

[0023] This embodiment provides a method and system for multi-period price forecasting of power materials driven by procurement scenarios. This method aims to resolve the contradiction between the static universality of existing forecasting models and the dynamic differences in procurement business scenarios, as well as the contradiction between the model's over-reliance on historical experience and unforeseen market events. The method of this embodiment can be deployed on servers, cloud computing platforms, or dedicated data analysis workstations, providing intelligent, scenario-based, and highly robust price forecasting decision support for power companies' material procurement departments through a combination of hardware and software.

[0024] like Figure 1 As shown in this embodiment, the multi-period prediction method for electricity material prices driven by procurement scenarios can be summarized into three core stages: First, multi-level adaptive scenario identification is performed to deeply understand the commercial essence of the current procurement task; second, scenario-based dynamic causal feature screening is conducted to match the most relevant market driving factors for specific scenarios; finally, scenario-based attention-enhanced prediction is performed, and a closed-loop adaptive optimization mechanism is used to ensure the long-term effectiveness of the model and its rapid adaptability to new environments. The following will elaborate on each stage and step:

[0025] S1, Multi-level Adaptive Scene Recognition

[0026] Specifically, in response to a specific procurement request, the system first needs to accurately determine the procurement scenario type to which the procurement task belongs. In this embodiment, the preset procurement scenario types mainly include three typical categories: emergency procurement, bulk procurement, and long-term agreement procurement. Emergency procurement typically refers to small-batch, time-sensitive procurement caused by reasons such as emergency equipment repair or the start of temporary projects; bulk procurement refers to large-scale procurement to meet phased construction or inventory replenishment needs; and long-term agreement procurement refers to framework agreements signed with suppliers to lock in supply and prices over a longer period. The price influencing factors and fluctuation patterns of these three scenarios differ significantly; therefore, accurate scenario identification is a fundamental prerequisite for the effectiveness of all subsequent steps.

[0027] To achieve accurate classification of complex and ever-changing procurement tasks, this embodiment adopts a multi-level adaptive recognition logic. This logic includes two progressive recognition levels, which can balance recognition efficiency and accuracy. In particular, it has high recognition robustness for mixed procurement tasks with ambiguous features.

[0028] Optionally, the first level of recognition in the multi-level adaptive recognition logic, i.e., level one recognition, employs a rule engine based on fuzzy logic. This engine internally pre-defines a series of fuzzy rules and scenario membership functions constructed from industry expert knowledge. When a new procurement request enters the system, the system extracts the core procurement parameters contained in the request. These parameters, for example, include the quantity of the procured materials, the urgency score of the demand, the required delivery time, and the historical average procurement cycle of the materials. The fuzzy logic engine then transforms these clear numerical input parameters into fuzzy linguistic variables, such as "very small quantity" or "very high urgency," through predefined membership functions, such as triangular or trapezoidal membership functions.

[0029] Subsequently, the engine infers based on a fuzzy rule base in the form of IF-THEN. For example, a scenario where the number of IFs is very small, the urgency is very high, and the delivery time is extremely short is considered an urgent procurement. Finally, the engine outputs the membership value of the current procurement task to each preset procurement scenario type, with the value ranging from 0 to 1. The system has a first preset threshold, such as 0.85. If the calculated membership value of a certain scenario type is higher than this threshold, it indicates that the scenario characteristics of the current procurement task are very clear, and the system will directly classify it as that procurement scenario type and end the recognition process. This method enables fast and efficient classification of regular procurement tasks with distinct characteristics.

[0030] Optionally, when the first-level identification fails to reach a clear conclusion, i.e., the membership degree of all procurement scenario types is lower than the first preset threshold, the system will initiate the second-level identification. This usually means that the current procurement task may be a hybrid task between two scenarios, or an uncommon atypical task. The second-level identification aims to perform in-depth analysis through a more powerful classification model and richer information dimensions. In the second-level identification stage, the system not only uses the aforementioned core procurement parameters, but also introduces a series of auxiliary parameters that can reflect the current macro market environment.

[0031] For example, these auxiliary parameters may include supplier risk indices related to the power supply chain obtained from external data sources, as well as macroeconomic volatility indices reflecting the overall economic climate, such as the monthly change rate of the Producer Price Index (PPI).

[0032] For example, the secondary recognition uses a pre-trained gradient boosting decision tree, i.e., a GBDT classifier. To further improve the model's performance when handling samples with blurred scene boundaries, this embodiment innovatively introduces a scene ambiguity penalty function during the training process of the GBDT model. This function applies a larger loss weight to samples that are difficult to classify correctly and are located near the decision boundary in each iteration of model training, thereby improving the model's recognition accuracy under mixed scene features.

[0033] Specifically, for a training sample If the probabilities predicted by multiple scene categories are relatively close, it indicates that the scene ambiguity is high, and its weight in the loss function will be... The value will be dynamically increased. This mechanism forces the model to invest more effort in learning and distinguishing the subtle features of these difficult samples in subsequent iterations, thereby significantly improving the classifier's accuracy and robustness in mixed scene features.

[0034] Finally, the GBDT classifier outputs the procurement scenario type with the highest confidence as the final judgment result for secondary identification.

[0035] S2, Data Preparation and Feature Engineering

[0036] After accurately identifying the procurement scenario type, the system needs to prepare high-quality input data for subsequent prediction models. This stage includes the processing and fusion of multi-source data, as well as in-depth processing based on time series characteristics, ultimately selecting the core features most relevant to the current scenario.

[0037] Optionally, before performing scenario-based causal feature screening, the system will perform a comprehensive multi-source data processing step to generate the multi-source fusion features required for subsequent analysis. The price of electricity is influenced by a variety of factors, whose data sources are extensive and diverse in form.

[0038] Therefore, this embodiment first collects multi-source heterogeneous time-series data. This data not only includes historical price data of the target material itself, but also extensively covers price data of its upstream raw materials, such as bulk commodities like copper, aluminum, and steel, as well as macroeconomic indicators that reflect the overall market situation, such as interest rates, exchange rates, and Purchasing Managers' Index (PMI).

[0039] Because these raw data often contain noise, missing values, and misaligned timestamps, the system first employs a composite method combining wavelet transform and Kalman filtering for multimodal denoising and smoothing. Wavelet transform effectively separates high-frequency noise and low-frequency trends in the signal, exhibiting excellent time-frequency localization characteristics; while Kalman filtering is a powerful state estimation algorithm capable of optimally estimating and smoothing the data based on a dynamic time-series model. The combination of these two methods maximizes the preservation of effective information in the original data while filtering out various noise interferences.

[0040] For example, in order to effectively merge multiple preprocessed data sources into a multi-source fusion feature that comprehensively reflects market dynamics, this embodiment employs a dynamic weighted fusion strategy based on an optimization algorithm. The core of this strategy is to construct an objective function that can evaluate the quality of the combined data sources.

[0041] In this embodiment, the objective function comprehensively considers two key indicators: information gain as a positive indicator, and approximate entropy as a negative indicator of data source uncertainty. Information gain measures how much new information a data source can provide for predicting the target price, while approximate entropy quantifies the complexity and uncertainty of a time series. The higher the approximate entropy, the worse the inherent regularity of the data source, and the more noise or random components it may contain.

[0042] By constructing a composite objective function that aims to maximize information gain while minimizing approximate entropy, the system can quantify the value of each data source. Subsequently, global optimization algorithms such as simulated annealing or quantum optimization can be used to solve the objective function, find an optimal set of weight allocation schemes, and dynamically weight and fuse the multi-source data to ultimately generate a set of high-quality, high-information-density multi-source fused features.

[0043] Optionally, to further explore the nonlinear dynamic characteristics in the time series data and provide a better input form for the subsequent LSTM model, this embodiment adds an active abrupt change point detection and segmented phase space reconstruction step between the two steps of scenario-based causal feature screening and scenario-based time series prediction. Electricity commodity price series are often not stationary, but rather composed of multiple stationary segments and abrupt change segments with different statistical characteristics.

[0044] This embodiment employs a Bayesian online change point detection algorithm. This algorithm can calculate the posterior probability of a sudden change at each time point in real time during the data streaming input process, thereby dynamically dividing the entire price data sequence into multiple stationary and abrupt change segments. This online detection capability is crucial for timely capturing changes in market conditions.

[0045] For example, after dividing the data into different segments, the system needs to reconstruct the phase space of the data to unfold its attractor trajectory in a higher-dimensional space. Two key parameters for phase space reconstruction are delay time and latency. and embedding dimension This embodiment uses the CC method, which is capable of simultaneously estimating the optimal... and The robust algorithm independently calculates the optimal parameters for each stationary and abrupt segment identified in the previous step.

[0046] The key point is that our focus on stability and abrupt changes differs across different procurement scenarios. Therefore, this embodiment introduces a scenario volatility index, which is set based on the historical price fluctuation characteristics of a specific procurement scenario.

[0047] For example, in emergency procurement scenarios, this index will be higher, indicating that we are more focused on sudden changes. The system will use this scenario volatility index to adaptively weight and fuse the optimal parameters calculated for each segment, obtaining scenario-specific globally optimal parameters. and .

[0048] Specifically, in emergency procurement scenarios, the parameters of the mutation segment receive higher weight. Finally, based on these scenario-specific globally optimal parameters, the system reconstructs the aforementioned core feature sequence, transforming it from a one-dimensional time series into a high-dimensional nonlinear sequence vector. This input form is more conducive to the LSTM model capturing the deep-seated dynamic dependencies in the data.

[0049] Optionally, the core step of this stage is scenario-based dynamic causal feature screening. This step aims to screen out a subset of core features from a massive amount of multi-source fused features that have the strongest causal driving effect on the price of electricity materials in the current specific procurement scenario.

[0050] This embodiment employs a dynamic causal inference method based on an improved Granger causality test. First, the system calculates the basic causal coefficient of each feature on the price of electricity resources. This coefficient reflects the characteristics without considering any scene information. Statistical significance as a cause of price changes.

[0051] For example, the innovation of this embodiment lies in introducing scene information to dynamically adjust this causal relationship. This is achieved through a scene-based weight adjustment formula, which is expressed as follows:

[0052] ;

[0053] in, It is a feature Contextualized causality coefficients in specific scenarios; It is called the scenario-variable fit coefficient, which is a lookup table pre-calibrated by an expert knowledge base or machine learning model. It quantifies the degree of fit between a specific scenario and a specific feature.

[0054] For example, regarding the characteristics of long-term contract procurement scenarios and macroeconomic volatility indices, It would be a large positive value, thus strengthening the causality coefficient of this feature; however, for emergency procurement scenarios and the same macroeconomic feature, It could be a value close to zero or even negative, thus weakening the causal relationship.

[0055] Using this formula, the system calculates the contextualized causality coefficient for each feature in the current scene. Finally, the system sets a causality coefficient threshold, retaining only features with contextualized causality coefficients higher than this threshold, forming the final core feature set, which is then used as input for subsequent prediction models.

[0056] Phase 3: Contextualized Attention Enhancement Prediction and Closed-Loop Optimization

[0057] This stage utilizes a specially designed neural network model that can deeply integrate scene information to predict prices for multiple future cycles, and achieves continuous learning and adaptive optimization of the model through a complex closed-loop system.

[0058] Optionally, before inputting the core features into the prediction model, it is necessary to address a common problem in economic time series: the time lag between different variables. For example, an increase in raw material prices may take some time to be reflected in the final commodity price. To address this issue, this embodiment includes a time series calibration process in the prediction step. This process employs Dynamic Time Warping (DTW) to calculate the nonlinear time series similarity between each core feature time series and the electricity commodity price time series. The DTW algorithm can find the optimal warping path between the two series, even if they have local scaling, translation, and bending on the time axis.

[0059] For example, to make the time series calibration process adaptable to different scenarios, this embodiment dynamically adjusts a key parameter in the DTW algorithm: the regularization window constraint, also known as the Sakoe-Chiba Band. This constraint defines the maximum range by which the regularization path can deviate from the diagonal. In long-term contract procurement scenarios with stable price fluctuations and strong trends, a narrower regularization window can be set to improve computational efficiency and prevent excessive distortion. Conversely, in emergency procurement scenarios with volatile prices and potentially more complex time-lag relationships, the regularization window constraint can be appropriately relaxed to capture more complex time series correspondences. After finding the optimal regularization path, the system performs non-uniform translation and scaling of the time series of core features accordingly, thereby achieving deep alignment with the target price series in terms of shape and phase, providing the model with more time-synchronized input.

[0060] Optionally, the core of the scenario-based enhanced LSTM training process in this embodiment lies in the use of a gated recurrent unit network integrating an attention mechanism. The innovation of this model is that its attention mechanism can be directly modulated by external scenario information. Specifically, the procurement scenario type identified in the first stage, such as the discrete label "emergency procurement," is encoded through an embedding layer, converting it into a low-dimensional, dense real-number vector, called the scenario embedding vector. This vector can be viewed as a condensed representation of the procurement scenario in mathematical space, carrying the semantic information of the scenario.

[0061] For example, in the AGC-LSTM model, traditional attention mechanisms calculate the attention weights of each input feature based on the current input and the model's hidden state during prediction. However, in this embodiment, the aforementioned generated scene embedding vector is used as additional input and directly fed into the attention layer's computation. The attention layer learns a mapping relationship, ensuring that the final attention weight distribution is influenced by both the current data and global scene information.

[0062] Specifically, when the input scenario embedding vector represents emergency procurement, the attention layer automatically assigns higher attention weights to core features related to short-term price fluctuations (such as short-term supply-demand gaps and inventory levels). Conversely, when the scenario embedding vector represents long-term contract procurement, the attention layer allocates higher weights to core features reflecting long-term trends (such as macroeconomic policies and upstream capacity planning). In this way, scenario information is no longer a simple external switch but is deeply integrated into the model's internal decision-making process, achieving truly scenario-based attention-enhanced prediction.

[0063] Optionally, to enable the system to quickly adapt to new market environments or changes in specific commodity pricing patterns, this embodiment employs a complex mechanism for meta-learning adaptation to new environments and multi-module collaborative closed-loop optimization in model training and deployment. This first involves building a scenario-based pre-trained model library, the construction process of which is itself highly innovative. The system divides massive historical datasets according to the type of procurement scenario. Then, a course-learning strategy is used for model training. Specifically, the model first learns from a subset of "simple courses" with simple data patterns and stable price fluctuations, mastering basic predictive capabilities. Then, the complexity and volatility of the training data are gradually increased, i.e., learning "difficult courses." This training paradigm from easy to difficult helps the model converge better and establish more robust feature representations.

[0064] For example, in the later stages of the course, this embodiment further incorporates Model-Independent Meta-Learning (MAML) for training. The core idea of ​​MAML is "learning how to learn." It does not aim to train a model that performs best on a specific task, but rather to train a model with well-initialized parameters. This model can quickly converge to good performance when faced with a new task using only a small number of samples and a few gradient updates.

[0065] By combining course learning with MAML, the system can ultimately generate a pre-trained model for each preset procurement scenario type. This model not only grasps the general rules of that scenario but also possesses extremely high generalization and rapid adaptability. These models collectively constitute a scenario-based pre-trained model library. In actual deployment, when a new prediction task arrives, the system loads the corresponding pre-trained model from the library based on its scenario type. Then, using the latest limited sample data relevant to that task, it quickly fine-tunes the model, thereby achieving instant adaptation to new environments.

[0066] For example, to ensure that the model's prediction accuracy does not decrease due to the slow drift of market patterns during long-term operation, this embodiment also designs a multi-module collaborative closed-loop adaptive optimization mechanism. The core of this mechanism is the introduction of a proportional-integral-derivative (PID) controller, derived from classical control theory. The system continuously compares the model's prediction results with subsequent actual prices, calculating the prediction error. This prediction error sequence is used as the input signal to the PID controller.

[0067] The PID controller calculates a comprehensive adjustment signal based on the magnitude of the error (proportional P), the accumulation of the error (integral I), and the trend of error change (derivative D). This adjustment signal is used to dynamically and smoothly adjust key hyperparameters of the scenario-based prediction model, such as the learning rate decay factor. The goal of the PID controller is to drive the entire system so that the prediction error remains stable over the long term within a preset scenario error tolerance range based on different procurement scenario types. For example, emergency procurement scenarios are more sensitive to short-term errors and may have a lower tolerance. Through this closed-loop control, the system achieves an advanced adaptive capability, enabling continuous self-correction and optimization, ensuring the long-term stability and reliability of prediction performance.

[0068] In summary, the method in this embodiment not only deeply understands the differences in business scenarios and achieves refined feature selection and model prediction, but also has the ability to quickly adapt to new environments through meta-learning and perform long-term self-optimization through closed-loop control, thus providing unprecedented and powerful technical support for power material procurement decisions.

[0069] Example 2:

[0070] This embodiment, based on the technical solution described in Embodiment 1, provides a forecasting method designed to address extreme market conditions. Embodiment 1 details how to achieve high-precision adaptive forecasting in identifiable, routine procurement scenarios, with its core logic being scenario-driven. However, the real-world market environment is rife with unstructured and unpredictable risks, the so-called "black swan" events. These events, such as sudden geopolitical conflicts, major shifts in national industrial policies, physical disruptions of key supply chain nodes, or global public health crises, are characterized by their suddenness, rarity, and the fact that their driving factors have never appeared or have appeared very rarely in historical data. In these situations, the scenario identification and attention allocation logic based on historical experience in Embodiment 1 may temporarily fail, because no predefined scenario can accurately describe the current crisis state.

[0071] To address this fundamental technical challenge, this embodiment discloses a parallel real-time anomaly intervention mechanism. This mechanism operates independently of the scene recognition module, continuously monitoring the health status of the input data. Once a deviation from historical norms in market behavior is detected, the mechanism immediately activates, generating a powerful intervention signal. This forcefully corrects or even overrides the original attention allocation logic, guiding the predictive model to focus cognitive resources on the true source of the current crisis, thereby ensuring the system possesses strong decision support resilience and robustness at the most critical moments.

[0072] Optionally, the core function of the aforementioned real-time anomaly intervention mechanism is achieved through the following four closely coordinated steps:

[0073] The first is anomaly detection, used to sense unexpected events in the market in real time;

[0074] Secondly, intervention vectors are generated to precisely pinpoint the source of the "unexpected" event;

[0075] The next step is gating fusion and attention correction, which are used to intelligently integrate normal signals and abnormal signals;

[0076] Finally, attention-driven guidance is used to ensure that the model can respond correctly to a crisis.

[0077] Optionally, the anomaly distribution detection step is implemented as follows: The system maintains a baseline distribution model based on massive historical data in the background. This model describes the joint probability distribution of a set of core features under normal market conditions.

[0078] For example, this baseline distribution can be obtained by fitting core feature data from stable periods over the past few years, such as a Gaussian Mixture Model (GMM) or a non-parametric probability density function constructed using the kernel density estimation (KDE) method. Simultaneously, the system employs a sliding time window, such as the most recent 6 or 24 hours, to continuously collect the latest core feature data and calculate the joint probability distribution formed by these recent data in real time.

[0079] For example, to quantify the deviation between the current market state and historical norms, the system calculates the statistical distance between the two probability distributions in real time. In this embodiment, KL divergence is preferably used as the metric. KL divergence is an asymmetric measure used to quantify the difference or information loss between one probability distribution and another. Its definition is for discrete probability distributions. and It can be represented as:

[0080] ;

[0081] in, The data distribution representing the current time window, This represents the historical baseline distribution. When the market is running smoothly, and Very close. The value will remain at a low level. However, when a "black swan" event occurs, causing a drastic change in the data behavior of one or more core features, the current data distribution will... It will deviate significantly from the historical baseline This causes the calculated KL divergence value to spike instantly. The system has a preset dynamic anomaly threshold, which is not a fixed value but is dynamically adjusted based on the moving average and standard deviation of recent KL divergence values. For example, it can be set to the moving average plus three times the standard deviation. When the calculated KL divergence value exceeds this dynamic threshold, the system determines that the market has entered an abnormal state and triggers subsequent intervention steps.

[0082] Optionally, once the anomaly detection step confirms that the market has entered an abnormal state, the system immediately initiates the intervention vector generation step. The goal of this step is to generate a real-time anomaly intervention vector that accurately indicates the source of the anomaly. The generation process is highly targeted, first requiring the calculation of the anomaly contribution of each core feature to the surge in the overall KL divergence. An effective method is to analyze the marginal distribution changes of each feature one by one, quantifying its contribution to the overall distribution difference. Features with higher contribution are the cause of this market anomaly.

[0083] For example, the real-time anomaly intervention vector is designed as a sparse vector with the same dimension as the total number of core features. The vast majority of elements in the vector are zero, with only a few positions being non-zero. The positions of these non-zero values ​​correspond precisely to the specific core features identified as having the highest anomaly contribution. Furthermore, the magnitude of these non-zero values ​​is proportional to the anomaly contribution of the corresponding feature.

[0084] For example, suppose the system monitors 100 core features, including copper prices, aluminum prices, exchange rates, and a country's policy risk index. When a country suddenly issues an export ban on key minerals, the data for the country's policy risk index and the international futures prices of related minerals will fluctuate drastically. The KL divergence calculated by the anomaly detection module will therefore sharply exceed the threshold. At this point, the intervention vector generation module will calculate that these two features have the highest anomaly contribution. In the final 100-dimensional real-time anomaly intervention vector, only the positions corresponding to these two features have large positive values, while the remaining 98 positions are all zero. This vector acts like an urgent intelligence report, clearly telling subsequent modules: "The focus now should be on policy risk and mineral futures; other factors can be temporarily ignored."

[0085] Optionally, after generating the real-time anomaly intervention vector containing crisis information, the system does not simply replace the attention guidance signal in the normal scenario, i.e., the scene embedding vector described in Example 1, with it. Doing so might lead to overreaction by the system when anomaly judgment is incorrect or the anomaly level is weak. Therefore, this embodiment introduces a more sophisticated gating fusion and attention correction step.

[0086] At the heart of this step is a gating unit directly controlled by the aforementioned KL divergence value. This gating unit functions similarly to a smart dimmer or mixer, determining the weights of scene and anomalous signals in the final attention-directed input.

[0087] For example, the gating unit generates a gating value between 0 and 1 based on the relative relationship between the currently calculated KL divergence value and the dynamic anomaly threshold. When the KL divergence value is much lower than the threshold, The value is close to 0; when the KL divergence value spikes and far exceeds the threshold, The value will quickly approach 1. The system then uses this gate value. , for scene embedding vector and real-time anomaly intervention vector Dynamic weighted fusion is performed to generate a final hybrid attention-guided vector. Its fusion formula can be expressed as:

[0088] ;

[0089] This formula shows that, under normal circumstances, =0, Completely equal to The system behavior is completely consistent with that of Implementation Example 1. When slight anomalies begin to appear in the market, It will be a relatively small value, and abnormal signals will be incorporated with a small weight to fine-tune the system. However, when a "black swan" event occurs and the KL divergence is extremely high, Approaching 1, The main body will become Abnormal signals will dominate the allocation of attention. This smooth-transition gating fusion mechanism greatly enhances the stability and adaptability of the system.

[0090] Optionally, the final step of this mechanism is attention-driven forced guidance. After calculating a hybrid attention-guided vector that accurately reflects the current market state, the system uses it as the final guiding signal and inputs it into the attention layer of the AGC-LSTM model. Since, in extreme anomaly situations, the dominant component in the hybrid attention-guided vector is the sparse and high-amplitude real-time anomaly intervention vector, this will cause a decisive change in the attention layer's calculation of attention weights. The original, purely scene-driven attention allocation logic will be effectively overridden.

[0091] For example, when the attention layer's Softmax function receives an input with such a strongly biased signal, the distribution of its output attention weights becomes extremely concentrated. The model is forced to allocate almost all attention weights to specific core features that are marked as anomalous in the intervention vector. This achieves forced guidance of attention. The ultimate effect is that even if the prediction model itself has never seen such a "black swan" event in the training data, it can, guided by this mechanism, quickly identify the real driving factors in chaotic market information, like an experienced crisis management expert, and make relatively more reliable predictions based on this key information.

[0092] In summary, the real-time anomaly intervention mechanism disclosed in this embodiment successfully solves the fundamental problem that existing technologies cannot cope with unknown "black swan" events by constructing a monitoring and response system based on data distribution anomalies, independent of scene recognition. It endows the entire prediction system with not only the refined prediction capabilities for conventional scenarios described in Embodiment 1, but also powerful crisis perception and emergency response capabilities, thus demonstrating unparalleled robustness and decision support value in the complex and ever-changing modern market environment.

[0093] Example 3:

[0094] like Figure 2 As shown, corresponding to the above method embodiments, the present invention also proposes a procurement scenario-driven multi-period AGC-LSTM prediction system for power material prices, comprising:

[0095] A multi-level adaptive scene recognition module is used to respond to a procurement request and, based on the procurement parameters and auxiliary parameters reflecting the market environment contained in the procurement request, determine the procurement scene type corresponding to the current procurement task through multi-level adaptive recognition logic; wherein, the procurement scene type includes emergency procurement, bulk procurement, and long-term agreement procurement.

[0096] The scenario-based dynamic causal feature filtering module is used to respond to the determination of the procurement scenario type by introducing scenario-variable adaptation coefficient dynamic causal reasoning, calculating the scenario-based causal strength of multi-source fusion features on the price of power materials, and filtering out core features with strong causal relationship with the current scenario.

[0097] The scenario-based attention enhancement prediction module is used to encode the procurement scenario type into a scenario embedding vector and is configured with an enhanced long short-term memory network AGC-LSTM. The AGC-LSTM is configured to dynamically modulate the attention weights inside the model at each time step using the scenario embedding vector, so as to adaptively focus on different core features according to the scenario type and output the prediction results of the price of the power materials in the future multiple periods.

[0098] A closed-loop adaptive optimization control module is configured to receive the prediction error between the prediction result and the actual price, and generate an adjustment signal through a built-in proportional-integral-derivative PID controller to adaptively adjust the hyperparameters of the scenario-based attention enhancement prediction module until the prediction error converges to within the error tolerance preset for the procurement scenario type.

[0099] The system's workflow begins with the input of a procurement request: the multi-level adaptive scenario recognition module determines the procurement scenario type, including emergency procurement, bulk procurement, or long-term agreement procurement, based on procurement parameters such as procurement quantity and urgency of demand, as well as auxiliary parameters such as supplier risk index and macroeconomic fluctuation index, through multi-level recognition logic.

[0100] Once the scenario type is determined, the scenario-based dynamic causal feature screening module calculates the scenario-based causal strength of multi-source fusion features on the price of electricity materials by introducing dynamic causal inference of scenario-variable adaptation coefficients, and screens out the core features; this process includes multi-source data processing and active mutation point detection and segmented phase space reconstruction to generate high-dimensional nonlinear sequences.

[0101] Subsequently, the contextual attention enhancement prediction module encodes the scene type into a scene embedding vector and inputs it into the enhanced AGC-LSTM model. This model uses the scene embedding vector to dynamically modulate the attention weights at each time step, adaptively focusing on different core features and outputting multi-period price prediction results.

[0102] Finally, the closed-loop adaptive optimization control module receives the error between the predicted result and the actual price, generates an adjustment signal through the PID controller, and dynamically adjusts the hyperparameters of the prediction module, such as the learning rate, until the error converges to within the preset tolerance of the scenario, thus achieving continuous adaptive optimization. The entire process ensures that the prediction system has both scenario adaptability and robustness.

[0103] Example 4:

[0104] Corresponding to the above embodiments, the present invention also proposes an electronic device.

[0105] like Figure 3 The diagram shows a structural schematic of an electronic device according to the present invention. The electronic device 100 includes a processor 101 and a memory 103. The processor 101 and the memory 103 are connected, for example, via a bus 102. Optionally, the electronic device 100 may further include a transceiver 104. It should be noted that in practical applications, the transceiver 104 is not limited to one unit, and the structure of this electronic device 100 does not constitute a limitation on the embodiments of the present invention.

[0106] Processor 101 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 101 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0107] Bus 102 may include a pathway for transmitting information between the aforementioned components. Bus 102 may be a PCI bus or an EISA bus, etc. Bus 102 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0108] The memory 103 stores a computer program corresponding to a procurement scenario-driven multi-period AGC-LSTM prediction method for power material prices according to the above embodiments of the present invention. This computer program is controlled and executed by the processor 101. The processor 101 executes the computer program stored in the memory 103 to implement the content shown in the aforementioned method embodiments.

[0109] Among them, electronic devices 100 include, but are not limited to: mobile terminals such as laptops and PADs (tablet computers) and fixed terminals such as desktop computers. Figure 3 The electronic device 100 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0110] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A procurement scenario driven power material price multi-period AGC-LSTM prediction method, characterized in that, The method comprises the following steps: S1, in response to a procurement request, based on the procurement parameters contained in the procurement request and the auxiliary parameters reflecting the market environment, determining the type of the current procurement scene through multi-level adaptive identification logic in response to the procurement request; wherein the procurement scene type includes emergency procurement, bulk procurement and long-term agreement procurement; S2, in response to the determination of the type of the procurement scene, calculating the scene-causal strength of the multi-source fusion features on the price of the power materials through dynamic causal reasoning with the introduction of scene-variable adaptive coefficients, and screening out the core features with strong causal relationship with the current scene; S3, encoding the procurement scene type into a scene embedding vector, and inputting the core features into an enhanced long short-term memory network AGC-LSTM; wherein the AGC-LSTM uses the scene embedding vector to dynamically modulate the attention weight inside the model at each time step, so that the model adaptively focuses on different core features according to the scene type, and outputs the prediction results of the price of the power materials in the future multiple periods.

2. The method of claim 1, wherein, The multi-level adaptive identification logic in step S1 specifically comprises: First-level identification: through a rule engine based on fuzzy logic, the procurement parameters, including procurement quantity, demand urgency, historical procurement period, are matched with a preset scene membership function; if the membership degree of any procurement scene type is higher than a first preset threshold, it is directly determined as that procurement scene type; Second-level identification: if the membership degrees of all procurement scene types are lower than the first preset threshold, the procurement parameters, as well as the supplier risk index and the macroeconomic fluctuation index for reflecting the market environment, are input into a pre-trained gradient boosting decision tree GBDT classifier with the introduction of a scene fuzziness penalty function in the training process, and the GBDT classifier outputs the procurement scene type with the highest confidence; Wherein, the scene fuzziness penalty function is used to apply a larger loss weight to the samples with fuzzy classification boundary during training, so as to improve the recognition accuracy of the model under mixed scene features.

3. The method of claim 1, wherein, Before step S2, a multi-source data processing step is further included for generating the multi-source fusion features; the multi-source data processing step specifically comprises: A method combining wavelet transform and Kalman filtering is used to perform multi-modal denoising and smoothing processing on multi-source heterogeneous time series data including power material price data, upstream raw material price data and macroeconomic indicator data; A target function is constructed with information gain as a positive index and approximate entropy as a negative index of data source uncertainty, and a simulated annealing or quantum optimization algorithm is used to solve the target function, so as to dynamically weight the multi-source data and generate the multi-source fusion features.

4. The method of claim 3, wherein, Between step S2 and step S3, an active mutation point detection and segmented phase space reconstruction step is further included; the step specifically comprises: A Bayesian online change point detection algorithm is used to identify the price mutation points in the power material price data in real time, and the power material price data is dynamically divided into multiple stationary segments and mutation segments; The optimal delay time of each said stationary section and mutation section is calculated independently using C-C method and embedding dimension ; According to the purchase scene type, a scene volatility index is introduced, optimal parameters of each section are adaptively weighted and fused to obtain a global optimal parameter in a scene and ; wherein the scene volatility index is used to give a higher weight to the mutation section parameter in a high volatility scene. Reconstruct the core features based on the scenario-based global optimal parameters to generate a high-dimensional nonlinear sequence for use in step S3.

5. The method of claim 1, wherein, The step S3 also includes a timing calibration mechanism, specifically including: Using a dynamic time warping (DTW) algorithm, the nonlinear timing similarity between each core feature and the power material price is calculated, and the optimal warping path is obtained. According to the procurement scenario type, the warping window constraint in the DTW algorithm is dynamically adjusted to balance the calculation efficiency and alignment accuracy under different scenarios. Based on the optimal warping path, the timing of the core features is non-uniformly translated and scaled to achieve deep alignment in shape and phase with the power material price.

6. The method of claim 1, wherein, The AGC-LSTM in step S3 is trained according to the following steps, specifically including: Using an attention mechanism integrated gated recurrent unit network (AGC-LSTM); Encode the procurement scenario type into a scenario embedding vector and input it into the attention layer of the AGC-LSTM; The attention layer assigns different attention weights to different core features at each time step according to the scenario embedding vector, so that the model can automatically focus on price mutation related features in emergency procurement scenarios, and automatically focus on periodic trend related features in long-term agreement procurement scenarios.

7. The method of claim 1, wherein, After step S3, there is also a new environment adaptation and multi-module collaborative closed-loop optimization step; the step specifically includes: According to the procurement scenario type, load the corresponding pre-trained model from the scenario-based pre-trained model library; Collect a small amount of sample data in the new environment and quickly adjust the pre-trained model to adapt to the new environment; The prediction error between the prediction result and the actual price is input into a proportional-integral-derivative (PID) controller, which generates an adjustment signal to adaptively adjust the hyperparameters of the AGC-LSTM until the prediction error converges within the error tolerance of the procurement scenario type, achieving adaptive closed-loop optimization.

8. The method of claim 7, wherein, The scenario-based pre-trained model library is constructed in the following way: According to the procurement scenario type, divide the historical data set; Using a curriculum learning strategy, first train on a subset with simple data patterns and stable price fluctuations, then gradually increase data complexity and volatility to guide the AGC-LSTM learning; In the later stage of curriculum learning, combined with MAML algorithm training, the AGC-LSTM learns to quickly adapt to new tasks, and finally generates a pre-trained model for each procurement scenario type, thereby constructing the scenario-based pre-trained model library.

9. The method of claim 6, wherein, The training process of the LSTM also includes a real-time exception intervention mechanism, which specifically includes: (1) Abnormal distribution detection: At each prediction time step, the statistical distance between the joint probability distribution of a group of core features within a recent time window and the baseline distribution established based on historical data is calculated in real time; (2) Intervention vector generation: if the statistical distance exceeds a preset dynamic anomaly threshold, an real-time anomaly intervention vector is generated; wherein the real-time anomaly intervention vector is a sparse vector, the position of the non-zero value of which corresponds to a specific core feature that causes the statistical distance to exceed the threshold, and the magnitude of the non-zero value is proportional to the anomaly contribution degree of the specific core feature; (3) Gating fusion and attention correction: through a gating unit controlled by the size of the statistical distance, the scene embedding vector and the real-time anomaly intervention vector are dynamically weighted and fused to generate a hybrid attention guide vector; (4) Attention forced guidance: the hybrid attention guide vector is input into the attention layer of the AGC-LSTM to cover the original pure scene-driven attention allocation logic when an anomaly occurs, and force the model to allocate the highest attention weight to the specific core feature identified as an anomaly.

10. A procurement scenario-driven power commodity price multi-period AGC-LSTM prediction system, characterized in that, Comprise: A multi-level adaptive scene recognition module for determining the type of the current procurement scene based on the procurement parameters contained in the procurement request and the auxiliary parameters reflecting the market environment through multi-level adaptive recognition logic in response to the procurement request; wherein the procurement scene type includes emergency procurement, bulk procurement and long-term agreement procurement; A scene-based dynamic causal feature screening module for calculating the scene-based causal strength of multi-source fusion features on the price of power materials and screening core features with strong causal relationship with the current scene through dynamic causal reasoning with scene-variable adaptive coefficients in response to the determination of the procurement scene type; A scene-based attention-enhanced prediction module for encoding the procurement scene type into a scene embedding vector and configuring an enhanced long short-term memory network AGC-LSTM, which is configured to dynamically modulate the attention weight inside the model at each time step using the scene embedding vector to adaptively focus on different core features according to the scene type, and output the prediction result of the price of power materials in the future multiple periods; A closed-loop adaptive optimization control module configured to receive the prediction error between the prediction result and the actual price, and generate an adjustment signal through a built-in proportional-integral-derivative PID controller to adaptively adjust the hyperparameters of the scene-based attention-enhanced prediction module until the prediction error converges within the error tolerance of the procurement scene type.