Blockchain-based virtual power plant false data detection method, system and medium
By adopting blockchain-based false data detection methods in virtual power plants, establishing block mesh diagrams and dimension diagrams, the problem of long detection of false data in virtual power plants is solved, and efficient and fast detection of false data is achieved.
Patent Information
- Application Number
- CN202411640566.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In the prior art, false data detection in virtual power plants requires analysis of all data, resulting in a high lower limit of detection time, especially when facing a large amount of data, the detection direction cannot be determined, resulting in a slow detection speed.
Using a virtual power plant false data detection method based on blockchain, we use the distributed energy under the jurisdiction of each virtual power plant, establish a block mesh diagram, obtain energy transaction weights and preferences, establish a preference dimension chart and transaction dimension chart, and then conduct data detection, narrow the detection range and reduce the detection time.
Through blockchain technology, the distributed energy of virtual power plants can be visualized, data analysis efficiency can be improved, false data detection range can be narrowed, detection time can be significantly reduced, and detection speed can be improved.
Smart Images

Figure CN119151723B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data detection technology, and specifically to a method, system and medium for detecting false data in a virtual power plant based on blockchain. Background Art
[0002] A virtual power plant is a power coordination and management system that uses advanced information and communication technologies and software systems to achieve the aggregation and coordinated optimization of distributed energy resources such as distributed power sources, energy storage systems, controllable loads, microgrids and electric vehicles, so that it can participate in the operation of the power market and power grid as a special power plant; false data detection refers to the use of technical means to identify and detect false information in data to ensure the authenticity and accuracy of the data; false data usually includes forged and tampered data, which may be generated or modified through improper means to conceal the truth or achieve a certain purpose.
[0003] Existing methods for false data detection in virtual power plants usually use sampling algorithms and search algorithms to screen the data to be detected, thereby eliminating redundant data, reducing the data feature dimension, and then improving the efficiency of the classifier and the detection speed. Although this improved method can effectively improve the data detection speed when detecting the data of the virtual power plant, this improved method requires all the data of the virtual power plant to be analyzed before screening, resulting in a higher lower limit on the time required for data detection. Although it can reduce the classification amount of the classifier, the efficiency improvement is small. When faced with a large amount of data, it is still impossible to determine the detection direction of the data detection, resulting in a slow detection speed. For example, in the patent application with publication number CN116127447A, a virtual power plant false Data injection attack detection method, device, terminal and medium. This solution effectively improves the accuracy of the classifier by inputting the optimal feature subset into the classification algorithm model, thereby efficiently and quickly detecting false data injection attacks on virtual power plants, thereby solving the technical problems of traditional machine learning-based detection speed reduction and inability to ensure real-time detection. Other improvements in false data detection for virtual power plants are usually improvements in improving detection performance, and all data in the virtual power plant need to be analyzed, resulting in a higher lower limit on the time required for data detection. When faced with a large amount of data, the detection direction of the data cannot be determined, resulting in a slow detection speed. In view of this, it is necessary to improve the existing false data detection method for virtual power plants. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent. By proposing a blockchain-based virtual power plant false data detection method, system and medium, it is used to solve the problem that the existing false data detection method for virtual power plants needs to analyze all data of the virtual power plant, resulting in a high lower limit on the time required for data detection. When faced with a large amount of data, it is still impossible to determine the detection direction of the data detection, resulting in a slow detection speed.
[0005] To achieve the above objectives, in a first aspect, the present application provides a method for detecting false data of a virtual power plant based on blockchain, comprising the following steps:
[0006] Obtain all virtual power plants used for data detection, obtain the distributed energy resources governed by each virtual power plant based on the blockchain, and establish a block network diagram based on the obtained results, wherein the nodes in the block network diagram are filled with virtual power plants and distributed energy resources;
[0007] Obtaining the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram, establishing a preference dimension diagram based on the energy transaction weight and energy acquisition preference, and obtaining a transaction dimension diagram based on the preference dimension diagram;
[0008] The data of the virtual power plant is detected based on the transaction dimension graph, and the false data detection location of the virtual power plant is obtained based on the detection results.
[0009] Furthermore, the distributed energy resources under the jurisdiction of each virtual power plant are obtained based on the blockchain, and a block network diagram is established based on the obtained results, including:
[0010] Establish a plane rectangular coordinate system, recorded as the block analysis coordinate system, where the units of the X-axis and Y-axis of the block analysis coordinate system are both meters; obtain the map locations of all virtual power plants used for data detection, and mark the locations of all virtual power plants in the first quadrant of the block analysis coordinate system in equal proportion; record the points where all virtual power plants are located in the block analysis coordinate system as power plant nodes DJ1 to DJ n ;
[0011] Based on the blockchain, all distributed energy resources under the jurisdiction of the virtual power plant are obtained and stored in the distributed energy library. For any distributed energy in the distributed energy library, the power plant node DJ corresponding to the virtual power plant that governs the distributed energy is recorded as the jurisdiction node GJ1 to the jurisdiction node GJ k .
[0012] Furthermore, obtaining the distributed energy resources governed by each virtual power plant based on the blockchain and establishing a block network diagram based on the obtained results also includes:
[0013] The largest enclosed area that can be enclosed by all the jurisdiction nodes GJ is recorded as the jurisdiction area, and the smallest circumscribed circle of the jurisdiction area is obtained and recorded as the jurisdiction circle; the center of the jurisdiction circle is recorded as the energy node, and the energy node is connected to all the jurisdiction nodes GJ, and the connecting line is recorded as the energy jurisdiction line;
[0014] Mark the energy nodes and energy jurisdiction lines corresponding to all distributed energy in the block analysis coordinate system; the network diagram composed of energy nodes, power plant nodes DJ and energy jurisdiction lines at this time is recorded as a block network diagram.
[0015] Furthermore, obtaining the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram includes:
[0016] For any power plant node DJ in the block network diagram n1 , will be governed by the energy line and the power plant node DJ n1 The largest enclosed area surrounded by all connected energy nodes is recorded as the power plant analysis area; for the power plant node DJ n1 For any energy node connected, record the distributed energy corresponding to the energy node as energy α, and obtain the power plant node DJ n1 All transaction orders between the corresponding virtual power plant and energy α are recorded as energy order α1 to energy order α j , use the energy preference algorithm to obtain the energy transaction value between the virtual power plant and energy α. The energy preference algorithm is: , where F is the energy transaction value, T i is the number of days since the i-th energy order α, G c is the transaction amount of the cth energy order α;
[0017] Get the power plant node DJ n1 The energy transaction value of the corresponding virtual power plant and all distributed energy resources, and the sum of all energy transaction values is recorded as the energy transaction value sum; for any distributed energy corresponding to the virtual power plant, the energy transaction value of the distributed energy divided by the energy transaction value sum is recorded as the energy transaction weight of the distributed energy;
[0018] Get the power plant node DJ n1 The corresponding energy trading weights of all distributed energy sources.
[0019] Furthermore, obtaining the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram also includes:
[0020] For Power Plant Node DJ n1For any energy jurisdiction line connected, the length of the energy jurisdiction line is recorded as L0, the energy transaction weight corresponding to the distributed energy connected by the energy jurisdiction line multiplied by the value of L0 is recorded as L1, and the distance from the power plant node DJ in the energy jurisdiction line is recorded as n1 The point with length L1 is recorded as the energy weight point; get the power plant node DJ n1 The energy rights points corresponding to all energy jurisdiction lines are divided into the energy rights points and the distance from all energy rights points to the power plant node DJ n1 The average value of the distance from the power plant node DJ is recorded as the weighted average value; n1 The energy weight point whose distance is greater than the weight average is recorded as the preference weight point, and the distributed energy connected to the preference jurisdiction line where all the preference weight points are located is recorded as the power plant node DJ n1 Energy acquisition preferences, the number of energy acquisition preferences divided by the power plant node DJ n1 The value of the number of all energy jurisdiction lines is denoted as P;
[0021] Establish a plane rectangular coordinate system, recorded as the dimensional analysis coordinate system, where the units of the X-axis and Y-axis of the dimensional analysis coordinate system are both meters; n1 The number of energy acquisition preferences is recorded as Q. In the dimensional analysis coordinate system, a regular Q-gon is established with the coordinate origin as the center, recorded as the dimension Q-edge, where the distance between the vertex of the dimension Q-gon and the coordinate origin is 1.
[0022] Further, establishing a preference dimension graph based on the energy transaction weight and the energy acquisition preference, and acquiring a transaction dimension graph based on the preference dimension graph includes:
[0023] Connect all vertices of the dimension Q polygon to the coordinate origin, and record the connecting line as the dimension line; set the dimension point in the dimension line, and the distance of all dimension points from the coordinate origin is the power plant node DJ n1 The corresponding energy transaction weights of all energy acquisition preferences; the maximum closed area surrounded by all dimensional points is recorded as the preference dimension graph;
[0024] For any dimension point in the preference dimension diagram, the distance between the dimension point and the coordinate origin is recorded as L2, the energy acquisition preference corresponding to the dimension point is recorded as the dimension preference energy, and the power plant node DJ is recorded as n1 The total transaction amount of all transaction orders of the corresponding virtual power plant and the dimension preference energy is recorded as the total preference transaction amount, and the product of L2 and the total preference transaction amount is recorded as the transaction value; the dimension point is extended to the outside of the regular Q-gon based on the dimension line where it is located, until the distance between the dimension point and the coordinate origin is equal to the transaction value, and the dimension point at this time is recorded as the transaction point;
[0025] Get the transaction points corresponding to all dimension points, and record the largest closed area that can be surrounded by all transaction points as the transaction dimension graph; based on the transaction node DJn1 The analysis method obtains the transaction dimension graph corresponding to all transaction nodes DJ, and records the transaction dimension graph as the standard dimension graph of the virtual power plant corresponding to the transaction node DJ.
[0026] Further, the data of the virtual power plant is detected based on the transaction dimension graph, and the false data detection position of the virtual power plant is obtained based on the detection result, including:
[0027] For any virtual power plant corresponding to a transaction node DJ, every time the virtual power plant completes a distributed energy transaction, the transaction dimension graph of the transaction node corresponding to the virtual power plant is obtained based on the block analysis coordinate system and the dimension analysis coordinate system, and recorded as a real-time dimension graph;
[0028] The real-time dimension graph is overlapped with the standard dimension graph. When the value of the overlapping area divided by the area of the standard dimension graph is less than P, the virtual power plant is recorded as a power plant with large fluctuations; when the value of the overlapping area divided by the area of the standard dimension graph is greater than or equal to P, the virtual power plant is recorded as a power plant with small fluctuations.
[0029] Further, detecting the data of the virtual power plant based on the transaction dimension graph, and obtaining the false data detection position of the virtual power plant based on the detection result also includes:
[0030] For any transaction point β in the real-time dimensional graph of the power plant with large fluctuations, the transaction point of the standard dimensional graph in the straight line between the coordinate origin and the transaction point β is recorded as the transaction point γ, and the length between the transaction point β and the transaction point γ is recorded as the fluctuation length; the fluctuation lengths corresponding to all transaction points in the real-time dimensional graph of the power plant with large fluctuations are obtained, and the transaction point corresponding to the largest fluctuation length is recorded as the point to be detected; the location of the distributed energy data corresponding to the point to be detected is recorded as the false data detection location.
[0031] In the second aspect, the present application also provides a virtual power plant false data detection system based on blockchain, including a mesh graph acquisition module, an energy transaction analysis module, and a false data detection module;
[0032] The mesh acquisition module is used to acquire all virtual power plants used for data detection, acquire the distributed energy resources governed by each virtual power plant based on the blockchain, and establish a block mesh based on the acquisition results, wherein the nodes in the block mesh are filled with virtual power plants and distributed energy resources;
[0033] The energy transaction analysis module is used to obtain the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram, establish a preference dimension diagram based on the energy transaction weight and energy acquisition preference, and obtain a transaction dimension diagram based on the preference dimension diagram;
[0034] The false data detection module is used to detect the data of the virtual power plant based on the transaction dimension graph, and obtain the false data detection position of the virtual power plant based on the detection results.
[0035] In a third aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.
[0036] Beneficial effects of the present invention: The present application first obtains all virtual power plants used for data detection, obtains the distributed energy resources governed by each virtual power plant based on the blockchain, and establishes a block network diagram based on the obtained results. The advantage of this is that by obtaining the block network diagram, the distributed energy resources governed by each virtual power plant can be visualized using the blockchain, which helps to analyze all virtual power plants in the same diagram in subsequent analysis, thereby improving the analysis efficiency of all virtual power plants;
[0037] The present application also obtains the energy transaction weight and energy acquisition preference corresponding to the virtual power plant, and establishes a preference dimension graph and a transaction dimension graph. Finally, the data of the virtual power plant is detected based on the transaction dimension graph, and the false data detection position of the virtual power plant is obtained based on the detection result. The advantage of this is that by obtaining the transaction dimension graph based on the preference dimension graph, the proportion of all distributed energy sources with large transaction volumes and the relationship between transaction amounts in the transaction data corresponding to each virtual power plant can be obtained. When data detection is performed based on the transaction dimension graph, the distributed energy sources corresponding to the data with a higher probability of false data in all the data corresponding to the virtual power plant can be obtained, thereby narrowing the detection range and effectively reducing the detection time. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a functional block diagram of the system of the present invention;
[0039] Figure 2 is a flow chart of the steps of the method of the present invention;
[0040] Figure 3 A schematic diagram of a block analysis coordinate system of the present invention;
[0041] Figure 4 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Example 1, please refer to Figure 1 As shown, the present application provides a virtual power plant false data detection system based on blockchain, including a mesh graph acquisition module, an energy transaction analysis module and a false data detection module;
[0044] The mesh acquisition module is used to acquire all virtual power plants used for data detection, acquire the distributed energy resources governed by each virtual power plant based on the blockchain, and establish a block mesh based on the acquisition results, wherein the nodes in the block mesh are filled with virtual power plants and distributed energy resources;
[0045] The mesh acquisition module includes a mesh acquisition unit, which is configured with a mesh acquisition strategy. The mesh acquisition strategy includes: establishing a plane rectangular coordinate system, recorded as a block analysis coordinate system, wherein the units of the X-axis and the Y-axis of the block analysis coordinate system are both meters; obtaining the map locations of all virtual power plants used for data detection, and marking the locations of all virtual power plants in the first quadrant of the block analysis coordinate system in equal proportion; recording the points where all virtual power plants are located in the block analysis coordinate system as power plant nodes DJ1 to DJ n ;
[0046] In the specific implementation process, for example, during a data processing, the block analysis coordinate system is established as follows: Figure 3 As shown, the locations of all power plant nodes DJ obtained are points DJ1 to DJ4, and the distributed energy managed by the power plant node DJ corresponding to point DJ1 is solar energy and natural gas energy;
[0047] Based on the blockchain, all distributed energy resources under the jurisdiction of the virtual power plant are obtained and stored in the distributed energy library. For any distributed energy in the distributed energy library, the power plant node DJ corresponding to the virtual power plant that governs the distributed energy is recorded as the jurisdiction node GJ1 to the jurisdiction node GJ k ;
[0048] In the specific implementation process, the block analysis coordinate system is established as follows Figure 3 As shown, solar energy is stored in the distributed energy library. Through data analysis, the power plant nodes DJ corresponding to the virtual power plant that governs the distributed energy are points DJ1, DJ2 and DJ3. Point DJ1, point DJ2 and DJ3 are recorded as the jurisdiction node GJ1, the jurisdiction node GJ2 and the jurisdiction node GJ3 respectively; the triangle DD1 is recorded as the jurisdiction area, and the energy node is obtained as point DD3 by obtaining the jurisdiction circle DD2 of the triangle DD1; the straight lines LL1, LL2 and LL3 are recorded as energy jurisdiction lines;
[0049] The largest enclosed area that can be enclosed by all the jurisdiction nodes GJ is recorded as the jurisdiction area, and the smallest circumscribed circle of the jurisdiction area is obtained and recorded as the jurisdiction circle; the center of the jurisdiction circle is recorded as the energy node, and the energy node is connected to all the jurisdiction nodes GJ, and the connecting line is recorded as the energy jurisdiction line;
[0050] Mark the energy nodes and energy jurisdiction lines corresponding to all distributed energy sources in the block analysis coordinate system; record the mesh diagram composed of energy nodes, power plant nodes DJ and energy jurisdiction lines as the block mesh diagram; in the specific implementation process, by obtaining the block mesh diagram, the blockchain can be used to visualize the distributed energy under the jurisdiction of each virtual power plant, which is helpful for analyzing all virtual power plants in the same diagram in subsequent analysis, thereby improving the analysis efficiency of all virtual power plants.
[0051] The energy transaction analysis module is used to obtain the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram, establish a preference dimension diagram based on the energy transaction weight and energy acquisition preference, and obtain a transaction dimension diagram based on the preference dimension diagram;
[0052] The energy transaction analysis module includes a dimension map acquisition unit, which is configured with a dimension map acquisition strategy. The dimension map acquisition strategy includes: for any power plant node DJ in the block network diagram n1 , will be governed by the energy line and the power plant node DJ n1 The largest enclosed area surrounded by all connected energy nodes is recorded as the power plant analysis area; for the power plant node DJ n1 For any energy node connected, record the distributed energy corresponding to the energy node as energy α, and obtain the power plant node DJ n1 All transaction orders between the corresponding virtual power plant and energy α are recorded as energy order α1 to energy order α j , use the energy preference algorithm to obtain the energy transaction value between the virtual power plant and energy α. The energy preference algorithm is: , where F is the energy transaction value, T i is the number of days since the i-th energy order α, G c is the transaction amount of the cth energy order α;
[0053] In the specific implementation process, for example, during a data processing, it is obtained that an energy α of the power plant node DJ is solar energy, and the number of days from today and the transaction amount corresponding to all energy orders α are: 10 days and 10,000 yuan, 50 days and 20,000 yuan, 30 days and 10,000 yuan, and 20 days and 10,000 yuan, respectively. By using the energy preference algorithm, it can be obtained that the energy transaction value corresponding to solar energy is about 454.54; by obtaining the energy transaction value of solar energy, the correlation strength between the virtual power plant corresponding to the power plant node DJ and solar energy can be obtained. When the energy transaction value is small, it means that the transaction amount of the solar energy order of the virtual power plant is low or the order is long from now, that is, the correlation is small;
[0054] Get the power plant node DJ n1 The energy transaction value of the corresponding virtual power plant and all distributed energy sources, and the sum of all energy transaction values is recorded as the energy transaction value sum; for any distributed energy corresponding to the virtual power plant, the energy transaction value of the distributed energy is divided by the energy transaction value sum and recorded as the energy transaction weight of the distributed energy; for example, in a data processing, the distributed energy sources under the jurisdiction of the virtual power plant are solar energy and natural gas energy, and the energy transaction values corresponding to solar energy and natural gas energy are 454.54 and 500.46 respectively, then by calculation, it can be obtained that the energy transaction value sum is 955, the energy transaction weight of solar energy is about 0.476, and the energy transaction weight of natural gas energy is about 0.524; by obtaining the energy transaction weight, the transaction proportion of all distributed energy sources under the jurisdiction of the virtual power plant to the virtual power plant can be obtained. The larger the energy transaction weight, the larger the transaction proportion in the virtual power plant; it is helpful to determine the false data detection position of the virtual power plant in subsequent analysis;
[0055] Get the power plant node DJ n1 The corresponding energy trading weights of all distributed energy resources;
[0056] For Power Plant Node DJ n1 For any energy jurisdiction line connected, the length of the energy jurisdiction line is recorded as L0, the energy transaction weight corresponding to the distributed energy connected by the energy jurisdiction line multiplied by the value of L0 is recorded as L1, and the distance from the power plant node DJ in the energy jurisdiction line is recorded as n1 The point with length L1 is recorded as the energy weight focus;
[0057] Get the power plant node DJ n1 The energy rights points corresponding to all energy jurisdiction lines are divided into the energy rights points and the distance from all energy rights points to the power plant node DJ n1 The average value of the distance from the power plant node DJ is recorded as the weighted average value; n1The energy weight point whose distance is greater than the weight average is recorded as the preference weight point, and the distributed energy connected to the preference jurisdiction line where all the preference weight points are located is recorded as the power plant node DJ n1 Energy acquisition preferences, the number of energy acquisition preferences divided by the power plant node DJ n1 The value of the number of all energy jurisdiction lines is denoted as P;
[0058] In the specific implementation process, for example, during a data processing, the energy weight focus of solar energy and the energy weight focus of natural gas energy are 10 meters and 20 meters away from the power plant node DJ respectively. Then, through calculation, it can be obtained that the average weight is 15, and the energy weight focus of natural gas energy is recorded as the preference weight focus, and natural gas energy is recorded as the energy acquisition preference of the power plant node DJ;
[0059] Establish a plane rectangular coordinate system, recorded as the dimensional analysis coordinate system, where the units of the X-axis and Y-axis of the dimensional analysis coordinate system are both meters; n1 The number of energy acquisition preferences is recorded as Q. In the dimensional analysis coordinate system, a regular Q-gon is established with the coordinate origin as the center, recorded as the dimension Q side, wherein the distance between the vertex of the dimension Q-gon and the coordinate origin is 1; in the specific implementation process, when the value of Q is 2, the regular 2-gon can be adjusted to a unit circle, and any two points on the unit circle with a diameter on the circle are set as vertices of the regular 2-gon; when the value of Q is 1, the regular 1-gon can be adjusted to a line segment with a length of 1, and the endpoints of the line segment that are not the coordinate origin are set as vertices of the regular 1-gon;
[0060] Connect all vertices of the dimension Q polygon to the coordinate origin, and record the connecting line as the dimension line; set the dimension point in the dimension line, and the distance of all dimension points from the coordinate origin is the power plant node DJ n1 The energy transaction weights of all energy acquisition preferences corresponding to the virtual power plant can be obtained by obtaining the preference dimension graph, which is helpful for the subsequent determination of the false data detection location of the virtual power plant.
[0061] For any dimension point in the preference dimension diagram, the distance between the dimension point and the coordinate origin is recorded as L2, the energy acquisition preference corresponding to the dimension point is recorded as the dimension preference energy, and the power plant node DJ is recorded as n1 The total transaction amount of all transaction orders of the corresponding virtual power plant and the dimension preference energy is recorded as the total preference transaction amount, and the product of L2 and the total preference transaction amount is recorded as the transaction value; the dimension point is extended to the outside of the regular Q-gon based on the dimension line where it is located, until the distance between the dimension point and the coordinate origin is equal to the transaction value, and the dimension point at this time is recorded as the transaction point;
[0062] Get the transaction points corresponding to all dimension points, and record the largest closed area that can be surrounded by all transaction points as the transaction dimension graph; based on the transaction node DJ n1 The analysis method obtains the transaction dimension graph corresponding to all transaction nodes DJ, and records the transaction dimension graph as the standard dimension graph of the virtual power plant corresponding to the transaction node DJ; in the specific implementation process, by obtaining the transaction dimension graph, the transaction status of all distributed energy sources under the jurisdiction of the transaction power plant corresponding to the transaction node DJ can be obtained. When the transaction data of the transaction power plant changes greatly, the distributed energy sources with large dimensional changes can be intuitively obtained based on the transaction dimension graph, thereby determining the false data detection location.
[0063] The false data detection module is used to detect the data of the virtual power plant based on the transaction dimension graph, and obtain the false data detection position of the virtual power plant based on the detection result; the false data detection module includes a detection position determination unit, and the detection position determination unit is configured with a detection position determination strategy, and the detection position determination strategy includes:
[0064] For any virtual power plant corresponding to a transaction node DJ, every time the virtual power plant completes a distributed energy transaction, the transaction dimension graph of the transaction node corresponding to the virtual power plant is obtained based on the block analysis coordinate system and the dimension analysis coordinate system, and recorded as a real-time dimension graph;
[0065] The real-time dimension graph is overlapped with the standard dimension graph. When the value of the area of the overlapped area divided by the area of the standard dimension graph is less than P, the virtual power plant is recorded as a power plant with large fluctuations; when the value of the area of the overlapped area divided by the area of the standard dimension graph is greater than or equal to P, the virtual power plant is recorded as a power plant with small fluctuations;
[0066] For any transaction point β in the real-time dimension diagram of the power plant with large fluctuations, the transaction point of the standard dimension diagram in the straight line between the coordinate origin and the transaction point β is recorded as the transaction point γ, and the length between the transaction point β and the transaction point γ is recorded as the fluctuation length; the fluctuation lengths corresponding to all transaction points in the real-time dimension diagram of the power plant with large fluctuations are obtained, and the transaction point corresponding to the largest fluctuation length is recorded as the point to be detected; the location of the distributed energy data corresponding to the point to be detected is recorded as the false data detection location;
[0067] In the specific implementation process, for example, in a data analysis, the value of P is 0.5, and the overlapping area of the real-time dimension graph and the standard dimension graph is 10cm², and the area of the standard dimension graph is 25cm². This means that the transaction data of the virtual power plant varies greatly, and the data of the virtual power plant should be tested. Therefore, the virtual power plant is recorded as a power plant with large fluctuations. At the same time, the longer the length of the transaction point β and the transaction point γ in the power plant with large fluctuations, the greater the transaction fluctuation of the distributed energy corresponding to the transaction point β. Therefore, the data of the distributed energy corresponding to the transaction point β can be analyzed in detail.
[0068] Example 2, please refer to Figure 2 As shown, the present application also provides a method for detecting false data of a virtual power plant based on blockchain, comprising the following steps:
[0069] Step S1, obtaining all virtual power plants used for data detection, obtaining the distributed energy resources governed by each virtual power plant based on the blockchain, and establishing a block network diagram based on the obtained results, wherein the nodes in the block network diagram are filled with virtual power plants and distributed energy resources; Step S1 includes the following sub-steps:
[0070] Step S101, establish a plane rectangular coordinate system, recorded as the block analysis coordinate system, wherein the units of the X-axis and the Y-axis of the block analysis coordinate system are both meters; obtain the map locations of all virtual power plants used for data detection, and mark the locations of all virtual power plants in the first quadrant of the block analysis coordinate system in equal proportion; record the points where all virtual power plants are located in the block analysis coordinate system as power plant nodes DJ1 to DJ n ;
[0071] Step S102, based on the blockchain, obtain the distributed energy resources governed by all virtual power plants and store them in the distributed energy library; for any distributed energy resource in the distributed energy library, the power plant node DJ corresponding to the virtual power plant governing the distributed energy resource is recorded as the governing node GJ1 to the governing node GJ k ;
[0072] Step S103: record the largest closed area that can be enclosed by all the jurisdiction nodes GJ as the jurisdiction area, obtain the smallest circumscribed circle of the jurisdiction area, and record it as the jurisdiction circle; record the center of the jurisdiction circle as the energy node, connect the energy node with all the jurisdiction nodes GJ, and record the connecting line as the energy jurisdiction line;
[0073] Step S104, marking the energy nodes and energy jurisdiction lines corresponding to all distributed energy in the block analysis coordinate system; the mesh diagram composed of energy nodes, power plant nodes DJ and energy jurisdiction lines at this time is recorded as a block mesh diagram.
[0074] Step S2, obtaining the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram, establishing a preference dimension diagram based on the energy transaction weight and energy acquisition preference, and obtaining a transaction dimension diagram based on the preference dimension diagram;
[0075] Step S2 includes the following sub-steps: Step S201, for any power plant node DJ in the block network diagram n1 , will be governed by the energy line and the power plant node DJ n1 The largest enclosed area surrounded by all connected energy nodes is recorded as the power plant analysis area; for the power plant node DJ n1For any energy node connected, record the distributed energy corresponding to the energy node as energy α, and obtain the power plant node DJ n1 All transaction orders between the corresponding virtual power plant and energy α are recorded as energy order α1 to energy order α j , use the energy preference algorithm to obtain the energy transaction value between the virtual power plant and energy α. The energy preference algorithm is: , where F is the energy transaction value, T i is the number of days since the i-th energy order α, G c is the transaction amount of the cth energy order α;
[0076] Step S202, obtaining the power plant node DJ n1 The energy transaction value of the corresponding virtual power plant and all distributed energy resources, and the sum of all energy transaction values is recorded as the energy transaction value sum; for any distributed energy corresponding to the virtual power plant, the energy transaction value of the distributed energy divided by the energy transaction value sum is recorded as the energy transaction weight of the distributed energy;
[0077] Step S203, obtaining the power plant node DJ n1 The corresponding energy trading weights of all distributed energy resources;
[0078] Step S204, for the power plant node DJ n1 For any energy jurisdiction line connected, the length of the energy jurisdiction line is recorded as L0, the energy transaction weight corresponding to the distributed energy connected by the energy jurisdiction line multiplied by the value of L0 is recorded as L1, and the distance from the power plant node DJ in the energy jurisdiction line is recorded as n1 The point with length L1 is recorded as the energy weight point; get the power plant node DJ n1 The energy rights points corresponding to all energy jurisdiction lines are divided into the energy rights points and the distance from all energy rights points to the power plant node DJ n1 The average value of the distance from the power plant node DJ is recorded as the weighted average value; n1 The energy weight point whose distance is greater than the weight average is recorded as the preference weight point, and the distributed energy connected to the preference jurisdiction line where all the preference weight points are located is recorded as the power plant node DJ n1 Energy acquisition preferences, the number of energy acquisition preferences divided by the power plant node DJ n1 The value of the number of all energy jurisdiction lines is denoted as P;
[0079] Step S205, establish a plane rectangular coordinate system, recorded as the dimensional analysis coordinate system, wherein the units of the X-axis and the Y-axis of the dimensional analysis coordinate system are both meters; n1 The number of energy acquisition preferences is recorded as Q. In the dimensional analysis coordinate system, a regular Q-gon is established with the coordinate origin as the center, recorded as the dimension Q-gon, where the distance between the vertex of the dimension Q-gon and the coordinate origin is 1;
[0080] Step S206, connect all vertices of the dimension Q polygon with the coordinate origin, and record the connecting line as the dimension line; set the dimension point in the dimension line, and the distance of all the dimension points from the coordinate origin is the power plant node DJ n1 The corresponding energy transaction weights of all energy acquisition preferences; the maximum closed area surrounded by all dimensional points is recorded as the preference dimension graph;
[0081] Step S207: for any dimension point in the preference dimension graph, the distance between the dimension point and the coordinate origin is recorded as L2, the energy acquisition preference corresponding to the dimension point is recorded as the dimension preference energy, and the power plant node DJ is recorded as n1 The total transaction amount of all transaction orders of the corresponding virtual power plant and the dimension preference energy is recorded as the total preference transaction amount, and the product of L2 and the total preference transaction amount is recorded as the transaction value; the dimension point is extended to the outside of the regular Q-gon based on the dimension line where it is located, until the distance between the dimension point and the coordinate origin is equal to the transaction value, and the dimension point at this time is recorded as the transaction point;
[0082] Step S208, obtain the transaction points corresponding to all dimension points, and record the largest closed area that can be surrounded by all transaction points as the transaction dimension graph; based on the transaction node DJ n1 The analysis method obtains the transaction dimension graph corresponding to all transaction nodes DJ, and records the transaction dimension graph as the standard dimension graph of the virtual power plant corresponding to the transaction node DJ.
[0083] Step S3, detecting the data of the virtual power plant based on the transaction dimension graph, and obtaining the false data detection position of the virtual power plant based on the detection result; Step S3 includes the following sub-steps: Step S301, for the virtual power plant corresponding to any transaction node DJ, whenever the virtual power plant completes a distributed energy transaction, obtaining the transaction dimension graph of the transaction node corresponding to the virtual power plant based on the block analysis coordinate system and the dimension analysis coordinate system, and recording it as a real-time dimension graph;
[0084] Step S302, overlap the real-time dimension graph with the standard dimension graph. When the value of the area of the overlapped area divided by the area of the standard dimension graph is less than P, the virtual power plant is recorded as a power plant with large fluctuations; when the value of the area of the overlapped area divided by the area of the standard dimension graph is greater than or equal to P, the virtual power plant is recorded as a power plant with small fluctuations;
[0085] Step S303, for any transaction point β in the real-time dimensional graph of the power plant with large fluctuations, record the transaction point of the standard dimensional graph in the straight line between the coordinate origin and the transaction point β as transaction point γ, and record the length between the transaction point β and the transaction point γ as the fluctuation length; obtain the fluctuation lengths corresponding to all transaction points in the real-time dimensional graph of the power plant with large fluctuations, and record the transaction point corresponding to the largest fluctuation length as the point to be detected; record the location of the distributed energy data corresponding to the point to be detected as the false data detection location.
[0086] Example 3, please refer to Figure 4 As shown, Figure 4 The structural diagram of an electronic device is illustrated, and the electronic device may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in the false data detection method of a virtual power plant based on blockchain are executed to achieve the following functions: first, the distributed energy under the jurisdiction of each virtual power plant is obtained, and a block network diagram is established; then, the energy transaction weight and energy acquisition preference corresponding to the virtual power plant are obtained, and a preference dimension diagram and a transaction dimension diagram are established; finally, the data of the virtual power plant is detected based on the transaction dimension diagram, and the false data detection position of the virtual power plant is obtained based on the detection result.
[0087] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0088] Embodiment 4, the present application also provides a computer-readable storage medium, and the present application provides a storage medium on which a computer program is stored. When the computer program is executed by the processor, the steps in the above-mentioned method for detecting false data of a virtual power plant based on blockchain are executed to achieve the following functions: first, the distributed energy under the jurisdiction of each virtual power plant is obtained, and a block network diagram is established; then, the energy transaction weights and energy acquisition preferences corresponding to the virtual power plant are obtained, and a preference dimension diagram and a transaction dimension diagram are established; finally, the data of the virtual power plant is detected based on the transaction dimension diagram, and the false data detection position of the virtual power plant is obtained based on the detection results.
[0089] Through the description of the above implementation methods, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on such an understanding, the above technical solutions can be essentially or partly contributed to the prior art in the form of software products, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and include several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0090] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting false data of a virtual power plant based on blockchain, characterized in that: The steps include: Obtain all virtual power plants used for data detection, obtain the distributed energy resources governed by each virtual power plant based on the blockchain, and establish a block network diagram based on the obtained results, wherein the nodes in the block network diagram are filled with virtual power plants and distributed energy resources; Obtaining the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram, establishing a preference dimension diagram based on the energy transaction weight and energy acquisition preference, and obtaining a transaction dimension diagram based on the preference dimension diagram; The data of the virtual power plant is detected based on the transaction dimension graph, and the false data detection position of the virtual power plant is obtained based on the detection result; Based on the blockchain, the distributed energy resources under the jurisdiction of each virtual power plant are obtained, and a block network diagram is established based on the obtained results, including: Establish a plane rectangular coordinate system, recorded as the block analysis coordinate system, where the units of the X-axis and Y-axis of the block analysis coordinate system are both meters; obtain the map locations of all virtual power plants used for data detection, and mark the locations of all virtual power plants in the first quadrant of the block analysis coordinate system in equal proportion; record the points where all virtual power plants are located in the block analysis coordinate system as power plant nodes DJ1 to DJ n ; Based on the blockchain, all distributed energy resources under the jurisdiction of the virtual power plant are obtained and stored in the distributed energy library. For any distributed energy in the distributed energy library, the power plant node DJ corresponding to the virtual power plant that governs the distributed energy is recorded as the jurisdiction node GJ1 to the jurisdiction node GJ k ; Obtaining the distributed energy resources governed by each virtual power plant based on the blockchain, and establishing a block network diagram based on the obtained results also includes: The largest enclosed area that can be enclosed by all the jurisdiction nodes GJ is recorded as the jurisdiction area, and the smallest circumscribed circle of the jurisdiction area is obtained and recorded as the jurisdiction circle; the center of the jurisdiction circle is recorded as the energy node, and the energy node is connected to all the jurisdiction nodes GJ, and the connecting line is recorded as the energy jurisdiction line; Mark the energy nodes and energy jurisdiction lines corresponding to all distributed energy in the block analysis coordinate system; record the network diagram composed of energy nodes, power plant nodes DJ and energy jurisdiction lines as the block network diagram; The energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram include: For any power plant node DJ in the block network diagram n1 , will be governed by the energy line and the power plant node DJ n1 The largest enclosed area surrounded by all connected energy nodes is recorded as the power plant analysis area; for the power plant node DJ n1 For any energy node connected, record the distributed energy corresponding to the energy node as energy α, and obtain the power plant node DJ n1 All transaction orders between the corresponding virtual power plant and energy α are recorded as energy order α1 to energy order α j , use the energy preference algorithm to obtain the energy transaction value between the virtual power plant and energy α. The energy preference algorithm is: , where F is the energy transaction value, T i is the number of days since the i-th energy order α, G c is the transaction amount of the cth energy order α; Get the power plant node DJ n1 The energy transaction value of the corresponding virtual power plant and all distributed energy resources, and the sum of all energy transaction values is recorded as the energy transaction value sum; for any distributed energy corresponding to the virtual power plant, the energy transaction value of the distributed energy divided by the energy transaction value sum is recorded as the energy transaction weight of the distributed energy; Get the power plant node DJ n1 The corresponding energy trading weights of all distributed energy resources; Obtaining the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram also includes: For Power Plant Node DJ n1 For any energy jurisdiction line connected, the length of the energy jurisdiction line is recorded as L0, the energy transaction weight corresponding to the distributed energy connected by the energy jurisdiction line multiplied by the value of L0 is recorded as L1, and the distance from the power plant node DJ in the energy jurisdiction line is recorded as n1 The point with length L1 is recorded as the energy weight point; get the power plant node DJ n1 The energy rights points corresponding to all energy jurisdiction lines are divided into the energy rights points and the distance from all energy rights points to the power plant node DJ n1 The average value of the distance from the power plant node DJ is recorded as the weighted average value; n1 The energy weight point whose distance is greater than the weight average is recorded as the preference weight point, and the distributed energy connected to the preference jurisdiction line where all the preference weight points are located is recorded as the power plant node DJ n1 Energy acquisition preferences, the number of energy acquisition preferences divided by the power plant node DJ n1 The value of the number of all energy jurisdiction lines is denoted as P; Establish a plane rectangular coordinate system, recorded as the dimensional analysis coordinate system, where the units of the X-axis and Y-axis of the dimensional analysis coordinate system are both meters; n1 The number of energy acquisition preferences is recorded as Q. In the dimensional analysis coordinate system, a regular Q-gon is established with the coordinate origin as the center, recorded as the dimension Q-gon, where the distance between the vertex of the dimension Q-gon and the coordinate origin is 1; A preference dimension diagram is established based on energy transaction weights and energy acquisition preferences, and a transaction dimension diagram is obtained based on the preference dimension diagram, including: Connect all vertices of the dimension Q polygon to the coordinate origin, and record the connecting line as the dimension line; set the dimension point in the dimension line, and the distance of all dimension points from the coordinate origin is the power plant node DJ n1 The corresponding energy transaction weights of all energy acquisition preferences; the maximum closed area surrounded by all dimensional points is recorded as the preference dimension graph; For any dimension point in the preference dimension diagram, the distance between the dimension point and the coordinate origin is recorded as L2, the energy acquisition preference corresponding to the dimension point is recorded as the dimension preference energy, and the power plant node DJ is recorded as n1 The total transaction amount of all transaction orders of the corresponding virtual power plant and the dimension preference energy is recorded as the total preference transaction amount, and the product of L2 and the total preference transaction amount is recorded as the transaction value; the dimension point is extended to the outside of the regular Q-gon based on the dimension line where it is located, until the distance between the dimension point and the coordinate origin is equal to the transaction value, and the dimension point at this time is recorded as the transaction point; Get the transaction points corresponding to all dimension points, and record the largest closed area that can be surrounded by all transaction points as the transaction dimension graph; based on the transaction node DJ n1 The analysis method is used to obtain the transaction dimension graph corresponding to all transaction nodes DJ, and the transaction dimension graph is recorded as the standard dimension graph of the virtual power plant corresponding to the transaction node DJ; The data of the virtual power plant is detected based on the transaction dimension graph, and the false data detection location of the virtual power plant is obtained based on the detection results, including: For any virtual power plant corresponding to a transaction node DJ, every time the virtual power plant completes a distributed energy transaction, the transaction dimension graph of the transaction node corresponding to the virtual power plant is obtained based on the block analysis coordinate system and the dimension analysis coordinate system, and recorded as a real-time dimension graph; The real-time dimension graph is overlapped with the standard dimension graph. When the value of the area of the overlapped area divided by the area of the standard dimension graph is less than P, the virtual power plant is recorded as a power plant with large fluctuations; when the value of the area of the overlapped area divided by the area of the standard dimension graph is greater than or equal to P, the virtual power plant is recorded as a power plant with small fluctuations; The data of the virtual power plant is detected based on the transaction dimension graph, and the false data detection position of the virtual power plant is obtained based on the detection result, which also includes: For any transaction point β in the real-time dimensional graph of the power plant with large fluctuations, the transaction point of the standard dimensional graph in the straight line between the coordinate origin and the transaction point β is recorded as the transaction point γ, and the length between the transaction point β and the transaction point γ is recorded as the fluctuation length; the fluctuation lengths corresponding to all transaction points in the real-time dimensional graph of the power plant with large fluctuations are obtained, and the transaction point corresponding to the largest fluctuation length is recorded as the point to be detected; the location of the distributed energy data corresponding to the point to be detected is recorded as the false data detection location.
2. A virtual power plant false data detection system based on blockchain, used to implement the virtual power plant false data detection method based on blockchain according to claim 1, characterized in that: It includes a network graph acquisition module, an energy transaction analysis module, and a false data detection module; The mesh acquisition module is used to acquire all virtual power plants used for data detection, acquire the distributed energy resources governed by each virtual power plant based on the blockchain, and establish a block mesh based on the acquisition results, wherein the nodes in the block mesh are filled with virtual power plants and distributed energy resources; The energy transaction analysis module is used to obtain the energy transaction weight and energy acquisition preference corresponding to each virtual power plant based on the block network diagram, establish a preference dimension diagram based on the energy transaction weight and energy acquisition preference, and obtain a transaction dimension diagram based on the preference dimension diagram; The false data detection module is used to detect the data of the virtual power plant based on the transaction dimension graph, and obtain the false data detection position of the virtual power plant based on the detection results.
3. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method as claimed in claim 1 are executed.
Citation Information
Patent Citations
Virtual power plant false data injection attack detection method and device, terminal and medium
CN116127447A
Virtual power plant internal market transaction method and system based on alliance block chain
CN109784926A
Virtual power plant transaction management method based on blockchain technology
CN112465320A