A micro-safety isolation device and a lightweight network safety isolation method

Through the micro-security isolation device, identity authentication and data encryption are implemented in communication between massive distributed resources and the power grid system, the risk of network attacks faced by the power grid system is solved, high security of secure isolation and business interaction is achieved, and multiple protection mechanisms are provided.

CN118590312BActive Publication Date: 2024-11-19STATE GRID SHANGHAI ENERGY INTERCONNECTION RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411046207.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-11-19
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

The lack of security isolation measures for the communication network of massive distributed resources and power grid systems has led to the intensification of the risk of network attacks in the power grid. In particular, the interaction between distributed photovoltaic inverters and Internet platforms lacks identity authentication and data encryption, which increases the difficulty and cost of attacks.

Method used

Provide a micro-security isolation device, including a protocol conversion unit and an interface adapter unit, adopts identity authentication and data encryption measures, and realizes the power grid terminal equipment and distributed resources through digital certificate verification, key negotiation and session key calculation. and safe communication, and safe identification of the regulatory instructions issued by the monitoring platform, and build a secure isolation belt between distributed resources and power grid terminals.

Benefits of technology

It realizes physical isolation between the power grid system and the monitoring platform, meets the confidentiality, integrity, resistance to reproducibility and replay security requirements of business interactions, and has protocol content filtering, protocol conversion, secure operation and maintenance, malicious traffic monitoring and Protection mechanisms such as blocking and security identification of key commands have reduced the risk of cyber attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590312B_ABST
    Figure CN118590312B_ABST
Patent Text Reader

Abstract

The present invention relates to a micro-safety isolation device and a lightweight network safety isolation method, wherein the device comprises: a protocol conversion unit, comprising: a controller, used to realize the conversion of the communication protocol between the power grid terminal equipment and the distributed resources; an interface adapter unit, comprising: a first microcontroller, the downlink of the first microcontroller is connected to the distributed resources, and the uplink is connected to the control end of the gate switch; the first end of the gate switch is connected to the protocol conversion unit, and the second end is connected to the second microcontroller; a second microcontroller, the downlink of the second microcontroller is connected to the second end of the gate switch, and the uplink is connected to the monitoring platform. The present invention can prevent attacks from the Internet from invading power grid equipment and build a safety isolation zone between distributed resources and power grid terminals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and in particular to a micro security isolation device and a lightweight network security isolation method. Background Art

[0002] Under the background of new power system construction, massive distributed resources such as distributed photovoltaics, charging piles, and distributed energy storage are connected to the distribution network on a large scale and interact with the power grid. The opening of the communication network of massive distributed resources increases the exposure scope of network security and the risk of attack spread. In addition, some devices simultaneously interact with the power grid system and the own monitoring platform deployed on the Internet (such as photovoltaic operator platform, manufacturer monitoring platform, etc.), which poses a challenge to the network security of the distribution network. The main security risks are as follows:

[0003] (1) Distributed photovoltaic inverters and other non-grid assets are connected to both the self-owned monitoring platform (Internet) and the grid monitoring system (power intranet) at the same time, lacking security isolation measures, which increases the risk of the grid being attacked by cyber attacks from the Internet;

[0004] (2) The local communication network between power grid terminal equipment and massive distributed resources is open. Whether it is high-speed carrier HPLC or micro-power wireless RF, it can be easily monitored (obtaining data) or coupled (sending data). The difficulty and cost of attack are very low.

[0005] Existing patent document CN116231723A discloses a device and method for controlling a photovoltaic inverter based on a fusion terminal, which discloses that the photovoltaic inverter communicates with a plug-and-play unit, and the plug-and-play unit communicates with the fusion terminal through the power line carrier 645 protocol. Although the plug-and-play unit and the fusion terminal use a power line carrier communication method, identity authentication and data encryption measures are not taken between the two parties, and the photovoltaic inverter does not perform security authentication on the control instructions issued by the monitoring platform. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a micro safety isolation device and a lightweight network security isolation method, which can prevent attacks from the Internet from invading power grid equipment and build a safe "isolation zone" between distributed resources and power grid terminals.

[0007] The technical solution adopted by the present invention to solve the technical problem is: to provide a micro safety isolation device, comprising:

[0008] Protocol conversion unit, including:

[0009] A controller for realizing the conversion of communication protocols between power grid terminal equipment and distributed resources;

[0010] The interface adapter unit comprises:

