Intelligent power grid early warning method and system based on deep learning and Bayesian model

By integrating deep learning and Bayesian models in the smart grid early warning system, combining multimodal data fusion and real-time monitoring technology, the technical defects of the existing system in data processing and abnormal detection are solved, efficient and accurate early warning of grid abnormal events is achieved, and the safety and stability of the power grid is improved.

CN119989137APending Publication Date: 2025-05-13INFORMATION CENT OF YUNNAN POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411815989.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing smart grid early warning system has technical defects in data processing, feature extraction, model training, real-time monitoring and feedback, abnormal detection, etc., making it difficult to achieve efficient and accurate early warning of grid abnormal events.

Method used

The intelligent grid early warning method based on deep learning and Bayesian model is adopted, and through multimodal data fusion, real-time monitoring and feedback mechanisms, combined with natural language processing and graph convolution network, efficient and accurate warning of grid abnormal events is achieved.

Benefits of technology

It realizes efficient and accurate early warning of abnormal grid events, improves the safety and stability of the grid, can monitor the grid status in real time, predict potential faults, and provide preventive measures and suggestions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119989137A_ABST
    Figure CN119989137A_ABST
Patent Text Reader

Abstract

The invention discloses a smart power grid early warning method based on deep learning and a Bayesian model, and the method comprises the steps: collecting image data, time sequence data and text data, and carrying out the preprocessing of the data; performing multi-modal data fusion processing according to the preprocessed data; and a real-time monitoring and feedback mechanism technology is adopted to carry out power grid early warning. According to the invention, the multi-modal data fusion and mode recognition method is designed through deep fusion of deep learning and the Bayesian model, and efficient and accurate early warning of the abnormal event of the power grid is realized. The multi-layer hybrid neural network architecture can process different types of data, and the robustness and generalization ability of the model are improved. A dynamic Bayesian network and a real-time monitoring and feedback mechanism enable the system to respond to new data and conditions in time, and high precision of early warning is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart grid early warning technology, and in particular to a smart grid early warning method and system based on deep learning and Bayesian model. Background Art

[0002] The existing smart grid early warning system has several technical defects in data processing, feature extraction, model training, real-time monitoring and feedback, and anomaly detection. Summary of the invention

[0003] In view of the above existing problems, the present invention is proposed.

[0004] Therefore, the present invention provides a smart grid early warning method based on deep learning and Bayesian model, which realizes efficient and accurate early warning of abnormal events in the power grid by integrating the advanced feature extraction capability of deep learning and the probabilistic reasoning function of Bayesian model. The system can monitor the state of the power grid in real time, predict potential faults, and provide preventive measures, which greatly improves the safety and stability of the power grid.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions, a smart grid early warning method based on deep learning and Bayesian model, comprising:

[0006] Collect image data, time series data, text data, and preprocess the data;

[0007] Perform multimodal data fusion processing based on the preprocessed data;

[0008] Use real-time monitoring and feedback mechanism technology to provide power grid early warning.

[0009] As a preferred solution of the smart grid early warning method based on deep learning and Bayesian model described in the present invention, the preprocessing includes extracting semantic features that conform to the LSTM input feature structure by natural language processing technology, combining operation and maintenance records and equipment status text data, and using the TF-IDF algorithm to weight keywords, including calculating the frequency of occurrence of each keyword in the document in combination with word frequency statistics, and calculating the inverse document frequency of each keyword in the total document set of the database, and designing an improved TF-IDF scoring algorithm, which is expressed as:

[0010] TFIDF(t,d,D)=(1-β+β·TF(t,d))·IDF(t,D)

[0011] Where t is any word in the document, d is the document, D is the total document set in the database, β is the smoothing factor, and the value range of β is [0,1].

[0012] As a preferred solution of the smart grid early warning method based on deep learning and Bayesian model described in the present invention, the preprocessing includes using Dirichlet distribution as the prior probability distribution of keywords, learning the hyperparameter α through the variational inference method, normalizing the word frequency of each keyword, using Logistic normalization and neural network model to fit the word frequency and probability, constructing a co-occurrence matrix and a conditional probability matrix, using a hidden Markov model to capture the sequential dependency between keywords, and using the PageRank algorithm to calculate the weights between keywords based on the prior probability and conditional probability matrix, expressed as:

