Power failure and power transmission safety protection method based on cooperative switching safety transmission protocol
By adopting data encryption and sharding management strategies based on collaborative switching safety transmission protocols in modern power systems, flexibility and security issues in switching command transmission are solved, and an efficient and safe transmission solution is achieved.
Patent Information
- Application Number
- CN202411152600.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-10-15
AI Technical Summary
The transmission of existing switching commands in modern power systems relies on dedicated communication lines, which lacks flexibility and resistance to cyber attacks. It is also costly and susceptible to connection interruptions caused by insufficient physical maintenance.
A method based on collaborative shutdown secure transmission protocol is adopted. Data encryption and sharding management strategies are used to ensure the safe transmission of shutdown commands in the public network. Encryption is used to ensure data confidentiality and sharding is used to optimize transmission efficiency.
It provides a flexible and safe transmission solution to ensure the safe transmission of switching commands in the public network, improving the transmission security and efficiency of modern power systems.
Smart Images

Figure CN118784368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of message transmission, and in particular to a power outage safety protection method based on a coordinated switching safety transmission protocol. Background Art
[0002] In modern power systems, the switching command is an important control instruction, and its safe and reliable transmission is crucial. At present, the transmission of the switching command mainly relies on dedicated communication lines, such as analog lines or early digital cables, which are not only usually inflexible and difficult to expand, but also rely on line transmission to face modern complex network attacks. It has almost no resistance. If dedicated lines are used, it is not only costly, but also has problems such as connection interruption due to insufficient physical maintenance. Based on this, in order to ensure the transmission security of the switching command in the public network, we designed a power outage safety protection method based on the coordinated switching safety transmission protocol. Summary of the invention
[0003] The purpose of the present invention is to provide a power outage safety protection method based on a collaborative switching safety transmission protocol. It solves the security problem of switching commands during public network transmission by combining efficient data encryption and sharding management strategies. It not only uses encryption to ensure data confidentiality, but also the sharding mechanism optimizes transmission efficiency, and can provide a flexible and secure transmission solution for modern power systems.
[0004] The embodiments of the present invention are implemented by the following technical solutions:
[0005] A power outage safety protection method based on a coordinated switching safety transmission protocol, the method comprising the following steps:
[0006] The integrated switching command is in message format, the generated message is encrypted, and it is determined whether the length of the message reaches the preset value. If not, it is sent; if yes, the message is fragmented and sent;
[0007] Receive a message or all message fragments; if received as a message, decrypt the message; if received as all message fragments, sort them according to the fragment numbers, perform integrity check on the message fragments, parse the message format, reassemble all message fragments according to the check results, decrypt the reassembled message, and complete the safe transmission of the switching command.
[0008] Optionally, the integrated switching command is in a message format, which is specifically: the switching command is integrated into a leading byte, a message header, an instruction part, a data part, a check part and a tail byte; wherein the leading byte includes the message length and type according to the switching command, which is used to identify and parse the message; the message header includes the identifier and timestamp of the sending and receiving end of the message, which is used to verify the legitimacy of the message; the instruction part includes the switching operation command and the sending of the coordinated switching type.
[0009] Optionally, the generated message is encrypted, which is specifically:
[0010] The integrated switching command is in the message format, which is represented as the original message;
[0011] generating a primary key and a secondary key based on a key derivation function;
[0012] Generate the integrity check code of the original message through the secondary key and HMAC algorithm;
[0013] Append the integrity check code to the original message to form a message with a check code;
[0014] Randomly generate a first initial vector, and encrypt the message with the check code by a first encryption algorithm according to the primary key and the first initial vector to obtain an intermediate ciphertext;
[0015] Randomly generate a second initial vector, and encrypt it using a second encryption algorithm according to the primary key, the intermediate ciphertext and the second initial vector to generate a final ciphertext and an authentication tag;
[0016] The second initial vector, the final ciphertext and the authentication tag are combined into the final encrypted output data to complete the encryption of the message.
[0017] Optionally, the message with the check code is encrypted by the first encryption algorithm, and the calculation formula is:
[0018] C cbc =AES-CBC K (P‖MAC,IV c )
[0019] Among them, C cbc is the intermediate ciphertext, IV c is the first initial vector, P is the original message, MAC is the check code, K is the main key, AES-CBC K The AES-CBC mode encryption is performed using the primary key and the first initialization vector.
[0020] Optionally, the encryption is performed using a second encryption algorithm, and the specific calculation formula is:
[0021] C gcm=AES-GCM K (C cbc ,IV g )
[0022] Among them, C gcm is the final ciphertext, IVg is the second initial vector, AES-GCM K The intermediate ciphertext is encrypted in AES-GCM mode using the primary key K and the second initial vector.
[0023] Optionally, the specific steps of decrypting the message are as follows:
[0024] Receive the final encrypted output data;
[0025] Decrypting the final ciphertext using a second encryption algorithm according to the primary key and the second initial vector to obtain an intermediate ciphertext;
[0026] Verify the authentication tag. If the verification is successful, proceed to the next step. If the verification fails, terminate the decryption process and alarm.
[0027] Extracting a first initial vector, and decrypting the intermediate ciphertext using a first encryption algorithm according to the primary key and the first initial vector to restore the message with the check code;
[0028] Extracting the original message and the integrity check code of the original message from the message with the check code;
[0029] The original message is recalculated using the secondary key and the HMAC algorithm to obtain the integrity check code of the original message, and the integrity check code in the calculation result is verified to see if it matches the integrity check code in the extraction result. If so, the secure transmission of the switching command is completed; if not, the integrity verification of the report message fails.
[0030] Optionally, the sending and receiving of messages or all message fragments are transmitted through the TCP protocol.
[0031] Optionally, the determination of whether the length of the message reaches a preset value is specifically to determine whether the length of the message reaches the maximum length of the TCP data packet. If not, sending is executed; if so, fragmenting the message and sending it.
[0032] The technical solution of the embodiment of the present invention has at least the following advantages and beneficial effects:
[0033] The embodiment of the present invention solves the security problem of switching commands during transmission over the public network by combining efficient data encryption and sharding management strategies. It not only uses encryption to ensure data confidentiality, but also uses the sharding mechanism to optimize transmission efficiency, thereby providing a flexible and secure transmission solution for modern power systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic flow chart of a power outage safety protection method based on a collaborative switching safety transmission protocol provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0036] like Figure 1 As shown, the present invention provides one embodiment: a power outage safety protection method based on a coordinated switching safety transmission protocol, the method comprising the steps of:
[0037] The integrated switching command is in message format, the generated message is encrypted, and it is determined whether the length of the message reaches the preset value. If not, it is sent; if yes, the message is fragmented and sent;
[0038] Receive a message or all message fragments; if received as a message, decrypt the message; if received as all message fragments, sort them according to the fragment numbers, perform integrity check on the message fragments, parse the message format, reassemble all message fragments according to the check results, decrypt the reassembled message, and complete the safe transmission of the switching command.
[0039] During implementation, it is determined whether the length of the message reaches a preset value, specifically whether the length of the message reaches the maximum length of the TCP data packet. If not, sending is executed; if so, the message is fragmented and sent.
[0040] Specifically, the integrated switching command is in a message format, which is specifically: the switching command is integrated into a leading byte, a message header, an instruction part, a data part, a check part and a tail byte; wherein the leading byte includes the message length and type according to the switching command, which is used to identify and parse the message; the message header includes the identifier and timestamp of the sending and receiving end of the message, which is used to verify the legitimacy of the message; the instruction part includes the switching operation command and the sending coordinated switching type.
[0041] In this embodiment, the message format is as follows: 1. Leading byte (4 bytes): Contains the length and type information of the message, which is used to identify and parse the message. 2. Message header (8 bytes): Contains the sender and receiver identification, timestamp and other information, which is used to verify the legitimacy of the message and prevent retransmission attacks. 3. Instruction part (4 bytes): Contains the first 2 bits of the specific switching operation command, power outage, power supply; the last 2 bits are the type of coordinated switching sent and the type of receipt switching result. 4. Data part (variable length): Contains specific operation data, such as the number of the power outage unit, operation time, etc., which constitutes a tree-structured JSON format data; 5. Check part (4 bytes): Contains the checksum information of the message, which is used to detect whether an error occurs during the transmission process. 6. Tail byte (2 bytes): Contains the end identifier, which is used to identify the end of the message.
[0042] In a further development of this embodiment, this embodiment sets the following encryption specific logic steps for the switching command message:
[0043] The integrated switching command is in the message format, which is represented as the original message;
[0044] generating a primary key and a secondary key based on a key derivation function;
[0045] Generate the integrity check code of the original message through the secondary key and HMAC algorithm;
[0046] Append the integrity check code to the original message to form a message with a check code;
[0047] Randomly generate a first initial vector, and encrypt the message with the check code by a first encryption algorithm according to the primary key and the first initial vector to obtain an intermediate ciphertext;
[0048] Randomly generate a second initial vector, and encrypt it using a second encryption algorithm according to the primary key, the intermediate ciphertext and the second initial vector to generate a final ciphertext and an authentication tag;
[0049] The second initial vector, the final ciphertext and the authentication tag are combined into the final encrypted output data to complete the encryption of the message.
[0050] In a specific application extended by this embodiment, the message with the check code is encrypted by the first encryption algorithm, and its calculation formula is:
[0051] C cbc =AES-CBC K (P‖MAC,IV c )
[0052] Among them, C cbc is the intermediate ciphertext, IV cis the first initial vector, P is the original message, MAC is the check code, K is the main key, AES-CBC K The AES-CBC mode encryption is performed using the primary key and the first initialization vector.
[0053] The encryption is performed by the second encryption algorithm, and the specific calculation formula is:
[0054] C gcm =AES-GCM K (C cbc ,IV g )
[0055] Among them, C gcm is the final ciphertext, IVg is the second initial vector, AES-GCM K The intermediate ciphertext is encrypted in AES-GCM mode using the primary key K and the second initial vector.
[0056] According to the encryption steps expanded in this embodiment, this embodiment also provides specific decryption steps for the encrypted message, which are specifically:
[0057] Receive the final encrypted output data;
[0058] Decrypting the final ciphertext using a second encryption algorithm according to the primary key and the second initial vector to obtain an intermediate ciphertext;
[0059] Verify the authentication tag. If the verification is successful, proceed to the next step. If the verification fails, terminate the decryption process and alarm.
[0060] Extracting a first initial vector, and decrypting the intermediate ciphertext using a first encryption algorithm according to the primary key and the first initial vector to restore the message with the check code;
[0061] Extracting the original message and the integrity check code of the original message from the message with the check code;
[0062] The original message is recalculated using the secondary key and the HMAC algorithm to obtain the integrity check code of the original message, and the integrity check code in the calculation result is verified to see if it matches the integrity check code in the extraction result. If so, the secure transmission of the switching command is completed; if not, the integrity verification of the report message fails.
[0063] More specifically, sending and receiving messages or all message fragments are transmitted through the TCP protocol.
[0064] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A power outage safety protection method based on a coordinated switching safety transmission protocol, characterized in that: The steps of the method include: The integrated switching command is in message format, the generated message is encrypted, and it is determined whether the length of the message reaches the preset value. If not, it is sent; if yes, the message is fragmented and sent; Receive a message or all message fragments; if received as a message, decrypt the message; if received as all message fragments, sort them according to the fragment numbers, perform integrity check on the message fragments, parse the message format, reassemble all message fragments according to the check results, decrypt the reassembled message, and complete the safe transmission of the switching command.
2. The power outage safety protection method based on the coordinated switching safety transmission protocol according to claim 1 is characterized in that: The integrated switching command is in a message format, which is specifically: the switching command is integrated into a leading byte, a message header, an instruction part, a data part, a check part and a tail byte; wherein the leading byte includes the message length and type according to the switching command, which is used to identify and parse the message; the message header includes the identifier and timestamp of the sending and receiving end of the message, which is used to verify the legitimacy of the message; the instruction part includes the switching operation command and the sending of the coordinated switching type.
3. The power outage safety protection method based on the coordinated switching safety transmission protocol according to claim 2 is characterized in that: The data encryption of the generated message is specifically as follows: The integrated switching command is in the message format, which is represented as the original message; generating a primary key and a secondary key based on a key derivation function; Generate the integrity check code of the original message through the secondary key and HMAC algorithm; Append the integrity check code to the original message to form a message with a check code; Randomly generate a first initial vector, and encrypt the message with the check code by a first encryption algorithm according to the primary key and the first initial vector to obtain an intermediate ciphertext; Randomly generate a second initial vector, and encrypt it using a second encryption algorithm according to the primary key, the intermediate ciphertext and the second initial vector to generate a final ciphertext and an authentication tag; The second initial vector, the final ciphertext and the authentication tag are combined into the final encrypted output data to complete the encryption of the message.
4. The power outage safety protection method based on the coordinated switching safety transmission protocol according to claim 3 is characterized in that: The message with the check code is encrypted by the first encryption algorithm, and the calculation formula is: C cbc =AES-CBC K (P‖MAC,IV c ) Among them, C cbc is the intermediate ciphertext, IV c is the first initial vector, P is the original message, MAC is the check code, K is the main key, AES-CBC K The AES-CBC mode encryption is performed using the primary key and the first initialization vector.
5. The power outage safety protection method based on the coordinated switching safety transmission protocol according to claim 4 is characterized in that: The encryption is performed by the second encryption algorithm, and the specific calculation formula is: C gcm =AES-GCM K (C cbc ,IV g ) Among them, C gcm is the final ciphertext, IVg is the second initial vector, AES-GCM K The intermediate ciphertext is encrypted in AES-GCM mode using the primary key K and the second initial vector.
6. The power outage safety protection method based on the coordinated switching safety transmission protocol according to claim 5 is characterized in that: The specific steps of decrypting the message are as follows: Receive the final encrypted output data; Decrypting the final ciphertext using a second encryption algorithm according to the primary key and the second initial vector to obtain an intermediate ciphertext; Verify the authentication tag. If the verification is successful, proceed to the next step. If the verification fails, the decryption process is terminated and an alarm is issued; Extracting a first initial vector, and decrypting the intermediate ciphertext using a first encryption algorithm according to the primary key and the first initial vector to restore the message with the check code; Extracting the original message and the integrity check code of the original message from the message with the check code; The original message is recalculated using the secondary key and the HMAC algorithm to obtain the integrity check code of the original message, and the integrity check code in the calculation result is verified to see if it matches the integrity check code in the extraction result. If so, the secure transmission of the switching command is completed; if not, the integrity verification of the report message fails.
7. The power outage safety protection method based on the coordinated switching safety transmission protocol according to claim 6 is characterized in that: Send and receive messages or all message fragments, all transmitted through the TCP protocol.
8. The power outage safety protection method based on the coordinated switching safety transmission protocol according to claim 7 is characterized in that: The determination of whether the length of the message reaches a preset value is specifically To determine whether the length of the message reaches the maximum length of the TCP data packet, if not, send it; If yes, the message is fragmented and sent.
Citation Information
Cited By
Data encryption collection method and system of relay protection equipment
CN120582853A