[0011] A first microcontroller, wherein the downlink of the first microcontroller is connected to the distributed resource, and the uplink is connected to the control end of the strobe switch; the first end of the strobe switch is connected to the protocol conversion unit, and the second end is connected to the second microcontroller;

[0012] A second microcontroller, wherein the downlink of the second microcontroller is connected to the second end of the selection switch, and the uplink is connected to the monitoring platform.

[0013] The protocol conversion unit also includes: a first security module, which is used to implement identity authentication and data encryption / decryption with the power grid terminal device.

[0014] The interface adapter unit also includes: a second security module, which is used to perform security authentication on the control instructions issued by the monitoring platform.

[0015] The technical solution adopted by the present invention to solve the technical problem is: to provide a lightweight network security isolation method, using the above-mentioned micro-security isolation device, when performing the encryption authentication process, specifically including the following steps:

[0016] After the protocol conversion unit establishes a communication connection with the power grid terminal device, the protocol conversion unit determines whether a digital certificate of the power grid terminal device is stored;

[0017] If the protocol conversion unit stores the digital certificate of the power grid terminal device and has not received the digital certificate exchange process initiated by the power grid terminal device, receiving an identity authentication request with a digital signature initiated by the power grid terminal device;

[0018] The protocol conversion unit uses the first security module to verify the signature of the identity authentication request, and after the signature verification is passed, generates a digital signature and sends it to the power grid terminal device;

[0019] The protocol conversion unit receives the key negotiation factor sent by the power grid terminal device, and calculates a session key according to the key negotiation factor.

[0020] If the protocol conversion unit does not store the digital certificate of the power grid terminal device, a digital certificate exchange process is initiated to the power grid terminal device, the digital certificate issued by the power grid terminal device is received, and the validity of the received digital certificate is verified, and the digital certificate is stored after the verification is passed.

[0021] When the distributed resource interacts with the power grid terminal device, the following steps are specifically included:

[0022] The controller receives the message sent by the power grid terminal device, and strips the application layer data from the message, and uses the first security module to decrypt and verify the integrity of the stripped application layer data, and then uses the controller to convert the decrypted application layer data into distributed resource application layer protocol data, and stores it in a buffer;

[0023] The first microcontroller controls the selection switch to switch to the first end connection state, and sends a query service data instruction to the controller;

[0024] After receiving the query service data instruction, the controller sends the distributed resource application layer protocol data in the buffer to the first microcontroller;

[0025] The first microcontroller encapsulates the distributed resource application layer protocol data into a message and forwards it to the distributed resource, and waits for a response message from the distributed resource;

[0026] After receiving the response message, the first microcontroller strips the application layer data from the response message and sends it to the controller;

[0027] The controller converts the received application layer data into power grid terminal application layer protocol data, calls the first security module to encrypt and perform integrity calculation on the power grid terminal application layer protocol data, and encapsulates the obtained ciphertext into a message and sends it to the power grid terminal device.

[0028] When distributed resources interact with the monitoring platform, the following steps are included:

[0029] The second microcontroller receives the message sent by the monitoring platform, strips the application layer data from the message, and stores the data in a buffer;

[0030] The first microcontroller controls the selection switch to switch to the second end connection state, and sends a query service data instruction to the second microcontroller;

[0031] After receiving the service data query instruction, the second microcontroller sends the application layer data in the buffer to the first microcontroller;

[0032] The first microcontroller encapsulates the application layer data into a message and forwards it to the distributed resource, and waits for a response message from the distributed resource;

[0033] After receiving the response message, the first microcontroller strips the application layer data from the response message and sends it to the second microcontroller;

[0034] The second microcontroller encapsulates the received application layer data into a message and sends it to the monitoring platform.

[0035] When configuring parameters, the following steps are included:

[0036] The controller receives the configuration parameters sent by the operation and maintenance tool, and determines whether the configuration parameters are its own configuration parameters;

[0037] If the configuration parameter is its own configuration parameter, the controller performs configuration according to the configuration parameter; otherwise, the controller stores the configuration parameter in a buffer;

[0038] The first microcontroller controls the selection switch to switch to the first end connection state, and sends a query parameter data instruction to the controller;

[0039] After receiving the query parameter data instruction, the controller sends the configuration parameters to the first microcontroller when there are configuration parameters in the buffer;

[0040] After receiving the configuration parameter, the first microcontroller determines whether the configuration parameter is its own configuration parameter;

[0041] If the configuration parameter is its own configuration parameter, the first microcontroller performs configuration according to the configuration parameter; otherwise, the first microcontroller controls the selection switch to switch to the second end connection state and sends the configuration parameter to the second microcontroller;

