Safety protection method and protection device of virtual power plant and protection system of virtual power plant

By constructing a baseline key matrix and generating a highly random target key matrix using the output power of virtual power plant nodes, and combining this with the RC4 algorithm to encrypt communication data, the risk of key decryption in the virtual power plant system is resolved, thereby improving the system's security and data protection capabilities.

CN118890150APending Publication Date: 2024-11-01GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411131059.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

In existing technologies, virtual power plant systems based on pseudo-random number key generation are at risk of being cracked if multiple key backups are obtained, resulting in insufficient information security.

Method used

A baseline key matrix is ​​constructed by obtaining the actual output power of each node in the virtual power plant. A target random number is generated by combining the output power at the current moment to construct the target key matrix. The communication data is then encrypted using the RC4 algorithm to ensure the randomness and security of the key.

Benefits of technology

Even with partial key leakage, it can still effectively prevent key decryption, thus improving the information security and communication data protection capabilities of the virtual power plant system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890150A_ABST
    Figure CN118890150A_ABST
Patent Text Reader

Abstract

The invention provides a virtual power plant safety protection method and device and a virtual power plant protection system, and the method comprises the steps: obtaining a plurality of first output powers which are the actual output powers, obtained at the current moment, of all nodes of a virtual power plant; at least determining each first output power as an element of a matrix to construct a reference key matrix; determining a corresponding target random number at least according to each first output power and the reference key matrix, and constructing a target key matrix according to the target random number; and intercepting the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypting communication data of each node according to the matrix key sequence. According to the method, the problem that in the prior art, the secret keys are generated based on pseudo-random numbers, and the risk of decoding exists under the condition that multiple secret keys are acquired is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a security protection method, protection device, computer-readable storage medium, processor and virtual power plant protection system for a virtual power plant. Background Art

[0002] With the rapid development of smart grids, the virtual power plant direct control system, as a key monitoring and control facility, has become increasingly important in terms of information security protection. The information directly controlled by the virtual power plant covers multiple dimensions such as the operating status of power equipment, power generation, load conditions, and grid access conditions, as well as remote control instructions, dispatch plans, and operating parameters of the equipment. Real-time monitoring, control, and dispatch of this information are crucial to achieving flexible dispatch of the power system, optimizing operation, improving energy efficiency, and ensuring grid stability.

[0003] The information security risks faced by the virtual power plant direct control system cannot be ignored. Once the system is attacked by hackers or invaded by malware, it may lead to serious consequences such as power grid collapse, large-scale power outages and data leakage, which will have a significant impact on the normal operation of the economy and society. In addition, the virtual power plant direct control system contains a large amount of sensitive user information and power grid operation data. Once leaked, it will not only infringe on user privacy, but also may lead to data abuse. The significance of virtual power plant communication data encryption is to protect the security and privacy of data and prevent data from being accessed, stolen or tampered by unauthorized people or systems.

[0004] By encrypting communication data, it is possible to ensure that sensitive information such as the operation information of the virtual power plant and energy transaction data is not leaked, thereby ensuring the operational stability and commercial interests of the virtual power plant. Encrypted communication data can also prevent malicious attacks and network security threats, and improve the overall security of the virtual power plant system. Although traditional encryption technology provides a certain degree of protection, its key generation may have security vulnerabilities. Once the key is leaked, the security of the entire system will be seriously affected. Summary of the invention

[0005] The main purpose of the present application is to provide a security protection method, protection device, computer-readable storage medium, processor and virtual power plant protection system for a virtual power plant, so as to at least solve the problem in the prior art of generating keys based on pseudo-random numbers, which is at risk of being cracked when multiple keys are obtained.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a security protection method for a virtual power plant is provided, including: obtaining multiple first output powers, where the multiple first output powers are the actual output powers of each node of the virtual power plant obtained at the current moment; at least determining each of the first output powers as an element of a matrix to construct a reference key matrix; determining the corresponding target random number at least based on each of the first output powers and the reference key matrix, and constructing a target key matrix based on the target random number; intercepting the target key matrix at least based on the first output power to obtain a matrix key sequence, and encrypting the communication data of each of the nodes according to the matrix key sequence.

[0007] Optionally, at least determining each of the first output powers as an element of a matrix to construct a reference key matrix includes: obtaining a target number, substituting the target number into a first target formula The matrix side length of the reference key matrix is ​​obtained, and the target side length is obtained. The target number is the number of the nodes, wherein s is the target side length, and n is the target number. round down; determine the matrix capacity of the reference key matrix according to the side length of the matrix, and when the target number is equal to the matrix capacity, fill each of the first output powers into the matrix in turn to obtain the reference key matrix Among them, q t,1 is the first output power of node 1 in time period t.

[0008] Optionally, after determining the matrix capacity of the reference key matrix according to the matrix side length, the method further comprises: when the target number is less than the matrix capacity, substituting the target side length and the target number into a second target formula: Obtain a first target position; fill each of the first output powers into the matrix in sequence to obtain the reference key matrix, and take the first target position as the starting point, and complete the matrix according to the first output power at the corresponding position in sequence to obtain the reference key matrix

[0009] Optionally, determining a corresponding target random number at least according to each of the first output powers and the reference key matrix includes: when the target number is equal to the matrix capacity, substituting each of the first output powers into a third target formula Get the corresponding target random number, where Ran t,d is the target random number of node d in period t, q t,i is the first output power of node i in time period t, q t,d is the first output power of node d in time period t.

