Electric quantity fluctuation prediction and anomaly detection method based on industrial chain association

By building an industrial chain correlation model and combining graph neural network and LSTM model, the problems of low power fluctuation prediction accuracy and insufficient abnormal detection response capabilities in the existing technology are solved, and more efficient and accurate power fluctuation prediction and abnormal detection are achieved.

CN119903944APending Publication Date: 2025-04-29YUNNAN POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411685165.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing power fluctuation prediction and anomaly detection methods are limited to a single historical data, and lack the cross-industry dynamic correlation modeling capabilities, resulting in low prediction accuracy and insufficient abnormal detection response capabilities.

Method used

Power fluctuation prediction and abnormal detection methods based on industrial chain association are adopted. By extracting the correlation factors of power fluctuation from multi-source data, an industrial chain correlation model is constructed, and dynamic prediction and abnormal detection are used for graph neural network and LSTM model, and model optimization is performed through automatic encoder.

Benefits of technology

It improves the accuracy of power fluctuation prediction and abnormal response speed, enhances the adaptability and prediction accuracy of the model, and reduces manual intervention and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903944A_ABST
    Figure CN119903944A_ABST
Patent Text Reader

Abstract

The invention discloses an electric quantity fluctuation prediction and anomaly detection method based on industrial chain association, and relates to the technical field of power utilization analysis, and the method comprises the steps: extracting an association factor of electric quantity fluctuation from multi-source data; constructing an industrial chain association model according to the association factors, and outputting the industrial chain association model to obtain industrial chain features; the industrial chain features dynamically predict a time sequence through an LSTM model, and anomaly detection and model optimization are carried out according to predicted electric quantity data. According to the method, through multi-source data fusion and dynamic feature extraction, principal component analysis and SHAP value analysis, key factors influencing electric quantity fluctuation are reflected more comprehensively, and the adaptability of the model is improved; modeling is performed on the relevance between the upstream industry and the downstream industry of the industry chain by using the graph neural network, so that the prediction precision and the industry relevance analysis capability of the model are improved; by combining LSTM and an automatic encoder technology, high-precision prediction and real-time anomaly detection of electric quantity fluctuation are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electricity consumption analysis, and specifically to a method for electricity consumption fluctuation prediction and anomaly detection based on industrial chain association. Background Art

[0002] With the rapid development of economy and technology, electricity demand forecasting and anomaly detection have become increasingly important. However, existing technologies have certain limitations in electricity fluctuation analysis, cross-industry electricity correlation quantification, and real-time response to the impact of external factors on electricity. These limitations make it difficult to meet the high demands of the power system for accurate prediction and stability.

[0003] First, the existing models mainly rely on historical economic data, which makes it difficult to achieve real-time correlation analysis of multiple factors. Current methods are mostly based on input-output tables, focusing on quantitative analysis of electricity demand between industries, but lack sufficient mining and modeling of dynamic external factors that affect electricity fluctuations, such as meteorological conditions and real-time electricity prices. This method is relatively static and cannot adapt to the changing economic and meteorological environment. It is difficult to adjust the prediction results in time, resulting in insufficient real-time and accuracy of power load distribution and scheduling. Secondly, the correlation between electricity fluctuations between upstream and downstream of the industrial chain has not been finely quantified. Existing studies mostly use statistical models to analyze the relationship between electricity demand between industries, but these models are often limited to a single historical data, lack the ability to model dynamic correlations across industries, and cannot deeply reveal the fluctuations in supply and demand between upstream and downstream industries in the industrial chain. In addition, these methods are highly dependent on economic data in practical applications, so there are certain limitations in data real-time and comprehensiveness, which makes the prediction accuracy of electricity fluctuations not high. Finally, the response capability and accuracy of anomaly detection are low. Traditional power forecasting models are usually based on post-analysis and rely on rule-based detection methods. It is difficult to detect and warn of sudden abnormal fluctuations in electricity in a timely manner. On the one hand, this may lead to a delayed response to abnormal fluctuations and increase the pressure on power system dispatch; on the other hand, since the model is difficult to adapt effectively under abnormal conditions, it usually requires a lot of human intervention and data adjustment, which is costly and inefficient.