[0042] After receiving the configuration parameters, the second microcontroller performs configuration according to the configuration parameters.

[0043] Before the parameter configuration, it also includes:

[0044] The first security module in the protocol conversion unit establishes a communication connection with the operation and maintenance tool, and waits to receive the digital certificate of the operation and maintenance tool;

[0045] After receiving the digital certificate of the operation and maintenance tool, the first security module sends a random number to the operation and maintenance tool, and the first security module receives a signature value and verifies the signature value; wherein the signature value is a value obtained after the operation and maintenance tool signs the random number;

[0046] If the verification is passed, the parameter configuration is performed, otherwise, the connection with the operation and maintenance tool is disconnected.

[0047] When regulating instruction filtering, the following steps are included:

[0048] The second microcontroller receives the control instruction message sent by the monitoring platform, strips the application layer data from the control instruction message, and extracts the function code field;

[0049] The second microcontroller matches the function code field according to the configuration parameters, and discards the control instruction message if the function code field is consistent with the preset configuration item.

[0050] When regulating instruction security identification, the following steps are included:

[0051] The second microcontroller receives the control instruction message sent by the monitoring platform, and calls the second security module in the interface adapter unit to use the monitoring platform digital certificate to perform signature verification on the control instruction message. If the control instruction message has no signature or the signature verification fails, the control instruction message is discarded.

[0052] When filtering malicious traffic, the following steps are included:

[0053] The second microcontroller counts the messages sent by the monitoring platform and received within a preset time period, and determines whether the flow of the messages exceeds a threshold;

[0054] If the message flow exceeds the threshold, the second microcontroller stops receiving subsequent messages and receives messages again after a delay;

[0055] When the second microcontroller stops receiving subsequent messages, it determines whether the message is a message of a non-specified communication protocol type or a message containing malicious code, and discards the message if the message is a message of a non-specified communication protocol type or a message containing malicious code.

[0056] When the second microcontroller determines whether the message is a message containing malicious code, the following method is adopted:

[0057] A malicious code pattern set is established according to the protocol type and the keyword, wherein the string length of the smallest malicious code pattern in the malicious code pattern set is n;

[0058] Sort the malicious code patterns in the malicious code pattern set from small to large according to string length, and store them in the structure array MatArray[].

[0059] Select a character block consisting of the first M characters of the ith malicious code pattern from the structure array MatArray[], calculate the hash value index of the character block, and use Hash[index]=i as the hash address of the ith malicious code pattern; continue to calculate the hash value of the next malicious code pattern, and determine whether the hash value of the next malicious code pattern is index, record the number of malicious code patterns with the same hash value as index as nindex, and store them in the position corresponding to the first malicious code pattern with the hash value index, that is, NumArray[i]=nindex;

[0060] Initialize a transfer array Shift[] and assign it a value of n-M+l. Then, traverse each malicious code pattern in the malicious code pattern set in turn and analyze only the first n characters. Calculate the hash value index1 of the character block consisting of M characters from left to right. Then calculate the position p where the last character appears in the character block. If the value of np is smaller than Shift[index1], assign Shift[index1] to np. Otherwise, the value of Shift[index1] remains unchanged.

[0061] From the message T n-M+1 …T n Start calculating the hash value index2 of the scanned M characters; calculate the value of Shift[index2]. If Shift[index2]>0, safely right-shift the message text string Shift[index2] and repeatedly calculate the values ​​of index2 and Shift[index2] until Shift[index2]=0; take MatArray[index2] as the first node, and move NumArray[index2] patterns backward in sequence as the last node, traverse the malicious code patterns of the matching subset, and find the malicious code pattern that matches the text string; if there is a match, output it and move the text string one position to the right, otherwise move the text string one character and continue the matching process.

[0062] Beneficial Effects

[0063] Due to the adoption of the above-mentioned technical scheme, the present invention has the following advantages and positive effects compared with the prior art: the present invention targets the network risks of the interaction between massive distributed resources and the power grid system and the monitoring platform, utilizes a micro-safety isolation device and combines it with a safety isolation method to achieve physical isolation between the power grid system and the monitoring platform, meets the confidentiality, integrity, non-repudiation and anti-replay security requirements of business interaction between power grid terminal equipment and distributed resources, and has protection mechanisms such as protocol content filtering, protocol conversion, safe operation and maintenance, malicious traffic monitoring and blocking, and key instruction security identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 is a schematic structural diagram of a micro safety isolation device according to an embodiment of the present invention;

