Power grid equipment anomaly detection device and method based on self-enhanced graph neural network
By using a self-enhanced graph neural network in abnormal detection of power grid equipment, the traditional method has solved the problem of low detection accuracy and efficiency in the case of sparse labels and underutilization of graph structure information, and achieved more efficient and accurate abnormal detection.
Patent Information
- Application Number
- CN202510042491.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-16
AI Technical Summary
Traditional power grid equipment abnormal detection methods are difficult to achieve efficient and accurate abnormal detection when the labels are sparse, the graph structure information is not fully utilized, the model generalization ability is weak and the calculation efficiency is low.
Using the abnormal detection device and method of power grid equipment based on self-enhanced graph neural network, the model training process of traditional graph neural networks is improved through data preprocessing, objective function construction and particle swarm optimization algorithms, making full use of graph structure information and extracting effective structural information under sparse label conditions.
It improves the accuracy and efficiency of grid abnormal detection, can effectively detect abnormalities under sparse label conditions, and improves detection accuracy and calculation efficiency.
Smart Images

Figure CN120011965A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid safety technology, and in particular to a power grid equipment anomaly detection device and method based on a self-enhanced graph neural network. Background Art
[0002] The rapid development of modern power systems has made the actual operating status of power systems full of uncertainty, bringing huge challenges to the stable operation of power systems.
[0003] First, the power system may be subject to some interference during actual operation, such as faults, generator switching, etc. If such interference prevents the power system from transitioning to a new stable state, the power system will continue to remain in an "instability" state, eventually leading to a complete paralysis of the power system. Therefore, it is necessary to promptly and accurately assess the stability of the system after the power system is disturbed, and guide the staff to take corresponding measures to deal with the "instability" of the system.
[0004] Secondly, in order to improve the operation quality and reliability of the power system and avoid the possibility of large-scale power outages caused by sudden faults, relevant fault threats must be dealt with in a timely manner. Therefore, it is crucial to accurately locate and quickly clear the fault immediately after the fault occurs to achieve rapid recovery.
[0005] Traditional complex power grid anomaly detection methods usually rely on a large amount of labeled data to classify device status through supervised learning models. However, these methods have the following significant disadvantages in practical applications:
[0006] 1. Label sparsity problem: Usually only a small number of devices in the power grid have known label information, and the status of most devices cannot be marked in advance. Traditional methods perform poorly in the absence of a large amount of labeled data, resulting in low accuracy in detecting abnormal devices.
[0007] 2. Inability to fully utilize graph structure information: The devices in the power grid are interconnected through complex circuits to form a graph structure. However, traditional detection methods often do not fully utilize this graph structure information, relying only on the characteristics of the device itself for anomaly detection, ignoring the correlation between devices. Therefore, they find it difficult to capture the global information in the power grid, reducing the detection accuracy.
[0008] 3. Weak model generalization ability: Traditional supervised learning models usually rely on data from specific scenarios for training, and the model's generalization ability is limited. When the configuration or operating conditions of the power grid change, the performance of the model often drops sharply, and it is unable to effectively detect anomalies in new scenarios, thereby reducing the detection accuracy.
[0009] 4. Low computational efficiency: Faced with large-scale data from complex power grids, traditional detection methods often require a large amount of computing resources and it is difficult to achieve efficient anomaly detection in a real-time environment.
[0010] The above shortcomings limit the application of traditional methods in anomaly detection of modern complex power grids, especially in actual application scenarios, they cannot meet the requirements of efficiency and accuracy. Summary of the invention
[0011] In view of the problem of low accuracy in power grid equipment anomaly detection in the prior art, the present invention proposes a power grid equipment anomaly detection device and method based on a self-enhanced graph neural network.
[0012] In order to achieve the above object, the present invention provides the following technical solutions:
[0013] A power grid equipment anomaly detection device based on a self-enhanced graph neural network includes a data preprocessing module, an objective function module, a storage module and an anomaly detection module;
[0014] The data preprocessing module is used to collect power grid data from external power grid data collection equipment, clean the power grid data, extract key information, and send the key information to the storage module for storage;
[0015] The objective function module is used to construct the objective function based on the key information of the power grid data;
[0016] The anomaly detection module is used to complete the anomaly detection of the power grid data according to the objective function, and generate an anomaly detection report and store it in the storage module.
[0017] Preferably, the storage module includes a power grid data storage unit and an abnormality storage unit; the power grid data storage unit is used to store key information output by the data preprocessing module; the abnormality storage unit is used to store an abnormality detection report generated by the abnormality detection module, and the abnormality detection includes different types of abnormalities.
[0018] Preferably, the anomaly detection module includes a parameter initialization unit, an iteration unit and a detection unit;
[0019] Among them, the parameter initialization unit is used to initialize the process parameters involved in the power grid data anomaly detection process;
[0020] An iteration unit, used for iteratively optimizing the objective function according to process parameters;
[0021] The iterative result output unit is used to output the most accurate anomaly detection result according to the optimized objective function.
[0022] The present invention also provides a method for detecting abnormalities in power grid equipment based on a self-enhanced graph neural network, which specifically includes the following steps:
[0023] S1: After cleaning the power grid data, complete the extraction of key information and send the key information to the storage module for storage;
[0024] S2: Construct the objective function based on the key information;
[0025] S3: Initialize process parameters, iteratively optimize the objective function according to the process parameters, and output the anomaly detection results.
[0026] Preferably, in S1, cleaning includes processing missing values, duplicate data, and standardizing the data format; key information includes label information, adjacency matrix, and feature matrix.
[0027] Preferably, in S2, the objective function is:
[0028]
[0029] In formula (1), ε represents the constructed objective function; L represents the total loss, λ||Θ|| 2 represents the regularization term; λ represents the regularization coefficient, which is used to control the regularization strength to avoid overfitting; Θ={W,Θ 1 , Θ 2} represents all trainable model weight parameters, W represents the graph neural network weight matrix, Θ 1 , Θ 2 Respectively represent the trainable parameters of two multilayer perceptrons used to reconstruct the adjacency matrix and the feature matrix; β 1 , β 2 , β 3 represents the balance parameter; Λ represents the total number of observed labels; v i Represents the i-th node of the power grid data; y i represents the true label; represents the predicted label; x i Represents real characteristics; represents the reconstruction feature; α i Represents the actual graph structure; represents the reconstructed graph structure; N represents the size of the particle swarm.
[0030] Preferably, S3 includes:
[0031] S3-1: Initialize the process parameters involved in the power grid data anomaly detection process;
[0032] S3-2: Use the particle swarm optimization algorithm to iteratively optimize the objective function, which includes speed update and position update;
[0033] S3-3: Determine whether the objective function satisfies the training iteration stop condition; if not, continue training; if yes, stop training and return the global optimal solution, that is, output the anomaly detection result.
[0034] Preferably, in S3-1, the process parameters include:
[0035] The process parameters include the graph neural network weight matrix W, the graph neural network bias term b; the size of the particle swarm N; the first acceleration factor c 1 ; The second acceleration factor c 2 ; Random number r 1 、r 2 , the range is [0,1],; the search space range is [h 1 ,h 2 ]; the particle's position [β 2 , β 3 ]; the individual optimal solution pbest of each particle is initialized to the current position of the particle; the global optimal solution gbest of the entire particle swarm is initialized to the initial position of the random particle; the maximum threshold value of dispersion D max , minimum dispersion threshold D min ; Convergence termination threshold τ; Maximum number of iterations T for particle swarm optimization.
[0036] Preferably, in S3-2, the speed update formula is:
[0037]
[0038] In formula (2), represents the velocity of particle i in generation t+1; ω represents the inertia weight, which controls the inertia of the particle velocity; represents the velocity of particle i in generation t; c 1 represents the first acceleration factor, c 2 represents the second acceleration factor; r 1 、r 2 is a random number, ranging from [0,1]; p best,i represents the individual optimal position of particle i; g best,i represents the global optimal position of particle i; represents the position of particle i in generation t.
[0039] Preferably, in S3-2, the location update is:
[0040]
[0041] In formula (3) represents the position of particle i in generation t+1; represents the position of particle i in generation t; represents the velocity of particle i in generation t+1.
[0042] In summary, due to the adoption of the above technical solution, compared with the prior art, the present invention has at least the following beneficial effects:
[0043] The present invention discloses a device and method for detecting power grid anomalies based on a self-enhanced graph neural network, which specifically acts on power grid data. By introducing a double auxiliary matrix and a particle swarm optimization algorithm, the model training process of the traditional graph neural network is improved, so that it can extract effective structural information under sparse label conditions, thereby improving the accuracy of power grid anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Schematic diagram of a power grid equipment anomaly detection device based on a self-enhanced graph neural network according to an exemplary embodiment of the present invention.
[0045] Figure 2 FIG. 4 is a schematic diagram of a storage module according to an exemplary embodiment of the present invention.
[0046] Figure 3 FIG. 4 is a schematic diagram of an abnormality detection module according to an exemplary embodiment of the present invention.
[0047] Figure 4 Schematic diagram of a method for detecting abnormalities in power grid equipment based on a self-enhanced graph neural network according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention is further described in detail below in conjunction with the examples and specific implementation methods. However, this should not be understood as the scope of the above subject matter of the present invention being limited to the following examples, and all technologies realized based on the content of the present invention belong to the scope of the present invention.
[0049] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying 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 orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0050] like Figure 1As shown, the present invention provides a power grid equipment anomaly detection device based on a self-enhanced graph neural network, including a data preprocessing module 110, an objective function module 120, a storage module 130 and an anomaly detection module 140; the input end of the data preprocessing module 110 is connected to an external power grid data acquisition device, the first output end of the data preprocessing module 110 is connected to the first input end of the storage module 130, the second output end of the data preprocessing module 110 is connected to the input end of the objective function module 120, the output end of the objective function module 120 is connected to the input end of the anomaly detection module 140, and the output end of the anomaly detection module 140 is connected to the second input end of the storage module 130.
[0051] In this embodiment, the data preprocessing module 110 is used to collect power grid data from an external power grid data collection device, clean the power grid data, complete key information extraction (including label information, adjacency matrix, and feature matrix), and send the key information to the storage module 130 for storage;
[0052] An objective function module 120 is used to select objective functions with different coefficients according to key information of power grid data;
[0053] The storage module 130 is used to store the key information output by the data preprocessing module 110 and the anomaly detection report generated by the anomaly detection module 140;
[0054] like Figure 2 As shown, the storage module 130 includes a power grid data storage unit 131 and an abnormality storage unit 132; the power grid data storage unit 131 is used to store key information output by the data preprocessing module 110; the abnormality storage unit 132 is used to store the abnormality detection report generated by the abnormality detection module 140, and the abnormality detection includes different types of abnormalities.
[0055] The anomaly detection module 140 is used to complete anomaly detection of power grid data in combination with a self-enhanced graph neural network, and generate an anomaly detection report to be stored in the anomaly storage unit 132 in the storage module 130.
[0056] like Figure 3 As shown, the anomaly detection module 140 includes a parameter initialization unit 141, an iteration unit 142 and a detection unit 143; the parameter initialization unit 141 is used to initialize the process parameters involved in the power grid data anomaly detection process; the iteration unit 142 is used to detect different abnormal states of each node device in the power grid data according to the parameters initialized by the parameter initialization unit 141; the iteration result output unit 143 outputs the most accurate anomaly detection result and stores it in the anomaly storage unit 132 in the storage module.
[0057] like Figure 4As shown, based on the above-mentioned power grid equipment anomaly detection device based on self-enhanced graph neural network, the present invention also provides a power grid equipment anomaly detection method based on self-enhanced graph neural network, which specifically includes the following steps:
[0058] S1: Receive the grid data collected from the external grid data collection equipment, then clean the grid data, complete the key information extraction, and send the key information to the storage module for storage.
[0059] In this embodiment, cleaning includes processing missing values, duplicate data, standardizing the data format, etc., so as to extract key information, including label information, adjacency matrix, and feature matrix. Data cleaning and extraction belong to the prior art, so it will not be elaborated here.
[0060] S2: Construct the objective function based on the key information.
[0061] In this embodiment, in order to embed unsupervised learning in an end-to-end manner, it is considered to use unsupervised learning guided loss and intrinsic semi-supervised learning guided loss to jointly train the non-data augmented graph neural network node classification model, and use the feature matrix obtained by preprocessing Adjacency Matrix And the true label y i Perform cross entropy calculation on the reconstructed features and predicted values; establish the corresponding loss function as the optimization target; use regularization to constrain the optimization process.
[0062]
[0063] In formula (1), ε represents the constructed objective function; L represents the total loss, λ||Θ|| 2 represents the regularization term; λ represents the regularization coefficient, which is used to control the regularization strength to avoid overfitting; Θ={W,Θ 1 , Θ 2} represents all trainable model weight parameters, W represents the graph neural network weight matrix, Θ 1 , Θ 2 They represent the trainable parameters of two multilayer perceptrons that are used to reconstruct the adjacency matrix A and the feature matrix X respectively; β 1 , β 2 , β 3 represents the balance parameter; Λ represents the total number of observed tags, where the tags are the operating status or communication status of the electrical equipment, such as offline or communication failure, shutdown, normal operation, failure, etc.; v i Represents the i-th node of the power grid data; y i represents the true label; represents the predicted label; x iRepresents real characteristics, based on data collection and data cleaning preferences of different devices, including electrical characteristics, environmental characteristics, location characteristics, communication characteristics, etc. represents the reconstruction feature; α i Represents the actual graph structure; Represents the reconstructed graph structure; N represents the size of the particle swarm, which is used to optimize the equilibrium parameter [β 2 , β 3 ], Particle swarm optimization is a commonly used parameter optimization method in the industry, which will not be repeated here.
[0064] In this embodiment, the reconstruction feature The calculation method is:
[0065] The graph neural network model consists of multiple layers, each of which takes the output of the previous layer as input. Its core operation is to update the embedding of nodes by propagating neighbor information. i For example, this update process can be expressed as:
[0066]
[0067] Where N(i) represents the node v i The set of neighboring nodes of They are v i Embeddings at the lth and (l-1)th layers. Note that the initial embeddings of all nodes are set to node features, i.e., H0 = X. After stacking L layers, the node embedding HL is used for the downstream task, i.e., semi-supervised node classification, as follows:
[0068] Y=Softmax(H (L) ),
[0069] Among them, Y is the label matrix, and its single element yi,k represents the predicted node v i The probability of belonging to the kth class. In order to better understand the principle of the non-data augmented graph neural network node classification model, we use an L-layer graph neural network as an example to introduce our method. As shown below, the graph neural network implements the final embedding layer:
[0070]
[0071] in, is a symmetric normalized adjacency matrix, and W is a trainable weight matrix. In order to better utilize the embedding layer learned from sparsely labeled nodes, an unsupervised learning function F(·) is proposed, which learns how to reconstruct node features and graph structure as shown below:
[0072]
[0073] where F(·) represents a two-layer multilayer perceptron (MLP), Θ1 and Θ2 are the trainable parameters of these two-layer MLPs, represents the reconstructed feature matrix, represents the reconstructed graph structure matrix (i.e., adjacency matrix); therefore Represents reconstruction features; Represents the reconstructed graph structure.
[0074] That is, HL is embedded in the node, and the reconstructed adjacency matrix and the reconstructed feature matrix are obtained respectively through two two-layer perceptrons.
[0075] S3: Initialize process parameters, iteratively optimize the objective function according to the process parameters, output anomaly detection results, and form an anomaly detection report.
[0076] S3-1: Initialize process parameters involved in the power grid data anomaly detection process.
[0077] In this embodiment, the process parameters include the graph neural network weight matrix W, the graph neural network bias term b; the size of the particle swarm N, which determines the number of particles involved in the optimization; the first acceleration factor c 1 , which is the cognitive acceleration factor, the speed at which the particle approaches its historical best position; the second acceleration factor c 2 , which is the social acceleration factor, the speed at which the particle approaches the global optimal position; the random number r 1 、r 2 , the range is [0,1], dynamically generated in each iteration, used to update the speed formula; the search space range is [h 1 ,h 2 ], define the upper and lower bounds of the particle position to ensure that the optimization variable is within the range defined by the problem; the particle position [β 2 , β 3 ], that is, the balance parameter, is a two-dimensional vector, initialized to a random value in the problem search space; the individual optimal solution pbest of each particle is initialized to the current position of the particle; the global optimal solution gbest of the entire particle swarm is initialized to the initial position of the random particle; the maximum threshold of dispersion D max , minimum dispersion threshold D min ; Convergence termination threshold τ; Maximum number of iterations T for particle swarm optimization.
[0078] S3-2: Use the particle swarm optimization algorithm to iteratively optimize the objective function ε, where the positions of the particles represent the coefficients β of the two intrinsic semi-supervised learning-oriented loss functions 2 With β 3, the particle updates its speed and position by tracking its best historical position (individual best position pbest) and the best position in the group (global best position gbest), thereby gradually approaching the optimal solution to the problem to minimize the value of the objective function ε. The speed update formula of the training iteration is as follows:
[0079]
[0080] In formula (2), represents the velocity of particle i in generation t+1; ω represents the inertia weight, which controls the inertia of the particle velocity; represents the velocity of particle i in generation t; c 1 、c 2 represents the learning rate; r 1 、r 2 is a random number, ranging from [0,1]; p best,i represents the individual optimal position of particle i; g best,i represents the global optimal position of particle i; represents the position of particle i in generation t.
[0081] After completing the velocity iteration, start iterating the particle position. The update formula is as follows:
[0082]
[0083] In formula (3) represents the position of particle i in generation t+1; represents the position of particle i in generation t; represents the velocity of particle i in generation t+1.
[0084] S3-3: Determine whether the training iteration stop condition is met (i.e., whether it converges). That is, if the maximum number of iterations is reached or the verification performance has not improved in several consecutive cycles, the model is considered to have reached the optimal state, training stops, returns the global optimal solution, saves and loads the corresponding model weights as the final model, completes the power grid equipment anomaly detection, outputs the anomaly detection results, forms an anomaly detection report, and stores it in the anomaly storage unit.
[0085] In this step, 1 is accumulated on the detection iteration control variable T, and then it is determined whether the extraction iteration control variable T is greater than the extraction iteration upper limit;
[0086] In this step, the basis for judging whether ε has converged is whether the absolute value of the difference between the value of ε before the start of this iteration and ε before the start of the previous iteration is less than the convergence judgment threshold τ; if it is less than, it is judged to have converged, otherwise, it is judged to have not converged.
[0087] In order to verify the performance of the above-mentioned device and method for detecting power grid anomalies based on self-enhanced graph neural network, we installed the device on a server (configuration: AMD Ryzen 73700x, 4.0GHz processor, 1TB memory) and ran simulation experiments for example analysis. In the example analysis, the power grid data used comes from the power grid equipment data of a factory. The example analysis uses the harmonic mean F1-Score of precision and recall as the evaluation index of the accuracy of power grid equipment anomaly detection. The closer the F1-Score is to 1, the better the model is in balancing precision and recall, and it is suitable for use in tasks with unbalanced categories.
[0088] Figure 3 This is a comparison of the F1-Score of abnormality detection of power grid equipment before and after the application of the embodiment of the present invention. Figure 3 After applying the embodiment of the present invention, when performing abnormality detection of power grid equipment, the model training process of the traditional graph neural network is improved by introducing a dual auxiliary matrix and a particle swarm optimization algorithm, so that it can extract effective structural information under label sparse conditions, thereby improving the accuracy of power grid abnormality detection. The first case represents the abnormality detection result obtained by using only the graph convolutional neural network, and the second case represents the adaptive selection of the best abnormality detection result after applying this embodiment of the invention.
[0089] It can be seen from the above technical solutions that the present invention specifically acts on power grid data, especially for the case of sparse labels, fully utilizes graph structure information, grasps the key points, and can solve the problem of abnormal detection of power grid equipment.
[0090] The present invention also provides an electronic device, comprising a processor, wherein the processor is used to run a computer program stored in a memory so that the electronic device implements the steps of the power grid equipment anomaly detection method based on a self-enhanced graph neural network in the above-mentioned embodiment.
[0091] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed on a processor, the steps of the method for detecting anomalies of power grid equipment based on a self-enhanced graph neural network in the above-mentioned embodiment are implemented.
[0092] A computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer readable media may include at least: any entity or device capable of carrying computer program code to an electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer readable media cannot be electric carrier signals and telecommunication signals.
[0093] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A power grid equipment anomaly detection device based on a self-enhanced graph neural network, characterized in that: It includes data preprocessing module, objective function module, storage module and anomaly detection module; The data preprocessing module is used to collect power grid data from external power grid data collection equipment, clean the power grid data, extract key information, and send the key information to the storage module for storage; The objective function module is used to construct the objective function based on the key information of the power grid data; The anomaly detection module is used to complete the anomaly detection of the power grid data according to the objective function, and generate an anomaly detection report and store it in the storage module.
2. The power grid equipment anomaly detection device based on self-enhanced graph neural network according to claim 1, characterized in that: The storage module includes a power grid data storage unit and an abnormality storage unit; the power grid data storage unit is used to store key information output by the data preprocessing module; The anomaly storage unit is used to store an anomaly detection report generated by the anomaly detection module, and the anomaly detection includes different types of anomalies.
3. The power grid equipment anomaly detection device based on self-enhanced graph neural network according to claim 1, characterized in that: The anomaly detection module includes a parameter initialization unit, an iteration unit and a detection unit; Among them, the parameter initialization unit is used to initialize the process parameters involved in the power grid data anomaly detection process; An iteration unit, used for iteratively optimizing the objective function according to process parameters; The iterative result output unit is used to output the most accurate anomaly detection result according to the optimized objective function.
4. A method for detecting abnormalities in power grid equipment based on a self-enhanced graph neural network according to any one of claims 1 to 3, characterized in that: The specific steps include: S1: After cleaning the power grid data, complete the extraction of key information and send the key information to the storage module for storage; S2: Construct the objective function based on the key information; S3: Initialize process parameters, iteratively optimize the objective function according to the process parameters, and output the anomaly detection results.
5. The method for detecting abnormality of power grid equipment based on self-enhanced graph neural network according to claim 4, characterized in that: In S1, cleaning includes processing missing values, duplicate data, and standardizing the data format; key information includes label information, adjacency matrix, and feature matrix.
6. The method for detecting abnormality of power grid equipment based on self-enhanced graph neural network according to claim 4, characterized in that: In S2, the objective function is: In formula (1), ε represents the constructed objective function; L represents the total loss, λ||Θ|| 2 represents the regularization term; λ represents the regularization coefficient, which is used to control the regularization strength to avoid overfitting; Θ={W, Θ1, Θ2} represents all trainable model weight parameters, W represents the graph neural network weight matrix, Θ1 and Θ2 represent two trainable parameters of the multilayer perceptron used to reconstruct the adjacency matrix and the feature matrix respectively; β1, β2, and β3 represent balance parameters; Λ represents the total number of observed labels; v i Represents the i-th node of the power grid data; y i represents the true label; represents the predicted label; x i Represents real characteristics; represents the reconstruction feature; α i Represents the actual graph structure; represents the reconstructed graph structure; N represents the size of the particle swarm.
7. The method for detecting abnormality of power grid equipment based on self-enhanced graph neural network according to claim 4, characterized in that: The S3 includes: S3-1: Initialize the process parameters involved in the power grid data anomaly detection process; S3-2: Use the particle swarm optimization algorithm to iteratively optimize the objective function, which includes speed update and position update; S3-3: Determine whether the objective function meets the training iteration stop condition; if not, continue training; if yes, stop training and return the global optimal solution, that is, output the anomaly detection result.
8. The method for detecting abnormality of power grid equipment based on self-enhanced graph neural network according to claim 7, characterized in that: In S3-1, the process parameters include: The process parameters include the graph neural network weight matrix W, the graph neural network bias term b; the size of the particle swarm N; the first acceleration factor c1; the second acceleration factor c2; random numbers r1, r2, ranging from [0,1]; the search space range [h1, h2]; the position of the particle [β2, β3]; the individual optimal solution pbest of each particle, initialized to the current position of the particle; the global optimal solution gbest of the entire particle swarm, initialized to the initial position of the random particle; the maximum threshold of dispersion D max , minimum dispersion threshold D min ; Convergence termination threshold τ; Maximum number of iterations T for particle swarm optimization.
9. The method for detecting abnormality of power grid equipment based on self-enhanced graph neural network according to claim 7, characterized in that: In S3-2, the speed update formula is: In formula (2), represents the velocity of particle i in generation t+1; ω represents the inertia weight, which controls the inertia of the particle velocity; represents the speed of particle i in generation t; c1 represents the first acceleration factor, c2 represents the second acceleration factor; r1 and r2 are random numbers with a value range of [0,1]; p best,i represents the individual optimal position of particle i; g best,i represents the global optimal position of particle i; represents the position of particle i in generation t.
10. The method for detecting abnormality of power grid equipment based on self-enhanced graph neural network according to claim 7, characterized in that: In S3-2, the position is updated as follows: In formula (3) represents the position of particle i in generation t+1; represents the position of particle i in generation t; represents the velocity of particle i in generation t+1.