[0013]

[0014] Among them, PR(k) is the PageRank value of keyword k, b is the damping factor, I k is the set of keywords pointing to keyword k, and L(i) is the number of keywords pointed to by keyword i.

[0015] As a preferred solution of the smart grid early warning method based on deep learning and Bayesian model described in the present invention, the multimodal data fusion processing includes constructing a weight matrix between keywords:

[0016]

[0017] Among them, W is the weight matrix between keywords, PR(w i →w j ) is the keyword w i To keyword w j The value of the weighted edge of , j is a keyword different from keyword i;

[0018] Entering new data into the database involves setting the prior data for the new data and modeling the prior probability using the Dirichlet distribution, expressed as:

[0019]

[0020] Among them, P is the prior probability, π is the mixing coefficient, α is the Dirichlet distribution hyperparameter, and M is the number of mixing components. is the set of violation types in the mth mixed component, η is the gamma function, F c is the probability of violation type c;

[0021] Design dynamic update hyperparameters, expressed as:

[0022] α r =α r-1 +η(f c,r -α r-1 )

[0023] Among them, α r is the hyperparameter at time r, f c,r is the frequency of violation type c observed at time r, η is the learning rate;

[0024] Calculating the final warning probability includes extracting the feature vector of the current operation and calculating the likelihood probability of the violation type based on the feature vector and the weight matrix, which is expressed as:

[0025]

[0026] Among them, P′ is the likelihood probability, x is the feature vector, M is the number of mixed components, π cm is the weight of the mth mixture component, μ cm is the mean vector of the mth mixed component under violation type c, ∑ cm is the covariance matrix of the mth mixed component under the violation type C, and T is the transposition operation; based on the prior probability and likelihood probability, the posterior probability of the violation type is calculated, which is expressed as:

[0027]

[0028] Among them, P″ is the posterior probability, P′(x|c, m) is the likelihood probability when the violation type c and the mixed component m are present, and P is the evidence probability. The posterior probability is dynamically updated, which is expressed as:

[0029]

[0030] Among them, x r is the data observed at time r, P″(c|x r-1 ) is the posterior probability of the violation type c at time r-1; the posterior probability is weighted based on the weight matrix, expressed as:

[0031]

[0032] Among them, P final is the final warning probability, W ch is the weight between violation types c and h, and h is a violation type different from violation type c. The mutual influence between violation types is captured by the graph convolutional network, and the graph convolutional network is weighted and fused, which is expressed as:

[0033]

[0034] Among them, H (l) is the feature matrix of the lth layer, σ is the activation function, is the normalized adjacency matrix, W (l) is the weight matrix of the lth layer; the weight matrix is ​​dynamically updated, expressed as:

[0035] W (r) =LSTM(W (r-1) ,x)

[0036] Among them, W (r) is the weight matrix at time r; through the multi-scale Wang Yili mechanism, the weights between different violation types are automatically adjusted, expressed as:

[0037] W = MultiHeadAttention(Q,K,V)

[0038] Among them, Q is the query matrix, K is the key matrix, and V is the value matrix. Based on the model complexity management mechanism of dynamic regularization, a regularization function is constructed, which is expressed as:

[0039]

[0040] Among them, L reg is the regularization function, λ is the dynamic regularization coefficient, θ is all the parameters of the model, N is the number of parameters, w u The weight factor assigned to each parameter; based on dynamic weight adjustment, the total loss function is constructed, expressed as:

[0041]

[0042] Among them, L total is the total loss function, is the loss function for each task, δ e (θ) is the dynamic weight of task e, and E is the number of tasks.

[0043] As a preferred solution of the smart grid early warning method based on deep learning and Bayesian model described in the present invention, the real-time monitoring and feedback mechanism technology includes building a dynamic adjustment weight matrix WWW as the core, adapting to real-time data through LSTM structure, and combining operation and maintenance feedback, context information and time factors for adjustment. The specific update formula is as follows:

[0044] W (r) =LSTM(W (r-1) ,x)+α·feedback_adjustment+γ·contextual_adjustment+τ·temporal_adjustment

[0045] Among them, W(r) represents the weight matrix at time r; W(r-1) is the weight matrix at the previous moment; x is the input data at the current moment.