[0004] In summary, the existing technologies fail to fully consider the impact of dynamic external factors in power demand forecasting and anomaly detection, and lack the ability to model the real-time correlation of power fluctuations between upstream and downstream industries. To this end, a multi-factor, multi-level power fluctuation forecasting and anomaly detection method is proposed to achieve more efficient and accurate power consumption forecasting and abnormal response, thereby improving the stability and dispatching efficiency of the power system. Summary of the invention

[0005] In view of the above-mentioned problems, the present invention is proposed.

[0006] Therefore, the technical problem solved by the present invention is: the existing power fluctuation prediction and anomaly detection methods are limited to single historical data, lack cross-industry dynamic correlation modeling capabilities, have low prediction accuracy for power fluctuations, and how to achieve timely detection and early warning of sudden abnormal fluctuations in electricity volume.

[0007] To solve the above technical problems, the present invention provides the following technical solutions: a method for predicting electricity fluctuations and detecting anomalies based on industrial chain association, comprising extracting correlation factors of electricity fluctuations from multi-source data; constructing an industrial chain association model based on the correlation factors, and outputting the industrial chain association model to obtain industrial chain characteristics; dynamically predicting the time series through the LSTM model of the industrial chain characteristics, and performing anomaly detection and model optimization based on the predicted electricity data.

[0008] As a preferred solution of the method for power fluctuation prediction and anomaly detection based on industrial chain association described in the present invention, wherein: the extraction of correlation factors of power fluctuation includes using principal component analysis to reduce feature dimensions, and combining SHAP value analysis to quantify the contribution of each factor to power fluctuation, and determining the influence of each feature on power load according to the contribution, and obtaining the correlation factor set F = {f 1 ,f 2 ,…,f k}.

[0009] As a preferred solution of the method for power fluctuation prediction and anomaly detection based on industrial chain association described in the present invention, the principal component analysis includes setting an initial feature matrix, which is expressed as:

[0010]

[0011] Among them, n represents the number of samples, and m represents the number of features;

[0012] Principal component analysis is used to extract the main features Z, which is expressed as:

[0013] Z=XW

[0014] in, W represents the principal component matrix, and k represents the number of principal components extracted;

[0015] The SHAP value analysis includes obtaining the contribution S according to the SHAP value analysis. i ;

[0016] The influence of each feature on the power load is determined according to the contribution, which is expressed as:

[0017]

[0018] Among them, f(x) represents the feature x i The model prediction result, f(x-i ) represents the result after removing the features, and the associated factor set is obtained.

[0019] As a preferred solution of the method for predicting power fluctuations and detecting anomalies based on industrial chain association described in the present invention, wherein: the construction of the industrial chain association model includes taking the extracted association factor set F as the input feature of each node in the industrial chain association model, and constructing the initial node feature matrix H of the graph neural network;

[0020] In the industrial chain model, each industry is regarded as a node v in the graph, and the edges e between the nodes are ij Represents the upstream and downstream power correlation;

[0021] Adjacency Matrix Represents the strength of association between industries, node feature matrix Represents the extracted correlation factor.

[0022] As a preferred solution of the method for power fluctuation prediction and anomaly detection based on industrial chain association described in the present invention, the industrial chain characteristics include using a graph convolutional network for message transmission to update the characteristics of each node, and the graph convolutional network update formula is expressed as:

[0023]

[0024] Among them, H (l) represents the node features of the lth layer, W (l) represents the learned weight matrix, D represents the degree matrix, and σ represents the activation function;

[0025] By updating the company, the initial node feature H (0) Updated to more refined industry chain features H (L) .

[0026] As a preferred solution of the method for power fluctuation prediction and anomaly detection based on industrial chain association described in the present invention, the dynamic prediction includes converting the output industrial chain feature H of the graph neural network into (L) As the input of the time series model, the time series forecast of power fluctuation is obtained;

[0027] Assume h t is the power prediction feature at time t, combined with the industry chain association features, the state of LSTM is updated, and the update formula is expressed as:

[0028]

[0029] Among them, f t represents the forget gate, i t represents the input gate, o t represents the output gate, c tIndicates the cell state, h t represents the hidden state, W f , W i , W o , W c represents the power matrix, b f 、b i 、b o 、b c Indicates bias;

[0030] The predicted output result is expressed as:

[0031]

[0032] Among them, W y represents the weight of the output layer, b y represents the bias of the output layer, Represents the predicted power value at time t.