[0010] Optionally, determining a corresponding target random number at least according to each of the first output powers and the reference key matrix includes: when the target number is less than the matrix capacity, substituting each of the first output powers into a fourth target formula Get the corresponding target random number, where Ran t,d is the target random number of node d in period t, q t,i is the first output power of node i in time period t, q t,d is the first output power of node d in time period t.

[0011] Optionally, intercepting the target key matrix at least according to the first output power to obtain a matrix key sequence includes: substituting the target number and the target random number corresponding to each of the nodes into a fifth target formula Get the second target position, where Seq t,d is the second target position, Ran t,d is the target random number of node d in time period t; determining a second output power and a third output power according to the reference key matrix, wherein the second output power is the maximum output power in the reference key matrix, and the third output power is the minimum output power in the reference key matrix; substituting the second output power, the third output power and the first output power corresponding to each node into the sixth target formula Get the target sequence length, where Len t,d is the target sequence length, q t,d is the first output power of node d in time period t, q t,min is the third output power, q t,max is the second output power, is rounded up; starting from the second target position, corresponding elements are intercepted from the target key matrix according to the target sequence length to obtain the matrix key sequence.

[0012] Optionally, encrypting the communication data of each of the nodes according to the matrix key sequence includes: encrypting the communication data of each of the nodes at a corresponding moment by using an RC4 algorithm according to the matrix key sequence.

[0013] According to another aspect of the present application, a security protection device for a virtual power plant is provided, the device comprising: a first acquisition unit, used to acquire multiple first output powers, where the multiple first output powers are actual output powers of each node of the virtual power plant acquired at the current moment; a first construction unit, used to at least determine each of the first output powers as an element of a matrix to construct a reference key matrix; a second construction unit, used to determine a corresponding target random number at least based on each of the first output powers and the reference key matrix, and construct a target key matrix based on the target random number; a processing unit, used to intercept the target key matrix at least based on the first output power to obtain a matrix key sequence, and encrypt the communication data of each of the nodes according to the matrix key sequence.

[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described above.

[0015] According to another aspect of the present application, a virtual power plant protection system is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the described methods.

[0016] Applying the technical solution of the present application, in the above-mentioned security protection method for a virtual power plant, first, multiple first output powers are obtained, and the multiple first output powers are the actual output powers of each node of the virtual power plant obtained at the current moment; then, at least each of the above-mentioned first output powers is determined as an element of a matrix to construct a reference key matrix; thereafter, the corresponding target random number is determined at least based on each of the above-mentioned first output powers and the above-mentioned reference key matrix, and a target key matrix is ​​constructed based on the above-mentioned target random number; finally, the above-mentioned target key matrix is ​​intercepted at least based on the above-mentioned first output power to obtain a matrix key sequence, and the communication data of each of the above-mentioned nodes is encrypted according to the above-mentioned matrix key sequence. The present application constructs a benchmark key matrix based on the real-time output power of each node in the virtual power plant during operation, and introduces randomness according to the output power at the current moment combined with the benchmark key matrix to obtain a target key matrix, and then extracts encryption fragments from the target key matrix, and encrypts the communication data based on the encryption fragments using the RC4 algorithm. The real-time output power is used in the key generation process, and the correlation between different nodes is low, which ensures that even if some keys are leaked, all keys cannot be inferred according to the algorithm. This method solves the problem in the prior art of generating keys based on pseudo-random numbers, which is at risk of being cracked when multiple keys are obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A hardware structure block diagram of a mobile terminal according to a virtual power plant security protection method provided in an embodiment of the present application is shown;

[0018] Figure 2 A schematic diagram of a flow chart of a virtual power plant safety protection method provided according to an embodiment of the present application is shown;

[0019] Figure 3 A structural block diagram of a safety protection device for a virtual power plant provided according to an embodiment of the present application is shown.

[0020] The above drawings include the following reference numerals:

[0021] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:

[0026] RC4 algorithm: A byte-based stream encryption algorithm that is widely used in applications such as wireless communications, network protocols, and gaming software due to its simplicity, efficiency, and flexibility.

[0027] S-box: In cryptography, it is a substitution box used in some encryption algorithms to perform byte substitution operations and is an element that obfuscates the statistical characteristics of plaintext. An S-box is usually a fixed, predefined lookup table that replaces an input byte with another byte according to a certain rule, producing a nonlinear transformation.

[0028] As introduced in the background technology, in the prior art, the encryption algorithm key is generated by using a random number generator, and the encryption process is based on the encryption of the communication data text of the encrypted data itself, and the key security is low. In order to solve the problem that the key is generated based on pseudo-random numbers and there is a risk of deciphering when multiple keys are obtained, the embodiments of the present application provide a security protection method, protection device, computer-readable storage medium, processor and virtual power plant protection system for a virtual power plant.

[0029] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a virtual power plant security protection method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0032] In this embodiment, a security protection method for a virtual power plant running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] Figure 2 1 is a flow chart of a security protection method for a virtual power plant according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0034] Step S201, obtaining a plurality of first output powers, where the plurality of first output powers are actual output powers of each node of the virtual power plant obtained at the current moment;

[0035] Specifically, the number of nodes performing power allocation is collected from the virtual power plant and the working status of each power allocation node is monitored in real time to obtain the electric energy output power information corresponding to each node at the current moment as the first output power. The specific acquisition time can be set according to the working conditions of the virtual power plant.

[0036] Step S202, at least determining each of the first output powers as an element of a matrix to construct a reference key matrix;