[0046] As a preferred solution of the smart grid early warning method based on deep learning and Bayesian model described in the present invention, the real-time monitoring and feedback mechanism technology includes predicting possible equipment failures through dynamic Bayesian network construction and dynamic adjustment of prior probability, as follows:

[0047] Build a Bayesian model:

[0048]

[0049] Where P(A|E) is the probability of event A occurring given evidence E, P(E|A) is the probability of evidence E occurring given event A, P(A) is the prior probability of event A, and P(E) is the marginal probability of evidence E.

[0050] Dynamically adjust prior probabilities:

[0051] P(A t+1 )=αP(A t )+(1-α)P(A0)+λ·dynamic adjustment(A t )+μ·contextualadjustment(A t )+v·temporal adjustment(A t )

[0052] Define a dynamic Bayesian network:

[0053]

[0054] Among them, C t is the context information at time t, T t is the time information at time t, P(C t |X t , T t ) is in a given state X t and time T t The probability of context information under t |X t-1 , T t ) is the state transition probability from time t-1 to time t, P(C t |X t-1 , T t ) is the state at a given time t-1 and time T t The probability of the context information.

[0055] As a preferred solution of the smart grid early warning method based on deep learning and Bayesian model described in the present invention, the grid early warning includes performing anomaly detection and calculating anomaly probability:

[0056]

[0057] Among them, P(Anomaly|X t =i) is the probability of an anomaly occurring in a given state, which is predetermined by historical data and expert knowledge.

[0058] As a preferred solution of the smart grid early warning system based on deep learning and Bayesian model described in the present invention, the system includes a keyword weighting module, a priori probability matrix module, and a prediction and early warning module; the keyword weighting module is used to construct a violation behavior prediction database, extract keywords based on deep learning, and use the TF-IDF algorithm to weight the keywords; the prior probability matrix module is used to calculate the prior probability and conditional probability matrix of the keywords, and construct a weight matrix to calculate the weights between the keywords; the prediction and early warning module is used to input new data into the database, and calculate the final warning probability through the weight matrix and the Bayesian algorithm.

[0059] A computer device includes a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the steps of a smart grid early warning method based on deep learning and a Bayesian model are implemented.

[0060] 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 a smart grid early warning method based on deep learning and a Bayesian model are implemented.

[0061] Beneficial effects of the invention: The invention designs a multimodal data fusion and pattern recognition method by deeply integrating deep learning and Bayesian models, and realizes efficient and accurate early warning of abnormal events in the power grid. The multi-layer hybrid neural network architecture can process different types of data and improve the robustness and generalization ability of the model. The dynamic Bayesian network and real-time monitoring and feedback mechanism enable the system to respond to new data and situations in a timely manner and maintain high accuracy of early warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] 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.

[0063] Figure 1 A logic flow chart of the principle of multimodal data fusion technology for a smart grid early warning method based on deep learning and Bayesian model provided by one embodiment of the present invention.

[0064] Figure 2 A logical flow chart of the technical principles of a real-time monitoring and feedback mechanism for a smart grid early warning method based on deep learning and Bayesian models provided in one embodiment of the present invention.

[0065] Figure 3 A logic flow chart of a smart grid abnormal event warning system for a smart grid early warning method based on deep learning and Bayesian model provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0066] 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.

[0067] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0068] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0069] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0070] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0071] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0072] Example 1, reference Figure 1-Figure 3 , which is the first embodiment of the present invention, and provides a smart grid early warning method based on deep learning and Bayesian model, including:

[0073] (1) Data preprocessing

[0074] a) Data collection:

[0075] (I) Equipment status data

[0076] Sensor deployment: Install temperature, vibration, current, and voltage sensors at key locations on the equipment.

[0077] Data transmission: Data is transmitted to a central server via wired or wireless means (such as LoRa, Wi-Fi, 4G / 5G).

[0078] Data storage: Store data in a database such as MySQL, PostgreSQL, or a NoSQL database such as MongoDB.

[0079] (II) Environmental condition data

[0080] Weather station data: Get real-time temperature, humidity, and wind speed data from the weather station.

[0081] Satellite remote sensing data: Obtain large-scale environmental data through satellite remote sensing technology.

[0082] Environmental sensors: Install environmental sensors around the device to monitor environmental conditions in real time.