[0033] As a preferred solution of the method for power fluctuation prediction and anomaly detection based on industrial chain association described in the present invention, the anomaly detection includes anomaly detection by an automatic encoder to detect the power data predicted by the LSTM model. Whether it conforms to the normal fluctuation pattern;

[0034] The autoencoder learns the normal distribution of power data and detects anomalies by minimizing the reconstruction error;

[0035] Assume that the reconstructed power data is The loss function is expressed as:

[0036]

[0037] When the reconstruction error L exceeds the set threshold δ, the power fluctuation at this moment is judged to be abnormal.

[0038] Another object of the present invention is to provide a power fluctuation prediction and anomaly detection system based on industrial chain association, which can realize real-time prediction and anomaly detection of power fluctuations by constructing a multi-factor association model and through upstream and downstream associations of the industrial chain and dynamic external factors, thereby solving the problem that the prediction results of current technologies are difficult to adapt to changing environments and the prediction accuracy is low due to insufficient quantification of the correlation between upstream and downstream power fluctuations in the industrial chain.

[0039] As a preferred solution of the power fluctuation prediction and anomaly detection system based on industrial chain association described in the present invention, it includes: a data extraction module, a feature output module, and anomaly detection module; the data extraction module is used to extract correlation factors of power fluctuations from multi-source data; the feature output module is used to construct an industrial chain association model according to the correlation factors, and the industrial chain association model outputs the industrial chain characteristics; the anomaly detection module is used to dynamically predict the time series through the LSTM model of the industrial chain characteristics, and perform anomaly detection and model optimization according to the predicted power data.

[0040] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a method for predicting power fluctuations and detecting anomalies based on industrial chain association.

[0041] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for predicting power fluctuations and detecting anomalies based on industrial chain association.

[0042] Beneficial effects of the present invention: The method for predicting and detecting power fluctuations based on industrial chain association provided by the present invention uses principal component analysis and SHAP value analysis through multi-source data fusion and dynamic feature extraction, which not only reflects the key factors affecting power fluctuations more comprehensively, but also adapts to data changes more and improves the adaptability of the model; by using graph neural networks to model the correlation between upstream and downstream industries in the industrial chain, a better understanding of the power demand transmission relationship between industries is achieved, and the prediction accuracy and industry association analysis capabilities of the model are improved; by combining deep learning technologies such as LSTM and autoencoders, high-precision prediction and real-time anomaly detection of power fluctuations are achieved, which improves the prediction accuracy and abnormal response speed of the model compared to traditional methods; adaptive optimization is achieved through transfer learning, so that the model can automatically adjust data changes, reduce manual intervention, reduce manual maintenance costs, and ensure the stability and practicality of the model in a dynamic environment. The present invention achieves better results in terms of adaptability, accuracy and abnormal response speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0044] Figure 1 An overall flow chart of a method for electricity fluctuation prediction and anomaly detection based on industrial chain association provided for the first embodiment of the present invention.

[0045] Figure 2 A flow chart of the main steps of a method for electricity fluctuation prediction and anomaly detection based on industrial chain association provided in the first embodiment of the present invention.

[0046] Figure 3 A graph neural network industry chain model structure diagram of a method for predicting electricity fluctuations and detecting anomalies based on industry chain association provided in the first embodiment of the present invention.

[0047] Figure 4 A schematic diagram of an anomaly detection process of an electricity fluctuation prediction and anomaly detection method based on industrial chain association provided in the first embodiment of the present invention.

[0048] Figure 5 An overall flow chart of an electricity fluctuation prediction and anomaly detection system based on industrial chain association provided for the third embodiment of the present invention. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0050] Example 1, reference Figure 1-Figure 4 , which is an embodiment of the present invention, provides a method for predicting power fluctuation and detecting anomalies based on industrial chain association, including:

[0051] S1: Extracting correlation factors of power fluctuation from multi-source data.

[0052] Furthermore, the extraction of correlation factors of power fluctuation includes using principal component analysis to reduce feature dimensions, and combining SHAP value analysis to quantify the contribution of each factor to power fluctuation, and determining the influence of each feature on power load according to the contribution, and obtaining the correlation factor set F = {f 1 ,f 2 ,…,f k}.

[0053] It should be noted that principal component analysis includes setting the initial feature matrix, expressed as:

[0054]

[0055] Among them, n represents the number of samples, and m represents the number of features;

[0056] Principal component analysis is used to extract the main features Z, which is expressed as:

[0057] Z=XW

[0058] in, W represents the principal component matrix, and k represents the number of principal components extracted;

[0059] The SHAP value analysis includes obtaining the contribution S according to the SHAP value analysis. i ;

[0060] The influence of each feature on the power load is determined according to the contribution, which is expressed as:

[0061]

[0062] Among them, f(x) represents the feature x i The model prediction result, f(x -i ) represents the result after removing the features, and the associated factor set is obtained.

[0063] It should also be noted that multi-source data include meteorological data, economic indicators, etc.;

[0064] Meteorological data include temperature, humidity, etc., and economic indicators include electricity prices, demand, etc.

[0065] It should also be noted that features are extracted from multi-source data, which integrates more factors that affect electricity fluctuations, overcomes the limitations of traditional methods that rely on single historical data, uses principal component analysis technology to reduce feature dimensions, removes redundant information, reduces model complexity, and improves computational efficiency. SHAP value analysis is combined to quantify the contribution of each feature to electricity fluctuations, identify key factors that have a high impact on electricity load, and form a set of correlation factors to provide a basis for subsequent model construction.

[0066] S2: Construct an industrial chain correlation model based on correlation factors, and output the industrial chain correlation model to obtain the industrial chain characteristics.

[0067] Furthermore, constructing the industrial chain association model includes using the extracted association factor set F as the input feature of each node in the industrial chain association model to construct the initial node feature matrix H of the graph neural network;

[0068] In the industrial chain model, each industry is regarded as a node v in the graph, and the edges e between the nodes are ij Represents the upstream and downstream power correlation;

[0069] Adjacency Matrix Represents the strength of association between industries, node feature matrix Represents the extracted correlation factor.

[0070] It should be noted that the characteristics of the industrial chain include using graph convolutional networks for message transmission and updating the characteristics of each node. The graph convolutional network update formula is expressed as:

[0071]

[0072] Among them, H (l) represents the node features of the lth layer, W (l) represents the learned weight matrix, D represents the degree matrix, and σ represents the activation function;

[0073] By updating the company, the initial node feature H (0) Updated to more refined industry chain features H (L) .

[0074] It should also be noted that each industry is regarded as a node, and the edges between nodes represent the upstream and downstream correlations, which can intuitively show the relationship between the upstream and downstream of the industrial chain, and better understand the supply and demand relationship between industries and the electricity demand transmission mechanism. The adjacency matrix and node matrix can be used to quantify the electricity correlation between the upstream and downstream of the industrial chain, and analyze the impact of electricity correlation on electricity fluctuations. The graph convolutional network can effectively process graph structured data. Through the message passing mechanism, it can update the features of each node, extract more refined industrial chain features, and improve the model prediction accuracy.

[0075] S3: The industry chain characteristics use the LSTM model to dynamically predict the time series, and perform anomaly detection and model optimization based on the predicted power data.

[0076] Furthermore, dynamic prediction includes converting the output industrial chain features H of the graph neural network into (L) As the input of the time series model, the time series forecast of power fluctuation is obtained;

[0077] Assume h t is the power prediction feature at time t, combined with the industry chain association features, the state of LSTM is updated, and the update formula is expressed as:

[0078]

[0079] Among them, f t represents the forget gate, i t represents the input gate, o t represents the output gate, c t Indicates the cell state, h t represents the hidden state, W f , W i , W o , W c represents the power matrix, b f 、b i 、b o 、bc Indicates bias;

[0080] The predicted output result is expressed as:

[0081]

[0082] Among them, W y represents the weight of the output layer, b y represents the bias of the output layer, Represents the predicted power value at time t.

[0083] It should be noted that anomaly detection includes anomaly detection through an autoencoder to detect the power data predicted by the LSTM model Whether it conforms to the normal fluctuation pattern;

[0084] The autoencoder learns the normal distribution of power data and detects anomalies by minimizing the reconstruction error;

[0085] Assume that the reconstructed power data is The loss function is expressed as:

[0086]

[0087] When the reconstruction error L exceeds the set threshold δ, the power fluctuation at this moment is judged to be abnormal.