[0065] Figure 2 It is a schematic diagram of an inverter shutdown (off-grid) instruction message with a signature value in an implementation manner of the present invention. DETAILED DESCRIPTION

[0066] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0067] The embodiments of the present invention relate to a micro safety isolation device, such as Figure 1 As shown, it includes a protocol conversion unit and an interface adaptation unit.

[0068] In this embodiment, the protocol conversion unit includes a controller, which is used to realize the conversion of communication protocols between power grid terminal equipment (including intelligent fusion terminals, concentrators, load control terminals, etc.) and distributed resources (including distributed photovoltaic inverters, distributed energy storage devices, charging piles, etc.). The uplink of the controller can interact with the power grid terminal equipment through HPLC, micro-power wireless and other communication methods, and the downlink can communicate with the interface adapter unit through a serial port.

[0069] The interface adapter unit in this embodiment includes a first microcontroller, a second microcontroller and a gate switch. The first microcontroller can be connected to the distributed resource via RS485, Ethernet and other methods, and connected to the control end of the gate switch via serial communication; the first end of the gate switch is connected to the protocol conversion unit, and the second end is connected to the second microcontroller. It can only be connected to one of the second microcontroller and the protocol conversion unit at any time, that is, it is either in the first end gated state or the second end gated state; the second microcontroller is connected to the second end of the gate switch via a serial port, and connected to the communication unit via RS485 or Ethernet and other methods, so as to achieve communication connection with the monitoring platform.

[0070] It can be seen that this embodiment realizes the isolation of the communication link and constructs a safety isolation zone between the distributed resource device and the power grid terminal through the setting of the selection switch.

[0071] In order to enable the micro-safety isolation device of this embodiment to have functions such as data filtering and encryption authentication, the protocol conversion unit also includes a first security module, which is used to implement identity authentication and data encryption / decryption between the protocol conversion unit and the power grid terminal device. The interface adapter unit also includes a second security module, which is used to perform security authentication on the control instructions issued by the monitoring platform. The second security module can be set in the interface adapter unit in the form of an independent security chip, or integrated in the second microcontroller in software.

[0072] The micro-safety isolation device of this embodiment can implement a lightweight network security isolation method, which includes an encryption authentication process, a link isolation and protocol conversion process, a parameter configuration process, and a data filtering process.

[0073] The encryption authentication process is as follows:

[0074] After the grid terminal device establishes a network connection with the protocol conversion unit, the protocol conversion unit determines whether the digital certificate of the grid terminal device is stored, and determines whether it is the first connection. If the protocol conversion unit does not store the digital certificate of the grid terminal device, it means that the protocol conversion unit is connected to the grid terminal device for the first time. At this time, the protocol conversion unit initiates a digital certificate exchange process to the grid terminal device, receives the digital certificate issued by the grid terminal device, and verifies the validity of the received digital certificate, and stores it after the verification passes; if the protocol conversion unit stores the digital certificate of the grid terminal device and does not receive the digital certificate exchange process initiated by the grid terminal device, it means that the protocol conversion unit and the grid terminal device are not connected for the first time, that is, both communicating parties have stored each other's digital certificates, and then directly enter step 2);

[0075] 2) After the digital certificate verification is passed, the power grid terminal device initiates an identity authentication request with a digital signature. After receiving the identity authentication request, the protocol conversion unit uses the first security module to verify the signature of the identity authentication request, and after the signature verification is passed, it generates a digital signature and sends it to the power grid terminal device; after the signature verification is passed, the power grid terminal device sends the key negotiation factor to the protocol conversion unit, and the protocol conversion unit calculates the session key based on the received key negotiation factor.

[0076] The power grid terminal equipment and protocol conversion unit can use the negotiated session keys to perform hierarchical encryption on the interactive business data. For general data, the "plain text + message authentication code" method can be used to achieve integrity protection; for sensitive data, the "cipher text + message authentication code" method can be used to achieve confidentiality and integrity protection; for control data, the "cipher text + message authentication code + digital signature + random number" method can be used to further achieve anti-repudiation and anti-replay protection.

[0077] The link isolation and protocol conversion process includes the interaction process between distributed resources and power grid terminal equipment and the interaction process between distributed resources and the own monitoring platform. Among them, the interaction process between distributed resources and power grid terminal equipment is as follows:

[0078] 1) After receiving the message sent by the power grid terminal device, the controller in the protocol conversion unit strips the application layer data from the message and uses the first security module to decrypt and verify the integrity of the message, and then converts the stripped application layer data from the terminal application layer protocol (including DL / T 645, DL / T 698, etc.) data in the power grid into distributed resource application layer protocol (including Modbus-RTU, Modbus-TCP, etc.) data, and temporarily stores the distributed resource application layer protocol data in the buffer;

[0079] 2) The first microcontroller in the interface adapter unit switches the selection switch to the first end connection state, that is, the first microcontroller is connected to the protocol conversion unit, and sends a query service data instruction to the controller in the protocol conversion unit;

[0080] 3) After receiving the query service data instruction, the controller in the protocol conversion unit sends the distributed resource application layer protocol data in the buffer to the first microcontroller, and the first microcontroller encapsulates it into a message and forwards it to the distributed resource;

[0081] 4) After receiving the message, the distributed resource sends a response message to the first microcontroller; the first microcontroller strips the application layer data from the response message and sends it to the controller of the protocol conversion unit;

[0082] 5) The controller of the protocol conversion unit converts the received application layer data into the power grid terminal application layer protocol data, then calls the first security module to encrypt and perform integrity calculation on it, and then encapsulates the obtained ciphertext into a message and sends it to the power grid terminal device.

[0083] It can be seen that this implementation adopts encryption authentication measures between the power grid terminal and the distributed resources, reducing the security risks of counterfeit device access, data tampering, and command forgery / replay in the interaction between the edges.

[0084] The interaction process between distributed resources and the own monitoring platform is as follows:

[0085] 1) After receiving the message sent by the monitoring platform through the 4G communication unit, the second microcontroller in the interface adapter unit strips the application layer data from the message and temporarily stores the stripped application layer data in the buffer;

[0086] 2) The first microcontroller in the interface adapter unit switches the selection switch to the second end connection state, that is, the state where the first microcontroller is connected to the second microcontroller. After the connection, the first microcontroller sends a query service data instruction to the second microcontroller;

[0087] 3) After receiving the service data query instruction, the second microcontroller sends the application layer data in the buffer to the first microcontroller, and the first microcontroller encapsulates the data into a message and forwards it to the distributed resource;

[0088] 4) After receiving the message, the distributed resource sends a response message to the first microcontroller; the first microcontroller strips the application layer data from the response message and sends it to the second microcontroller;

[0089] 5) The second microcontroller encapsulates the received application layer data into a message and sends it to the monitoring platform through the 4G communication unit.

[0090] The parameters involved in the micro safety isolation device of this embodiment include but are not limited to communication parameters, communication protocol type, filter start and stop control instructions of the second microcontroller of the interface adapter unit, filter output power adjustment instructions, control / adjustment instruction security authentication, communication traffic blocking threshold, etc. The specific parameter configuration process is as follows:

[0091] 1) The user uses a dedicated operation and maintenance tool to establish a communication connection with the first security module in the protocol conversion unit, and sends the digital certificate of the operation and maintenance tool to the first security module; the communication connection in this embodiment may be a Bluetooth connection;

[0092] 2) After receiving the digital certificate of the operation and maintenance tool, the first security module in the protocol conversion unit sends a random number to the operation and maintenance tool;

[0093] 3) The operation and maintenance tool signs the random number and sends the signature value to the first security module in the protocol conversion unit;

[0094] 4) The first security module in the protocol conversion unit verifies the signature value using the digital certificate of the operation and maintenance tool. If the verification passes, the subsequent parameter configuration process is carried out, otherwise the Bluetooth connection is disconnected;

[0095] 5) The operation and maintenance tool sends the configuration parameters to the controller in the protocol conversion unit via Bluetooth. The final recipient of the configuration parameters may be the controller, the first microcontroller of the interface adapter unit, or the second microcontroller of the interface adapter unit. After receiving the configuration parameters, the controller determines whether the configuration parameters are its own configuration parameters. If so, the controller performs configuration according to the configuration parameters. If the configuration parameters are not its own configuration parameters, it means that the final recipient is the first microcontroller or the second microcontroller of the interface adapter unit, and the controller temporarily stores the configuration parameters in the buffer.

[0096] 6) The first microcontroller in the interface adapter unit switches the selection switch to the first end connection state, so that the first microcontroller is connected to the controller, and the first microcontroller sends a query parameter data instruction to the controller;

[0097] 7) If the buffer of the controller contains configuration parameters to be forwarded, the configuration parameters are sent to the first microcontroller;