[0083] Data transfer: Data is transferred to a central server and stored in a database.

[0084] (III) Load change data

[0085] Grid management system: Obtain power consumption and power factor data from grid management systems (such as SCADA systems).

[0086] Electricity meter data: Get electricity usage data from smart meters.

[0087] Data transfer: Data is transferred to a central server and stored in a database.

[0088] (IV) Operation and maintenance records

[0089] Maintenance log: The operation and maintenance personnel fill in the maintenance log after maintenance, recording the maintenance date, content and personnel.

[0090] Fault reporting system: After discovering a fault, the operation and maintenance personnel fill out a fault report, recording the fault date, type, cause and solution.

[0091] Data Entry: Enter maintenance logs and fault reports into the database.

[0092] b) Data cleaning:

[0093] (I) Missing value processing: Use linear interpolation or deletion to handle missing values. For example, for time series data, linear interpolation can be used to fill missing values, while for non-time series data, records with missing values ​​can be directly deleted.

[0094] (II) Outlier processing: Use the Z-score method and Isolation Forest algorithm to detect and process outliers. For example, for temperature data, the Z-score of each data point can be calculated. If the Z-score exceeds 3, the data point is considered an outlier and can be removed or corrected. Using the Isolation Forest algorithm to detect and process outliers is suitable for complex anomaly detection scenarios.

[0095] (III) Duplicate value processing: Delete duplicate records to ensure data uniqueness. Use the drop_duplicates method in Python's pandas library to achieve this.

[0096] (2) Feature extraction

[0097] a) Image data processing (using convolutional neural network (CNN))

[0098] Convolution operation: extract local features from the image.

[0099] y=f(W*x+b)

[0100] Among them: y is the feature map after the convolution operation; f is the activation function, commonly used activation functions are ReLU, Sigmoid and Tanh; W is the convolution kernel (filter); x is the input image; b is the bias term.

[0101] Pooling operation: reduce feature dimensions, retain main features, reduce computational effort and prevent overfitting.

[0102] z=pool(y)

[0103] Max Pooling and Average Pooling methods are used.

[0104] Fully connected layer: The extracted features are used for classification or regression tasks.

[0105] o=W f z+b f

[0106] Where: O is the final output, which can be a classification result or a regression value; W f is the weight matrix of the fully connected layer; z is the feature vector after the pooling operation; b f is the bias term of the fully connected layer.

[0107] b) Time series data processing

[0108] Recurrent Neural Networks (RNN):

[0109] Recursive operations: capturing temporal dependencies.

[0110] h t =tanh(W h h t-1 +W x x t +b)

[0111] Where: h t is the hidden state at time step t; W h is the weight matrix of the hidden state at the previous time step; h t-1 is the hidden state at time step t-1; W x is the weight matrix input at the current time step; x t is the input at time step t; b is the bias term; tanh is the hyperbolic undercut activation function, which is used to introduce nonlinearity.

[0112] Output layer: generates the final output.

[0113] y t =W o h t +b o

[0114] Where: y t is the final output at time step t; W o is the weight matrix of the output layer; h t is the hidden state at time step t; b o is the bias term of the output layer.

[0115] c) Long dependency processing

[0116] Transformer Model:

[0117] Self-attention mechanism: handling dependencies in long sequence data.

[0118] Set the encoding matrix to introduce position information. contextual_mask t is the context mask, used to process context information. temporal_mask t is a temporal mask used to process temporal information. β and γ are hyperparameters used to adjust the influence of context and temporal information.

[0120] Feedforward neural network: further process features and enhance the expressiveness of the model.

[0121] FFN(x)=ReLU(W1x+b1)W2+b2

[0122] Where: FFN(x) is the output of the feedforward neural network. W1 and W2 are weight matrices. b1 and b2 are bias terms. ReLU is an activation function used to introduce nonlinearity.

[0123] (3) Probabilistic Modeling

[0124] By constructing a dynamic Bayesian network and dynamically adjusting the prior probability, the smart grid equipment fault prediction system can more accurately predict possible equipment failures. The dynamic Bayesian network improves the accuracy of state transition probabilities by considering contextual information and time information. The dynamic adjustment of the prior probability improves the adaptability and reliability of the model based on real-time data and multiple adjustment items. The application of these technologies helps to take maintenance measures in advance, reduce downtime and maintenance costs, and improve the stability and reliability of the power grid. a) Construction of a dynamic Bayesian network