[0037] Specifically, each of the first output powers obtained is regarded as an element, which is filled into rows and columns of a specific matrix to construct a reference key matrix.

[0038] Step S203, determining corresponding target random numbers at least according to each of the first output powers and the reference key matrix, and constructing a target key matrix according to the target random numbers;

[0039] Specifically, the element data determined according to the first output power is calculated as a target random number using an algorithm, and the target random numbers corresponding to the first output powers in the matrix are placed in the rows and columns of another matrix according to the reference key matrix to construct a target key matrix.

[0040] Step S204: intercepting the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypting the communication data of each of the nodes according to the matrix key sequence.

[0041] Specifically, according to the above-mentioned first output power of each node in the virtual power plant at each moment, some elements are intercepted from the above-mentioned target matrix to increase the randomness of data encryption and form a matrix key sequence. According to the matrix key sequence, the communication data of each power allocation node in the virtual power plant is encrypted using the RC4 algorithm.

[0042] Through this embodiment, first, multiple first output powers are obtained, and the multiple first output powers are the actual output powers of each node of the virtual power plant obtained at the current moment; then, at least each of the first output powers is determined as an element of the matrix to construct a reference key matrix; then, the corresponding target random number is determined at least according to each of the first output powers and the reference key matrix, and the target key matrix is ​​constructed according to the target random number; finally, the target key matrix is ​​intercepted at least according to the first output power to obtain a matrix key sequence, and the communication data of each of the above nodes is encrypted according to the matrix key sequence. This application constructs a reference key matrix based on the real-time output power of each node in the operation process of the virtual power plant, and introduces randomness according to the output power at the current moment combined with the reference key matrix to obtain the target key matrix, and then intercepts the encryption fragment from the target key matrix, and encrypts the communication data based on the encryption fragment using the RC4 algorithm. In the process of generating the key, the real-time output power is used, and the correlation between different nodes is low, which ensures that in the case of partial key leakage, all keys cannot be calculated according to the algorithm. This method solves the problem that the key is generated based on pseudo-random numbers in the prior art, and there is a risk of being deciphered when multiple keys are obtained.

[0043] In order to obtain the reference key matrix, in an optional implementation, the above step S202 includes:

[0044] Step S2021, obtain the target quantity, and substitute the target quantity into the first target formula The matrix side length of the reference key matrix is ​​obtained, the target side length is obtained, and the target number is the number of the nodes, wherein s is the target side length, n is the target number, To round down;

[0045] Specifically, the target number n is obtained according to the number of nodes performing power allocation in the virtual power plant at the current moment. The data at the nodes need to be arranged into an s*s matrix according to the number of nodes, while ensuring that the node data fills the matrix as much as possible. Therefore, the matrix side length of the above-mentioned benchmark key matrix is ​​calculated using the above-mentioned first target formula. The target number may not be fully adapted to the size of the standard matrix, so it may be necessary to round the calculation result down to the nearest integer to ensure the practical application of the matrix.

[0046] Step S2022, determining the matrix capacity of the reference key matrix according to the matrix side length, and when the target number is equal to the matrix capacity, sequentially filling each of the first output powers into the matrix to obtain the reference key matrix Among them, q t,1 is the above-mentioned first output power of node 1 in time period t.

[0047] Specifically, the benchmark key matrix needs to accommodate the data of all nodes, so the element capacity in the matrix needs to be greater than or equal to the above-mentioned target number. When the above-mentioned target number is equal to the above-mentioned matrix capacity, the output power of the node that is currently performing power allocation in the virtual power plant is used as the matrix element and filled into the benchmark key matrix in sequence.

[0048] In order to complete the reference key matrix, in an optional embodiment, after determining the matrix capacity of the reference key matrix according to the side length of the matrix, the method further includes:

[0049] Step S301: when the target number is less than the matrix capacity, substitute the target side length and the target number into the second target formula: The first target position is obtained; each of the first output powers is sequentially filled into the matrix to obtain the reference key matrix, and the first target position is taken as the starting point, and the matrix is ​​sequentially completed according to the first output power of the corresponding position to obtain the reference key matrix

[0050] Specifically, the matrix capacity of the above-mentioned reference key matrix determined according to the above-mentioned matrix side length may not fully adapt to the size of the standard matrix. When the above-mentioned target number is less than the above-mentioned matrix capacity, it is necessary to fill the vacancies in the matrix to avoid the obvious regularity of the arrangement of elements in the reference key matrix and improve the encryption effect. When the side length of the reference key matrix is ​​s and the target number n is less than the matrix capacity, the sequence number of the next bit of the last target node data in the matrix is Based on each of the above first output powers, matrix elements are supplemented in sequence using this as a starting point to obtain a reference key matrix.

[0051] In order to obtain the target random number, in an optional implementation, the above step S203 includes:

[0052] Step S20301: when the target quantity is equal to the matrix capacity, substitute each of the first output powers into the third target formula: Get the corresponding target random number mentioned above, where Ran t,d is the target random number of node d in time period t, q t,i is the first output power of node i in time period t, q t,d is the above-mentioned first output power of node d in time period t.

[0053] Specifically, when the target number in the virtual power plant is equal to the matrix capacity, the target random number is calculated directly using the third target formula according to the first output power sequence of each node, and the corresponding random number is placed in the corresponding position of the matrix according to the node sequence.

[0054] In order to supplement the target random number, in an optional implementation, the above step S203 includes:

[0055] Step S20302: when the target number is less than the matrix capacity, substitute each of the first output powers into the fourth target formula: Get the corresponding target random number mentioned above, where Ran t,d is the target random number of node d in time period t, q t,i is the first output power of node i in time period t, q t,d is the above-mentioned first output power of node d in time period t.

[0056] Specifically, when the target number in the virtual power plant is less than the matrix capacity, it is necessary to supplement the missing elements in the matrix. By calculating the output power data of each power allocation node through the above-mentioned fourth target formula, a true random number less than 1 can be obtained, which is used to fill the missing element positions in the matrix in sequence.

[0057] In order to obtain the matrix key sequence, in an optional embodiment, the above step S204 includes:

[0058] Step S20401, substitute the target quantity and the target random number corresponding to each of the nodes into the fifth target formula Get the second target position, where Seq t,d is the second target position mentioned above, Ran t,d is the above target random number of node d in time period t;

[0059] Specifically, the target random number is multiplied by the matrix capacity and rounded to an integer to obtain the initial point of the matrix key sequence, i.e., the second target position. Since the matrix sequence has no 0 bit, if the target random number is 0 or the initial point of the matrix key sequence obtained by calculation is 0, the second target position is replaced by the first position of the matrix sequence.

[0060] Step S20402, determining a second output power and a third output power according to the reference key matrix, wherein the second output power is the maximum output power in the reference key matrix, and the third output power is the minimum output power in the reference key matrix;

[0061] Specifically, the maximum output power and the minimum output power of the node at the current moment are determined according to the output power of each power dispatch node in the above-mentioned benchmark key matrix, that is, the maximum value among all elements of the benchmark key matrix is ​​taken as the above-mentioned second output power, and the minimum value is taken as the above-mentioned third output power, so as to obtain the variation range of the output power of all power dispatch nodes in the virtual power plant.

[0062] Step S20403: Substitute the second output power, the third output power, and the first output power corresponding to each of the nodes into the sixth target formula: Get the target sequence length, where Len t,d is the target sequence length, q t,d is the first output power of node d in time period t, q t,min is the third output power mentioned above, q t,max is the second output power mentioned above, To round up;

[0063] Specifically, according to the proportion of the output power of each power dispatch node in the virtual power plant in the output power variation range of all nodes at the corresponding moment, it is mapped to between 16 and 256 bytes according to the above-mentioned sixth target formula to obtain the length of the matrix key sequence. To ensure sufficient security, the key length should be set to at least 16 bytes.

[0064] Step S20404, starting from the second target position, extracting corresponding elements from the target key matrix according to the target sequence length to obtain the matrix key sequence.

[0065] Specifically, the initial point of the key sequence at the current moment can be obtained according to the above-mentioned second target position, and the key length at the current moment can be obtained according to the above-mentioned target sequence length. The node output power byte corresponding to the initial point of the key sequence is read backward in the above-mentioned target key matrix in sequence, and the number of bytes read is the corresponding key sequence length. If the key sequence length is not satisfied after reading all the key matrix elements after the second target position, return to the first element in the target key matrix and start reading until the length of the read element satisfies the target sequence length, and the above-mentioned matrix key sequence is obtained.

[0066] In order to encrypt the communication data, in an optional embodiment, the above step S204 includes:

[0067] S20411, encrypting the communication data of each of the above nodes at the corresponding time using the RC4 algorithm according to the above matrix key sequence.

[0068] Specifically, the S-box is first initialized according to the above-mentioned matrix key sequence to obtain a key stream, and then the key stream is used to encrypt the communication data of each of the above-mentioned nodes at the corresponding moment. Since the length of the above-mentioned matrix key sequence is random, and each byte in the key also changes according to the output of the current node, it has randomness, which increases the randomness of the key and improves the effect and security of data encryption.

[0069] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0070] The embodiment of the present application also provides a safety protection device for a virtual power plant. It should be noted that the safety protection device for a virtual power plant in the embodiment of the present application can be used to execute the safety protection method for a virtual power plant provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0071] The following is an introduction to the safety protection device of the virtual power plant provided in the embodiment of the present application.

[0072] Figure 3 is a structural block diagram of a safety protection device for a virtual power plant according to an embodiment of the present application. Figure 3 As shown, the device comprises:

[0073] A first acquisition unit 10 is used to acquire a plurality of first output powers, where the plurality of first output powers are actual output powers of each node of the virtual power plant acquired at a current moment;

[0074] Specifically, the number of nodes performing power allocation is collected from the virtual power plant and the working status of each power allocation node is monitored in real time to obtain the electric energy output power information corresponding to each node at the current moment as the first output power. The specific acquisition time can be set according to the working conditions of the virtual power plant.

[0075] A first constructing unit 20, configured to at least determine each of the first output powers as an element of a matrix to construct a reference key matrix;

[0076] Specifically, each of the first output powers obtained is regarded as an element, which is filled into rows and columns of a specific matrix to construct a reference key matrix.

[0077] A second construction unit 30, configured to determine a corresponding target random number at least according to each of the first output powers and the reference key matrix, and to construct a target key matrix according to the target random number;

[0078] Specifically, the element data determined according to the first output power is calculated as a target random number using an algorithm, and the target random numbers corresponding to the first output powers in the matrix are placed in the rows and columns of another matrix according to the reference key matrix to construct a target key matrix.

[0079] The processing unit 40 is configured to intercept the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypt the communication data of each of the nodes according to the matrix key sequence.