[0098] 8) After receiving the configuration parameter, the first microcontroller determines whether the configuration parameter is its own configuration parameter. If so, the first microcontroller performs configuration according to the configuration parameter. If not, it indicates that the final recipient of the configuration parameter is the second microcontroller. At this time, the first microcontroller switches the selection switch to the second end connection state, so that the first microcontroller is connected to the second microcontroller, and sends the configuration parameter to the second microcontroller;

[0099] 9) After receiving the configuration parameters, the second microcontroller performs configuration according to the configuration parameters.

[0100] The data filtering process includes control instruction filtering, malicious traffic filtering and control instruction security identification.

[0101] The process of controlling instruction filtering is as follows:

[0102] After the second microcontroller receives the control command message sent by the monitoring platform through the 4G communication unit, it strips the application layer data from the control command message, extracts the function code field from the application layer data, and then matches the function code field according to the parameter configuration item (whether to filter the start-stop control instructions, output power adjustment instructions, etc.). If the function code field is consistent with the parameter configuration item, it means that the filtering configuration has been enabled, and the control command message is discarded.

[0103] The process of malicious traffic filtering is as follows:

[0104] The second microcontroller counts the messages received from the monitoring platform through the 4G communication unit within a given time period, and determines whether the flow of the message is the configured threshold. When the flow of the message is greater than the configured threshold, the second microcontroller stops receiving subsequent messages and receives the message again after a delay. When stopping receiving subsequent messages, the second microcontroller analyzes the received messages to determine whether the received messages are non-specified communication protocol type messages or messages containing malicious code (such as virus files, deformed messages that are prone to buffer overflow, command injection, etc.). If the received message is a non-specified communication protocol type message or a message containing malicious code, it is discarded. When analyzing and matching malicious code messages, the following method is used:

[0105] A malicious code pattern set is established according to the protocol type and the keyword, wherein the string length of the smallest malicious code pattern in the malicious code pattern set is n;

[0106] Sort the malicious code patterns in the malicious code pattern set from small to large according to string length, and store them in the structure array MatArray[].

[0107] Select a character block consisting of the first M characters of the ith malicious code pattern from the structure array MatArray[], calculate the hash value index of the character block, and use Hash[index]=i as the hash address of the ith malicious code pattern; continue to calculate the hash value of the next malicious code pattern, and determine whether the hash value of the next malicious code pattern is index, record the number of malicious code patterns with the same hash value as index as nindex, and store them in the position corresponding to the first malicious code pattern with the hash value index, that is, NumArray[i]=nindex;

[0108] Initialize a transfer array Shift[] and assign it a value of n-M+l. Then, traverse each malicious code pattern in the malicious code pattern set in turn and analyze only the first n characters. Calculate the hash value index1 of the character block consisting of M characters from left to right. Then calculate the position p where the last character appears in the character block. If the value of np is smaller than Shift[index1], assign Shift[index1] to np. Otherwise, the value of Shift[index1] remains unchanged.

[0109] From the message T n-M+1 …T n Start calculating the hash value index2 of the scanned M characters; calculate the value of Shift[index2]. If Shift[index2]>0, safely right-shift the message text string Shift[index2] and repeatedly calculate the values ​​of index2 and Shift[index2] until Shift[index2]=0; take MatArray[index2] as the first node, and move NumArray[index2] patterns backward in sequence as the last node, traverse the malicious code patterns of the matching subset, and find the malicious code pattern that matches the text string; if there is a match, output it and move the text string one position to the right, otherwise move the text string one character and continue the matching process.

[0110] It can be seen that the present embodiment counts the message traffic sent by the monitoring platform, and when the threshold is exceeded, stops receiving messages, and analyzes the messages that have been received. When the analysis results indicate that the received messages are messages containing malicious code or messages of non-specified types, these messages are discarded, and the security of the system is improved by filtering malicious traffic. At the same time, the malicious code matching method adopted in the present embodiment can quickly match malicious codes to meet the real-time detection requirements of the system.

[0111] The control instruction security identification process is as follows:

[0112] After the second microcontroller receives the control instruction message sent by the monitoring platform through the 4G communication unit, if its configuration parameters include enabling the control instruction security authentication function, the second security module is called to use the monitoring platform digital certificate to perform signature verification on the received control instruction message; if the control instruction message has no signature or the signature verification fails, the control instruction message is discarded. Figure 2 Shown is an inverter control command message with a signature value.

[0113] In this embodiment, the control commands issued by the monitoring platform are securely authenticated by the second security module, preventing attackers from forging downlink commands to cause distributed resources to go offline in batches, effectively avoiding major impacts on power grid operations.