[0125] State transfer:

[0126] Calculate the transition probability of the device in different states, considering contextual information and time information.

[0127]

[0128] Where: X t is the state of the device at time step t. X t-1 is the state of the device at time step t-1. C t is the context information at time step t, such as environmental conditions, load changes, etc. t is the time information at time step t, such as timestamp, season, etc.

[0129] Specific implementation steps:

[0130] (I) Collect historical data: Collect historical status data, context information, and time information of the device.

[0131] (II) Calculate conditional probability: Calculate P(C t |X t T t ): The probability of context information given the device state and time information. Calculate P(X t |X t-1 , T t ): The probability of the current device state given the device state and time information of the previous time step. Calculate P(C t |X t-1 , T t ): The probability of context information given the device state and time information of the previous time step.

[0132] (III) State transition probability: Use the above conditional probability to calculate the state transition probability P(X t |X t+1 , C t , T t ).

[0133] Example:

[0134] Device status X: normal (0), minor fault (1), major fault (2). Context information C: ambient temperature and humidity. Time information T: timestamp.

[0135] The following probabilities can be calculated:

[0136] P(C t |X t =0, Tt): The probability of ambient temperature and humidity when the device status is normal and time is t.

[0137] P(X t =1|X t-1 =0, T t ): When the device state is normal and time is t, the probability that the device state is a slight fault in the next time step.

[0138] P(C t |X t-1 =0, T t ): The probability of the ambient temperature and humidity in the previous time step when the device state is normal and time is t.

[0139] b) Dynamic adjustment of prior probability

[0140] Dynamically adjust prior probabilities:

[0141] P(A t+1 )=αP(At )+(1-α)P(A0)+λ·dynamic_ . adjustment(A t )+μ

[0142] ·contextual . adjustment(A t )+ν·tempocal . adjustment(A t )+ω

[0143] ·Reliability . adjustment(A t )

[0144] Where: P(A t+1 ) is the prior probability at time step t+1. P(A t ) is the prior probability at time step t. P(A0) is the initial prior probability. α is the smoothing factor that controls the weight of the new and old prior probabilities. λ, μ, v, ω are adjustment coefficients that control the effects of dynamic adjustment, context adjustment, time adjustment, and reliability adjustment, respectively. dynamic_adjustment(A t ) is a dynamic adjustment item based on real-time data. t ) is an adjustment item based on context information. temporal_adjustment(A t ) is an adjustment item based on time information. t ) is a reliability-based adjustment.

[0145] Specific implementation steps:

[0146] (I) Initialize prior probability: Set the initial prior probability P(A0).

[0147] (II) Real-time data collection: collect device status data, context information and time information in real time.

[0148] (III) Dynamic adjustment:

[0149] Dynamic adjustment: adjust the prior probability based on real-time data.

[0150] Contextual Adjustment: Adjust the prior probability based on contextual information (e.g., environmental conditions, load changes).

[0151] Time adjustment: adjust the prior probability according to time information (such as timestamp, season) Reliability adjustment: adjust the prior probability according to the reliability of the equipment and historical failure records.

[0152] (IV) Update the prior probability: Use the above adjustment terms and adjustment coefficients to update the prior probability P(A t+1 ).

[0153] Assume the following data:

[0154] Initial prior probability P(A0) = 0.1. Smoothing factor α = 0.8. Adjustment coefficient λ = 0.1, μ = 0.05, v = 0.03, ω = 0.02.

[0155] The following adjustments can be calculated:

[0156] dynamic_adjustment(A t ):Adjust the prior probability according to the real-time device status data.

[0157] contextual_adjustment(A t ): Adjust the prior probability according to the ambient temperature and humidity.

[0158] temporal_adjustment(A t ):Adjust the prior probability according to timestamp and season.

[0159] reliability_adjustment(A t ):Adjust the prior probability based on the reliability and historical failure records of the equipment.

[0160] Finally, the prior probability can be updated:

[0161] P(A t+1 )=0.8·P(A t )+0.2·0.1+0.1·dynannic-adjustment(A t )+0.05