[0080] Specifically, according to the above-mentioned first output power of each node in the virtual power plant at each moment, some elements are intercepted from the above-mentioned target matrix to increase the randomness of data encryption and form a matrix key sequence. According to the matrix key sequence, the communication data of each power allocation node in the virtual power plant is encrypted using the RC4 algorithm.

[0081] Through this embodiment, the first construction unit obtains multiple first output powers, and the multiple first output powers are the actual output powers of each node of the virtual power plant obtained at the current moment; the first construction unit at least determines each of the first output powers as an element of the matrix to construct a reference key matrix; the second construction unit at least determines the corresponding target random number according to each of the first output powers and the reference key matrix, and constructs a target key matrix according to the target random number; the processing unit intercepts the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypts the communication data of each of the above nodes according to the matrix key sequence. This application constructs a reference key matrix based on the real-time output power of each node in the operation process of the virtual power plant, and introduces randomness according to the output power at the current moment combined with the reference key matrix to obtain the target key matrix, and then intercepts the encryption fragment from the target key matrix, and encrypts the communication data based on the encryption fragment using the RC4 algorithm. In the process of generating the key, the real-time output power is used, and the correlation between different nodes is low, which ensures that in the case of partial key leakage, it is impossible to deduce all the keys according to the algorithm. This method solves the problem that the key is generated based on pseudo-random numbers in the prior art, and there is a risk of being deciphered when multiple keys are obtained.

[0082] In order to obtain a reference key matrix, in an optional implementation, the first construction unit includes:

[0083] Get subunit, used to get the target quantity, substitute the above target quantity into the first target formula The matrix side length of the reference key matrix is ​​obtained, the target side length is obtained, and the target number is the number of the nodes, wherein s is the target side length, n is the target number, To round down;

[0084] Specifically, the target number n is obtained according to the number of nodes performing power allocation in the virtual power plant at the current moment. The data at the nodes need to be arranged into an s*s matrix according to the number of nodes, while ensuring that the node data fills the matrix as much as possible. Therefore, the matrix side length of the above-mentioned benchmark key matrix is ​​calculated using the above-mentioned first target formula. The target number may not be fully adapted to the size of the standard matrix, so it may be necessary to round the calculation result down to the nearest integer to ensure the practical application of the matrix.

[0085] The first construction subunit is used to determine the matrix capacity of the reference key matrix according to the side length of the matrix, and when the target number is equal to the matrix capacity, fill the first output powers into the matrix in sequence to obtain the reference key matrix Among them, q t,1 is the above-mentioned first output power of node 1 in time period t.

[0086] Specifically, the benchmark key matrix needs to accommodate the data of all nodes, so the element capacity in the matrix needs to be greater than or equal to the above-mentioned target number. When the above-mentioned target number is equal to the above-mentioned matrix capacity, the output power of the node that is currently performing power allocation in the virtual power plant is used as the matrix element and filled into the benchmark key matrix in sequence.

[0087] In order to complete the reference key matrix, in an optional embodiment, the above-mentioned device further includes:

[0088] The third construction unit is used to substitute the target side length and the target number into the second target formula when the target number is less than the matrix capacity. The first target position is obtained; each of the first output powers is sequentially filled into the matrix to obtain the reference key matrix, and the first target position is taken as the starting point, and the matrix is ​​sequentially completed according to the first output power of the corresponding position to obtain the reference key matrix

[0089]

[0090] Specifically, the matrix capacity of the above-mentioned reference key matrix determined according to the above-mentioned matrix side length may not fully adapt to the size of the standard matrix. When the above-mentioned target number is less than the above-mentioned matrix capacity, it is necessary to fill the vacancies in the matrix to avoid the obvious regularity of the arrangement of elements in the reference key matrix and improve the encryption effect. When the side length of the reference key matrix is ​​s and the target number n is less than the matrix capacity, the sequence number of the next bit of the last target node data in the matrix is Based on each of the above first output powers, matrix elements are supplemented in sequence using this as a starting point to obtain a reference key matrix.

[0091] In order to obtain a target random number, in an optional implementation, the second construction unit includes:

[0092] The first calculation subunit is used to substitute each of the first output powers into the third target formula when the target number is equal to the matrix capacity. Get the corresponding target random number mentioned above, where Ran t,d is the target random number of node d in time period t, q t,i is the first output power of node i in time period t, q t,d is the above-mentioned first output power of node d in time period t.

[0093] Specifically, when the target number in the virtual power plant is equal to the matrix capacity, the target random number is calculated directly using the third target formula according to the first output power sequence of each node, and the corresponding random number is placed in the corresponding position of the matrix according to the node sequence.

[0094] In order to supplement the target random number, in an optional implementation, the second construction unit includes:

[0095] The second calculation subunit is used to substitute each of the first output powers into the fourth target formula when the target number is less than the matrix capacity. Get the corresponding target random number mentioned above, where Ran t,d is the target random number of node d in time period t, q t,i is the first output power of node i in time period t, q t,d is the above-mentioned first output power of node d in time period t.

[0096] Specifically, when the target number in the virtual power plant is less than the matrix capacity, it is necessary to supplement the missing elements in the matrix. By calculating the output power data of each power allocation node through the above-mentioned fourth target formula, a true random number less than 1 can be obtained, which is used to fill the missing element positions in the matrix in sequence.

[0097] In order to obtain the matrix key sequence, in an optional embodiment, the processing unit includes:

[0098] The third calculation subunit is used to substitute the target quantity and the target random number corresponding to each of the nodes into the fifth target formula Get the second target position, where Seq t,d is the second target position mentioned above, Ran t,d is the above target random number of node d in time period t;

[0099] Specifically, the target random number is multiplied by the matrix capacity and rounded to an integer to obtain the initial point of the matrix key sequence, i.e., the second target position. Since the matrix sequence has no 0 bit, if the target random number is 0 or the initial point of the matrix key sequence obtained by calculation is 0, the second target position is replaced by the first position of the matrix sequence.

[0100] A determination subunit, configured to determine a second output power and a third output power according to the reference key matrix, wherein the second output power is a maximum output power in the reference key matrix, and the third output power is a minimum output power in the reference key matrix;

[0101] Specifically, the maximum output power and the minimum output power of the node at the current moment are determined according to the output power of each power dispatch node in the above-mentioned benchmark key matrix, that is, the maximum value among all elements of the benchmark key matrix is ​​taken as the above-mentioned second output power, and the minimum value is taken as the above-mentioned third output power, so as to obtain the variation range of the output power of all power dispatch nodes in the virtual power plant.

[0102] The fourth calculation unit is used to substitute the second output power, the third output power and the first output power corresponding to each of the nodes into the sixth target formula Get the target sequence length, where Len t,d is the target sequence length, q t,d is the first output power of node d in time period t, q t,min is the third output power mentioned above, q t,max is the second output power mentioned above, To round up;

[0103] Specifically, according to the proportion of the output power of each power dispatch node in the virtual power plant in the output power variation range of all nodes at the corresponding moment, it is mapped to between 16 and 256 bytes according to the above-mentioned sixth target formula to obtain the length of the matrix key sequence. To ensure sufficient security, the key length should be set to at least 16 bytes.

[0104] The second construction subunit is used to start from the second target position and extract corresponding elements from the target key matrix according to the target sequence length to obtain the matrix key sequence.

[0105] Specifically, the initial point of the key sequence at the current moment can be obtained according to the above-mentioned second target position, and the key length at the current moment can be obtained according to the above-mentioned target sequence length. The node output power byte corresponding to the initial point of the key sequence is read backward in the above-mentioned target key matrix in sequence, and the number of bytes read is the corresponding key sequence length. If the key sequence length is not satisfied after reading all the key matrix elements after the second target position, return to the first element in the target key matrix and start reading until the length of the read element satisfies the target sequence length, and the above-mentioned matrix key sequence is obtained.

[0106] In order to encrypt the communication data, in an optional embodiment, the processing unit includes:

[0107] The processing subunit is used to encrypt the communication data of each of the above nodes at the corresponding time by using the RC4 algorithm according to the above matrix key sequence.

[0108] Specifically, the S-box is first initialized according to the above-mentioned matrix key sequence to obtain a key stream, and then the key stream is used to encrypt the communication data of each of the above-mentioned nodes at the corresponding moment. Since the length of the above-mentioned matrix key sequence is random, and each byte in the key also changes according to the output of the current node, it has randomness, which increases the randomness of the key and improves the effect and security of data encryption.

[0109] The safety protection device of the virtual power plant includes a processor and a memory. The first acquisition unit, the first construction unit, the second construction unit, the processing unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.

[0110] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and information security can be improved by adjusting kernel parameters.

[0111] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0112] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the security protection method of the virtual power plant.

[0113] Specifically, the security protection methods of virtual power plants include:

[0114] Step S201, obtaining a plurality of first output powers, where the plurality of first output powers are actual output powers of each node of the virtual power plant obtained at the current moment;

[0115] Specifically, the number of nodes performing power allocation is collected from the virtual power plant and the working status of each power allocation node is monitored in real time to obtain the electric energy output power information corresponding to each node at the current moment as the first output power. The specific acquisition time can be set according to the working conditions of the virtual power plant.

[0116] Step S202, at least determining each of the first output powers as an element of a matrix to construct a reference key matrix;

[0117] Specifically, each of the first output powers obtained is regarded as an element, which is filled into rows and columns of a specific matrix to construct a reference key matrix.

[0118] Step S203, determining corresponding target random numbers at least according to each of the first output powers and the reference key matrix, and constructing a target key matrix according to the target random numbers;

[0119] Specifically, the element data determined according to the first output power is calculated as a target random number using an algorithm, and the target random numbers corresponding to the first output powers in the matrix are placed in the rows and columns of another matrix according to the reference key matrix to construct a target key matrix.

[0120] Step S204: intercepting the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypting the communication data of each of the nodes according to the matrix key sequence.

[0121] Specifically, according to the above-mentioned first output power of each node in the virtual power plant at each moment, some elements are intercepted from the above-mentioned target matrix to increase the randomness of data encryption and form a matrix key sequence. According to the matrix key sequence, the communication data of each power allocation node in the virtual power plant is encrypted using the RC4 algorithm.

[0122] An embodiment of the present invention provides a processor, which is used to run a program, wherein the security protection method of the virtual power plant is executed when the program is running.

[0123] Specifically, the security protection methods of virtual power plants include:

[0124] Step S201, obtaining a plurality of first output powers, where the plurality of first output powers are actual output powers of each node of the virtual power plant obtained at the current moment;

[0125] Specifically, the number of nodes performing power allocation is collected from the virtual power plant and the working status of each power allocation node is monitored in real time to obtain the electric energy output power information corresponding to each node at the current moment as the first output power. The specific acquisition time can be set according to the working conditions of the virtual power plant.