[0114] It is not difficult to find that the present invention aims at the network risks of the interaction between massive distributed resources and the power grid system and the monitoring platform, and utilizes a micro-security isolation device in combination with a security isolation method to achieve physical isolation between the power grid system and the monitoring platform, meet the confidentiality, integrity, non-repudiation and anti-replay security requirements of business interaction between power grid terminal equipment and distributed resources, and has protection mechanisms such as protocol content filtering, protocol conversion, secure operation and maintenance, malicious traffic monitoring and blocking, and key instruction security identification.

Claims

1. A lightweight network security isolation method, using a micro security isolation device, the micro security isolation device includes a protocol conversion unit and an interface adapter unit, the protocol conversion unit include: A controller is used to realize the conversion of the communication protocol between the power grid terminal equipment and the distributed resources. The interface adapter unit includes a first microcontroller and a second microcontroller. The first microcontroller is connected to the distributed resources at the downlink and connected to the control end of the gate switch at the uplink. The first end of the gate switch is connected to the protocol conversion unit, and the second end is connected to the second microcontroller. The second microcontroller is connected to the second end of the gate switch at the downlink and connected to the monitoring platform at the uplink. It is characterized in that when performing the encryption authentication process, it specifically includes the following steps: After the protocol conversion unit establishes a communication connection with the power grid terminal device, the protocol conversion unit determines whether a digital certificate of the power grid terminal device is stored; If the protocol conversion unit stores the digital certificate of the power grid terminal device and has not received the digital certificate exchange process initiated by the power grid terminal device, receiving an identity authentication request with a digital signature initiated by the power grid terminal device; The protocol conversion unit uses the first security module to verify the signature of the identity authentication request, and after the signature verification is passed, generates a digital signature and sends it to the power grid terminal device; The protocol conversion unit receives the key negotiation factor sent by the power grid terminal device, and calculates a session key according to the key negotiation factor; When filtering malicious traffic, the following steps are included: The second microcontroller counts the messages sent by the monitoring platform and received within a preset time period, and determines whether the flow of the messages exceeds a threshold; If the message flow exceeds the threshold, the second microcontroller stops receiving subsequent messages and receives messages again after a delay; When the second microcontroller stops receiving subsequent messages, it determines whether the message is a message of a non-specified communication protocol type or a message containing malicious code, and discards the message if the message is a message of a non-specified communication protocol type or a message containing malicious code; When the second microcontroller determines whether the message is a message containing malicious code, the following method is adopted: A malicious code pattern set is established according to the protocol type and the keyword, wherein the string length of the smallest malicious code pattern in the malicious code pattern set is n; Sort the malicious code patterns in the malicious code pattern set from small to large according to string length, and store them in the structure array MatArray[]. Select a character block consisting of the first M characters of the ith malicious code pattern from the structure array MatArray[], calculate the hash value index of the character block, and use Hash[index]=i as the hash address of the ith malicious code pattern; continue to calculate the hash value of the next malicious code pattern, and determine whether the hash value of the next malicious code pattern is index, record the number of malicious code patterns with the same hash value as index as nindex, and store them in the position corresponding to the first malicious code pattern with the hash value index, that is, NumArray[i]=nindex; Initialize a transfer array Shift[] and assign it a value of n-M+l. Then, traverse each malicious code pattern in the malicious code pattern set in turn and analyze only the first n characters. Calculate the hash value index1 of the character block consisting of M characters from left to right. Then calculate the position p where the last character appears in the character block. If the value of np is smaller than Shift[index1], assign Shift[index1] to np. Otherwise, the value of Shift[index1] remains unchanged. From the message T n-M+1 …T n Start calculating the hash value index2 of the scanned M characters; calculate the value of Shift[index2]. If Shift[index2]>0, safely right-shift the message text string Shift[index2] and repeatedly calculate the values ​​of index2 and Shift[index2] until Shift[index2]=0; take MatArray[index2] as the first node, and move NumArray[index2] patterns backward in sequence as the last node, traverse the malicious code patterns of the matching subset, and find the malicious code pattern that matches the text string; if there is a match, output it and move the text string one position to the right, otherwise move the text string one character and continue the matching process.

2. The lightweight network security isolation method according to claim 1, It is characterized in that If the protocol conversion unit does not store the digital certificate of the power grid terminal device, a digital certificate exchange process is initiated to the power grid terminal device, the digital certificate issued by the power grid terminal device is received, and the validity of the received digital certificate is verified, and the digital certificate is stored after the verification is passed.

