A medium and long term electricity price prediction method, system, device and medium based on policy time sequence causal diagram
By constructing a policy time-series causal graph and introducing a learnable delay duration, the problem of the lack of modeling of policy causal transmission relationships in existing technologies is solved, and high-precision electricity price forecasting is achieved during periods of intensive policy implementation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID ENERGY RES INST CO LTD
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-21
AI Technical Summary
Existing electricity price forecasting techniques cannot effectively model the causal transmission relationships between policies and their dynamic lag effects, resulting in low forecast accuracy during periods of intensive policy implementation.
By constructing a policy time-series causal graph, and by identifying the directed dependencies between policies and introducing learnable delay durations, we can achieve joint modeling of causal transmission and differentiated lag effects between policies.
During periods of frequent policy releases or institutional adjustments, efforts should be made to reduce the error in medium- and long-term electricity price forecasts and improve forecast accuracy.
Smart Images

Figure CN122434573A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity price forecasting technology, and in particular to a method, system, device and medium for medium- and long-term electricity price forecasting based on policy time-series causal graphs. Background Technology
[0002] As electricity market reforms deepen, medium- and long-term electricity prices are influenced by multiple factors, with electricity policy being the core driving variable. Accurate electricity price forecasting is crucial for power generation companies' pricing, grid planning, and regulatory decisions.
[0003] Existing electricity price forecasting technologies typically handle policy factors by independently quantifying each policy text, such as based on keyword strength or document embedding, and then inputting them as external features into time-series forecasting models. This approach ignores the inherent dependencies between policies; for example, higher-level policies are referenced, refined, or supplemented by lower-level policies, and the effect of a later policy often depends on the effectiveness of the preceding one. More importantly, there is an uncertain lag between policy release and its actual impact on electricity prices, and the lag characteristics differ significantly among different policy types. Existing technologies lack the ability to jointly model the causal structure and dynamic lag effects between policies, leading to policy shocks being incorrectly treated as instantaneous or fixed-delay independent events, resulting in a sharp increase in forecast errors during periods of intensive policy releases or institutional changes. Summary of the Invention
[0004] To address the problem that existing electricity price forecasting methods cannot model the causal transmission relationships and dynamic lag effects between policies, resulting in low forecasting accuracy during periods of intensive policy adjustments, this invention provides a medium- to long-term electricity price forecasting method, system, device, and medium based on a policy time-series causal graph. By constructing a policy time-series causal graph and introducing a learnable delay duration, it achieves joint modeling of causal transmission and differentiated lag effects between policies, thereby reducing the forecasting error of medium- to long-term electricity prices during periods of intensive policy adjustments. The specific technical solution is as follows: This application provides a medium- to long-term electricity price forecasting method based on policy time-series causal diagrams, including the following steps: Obtain multiple power-related policy documents and the release date of each policy document; Based on the semantic content association between policy texts, determine the directed dependencies between policies, and ensure that the direction of dependency is consistent with the order of release time; A directed graph is constructed using each policy text as a node and the aforementioned directed dependencies as directed edges. For each node in the directed graph, the initial policy strength value of each node is calculated based on the policy release level corresponding to the node and the degree of enforcement in the policy text. Along the edges of the directed graph, the cumulative policy intensity value of each node is iteratively updated in chronological order. For any child node, the intensity value of each parent node only begins to propagate to the child node after the time difference between the current time and the release time of the parent node reaches a learnable delay duration. The learnable delay duration is set with different delay duration parameters for different dependency relationship types. At each point in time, the cumulative policy intensity values of all historically issued policies are summed with time decay to obtain the policy shock value at each point in time, and then the policy shock time series is formed in chronological order. The policy shock time series and non-policy time series data, including at least electricity market operation data, are input into an electricity price forecasting model to output medium- and long-term electricity price forecast results.
[0005] Preferably, determining the directed dependency relationship between policies based on the semantic content association between policy texts specifically includes: Identify the content relationship between a first policy and a second policy in multiple policy texts, wherein the content relationship is manifested in the first policy being cited, elaborated, repealed, or supplemented by the second policy; The direction of the content association is determined to be from the first policy to the second policy, and the release time of the first policy is earlier than the release time of the second policy; Construct a directed edge with the first policy as the parent node and the second policy as the child node.
[0006] Preferably, the step of iteratively updating the cumulative policy intensity value of each node along the edge direction of the directed graph in chronological order specifically includes: The cumulative policy strength value of each node is equal to the initial policy strength value of the node plus the sum of the strength contributions from all parent nodes of the node; the strength contribution from any parent node is equal to the current cumulative policy strength value of the parent node multiplied by a preset propagation attenuation coefficient, and then multiplied by a time gate value. The time gating value is a monotonically non-decreasing function, whose input is the time difference between the current time step and the parent node's publication time; When the time difference is less than a learnable delay duration, the time gating value is zero; when the time difference is greater than or equal to the learnable delay duration, the time gating value gradually increases with the time difference until it reaches a saturation value.
[0007] Preferably, the learnable delay duration is set with different delay duration parameters for at least one of the following dimensions: Different types of directed dependencies; Different combinations of policy release levels; Different types of policy tools.
[0008] Preferably, the formula for updating the cumulative policy intensity value is: in, For nodes At time step The cumulative policy intensity value; For nodes The initial policy intensity value; For nodes The set of all parent nodes; parent node In the previous time step The cumulative policy intensity value; From the parent node To child nodes The propagation attenuation coefficient; It is a time-gated function; ,in parent node Release time.
[0009] Preferably, at each time point, the cumulative policy intensity values of all historically issued policies are weighted and summed with time decay to obtain the policy shock value at each time point, and a policy shock time series is formed in chronological order, specifically including: For each time step, calculate the weighted sum of the cumulative policy intensity values of all policies issued up to and including the current time, where the weights decay exponentially over time; For each type of policy, calculate the weighted sum of all nodes under that policy to obtain the one-dimensional impact value of the policy. Combine the single-dimensional shock values of all categories into a multi-dimensional vector, which serves as the policy shock vector for each time step; The policy shock vectors at each time step are concatenated in chronological order to generate a policy shock time series.
[0010] Preferably, the electricity price prediction model is a temporal neural network based on an attention mechanism; The electricity price forecasting model takes historical electricity price sequences, policy shock time series sequences, and other external feature sequences as inputs, and outputs electricity price forecasts for multiple future time steps.
[0011] This application also provides a medium- to long-term electricity price forecasting system based on a policy time-series causal graph, including: The data acquisition unit is used to acquire multiple power-related policy texts and the release time of each policy text; The relationship identification unit is used to determine the directed dependency relationship between policies based on the semantic content association between policy texts, and to ensure that the dependency direction is consistent with the order of release time. The graph construction unit is used to construct a directed graph with each policy text as a node and the directed dependencies as directed edges. The initial intensity calculation unit is used to calculate the initial policy intensity value for each node in the directed graph, based on the policy release level corresponding to the node and the degree of enforcement in the policy text. The intensity propagation unit is used to iteratively update the cumulative policy intensity value of each node along the edge direction of the directed graph in chronological order. For any child node, the intensity value of each parent node will only begin to propagate to the child node after the time difference between the current time and the release time of the parent node reaches a learnable delay duration. The learnable delay duration is set with different delay duration parameters for different dependency relationship types. The sequence generation unit is used to perform a time-decay-weighted summation of the cumulative policy intensity values of all historically issued policies at each time point to obtain the policy shock value at each time point, and form a policy shock time series sequence in chronological order. The electricity price forecasting unit is used to input the policy shock time series and non-policy time series data, including at least electricity market operation data, into an electricity price forecasting model and output medium- and long-term electricity price forecast results.
[0012] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the aforementioned method.
[0013] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned method.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention presents a medium- to long-term electricity price forecasting method based on policy time-series causal graphs. By constructing policy time-series causal graphs, it identifies and models the directed dependencies between policies and introduces a learnable delay duration parameter, enabling the model to automatically capture the differentiated lag characteristics of different policy types. Compared to existing independent quantification methods, this invention, by constructing policy time-series causal graphs and introducing learnable delay durations, achieves joint modeling of causal transmission and differentiated lag effects between policies. During periods of intensive policy releases or institutional adjustments, it can effectively capture the policy transmission path and its timeliness characteristics, reducing the error in medium- to long-term electricity price forecasting. Attached Figure Description
[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.
[0016] Figure 1 The flowchart illustrates a medium- to long-term electricity price forecasting method based on a policy time-series causal graph, as provided in this embodiment of the invention.
[0017] Figure 2 The flowchart of a medium- and long-term electricity price forecasting method based on a policy time-series causal graph is provided as another embodiment of the present invention.
[0018] Figure 3 The following is a flowchart of a medium- to long-term electricity price forecasting method based on a policy time-series causal graph, which is another embodiment of the present invention.
[0019] Figure 4 This is a schematic diagram of a medium- and long-term electricity price forecasting system based on a policy time-series causal graph, provided as an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] It should be understood that, when used in this specification, the terms “comprising” and “including” indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0022] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should also be further understood that the term "and / or" as used in this specification refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations.
[0024] Please refer to the following examples. Figures 1 to 4 .
[0025] This application provides a method for predicting medium- and long-term electricity prices based on policy time-series causal graphs, including the following steps: Step S1: Obtain multiple power-related policy texts and the release date of each policy text; Retrieve all electricity-related policy documents for the target region within a historical time period from official websites and policy databases using web crawlers or API interfaces. For each policy document, extract the following metadata: The full text of the policy, with formatting marks, headers, footers, and other noise removed; For official release times, if accurate to the day, or if accurate to the month or year, fill in the first day of that month or the first day of that year. The issuing organization and level, for example, mapping the organization name to national, provincial / ministerial, or municipal level; Policy type label: if publicly indicated, leave blank otherwise.
[0026] After collection, the text is cleaned to remove irrelevant headers, footers, formatting marks, and garbled characters. For PDFs or scanned documents, OCR technology is used to extract the text. All policy texts are arranged chronologically to form a policy corpus.
[0027] Step S2: Based on the semantic content association between policy texts, determine the directed dependencies between policies, and ensure that the direction of dependency is consistent with the order of release time; By forming text pairs from any two policies in the policy text set obtained in step S1, for each text pair, extract the main text of the two policies, their respective release time, and the time difference.
[0028] A pre-trained language model finely tuned on a corpus in the power sector (such as RoBERTa-wwm-ext-large, the Chinese RoBERTa model) is used as the encoder. Two policy texts are concatenated, with a [SEP] marker inserted in between, and input into the model to obtain a 768-dimensional semantic joint representation. This representation is then concatenated with temporal difference features and input into a two-layer fully connected network, which outputs the probability distribution of five types of relations: citation, refinement, repeal, supplementation, and juxtaposition.
[0029] The training data can be manually labeled with multiple pairs of policy text relationships, and fine-tuned using cross-entropy loss.
[0030] Based on the different types of relationships output, only relationships with a confidence level higher than a preset threshold (e.g., 0.7) are retained. Simultaneously, the direction of the dependency relationships is required to be consistent with the policy release time sequence: that is, if A→B indicates that A has a referencing or refining effect on B, then the release time of A must be earlier than the release time of B, resulting in a series of directed dependency pairs.
[0031] Step S3: Construct a directed graph with each policy text as a node and the directed dependency as a directed edge; Construct a directed graph with each policy text as a node and the directed dependency obtained in Step S2 as a directed edge. The direction of each edge in the graph points from the node with an earlier release time to the node with a later release time. Therefore, there are no loops in the graph, forming a directed acyclic graph (DAG). Each node in the graph stores its release time, initial policy strength value, and cumulative strength value sequence.
[0032] Step S4: For each node in the directed graph, calculate the initial policy strength value of each node according to the release level of the policy corresponding to the node and the degree of coercion in the policy text; The initial policy strength value of each node is jointly determined by its release level and text coercion degree. The release levels are divided into the first level, the second level... the Nth level. For example, when divided by administrative level, national level, provincial and ministerial level, municipal level, etc., different basic strength coefficients are assigned; The degree of coercion is quantified by counting the density of mandatory words appearing in the policy text. For example, construct three types of mandatory word dictionaries (examples): High coercion words: must, shall not, strictly prohibited, prohibited, enforced, ordered, stopped, banned; Medium coercion words: should, ought to, need, shall, must, be given; Low coercion words: encourage, recommend, may, in principle, as appropriate, refer to, consider.
[0033] According to the basic strength coefficient and the coercion correction coefficient, obtain the initial policy strength value of the policy. Calculate the initial policy strength value of node according to the following formula : where is the basic strength coefficient based on the policy release level, and the values are as follows: If the policy release level is national level, then ; If the policy release level is provincial and ministerial level, then ; If the policy release level is municipal level, then ; is the coercion correction coefficient based on the mandatory words in the policy text, and the calculation formula is: where respectively represent the total number of high coercion words, medium coercion words, and low coercion words appearing in the policy text; The weight coefficients for the corresponding categories satisfy the following conditions: ,like ; This is the baseline density normalization coefficient. If the value is 10, it can be adjusted according to the actual corpus.
[0034] Step S5: Iteratively update the cumulative policy strength value of each node along the edge direction of the directed graph in chronological order; wherein, for any child node, the strength value of each parent node only begins to propagate to the child node after the time difference between the current time and the release time of the parent node reaches a learnable delay duration; the learnable delay duration is set with different delay duration parameters for different dependency relationship types. The process iterates through each time step sequentially from earliest to latest. For each policy node, its cumulative policy strength value equals its initial strength value plus the strength contributions from all parent nodes. The contribution from any parent node consists of three parts: the parent node's current cumulative strength value, a propagation attenuation coefficient, and a time-gated value. Preferably, the cumulative policy strength value of each node equals the node's initial policy strength value plus the sum of the strength contributions from all its parent nodes; the strength contribution from any parent node equals the parent node's current cumulative policy strength value multiplied by a preset propagation attenuation coefficient, and then multiplied by a time-gated value. The time gating value is a monotonically non-decreasing function, whose input is the time difference between the current time step and the parent node's publication time. When the time difference is less than a learnable delay duration, the time gating value is zero. When the time difference is greater than or equal to the learnable delay duration, the time gating value gradually increases with the time difference until it reaches a saturation value of 1. In this embodiment, the delay duration is set with different learnable parameters depending on the dependency type (reference, refinement, obsolescence, supplementation, etc.).
[0035] Specifically, the formula for updating the cumulative policy intensity value is as follows: in, For nodes At time step The cumulative policy intensity value; For nodes The initial policy intensity value; For nodes The set of all parent nodes; parent node In the previous time step The cumulative policy intensity value; From the parent node To child nodes The propagation attenuation coefficient; It is a time-gated function; ,in parent node Release time; In this embodiment, the time gating function is defined as: in, The learnable delay duration, measured in time steps; To increase the steepness parameter, control the rate at which the gating increases from 0 to saturation.
[0036] You can also customize the parameters. ;in, Indicates from the parent node To child nodes The directed dependency relationship type (one of reference, refinement, obsolescence, or supplementation), with different relationship types corresponding to independent learnable parameter pairs. .
[0037] For any node ,when (i.e., before the node is published) define The node at its release time When it first appeared, At this point, the parent node's contribution has not yet taken effect because .
[0038] Step S6: At each time point, perform a time-decay-weighted summation of the cumulative policy intensity values of all historically issued policies to obtain the policy shock value at each time point, and form a policy shock time series in chronological order, specifically including: Step S61: For each time step, calculate the weighted sum of the cumulative policy intensity values of all policies issued up to and including the current time, where the weights decay exponentially over time. Step S62: According to the pre-classification of policies, divide the policies into at least two different types; for each type of policy, calculate the weighted sum of all nodes under that type of policy to obtain the one-dimensional impact value of the policy. For each discrete time step Calculate the one-dimensional impact value of the policy using the following formula. : in, For the time of publication The set of all policy nodes; For nodes At time step The cumulative policy intensity value; For nodes Release time; The preset exponential decay rate parameter; As a time decay weight; Step S63: Combine the single-dimensional shock values of all categories into a multi-dimensional vector, which serves as the policy shock vector for the time step; Regarding the policy type dimension, policies are pre-classified as follows: There are several types, and each type is calculated using the following formula. Policy shock vector: in, Indicates policy type At time step The policy shock vector, For type The set of policy nodes For type Independently set attenuation rate parameter; Step S64: Concatenate the policy shock vectors of each time step in chronological order to generate a policy shock time series.
[0039] Each time step Calculated dimensional vector Arranged chronologically, they form a multi-dimensional time sequence of policy shocks.
[0040] Step S7: Input the policy shock time series and non-policy time series data, including at least electricity market operation data, into an electricity price prediction model, and output the medium- and long-term electricity price prediction results.
[0041] The policy shock time series obtained in step S6 is aligned with non-policy time series data, which includes at least electricity market operation data (such as historical electricity prices, load, output, etc.), and then concatenated and input into an electricity price prediction model.
[0042] In this embodiment, the electricity price forecasting model employs a time-series neural network architecture based on a multi-head self-attention mechanism, such as the Transformer (a sequence-to-sequence model based on self-attention) or the Informer (an improved Transformer) model. The model's input consists of three parts: historical electricity price sequences, the policy shock time-series sequence generated in step S6, and other external feature sequences (such as load and temperature). The model's task is to learn the mapping relationship from multi-dimensional features over a past period to electricity prices at multiple future time steps.
[0043] In practice, the historical window length is set to W, and the prediction step size is H. The policy impact value, the actual electricity price for each day, and other external features for that day are concatenated into a feature vector. Thus, the past W days form a feature matrix of shape W×D, where D is the total feature dimension.
[0044] Since attention mechanisms themselves are not aware of temporal order, positional encoding needs to be added to the input. Learnable positional embeddings can be used, i.e., initializing a W×D... model The matrix is trained along with the model; alternatively, sine and cosine fixed-position encoding can be used. The positional encoding is added to the input features and then fed into the encoder.
[0045] Encoder: An encoder consists of multiple identical layers stacked together (e.g., 3 layers). Each layer contains: A multi-head self-attention sublayer (e.g., 8 heads) is used to capture the interdependencies between different time steps and between different features.
[0046] A feedforward neural network sublayer (two fully connected layers, with a hidden layer dimension typically of 2048 and an output dimension of D) model .
[0047] Each sublayer is followed by normalization and residual connections.
[0048] The encoder outputs a signal of length W and position D. model Hidden representation sequence of dimensions.
[0049] Decoder: For a standard Transformer, the decoder takes the encoder output and the position encoding of future time steps as input and generates the electricity price for the next H time steps autoregressively. For simplicity, a decoder can be omitted, and one or more fully connected layers can be connected to the hidden state of the last time step of the encoder output to directly map to the H-dimensional output (each dimension corresponds to the predicted electricity price for the next day).
[0050] Output layer: The final output is a vector of length H, representing the predicted electricity price value at the next H time steps. If probabilistic prediction is required, two vectors can be output to represent the mean and variance respectively, or multiple quantiles can be output.
[0051] During training, historical data was divided chronologically into a training set (first 60%), a validation set (middle 20%), and a test set (last 20%). Time-series cross-validation was used to evaluate model stability. Mean squared error (MSE) was used as the loss function. The AdamW optimizer was used with an initial learning rate of 0.001 and cosine annealing scheduling. The batch size was set according to GPU memory, either 32 or 64. Early stopping was used during training; training was stopped when the validation set loss no longer decreased for 10 consecutive epochs, and the optimal model parameters were restored.
[0052] In other embodiments, in addition to attention networks based on the standard Transformer, Informer models, or combinations of Temporal Convolutional Networks (TCNs) with lightweight attention, or cross-attention models that use policy shock sequences as external attention queries, or quantile regression attention networks, etc., may be used.
[0053] The above implementation methods all primarily utilize temporal neural networks based on attention mechanisms. Different architectural variations, improvements to the attention mechanism, adjustments to the output format, or enhancements to training strategies are employed to adapt to the medium- and long-term electricity price forecasting needs in various scenarios. In practical applications, the most suitable one or several combinations can be selected based on data scale, computing resources, forecast accuracy requirements, and interpretability needs. Regardless of the specific form adopted, as long as its input contains the policy shock time series described in this invention, and the model parameters are jointly optimized with the learnable delay duration in step S5, it falls within the protection scope of this invention.
[0054] This invention presents a medium- to long-term electricity price forecasting method based on policy time-series causal graphs. By constructing policy time-series causal graphs, it identifies and models the directed dependencies between policies and introduces a learnable delay duration parameter, enabling the model to automatically capture the differentiated lag characteristics of different policy types. Compared to existing independent quantification methods, this invention, by constructing policy time-series causal graphs and introducing learnable delay durations, achieves joint modeling of causal transmission and differentiated lag effects between policies. During periods of intensive policy releases or institutional adjustments, it can effectively capture the policy transmission path and its timeliness characteristics, reducing the error in medium- to long-term electricity price forecasting.
[0055] Specifically, in a preferred embodiment of this application, determining the directed dependency relationship between policies based on the semantic content association between policy texts specifically includes: Step S21: Identify the content relationship between the first policy and the second policy in multiple policy texts. The content relationship is manifested in the first policy being cited, elaborated, repealed, or supplemented by the second policy. Step S22: Determine that the direction of the content association is from the first policy to the second policy, and that the release time of the first policy is earlier than the release time of the second policy; Step S23: Construct a directed edge with the first policy as the parent node and the second policy as the child node.
[0056] For any two policy texts, semantic analysis is used to determine whether the later policy (released later) references, elaborates, repeals, or supplements the earlier policy (released earlier). If so, a directed edge is constructed from the earlier policy to the later policy. Specifically, this is a binary classification plus multi-classification task. The specific implementation process is as follows: From the policy corpus obtained in step S1, all policies are sorted in ascending order of publication date. For each policy... As an earlier policy, only policies issued subsequently and around the same time will be considered. Candidates can be selected based on their policy type.
[0057] For each candidate pair ,in Perform the following semantic extraction operations: The two policy texts were segmented, stop words were removed, and sentence boundaries were preserved to facilitate subsequent citation detection.
[0058] Sentence-level alignment: Each sentence in For each sentence in the dataset, cosine similarity is calculated (based on pre-trained word vectors or TF-IDF) to find possible corresponding sentence pairs.
[0059] The entire text is encoded using a pre-trained language model (such as RoBERTa-wwm-ext-large) fine-tuned for the Chinese legal / electricity domain. and spliced as Input model, extract The 768-dimensional vector of position as a joint semantic representation The vector contains overall semantic interaction information between the two policies.
[0060] Joint semantic representation The data is fed into a two-layer fully connected classifier (256-dimensional hidden layer and 4-dimensional output layer, corresponding to four directed relations: reference, refinement, obsolescence, and supplementation), and then normalized using Softmax to obtain the probability distribution. .
[0061] In addition, to enhance classification accuracy, the following numerical features were added (and... (Collected) Release time difference Normalized after logarithmic transformation; the ratio of the lengths of the two policy texts. .
[0062] The final classifier outputs four class probabilities. The value with the highest probability is selected. ,like Greater than the preset threshold If the probability is 0.7, then a corresponding directed dependency relationship exists, and the relationship type is the category corresponding to the highest probability; otherwise, it is considered that there is no significant dependency relationship between the two policies.
[0063] Since the candidate pair has already satisfied The direction is naturally from point to However, to prevent model misjudgment, such as the model outputting "deprecated" but the actual release time being reversed, further verification is still required: if a relational requirement dictates that the source node's time is earlier than the target node's, this condition will certainly be met here, so it passes directly. Finally, a directed edge is constructed. And record the relationship type. .
[0064] For the same pair of policies, they may be repeatedly judged by multiple classifiers or different thresholds; only the relationship with the highest confidence is retained. Furthermore, if a circular dependency occurs, due to the mandatory time order constraint, directed cycles will not appear, but bidirectional edges may exist. In this case, according to business rules, the semantically more reasonable one will be retained.
[0065] It should be noted that labeled training data is required to obtain an accurate relation classification model. Specifically, 2000–5000 policy pairs are randomly selected from the historical policy database, and power policy experts are asked to label whether one of the four types of relations exists. The pre-trained language model and classifier structure described above are used, and cross-entropy loss is used for fine-tuning.
[0066] Negative samples are generated by swapping the order of policy pairs to learn directional sensitivity. After training, the classifier can be directly used to determine the relationship between new policy pairs.
[0067] This preferred embodiment achieves automatic identification of dependencies between policies through semantic encoding and classifiers, and constructs a directed graph that conforms to causal logic by forcing direction using the release time sequence. Compared with simple keyword matching, this method can capture implicit, non-explicitly referenced dependencies, providing a more accurate topological structure for subsequent strength propagation.
[0068] Specifically, in a preferred embodiment of this application, the learnable delay duration is set with different delay duration parameters for at least one of the following dimensions: Different types of directed dependencies; Different combinations of policy release levels; Different types of policy tools.
[0069] In this preferred embodiment, the learnable delay duration τ mentioned in step S5 is not a single global parameter, but rather an independent delay duration parameter set for at least one of the following dimensions. Different values for each dimension correspond to a set of learnable parameters, which are automatically optimized during model training. The specific implementation methods for each dimension are described below.
[0070] In a preferred embodiment, different delay durations are set based on different types of directed dependencies, as follows: Directed dependency types include reference, refinement, repeal, and supplementation. The policy transmission mechanisms of different types of dependencies differ significantly; therefore, their respective delay duration parameters should be learned separately.
[0071] Define parameter set , , , These correspond to the delay durations for the four relationships: reference, refinement, repeal, and supplementation.
[0072] For each directed edge in the graph According to its relation type In computation time gating When, use the corresponding .
[0073] Set initial values based on business experience. For example, consider a referencing relationship: Policy A refers to Policy B. Typically, Policy A takes effect immediately upon publication with minimal delay. Let... The relationship is detailed: after a higher-level policy is issued, lower-level detailed rules need to be drafted, approved, and issued, which causes significant delays. Day; Repeal relationship: A repeal decision generally takes effect from the date of its issuance, with very little delay. Day; Supplementary relationship: Supplementary notices usually take effect the same day as the original policy or the following night, setting... sky.
[0074] Will , , , As trainable parameters, they are jointly optimized with the electricity price prediction model. To ensure non-negativity, we can set... or During gradient descent, the original parameters are updated using the chain rule.
[0075] If the model learns The figure of 45 days indicates that it takes an average of 45 days from the release of a policy by a higher authority to the actual impact on electricity prices from the implementation of detailed rules at the lower level. This is consistent with the actual time required for document circulation and local implementation.
[0076] In a preferred embodiment, different delay durations are set based on different policy release level combinations, as follows: For example, policy release levels include national, provincial / ministerial, and municipal levels. When parent and child nodes belong to different level combinations, the timeliness of policy transmission may differ. For instance, national policies need to be transmitted to provincial-level detailed rules faster than provincial policies are transmitted to municipal-level rules. Therefore, it is necessary to set delay parameters separately for level combinations.
[0077] set up These represent national, provincial / ministerial, and municipal levels, respectively. For a single edge... Its hierarchical combination is There are a total of A combination.
[0078] Define parameter matrix ,in When calculating time gating, the level combination parameter corresponding to this edge is used. .
[0079] Let the parameter initialization example be: Country—Country ( Day); National-Provincial ( Heaven); Province / Ministry—Prefecture-level City ( Day); National-City ( It might be transferred through provincial or ministerial channels, but if directly related, the delay would be significant. Other combinations are similar and can be preset according to the actual situation.
[0080] If the data is sparse, parameters can be shared for certain combinations, such as grouping provincial-level interactions and municipal-level interactions into the same category. The model might learn that the delay between national and provincial levels is 12 days, while the delay between provincial and municipal levels is 25 days, reflecting that provincial-level decomposition and forwarding are faster, but municipal and grassroots implementation takes longer.
[0081] In a preferred embodiment, different delay durations are set based on different types of policy tools, as follows: Policy tools can be categorized according to their mechanisms of action, with common types including legal regulatory, economic incentive, and information guidance. The time it takes for different types of policies to affect electricity prices varies significantly.
[0082] set up These correspond to legal regulation, economic incentives, and information guidance, respectively. Further subdivisions can be made as needed.
[0083] For each policy node, its tool type needs to be determined in advance. The determination method is based on keyword rules: if the text contains words such as "measures," "regulations," "details," "must," or "must not," it is marked as a legal regulation type; if it contains words such as "subsidy," "reward," "reduction," or "preferential treatment," it is marked as an economic incentive type; if it contains words such as "plan," "opinion," "suggestion," or "guidance," it is marked as an information guidance type. Alternatively, a text classification model can be used for automatic classification.
[0084] For a series of directed edges Its policy tool combination is There are a total of Combinations. Define parameters. This parameter is used when calculating time gating.
[0085] Let the initialization example be: Regulation—the regulation has a shorter delay ( (day), because regulatory policies often have immediate effect; the delay between regulation and incentives (day). (Days), requires supporting procedures such as fund allocation; the information-regulation delay can be very long ( (Days), because regulatory policies only take effect after being transformed into specific laws. If the data is sparse, parameters can be shared for certain combinations. The model may learn that the delay from information-guided higher-level policies to legally regulated lower-level policies is 120 days, reflecting the long process from planning to the implementation of detailed rules.
[0086] In a preferred embodiment, and in practical applications, multiple dimensions can be considered simultaneously. The delay duration is set based on different directed dependency types, policy release hierarchy combinations, and policy instrument types. The delay duration parameter is defined as a function of multiple dimensions. For example: Alternatively, you can directly use a high-dimensional parameter table. However, the number of parameters will grow rapidly (4×9×9=324), requiring a large amount of training data. This embodiment can use an additive model or low-rank decomposition, for example: This approach requires learning the independent parameters for each dimension separately, significantly reducing the number of parameters (4+9+9=22). Initially, the parameters for each dimension can be set to 0; the actual latency is the sum of the three parameters and can be adjusted through training. The specific implementation steps are as follows: For each relation type Allocate base delay ; Combining each level Allocation level increment It can be positive or negative; Combining for each tool type Incremental allocation tools ; Total delay Ensure non-negativity; All parameters are jointly optimized through backpropagation.
[0087] Regardless of the dimension used, the learnable delay parameter must satisfy the non-negativity constraint. Specific implementation methods: Method 1: After the parameter is updated, execute... .
[0088] Method 2: Define the original parameters as unconstrained. ,pass Mapped to the positive number field.
[0089] Method 3: Use sigmoid mapping to a fixed range, such as... ,in For the maximum possible delay (e.g., 365 days).
[0090] In addition, to prevent the delay parameter from learning extreme values (such as 0 or very large values), a regularization term can be added, for example... or This helps keep the parameters at a suitable level.
[0091] During training, for each time step and edge in each training sample, a gating value needs to be calculated based on the current parameters. .because and They are all scalars, so the calculations are simple.
[0092] when When the threshold value is always 0, the gradient is also 0, and the parameters cannot be updated. To solve this problem, a soft-gating approximation can be used, such as using the sigmoid function as a smooth gate, or using the expected delay instead. Alternatively, a smaller gate value can be set in the early stages of training. Initial values, ensuring most Gradients are thus propagated. As training progresses, It can be increased to a reasonable value.
[0093] If there is insufficient training data, you can first learn the latency only for dependency types, while keeping the increments for hierarchical combinations and tool types fixed at 0, and then expand them as the data accumulates.
[0094] After training, the learned latency parameter values can be output for business analysis. For example, the average latency of referral relationships. Heaven; Refining the average delay of relationships Days; Average delay between national and provincial / ministerial combinations Day; Average delay of information → regulatory combination These results not only enhance the interpretability of the model, but also allow for reverse verification of its consistency with the actual operating patterns of the electricity market.
[0095] This preferred implementation sets learnable delay parameters for different dimensions, including dependency type, release level combination, and policy tool type, enabling the model to adaptively capture the timeliness differences of various policy transmission paths. In practice, a single dimension can be used alone, or multiple dimensions can be used in combination through an additive model. All parameters are automatically determined through end-to-end training, significantly improving the accuracy of electricity price forecasting in complex policy environments.
[0096] This application also provides a medium- to long-term electricity price forecasting system based on policy time-series causal graphs, including: The data acquisition unit is used to acquire multiple power-related policy texts and the release time of each policy text; The relationship identification unit is used to determine the directed dependency relationship between policies based on the semantic content association between policy texts, and to ensure that the dependency direction is consistent with the order of release time. The graph construction unit is used to construct a directed graph with each policy text as a node and the directed dependencies as directed edges. The initial intensity calculation unit is used to calculate the initial policy intensity value for each node in the directed graph, based on the policy release level corresponding to the node and the degree of enforcement in the policy text. The intensity propagation unit is used to iteratively update the cumulative policy intensity value of each node along the edge direction of the directed graph in chronological order. For any child node, the intensity value of each parent node will only begin to propagate to the child node after the time difference between the current time and the release time of the parent node reaches a learnable delay duration. The learnable delay duration is set with different delay duration parameters for different dependency relationship types. The sequence generation unit is used to perform a time-decay-weighted summation of the cumulative policy intensity values of all historically issued policies at each time point to obtain the policy shock value at each time point, and form a policy shock time series sequence in chronological order. The electricity price forecasting unit is used to input the policy shock time series and non-policy time series data, including at least electricity market operation data, into an electricity price forecasting model and output medium- and long-term electricity price forecast results.
[0097] The functional explanation of each unit in this embodiment is the same as that of a medium- and long-term electricity price forecasting method based on policy time-series causal graphs, and the technical effects are the same, so it will not be repeated here.
[0098] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the aforementioned method.
[0099] The technical effects of this embodiment are the same as those of the medium- and long-term electricity price forecasting method based on policy time-series causal graph in Embodiment 1, and will not be repeated here.
[0100] In this embodiment, the processor may be a central processing unit (CPU), a controller, a microcontroller, or other data processing chip.
[0101] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned method.
[0102] The technical effect of this embodiment is the same as that of a medium- and long-term electricity price forecast based on a policy time-series causal graph, and will not be repeated here.
[0103] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.
[0104] Those skilled in the art will recognize that the units of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of the invention.
[0105] In the embodiments provided by the present invention, it should be understood that the division of units is only a logical functional division. In actual implementation, there may be other division methods, such as multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored.
[0106] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0107] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered within the scope of the specification of the present invention.
Claims
1. A medium- to long-term electricity price forecasting method based on policy time-series causal graphs, characterized in that, Includes the following steps: Obtain multiple power-related policy documents and the release date of each policy document; Based on the semantic content association between policy texts, determine the directed dependencies between policies, and ensure that the direction of dependency is consistent with the order of release time; A directed graph is constructed using each policy text as a node and the aforementioned directed dependencies as directed edges. For each node in the directed graph, the initial policy strength value of each node is calculated based on the policy release level corresponding to the node and the degree of enforcement in the policy text. Along the edges of the directed graph, the cumulative policy intensity value of each node is iteratively updated in chronological order. For any child node, the intensity value of each parent node only begins to propagate to the child node after the time difference between the current time and the release time of the parent node reaches a learnable delay duration. The learnable delay duration is set with different delay duration parameters for different dependency relationship types. At each point in time, the cumulative policy intensity values of all historically issued policies are summed with time decay to obtain the policy shock value at each point in time, and then the policy shock time series is formed in chronological order. The policy shock time series and non-policy time series data, including at least electricity market operation data, are input into an electricity price forecasting model to output medium- and long-term electricity price forecast results.
2. The medium- and long-term electricity price forecasting method based on policy time-series causal graphs according to claim 1, characterized in that, The determination of directed dependencies between policies based on the semantic content association between policy texts specifically includes: Identify the content relationship between a first policy and a second policy in multiple policy texts, wherein the content relationship is manifested in the first policy being cited, elaborated, repealed, or supplemented by the second policy; The direction of the content association is determined to be from the first policy to the second policy, and the release time of the first policy is earlier than the release time of the second policy; Construct a directed edge with the first policy as the parent node and the second policy as the child node.
3. The medium- and long-term electricity price forecasting method based on policy time-series causal graphs according to claim 1, characterized in that, The iterative update of the cumulative policy intensity value of each node along the edge direction of the directed graph in chronological order specifically includes: The cumulative policy strength value of each node is equal to the initial policy strength value of the node plus the sum of the strength contributions from all parent nodes of the node; the strength contribution from any parent node is equal to the current cumulative policy strength value of the parent node multiplied by a preset propagation attenuation coefficient, and then multiplied by a time gate value. The time gating value is a monotonically non-decreasing function, whose input is the time difference between the current time step and the parent node's publication time; When the time difference is less than a learnable delay duration, the time gating value is zero; when the time difference is greater than or equal to the learnable delay duration, the time gating value gradually increases with the time difference until it reaches a saturation value.
4. The medium- and long-term electricity price forecasting method based on policy time-series causal graphs according to claim 3, characterized in that, The learnable delay duration is set with different delay duration parameters for at least one of the following dimensions: Different types of directed dependencies; Different combinations of policy release levels; Different types of policy tools.
5. The medium- and long-term electricity price forecasting method based on policy time-series causal graphs according to claim 3, characterized in that, The formula for updating the cumulative policy intensity value is: in, For nodes At time step The cumulative policy intensity value; For nodes The initial policy intensity value; For nodes The set of all parent nodes; parent node In the previous time step The cumulative policy intensity value; From the parent node To child nodes The propagation attenuation coefficient; It is a time-gated function; ,in parent node Release time.
6. The method for medium- and long-term electricity price forecasting based on policy time-series causal graphs according to claim 1, characterized in that, At each point in time, the cumulative policy intensity values of all historically issued policies are weighted and summed with time decay to obtain the policy shock value at each point in time. These are then arranged in chronological order to form a policy shock time series, specifically including: For each time step, calculate the weighted sum of the cumulative policy intensity values of all policies issued up to and including the current time, where the weights decay exponentially over time; For each type of policy, calculate the weighted sum of all nodes under that policy to obtain the one-dimensional impact value of the policy. Combine the single-dimensional shock values of all categories into a multi-dimensional vector, which serves as the policy shock vector for each time step; The policy shock vectors at each time step are concatenated in chronological order to generate a policy shock time series.
7. The medium- and long-term electricity price forecasting method based on policy time-series causal graphs according to claim 1, characterized in that, The electricity price prediction model is a time-series neural network based on an attention mechanism; The electricity price forecasting model takes historical electricity price sequences, policy shock time series sequences, and other external feature sequences as inputs, and outputs electricity price forecasts for multiple future time steps.
8. A medium- to long-term electricity price forecasting system based on policy time-series causal graphs, characterized in that, The method described by any one of claims 1-7 comprises: The data acquisition unit is used to acquire multiple power-related policy texts and the release time of each policy text; The relationship identification unit is used to determine the directed dependency relationship between policies based on the semantic content association between policy texts, and to ensure that the dependency direction is consistent with the order of release time. The graph construction unit is used to construct a directed graph with each policy text as a node and the directed dependencies as directed edges. The initial intensity calculation unit is used to calculate the initial policy intensity value for each node in the directed graph, based on the policy release level corresponding to the node and the degree of enforcement in the policy text. The intensity propagation unit is used to iteratively update the cumulative policy intensity value of each node along the edge direction of the directed graph in chronological order. For any child node, the intensity value of each parent node will only begin to propagate to the child node after the time difference between the current time and the release time of the parent node reaches a learnable delay duration. The learnable delay duration is set with different delay duration parameters for different dependency relationship types. The sequence generation unit is used to perform a time-decay-weighted summation of the cumulative policy intensity values of all historically issued policies at each time point to obtain the policy shock value at each time point, and form a policy shock time series sequence in chronological order. The electricity price forecasting unit is used to input the policy shock time series and non-policy time series data, including at least electricity market operation data, into an electricity price forecasting model and output medium- and long-term electricity price forecast results.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1 to 7.