[0126] Step S202, at least determining each of the first output powers as an element of a matrix to construct a reference key matrix;

[0127] Specifically, each of the first output powers obtained is regarded as an element, which is filled into rows and columns of a specific matrix to construct a reference key matrix.

[0128] Step S203, determining corresponding target random numbers at least according to each of the first output powers and the reference key matrix, and constructing a target key matrix according to the target random numbers;

[0129] Specifically, the element data determined according to the first output power is calculated as a target random number using an algorithm, and the target random numbers corresponding to the first output powers in the matrix are placed in the rows and columns of another matrix according to the reference key matrix to construct a target key matrix.

[0130] Step S204: intercepting the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypting the communication data of each of the nodes according to the matrix key sequence.

[0131] Specifically, according to the above-mentioned first output power of each node in the virtual power plant at each moment, some elements are intercepted from the above-mentioned target matrix to increase the randomness of data encryption and form a matrix key sequence. According to the matrix key sequence, the communication data of each power allocation node in the virtual power plant is encrypted using the RC4 algorithm.

[0132] An embodiment of the present invention provides a virtual power plant protection system, the virtual power plant protection system includes a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:

[0133] Step S201, obtaining a plurality of first output powers, where the plurality of first output powers are actual output powers of each node of the virtual power plant obtained at the current moment;

[0134] Specifically, the number of nodes performing power allocation is collected from the virtual power plant and the working status of each power allocation node is monitored in real time to obtain the electric energy output power information corresponding to each node at the current moment as the first output power. The specific acquisition time can be set according to the working conditions of the virtual power plant.

[0135] Step S202, at least determining each of the first output powers as an element of a matrix to construct a reference key matrix;

[0136] Specifically, each of the first output powers obtained is regarded as an element, which is filled into rows and columns of a specific matrix to construct a reference key matrix.

[0137] Step S203, determining corresponding target random numbers at least according to each of the first output powers and the reference key matrix, and constructing a target key matrix according to the target random numbers;

[0138] Specifically, the element data determined according to the first output power is calculated as a target random number using an algorithm, and the target random numbers corresponding to the first output powers in the matrix are placed in the rows and columns of another matrix according to the reference key matrix to construct a target key matrix.

[0139] Step S204: intercepting the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypting the communication data of each of the nodes according to the matrix key sequence.

[0140] Specifically, according to the above-mentioned first output power of each node in the virtual power plant at each moment, some elements are intercepted from the above-mentioned target matrix to increase the randomness of data encryption and form a matrix key sequence. According to the matrix key sequence, the communication data of each power allocation node in the virtual power plant is encrypted using the RC4 algorithm.

[0141] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0142] Step S201, obtaining a plurality of first output powers, where the plurality of first output powers are actual output powers of each node of the virtual power plant obtained at the current moment;

[0143] Specifically, the number of nodes performing power allocation is collected from the virtual power plant and the working status of each power allocation node is monitored in real time to obtain the electric energy output power information corresponding to each node at the current moment as the first output power. The specific acquisition time can be set according to the working conditions of the virtual power plant.

[0144] Step S202, at least determining each of the first output powers as an element of a matrix to construct a reference key matrix;

[0145] Specifically, each of the first output powers obtained is regarded as an element, which is filled into rows and columns of a specific matrix to construct a reference key matrix.

[0146] Step S203, determining corresponding target random numbers at least according to each of the first output powers and the reference key matrix, and constructing a target key matrix according to the target random numbers;

[0147] Specifically, the element data determined according to the first output power is calculated as a target random number using an algorithm, and the target random numbers corresponding to the first output powers in the matrix are placed in the rows and columns of another matrix according to the reference key matrix to construct a target key matrix.

[0148] Step S204: intercepting the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypting the communication data of each of the nodes according to the matrix key sequence.

[0149] Specifically, according to the above-mentioned first output power of each node in the virtual power plant at each moment, some elements are intercepted from the above-mentioned target matrix to increase the randomness of data encryption and form a matrix key sequence. According to the matrix key sequence, the communication data of each power allocation node in the virtual power plant is encrypted using the RC4 algorithm.

[0150] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0151] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

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

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

[0154] 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 A step that specifies a function in one or more boxes.

[0155] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0156] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0157] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0158] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0159] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0160] 1) The security protection method for the virtual power plant of the present application first obtains multiple first output powers, where the multiple first output powers are the actual output powers of each node of the virtual power plant obtained at the current moment; then, at least each of the above-mentioned first output powers is determined as an element of a matrix to construct a reference key matrix; thereafter, the corresponding target random number is determined at least based on each of the above-mentioned first output powers and the above-mentioned reference key matrix, and a target key matrix is ​​constructed based on the above-mentioned target random number; finally, the above-mentioned target key matrix is ​​intercepted at least based on the above-mentioned first output power to obtain a matrix key sequence, and the communication data of each of the above-mentioned nodes is encrypted according to the above-mentioned matrix key sequence. The present application constructs a benchmark key matrix based on the real-time output power of each node in the virtual power plant during operation, and introduces randomness according to the output power at the current moment combined with the benchmark key matrix to obtain a target key matrix, and then extracts encryption fragments from the target key matrix, and encrypts the communication data based on the encryption fragments using the RC4 algorithm. The real-time output power is used in the key generation process, and the correlation between different nodes is low, which ensures that even if some keys are leaked, all keys cannot be inferred according to the algorithm. This method solves the problem in the prior art of generating keys based on pseudo-random numbers, which is at risk of being cracked when multiple keys are obtained.