[0162] contextval_adjustrnent(A t )+0.03·tempocral_adjustment(A t )

[0163] +0.02·reliability_adjustment(A t )

[0164] (4) Early warning and decision-making

[0165] Through early warning signal generation and preventive measures recommendations, the smart grid equipment fault prediction system can promptly detect potential equipment failures, take maintenance measures in advance, and reduce downtime and maintenance costs. Early warning signal generation is based on dynamic Bayesian networks and abnormal probability calculations to ensure the accuracy and reliability of early warnings. Preventive measures recommendations provide specific maintenance and adjustment suggestions based on early warning results, helping operation and maintenance personnel to effectively manage equipment and improve the stability and reliability of the power grid.

[0166] a) Early warning signal generation:

[0167] Abnormal probability calculation:

[0168] The probability of abnormality of the computing equipment is calculated. When the abnormality probability exceeds the preset threshold, the system sends a warning signal.

[0169]

[0170] in:

[0171] P(Anomaly|O1,O2,...,O T ) is given the observation data O1, O2, ..., O T The probability of abnormality of the device.

[0172] P(Anomaly|X t =i) is the probability of an abnormality occurring when the device state is i.

[0173] P(X t =i|O1, O2, ..., O T ,π,T,O,C) is the probability that the device state is i given the observation data, path π, time information T, context information O and environment information C.

[0174] Specific implementation steps:

[0175] i. Collect observation data: collect equipment status data, environmental condition data, load change data, etc. ii. State probability calculation: use dynamic Bayesian network to calculate the probability P(X) of each state t =i|O1, O2, ..., O T ,π,T,O,C).

[0176] iii. Anomaly probability calculation: Calculate the overall anomaly probability based on the state probability and the anomaly probability in each state, and calculate the overall anomaly probability P (Anomaly|O1, O2, ..., O T ).

[0177] iv. Threshold comparison: Compare the calculated abnormal probability with the preset threshold. If it exceeds the threshold,

[0178] A warning signal is issued.

[0179] Assume the following data:

[0180] Observation data O: equipment status data, ambient temperature, humidity, timestamp.

[0181] State probability P(X t =i|O1, O2, ..., O T ,π,T,O,C): The probability that the device is in different states given the observed data.

[0182] Anomaly probability P(Anomaly|X t =i): The probability of an abnormality occurring when the device status is i.

[0183] We can calculate it as follows:

[0184] ·P(Anomaly|X t =0)=0.05

[0185] ·P(Anomaly|X t =1)=0.3

[0186] ·P(Anomaly|X t =2)=0.8

[0187] Assume the state probability is:

[0188] ·P(X t =0|O1,O2,…,O T ,π,T,O,C)=0.7

[0189] ·P(X t =1|O1,O2,…,O T ,π,T,O,C)=0.2

[0190] ·P(X t =2|O1,O2,…,O T ,π,T,O,C)=0.1

[0191] The overall abnormal probability is:

[0192] P(Anomaly|O1,O2,...,OT)=0.05×0.7+0.3×0.2+0.8×0.1=0.035+0.06+0.08=0.175

[0193] If the preset threshold is 0.2, then 0.175 < 0.2, the system will not issue a warning signal. If the preset threshold is 0.15, then 0.175 > 0.15, the system will issue a warning signal.

[0194] (5) Real-time monitoring and feedback

[0195] Through real-time monitoring and feedback mechanisms, the smart grid equipment fault prediction system can collect and process equipment status data, environmental condition data, and load change data in real time to ensure the real-time and accuracy of the data. At the same time, according to the feedback and real-time data of operation and maintenance personnel, the model parameters are dynamically adjusted to improve the accuracy and reliability of the early warning system. The application of these technologies helps to detect potential equipment failures in advance, take maintenance measures in time, reduce downtime and maintenance costs, and improve the stability and reliability of the power grid.

[0196] a) Real-time monitoring

[0197] Data collection: Real-time collection of status monitoring data of power grid equipment, environmental condition data, and load change data. This can be achieved using IoT sensors and data collection systems (such as SCADA systems).

[0198] Data processing: Real-time cleaning and extraction of key features to ensure the real-time and accuracy of data. Stream processing frameworks such as Apache Kafka and Spark Streaming can be used to achieve real-time data processing.

