Virtual power plant-oriented cloud edge collaborative anomaly detection method, system and equipment
By using the local anomaly detection model trained by gene expression programming in the cloud-edge collaborative system of the virtual power plant for fusion processing, a global anomaly detection model is generated, which solves the problem that data transmission abnormalities in the virtual power plant affect energy management and improves detection accuracy and data security.
Patent Information
- Application Number
- CN202411092091.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-17
AI Technical Summary
In the cloud-side collaborative processing system, virtual power plants have abnormal data during data transmission due to the diversity of distributed energy resources and the uncertainty of communication networks, which affects the accuracy and reliability of energy management and decision-making.
The cloud-edge collaborative abnormality detection method for virtual power plants is adopted. The global abnormality detection model is generated by fusion processing based on the local abnormality detection model on the cloud server, and real-time data detection is performed on the edge device, and local data is generated by combining gene expression programming training. Anomaly detection model reduces data transmission pressure and improves detection accuracy.
It improves the accuracy and reliability of energy management and decision-making in virtual power plants, reduces network congestion and cloud computing pressure, enhances data security, shortens the transmission path of data to be detected, and reduces the probability of abnormal data generation.
Smart Images

Figure CN119149860A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining technology, and in particular to a cloud-edge collaborative anomaly detection method, system and device for virtual power plants. Background Art
[0002] With the advancement of energy transformation and the rapid development of renewable energy, virtual power plants, as an innovative energy management model, have attracted widespread attention and discussion. A virtual power plant is a virtual aggregate formed by integrating a large number of distributed energy resources. These distributed resources include solar photovoltaic systems, wind turbines, battery energy storage systems, and so on. Virtual power plants centrally manage and coordinate these decentralized energy resources so that they can be operated and controlled like a centralized power plant.
[0003] Virtual power plants are generally dispatched and managed through cloud-edge collaborative processing systems, that is, the scheduling of virtual power plant systems is associated through the collaboration between cloud servers and edge devices. Among them, cloud servers are responsible for centralized energy management and decision-making, including monitoring, centralized control, data analysis and optimized scheduling of energy resources. Edge devices are responsible for actual energy production, storage and consumption, and remote monitoring and control are achieved through communication with cloud platforms. However, in the cloud-edge collaborative processing system of virtual power plants, due to the diversity and dispersion of distributed energy resources, as well as the uncertainty of communication networks and sensor devices, there will be abnormal data in the data transmission process, such as data errors, transmission delays, data loss or tampering, which will affect the accuracy and reliability of virtual power plant energy management and decision-making. Summary of the invention
[0004] In order to overcome the problem that abnormal data generated by the above-mentioned virtual power plant system during data transmission affects the accuracy and reliability of energy management and decision-making, the present invention provides a cloud-edge collaborative anomaly detection method, system and device for virtual power plants.
[0005] On the one hand, the present invention provides a cloud-edge collaborative anomaly detection method for a virtual power plant, the method comprising:
[0006] Anomaly detection is performed on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server;
[0007] Sending the detection results to the monitoring devices associated with each distributed resource corresponding to the edge device;
[0008] The global anomaly detection model is obtained by fusing the local anomaly detection models trained by the cloud server on each edge device.
[0009] Optionally, before performing anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server, the method further includes:
[0010] Receive historical operation data of each distributed resource associated with the edge device in the virtual power plant;
[0011] Generate a local anomaly detection model based on the historical operation data and gene expression programming training;
[0012] Upload the trained local anomaly detection model to the cloud server;
[0013] Among them, each edge device trains a local anomaly detection model.
[0014] Optionally, before performing anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server, the method further includes:
[0015] Receive real-time operating data of each distributed resource in the virtual power plant sent by a data acquisition device, wherein the real-time operating data includes power consumption data and status data of each distributed resource in the virtual power plant collected based on intelligent sensors.
[0016] Optionally, the distributed resources include photovoltaic resource nodes, wind power resource nodes, energy storage equipment, load nodes and charging piles.
[0017] Optionally, before generating a local anomaly detection model based on the historical operation data and gene expression programming training, the method further includes:
[0018] The historical operation data is cleaned and normalized to obtain pre-processed data.
[0019] Optionally, the generating a local anomaly detection model based on the historical operation data and gene expression programming training includes:
[0020] Using the preprocessed data as training samples, generating an initial population including a plurality of individuals, each of the individuals being used to establish an association relationship between the training sample and a corresponding abnormality recognition result;
[0021] Determining the fitness of each individual based on the difference between the abnormality recognition result of each individual for each training sample and the true label of the training sample;
[0022] Filter out the best individual of the current population based on the fitness of each individual;
[0023] Performing gene evolution operation on the optimal individuals to obtain a new population;
[0024] The determination of the fitness of the individual, the screening of the optimal individual and the gene evolution operation are repeated until the iteration termination condition is reached, and the optimal individual of the current population obtained is the local anomaly detection model generated by training.
[0025] In another aspect, the present invention provides an edge device, comprising:
[0026] An anomaly detection module, used to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server;
[0027] A sending module, used to send the detection result to the monitoring device associated with each distributed resource corresponding to the edge device;
[0028] The global anomaly detection model is obtained by fusing the local anomaly detection models trained by the cloud server on each edge device.
[0029] Optionally, the edge device further includes:
[0030] A receiving module, used to receive historical operation data of each distributed resource associated with the edge device in the virtual power plant;
[0031] A training module, used for generating a local anomaly detection model based on the historical operation data and gene expression programming training, and uploading the trained local anomaly detection model to a cloud server;
[0032] Among them, each edge device trains a local anomaly detection model.
[0033] Optionally, the receiving module is further used for:
[0034] Receive real-time operating data of each distributed resource in the virtual power plant sent by a data acquisition device, wherein the real-time operating data includes power consumption data and status data of each distributed resource in the virtual power plant collected based on intelligent sensors.
[0035] Optionally, the edge device further includes:
[0036] The preprocessing module is used to perform data cleaning and normalization processing on the historical operation data to obtain preprocessed data.
[0037] Optionally, the training module includes:
[0038] An initialization submodule, used to use the preprocessed data as training samples to generate an initial population including a plurality of individuals, each of which is used to establish an association relationship between the training sample and a corresponding abnormality recognition result;
[0039] A fitness determination submodule, which determines the fitness of each individual based on the difference between the abnormality recognition result of each individual for each training sample and the true label of the training sample;
[0040] A screening module, used for screening out the best individual of the current population based on the fitness of each individual;
[0041] An evolution submodule, used for performing gene evolution operation on the optimal individuals to obtain a new population;
[0042] The iterative submodule is used to repeat the fitness determination of the individual, the screening of the optimal individual and the gene evolution operation until the iteration termination condition is reached, and the optimal individual of the current population obtained is the local anomaly detection model generated by training. On the other hand, the present invention provides a cloud-edge collaborative anomaly detection method for virtual power plants, the method comprising:
[0043] Receive the local anomaly detection model trained by each edge device;
[0044] The local anomaly detection models trained on each edge device are nonlinearly combined to obtain a global anomaly detection model;
[0045] Sending the global anomaly detection model to each edge device;
[0046] Among them, the global anomaly detection model is used by each edge device to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant.
[0047] Optionally, one edge device is correspondingly trained with one local anomaly detection model, and the nonlinear combination of the local anomaly detection models trained on the edge devices is performed to obtain a global anomaly detection model, including:
[0048] Constructing a correlation relationship between the global anomaly detection model and each of the local anomaly detection models;
[0049] Based on the association relationship, an objective function is constructed with the goal of minimizing the detection error of the global anomaly detection model;
[0050] Receiving target training samples sent by each of the edge devices;
[0051] The objective function is solved based on the target training sample and the least square method to obtain the fusion parameters of the association relationship, and then the global anomaly detection model is obtained.
[0052] Optionally, the specific expression of the global anomaly detection model is:
[0053]
[0054] In the formula, f(X) represents the global anomaly detection model, X represents the input data of the global anomaly detection model, and α i represents the fusion parameter with the i-th local anomaly detection model, i represents the sequence number of the local anomaly detection model, m represents the number of local anomaly detection models, and f i (X i ) represents the i-th local anomaly detection model, X i Represents the input data of the i-th local anomaly detection model.
[0055] Optionally, before sending the global anomaly detection model to each edge device, the method further includes:
[0056] Receive test samples sent by each edge device, where the test samples are obtained by dividing the preprocessed data into training samples and test samples, and the preprocessed data are obtained by performing data cleaning and normalization processing on the historical operation data;
[0057] Performing a performance test on the global anomaly detection model based on the test sample to obtain a performance indicator of the global anomaly detection model;
[0058] If the performance indicator meets the preset detection requirements, the global anomaly detection model is sent to each edge device;
[0059] If the performance indicator does not meet the preset detection requirements, a retraining instruction is sent to each of the edge devices, and the retraining instruction is used to instruct each edge device to retrain the corresponding local anomaly detection model.
[0060] In another aspect, the present invention provides a cloud server, comprising:
[0061] A receiving module, used to receive local anomaly detection models trained by each edge device;
[0062] The fusion module is used to nonlinearly combine the local anomaly detection models trained on each edge device to obtain a global anomaly detection model;
[0063] A sending module, used to send the global anomaly detection model to each edge device;
[0064] Among them, the global anomaly detection model is used by each edge device to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant.
[0065] Optionally, one edge device trains one local anomaly detection model correspondingly, and the fusion module includes:
[0066] A relational expression construction submodule, used to construct an association relational expression between the global anomaly detection model and each of the local anomaly detection models;
[0067] An objective function construction submodule, for constructing an objective function based on the association relationship with the goal of minimizing the detection error of the global anomaly detection model;
[0068] A receiving submodule, used to receive target training samples sent by each of the edge devices;
[0069] The solving submodule is used to solve the objective function based on the target training sample and the least square method to obtain the fusion parameters of the association relationship, and then obtain the global anomaly detection model.
[0070] Optionally, the specific expression of the global anomaly detection model is:
[0071]
[0072] In the formula, f(X) represents the global anomaly detection model, X represents the input data of the global anomaly detection model, and α i represents the fusion parameter with the i-th local anomaly detection model, i represents the sequence number of the local anomaly detection model, m represents the number of local anomaly detection models, and f i (X i ) represents the i-th local anomaly detection model, X i Represents the input data of the i-th local anomaly detection model.
[0073] Optionally, the receiving submodule is further used for:
[0074] Receive test samples sent by each edge device, where the test samples are obtained by dividing the preprocessed data into training samples and test samples, and the preprocessed data are obtained by performing data cleaning and normalization processing on the historical operation data;
[0075] The cloud server further includes a testing module, which is used to: perform a performance test on the global anomaly detection model based on the test sample to obtain a performance index of the global anomaly detection model;
[0076] The sending module is also used for:
[0077] If the performance indicator meets the preset detection requirements, the global anomaly detection model is sent to each edge device;
[0078] If the performance indicator does not meet the preset detection requirements, a retraining instruction is sent to each of the edge devices, and the retraining instruction is used to instruct each edge device to retrain the corresponding local anomaly detection model.
[0079] On the other hand, the present invention provides an anomaly detection system, comprising: an edge device as described in any of the foregoing items and a cloud server as described in any of the foregoing items.
[0080] Compared with the prior art, the present invention has the following beneficial effects:
[0081] The present invention provides a cloud-edge collaborative anomaly detection method for virtual power plants. By executing the training and generation of a local anomaly detection model in parallel on each edge device, and performing anomaly detection on each edge device based on a global anomaly detection model issued by a cloud service, on the one hand, reducing the cloud computing pressure and detection delay, it can fully utilize the computing power of the cloud server and the data collection and processing capabilities of the edge device, reduce the probability of network congestion caused by the need to transmit all data to the cloud, and reduce the cloud computing pressure and detection delay; on the other hand, it can shorten the transmission path of the data to be detected and reduce the probability of generating abnormal data; at the same time, it can avoid the risk of data leakage caused by the transmission of data from each distributed resource node to the cloud, and improve data security in the anomaly detection process. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 It is one of the flow diagrams of a cloud-edge collaborative anomaly detection method for a virtual power plant of the present invention;
[0083] Figure 2 It is a schematic diagram of the processing process based on the GEP algorithm of the present invention;
[0084] Figure 3 The second flowchart of a cloud-edge collaborative anomaly detection method for a virtual power plant of the present invention;
[0085] Figure 4 The third flowchart of a cloud-edge collaborative anomaly detection method for a virtual power plant of the present invention;
[0086] Figure 5 This is a comparison result diagram of the accuracy of the method of the present invention, genetic programming and decision tree algorithm on the training data set;
[0087] Figure 6 This is a comparison result diagram of the accuracy of the method of the present invention, genetic programming and decision tree algorithm on the test data set;
[0088] Figure 7 It is a comparison result diagram of the false detection rate of the method of the present invention, genetic programming and decision tree algorithm on the training data set;
[0089] Figure 8 It is a comparison result diagram of the false detection rates of the method of the present invention, genetic programming and decision tree algorithm on the test data set;
[0090] Fig. 9 It is a comparison result diagram of missed detection rate of the method of the present invention, genetic programming and decision tree algorithm on the training data set;
[0091] Fig.10 It is a comparison result diagram of missed detection rate of the method of the present invention, genetic programming and decision tree algorithm on the test data set;
[0092] Fig.11 This is a structural schematic diagram of a cloud-edge collaborative anomaly detection system for virtual power plants according to the present invention. DETAILED DESCRIPTION
[0093] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0094] Embodiment 1:
[0095] The present invention provides a cloud-edge collaborative anomaly detection method for virtual power plants, such as Figure 1 As shown, it is applied to edge devices and includes the following steps:
[0096] Step S110, performing anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server;
[0097] Step S120, sending the detection result to the monitoring device associated with each distributed resource corresponding to the edge device;
[0098] The global anomaly detection model is obtained by fusing the local anomaly detection models trained by the cloud server on each edge device.
[0099] In this example implementation, the distributed resources may include various types of energy nodes such as photovoltaic resource nodes, wind power resource nodes, energy storage devices, and load nodes. The monitoring device is used to monitor the operational safety of each distributed resource. When an operational abnormality occurs, an alarm may be issued or abnormal data may be sent to the system operation and maintenance personnel, etc., so as to achieve timely response to abnormal situations. The local abnormality detection model is trained in parallel on multiple edge devices in a distributed manner, and the local abnormality detection model generated by the training is transmitted to the cloud server. Each edge device performs abnormality detection based on the global abnormality detection model obtained by fusion processing according to each local abnormality detection model received by the cloud server. The abnormal data in the virtual power plant system can be identified in time at the edge, and the quality and credibility of the energy data of the virtual power plant can be improved, thereby improving the accuracy and reliability of the energy management and decision-making of the virtual power plant; through the joint model training of the edge and the cloud, the detection accuracy and reliability of the trained model can be improved, while the computing pressure and detection delay of the cloud can be reduced. In addition, the probability of abnormal data caused by the transmission of all data to the cloud is reduced. The detection results are sent to the monitoring devices associated with each distributed resource corresponding to the edge device, so that a rapid response to abnormal results can be achieved and the system security can be improved.
[0100] In an example implementation, before performing anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server in step S110, the method further includes:
[0101] Receive historical operation data of each distributed resource associated with the edge device in the virtual power plant;
[0102] Generate a local anomaly detection model based on the historical operation data and gene expression programming training;
[0103] Upload the trained local anomaly detection model to the cloud server;
[0104] Among them, each edge device trains a local anomaly detection model.
[0105] In this example implementation, the historical operation data may be operation data corresponding to a preset historical time period, such as operation data for the past month, and the operation data may include flow state data and power consumption data of each distributed resource. Gene Expression Programming (GEP) is an adaptive evolutionary algorithm based on the structure and function of biological genes, which combines the advantages of genetic algorithms and genetic programming. Using this algorithm to construct a local anomaly detection model is to extract the local anomaly detection model from a set of sample data sets D = {X1, X2, ..., X n |Y} to dig out the functional relationship Y=f(X1,X2,...,Xn ), X1 represents the first sample, X2 represents the second sample, X n Represents the nth sample, Y represents the abnormal probability of the sample data set D, and f represents the functional relationship between the independent variable X and the dependent variable Y. The present invention performs distributed and parallel training of local anomaly detection models on multiple edge devices, and generates local anomaly detection models based on historical operation data and gene expression programming training, thereby improving the detection accuracy of abnormal data of each distributed resource corresponding to the edge device, and improving the accuracy and reliability of energy management and decision-making of the virtual power plant. In an example implementation, the historical operation data and real-time operation data in the aforementioned example can be obtained by a data acquisition device. Exemplarily, before performing anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server in step S110, the method also includes:
[0106] Receive real-time operating data of each distributed resource in the virtual power plant sent by a data acquisition device, wherein the real-time operating data includes power consumption data and status data of each distributed resource in the virtual power plant collected based on intelligent sensors.
[0107] In this example implementation, the data acquisition device is a key device in the power monitoring system under the virtual power plant that is responsible for collecting operating data from various power equipment. Data acquisition equipment is usually deployed in power equipment or systems such as new energy, energy storage equipment, load terminals and charging piles. The data acquisition equipment obtains the operating data of all distributed resources connected to it (such as photovoltaic resource nodes, wind power resource nodes, energy storage equipment and load nodes) through safe and reliable communication technology. The data acquisition equipment mainly includes smart meters, electricity consumption information sampling terminals and photovoltaic / wind power status data acquisition terminals. Smart meters are advanced equipment for monitoring energy consumption under virtual power plants. They are an upgraded form of traditional electricity meters and have remote reading and real-time data tracking capabilities. This type of meter can provide detailed information about energy consumption and has the function of seamlessly connecting with smart grid computing technology, which can help manage and integrate a large number of dispersed distributed energy resources. The power consumption information sampling terminal is an energy efficiency management device, which is mainly used to collect, store and transmit power usage data. The power consumption information sampling terminal is usually installed at the user end and can monitor the operation status of the power system in real time, including power, voltage, current, frequency and other power quality indicators, and has a certain data storage capacity. While integrating the Internet of Things technology, it can not only store historical power consumption data, but also provide edge devices with subsequent abnormal analysis and detection calculations. The photovoltaic / wind power status data acquisition terminal is a system specially designed to monitor and collect production and performance data of solar power generation and wind power generation facilities. As an important part of the renewable energy system, it enables the energy management system to monitor the production process in real time, analyze data, and finally transmit it to the edge device for abnormal data detection through optimized operations.
[0108] As the input of the model, the data sample will inevitably affect the output of the model, so good data preprocessing is crucial to improving the accuracy of anomaly detection. Therefore, in some implementations, data preprocessing is required after collecting historical operation data or real-time operation data, and the method further includes:
[0109] The data received from the data acquisition device is cleaned and normalized to obtain pre-processed data.
[0110] In this example implementation, data cleaning includes recording missing values, removing a few extreme data and negative data, and removing duplicate values to ensure that there is no redundant or duplicate data in the data set. After data cleaning, in order to ensure the accuracy and consistency of the data set and facilitate subsequent processing and analysis, data normalization is performed. For example, in a complex power network communication environment, due to the large and complex data, it is generally necessary to perform linear normalization on the data, normalizing all samples to a number between 0 and 1. The specific linear normalization formula is:
[0111]
[0112] Where: x(i) represents the i-th sample value, g(i) represents the normalized result of the i-th sample, min(x) represents the minimum value in the sample data, and max(x) represents the maximum value in the sample data.
[0113] In some example implementations, generating a local anomaly detection model based on the historical operation data and gene expression programming training includes:
[0114] Using the preprocessed data as training samples, generating an initial population including a plurality of individuals, each of the individuals being used to establish an association relationship between the training sample and a corresponding abnormality recognition result;
[0115] Determining the fitness of each of the individuals based on the difference between the abnormality recognition result of each of the individuals for each of the training samples and the true label of the training samples;
[0116] Filter out the best individual of the current population based on the fitness of each individual;
[0117] Performing gene evolution operation on the optimal individuals to obtain a new population;
[0118] The determination of the fitness of the individual, the screening of the optimal individual and the gene evolution operation are repeated until the iteration termination condition is reached, and the optimal individual of the current population obtained is the local anomaly detection model generated by training.
[0119] In this example implementation, in order to better perform cloud-edge collaborative distributed anomaly data detection in the cloud server, this example only processes homogeneous data sets at the edge. Specifically, first construct an anomaly detection data set: After the data preprocessing is completed, the preprocessed data is used as a training sample. Let the sample data set X = {X1, X2, ..., X n |A}, where {X1,X2,...,X n} is the feature of n sample data sets, n is the number of samples, A represents the abnormal label of the sample data set, then the sample data set X is called an abnormal data set. Secondly, function mining based on GEP: GEP is used to find the mathematical model or function that can best fit the data. For example, function mining based on GEP is expressed as:
[0120] f←G((P op (N),F,S(P s ),M(P m ),C(P c ),T(P t ))|X)
[0121] Among them, G represents the GEP algorithm, P op (N) represents the GEP population of size N, F is the fitness function of the GEP algorithm, S(P s ) represents the probability P s The selection operation, M(P m ) represents the probability P m The mutation operation, C(P c ) represents the probability P c The reorganization operation, T(P t ) represents the probability P t The insertion operation of , f represents the mathematical model or functional relationship to be mined.
[0122] For each edge device, the mining of the local anomaly detection model based on GEP is performed. When the termination condition is met, the evolution process ends and the corresponding mining result (local anomaly detection model) is obtained. Finally, m local anomaly detection models f for m edge devices are obtained. i (X i ), m represents the number of edge devices (edge nodes). Let E = (E1, E2, ..., E m ) represents the edge device set, E1, E2, ..., E m They represent different edge devices respectively. represents the abnormal data set on the i,i∈[1,m]th edge node, represents different sample data in the abnormal data set on the i-th edge node, A={1,0} represents the label, 1 represents the abnormal label, and 0 represents the normal label, then f i (X i ) is the local anomaly detection model of the i-th edge device, if f i (X i ) is closer to 1, indicating that the current data on the i-th edge device is abnormal data, otherwise it is considered normal data.
[0123] For example, Figure 2 As shown, in each edge device, the construction of a local anomaly detection model based on GEP may include the following processes:
[0124] (1) Randomly select corresponding elements from the function set and the terminator set, and combine the selected elements into an expression tree to generate initial population individuals, each of which is used to describe the corresponding anomaly detection model.
[0125] For each edge device, the function set is:
[0126] FunctionSet = {P i ,Q i,P=V×I×cos(φ),Q=V×I×sin(φ),
[0127]
[0128] The set of terminators is represented as:
[0129] TerminalSet={V,I,P,Q,S,L,G,t,φ,R,G,B,PF}
[0130] Among them: FunctionSet represents the function set, P i ,Q i are the active power and reactive power of distributed resource node i, respectively. P = V × I × cos (φ) represents the active power calculation formula, Q = V × I × sin (φ) represents the reactive power calculation formula, and S = V × I represents the apparent power calculation formula. The impedance calculation formula is: is the conductivity calculation formula, E=P×t is the energy calculation formula, is the efficiency calculation formula, P 输出 Indicates output power, P 输入 represents input power, PF=cos(φ) is the power factor calculation formula; TerminalSet represents the terminal set, V, I, P, Q, S, L, G, t, φ, R, G, B, PF represent the voltage, current, active power, reactive power, apparent power, load, power generation, time, phase angle, resistance, conductance, susceptance, and power factor corresponding to each distributed resource respectively.
[0131] (2) In order to better mine the local anomaly detection model on the edge device, the fitness of each individual in the population is evaluated by a fitness function based on absolute error.
[0132]
[0133] Where: f itness represents fitness, and D is a constant, which is used to make f itness The value is kept within a certain range, and the difference in fitness of each individual is reflected through D; C (i,j) represents the value of the i-th individual for the j-th sample data; T j represents the true value of the jth sample; Size represents the size of the abnormal data set on each edge device.
[0134] (3) Determine whether the maximum iteration termination condition is met. If so, use the optimal individual of the current population as the corresponding local anomaly detection model. Otherwise, proceed to step (4).
[0135] (4) Perform individual selection operations on fitness according to sampling strategies (such as elite selection, random selection, etc.), retain the best individuals, and proceed to step (5).
[0136] (5) The individuals selected in (4) are copied to the next generation population through the replication operator, and evolutionary operations such as mutation (randomly changing part of the individual's genes to increase the diversity of the population), transposition (changing the position of genes within the individual) and recombination are performed to obtain a new population.
[0137] (6) The number of iterations is increased by 1, and steps (2) to (5) are repeated for the new population until the maximum number of iterations is reached and evolution stops.
[0138] This example uses the GEP algorithm to build an association between training samples and anomaly recognition results, improves the accuracy of the local anomaly detection model, reduces the complexity of the data set, has a good convergence speed, and improves the efficiency of model generation.
[0139] Example 2
[0140] The present invention provides a cloud-edge collaborative anomaly detection method for virtual power plants. Figure 3 As shown, the method comprises the following steps:
[0141] Step S310, receiving the local anomaly detection models trained by each edge device;
[0142] Step S320, performing nonlinear combination on the local anomaly detection models trained on the edge devices to obtain a global anomaly detection model;
[0143] Step S330, sending the global anomaly detection model to each edge device;
[0144] Among them, the global anomaly detection model is used by each edge device to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant.
[0145] In this example implementation, an edge device can train a local anomaly detection model and send the trained local anomaly detection model to the cloud server. The cloud server performs nonlinear combination on the local anomaly detection models trained by each edge device to perform local model fusion processing. Specifically, the nonlinear combination of each local anomaly detection model can be: Let f i (X i ) is the local anomaly detection model of the i-th edge device, and the global anomaly detection model is expressed as where α i ,i∈[1,m] is the fusion parameter of the global anomaly detection model.
[0146] Exemplarily, the local anomaly detection models trained on the edge devices are nonlinearly combined to obtain a global anomaly detection model, including the following process:
[0147] Constructing a correlation relationship between the global anomaly detection model and each of the local anomaly detection models;
[0148] Based on the association relationship, an objective function is constructed with the goal of minimizing the detection error of the global anomaly detection model;
[0149] Receiving target training samples sent by each of the preprocessing modules;
[0150] The objective function is solved based on the target training sample and the least square method to obtain the fusion parameters of the association relationship, and then the global anomaly detection model is obtained.
[0151] In this example implementation, the target training samples can be some samples randomly selected from the training samples by each edge device, or some samples selected according to time rules or other preset rules. Each edge device can upload the target training samples and local detection models through one data transmission, or they can be transmitted separately in two data transmission processes. After receiving the local anomaly detection models and target training samples of all edge devices (edge nodes) in the cloud-edge collaborative system, the cloud server starts fusion processing (non-linear combination).
[0152] Specifically, the correlation relationship between the global anomaly detection model and each of the local anomaly detection models is first constructed:
[0153]
[0154] In the formula, f(X) represents the global anomaly detection model, X represents the input data of the global anomaly detection model, and α i represents the fusion parameter of the local anomaly detection model of the i-th edge device, i represents the sequence number of the edge device, m represents the number of edge devices, and f i (X i ) represents the local anomaly detection model of the i-th edge device, X i Represents the input data of the local anomaly detection model of the i-th edge device.
[0155] Reconstruct the objective function:
[0156]
[0157] In the formula, y j Indicates the true value of the jth sample, that is, whether it is abnormal data, mS ize Indicates the total number of training samples of all edge devices.
[0158] Solve for a set of α i Minimize the objective function. Specifically, in order to solve the corresponding α i , for each α i Find the partial derivatives to get m about α i The equation is as follows, let the objective function be i The first-order derivative of is equal to 0, construct m about α i By solving the root of the system of equations, we can get m α i , that is, fusion parameters, each fusion parameter is brought into the correlation formula to obtain the global anomaly detection model. This example generates a global anomaly detection model based on nonlinear least squares fitting to improve the detection accuracy of the global anomaly detection model; it realizes the training of fast local anomaly detection models on the edge and the collaboration of fast global model fusion on the cloud.
[0159] In some example implementations, before sending the global anomaly detection model to each edge device in step S330, the method further includes:
[0160] Receive test samples sent by each edge device, where the test samples are obtained by dividing the preprocessed data into training samples and test samples, and the preprocessed data are obtained by performing data cleaning and normalization processing on the historical operation data;
[0161] Performing a performance test on the global anomaly detection model based on the test sample to obtain a performance indicator of the global anomaly detection model;
[0162] If the performance indicator meets the preset detection requirements, the global anomaly detection model is sent to each edge device;
[0163] If the performance indicator does not meet the preset detection requirements, a retraining instruction is sent to each of the edge devices; the retraining instruction is used to instruct each edge device to retrain the corresponding local anomaly detection model.
[0164] In this example implementation, in order to ensure the detection accuracy of the global anomaly detection model obtained through training, the fused global anomaly detection model is tested on the cloud server. Specifically, the edge device can divide the data collected by itself or the data obtained after preprocessing the collected data into proportional data sets to obtain a training set composed of training samples and a test set composed of test samples. The training set is used for training and generating the local anomaly detection model, and the test set is sent to the cloud server for testing the global anomaly detection model. The performance indicators of the global anomaly detection model include accuracy, false detection rate, missed detection rate, acceleration ratio, etc. The performance indicators of the model are determined by the test output of the global anomaly detection model. If the performance indicators meet the detection requirements, the global anomaly detection model is sent to each edge device; if the performance indicators do not meet the detection requirements, the model is retrained until the model performance indicators meet the detection requirements.
[0165] The cloud server of the present invention is responsible for centralized energy management and decision-making, including monitoring, centralized control, data analysis and optimized scheduling of energy resources. After the edge device uploads the trained multiple local anomaly detection models to the cloud server, the cloud server fuses the multiple local anomaly detection models to generate a global anomaly detection model, and uses the test data set to test the model. The test sends the global anomaly detection model to each edge device, so that the edge device can perform abnormal data detection of the distributed resources it is responsible for, and feeds back the detection results to the corresponding monitoring device or related users for further processing, decision-making or adjustment.
[0166] The present invention will be described below with a specific embodiment. Figure 4 As shown, the specific implementation process includes:
[0167] Step 1: Complete the collection and acquisition of various data such as new energy, energy storage, load, etc. under the virtual power plant through intelligent sensing equipment, and collect the data to smart meters, electricity information sampling terminals and photovoltaic / wind power status data collection terminals, and proceed to step 2.
[0168] Step 2: Clean the collected distributed energy data according to the data cleaning rules. After data cleaning, convert all samples into numbers between 0 and 1 through linear normalization and proceed to step 3.
[0169] Step 3: Construct training and test datasets for anomaly detection and input the sample dataset X = {X1, X2, ..., X n |A} to the local anomaly detection model and go to step 4.
[0170] Step 4: By randomly selecting elements from the function set and the terminator set, the selected elements are combined into an expression tree to generate an initial population individual, each of which is used to describe the anomaly detection model. Among them: the function set includes active power calculation formula, reactive power calculation formula and apparent power calculation formula, impedance calculation formula, conductance calculation formula and energy calculation formula, efficiency calculation formula and power factor calculation formula, the terminator set includes voltage, current, active power, reactive power, apparent power, load, power generation, time, phase angle, resistance, conductance, susceptance, power factor, etc.; go to step 5.
[0171] Step 5: In order to better mine the anomaly detection model on the edge node, The fitness function based on absolute error is used to evaluate the fitness of the individual and go to step 6.
[0172] Step 6: Determine whether the termination condition is met. If so, end the evolution process and go to step 10. Otherwise, continue the evolution process and go to step 7.
[0173] Step 7: Keep the best individuals, perform fitness-based individual selection on the current population according to the sampling strategy (such as elite selection, random selection, etc.), and proceed to step 8.
[0174] Step 8: Use the replication operator to copy the selected individuals to the next generation population as is, and continue to perform evolutionary operations such as mutation (i.e., randomly changing part of the individual's genes to increase the diversity of the population), transposition (i.e., changing the location of genes within the individual), and recombination to obtain a new population; proceed to step 9.
[0175] Step 9: The evolutionary generation is increased by 1, and the evolutionary iteration process of steps 5-8 is executed for the obtained new population, and the fitness is re-evaluated until the maximum number of iterations is met, and the evolution is stopped and the process goes to step 10.
[0176] Step 10: Obtain the local anomaly detection model f on m edge devices i (X i ), represents the dataset on the i-th edge device, i∈[1,m], A={1,0} represents the abnormal label of the sample dataset, and f i (X i ) is the local anomaly detection model of the i-th edge node. 1 represents an abnormal label and 0 represents a normal label. If f i (X i ) is closer to 1, indicating that the current data on the i-th edge node is abnormal data, otherwise it is considered normal data. Go to step 11.
[0177] Step 11: Fusion multiple local anomaly detection models based on the global model fusion algorithm, by finding a set of α i So that the objective function Minimum, and finally get the global anomaly detection model Realize fast local model training on the edge and synergize global model fusion on the cloud, and proceed to step 12.
[0178] Step 12: Evaluate the model using a test data set. If the model passes the evaluation, the global anomaly detection model is sent to each edge device for real-time anomaly detection, and the detection results are fed back to the corresponding device or related users.
[0179] The present invention proposes a cloud-edge collaborative distributed abnormal data detection method for virtual power plants, which is used to timely identify and eliminate abnormal data under virtual power plants, and improve the quality and credibility of energy data. Based on the cloud-edge collaborative mechanism, a virtual power plant cloud-edge collaborative distributed anomaly detection system architecture is constructed; secondly, a distributed anomaly detection method based on gene expression programming is designed from the aspects of algorithm principle and least squares-based global anomaly detection model generation. In order to realize the whole process of distributed data collection and anomaly detection training, local model transmission, and global model fusion under virtual power plants, the core content of the entire framework is located in edge devices and cloud servers, among which the edge devices mainly train local anomaly detection models in a distributed and parallel manner on multiple edge nodes, and then transmit the obtained multiple local anomaly detection models to the cloud for fusion of the global anomaly detection model. Due to the limited amount of data collected by the edge, the training of local anomaly detection models is performed at the edge; then, each local anomaly detection model is transmitted to the cloud and fused into a global anomaly detection model in the cloud; finally, the global anomaly detection model is sent to each edge to perform anomaly detection of real-time data. The present invention uses the cloud-edge collaborative abnormal data detection system of GEP (gene expression programming) to fully utilize the computing power of cloud servers and the data collection and processing capabilities of edge devices to achieve accurate and efficient detection of abnormal data in virtual power plants. The entire system architecture reduces the probability of network congestion caused by data transmission to the cloud; reduces the computing pressure of the cloud directly processing massive abnormal data detection; and avoids data privacy leakage caused by the transmission of local data to the cloud.
[0180] Experimental verification
[0181] In order to verify the effectiveness of the method of the present invention, a simulation experiment environment is built to conduct detailed simulation experiments and analysis on the anomaly detection method of the present invention, so as to evaluate the feasibility and effectiveness of the method proposed in the present invention. The experimental platform includes 6 edge computing nodes and 1 cloud server.
[0182] (1) Experimental data set: including 3 real load data sets and 3 open source load data sets. The 3 real load data sets are all from actual substation load data. The scales of the 3 real load data sets are 159, 430 and 159 respectively, the feature size is 12, and 1 point is sampled per hour. 80% of the data are used as training data, and the remaining 20% are used as test data. The 3 open source load data sets are from commercial and residential load data across the United States in a typical meteorological year. Each load data set contains 365 data and the feature size is 24. The original data set is shown in Table 1.
[0183] Table 1. Original dataset
[0184]
[0185] For the experimental data set in Table 1, abnormal load data is randomly injected without changing the existing data scale and feature size. At the same time, according to the injected abnormal data, anomaly annotation is performed manually to form the experimental data set shown in Table 2.
[0186] Table 2. Experimental dataset
[0187]
[0188]
[0189] (2) Performance evaluation: In order to evaluate the performance of the abnormal data detection method, Pr is used to represent the accuracy of the abnormal data detection method. The higher the Pr, the better the abnormal data detection method is. Fr is used to represent the false positive rate of the abnormal data detection method. The smaller the Fr, the better the abnormal data detection method is. Mr is used to represent the missed detection rate of the abnormal data detection method. The smaller Mr, the better the noise data detection method is. The calculation formula is as follows:
[0190]
[0191]
[0192]
[0193] Among them, T n Indicates the number of normal data identified as normal data, F n Indicates the number of abnormal data identified as normal data, T a Indicates the number of abnormal data identified as abnormal data, F a Indicates the number of normal data identified as abnormal data.
[0194] At the same time, the acceleration ratio S pTo measure the performance of the cloud-edge collaborative distributed anomaly detection method, the calculation formula is:
[0195]
[0196] Wherein, S1 represents the average computation time of CSDAD-GEP in a single edge node environment, M t It represents the average computation time of CSDAD-GEP in multiple edge node environments. The larger the speedup ratio, the smaller the overall average computational overhead of the distributed method. At the same time, the change in speedup ratio can also reflect the impact of the increase in edge nodes on the overall average computational overhead of the distributed method.
[0197] (3) Method performance analysis: In order to verify the performance of the method proposed in the present invention (the number of edge nodes is 3), for all experimental data sets in Table 2, the performance of the cloud-side cooperative distributed anomaly data detection algorithm based on gene expression programming for virtual power plant (CSDAD-GEP), genetic programming (GP) and decision tree algorithm (DT) of the present invention are compared. The accuracy comparison results of the training data set and the test data set are shown in Figure 2. Figure 5 and 6 As shown in Figure 2, the false positive rate comparison results are as follows: Figure 7 and 8 As shown in the figure, the missed detection rate results are as follows Fig. 9 and 10 As shown. Figure 5-10 The following conclusions can be drawn:
[0198] 1) Whether it is a training set or a test set, the method proposed in the present invention is superior to the GP and DT algorithms in terms of accuracy, false positive rate, missed positive rate and average time consumption.
[0199] 2) For all training data sets, compared with GP and DT algorithms, the accuracy, false positive rate and missed detection rate of the method of the present invention are increased by about 8.79%, 40.17% and 76% respectively; for all test data sets, compared with GP and DT algorithms, the accuracy, false positive rate and missed detection rate of the method of the present invention are increased by about 11.89%, 31.45% and 77.52% respectively. This is because the GEP algorithm has a certain attribute simplification ability. For data sets containing high-dimensional features, classification based on the GEP algorithm can reduce the complexity of the data set to be classified; at the same time, compared with the above two algorithms, the GEP algorithm also has a better convergence speed, which lays the foundation for improving the classification accuracy, false positive rate and missed detection rate of this method.
[0200] 3) The average time consumption of CSDAD-GEP of the present invention is increased by about 52.27%, 46.3%, 53.44%, 51.38%, 51.05%, and 44.21% respectively; for all test data sets, compared with GP and DT algorithms, the average time consumption of CSDAD-GEP is increased by about 39.13%, 24%, 34.29%, 27.1%, 29.89%, and 22.12% respectively. This shows that the CSDAD-GEP algorithm of the present invention not only greatly reduces the amount and complexity of data to be processed at the edge, but also reduces the network delay of data transmission from the edge to the cloud for centralized processing.
[0201] The abnormal data detection of the present invention is very important for the cloud-edge collaborative business processing under the virtual power plant. Through effective abnormal data detection algorithms and technologies, abnormal data can be identified and eliminated in a timely manner, and the quality and credibility of energy data can be improved. This is crucial to ensure the stability, accuracy and reliability of the virtual power plant energy management system. Only by ensuring the authenticity and accuracy of the data can the normal operation of the virtual power plant cloud-edge collaborative processing architecture be guaranteed to provide efficient and reliable energy services.
[0202] In order to solve the problems of low anomaly detection accuracy and reliability caused by the diversity and dispersion of distributed energy resources in virtual power plants and the uncertainty of communication networks and sensor equipment, the present invention constructs a virtual power plant cloud-edge collaborative distributed anomaly data detection system architecture, which reduces network congestion caused by frequent data transmission between edge and cloud, and alleviates the computing pressure on the cloud. On the basis of the global anomaly detection model generation principle based on nonlinear least squares fitting, a cloud-edge collaborative distributed anomaly detection method based on gene expression programming is designed, which solves the shortcomings of low anomaly detection efficiency and accuracy brought about by edge data collection and cloud anomaly detection in the existing anomaly data detection system, and can identify anomalies that may occur during data collection and transmission, providing a basis for improving subsequent data quality.
[0203] Example 3
[0204] Based on the same inventive concept, the present invention also provides an edge device, including:
[0205] An anomaly detection module, used to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server;
[0206] A sending module, used to send the detection result to the monitoring device associated with each distributed resource corresponding to the edge device;
[0207] The global anomaly detection model is obtained by fusing the local anomaly detection models trained by the cloud server on each edge device.
[0208] In a possible implementation manner, the edge device further includes:
[0209] A receiving module, used to receive historical operation data of each distributed resource associated with the edge device in the virtual power plant;
[0210] A training module, used for generating a local anomaly detection model based on the historical operation data and gene expression programming training, and uploading the trained local anomaly detection model to a cloud server;
[0211] Among them, each edge device trains a local anomaly detection model.
[0212] In a possible implementation manner, the receiving module is further used for:
[0213] Receive real-time operating data of each distributed resource in the virtual power plant sent by a data acquisition device, wherein the real-time operating data includes power consumption data and status data of each distributed resource in the virtual power plant collected based on intelligent sensors.
[0214] In a possible implementation manner, the edge device further includes:
[0215] The preprocessing module is used to perform data cleaning and normalization processing on the historical operation data to obtain preprocessed data.
[0216] In a possible implementation, the training module includes:
[0217] An initialization submodule, used to use the preprocessed data as training samples to generate an initial population including a plurality of individuals, each of which is used to establish an association relationship between the training sample and a corresponding abnormality recognition result;
[0218] A fitness determination submodule, which determines the fitness of each individual based on the difference between the abnormality recognition result of each individual for each training sample and the true label of the training sample;
[0219] A screening module, used for screening out the best individual of the current population based on the fitness of each individual;
[0220] An evolution submodule, used for performing gene evolution operation on the optimal individuals to obtain a new population;
[0221] The iterative submodule is used to repeat the fitness determination of the individual, the screening of the optimal individual and the gene evolution operation until the iteration termination condition is reached, and the optimal individual of the current population obtained is the local anomaly detection model generated by training.
[0222] Example 4
[0223] Based on the same inventive concept, the present invention also provides a cloud server, including:
[0224] A receiving module, used to receive local anomaly detection models trained by each edge device;
[0225] The fusion module is used to nonlinearly combine the local anomaly detection models trained on each edge device to obtain a global anomaly detection model;
[0226] A sending module, used to send the global anomaly detection model to each edge device;
[0227] Among them, the global anomaly detection model is used by each edge device to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant.
[0228] In a possible implementation, one edge device trains one local anomaly detection model, and the fusion module includes:
[0229] A relational expression construction submodule, used to construct an association relational expression between the global anomaly detection model and each of the local anomaly detection models;
[0230] An objective function construction submodule, for constructing an objective function based on the association relationship with the goal of minimizing the detection error of the global anomaly detection model;
[0231] A receiving submodule, used to receive target training samples sent by each of the edge devices;
[0232] The solving submodule is used to solve the objective function based on the target training sample and the least square method to obtain the fusion parameters of the association relationship, and then obtain the global anomaly detection model.
[0233] In a possible implementation, the specific expression of the global anomaly detection model is:
[0234]
[0235] In the formula, f(X) represents the global anomaly detection model, X represents the input data of the global anomaly detection model, and α i represents the fusion parameter with the i-th local anomaly detection model, i represents the sequence number of the local anomaly detection model, m represents the number of local anomaly detection models, and f i (X i ) represents the i-th local anomaly detection model, X i Represents the input data of the i-th local anomaly detection model.
[0236] In a possible implementation manner, the receiving submodule is further used for:
[0237] Receive test samples sent by each edge device, where the test samples are obtained by dividing the preprocessed data into training samples and test samples, and the preprocessed data are obtained by performing data cleaning and normalization processing on the historical operation data;
[0238] The cloud server further includes a testing module, which is used to: perform a performance test on the global anomaly detection model based on the test sample to obtain a performance index of the global anomaly detection model;
[0239] The sending module is also used for:
[0240] If the performance indicator meets the preset detection requirements, the global anomaly detection model is sent to each edge device;
[0241] If the performance indicator does not meet the preset detection requirements, a retraining instruction is sent to each of the edge devices, and the retraining instruction is used to instruct each edge device to retrain the corresponding local anomaly detection model.
[0242] Example 5
[0243] Based on the same inventive concept, the present invention also provides an anomaly detection system, including: the edge device described in any of the above embodiments and the cloud server described in any of the above embodiments. Fig.11 As shown, the anomaly detection system may further include a data acquisition device for collecting operation data from each distributed resource.
[0244] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0245] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 produce 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.
[0246] 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.
[0247] 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.
[0248] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit its protection scope. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the protection scope of the claims to be approved.
Claims
1. A cloud-edge collaborative anomaly detection method for virtual power plants, characterized in that: The method comprises: Anomaly detection is performed on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server; Sending the detection results to the monitoring devices associated with each distributed resource corresponding to the edge device; The global anomaly detection model is obtained by fusing the local anomaly detection models trained by the cloud server on each edge device.
2. The method according to claim 1, characterized in that Before performing anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server, the method further includes: Receive historical operation data of each distributed resource associated with the edge device in the virtual power plant; Generate a local anomaly detection model based on the historical operation data and gene expression programming training; Upload the trained local anomaly detection model to the cloud server; Among them, each edge device trains a local anomaly detection model.
3. The method according to claim 2, characterized in that Before performing anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server, the method further includes: Receive real-time operating data of each distributed resource in the virtual power plant sent by a data acquisition device, wherein the real-time operating data includes power consumption data and status data of each distributed resource in the virtual power plant collected based on intelligent sensors.
4. The method according to claim 2, characterized in that: The distributed resources include photovoltaic resource nodes, wind power resource nodes, energy storage equipment, load nodes and charging piles.
5. The method according to claim 2, characterized in that: Before generating a local anomaly detection model based on the historical operation data and gene expression programming training, the method further includes: The historical operation data is cleaned and normalized to obtain pre-processed data.
6. The method according to claim 5, characterized in that The generating of the local anomaly detection model based on the historical operation data and gene expression programming training comprises: Using the preprocessed data as training samples, generating an initial population including a plurality of individuals, each of the individuals being used to establish an association relationship between the training sample and a corresponding abnormality recognition result; Determining the fitness of each of the individuals based on the difference between the abnormality recognition result of each of the individuals for each of the training samples and the true label of the training samples; Filter out the best individual of the current population based on the fitness of each individual; Performing gene evolution operation on the optimal individuals to obtain a new population; The determination of the fitness of the individual, the screening of the optimal individual and the gene evolution operation are repeated until the iteration termination condition is reached, and the optimal individual of the current population obtained is the local anomaly detection model generated by training.
7. An edge device, characterized in that: include: An anomaly detection module, used to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant based on the global anomaly detection model obtained from the cloud server; A sending module, used to send the detection result to the monitoring device associated with each distributed resource corresponding to the edge device; The global anomaly detection model is obtained by fusing the local anomaly detection models trained by the cloud server on each edge device.
8. The edge device according to claim 7, characterized in that: The edge device also includes: A receiving module, used to receive historical operation data of each distributed resource associated with the edge device in the virtual power plant; A training module, used for generating a local anomaly detection model based on the historical operation data and gene expression programming training, and uploading the trained local anomaly detection model to a cloud server; Among them, each edge device trains a local anomaly detection model.
9. The edge device according to claim 8, characterized in that: The receiving module is also used for: Receive real-time operating data of each distributed resource in the virtual power plant sent by a data acquisition device, wherein the real-time operating data includes power consumption data and status data of each distributed resource in the virtual power plant collected based on intelligent sensors.
10. The edge device according to claim 8, characterized in that: The edge device also includes: The preprocessing module is used to perform data cleaning and normalization processing on the historical operation data to obtain preprocessed data.
11. The edge device according to claim 10, characterized in that: The training module includes: An initialization submodule, used to use the preprocessed data as training samples to generate an initial population including a plurality of individuals, each of which is used to establish an association relationship between the training sample and a corresponding abnormality recognition result; A fitness determination submodule, which determines the fitness of each individual based on the difference between the abnormality recognition result of each individual for each training sample and the true label of the training sample; A screening module, used for screening out the best individual of the current population based on the fitness of each individual; An evolution submodule, used for performing gene evolution operation on the optimal individuals to obtain a new population; The iterative submodule is used to repeat the fitness determination of the individual, the screening of the optimal individual and the gene evolution operation until the iteration termination condition is reached, and the optimal individual of the current population obtained is the local anomaly detection model generated by training.
12. A cloud-edge collaborative anomaly detection method for virtual power plants, characterized in that: The method comprises: Receive the local anomaly detection model trained by each edge device; The local anomaly detection models trained on each edge device are nonlinearly combined to obtain a global anomaly detection model. Sending the global anomaly detection model to each edge device; Among them, the global anomaly detection model is used by each edge device to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant.
13. The method according to claim 12, characterized in that One edge device is correspondingly trained with one local anomaly detection model, and the local anomaly detection models trained by each edge device are nonlinearly combined to obtain a global anomaly detection model, including: Constructing a correlation relationship between the global anomaly detection model and each of the local anomaly detection models; Based on the association relationship, an objective function is constructed with the goal of minimizing the detection error of the global anomaly detection model; Receiving target training samples sent by each of the edge devices; The objective function is solved based on the target training sample and the least square method to obtain the fusion parameters of the association relationship, and then the global anomaly detection model is obtained.
14. The method according to claim 13, characterized in that The specific expression of the global anomaly detection model is: In the formula, f(X) represents the global anomaly detection model, X represents the input data of the global anomaly detection model, and α i represents the fusion parameter with the i-th local anomaly detection model, i represents the sequence number of the local anomaly detection model, m represents the number of local anomaly detection models, and f i (X i ) represents the i-th local anomaly detection model, X i Represents the input data of the i-th local anomaly detection model.
15. The method according to claim 12, characterized in that Before sending the global anomaly detection model to each edge device, the method further includes: Receive test samples sent by each edge device, where the test samples are obtained by dividing the preprocessed data into training samples and test samples, and the preprocessed data are obtained by cleaning and normalizing the historical operation data; Performing a performance test on the global anomaly detection model based on the test sample to obtain a performance indicator of the global anomaly detection model; If the performance indicator meets the preset detection requirements, the global anomaly detection model is sent to each edge device; If the performance indicator does not meet the preset detection requirements, a retraining instruction is sent to each of the edge devices, and the retraining instruction is used to instruct each edge device to retrain the corresponding local anomaly detection model.
16. A cloud server, characterized in that: include: A receiving module, used to receive local anomaly detection models trained by each edge device; The fusion module is used to nonlinearly combine the local anomaly detection models trained on each edge device to obtain a global anomaly detection model; A sending module, used to send the global anomaly detection model to each edge device; Among them, the global anomaly detection model is used by each edge device to perform anomaly detection on the real-time operation data of each distributed resource in the virtual power plant.
17. The cloud server according to claim 16, characterized in that: One edge device trains one local anomaly detection model, and the fusion module includes: A relational expression construction submodule, used to construct an association relational expression between the global anomaly detection model and each of the local anomaly detection models; An objective function construction submodule, for constructing an objective function based on the association relationship with the goal of minimizing the detection error of the global anomaly detection model; A receiving submodule, used to receive target training samples sent by each of the edge devices; The solving submodule is used to solve the objective function based on the target training sample and the least square method to obtain the fusion parameters of the association relationship, and then obtain the global anomaly detection model.
18. The cloud server according to claim 17, characterized in that: The specific expression of the global anomaly detection model is: In the formula, f(X) represents the global anomaly detection model, X represents the input data of the global anomaly detection model, and α i represents the fusion parameter with the i-th local anomaly detection model, i represents the sequence number of the local anomaly detection model, m represents the number of local anomaly detection models, and f i (X i ) represents the i-th local anomaly detection model, X i Represents the input data of the i-th local anomaly detection model.
19. The cloud server according to claim 17, characterized in that: The receiving submodule is also used for: Receive test samples sent by each edge device, where the test samples are obtained by dividing the preprocessed data into training samples and test samples, and the preprocessed data are obtained by cleaning and normalizing the historical operation data; The cloud server further includes a testing module, which is used to: perform a performance test on the global anomaly detection model based on the test sample to obtain a performance index of the global anomaly detection model; The sending module is also used for: If the performance indicator meets the preset detection requirements, the global anomaly detection model is sent to each edge device; If the performance indicator does not meet the preset detection requirements, a retraining instruction is sent to each of the edge devices, and the retraining instruction is used to instruct each edge device to retrain the corresponding local anomaly detection model.
20. A cloud-edge collaborative anomaly detection system for virtual power plants, characterized in that: include: The edge device described in any one of claims 7-11 and the cloud server described in any one of claims 16-19.
Citation Information
Cited By
Multi-source environmental data fusion and decision support system based on industrial internet identifier analysis
CN119882448A
LLM-based multi-machine collaborative abnormal data detection system
CN120675827A
Global monitoring method and system based on virtual power plant collaborative scheduling
CN120810944A