[0161] 2) The security protection device of the virtual power plant of the present application, the first construction unit obtains multiple first output powers, and the multiple first output powers are the actual output powers of each node of the virtual power plant obtained at the current moment; the first construction unit at least determines each of the above-mentioned first output powers as an element of the matrix to construct a reference key matrix; the second construction unit determines the corresponding target random number at least based on each of the above-mentioned first output powers and the above-mentioned reference key matrix, and constructs a target key matrix based on the above-mentioned target random number; the processing unit intercepts the above-mentioned target key matrix at least based on the above-mentioned first output power to obtain a matrix key sequence, and encrypts the communication data of each of the above-mentioned nodes according to the above-mentioned matrix key sequence. The present application constructs a benchmark key matrix based on the real-time output power of each node in the virtual power plant during operation, and introduces randomness according to the output power at the current moment combined with the benchmark key matrix to obtain a target key matrix, and then extracts encryption fragments from the target key matrix, and encrypts the communication data based on the encryption fragments using the RC4 algorithm. The real-time output power is used in the key generation process, and the correlation between different nodes is low, which ensures that even if some keys are leaked, all keys cannot be inferred according to the algorithm. This method solves the problem in the prior art of generating keys based on pseudo-random numbers, which is at risk of being cracked when multiple keys are obtained.

[0162] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A security protection method for a virtual power plant, characterized in that: include: Acquire multiple first output powers, where the multiple first output powers are actual output powers of each node of the virtual power plant acquired at the current moment; At least determining each of the first output powers as an element of a matrix to construct a reference key matrix; Determine a corresponding target random number at least according to each of the first output powers and the reference key matrix, and construct a target key matrix according to the target random number; The target key matrix is ​​intercepted at least according to the first output power to obtain a matrix key sequence, and the communication data of each node is encrypted according to the matrix key sequence.

2. The method according to claim 1, characterized in that At least determining each of the first output powers as an element of a matrix to construct a reference key matrix includes: Get the target quantity and substitute the target quantity into the first target formula The matrix side length of the reference key matrix is ​​obtained, and the target side length is obtained. The target number is the number of the nodes, wherein s is the target side length, and n is the target number. To round down; Determine the matrix capacity of the reference key matrix according to the matrix side length, and when the target number is equal to the matrix capacity, fill each of the first output powers into the matrix in sequence to obtain the reference key matrix Among them, q t,1 is the first output power of node 1 in time period t.

3. The method according to claim 2, characterized in that After determining the matrix capacity of the reference key matrix according to the matrix side length, the method further comprises: When the target number is less than the matrix capacity, substitute the target side length and the target number into the second target formula Get the first target position; The first output powers are sequentially filled into the matrix to obtain the reference key matrix, and the first target position is taken as the starting point, and the matrix is ​​sequentially completed according to the first output powers at the corresponding positions to obtain the reference key matrix 4. The method according to claim 2, characterized in that: Determining a corresponding target random number at least according to each of the first output powers and the reference key matrix includes: When the target number is equal to the matrix capacity, each of the first output powers is substituted into the third target formula Get the corresponding target random number, where Ran t,d is the target random number of node d in period t, q t,i is the first output power of node i in time period t, q t,d is the first output power of node d in time period t.

5. The method according to claim 3, characterized in that: Determining a corresponding target random number at least according to each of the first output powers and the reference key matrix includes: When the target number is less than the matrix capacity, each of the first output powers is substituted into the fourth target formula Get the corresponding target random number, where Ran t,d is the target random number of node d in period t, q t,i is the first output power of node i in time period t, q t,d is the first output power of node d in time period t.

6. The method according to claim 2, characterized in that At least according to the first output power, the target key matrix is ​​intercepted to obtain a matrix key sequence, including: Substitute the target quantity and the target random number corresponding to each node into the fifth target formula Get the second target position, where Seq t,d is the second target position, Ran t,d is the target random number of node d in time period t; Determine a second output power and a third output power according to the reference key matrix, wherein the second output power is a maximum output power in the reference key matrix, and the third output power is a minimum output power in the reference key matrix; Substitute the second output power, the third output power and the first output power corresponding to each node into the sixth target formula Get the target sequence length, where Len t,d is the target sequence length, q t,d is the first output power of node d in period t, q t,min is the third output power, q t,max is the second output power, To round up; Starting from the second target position, corresponding elements are intercepted from the target key matrix according to the target sequence length to obtain the matrix key sequence.

7. The method according to claim 1, characterized in that Encrypting the communication data of each of the nodes according to the matrix key sequence includes: The communication data of each of the nodes at the corresponding time is encrypted using the RC4 algorithm according to the matrix key sequence.

8. A safety protection device for a virtual power plant, characterized in that: The device comprises: A first acquisition unit, used to acquire a plurality of first output powers, where the plurality of first output powers are actual output powers of each node of the virtual power plant acquired at a current moment; a first constructing unit, configured to at least determine each of the first output powers as an element of a matrix to construct a reference key matrix; a second constructing unit, at least determining a corresponding target random number according to each of the first output powers and the reference key matrix, and constructing a target key matrix according to the target random number; A processing unit is configured to intercept the target key matrix at least according to the first output power to obtain a matrix key sequence, and encrypt the communication data of each of the nodes according to the matrix key sequence.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

10. A virtual power plant protection system, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of claims 1 to 7.