Power dispatch automation system and data security transmission method thereof, and control terminal
By using an encryption mechanism that generates dynamic keys and dynamic serial numbers in the power dispatch automation system, the problem of easy leakage of fixed keys is solved, high-security data transmission is achieved, and the stable operation of the power system is ensured.
Patent Information
- Application Number
- CN202510934682.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-07-08
AI Technical Summary
In existing power dispatch automation systems, data transmission security is low, and fixed keys are easily stolen, leading to a high risk of network attacks that could cause large-scale power outages or system crashes.
A dynamic key is generated based on real-time operating parameters of the power system to encrypt dispatch instructions. The execution result is also encrypted using a dynamic sequence number. This constructs a transmission path that separates the key from the ciphertext, ensuring that the key for each communication is used only once.
It effectively solves the security risks caused by the leakage of fixed keys, improves the confidentiality and integrity of data transmission, increases the difficulty and cost of attacks, and ensures the security and reliability of the power dispatch automation system.
Smart Images

Figure CN120639426B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of power system automation, and in particular to a data security transmission method and system for power dispatch automation system. BACKGROUND
[0002] With the deep integration of information technology and power system, the power dispatch automation system has become the central nervous system of modern power grid safe, stable and economic operation. The system connects the control terminal (such as the dispatch center server) of the master station and the execution terminal (such as the remote terminal unit RTU of the substation and the intelligent terminal IED) distributed in the power grid through the network, realizes the remote monitoring, regulation and control of the power grid equipment. The dispatching of instructions and the feedback of execution results are highly dependent on the transmission of data in the communication network.
[0003] However, the networking and opening of the dispatch automation system also exposes it to the threat of various network attacks, and the security of data transmission becomes a fatal factor to ensure the safe operation of the power grid. A wrong or malicious dispatching instruction may cause a serious accident of large-scale power outage, equipment damage and even system collapse.
[0004] The prior art usually adopts fixed key-based encrypted transmission, specifically, a fixed key is pre-set for encrypting the dispatching instructions and the returned data. However, the security of this method completely depends on the secrecy of the key. Once the key is stolen by hacking, internal personnel leakage or other means, the attacker can easily decrypt all communication contents within the entire key life cycle, and even forge legitimate dispatching instructions, causing continuous security threats to the power grid.
[0005] In summary, the security of data transmission in the existing power dispatch automation system is low. SUMMARY
[0006] Embodiments of the present application provide a data security transmission method and system for power dispatch automation system, which can effectively improve the security of data transmission in the power dispatch automation system.
[0007] To achieve the above purpose, embodiments of the present application adopt the following technical solutions:
[0008] In a first aspect, a data security transmission method for power dispatch automation system is provided, applied to a power dispatch automation system including a control terminal and an execution terminal, and the method includes:
[0009] In response to the dispatching instruction of the user terminal to the execution terminal, the control terminal acquires the real-time operation parameters of the power system;
[0010] The control terminal generates a dynamic key based on real-time operation parameters of the power system, and encrypts the scheduling instruction using the dynamic key to obtain a current instruction;
[0011] The control terminal shares the dynamic key to the execution terminal, and sends the current instruction to the execution terminal;
[0012] The execution terminal decrypts the current instruction using the dynamic key to obtain the scheduling instruction, and executes the scheduling instruction to obtain an execution result;
[0013] The execution terminal assigns a dynamic sequence number to the execution result, and compresses and encrypts the execution result based on the dynamic sequence number to obtain a compressed package;
[0014] The execution terminal sends the compressed package to the control terminal, and sends the dynamic sequence number to the user terminal;
[0015] The control terminal forwards the compressed package to the user terminal, and the user terminal is configured to decompress and decrypt the compressed package based on the dynamic sequence number to obtain and store the execution result.
[0016] In a possible implementation of the first aspect, the control terminal generates a dynamic key based on real-time operation parameters of the power system, and encrypts the scheduling instruction using the dynamic key to obtain a current instruction, including:
[0017] The real-time operation parameters are normalized to obtain a standardized parameter vector;
[0018] The standardized parameter vector is subjected to a hash operation according to a preset hash function to obtain an initial seed;
[0019] The initial seed is used as an input parameter of a pseudo-random number generator to generate the dynamic key;
[0020] The scheduling instruction is encrypted using the dynamic key by using an AES encryption algorithm, and a hash value of the encrypted scheduling instruction is calculated;
[0021] A value of a preset length is extracted from the hash value as a check code, and the check code and an encryption time stamp are added to the encrypted scheduling instruction to obtain the current instruction.
[0022] In another possible implementation of the first aspect, the control terminal shares the dynamic key to the execution terminal, including:
[0023] The control terminal obtains a public key certificate of the execution terminal, and verifies whether the public key certificate is valid;
[0024] In the case where the public key certificate is valid, the dynamic key is RSA-encrypted using a public key of the execution terminal to generate an encrypted key package;
[0025] The control terminal adds a digital signature of the control terminal in the encrypted key package, and sends the encrypted key package to the execution terminal through a secure channel.
[0026] The execution terminal receives the encrypted key package, uses a private key to obtain a dynamic key, and sends a confirmation message to the control terminal.
[0027] In a possible implementation of the first aspect, the control terminal adds a digital signature of the control terminal in the encrypted key package, and sends the encrypted key package to the execution terminal through a secure channel, including:
[0028] The control terminal appends the digital signature to the end of the encrypted key package to obtain a signed key transmission package.
[0029] The control terminal sends the signed key transmission package to the execution terminal through a TLS secure channel.
[0030] In a possible implementation of the first aspect, the execution terminal assigns a dynamic sequence number to the execution result, and compresses and encrypts the execution result based on the dynamic sequence number to obtain a compressed package, including:
[0031] The execution terminal obtains an execution timestamp and a unique identification code of the execution terminal, and generates a dynamic sequence number of the execution result according to the execution timestamp and the unique identification code.
[0032] The execution terminal performs structured processing on the execution result according to a preset format to generate standardized result data.
[0033] The execution terminal performs compression processing on the standardized result data by using a preset compression algorithm to obtain compressed data.
[0034] The execution terminal uses the dynamic sequence number as a seed of an encryption key to generate a result encryption key.
[0035] The execution terminal performs AES encryption on the compressed data by using the result encryption key to obtain the compressed package.
[0036] In a possible implementation of the first aspect, the execution terminal generates a dynamic sequence number of the execution result according to an execution timestamp and a unique identification, including:
[0037] The execution terminal performs joint hash operation on the unique identification code and the execution timestamp by using an MD5 hash algorithm to obtain a hash result.
[0038] The execution terminal extracts the first M bits from the hash result as a basic sequence number, and appends N random numbers after the basic sequence number to generate the dynamic sequence number of the execution result, where M and N are positive integers.
[0039] In another possible implementation of the first aspect, the executing terminal uses a dynamic sequence number as a seed for the encryption key to generate a resulting encryption key, including:
[0040] The execution terminal converts the dynamic serial number into binary format and uses the converted dynamic serial number as the input seed for the key derivation function;
[0041] The execution terminal uses a preset hash algorithm as the underlying hash function of the key derivation function, and inputs the input seed into the key derivation function to obtain the resulting encryption key.
[0042] In another possible implementation of the first aspect, the execution terminal uses a preset hash algorithm as the underlying hash function of the key derivation function, and inputs the input seed into the key derivation function to obtain the resulting encryption key, including:
[0043] The terminal executes the process of obtaining the MAC address of the local network interface and converting the MAC address into a hexadecimal string format;
[0044] The execution terminal uses the converted MAC address as the salt value and sets the preset hash algorithm as the underlying hash function of the key derivation function;
[0045] The execution terminal inputs the seed and salt value into the key derivation function to obtain the resulting encryption key.
[0046] Secondly, this application provides a control terminal, including:
[0047] The memory is configured to store instructions; and
[0048] The processor is configured to retrieve the instructions from the memory.
[0049] Thirdly, this application provides a power dispatch automation system, comprising:
[0050] Control terminal;
[0051] The execution terminal is connected to the control terminal.
[0052] The above technical solution uses dynamic keys generated based on real-time operating parameters of the power system to encrypt dispatch instructions. This demonstrates that the lifespan of any key is limited to a single communication, and it becomes invalid immediately if intercepted, effectively addressing the security risks caused by the leakage of fixed keys. Secondly, by encrypting the execution result based on the dynamic sequence number, a security protection isolated from the dispatch instructions can be constructed. This separates the transmission path of the compressed package from the credential used for decryption, i.e., the dynamic sequence number. In other words, the former is forwarded via the control terminal, while the latter reaches the user terminal directly. This separation of key and ciphertext forces attackers to simultaneously compromise and monitor two different communication links to complete the cracking, fundamentally ensuring the confidentiality and integrity of data during transmission and greatly improving the security of data transmission in the power dispatch automation system.
[0053] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0054] Figure 1 A flowchart illustrating a data security transmission method for a power dispatch automation system provided in this application embodiment;
[0055] Figure 2 This is a schematic diagram of a dual-channel transmission structure provided in an embodiment of this application. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0057] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0058] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0059] Figure 1 This illustration schematically shows a flow chart of a data security transmission method for a power dispatch automation system according to an embodiment of this application. Figure 1 As shown in the figure, this application provides a data security transmission method for a power dispatch automation system. The power dispatch automation system includes a control terminal and an execution terminal. The method may include the following steps.
[0060] S110. In response to the dispatching command from the user terminal to the execution terminal, the control terminal obtains the real-time operating parameters of the power system, including the system frequency, key bus voltage, main line power flow and system load.
[0061] S120: The control terminal generates a dynamic key based on the real-time operating parameters of the power system, and uses the dynamic key to encrypt the dispatching instructions to obtain the current instructions;
[0062] S130. The control terminal shares the dynamic key with the execution terminal and sends the current instruction to the execution terminal;
[0063] S140. The execution terminal decrypts the current instruction using the dynamic key to obtain the scheduling instruction, executes the scheduling instruction, and obtains the execution result;
[0064] S150. The execution terminal assigns a dynamic sequence number to the execution result and compresses and encrypts the execution result based on the dynamic sequence number to obtain a compressed package;
[0065] S160. The execution terminal sends the compressed package to the control terminal and the dynamic serial number to the user terminal.
[0066] S170. The control terminal forwards the compressed package to the user terminal, which uses the dynamic serial number to decompress and decrypt the compressed package, obtain the execution result, and store it.
[0067] In this embodiment, the control terminal can be a device with a processor, such as a tablet computer, desktop computer, laptop computer, handheld computer, wearable device, laptop computer, ultra-mobile personal computer (UMPC), or netbook. Of course, the control terminal can also be a server. This application embodiment does not impose any special limitations on the specific form of the control terminal.
[0068] In practice, when a user terminal (such as a dispatcher workstation) issues a dispatch command to a specific execution terminal (such as a substation RTU or an intelligent electronic device IED), the control terminal immediately initiates a parameter acquisition program. The control terminal acquires key operating parameters of the power system in real time through the data interface of the SCADA (Supervisory Control and Data Acquisition) system. These parameters include core indicators such as system frequency, key bus voltage, main line power flow, and system load. System frequency reflects the balance between power generation and consumption, and is normally maintained within the range of 50Hz ± 0.2Hz; key bus voltage includes the bus voltage values of various voltage levels, such as 500kV, 220kV, and 110kV; main line power flow data contains real-time transmission information for active and reactive power; and system load reflects the overall current power demand of the power grid.
[0069] The control terminal generates a dynamic key based on the real-time operating parameters of the power system and uses this dynamic key to encrypt dispatch instructions. First, the control terminal normalizes the acquired real-time operating parameters, converting parameters with different dimensions and numerical ranges into standardized values between 0 and 1. Next, all standardized parameters are combined into a standardized parameter vector, and then the SHA-256 hash function is used to hash this vector, generating a 256-bit initial seed. This initial seed is then input into a pseudo-random number generator to generate a 256-bit dynamic key. During the encryption phase, the AES-256 encryption algorithm is used, and the generated dynamic key is used to encrypt the dispatch instructions. After encryption, the SHA-256 hash value of the encrypted data is calculated, and the first 64 bits are extracted as a checksum. The current UTC timestamp is also added, ultimately forming a complete current instruction packet containing encrypted data, a checksum, and a timestamp. The biggest advantage of this dynamic key generation mechanism is that each dispatch operation generates a completely different key. Even if an attacker obtains the key for a particular communication, they cannot use it to decrypt other communications, thus achieving a high level of security with "one-time pad".
[0070] The control terminal shares the dynamic key with the execution terminal. In practice, the control terminal first obtains the target execution terminal's digital certificate and verifies its validity, including checking if the certificate is valid, revoked, and the integrity of the certificate chain. After successful verification, the control terminal extracts the execution terminal's RSA public key and performs asymmetric encryption on the dynamic key, generating an encrypted key packet. To prevent man-in-the-middle attacks and data tampering, the control terminal digitally signs the encrypted key packet using its own private key. The generated digital signature is appended to the end of the encrypted key packet, forming a complete signed key transmission packet. During transmission, the control terminal establishes a TLS 1.3 secure channel, which provides transport layer encryption protection to ensure the secure transmission of the key packet over the network. Upon receiving the signed key transmission packet, the execution terminal first verifies the control terminal's digital signature to confirm the trustworthiness and integrity of the data source. Then, it uses its own RSA private key to decrypt and obtain the dynamic key, and sends a confirmation message to the control terminal indicating successful key reception. This key-sharing mechanism based on asymmetric encryption and digital signatures not only solves the security problem of symmetric key distribution, but also ensures the absolute security of the key during transmission through multiple layers of encryption protection, laying a solid foundation for subsequent secure communication.
[0071] The execution terminal decrypts the current instruction using a dynamic key and executes the scheduling instruction. Upon receiving the current instruction packet, the execution terminal first extracts the timestamp information to verify the instruction's timeliness, ensuring it is within a preset valid time window. Instructions that have timed out are automatically rejected to prevent replay attacks. The execution terminal then uses the previously securely received dynamic key and the AES-256 decryption algorithm to decrypt the encrypted scheduling instruction. After decryption, the execution terminal immediately calculates the hash value of the decrypted data and compares it with the checksum carried in the instruction packet to ensure the data has not been tampered with during transmission. After successful verification, the execution terminal parses the specific content of the scheduling instruction, including the operation type (e.g., switch operation, parameter adjustment), target device identifier, and operation parameters.
[0072] During the execution phase, the execution terminal invokes the corresponding equipment control interfaces according to the instructions, such as controlling the opening and closing operations of circuit breakers, adjusting the tap position of transformers, or modifying the setting parameters of protection devices. During execution, the execution terminal monitors equipment status changes in real time and records changes in key parameters before and after the operation, such as voltage, current, and power values. Upon completion, the execution terminal generates a detailed execution result report, including a success flag, equipment status information, execution timestamp, and any possible anomalies or warnings. This dynamic key-based instruction decryption and execution mechanism not only ensures the confidentiality and integrity of dispatch instructions but also guarantees the security and reliability of power system operations through rigorous timeliness and integrity verification.
[0073] The execution terminal assigns a dynamic sequence number to the execution result and performs compression and encryption. In practice, the execution terminal first obtains the current execution timestamp and its unique identifier. Then, it uses the MD5 hash algorithm to perform a joint hash operation on the unique identifier and execution timestamp, generating a 128-bit hash result. The first 64 bits are extracted from the hash result as the base sequence number, and a 32-bit hardware random number is appended to it, ultimately generating a 96-bit dynamic sequence number. Next, the execution terminal structures the execution result according to a predefined JSON format, including standard fields such as operation type, device status, execution time, and result code. Then, the structured data is losslessly compressed. During the encryption stage, the execution terminal converts the dynamic sequence number to binary format and uses it as the seed input to the key derivation function. Simultaneously, it uses the device MAC address as the salt, generating a 256-bit encryption key through 10,000 iterations. Finally, the compressed data is encrypted using AES-256-CBC mode to generate the final compressed package. This compression and encryption mechanism based on dynamic sequence numbers not only reduces the amount of data transmitted and improves transmission efficiency, but also ensures that the encryption key for each execution result is unique through a unique sequence number generation algorithm. Even if the same execution result is generated at different times, the encrypted data will be completely different, greatly improving data security.
[0074] Reference Figure 2 The execution terminal sends the compressed package to the control terminal and the dynamic serial number to the user terminal. In actual implementation, the execution terminal adopts a dual-channel transmission strategy, transmitting the encrypted compressed package and the dynamic serial number required for decryption through different paths. Specifically, the execution terminal sends the compressed package to the control terminal through the existing SCADA communication network, using standard power communication protocols to ensure compatibility with the existing system. During transmission, the compressed package is forwarded through multiple layers of network devices, including communication management units, routers, and firewalls, each layer providing corresponding security protection. Simultaneously, the execution terminal sends the dynamic serial number directly to the user terminal through an independent secure channel (such as a dedicated VPN tunnel or an encrypted wireless link). This channel is completely independent of the main communication network, avoiding the risk of single point of failure.
[0075] The transmission of dynamic serial numbers employs end-to-end encryption protection, using a pre-configured symmetric key for AES encryption to ensure the security of the serial numbers during transmission. Upon receiving the dynamic serial number, the user terminal performs integrity verification and timeliness checks to ensure its validity. With this technical solution, even if an attacker intercepts either the compressed file or the dynamic serial number, they cannot decrypt and restore the data. Only by obtaining both the compressed file and the corresponding dynamic serial number can the attacker successfully decrypt and execute the result. This design significantly increases the difficulty and cost of attacks, providing multiple security guarantees for power dispatch data transmission.
[0076] The control terminal forwards the compressed packet to the user terminal, and the user terminal decompresses and decrypts the compressed packet based on the dynamic sequence number, completing the closed loop of the entire secure transmission link. In specific implementation, after receiving the compressed packet from the execution terminal, the control terminal first performs a basic integrity check to verify whether the format and size of the data packet meet expectations. Subsequently, the control terminal adds a transmission timestamp and its own identification information to the compressed packet to form a complete data packet, and forwards it to the user terminal through a secure management network.
[0077] After receiving a compressed package from the control terminal and a dynamic serial number from the execution terminal simultaneously, the user terminal begins the decryption and decompression process. First, the user terminal verifies the validity of the dynamic serial number, including checking its format, timeliness, and completeness. Upon successful verification, the user terminal uses the same key derivation algorithm as the execution terminal to convert the dynamic serial number into binary format and, combined with a pre-obtained device MAC address as salt, generates the same encryption key using the PBKDF2 function. Next, the user terminal uses the generated key to decrypt the compressed package using AES-256-CBC, obtaining the compressed execution result data. After decryption, a decompression algorithm is used to decompress the data, restoring the original structured execution result. The user terminal performs format and content verification on the decompressed data to ensure its integrity and correctness. Finally, the user terminal stores the execution result in a predefined data structure in a local database and generates an operation log, including information such as the reception time, decryption status, and data integrity.
[0078] Throughout the process, the user terminal will also send confirmation messages to the control terminal and the execution terminal to indicate that the data reception and processing were successful, thus forming a complete communication confirmation mechanism.
[0079] This embodiment generates dynamic keys based on real-time operating parameters of the power system to encrypt dispatch instructions, demonstrating that the lifespan of any key is limited to a single communication and becomes invalid immediately upon interception, thus effectively addressing the security risks caused by the leakage of fixed keys. Secondly, by encrypting the execution result based on the dynamic sequence number, a security protection isolated from the dispatch instructions can be constructed. This separates the transmission path of the compressed package from the credential used for decryption, i.e., the dynamic sequence number. That is, the former is forwarded via the control terminal, while the latter reaches the user terminal directly. Through the separation of key and ciphertext, attackers must simultaneously compromise and monitor two different communication links to complete the cracking, fundamentally ensuring the confidentiality and integrity of data during transmission and greatly improving the security of data transmission in the power dispatch automation system.
[0080] In one embodiment of this invention, the control terminal generates a dynamic key based on the real-time operating parameters of the power system, and uses the dynamic key to encrypt the dispatching instruction to obtain the current instruction, including the following steps:
[0081] S210. Normalize the real-time operating parameters to obtain a standardized parameter vector;
[0082] S220. Perform a hash operation on the standardized parameter vector according to the preset hash function to obtain the initial seed;
[0083] S230. Use the initial seed as the input parameter of the pseudo-random number generator to generate a dynamic key;
[0084] S240. The AES encryption algorithm is used to encrypt the scheduling instructions with a dynamic key, and the hash value of the encrypted scheduling instructions is calculated.
[0085] S250. Extract a value of a preset length from the hash value as a checksum, and add the checksum and encrypted timestamp to the encrypted scheduling instruction to obtain the current instruction.
[0086] Normalization of real-time operating parameters yields standardized parameters, thus unifying power system parameters with different dimensions and numerical ranges into a standardized numerical format. In practice, the control terminal first receives real-time operating parameters, including system frequency, critical bus voltage, main line power flow, and system load. Because these parameters have different physical meanings, numerical ranges, and variation characteristics, direct use could lead to certain parameters dominating the key generation process, affecting the randomness and security of the key. Therefore, a min-max normalization method is used to normalize each parameter, with the specific formula as follows:
[0087] ;
[0088] Where x is the current parameter value. and These are the historical minimum and maximum values for this parameter, respectively.
[0089] After normalization, all parameters are converted to floating-point numbers between 0 and 1, and then arranged in a predefined order to form a standardized parameter vector. This normalization process eliminates the dimensional differences between different parameters, providing standardized input data for subsequent hash operations.
[0090] The initial seed is obtained by hashing the standardized parameter vector according to a preset hash function. In the specific implementation, the control terminal uses the SHA-256 hash algorithm as the preset hash function. First, each floating-point number in the standardized parameter vector is converted into a fixed-length string format. Then, the hexadecimal strings of all parameters are concatenated in a predefined order to form a complete input string.
[0091] The string is then used as input to the SHA-256 hash function, undergoing 256 rounds of compression to generate a 256-bit (32-byte) hash output. The SHA-256 algorithm's operation includes message preprocessing, message grouping, hash value initialization, and main loop computation. The hash value obtained after SHA-256 computation is the initial seed. Even slight changes in power system parameters will produce completely different initial seeds, thus ensuring the unpredictability of the dynamic key.
[0092] The initial seed is used as input to a pseudo-random number generator to generate a dynamic key. In practice, the 256-bit initial seed is first divided into four 64-bit sub-seeds, each serving as a different parameter for the generator. The first 64-bit sub-seed is used as the initial state value, the second sub-seed is used to calculate the multiplier parameter, the third sub-seed is used to calculate the increment parameter, and the fourth sub-seed is used to calculate the modulus parameter.
[0093] The specific generation formula is as follows:
[0094] ;
[0095] Where a is the multiplier, c is the increment, m is the modulus, and X... n The current state value is used. Through eight consecutive iterations, eight 32-bit random numbers are generated. These random numbers are then concatenated to form a 256-bit (32-byte) dynamic key. This dynamic key generation mechanism based on an initial seed not only guarantees the uniqueness and unpredictability of the key but also ensures that the same power system state always generates the same key, laying the foundation for synchronized key distribution.
[0096] The scheduling instructions are encrypted using the AES encryption algorithm with a dynamic key, and the hash value of the encrypted scheduling instructions is calculated. In specific implementation, the control terminal uses the AES encryption algorithm to encrypt the scheduling instructions. First, the scheduling instructions are formatted according to a predefined structure, including fields such as instruction type, target device identifier, operation parameters, and priority, forming standard JSON format data. Then, the instruction data is padded to ensure that the data length is an integer multiple of 16 bytes, meeting the block size requirement of the AES algorithm. Next, a 128-bit random initialization vector is generated. This vector is used to ensure that the same plaintext will produce different ciphertexts after encryption at different times.
[0097] The AES encryption process includes four basic operations: byte substitution, row shifting, column mixing, and round key addition. For AES-256, 14 rounds of encryption are required. Each round uses a round key derived from the 256-bit master key. After encryption, the initialization vector and ciphertext data are concatenated to form a complete encrypted data packet. Then, the SHA-256 hash algorithm is used to hash the entire encrypted data packet, generating a 256-bit hash value. This hash value is used not only for subsequent integrity verification but also provides a digital fingerprint for the data packet. By combining AES encryption and hash calculation, the confidentiality of scheduling instructions is guaranteed, and a reliable technical means is provided for subsequent integrity verification, ensuring that data is not tampered with during transmission.
[0098] A pre-defined length of value is extracted from the hash value as a checksum. This checksum and an encrypted timestamp are then added to the encrypted scheduling instruction to obtain the current instruction. In practice, the control terminal extracts the first 64 bits (8 bytes) of the 256-bit SHA-256 hash value as the checksum. This length provides sufficient security without excessively increasing the data packet size. The checksum extraction employs a fixed position strategy, always starting from the beginning of the hash value to ensure that the sending and receiving ends use the same extraction rules.
[0099] The control terminal obtains the current UTC timestamp and then assembles the current instruction packet according to a predefined data structure. This structure includes: version number (4 bytes), data length (4 bytes), encrypted data (variable length), checksum (8 bytes), timestamp (8 bytes), and end flag (4 bytes). The version number identifies the packet format version for easy compatibility handling; the data length field records the actual number of bytes in the encrypted data; the checksum is used for integrity verification; the timestamp is used to prevent replay attacks; and the end flag indicates the end position of the packet. This not only detects accidental data corruption during transmission but also effectively prevents malicious data tampering attacks, ensuring the integrity and reliability of scheduling instructions.
[0100] This implementation method ensures a balanced contribution of different parameter types during key generation by normalizing real-time operating parameters, avoiding the dominance of certain parameters and improving the randomness quality of the key. Secondly, the seed generation mechanism based on the SHA-256 hash function leverages the one-way nature of cryptographic hash functions, ensuring that even minor changes in power system parameters will generate completely different keys. By adding checksums and timestamps, a complete data integrity verification and replay attack prevention mechanism is constructed. Compared to traditional solutions, this not only effectively enhances key security but also achieves organic integration of keys and business scenarios through deep integration with the power system's operating status.
[0101] In one embodiment of this invention, the control terminal shares a dynamic key with the execution terminal, including the following steps:
[0102] S310. The control terminal obtains the public key certificate of the execution terminal and verifies whether the public key certificate is valid.
[0103] S320. If the public key certificate is valid, use the public key of the execution terminal to encrypt the dynamic key using RSA to generate an encrypted key packet;
[0104] S330: The control terminal adds its digital signature to the encrypted key packet and sends the encrypted key packet to the execution terminal through a secure channel;
[0105] S340. After receiving the encrypted key packet, the execution terminal uses the private key to decrypt it to obtain the dynamic key and sends a confirmation message to the control terminal.
[0106] In practice, the control terminal first queries the target execution terminal's certificate acquisition path through a pre-configured device registry. This path could be a local certificate repository, an LDAP directory server, or the execution terminal's own certificate service interface. The control terminal then sends a certificate request message to the execution terminal. This message contains the control terminal's identity, a request timestamp, and a digital signature to ensure the request's legitimacy.
[0107] Upon receiving the request, the execution terminal returns its public key certificate, which contains key data such as the execution terminal's public key, device identifier, validity period, and issuing authority information. After obtaining the certificate, the control terminal first performs format verification, checking whether the certificate conforms to standards, including the completeness of basic fields such as version number, serial number, and signature algorithm identifier. Next, it verifies the validity period, checking if the current time is within the certificate's validity period, which is typically 1-3 years. Then, it performs certificate chain verification, starting from the execution terminal's certificate and verifying upwards level to the root Certificate Authority (CA), ensuring the integrity and trustworthiness of the entire certificate chain. During verification, the control terminal checks the digital signature of each level of certificate, using the public key of the higher-level CA to verify the signature validity of the lower-level certificates. Simultaneously, the control terminal checks the certificate revocation list to confirm that the certificate has not been revoked. Furthermore, it verifies whether the device identifier in the certificate matches the expected execution terminal, preventing malicious certificate replacement. The entire verification process ensures that only legitimate execution terminals holding valid certificates can participate in subsequent key exchange processes, guaranteeing the security and trustworthiness of communication from the source.
[0108] If the public key certificate is valid, the execution terminal's public key is used to encrypt the dynamic key using RSA to generate an encrypted key packet. In practice, the control terminal first extracts the execution terminal's RSA public key from the verified public key certificate. The public key format contains two core parameters: the modulus n and the public key exponent e. These parameters form the basis of the RSA encryption algorithm.
[0109] Next, the control terminal preprocesses the dynamic key using the OAEP (Optimal Asymmetric Encryption Padding) scheme. This scheme not only prevents chosen-ciphertext attacks but also enhances the randomness of the encrypted data. The OAEP padding process includes three steps: message encoding, mask generation, and padding combination. The mask generation function uses the SHA-256 hash algorithm to ensure the unpredictability of the padding data. The length of the padded data matches the length of the RSA key; for a 2048-bit RSA key, the padded data length is 256 bytes. Then, the padded dynamic key is encrypted using the RSA encryption algorithm, based on modular exponentiation:
[0110] ;
[0111] Where m represents the padded key data and c represents the encryption result. After encryption, the encryption result is converted into the standard ASN.1 DER encoding format, and metadata information such as algorithm identifier and padded scheme identifier is added to form a complete encryption key packet. The security of the encryption key packet in this embodiment is greatly improved. Even if an attacker intercepts the data packet, they cannot obtain the original dynamic key by calculation without the corresponding private key, thus ensuring the confidentiality of key transmission.
[0112] The control terminal adds its digital signature to the encrypted key packet and sends the encrypted key packet to the execution terminal through a secure channel. In specific implementation, the control terminal first calculates the SHA-256 hash value of the encrypted key packet to generate a 256-bit message digest, which uniquely identifies the content of the key packet. Then, the control terminal digitally signs the message digest using its own RSA private key, employing the RSA-PSS (Probabilistic Signature Scheme) algorithm.
[0113] Signature calculation is based on modular exponentiation:
[0114] ;
[0115] Where m is the encoded message digest, d is the private key index of the control terminal, and s is the signature result. The generated digital signature is the same length as the RSA key; for a 2048-bit key, the signature length is 256 bytes. Next, the control terminal appends the digital signature to the end of the encrypted key packet and adds metadata such as the signature algorithm identifier and timestamp, forming a complete signed key transmission packet. During transmission, the control terminal establishes a TLS 1.3 secure channel to communicate with the execution terminal. After establishing the secure channel, the control terminal sends the signed key transmission packet to the execution terminal through this channel. The entire transmission process is protected by end-to-end encryption using the TLS protocol. This multi-layered security mechanism not only ensures data integrity and sender authentication through digital signatures but also prevents eavesdropping and tampering attacks during transmission through the TLS secure channel, providing reliable protection for the secure transmission of keys.
[0116] After receiving the encrypted key packet, the execution terminal uses its private key to decrypt it, obtains the dynamic key, and sends an acknowledgment message to the control terminal. In specific implementations, after receiving the signed key transmission packet through a TLS secure channel, the execution terminal first performs an integrity check on the data packet, verifying that the header information, data length, and format meet expectations. Next, the execution terminal extracts the digital signature of the control terminal and verifies the signature using the public key in the pre-stored control terminal public key certificate. The verification process employs the reverse operation of the RSA-PSS algorithm to obtain the signature decoding result. Then, the result is parsed according to the PSS decoding rules to extract the original message digest and compare it with the recalculated hash value of the encrypted key packet. If the two hash values are completely identical, it indicates that the data packet has not been tampered with and indeed originates from a legitimate control terminal. After successful signature verification, the execution terminal begins decrypting the encrypted key packet using its own RSA private key. After decryption, data with a padding format is obtained, and the execution terminal performs a depadding operation according to the reverse process of the OAEP padding scheme.
[0117] After padding is complete, the executing terminal obtains the original 256-bit dynamic key and immediately stores it in a secure key storage area. To confirm successful key reception, the executing terminal generates an acknowledgment message containing information such as key reception status, timestamp, and executing terminal identifier. This acknowledgment message is then encrypted using AES with the newly received dynamic key as a verification of key correctness. The encrypted acknowledgment message is sent back to the control terminal through the existing TLS secure channel. Upon receiving the message, the control terminal decrypts and verifies it using the same dynamic key. If decryption is successful and the message content is correct, the key exchange process is considered completely successful.
[0118] This implementation method ensures that only devices with valid certificates can participate in key exchange through a public key certificate verification mechanism, preventing identity forgery attacks at the source. Digital signature technology not only guarantees data integrity but also authenticates the sender's identity, effectively preventing man-in-the-middle attacks and data tampering. Furthermore, the application of a secure channel provides end-to-end encryption protection at the transport layer, constructing a multi-layered security system. This not only eliminates the security risks of key pre-distribution but also enables real-time key updates and on-demand distribution through dynamic generation and secure transmission mechanisms, significantly improving the security and flexibility of the power dispatch automation system.
[0119] In one embodiment of this invention, the control terminal adds its digital signature to the encryption key packet and sends the encryption key packet to the execution terminal through a secure channel, including the following steps:
[0120] S410, The control terminal appends the digital signature to the end of the encrypted key packet to obtain a key transmission packet with a signature;
[0121] S420: The control terminal sends a signed key transfer packet to the execution terminal through a TLS secure channel.
[0122] The control terminal appends a digital signature to the end of the encrypted key packet to obtain a signed key transmission packet. In practice, the control terminal first performs an integrity hash calculation on the generated encrypted key packet, using the SHA-256 hash algorithm to process the binary data of the entire encrypted key packet, generating a 256-bit (32-byte) message digest. The message digest uniquely identifies the content of the key packet; any small data change will lead to a significant change in the hash value. Next, the control terminal uses its own RSA private key to digitally sign the message digest. The signing algorithm can be the RSA-PSS algorithm, and the length of the generated digital signature is the same as the RSA key length; for a 2048-bit RSA key, the signature length is 256 bytes.
[0123] To construct a complete signed key transmission packet, the control terminal assembles it according to a predefined data structure. This structure includes: a packet header identifier (4 bytes, used to identify the packet type), version information (2 bytes, identifying the protocol version), a total length field (4 bytes, recording the total number of bytes in the packet), encryption key packet data (variable length, typically 256-512 bytes), a signature algorithm identifier (4 bytes, identifying the type of signature algorithm used), a signature length field (4 bytes, recording the number of bytes in the signature data), digital signature data (256 bytes, the actual signature content), a timestamp (8 bytes, recording the signature generation time), and a packet tail checksum (4 bytes, used for transmission error detection). The total size of the assembled signed key transmission packet is typically between 600-800 bytes. This packet not only contains the encrypted dynamic key but also provides dual guarantees of data integrity and sender identity through a digital signature, ensuring that the receiver can verify the authenticity and integrity of the data.
[0124] The process of the control terminal sending a signed key transfer packet to the execution terminal via a TLS secure channel establishes an end-to-end security protection mechanism at the transport layer. In practice, the control terminal first establishes a TLS (Transport Layer Security) connection with the target execution terminal, using TLS 1.3 protocol version for maximum security and performance. The TLS handshake process includes several key steps: First, a ClientHello message is sent, in which the control terminal sends information such as supported TLS versions, a list of cipher suites, compression methods, and random numbers to the execution terminal; the execution terminal responds with a ServerHello message, selecting the highest TLS version and the strongest cipher suite supported by both parties. Next is the certificate exchange phase, where the execution terminal sends its X.509 digital certificate, and the control terminal verifies the certificate's validity, including certificate chain verification, validity period check, and revocation status query. Then, a key exchange occurs, with each party generating a temporary private key and public key. By exchanging the public key and combining it with their respective private keys, a shared pre-master key is calculated. Based on the pre-master key and the random number generated during the handshake, both parties use HKDF (HMAC-based key derivation function) to generate session keys, including the client write key, server write key, client MAC key, and server MAC key.
[0125] After the handshake is complete, a secure TLS channel is established. Once established, the controlling terminal sends a signed key transfer packet as application layer data through the TLS channel. Before transmission, the data is automatically fragmented, encrypted, and authenticated by the TLS protocol. The TLS protocol uses a record layer protocol to encapsulate the data; each TLS record contains the content type, protocol version, length, and encrypted payload data. During transmission, even if an attacker intercepts network packets, they can only see the encrypted content and cannot obtain the original key transfer packet data. Upon receiving the TLS record, the executing terminal automatically decrypts and verifies its integrity, ensuring that the received data is completely consistent with the sent data, thus achieving comprehensive security protection for the key transfer packet during network transmission.
[0126] This implementation effectively solves the security problem of sensitive data transmission in a network environment. The establishment of a secure channel provides end-to-end encryption protection at the transport layer, ensuring that the security of historical sessions is not affected even if long-term keys are leaked. The multi-layered encryption mechanism effectively guarantees data security. The dynamic key is first protected by RSA asymmetric encryption, then integrity is guaranteed by digital signature, and finally transport layer encryption is performed through the TLS channel, forming a triple security protection. While ensuring high security, it also has good compatibility and scalability, and can be seamlessly integrated with existing power dispatch automation systems without requiring large-scale modifications to the existing network architecture. This provides a solid technical guarantee for the safe operation of power dispatch automation systems and effectively prevents network attacks from threatening power grid security.
[0127] In one embodiment of this invention, the execution terminal assigns a dynamic sequence number to the execution result and compresses and encrypts the execution result based on the dynamic sequence number to obtain a compressed package, including the following steps:
[0128] S510. The execution terminal obtains the execution timestamp and the unique identifier of the execution terminal, and generates a dynamic sequence number of the execution result based on the execution timestamp and the unique identifier.
[0129] S520: The execution terminal performs structured processing on the execution results according to a preset format to generate standardized result data;
[0130] S530: The execution terminal uses a preset compression algorithm to compress the standardized result data to obtain compressed data.
[0131] S540: The execution terminal uses the dynamic serial number as the seed for the encryption key to generate the resulting encryption key;
[0132] S550: The execution terminal uses the result encryption key to encrypt the compressed data using AES to obtain a compressed package.
[0133] The execution terminal obtains the execution timestamp and its unique identifier, and generates a dynamic sequence number for the execution result based on these two elements. In practice, the execution terminal first obtains the current execution timestamp using its built-in high-precision clock system, in 64-bit Unix timestamp format. Simultaneously, the execution terminal obtains its own unique identifier, which is typically in the form of a device serial number or a pre-configured device ID.
[0134] To generate a dynamic sequence number, the execution terminal uses the MD5 hash algorithm to perform a joint hash operation on the unique identifier and the execution timestamp. Specifically, the unique identifier and the timestamp are concatenated according to a predefined format, and the concatenated string is then used as input to the MD5 algorithm. The MD5 algorithm generates a 128-bit (16-byte) hash result.
[0135] The first 64 bits of this hash result are extracted as the base sequence number. To further enhance the randomness and uniqueness of the sequence number, the execution terminal appends a 32-bit hardware random number, generated by a true random number generator built into the execution terminal, to the base sequence number. The final generated dynamic sequence number is 96 bits (12 bytes) long, possessing extremely high uniqueness and unpredictability. This dynamic sequence number generation mechanism based on timestamps and device identifiers not only ensures that each execution result has a unique identifier but also protects the security of the original information through the one-way nature of the hash algorithm, providing high-quality seed data for subsequent encryption processing.
[0136] The execution terminal performs structured processing of execution results according to a preset format to generate standardized result data, thus achieving standardized and normalized management of execution results. In specific implementation, the execution terminal first analyzes the execution results of scheduling instructions. These results may include various types of data such as equipment status changes, operation success flags, measurement values, and anomaly information. To ensure data consistency and parsability, the execution terminal uses a predefined JSON format to structure the execution results.
[0137] The structured processing involves multiple layers of data organization: First, there is the basic information layer, which contains metadata about the execution results, such as result ID, execution time, device identifier, and operation type; then there is the status information layer, which records the current status and status changes of the equipment, such as the opening and closing status of circuit breakers, the tap position of transformers, and the on / off status of protection devices; next is the measurement data layer, which contains key electrical parameters before and after the operation, such as voltage, current, power, and frequency; finally, there is the exception information layer, which records warnings, errors, or abnormal situations that occur during the execution process.
[0138] During the structuring process, the execution terminal also performs data validation and format checks to ensure that all fields conform to predefined data types and value ranges. For numerical data, precision control and unit standardization are implemented; for string data, length limits and character set validation are applied. After structuring, the generated standardized result data has good readability and scalability, facilitating subsequent compression, encryption, and transmission processing. It also provides a standardized format foundation for long-term data storage and analysis.
[0139] The execution terminal uses a preset compression algorithm to compress standardized result data, resulting in compressed data that significantly improves data transmission efficiency and storage economy. In specific implementations, the execution terminal uses a preset compression algorithm to perform lossless compression on structured JSON data. The compression algorithm can be the DEFLATE algorithm, which is widely used in compression formats such as ZIP and gzip.
[0140] The execution terminal implements a dynamic key derivation mechanism based on unique identifiers by using a dynamic sequence number as the seed for the encryption key. In practice, the execution terminal first converts the 96-bit dynamic sequence number from hexadecimal to binary format, obtaining 12 bytes of raw seed data. Then, the execution terminal uses the PBKDF2 (Cryptographic Key Derivation Function) algorithm, taking the dynamic sequence number as the input cipher, to generate a 256-bit key for AES encryption. The PBKDF2 algorithm is a secure algorithm specifically designed for deriving keys from cryptography, effectively resisting dictionary attacks and brute-force attacks.
[0141] Specifically, the execution terminal converts the dynamic serial number into binary format, uses the converted dynamic serial number as the input seed of the key derivation function, uses the preset hash algorithm as the underlying hash function of the key derivation function, and inputs the input seed into the key derivation function to obtain the resulting encryption key.
[0142] To enhance the security of key derivation, the executing terminal obtains the MAC address of the local network interface and converts it into a hexadecimal string format as a salt. The salt prevents rainbow table attacks and increases the complexity of key derivation; even using the same dynamic serial number, different devices will generate completely different keys due to their different MAC addresses. This key derivation mechanism based on dynamic serial numbers and device identifiers not only ensures that a different encryption key is used for each execution result but also guarantees the device uniqueness of the key through a device binding mechanism, ensuring the secure transmission of execution results.
[0143] The execution terminal uses the result encryption key to encrypt the compressed data using AES to obtain a compressed package, thus achieving secure encapsulation and protection of the execution result. In specific implementation, the execution terminal encrypts the compressed data. The encryption process can use the AES-256 algorithm. Specifically, the encryption process first needs to generate a 128-bit random initialization vector. This vector ensures that the same plaintext will produce different ciphertexts after encryption at different times, preventing pattern attacks and replay attacks. The initialization vector is generated by the execution terminal's hardware random number generator, possessing true randomness. Next, the compressed data is padded. Since the AES algorithm requires the input data length to be an integer multiple of 16 bytes, the padding process adds necessary bytes to the end of the data to make the total length meet the requirement. The value of the padding bytes is equal to the number of bytes to be padded.
[0144] After encryption, the execution terminal combines the initialization vector, encrypted data, and necessary metadata to form the final compressed package. The compressed package structure includes: a header identifier (4 bytes), version information (2 bytes), IV length (2 bytes), initialization vector (16 bytes), encrypted data length (4 bytes), encrypted data (variable length), and checksum (4 bytes). The entire compressed package not only protects the confidentiality of the execution result but also provides basic integrity verification functionality through the checksum.
[0145] In this implementation, the dynamic sequence number obtained based on timestamps and device identifiers ensures that each execution result has a globally unique identifier. The generated sequence number possesses extremely high uniqueness and unpredictability, laying a solid foundation for subsequent security processing. The application of compression algorithms significantly reduces the bandwidth requirements and storage costs of data transmission, greatly improving transmission efficiency while ensuring data integrity. Furthermore, by combining the unique sequence number with the device MAC address, an encryption key with device-binding characteristics is generated, ensuring that even the same execution result will produce completely different encrypted data on different devices. Compared with traditional encryption methods, this not only effectively improves data security but also significantly enhances transmission efficiency through compression technology.
[0146] In one embodiment of this invention, the execution terminal generates a dynamic sequence number of the execution result based on the execution timestamp and a unique identifier, including the following steps:
[0147] S610: The execution terminal uses the MD5 hash algorithm to perform a joint hash operation on the unique identifier and the execution timestamp to obtain the hash result;
[0148] S620. The execution terminal extracts the first M bits from the hash result as the basic sequence number, and appends N random numbers to the basic sequence number to generate the dynamic sequence number of the execution result, where M and N are both positive integers.
[0149] The execution terminal uses the MD5 hash algorithm to perform a joint hash operation on the unique identifier and the execution timestamp to obtain the hash result. In specific implementation, the execution terminal first concatenates the device's unique identifier and the current execution timestamp into strings according to a predefined format to form unified input data. The concatenation process uses underscores as delimiters to form a composite string. Next, the execution terminal converts the composite string into a UTF-8 encoded byte sequence, which is then used as the input data for the MD5 hash algorithm.
[0150] MD5 (Message Digest Algorithm 5) is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value. The MD5 algorithm's operation consists of four main stages: First, message preprocessing: the input data is padded to make its length modulo 512 equal to 448, and then appended with 64 bits of the original message length. Second, the MD buffer is initialized by setting four 32-bit initial values: A=0x67452301, B=0xEFCDAB89, C=0x98BADCFE, and D=0x10325476. Next, the main loop processes the preprocessed message into 512-bit blocks, each block undergoing 64 rounds of computation, each round using different non-linear functions F, G, H, I, and a constant table. Finally, the output is generated by concatenating the four 32-bit MD buffer values to form a final 128-bit hash value.
[0151] The execution terminal extracts the first M bits from the hash result as the base sequence number and appends N random bits to the base sequence number to generate a dynamic sequence number for the execution result, thus enhancing the randomness of the sequence number. In practice, the values of parameters M and N need to be configured according to the actual application requirements. Typically, M is set to 64 bits (8 bytes) and N is set to 32 bits (4 bytes). This configuration ensures the uniqueness of the sequence number while keeping the total length of the sequence number within a reasonable range.
[0152] The execution terminal extracts the first 64 bits of the 128-bit MD5 hash result as the base sequence number. The extraction process uses big-endian byte order to ensure consistency across different hardware platforms. The base sequence number ensures that the same input always produces the same base sequence number, while different inputs produce completely different base sequence numbers.
[0153] To further enhance the randomness and security of the serial number, the execution terminal appends a 32-bit hardware random number to the base serial number. These random numbers are generated by a true random number generator built into the execution terminal. Unlike pseudo-random number generators, the data generated by a true random number generator is truly unpredictable and cannot be reproduced by algorithms. The base serial number provides determinism and reproducibility, while the appended random number provides unpredictability and anti-replay properties. Even if the same operation is executed multiple times within a very short time interval, the generated dynamic serial number will be completely different due to the presence of the random number, effectively preventing serial number collisions and replay attacks. Furthermore, the configurability of the M and N parameters allows this scheme to adapt to different application scenarios and security requirements. In scenarios with high security requirements, the number of bits in the random number can be increased, while in scenarios with high performance requirements, the total length of the serial number can be appropriately reduced.
[0154] In this embodiment, the introduction of a unique device identifier enables the device binding characteristic of the serial number. Even if different devices perform the same operation at the same time, the generated serial numbers will be completely different. This not only enhances the uniqueness of the serial number but also provides a technical foundation for subsequent device authentication and data traceability. In addition, extracting the first M bits from the hash result as the basic serial number and appending N random bits to the basic serial number can significantly improve the unpredictability and anti-attack capability of the serial number. Even if an attacker obtains the device identifier and time information, they cannot predict or reproduce the complete dynamic serial number, effectively preventing replay attacks and serial number forgery, and providing a solid technical foundation for the secure data transmission of the power dispatch automation system.
[0155] In one embodiment of this invention, the execution terminal uses a dynamic serial number as the seed for the encryption key to generate the resulting encryption key, including the following steps:
[0156] S710: The execution terminal converts the dynamic serial number into binary format and uses the converted dynamic serial number as the input seed for the key derivation function.
[0157] S720: The execution terminal uses a preset hash algorithm as the underlying hash function of the key derivation function, and inputs the input seed into the key derivation function to obtain the resulting encryption key.
[0158] The execution terminal converts the dynamic serial number into binary format and uses the converted dynamic serial number as the input seed for the key derivation function. In specific implementations, the execution terminal first receives a 96-bit dynamic serial number. In order to perform key derivation operations, this hexadecimal representation needs to be converted into standard binary format. The converted dynamic serial number can then be used as the input seed for the key derivation function.
[0159] The execution terminal uses a preset hash algorithm as the underlying hash function of the key derivation function and inputs the seed into the key derivation function to obtain the resulting encryption key, thus achieving a secure conversion from seed data to encryption key. In specific implementation, the execution terminal uses the PBKDF2 function as the key derivation function to generate encryption keys from password or seed data.
[0160] In practice, the execution terminal obtains the MAC address of the local network interface as the salt. The purpose of the salt is to increase the complexity and uniqueness of key derivation. Even using the same seed data, different devices will generate completely different keys due to their different MAC addresses. This device binding feature enhances the security of the entire system.
[0161] The salt value and input seed are input into the key derivation function, with the iteration count set to 10,000. Each iteration performs a hash operation on the previous output. After 10,000 iterations, the PBKDF2 function outputs a 256-bit (32-byte) derived key, which is the result encryption key.
[0162] This implementation uses a preset hash algorithm as the underlying hash function of the key derivation function and inputs the seed into the key derivation function to obtain the resulting encryption key, thus realizing a secure conversion from seed data to encryption key.
[0163] In one embodiment of this invention, the execution terminal uses a preset hash algorithm as the underlying hash function of the key derivation function, and inputs the input seed into the key derivation function to obtain the resulting encryption key, including the following steps:
[0164] S810: The terminal obtains the MAC address of the local network interface and converts the MAC address into a hexadecimal string format;
[0165] S820: The execution terminal uses the converted MAC address as the salt value and sets the preset hash algorithm as the underlying hash function of the key derivation function;
[0166] S830: The execution terminal inputs the seed and salt value into the key derivation function to obtain the resulting encryption key.
[0167] The execution terminal obtains the MAC address of the local network interface and converts it into a hexadecimal string format. In specific implementations, the execution terminal first obtains the MAC address information of the main local network interfaces through the operating system's network interface API.
[0168] In this embodiment, when the execution terminal obtains the MAC address, it prioritizes the primary Ethernet interface. If multiple network interfaces exist, they are selected according to a predefined priority order, typically: wired Ethernet interface, wireless network interface, and virtual network interface. The obtained MAC address is usually stored in system memory in binary format. To facilitate subsequent string operations, the execution terminal needs to convert the binary MAC address into a standard hexadecimal string format. The conversion process uses a standard binary-to-hexadecimal conversion algorithm, with each 4 binary digits corresponding to 1 hexadecimal character.
[0169] The execution terminal uses the converted MAC address as the salt and sets a preset hash algorithm as the underlying hash function of the key derivation function. In specific implementations, the execution terminal uses the hexadecimal formatted MAC address string as the salt parameter of the key derivation function. The main purpose of the salt is to increase the complexity and uniqueness of key derivation, preventing rainbow table attacks and dictionary attacks.
[0170] By using the MAC address as a salt, even if multiple devices use the same input seed, the uniqueness of the MAC address ensures that each device generates a completely different final key, achieving device-level key isolation and binding. Specifically, the MAC address is directly used as the salt in subsequent key derivation operations. Simultaneously, the underlying hash algorithm for the terminal configuration key derivation function is executed. In this embodiment, the hash algorithm can perform two hash operations on the message using the key, specifically including two stages: internal hashing and external hashing. The internal hashing stage performs an XOR operation on the key with an internal padding constant, then concatenates it with the message data before performing a SHA-256 hash; the external hashing stage performs an XOR operation on the key with an external padding constant, then concatenates it with the internal hash result before performing another SHA-256 hash. This dual hashing mechanism not only enhances the algorithm's security but also provides message authentication functionality, capable of detecting data tampering during transmission or storage.
[0171] The execution terminal inputs the seed and salt value into the key derivation function to obtain the resulting encryption key. In specific implementations, the execution terminal uses the PBKDF2 algorithm as the key derivation function. The calculation formula for the PBKDF2 algorithm is as follows:
[0172] ;
[0173] In this setup, PRF is a pseudo-random function, Password is the input seed (the converted dynamic sequence number in binary), Salt is the salt value (the hexadecimal string of the MAC address), c is the number of iterations, and dkLen is the desired key length (256 bits). In the actual computation, the number of iterations c is set to 10,000, which effectively resists brute-force attacks without significantly impacting system performance. The first iteration uses the input seed and salt value as parameters, and subsequent iterations use the output of the previous iteration as input, ultimately yielding a 256-bit (32-byte) derived key.
[0174] In this embodiment, the introduction of salt significantly enhances the security and uniqueness of key derivation. Even if an attacker obtains the input seed, they cannot reproduce the correct encryption key because they do not know the specific MAC address salt value, effectively preventing key leakage and replay attacks. This embodiment effectively improves the security of encryption keys in the power dispatch automation system, fundamentally ensuring the confidentiality and integrity of data during transmission, and greatly enhancing the security of data transmission in the power dispatch automation system.
[0175] This application embodiment also provides a control terminal, including:
[0176] The memory is configured to store instructions; and
[0177] The processor is configured to retrieve the instructions from the memory.
[0178] This application also provides a power dispatch automation system, including:
[0179] Control terminal;
[0180] The execution terminal is connected to the control terminal.
[0181] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0182] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0185] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0186] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0187] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0188] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0189] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for secure data transmission in a power dispatch automation system, characterized in that, Applied to power dispatch automation systems, which include control terminals and execution terminals, the method includes: In response to the user terminal's dispatching instructions to the execution terminal, the control terminal obtains the real-time operating parameters of the power system; The control terminal generates a dynamic key based on the real-time operating parameters of the power system, and uses the dynamic key to encrypt the dispatching instructions to obtain the current instructions; The control terminal obtains the public key certificate of the execution terminal and verifies whether the public key certificate is valid; If the public key certificate is valid, the control terminal uses the execution terminal's public key to encrypt the dynamic key using RSA, generating an encrypted key packet; The control terminal adds its digital signature to the encrypted key packet and sends the encrypted key packet to the execution terminal through a secure channel; After receiving the encrypted key packet, the execution terminal uses its private key to decrypt it to obtain the dynamic key and sends a confirmation message to the control terminal. The control terminal sends the current instruction to the execution terminal; The execution terminal decrypts the current instruction using a dynamic key to obtain the scheduling instruction, executes the scheduling instruction, and obtains the execution result. The execution terminal assigns a dynamic sequence number to the execution result and compresses and encrypts the execution result based on the dynamic sequence number to obtain a compressed package; The execution terminal sends the compressed package to the control terminal and the dynamic serial number to the user terminal; The control terminal forwards the compressed package to the user terminal, which uses the dynamic serial number to decompress and decrypt the compressed package, obtain the execution result, and store it.
2. The method according to claim 1, characterized in that, The control terminal generates a dynamic key based on the real-time operating parameters of the power system, and uses the dynamic key to encrypt dispatch instructions to obtain the current instructions, including: The real-time operating parameters are normalized to obtain a standardized parameter vector; The standardized parameter vector is hashed according to a preset hash function to obtain the initial seed; The initial seed is used as the input parameter to the pseudo-random number generator to generate a dynamic key; The AES encryption algorithm is used to encrypt the scheduling instructions with a dynamic key, and the hash value of the encrypted scheduling instructions is calculated. Extract a value of a preset length from the hash value as a checksum, and add the checksum and encrypted timestamp to the encrypted scheduling instruction to obtain the current instruction.
3. The method according to claim 1, characterized in that, The control terminal adds its digital signature to the encrypted key packet and sends the encrypted key packet to the execution terminal through a secure channel, including: The control terminal appends a digital signature to the end of the encrypted key packet, resulting in a key transmission packet with a signature. The control terminal sends a signed key transfer packet to the execution terminal via a TLS secure channel.
4. The method according to claim 1, characterized in that, The execution terminal assigns a dynamic sequence number to the execution result and compresses and encrypts the execution result based on the dynamic sequence number to obtain a compressed package, which includes: The execution terminal obtains the execution timestamp and the unique identifier of the execution terminal, and generates a dynamic sequence number of the execution result based on the execution timestamp and the unique identifier; The execution terminal processes the execution results in a structured manner according to a preset format, generating standardized result data; The execution terminal uses a preset compression algorithm to compress the standardized result data to obtain compressed data; The execution terminal uses a dynamic sequence number as a seed for the encryption key to generate the resulting encryption key; The execution terminal uses the result encryption key to encrypt the compressed data using AES to obtain a compressed package.
5. The method according to claim 4, characterized in that, The execution terminal generates a dynamic sequence number for the execution result based on the execution timestamp and a unique identifier, including: The execution terminal uses the MD5 hash algorithm to perform a joint hash operation on the unique identifier and the execution timestamp to obtain the hash result; The execution terminal extracts the first M bits from the hash result as the base sequence number, and appends N random bits to the base sequence number to generate the dynamic sequence number of the execution result, where M and N are both positive integers.
6. The method according to claim 4, characterized in that, The execution terminal uses a dynamic sequence number as the seed for the encryption key to generate the resulting encryption key, including: The execution terminal converts the dynamic serial number into binary format and uses the converted dynamic serial number as the input seed for the key derivation function; The execution terminal uses a preset hash algorithm as the underlying hash function of the key derivation function, and inputs the input seed into the key derivation function to obtain the resulting encryption key.
7. The method according to claim 6, characterized in that, The execution terminal uses a preset hash algorithm as the underlying hash function of the key derivation function, and inputs the input seed into the key derivation function to obtain the resulting encryption key, including: The terminal executes the process of obtaining the MAC address of the local network interface and converting the MAC address into a hexadecimal string format; The execution terminal uses the converted MAC address as the salt value and sets the preset hash algorithm as the underlying hash function of the key derivation function; The execution terminal inputs the seed and salt value into the key derivation function to obtain the resulting encryption key.
8. A control terminal, characterized in that, include: The memory is configured to store instructions; as well as The processor is configured to retrieve the instructions from the memory.
9. A power dispatch automation system, applied to a data security transmission method of the power dispatch automation system according to any one of claims 1-7, characterized in that, include: The control terminal according to claim 8; The execution terminal is connected to the control terminal.
Citation Information
Patent Citations
Power grid dispatching data network system and power grid system
CN118413004A
Smart grid data transaction scheme for privacy
KR101344074B1