[0088] It should also be noted that model optimization includes adaptive optimization of the model using transfer learning in order to adapt to dynamic changes in data distribution;

[0089] When the data distribution changes, the parameters in the graph neural network and LSTM model are fine-tuned to ensure the prediction accuracy, and then the anomaly detection results are output, and the adaptively updated model is used for subsequent predictions, forming a closed-loop feedback system to continuously optimize the accuracy and real-time performance of the prediction.

[0090] It should also be noted that the LSTM model can process time series data and capture long-term dependencies in the data, so as to better predict the trend and pattern of electricity fluctuations; when the predicted electricity data differs greatly from the normal distribution, the autoencoder will output a large reconstruction error and thus be judged as abnormal.

[0091] Example 2 is an embodiment of the present invention, which provides a method for predicting electricity fluctuations and detecting anomalies based on industrial chain association. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0092] First, in order to verify the effectiveness of the electricity fluctuation prediction and anomaly detection method based on industrial chain association proposed in the present invention, the electricity data, meteorological data and economic indicator data of a certain month in a regional power system were selected as multi-source data sets for the experiment. The multi-source data include electricity data, meteorological data and economic indicator data. The electricity data selected the monthly electricity consumption of various industries, the meteorological data selected the monthly average temperature and the monthly average humidity, and the economic indicator data selected the monthly electricity price and the monthly electricity demand.

[0093] Among them, during the experiment, multi-source data were preprocessed to eliminate the influence of outliers and missing values, principal component analysis was used to reduce the dimension of multi-source data, and the main features were extracted. SHAP value analysis was used to quantify the contribution of each feature to electricity fluctuations and identify key influencing factors. According to the feature contribution, a set of correlation factors was constructed, and the correlation factor set was used as the node input feature in the industrial chain association model to obtain the industrial chain characteristics. The industrial chain characteristics were used as the input of the LSTM model to predict the time series of electricity fluctuations. The normal distribution of electricity data was learned through the automatic encoder, anomalies were detected by minimizing the reconstruction error, and the model was continuously adaptively optimized.

[0094] Table 1 Experimental reconstruction error data

[0095]

[0096] Referring to Table 1, it can be seen that the predicted electricity volume of the method of the present invention is highly consistent with the actual electricity volume data, and the prediction error is small, indicating that the method of the present invention can effectively predict the electricity volume fluctuation trend. It can be seen from the reconstruction error index that the electricity volume fluctuations at most time points conform to the normal pattern, but when abnormal conditions occur, such as the sudden drop in electricity consumption in the manufacturing industry in March 2022, the reconstruction error increases significantly. The autoencoder can accurately identify abnormal fluctuations. Through transfer learning technology, the model can be adaptively adjusted according to changes in data distribution, ensuring the accuracy of prediction and anomaly detection.

[0097] Compared with traditional prediction methods, the method of the present invention takes into account the impact of multi-source data, uses graph neural networks and LSTM models to capture the correlation between upstream and downstream of the industrial chain and the long-term dependency of time series data, and has higher prediction accuracy.

[0098] Compared with the traditional anomaly detection method, the method of the present invention utilizes the automatic encoder to learn the normal distribution of power data, which can more effectively identify sudden abnormal fluctuations in power.

[0099] At the same time, the method of the present invention adopts transfer learning technology to optimize the model, which can adapt to the dynamic changes of data distribution, reduce manual intervention, and reduce maintenance costs.

[0100] Example 3, reference Figure 5 , which is an embodiment of the present invention, provides an electricity fluctuation prediction and anomaly detection system based on industrial chain association, including a data extraction module, a feature output module, and an anomaly detection module.

[0101] The data extraction module is used to extract the correlation factors of electricity fluctuations from multi-source data; the feature output module is used to build an industrial chain correlation model based on the correlation factors, and the industrial chain correlation model outputs the industrial chain characteristics; the anomaly detection module is used to dynamically predict the time series through the LSTM model based on the industrial chain characteristics, and perform anomaly detection and model optimization based on the predicted electricity data.

[0102] If the function is implemented in the form of 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, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0103] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0104] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0105] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limited. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