3. The lightweight network security isolation method according to claim 1, It is characterized in that The protocol conversion unit also includes: a first security module, which is used to implement identity authentication and data encryption / decryption with the power grid terminal device.

4. The lightweight network security isolation method according to claim 3, It is characterized in that When the distributed resource interacts with the power grid terminal device, the following steps are specifically included: The controller receives the message sent by the power grid terminal device, and strips the application layer data from the message, and uses the first security module to decrypt and verify the integrity of the stripped application layer data, and then uses the controller to convert the decrypted application layer data into distributed resource application layer protocol data, and stores it in a buffer; The first microcontroller controls the selection switch to switch to the first end connection state, and sends a query service data instruction to the controller; After receiving the query service data instruction, the controller sends the distributed resource application layer protocol data in the buffer to the first microcontroller; The first microcontroller encapsulates the distributed resource application layer protocol data into a message and forwards it to the distributed resource, and waits for a response message from the distributed resource; After receiving the response message, the first microcontroller strips the application layer data from the response message and sends it to the controller; The controller converts the received application layer data into power grid terminal application layer protocol data, calls the first security module to encrypt and perform integrity calculation on the power grid terminal application layer protocol data, and encapsulates the obtained ciphertext into a message and sends it to the power grid terminal device.

5. The lightweight network security isolation method according to claim 1, It is characterized in that When distributed resources interact with the monitoring platform, the following steps are included: The second microcontroller receives the message sent by the monitoring platform, strips the application layer data from the message, and stores the data in a buffer; The first microcontroller controls the selection switch to switch to the second end connection state, and sends a query service data instruction to the second microcontroller; After receiving the service data query instruction, the second microcontroller sends the application layer data in the buffer to the first microcontroller; The first microcontroller encapsulates the application layer data into a message and forwards it to the distributed resource, and waits for a response message from the distributed resource; After receiving the response message, the first microcontroller strips the application layer data from the response message and sends it to the second microcontroller; The second microcontroller encapsulates the received application layer data into a message and sends it to the monitoring platform.

6. The lightweight network security isolation method according to claim 1, It is characterized in that When configuring parameters, the following steps are included: The controller receives the configuration parameters sent by the operation and maintenance tool, and determines whether the configuration parameters are its own configuration parameters; If the configuration parameter is its own configuration parameter, the controller performs configuration according to the configuration parameter; otherwise, the controller stores the configuration parameter in a buffer; The first microcontroller controls the selection switch to switch to the first end connection state, and sends a query parameter data instruction to the controller; After receiving the query parameter data instruction, the controller sends the configuration parameters to the first microcontroller when there are configuration parameters in the buffer; After receiving the configuration parameter, the first microcontroller determines whether the configuration parameter is its own configuration parameter; If the configuration parameter is its own configuration parameter, the first microcontroller performs configuration according to the configuration parameter; otherwise, the first microcontroller controls the selection switch to switch to the second end connection state and sends the configuration parameter to the second microcontroller; After receiving the configuration parameters, the second microcontroller performs configuration according to the configuration parameters.

7. The lightweight network security isolation method according to claim 6, It is characterized in that Before the parameter configuration, it also includes: The first security module in the protocol conversion unit establishes a communication connection with the operation and maintenance tool, and waits to receive the digital certificate of the operation and maintenance tool; After receiving the digital certificate of the operation and maintenance tool, the first security module sends a random number to the operation and maintenance tool, and the first security module receives a signature value and verifies the signature value; wherein the signature value is a value obtained after the operation and maintenance tool signs the random number; If the verification is passed, the parameter configuration is performed, otherwise, the connection with the operation and maintenance tool is disconnected.

8. The lightweight network security isolation method according to claim 1, It is characterized in that When regulating instruction filtering, the following steps are included: The second microcontroller receives the control instruction message sent by the monitoring platform, strips the application layer data from the control instruction message, and extracts the function code field; The second microcontroller matches the function code field according to the configuration parameters, and discards the control instruction message if the function code field is consistent with the preset configuration item.

9. The lightweight network security isolation method according to claim 1, It is characterized in that The interface adapter unit also includes: a second security module, which is used to perform security authentication on the control instructions issued by the monitoring platform.

10. The lightweight network security isolation method according to claim 9, It is characterized in that When regulating instruction security identification, the following steps are included: The second microcontroller receives the control instruction message sent by the monitoring platform, and calls the second security module in the interface adapter unit to use the monitoring platform digital certificate to perform signature verification on the control instruction message. If the control instruction message has no signature or the signature verification fails, the control instruction message is discarded.