[0199] b) Feedback Mechanism

[0200] Model Update:

[0201] Based on the feedback from operation and maintenance personnel and real-time data, the model parameters are dynamically adjusted to improve the accuracy and reliability of the early warning system.

[0202]

[0203] Where: W t+1 are the model parameters at time step t+1. W t are the model parameters at time step t. η is the learning rate, which controls how fast the parameters are updated. is the gradient of the loss function with respect to the model parameters. t is the training data at time step t. λ, μ, v are adjustment coefficients that control the effects of feedback adjustment, context adjustment, and time adjustment, respectively. feedback_adjustment(W t , F t ) is an adjustment item based on feedback from operation and maintenance personnel. contextual_adjustment(W t , C t ) is an adjustment item based on context information. t , T t ) is an adjustment item based on time information.

[0204] 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.

[0205] Embodiment 2, the second embodiment of the present invention, is different from the previous embodiment in that:

[0206] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on 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, a server, or a network device, etc.) to perform all or part of the steps of the methods described in 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., which can store program codes.

[0207] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0208] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0209] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0210] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0211] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A smart grid early warning method based on deep learning and Bayesian model, characterized by: include, Collect image data, time series data, text data, and preprocess the data; Perform multimodal data fusion processing based on the preprocessed data; Use real-time monitoring and feedback mechanism technology to provide power grid early warning.

2. The smart grid early warning method based on deep learning and Bayesian model as claimed in claim 1, characterized in that: The preprocessing includes extracting semantic features that conform to the LSTM input feature structure by combining operation and maintenance records and equipment status text data through natural language processing technology. At the same time, the TF-IDF algorithm is used to weight the keywords, including calculating the frequency of occurrence of each keyword in the document in combination with word frequency statistics, and calculating the inverse document frequency of each keyword in the total document set of the database, and designing an improved TF-IDF scoring algorithm, which is expressed as: TFIDF(t,d,D)=(1-β+β·TF(t,d))·IDF(t,D) Where t is any word in the document, d is the document, D is the total document set in the database, β is the smoothing factor, and the value range of β is [0, 1].

3. The smart grid early warning method based on deep learning and Bayesian model as claimed in claim 2, characterized in that: The preprocessing includes using Dirichlet distribution as the prior probability distribution of keywords, learning the hyperparameter α through the variational inference method, normalizing the word frequency of each keyword, using Logistic normalization and neural network model to fit the word frequency and probability, constructing a co-occurrence matrix and a conditional probability matrix, using a hidden Markov model to capture the sequential dependency between keywords, and using the PageRank algorithm to calculate the weights between keywords based on the prior probability and conditional probability matrix, expressed as: Among them, PR(k) is the PageRank value of keyword k, b is the damping factor, I k is the set of keywords pointing to keyword k, and L(i) is the number of keywords pointed to by keyword i.