[0106] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for predicting power fluctuations and detecting anomalies based on industrial chain association, characterized in that: include: Extract the correlation factors of power fluctuation from multi-source data; An industrial chain correlation model is constructed based on correlation factors, and the industrial chain correlation model outputs the industrial chain characteristics; The characteristics of the industrial chain use the LSTM model to dynamically predict the time series, and perform anomaly detection and model optimization based on the predicted power data.

2. The method for predicting power fluctuation and detecting anomalies based on industrial chain association according to claim 1, characterized in that: The extraction of the correlation factors of power fluctuation includes reducing the feature dimension by principal component analysis, and quantifying the contribution of each factor to power fluctuation by combining SHAP value analysis, and determining the influence of each feature on power load according to the contribution, and obtaining the correlation factor set F = {f1, f2, ..., f k }.

3. The method for predicting power fluctuation and detecting anomalies based on industrial chain association according to claim 2, characterized in that: The principal component analysis includes setting an initial feature matrix, which is expressed as: Among them, n represents the number of samples, and m represents the number of features; Principal component analysis is used to extract the main features Z, which is expressed as: Z=XW in, W represents the principal component matrix, and k represents the number of principal components extracted; The SHAP value analysis includes obtaining the contribution S according to the SHAP value analysis. i ; The influence of each feature on the power load is determined according to the contribution, which is expressed as: Among them, f(x) means containing feature x i The model prediction result, f(x -i ) represents the result after removing the features, and the associated factor set is obtained.

4. The method for predicting power fluctuation and detecting anomalies based on industrial chain association according to claim 3 is characterized in that: The construction of the industrial chain association model includes using the extracted association factor set F as the input feature of each node in the industrial chain association model to construct an initial node feature matrix H of the graph neural network; In the industrial chain model, each industry is regarded as a node v in the graph, and the edges e between the nodes are ij Represents the upstream and downstream power correlation; Adjacency Matrix Represents the strength of association between industries, node feature matrix Represents the extracted correlation factor.

5. The method for predicting power fluctuation and detecting anomalies based on industrial chain association according to claim 4, characterized in that: The characteristics of the industrial chain include using a graph convolutional network for message transmission to update the characteristics of each node. The graph convolutional network update formula is expressed as: Among them, H (l) represents the node features of the lth layer, W (l) represents the learned weight matrix, D represents the degree matrix, and σ represents the activation function; By updating the company, the initial node feature H (0) Updated to more refined industry chain features H (L) .

6. The method for predicting power fluctuation and detecting anomalies based on industrial chain association according to claim 5, characterized in that: The dynamic prediction includes converting the output industrial chain features H of the graph neural network into (L) As the input of the time series model, the time series forecast of power fluctuation is obtained; Assume h t is the power prediction feature at time t, combined with the industry chain association features, the state of LSTM is updated, and the update formula is expressed as: Among them, f t represents the forget gate, i t represents the input gate, o t represents the output gate, c t Indicates the cell state, h t represents the hidden state, W f , W i , W o , W c represents the power matrix, b f 、b i 、b o 、b c Indicates bias; The predicted output result is expressed as: Among them, W y represents the weight of the output layer, b y represents the bias of the output layer, Represents the predicted power value at time t.

7. The method for predicting power fluctuation and detecting anomalies based on industrial chain association according to claim 6, characterized in that: The anomaly detection includes anomaly detection through an autoencoder to detect the power data predicted by the LSTM model Whether it conforms to the normal fluctuation pattern; The autoencoder learns the normal distribution of power data and detects anomalies by minimizing the reconstruction error; Assume that the reconstructed power data is y~ t , the loss function is expressed as: When the reconstruction error L exceeds the set threshold δ, the power fluctuation at this moment is judged to be abnormal.

8. A system using the method for predicting power fluctuation and detecting anomalies based on industrial chain association as claimed in any one of claims 1 to 7, characterized in that: Including data extraction module, feature output module, and anomaly detection module; The data extraction module is used to extract the correlation factors of power fluctuation from multi-source data; The feature output module is used to construct an industrial chain association model according to the association factors, and the industrial chain association model outputs the industrial chain features; The anomaly detection module is used to dynamically predict time series based on industrial chain characteristics through the LSTM model, and to perform anomaly detection and model optimization based on the predicted electricity data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for predicting and detecting power fluctuations and abnormalities based on industrial chain association described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting power fluctuations and detecting anomalies based on industrial chain association described in any one of claims 1 to 7 are implemented.