4. The smart grid early warning method based on deep learning and Bayesian model as claimed in claim 3, characterized in that: The multimodal data fusion process includes constructing a weight matrix between keywords: Among them, W is the weight matrix between keywords, PR(w i →w j ) is the keyword w i To keyword w j The value of the weighted edge of , j is a keyword different from keyword i; Entering new data into the database involves setting the prior data for the new data and modeling the prior probability using the Dirichlet distribution, expressed as: Among them, P is the prior probability, π is the mixing coefficient, α is the Dirichlet distribution hyperparameter, and M is the number of mixing components. is the set of violation types in the mth mixed component, Γ is the gamma function, F c is the probability of violation type c; Design dynamic update hyperparameters, expressed as: a r =a r-1 +η(f c,r -a r-1 ) Among them, α r is the hyperparameter at time r, f c,r is the frequency of violation type c observed at time r, η is the learning rate; Calculating the final warning probability includes extracting the feature vector of the current operation and calculating the likelihood probability of the violation type based on the feature vector and the weight matrix, which is expressed as: Among them, P′ is the likelihood probability, x is the feature vector, M is the number of mixed components, π cm is the weight of the mth mixture component, μ cm is the mean vector of the mth mixed component under violation type c, ∑ cm is the covariance matrix of the mth mixed component under violation type c, and T is the transposition operation; based on the prior probability and likelihood probability, the posterior probability of the violation type is calculated, which is expressed as: Among them, P″ is the posterior probability, P′(x|c, m) is the likelihood probability when the violation type c and the mixed component m are present, and P is the evidence probability. The posterior probability is dynamically updated, which is expressed as: Among them, x r is the data observed at time r, P″(c|x r-1 ) is the posterior probability of the violation type c at time r-1; the posterior probability is weighted based on the weight matrix, expressed as: Among them, P final is the final warning probability, W ch is the weight between violation types c and h, and h is a violation type different from violation type c. The mutual influence between violation types is captured by the graph convolutional network, and the graph convolutional network is weighted and fused, which is expressed as: Among them, H (l) is the feature matrix of the lth layer, σ is the activation function, is the normalized adjacency matrix, W (l) is the weight matrix of the lth layer; the weight matrix is ​​dynamically updated, expressed as: W (r) =LSTM(W (r-1) ,x) Among them, W (r) is the weight matrix at time r; through the multi-scale Wang Yili mechanism, the weights between different violation types are automatically adjusted, expressed as: W=MultiHeadAttention(Q,K,V) Among them, Q is the query matrix, K is the key matrix, and V is the value matrix. Based on the model complexity management mechanism of dynamic regularization, a regularization function is constructed, which is expressed as: Among them, L reg is the regularization function, λ is the dynamic regularization coefficient, θ is all the parameters of the model, N is the number of parameters, w u The weight factor assigned to each parameter; based on dynamic weight adjustment, the total loss function is constructed, expressed as: Among them, L total is the total loss function, is the loss function for each task, δ e (θ) is the dynamic weight of task e, and E is the number of tasks.

5. The smart grid early warning method based on deep learning and Bayesian model as claimed in claim 4, characterized in that: The real-time monitoring and feedback mechanism technology includes building a dynamically adjusted weight matrix WWW as the core, adapting to real-time data through the LSTM structure, and combining operation and maintenance feedback, context information and time factors for adjustment. The specific update formula is as follows: W (r) =LSTM(W (r-1) ,x)+α·feedback_adjustment+γ·contextual_adjustment+τ·temporal_adjustment Among them, W(r) represents the weight matrix at time r; W(r-1) is the weight matrix at the previous moment; x is the input data at the current moment.

6. The smart grid early warning method based on deep learning and Bayesian model as claimed in claim 5, characterized in that: The real-time monitoring and feedback mechanism technology includes predicting possible equipment failures through dynamic Bayesian network construction and dynamic adjustment of prior probability, as follows: Build a Bayesian model: Where P(A|E) is the probability of event A occurring given evidence E, P(E|A) is the probability of evidence E occurring given event A, P(A) is the prior probability of event A, and P(E) is the marginal probability of evidence E. Dynamically adjust prior probabilities: P(A t+1 )=αP(A t )+(1-α)P(A0)+λ·dynamic adjustment(A t )+μ·contextualadjustment(A t )+v·temporal adjustment(A t ) Define a dynamic Bayesian network: Among them, C t is the context information at time t, T t is the time information at time t, P(C t |X t , T t ) is in a given state X t and time T t The probability of context information under t |X t-1 , T t ) is the state transition probability from time t-1 to time t, P(C t |X t-1 , T t ) is the state at a given time t-1 and time T t The probability of context information.

7. The smart grid early warning method based on deep learning and Bayesian model as claimed in claim 6, characterized in that: The power grid early warning includes abnormality detection and abnormality probability calculation: Among them, P(Anomaly|X t =i) is the probability of an anomaly occurring in a given state, which is predetermined by historical data and expert knowledge.

8. A system using the smart grid early warning method based on deep learning and Bayesian model as claimed in any one of claims 1 to 7, characterized in that: It includes a keyword weighting module, a priori probability matrix module, and a prediction and warning module; the keyword weighting module is used to build a violation behavior prediction database, extract keywords based on deep learning, and use the TF-IDF algorithm to weight keywords; the priori probability matrix module is used to calculate the prior probability and conditional probability matrix of keywords, and construct a weight matrix to calculate the weights between keywords; The prediction and warning module is used to input new data into the database and calculate the final warning probability through the weight matrix and Bayesian algorithm.

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 according to 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 according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • New energy equipment fault early warning system for photovoltaic power station

    CN120804812A