A communication connection method and apparatus for a power system

By introducing a digital certificate issued by a trusted root and generating session keys through public key encryption of random numbers and private key decryption in power system communication, the problems of lax identity authentication, insecure key negotiation, and easy leakage of message transmission in power system communication are solved, thereby improving the security and protection level of communication.

CN122226076APending Publication Date: 2026-06-16BEIJING SIFANG JIBAO ENG TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-03
Publication Date
2026-06-16

Smart Images

  • Figure CN122226076A_ABST
    Figure CN122226076A_ABST
Patent Text Reader

Abstract

The application discloses a communication connection method and equipment of a power system. The method is applied to a first communication party, and after responding to a request of establishing a communication connection with a second communication party, first, a digital certificate provided by the second communication party and a public key of the second communication party are acquired, and a first random number is generated after completing legality verification of the digital certificate. Subsequently, the first random number is encrypted by using the public key of the second communication party to obtain first ciphertext, and the first ciphertext and a public key of the first communication party are sent to the second communication party. Then, second ciphertext generated by the second communication party based on the public key of the first communication party is received, the second random number is obtained by decryption through a private key of the first communication party, fusion operation is performed on the first random number and the second random number to generate a session key. Further, the first communication party and the second communication party can encrypt and digitally sign plaintext messages to be sent by using the session key, generate secure messages and send the secure messages to the second communication party.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication security technology, and in particular to a communication method and device for a power system. Background Technology

[0002] After the power system undergoes a deep transformation towards digitalization and intelligence, communication networks have become the core infrastructure connecting power production, dispatch, management, and operation and maintenance. They integrate dedicated power communication networks with emerging network forms such as the Internet of Things and cloud computing, resulting in an expanded scale and increasingly complex structure.

[0003] Against this backdrop, power system communications face diverse, complex, and covert security threats. In addition to traditional network attacks such as DDoS attacks and SQL injection, specialized attack methods targeting power industrial control systems are constantly emerging, posing a serious threat to the safe and stable operation of power systems. Currently, power systems mainly employ traditional boundary protection methods centered on firewalls, intrusion detection and prevention systems, supplemented by single-factor authentication and traditional RSA encryption algorithms to achieve communication security protection. However, the existing protection system is no longer adequate to meet the security needs of power systems. Summary of the Invention

[0004] To address the aforementioned issues, this application provides a communication connection method and device for a power system.

[0005] The embodiments of this application disclose the following technical solutions: In a first aspect, embodiments of this application provide a communication connection method for a power system, the method comprising: In response to a request to establish a communication connection with a second communication party, the system obtains a digital certificate and a public key provided by the second communication party; wherein the digital certificate is issued based on a trusted root. If the validity of the digital certificate is verified, a first random number is generated; The first random number is encrypted using the public key of the second communicating party to generate a first ciphertext, and the first ciphertext and the public key of the first communicating party are sent to the second communicating party. The first communication party receives a second ciphertext sent by a second communication party, and decrypts the second ciphertext using the private key of the first communication party to obtain a second random number; wherein the second ciphertext is obtained by the second communication party encrypting the second random number based on the public key of the first communication party; The first random number and the second random number are fused to generate a session key; the key is used to decrypt and sign the secure message received by the first communicating party to obtain a plaintext message; the secure message is obtained by the second communicating party encrypting and digitally signing the plaintext message based on the session key.

[0006] In one possible implementation, the method further includes: Verify that the issuing authority of the digital certificate is a trusted root recognized by the power system, that the digital certificate is within its validity period, and that the signature of the certificate digital is authentic and valid and the certificate chain is complete; Once all verification items pass, the digital certificate is deemed to have passed the legitimacy verification.

[0007] In one possible implementation, encrypting the first random number using the public key of the second communicating party includes: Using the public key of the second communicating party, the first random number is encrypted using the SM2 elliptic curve cryptography algorithm to generate the first ciphertext; wherein, the first ciphertext includes elliptic curve points, a key stream generated by a key derivation function, and the result of an XOR operation between the first random number and the key stream.

[0008] In one possible implementation, the fusion operation on the first random number and the second random number includes: Perform an XOR operation on the first random number and the second random number to generate the session key, which serves as the base key for subsequent plaintext message encryption and digital signature.

[0009] In one possible implementation, the security message is obtained through the following process: The plaintext message is divided into 128-bit blocks, and the session key is used to perform 32 rounds of nonlinear iterative operation on each block using the SM4 block cipher algorithm to obtain the encrypted message. The hash value of the encrypted message is calculated using the SM3 cryptographic hash algorithm, and the hash value is signed using the SM2 algorithm based on the private key of the second communicating party to generate signature information; wherein, the secure message includes the encrypted message and the signature information.

[0010] In one possible implementation, during the process of the first communicating party receiving the security message, the method further includes: Extract the time-series features, behavioral features, protocol field features, and business instruction features of the security message; The extracted features are input into the intrusion detection model and matched with the normal communication behavior patterns of the power system learned by the intrusion detection model. The similarity distribution is used to quantify the comparison results to determine whether the security message is an abnormal message. The intrusion detection model is obtained by collecting normal communication messages of the power system under various operating conditions to construct a training sample set and training the training sample set with a multi-scale convolutional neural network. When the security message is determined to be a normal message, the second communication party is allowed to send the security message to the first communication party; when the security message is determined to be an abnormal message, the transmission of the security message is blocked.

[0011] Secondly, embodiments of this application disclose a communication connection method for a power system, the method comprising: In response to a request to establish a communication connection with the first communication party, a digital certificate issued based on a trusted root and the public key of the second communication party are sent to the first communication party. The system receives a first ciphertext and the public key of the first communicating party, and decrypts the first ciphertext using the private key of the second communicating party to obtain a first random number; wherein the first ciphertext is obtained by the first communicating party encrypting the first random number based on the public key of the second communicating party. Generate a second random number, encrypt the second random number using the public key of the first communicating party, generate a second ciphertext, and send the second ciphertext to the first communicating party; The first random number and the second random number are fused together to generate a session key; the session key is used to encrypt and digitally sign the plaintext message to be sent to obtain a secure message.

[0012] Thirdly, embodiments of this application disclose a communication connection device for a power system, applied to a first communication party, the device comprising: The first acquisition module is used to acquire, in response to a request to establish a communication connection with the second communication party, a digital certificate and a public key provided by the second communication party; wherein the digital certificate is issued based on a trusted root. The first generation module is used to generate a first random number when the legality verification of the digital certificate is passed; The first generation module is further configured to encrypt the first random number using the public key of the second communication party, generate a first ciphertext, and send the first ciphertext and the public key of the first communication party to the second communication party; The first decryption module is used to receive the second ciphertext sent by the second communicating party, and decrypt the second ciphertext using the private key of the first communicating party to obtain a second random number; wherein, the second ciphertext is obtained by the second communicating party encrypting the second random number based on the public key of the first communicating party; The first generation module is further configured to perform a fusion operation on the first random number and the second random number to generate a session key; The first acquisition module is further configured to receive a security message sent by the second communication party; The first decryption module is further configured to decrypt and sign the secure message using the session key to obtain a plaintext message; the secure message is obtained by the second communication party encrypting and digitally signing the plaintext message based on the session key.

[0013] In one possible implementation, the device further includes a verification module; The verification module is used to verify that the issuing authority of the digital certificate is a trusted root recognized by the power system, that the digital certificate is within its validity period, that the signature of the certificate digital is authentic and valid, and that the certificate chain is complete; after all verification items pass, the digital certificate is deemed to have passed the legality verification.

[0014] In one possible implementation, the first generation module is specifically used to use the public key of the second communicating party to encrypt the first random number using the SM2 elliptic curve cryptography algorithm to generate the first ciphertext; wherein, the first ciphertext includes elliptic curve points, a key stream generated by a key derivation function, and the result of an XOR operation between the first random number and the key stream.

[0015] In one possible implementation, the first generation module is specifically used to perform an XOR operation on the first random number and the second random number to generate the session key, which serves as the base key for subsequent plaintext message encryption and digital signature.

[0016] In one possible implementation, the device further includes a first encryption module, which is used to divide the plaintext message into 128-bit blocks, perform 32 rounds of nonlinear iterative operations on each block using the session key through the SM4 block cipher algorithm to obtain an encrypted message; calculate the hash value of the encrypted message using the SM3 cryptographic hash algorithm, and perform SM2 algorithm signing on the hash value based on the private key of the second communicating party to generate signature information; wherein, the secure message includes the encrypted message and the signature information.

[0017] In one possible implementation, the device further includes a verification module, which is used to extract time-series features, behavioral features, protocol field features, and business instruction features of the security message; input the extracted features into an intrusion detection model, and perform matching calculations with the normal communication behavior patterns of the power system learned by the intrusion detection model; determine whether the security message is an abnormal message based on the similarity distribution quantization comparison results; wherein, the intrusion detection model is obtained by collecting normal communication messages of the power system under various operating conditions to construct a training sample set, and training the training sample set using a multi-scale convolutional neural network; when the security message is determined to be a normal message, the second communication direction is allowed to send the security message to the first communication direction; when the security message is determined to be an abnormal message, the transmission of the security message is blocked.

[0018] In one possible implementation, the first acquisition module is further configured to receive a security message sent by the second communication party; The first decryption module is further configured to decrypt and sign the secure message using the session key to obtain a plaintext message; the secure message is obtained by the second communication party encrypting and digitally signing the plaintext message based on the session key.

[0019] Fourthly, embodiments of this application disclose a communication connection device for a power system, applied to a second communication party, the device comprising: The sending module is used to send a digital certificate issued based on a trusted root and the public key of the second communication party to the first communication party in response to a request to establish a communication connection with the first communication party. The second acquisition module is used to receive the first ciphertext and the public key of the first communication party sent by the first communication party; The second decryption module is used to decrypt the first ciphertext using the private key of the second communicating party to obtain a first random number; wherein the first ciphertext is obtained by the first communicating party encrypting the first random number based on the public key of the second communicating party; The first generation module is used to generate a second random number and encrypt the second random number using the public key of the first communicating party to generate a second ciphertext. The sending module is used to send the second ciphertext to the first communicating party; The second generation module is further configured to perform a fusion operation on the first random number and the second random number to generate a session key; the session key is used to encrypt and digitally sign the plaintext message to be sent to obtain a secure message.

[0020] In one possible implementation, the second acquisition module is used to receive the security message sent by the first communicating party; The second encryption module is used to encrypt and digitally sign the plaintext message to be sent using the session key, generate a secure message, and send it to the first communication party.

[0021] Fifthly, embodiments of this application disclose a control device, including a processor and a memory, wherein the memory is used to store programs, instructions or code, and the processor is used to execute the programs, instructions or code in the memory to complete the communication connection method of the power system as described in either the first or second aspect.

[0022] Sixthly, embodiments of this application disclose a computer-readable storage medium, characterized in that it stores a computer program, which is loaded by a processor to execute the communication connection method of the power system as described in either the first or second aspect.

[0023] This application provides a communication connection method and device for a power system. The method is applied to a first communication party. After responding to a request to establish a communication connection with a second communication party, the first party obtains a digital certificate and a public key provided by the second communication party. After verifying the validity of the digital certificate, a first random number is generated. Then, the first random number is encrypted using the public key of the second communication party to obtain a first ciphertext, which is then sent to the second communication party along with the first communication party's public key. Next, the method receives a second ciphertext generated by the second communication party based on the first communication party's public key, which is then decrypted using the first communication party's private key to obtain the second random number. A fusion operation is performed on the first and second random numbers to generate a session key. Furthermore, the first and second communication parties can use this session key to encrypt and digitally sign plaintext messages to be sent, generating secure messages and sending them to the second communication party.

[0024] This application embodiment establishes a pre-identity verification mechanism for the communication connection between the first and second communicating parties by introducing a digital certificate issued by a trusted root and completing legality verification, thus avoiding the risk of unauthorized entities participating in the communication from the access stage. By encrypting random numbers with the public keys of both parties and then decrypting them with their private keys to generate a session key, secure negotiation of exclusive session keys between the two parties is achieved, ensuring the uniqueness and confidentiality of the keys. Simultaneously, the plaintext messages are encrypted and digitally signed using the negotiated session key before transmission, which not only improves the data security of power system communication messages during transmission but also enables message traceability and integrity verification through digital signatures. This effectively solves the problems of lax identity authentication, insecure key negotiation, and easy leakage or tampering of message transmission in power system communication, thereby improving the overall security level of the power system communication process. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart illustrating a communication connection method for a power system provided in an embodiment of this application; Figure 2 A flowchart illustrating a communication method for a power system provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a communication connection device for a power system provided in an embodiment of this application. Detailed Implementation

[0027] As described earlier, with the deep transformation of power systems towards digitalization and intelligence, power system communication networks have become the core infrastructure connecting all aspects of power production, dispatching, management, and operation and maintenance. The network scale continues to expand, and the structure is becoming increasingly complex, achieving the integration of traditional dedicated power communication networks with emerging network forms such as the Internet of Things and cloud computing. Against this backdrop, the security threats faced by power system communications are becoming increasingly diverse, complex, and covert. In addition to traditional network attacks such as DDoS attacks and SQL injection, as well as data leaks and malware intrusions, specialized attack methods targeting power industrial control systems are constantly emerging, seriously threatening the safe and stable operation of power systems.

[0028] The existing power system communication security protection system is ill-suited to the security requirements following digital transformation and suffers from numerous technical deficiencies. Anomaly detection methods based on signature-based matching and fixed rule bases can only identify known attacks and anomalies, exhibiting poor performance in detecting novel and unknown zero-day attacks, resulting in a high false negative rate. Furthermore, fixed rule bases cannot adapt to the dynamic changes in communication networks. In complex environments, this easily generates numerous false alarms, increasing the workload of maintenance personnel while hindering the timely and accurate location and handling of communication anomalies. In addition, the lack of unified security protection standards among different business departments and equipment manufacturers within the power system leads to a fragmented protection system, preventing the formation of a globally collaborative protection capability and further exacerbating the communication security risks of the power system.

[0029] To address this technical problem, embodiments of this application provide a communication connection method and device for a power system. The method is applied to a first communication party. Upon responding to a request to establish a communication connection with a second communication party, the first party obtains a digital certificate and a public key provided by the second communication party. After verifying the validity of the digital certificate, a first random number is generated. Subsequently, the first random number is encrypted using the public key of the second communication party to obtain a first ciphertext, which is then sent to the second communication party along with the first communication party's public key. Next, the method receives a second ciphertext generated by the second communication party based on the first communication party's public key, which is then decrypted using the private key of the first communication party to obtain the second random number. A fusion operation is performed on the first and second random numbers to generate a session key. Furthermore, the first and second communication parties can use this session key to encrypt and digitally sign plaintext messages to be sent, generating secure messages and sending them to the second communication party.

[0030] This application embodiment establishes a pre-identity verification mechanism for the communication connection between the first and second communicating parties by introducing a digital certificate issued by a trusted root and completing legality verification, thus avoiding the risk of unauthorized entities participating in the communication from the access stage. By encrypting random numbers with the public keys of both parties and then decrypting them with their private keys to generate a session key, secure negotiation of exclusive session keys between the two parties is achieved, ensuring the uniqueness and confidentiality of the keys. Simultaneously, the plaintext messages are encrypted and digitally signed using the negotiated session key before transmission, which not only improves the data security of power system communication messages during transmission but also enables message traceability and integrity verification through digital signatures. This effectively solves the problems of lax identity authentication, insecure key negotiation, and easy leakage or tampering of message transmission in power system communication, thereby improving the overall security level of the power system communication process.

[0031] The method provided in this application is applicable to various hardware devices and nodes in power systems that require secure data interaction, such as the dispatch master station server and communication gateway of the power dispatch center, the measurement and control devices, protection devices, and remote terminals of substations, as well as the acquisition terminals of distributed energy stations, and the smart meters and feeder terminals of distribution networks. Simultaneously, it is compatible with communication hardware devices such as optical transceivers and switches in dedicated power communication networks, and can be implemented in bidirectional data interaction scenarios between various types of devices, including dispatch master stations and substations, substations and field terminals, and distributed energy devices and distribution dispatch centers.

[0032] The aforementioned hardware devices have high-frequency data interaction needs in power production, dispatching, operation and maintenance, such as issuing instructions, collecting data, and providing status feedback. They are all connected to the trusted architecture of the power system and can complete digital certificate issuance and verification by relying on supporting hardware such as trusted root servers and certificate verification terminals. This solution can achieve full-process security protection for identity authentication, key negotiation, message encryption and signing, and anomaly detection in the communication process of such hardware, effectively adapting to the communication security needs of hardware devices in the power system industrial control environment, and ensuring the confidentiality, integrity, and availability of data transmission between devices.

[0033] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0034] See Figure 1 , Figure 1 This is a flowchart illustrating a communication connection method for a power system provided in an embodiment of this application. In this embodiment, both the first and second communicating parties are nodes in the power system. As an example, the first communicating party is a trusted node, and the second communicating party is a trusted management center that initiates the communication.

[0035] As the core management entity of the power system's trusted architecture, the Trusted Management Center is responsible for coordinating the system's identity authentication, certificate issuance, key management, and security policy control. It is the initiator and manager of communication connection establishment and secure interaction.

[0036] A trusted node refers to a terminal device or service node within a power system that possesses data exchange capabilities, such as substation monitoring and control devices or dispatch servers. A trusted node is the responder in a communication connection and the subject of data exchange.

[0037] The following example uses the first communicating party as a trusted node and the second communicating party as a trusted management center to illustrate this method, which includes: S101: In response to the request to establish a communication connection with the trusted node, the Trusted Management Center sends a digital certificate issued by the Trusted Root and the public key of the Trusted Management Center to the trusted node.

[0038] A digital certificate is a standardized identity credential issued by a trusted root authority in the power system. Digital certificates are issued based on this trusted root authority. They are used to prove the legitimate identity of the certificate holder (such as a trusted management center). A digital certificate includes core fields such as public key, subject information, signature algorithm, and validity period.

[0039] A public key is the public key used in asymmetric encryption algorithms. It appears in pairs with a private key and is used to encrypt information or verify signatures. It is a fundamental element for establishing a secure session between communicating parties.

[0040] In this embodiment, the communication connection establishment process is initiated by the Trusted Management Center and responded to by the Trusted Node. The Trusted Management Center responds to the connection request by simultaneously retrieving its own digital certificate from its local certificate store or the Trusted Root Server. This digital certificate is authenticated by the Trusted Root Server of the power system and possesses legitimate identity validity. Simultaneously, the Trusted Management Center extracts its own public key information and integrates the two into a complete authentication data packet, which is then sent to the Trusted Node through the established preliminary communication link. This transmission process can employ plaintext transmission of identity credentials to ensure that the Trusted Node can quickly obtain the data required for authentication between the two parties.

[0041] The Trusted Management Center (TMC) must ensure the validity and integrity of digital certificates. The retrieved digital certificates must include key information such as the root trust's signature, certificate validity period, subject identifier, and public key parameters to prevent subsequent verification failures due to missing or corrupted digital certificates. Simultaneously, the public key must correspond to the TMC's asymmetric key pair to ensure the decryptability of subsequent encryption operations.

[0042] The Trusted Management Center proactively provides trusted nodes with digital certificates issued based on the Trusted Root and its own public key, enabling rapid delivery of identity credentials between the communicating parties and providing direct evidence for subsequent identity verification by the trusted nodes. Relying on the digital certificate issued by the Trusted Root ensures the authority and unforgeability of the identity credentials from the source, effectively reducing the risk of unauthorized entities impersonating the Trusted Management Center to access the network. The simultaneous provision of the public key provides the necessary encryption key for the trusted nodes to subsequently encrypt random numbers and generate session keys, a prerequisite for secure key negotiation between the two parties, thus improving the security and efficiency of the power system communication connection establishment phase.

[0043] S102: The trusted node responds to the request to establish a communication connection with the trusted management center and obtains the digital certificate and public key provided by the trusted management center.

[0044] Trusted nodes respond to connection requests and are in a listening and receiving state. Trusted nodes can receive digital certificates and public keys sent by the Trusted Management Center.

[0045] After obtaining a digital certificate, a trusted node needs to verify its legitimacy. The process of a trusted node verifying the legitimacy of a digital certificate is as follows: Verify that the issuing authority of the digital certificate is a trusted root recognized by the power system, that the digital certificate is within its validity period, that the signature of the certificate digital is authentic and valid, and that the certificate chain is complete; all verification results must meet the preset standards to be considered as passed.

[0046] The trusted node retrieves information from the power system's pre-set trusted root authority database and precisely compares the issuing authority information recorded in the digital certificate with the legitimate information in the database. Only when the two match completely can it be determined that the certificate was issued by a trusted root authority recognized by the power system, thus eliminating counterfeit certificates issued by illegitimate institutions at the source. Simultaneously, the trusted node extracts the validity period field encapsulated in the certificate and compares the current system time with the certificate's effective and expiration times to confirm that the certificate is within its normal validity period, avoiding the use of expired or ineffective digital certificates and ensuring the validity and legitimacy of certificates.

[0047] Trusted nodes, based on the public key of the power system's root of trust, decrypt and verify the digital signature issued in the digital certificate. By checking whether the hash value of the signature matches the hash value of the certificate content, they determine whether the certificate content has been illegally tampered with, ensuring the integrity of the digital certificate and the authenticity of the signature. Simultaneously, a full-chain verification of the certificate chain is performed, starting from the digital certificate in the trusted management center and verifying upwards to the power system root certificate. This confirms the legitimacy of the issuance relationship of certificates at each level in the certificate chain, information matching, and the absence of breaks or omissions. This complete certificate chain verification further strengthens the legitimacy and authority of the digital certificate, avoiding security vulnerabilities present in single-level certificate verification.

[0048] S103: If the validity of the digital certificate is verified, the trusted node generates the first random number.

[0049] The first random number is a random number randomly generated by the trusted node at the initial stage of connection establishment, and serves as one of the core basic parameters for session key negotiation in this application embodiment. The first random number has the characteristics of high randomness and uniqueness, and is used to perform fusion calculations with the second random number generated by the trusted management center to finally generate a session key known only to the two communicating parties, which is a key element to ensure the security of key negotiation.

[0050] Legitimacy verification refers to a series of verification operations performed by trusted nodes on digital certificates received from trusted management centers.

[0051] After verifying the legitimacy of the digital certificate from the Trusted Management Center, the trusted node enters the pre-negotiation preparation stage. The trusted node uses its built-in random number generation module to generate a highly random string based on the system's preset random number generation rules.

[0052] During the generation of the first random number, the trusted node must ensure that the length of the random number meets the requirements of subsequent encryption and key fusion. As an example, the random number is 16 bytes long to guarantee the security and uniqueness of the key negotiation. After generating the first random number, the trusted node temporarily stores it in a local secure storage area. This secure storage area has data isolation and protection features to prevent the random number from being illegally obtained or tampered with before subsequent steps are executed. This step is a crucial transition from authentication to secure key negotiation during the connection establishment phase, providing core foundational data for subsequent encrypted transmission and key generation between the two parties.

[0053] This application embodiment generates a first random number after the digital certificate's legitimacy verification is passed, thereby generating the basic parameters for key negotiation. This solves the technical problems in existing technologies where random number generation lacks prior authentication support and is easily forged or predicted. The highly random first random number, as a core component of the session key, provides a unique and unpredictable basis for the generation of subsequent security keys, effectively avoiding the risk of key leakage due to the predictability of random numbers. This fundamentally ensures the security of the session key negotiation process in power system communication, laying a solid security foundation for subsequent message encryption and signature verification, and significantly improving the security protection level of the entire communication process.

[0054] S104: The trusted node uses the public key of the trusted management center to encrypt the first random number and generate the first ciphertext.

[0055] In this embodiment, after generating the first random number, the trusted node immediately retrieves the previously obtained public key from the trusted management center and initiates an asymmetric encryption process to encrypt the first random number. As an example, the SM2 elliptic curve cryptography algorithm can be used for encryption, which conforms to the encryption security specifications and key length requirements of the power system.

[0056] During the encryption process, trusted nodes strictly adhere to the power system's pre-defined encryption algorithm execution standards to prevent subsequent decryption failures at the trusted management center due to non-standard encryption operations. Simultaneously, the generated first ciphertext undergoes integrity verification to confirm that the ciphertext data is complete, unaltered, and can be transmitted intact to the trusted management center. This provides data assurance for the smooth progress of subsequent key negotiations between the two parties. This encryption operation transforms the original plaintext first random number into ciphertext that can only be decrypted by the node itself, fundamentally preventing the random number from being illegally stolen or tampered with during transmission.

[0057] This application embodiment utilizes the public key of a trusted management center to perform asymmetric encryption on a first random number to generate a first ciphertext. This ensures that the core parameters of the session key negotiation are transmitted in ciphertext form, solving the technical problem of plaintext random number transmission being easily stolen and tampered with, and ensuring the confidentiality and integrity of the first random number during transmission. Simultaneously, the asymmetric encryption characteristic allows only the trusted management center to decrypt and restore the first random number using its own private key, achieving dedicated transmission protection for the first random number and effectively improving the overall security of the key negotiation process in power system communication.

[0058] In one possible implementation, the trusted node encrypts the first random number using the public key of the trusted management center, including: Using the public key of the Trusted Management Center, the first random number is encrypted using the SM2 elliptic curve cryptography algorithm to generate the first ciphertext. The first ciphertext includes elliptic curve points, a keystream generated by the key derivation function, and the result of an XOR operation between the first random number and the keystream.

[0059] In this embodiment, after the trusted node completes the verification of the digital certificate's legitimacy and generates the first random number, it uses the SM2 elliptic curve cryptography algorithm as the core and the public key of the trusted management center as the encryption key to achieve asymmetric encryption protection for the first random number.

[0060] The trusted node retrieves the public key of the trusted management center, confirms that the public key parameters of the trusted management center are complete and uniquely match the identity of the trusted management center, uses the first random number as the original data for encryption, and performs encryption operation according to the SM2 elliptic curve encryption algorithm standard preset by the power system.

[0061] In the specific encryption process, the trusted node first generates corresponding elliptic curve points through elliptic curve point operations. Then, it calls the key derivation function (KDF) to generate a unique keystream based on the coordinates of the elliptic curve points, relevant parameters of the trusted management center's public key, and encryption context information. Finally, the first random number is XORed with this keystream to obtain the XOR result. The elliptic curve points, keystream, and XOR result are then integrated into the first ciphertext, completing the full encryption of the first random number. This encryption method does not directly encrypt the first random number; instead, it further enhances the encryption security level of the first random number through a combination of key derivation and XOR operations. Furthermore, the components of the generated ciphertext are interconnected and can only be decrypted by the trusted management center using its own private key according to the corresponding process, reducing the risk of encrypted data being cracked.

[0062] S105: The trusted node sends the first ciphertext and the trusted node's public key to the trusted management center.

[0063] In this embodiment, after the trusted node completes the encryption operation of the first random number and generates the first ciphertext, it immediately retrieves its own public key information from its local key store. The first ciphertext and the trusted node's public key can be integrated into a complete key exchange data packet, which is then sent to the trusted management center via a dedicated communication link for the power system. During the data packet integration process, the trusted node performs format standardization processing on the first ciphertext and its own public key to ensure that both types of data can be accurately identified and parsed by the receiving module of the trusted management center. Simultaneously, a basic verification identifier is added to the data packet for the trusted management center to verify whether data loss or tampering occurred during transmission.

[0064] When a trusted node sends the first ciphertext and its public key, it selects a dedicated transmission channel based on the communication specifications of the power system's trusted architecture. During the transmission process, the transmission status of the data packets is monitored in real time. If a transmission timeout or failure occurs, the data packet will be retransmitted according to preset rules to ensure that the first ciphertext and the trusted node's public key can be transmitted completely and accurately to the trusted management center.

[0065] S106: The Trusted Management Center receives the first ciphertext and the public key of the trusted node sent by the trusted node.

[0066] In this embodiment, the Trusted Management Center receives the first ciphertext and the public key of the trusted node sent by the trusted node through a dedicated communication link in the power system. During the data reception process, the Trusted Management Center performs integrity verification on the received data, confirming that the first ciphertext is free of missing data and that the public key parameters of the trusted node are complete and valid. If any data tampering or loss is detected, the center will immediately initiate a data retransmission request to the trusted node to ensure the accuracy of the received data.

[0067] Meanwhile, the Trusted Management Center can perform preliminary format verification on the received trusted node public keys to confirm that the trusted node's public key conforms to the public key specifications of the power system's asymmetric encryption algorithm. Furthermore, the Trusted Management Center will temporarily store the initial ciphertext and the verified trusted node public key in a local secure cache area. This secure cache area has strict access control, effectively preventing the data from being illegally obtained or tampered with before subsequent processing.

[0068] S107: The Trusted Management Center uses its private key to decrypt the first ciphertext and obtain the first random number.

[0069] The Trusted Management Center retrieves its private key, uniquely paired with the public key, as the decryption key to perform layer-by-layer decryption of the first ciphertext. Specifically, the Trusted Management Center extracts elliptic curve points from the first ciphertext, performs a dot product operation on these points using its private key to accurately obtain their coordinate information, and then calls the key derivation function KDF (Knowledge Function Derivation) consistent with that used by the trusted node for encryption. Preset parameters such as the elliptic curve point coordinates and the random number length are input into the function to generate a keystream identical to that used by the encryption end. Finally, the XOR result of the first ciphertext is XORed with this keystream to reconstruct the first random number generated by the trusted node.

[0070] Throughout the decryption process, the Trusted Management Center follows the standard procedure of the SM2 decryption algorithm, ensuring that the calculation parameters at each step are consistent with the encryption parameters of the trusted nodes to avoid decryption failure due to algorithm execution deviations. Simultaneously, the Trusted Management Center verifies the length and format of the first random number obtained after decryption, confirming that the length of the first random number meets the parameter requirements for power system key negotiation. After successful verification, the first random number is temporarily stored in a local secure cache, preparing data for subsequent generation of the second random number and fusion calculation to generate the session key.

[0071] This application embodiment achieves decryption of the first ciphertext by combining the SM2 elliptic curve asymmetric decryption algorithm with a dedicated private key. Only a trusted management center holding the corresponding private key can complete the decryption operation, fundamentally ensuring the security of the first random number transmission and avoiding the risk of unauthorized cracking of core key parameters. Simultaneously, the use of the same key derivation function and operation rules as the encryption end ensures the accuracy of the decryption result.

[0072] S108: The Trusted Management Center generates a second random number, encrypts the second random number using the public key of the trusted node, and generates a second ciphertext.

[0073] The Trusted Management Center, relying on the first random number generation module, generates a second random number with the same specifications as the first random number, according to the power system's preset random number generation standards, ensuring the uniformity and compatibility of parameters for subsequent fusion calculations. After generation, the Trusted Management Center retrieves the previously received and verified public key of the trusted node, uses this public key as the encryption key, and performs encryption on the second random number following the SM2 elliptic curve cryptography algorithm standard, which is completely consistent with the trusted node's encryption of the first random number.

[0074] In the specific encryption process, the Trusted Management Center first generates the corresponding elliptic curve points through elliptic curve point operations, then calls the same key derivation function KDF as the trusted node, inputs the coordinates of the elliptic curve points, the relevant parameters of the trusted node's public key, and the encryption context information, and generates a dedicated key stream. Subsequently, the second random number is XORed with the key stream to obtain the XOR result. Finally, the elliptic curve points, the key stream, and the XOR result are integrated into a second ciphertext with a unified format to complete the entire encryption operation.

[0075] During the encryption process, the Trusted Management Center will perform double verification on the algorithm execution parameters and the ciphertext composition structure to ensure that the second ciphertext conforms to the SM2 encryption algorithm specification and can be accurately decrypted by trusted nodes using their own private keys, thus avoiding the interruption of the subsequent key negotiation process due to encryption operation deviations.

[0076] This application's embodiments continue the security specifications of asymmetric encryption under the trusted architecture of power systems. By generating a second random number of the same specifications, it provides compliant basic parameters for the subsequent fusion calculation of random numbers between the two parties to generate the session key, ensuring the consistency of the key negotiation process. Simultaneously, the trusted management center adopts the same SM2 elliptic curve encryption algorithm and operation process as the preceding encryption steps, achieving bidirectional adaptation between encryption and decryption, improving the smoothness of key interaction. Furthermore, relying on the asymmetric encryption characteristics of the trusted node's public key, the second random number can only be decrypted by the corresponding trusted node, fundamentally ensuring the confidentiality and integrity of the second random number during transmission, effectively reducing the risk of core key parameters being illegally stolen or tampered with.

[0077] S109: The Trusted Management Center sends the second ciphertext to the Trusted Node.

[0078] After generating the second ciphertext, the Trusted Management Center transmits it to trusted nodes via a dedicated power communication link, following the communication protocol defined in the power system's trusted architecture. During data transmission, the Trusted Management Center can add an identification field and a data verification code to the second ciphertext. The identification field allows trusted nodes to quickly identify the data packet as the second ciphertext data from the key negotiation phase, while the verification code verifies the integrity of the data during transmission, preventing data loss or tampering.

[0079] The Trusted Management Center monitors the transmission status of the second ciphertext in real time during the transmission process. If transmission timeout, link interruption, or failure of the receiver to provide confirmation occurs, automatic retransmission will be performed according to the retransmission rules preset by the power system. The number of retransmissions and the interval duration follow the communication specifications of the industrial control system, which improves the accuracy of data transmission and avoids bandwidth occupation of the power communication network due to frequent retransmissions.

[0080] S110: The trusted node receives the second ciphertext sent by the trusted management center, decrypts the second ciphertext using the trusted node's private key, and obtains the second random number.

[0081] After receiving the second ciphertext data packet sent by the Trusted Management Center via the dedicated communication link of the power system, the trusted node can first perform format parsing and integrity verification on the data packet. Based on the checksum within the data packet, it confirms that the second ciphertext has not been lost or tampered with during transmission. If the verification fails, it initiates a retransmission request to the Trusted Management Center. If the verification passes, the complete second ciphertext is extracted. Subsequently, the trusted node retrieves its private key, uniquely paired with its public key, as the decryption key, and performs layer-by-layer decryption of the second ciphertext according to the same algorithm specifications used by the Trusted Management Center during encryption.

[0082] During decryption, the trusted node extracts elliptic curve points from the second ciphertext and performs a dot product operation on these points using its own private key to accurately obtain their coordinates. It then calls the same key derivation function (KDF) as the trusted management center, inputting the elliptic curve point coordinates and a preset random number length as parameters to generate a keystream matching the encryption end. Finally, it performs an XOR operation between the XOR result of the second ciphertext and this keystream to reconstruct the second random number generated by the trusted management center. After decryption, the trusted node verifies the obtained second random number to ensure it meets the length requirements for power system key negotiation. Once verification is successful, it temporarily stores the second random number in its local secure cache.

[0083] S111: The trusted node and the trusted management center perform a fusion operation on the first random number and the second random number to generate a session key.

[0084] After successfully obtaining their respective first and second random numbers, the trusted node and the trusted management center perform identical fusion operations. Both follow the fusion operation rules preset by the power system's trusted architecture, using XOR operations as the core to fuse the two 16-byte random numbers. During the operation, the corresponding bytes of the first and second random numbers are XORed sequentially, generating a new 16-byte random number through byte-by-byte logical operations. This random number serves as the exclusive session key for the trusted node and the trusted management center, and because the operation rules and parameters are completely identical, the generated session keys are identical for both parties.

[0085] During the fusion operation, both parties perform parameter verification to ensure that the two random numbers used in the operation are valid 16-byte data that conforms to the specifications, thus preventing invalid results due to data inconsistencies. After the operation is completed, the generated session key is also verified for format and validity to ensure it is compatible with the encryption requirements of the subsequent SM4 block cipher algorithm. Once verified, the session key is stored in a dedicated secure storage area for encryption keys on the local machine. At the same time, both parties immediately delete the first and second random numbers from their local cache to prevent key security risks caused by the leakage of core original parameters.

[0086] This embodiment generates a session key by synchronously performing an XOR fusion operation between the communicating parties. Two random numbers known only to the two parties are transformed into a unique communication encryption key, achieving secure session key generation. This ensures the uniqueness and exclusivity of the key while avoiding the risk of leakage from direct transmission over the network. Using XOR as the fusion rule aligns with the computational efficiency requirements of power control systems, achieving rapid computation while maintaining key security, thus avoiding communication delays caused by complex calculations. Furthermore, promptly deleting the original random numbers after the operation further reduces the risk of key leakage and ensures the session key becomes a unique and untraceable encryption basis for both parties. Simultaneously, the synchronous execution of the same operation rule by both parties ensures the consistency of key generation, providing a unified core key for subsequent message encryption and signing operations.

[0087] Based on the above steps S101-S111, this application embodiment also provides a communication method for a power system. It should be noted that the first communication party and the second communication party can communicate after establishing a communication connection through steps S101-S111, without having to execute steps S101-S111 before each communication.

[0088] Using the example of the first communicating party being a trusted node and the second communicating party being a trusted management center, as follows: Figure 2 As shown. Figure 2 This application provides a flowchart illustrating a communication method for a power system, which includes: S112: The Trusted Management Center uses the session key to encrypt and digitally sign the plaintext message to be sent, generates a secure message, and sends it to the Trusted Node.

[0089] The Trusted Management Center (TMC) can use the SM4 block cipher algorithm to encrypt messages, combined with the SM3 cryptographic hash algorithm and the SM2 elliptic curve algorithm to implement digital signatures, forming a secure message with dual security protection. During execution, the TMC first retrieves the plaintext message to be sent to the trusted node, uses the session key as the encryption key, divides the plaintext message into 128-bit units, and performs 32 rounds of nonlinear iterative operations on each unit to complete the encryption of the entire plaintext message, generating an encrypted message. Then, it digitally signs the encrypted message. First, it calculates the unique hash value of the encrypted message using the SM3 algorithm, and then uses its own dedicated SM2 private key to perform a signature operation on the hash value, generating a digital signature with tamper-proof and traceable characteristics. Finally, the encrypted message and digital signature are integrated and encapsulated into a standardized secure message, which is then sent to the trusted node via a dedicated power system communication link.

[0090] During the encryption and signing process, the Trusted Management Center can perform dual verification of the integrity of the plaintext message and the execution parameters of the encryption algorithm to ensure that there is no data loss during encryption and that the algorithm parameters comply with power control specifications. The generated hash value and digital signature are verified for consistency to prevent signature invalidation. Simultaneously, a business identifier and verification field are added to the encapsulated secure message to facilitate rapid identification and integrity verification by trusted nodes upon receipt. The transmission phase continues the dedicated link transmission strategy from the key negotiation phase, monitoring the transmission status of the secure message in real time. If a transmission failure occurs, automatic retransmission is performed according to preset rules to ensure that the secure message is delivered to the trusted node completely and accurately.

[0091] This application embodiment uses the SM4 block cipher algorithm to perform high-strength encryption on plaintext messages, ensuring that the message content is transmitted in ciphertext form. This reduces the risk of illegal theft or leakage of power business data during transmission and improves the confidentiality of data transmission. Furthermore, the combination of SM3 hash operation and SM2 private key signature gives the encrypted message a unique identifier. This effectively reduces the risk of message tampering or forgery during transmission and enables precise traceability of message origin through signature verification, solving the problem of easily tampered or untraceable messages in traditional power communication. Simultaneously, using a mutually agreed-upon dedicated session key as the encryption base ensures the uniqueness and exclusivity of the encryption operation, avoiding the security leakage risks associated with universal keys. The resulting secure message in the form of {encrypted message, digital signature} achieves dual security protection: encryption to prevent leakage and signature to prevent tampering.

[0092] S113: The trusted node receives the security message sent by the trusted management center, decrypts and signs the security message using the session key, and obtains the plaintext message.

[0093] After the Trusted Management Center completes the encapsulation of the secure message, it sends the secure message, including the encrypted message and digital signature, to the trusted node via a dedicated power system communication link. The transmission process follows the communication protocol specifications of the power system's trusted architecture, configuring a unique service transmission identifier for the secure message. Leveraging the high security and stability of the dedicated power system communication network, the real-time and continuous transmission of the message is guaranteed. Simultaneously, the message transmission status is monitored in real time. If transmission link interruption or message transmission timeout occurs, a retransmission mechanism will be automatically triggered according to preset rules to ensure that the secure message is delivered completely and accurately to the target trusted node, providing complete data support for subsequent signature verification and message decryption operations at the node.

[0094] To further improve the full-link security protection system of power system communication and enhance the ability to prevent and control abnormal risks during the transmission of security messages, this application embodiment adds a real-time intrusion detection link based on multi-scale convolutional neural networks during the transmission stage of security messages from the trusted management center to trusted nodes. By extracting multi-dimensional features of messages and matching them with pre-trained normal communication behavior patterns, the legitimacy verification of security messages and the accurate interception of abnormal messages can be achieved.

[0095] Specifically, during the process of the first communicating party receiving the security message, the method further includes: Trusted nodes extract time-series features, behavioral features, protocol field features, and business instruction features from security messages. These extracted features are then input into an intrusion detection model, which performs matching calculations against the normal communication behavior patterns of the power system learned by the model. Based on the similarity distribution quantization comparison results, the system determines whether the security message is an anomalous message. If the security message is determined to be normal, the second communication direction is allowed to send the security message to the first communication direction; if the security message is determined to be anomalous, its transmission is blocked.

[0096] The intrusion detection model is obtained by collecting normal communication packets of the power system under various operating conditions to construct a training sample set, and then training the training sample set using a multi-scale convolutional neural network.

[0097] In this embodiment, during the transmission of secure messages encapsulated with encrypted messages and digital signatures from the Trusted Management Center to trusted nodes via a dedicated power communication link, the transmitted secure messages are standardized and parsed to accurately extract their time-series features, behavioral features, protocol field features, and business instruction features. These four types of features comprehensively cover the temporal patterns, device interaction behaviors, protocol format specifications, and business instruction attributes of power system communication messages, providing complete and accurate feature basis for subsequent anomaly detection. The core detection model of the intrusion detection module is trained using a multi-scale convolutional neural network, built by collecting normal communication messages under various operating conditions such as stable power system operation, peak load, equipment maintenance, and fault recovery. The intrusion detection module extracts local details, intermediate-scale features, and global macro-features of messages layer by layer using 1×1, 2×2, and 3×3 convolutional kernels of different scales, deeply learning the normal communication behavior patterns under different power system scenarios, and possessing the ability to accurately identify abnormal deviations at the feature level.

[0098] After completing the multi-dimensional feature extraction of security messages, the extracted feature vectors are input into the pre-trained intrusion detection model. The intrusion detection module automatically performs matching calculations, comparing the features of the message to be detected with the learned normal communication behavior patterns in a comprehensive and refined manner. The final judgment result is obtained by quantitatively analyzing the similarity distribution between the two.

[0099] If the quantitative comparison results show that the similarity between the characteristics of the security message to be detected and the normal communication behavior pattern meets the system's preset threshold, it is determined to be a normal message, and the message is directly allowed to continue to be transmitted along the dedicated link to the trusted node, thus ensuring the continuity of normal business data interaction in the power system.

[0100] If the feature similarity exceeds the preset abnormal threshold, the message is determined to be an abnormal message, triggering a security interception mechanism to directly block the subsequent transmission process of the security message, eliminating the possibility of illegal messages reaching trusted nodes and being executed, and completely avoiding the security threat of malicious messages to the power system from the transmission stage.

[0101] Meanwhile, after determining that a message is abnormal, this embodiment of the application will also fully record key data such as the original content of the abnormal message, the extracted feature information, the judgment result, and the time of detection, forming a standardized detection log and storing it in a designated secure area. This provides complete and reliable data support for power system operation and maintenance personnel to conduct security tracing analysis, anomaly cause investigation, and protection strategy optimization. This anomaly detection link is deeply coordinated and interlocked with the previous security verification operations such as identity two-way authentication based on the trusted architecture of the power system, SM2 algorithm key negotiation, and SM4+SM3+SM2 algorithm message encryption signature. This ensures that the entire link of power system communication, from connection establishment and key generation to message transmission, is under strict security protection. It effectively makes up for the shortcomings of traditional protection methods, which can only identify known attacks and have a high false alarm and false negative rate. It can accurately identify new and unknown zero-day attacks and hidden abnormal messages, and can adapt to the dynamic changes of the power system communication network. This greatly improves the intelligence and precision of power system communication security protection and comprehensively protects the confidentiality, integrity, and availability of power communication data.

[0102] This application also provides a communication connection device for a power system, applied to a first communication party, such as... Figure 3 As shown, the device includes: The first acquisition module 301 is used to acquire, in response to a request to establish a communication connection with the second communication party, a digital certificate provided by the second communication party and the public key of the second communication party; wherein the digital certificate is issued based on a trusted root. The first generation module 302 is used to generate a first random number when the legality verification of the digital certificate is passed; The first generation module 302 is further configured to encrypt the first random number using the public key of the second communication party, generate a first ciphertext, and send the first ciphertext and the public key of the first communication party to the second communication party; The first decryption module 303 is used to receive the second ciphertext sent by the second communication party, and decrypt the second ciphertext using the private key of the first communication party to obtain a second random number; wherein, the second ciphertext is obtained by the second communication party encrypting the second random number based on the public key of the first communication party; The first generation module 302 is further configured to perform a fusion operation on the first random number and the second random number to generate a session key; The first acquisition module 301 is further configured to receive a security message sent by the second communication party; The first decryption module 303 is further configured to use the session key to decrypt and sign the secure message to obtain a plaintext message; the secure message is obtained by the second communication party encrypting and digitally signing the plaintext message based on the session key.

[0103] In one possible implementation, the device further includes a verification module; The verification module is used to verify that the issuing authority of the digital certificate is a trusted root recognized by the power system, that the digital certificate is within its validity period, that the signature of the certificate digital is authentic and valid, and that the certificate chain is complete; after all verification items pass, the digital certificate is deemed to have passed the legality verification.

[0104] In one possible implementation, the first generation module 302 is specifically used to use the public key of the second communicating party to encrypt the first random number using the SM2 elliptic curve encryption algorithm to generate the first ciphertext; wherein, the first ciphertext includes elliptic curve points, a key stream generated by a key derivation function, and the result of an XOR operation between the first random number and the key stream.

[0105] In one possible implementation, the first generation module 302 is specifically used to perform an XOR operation on the first random number and the second random number to generate the session key, which serves as the base key for subsequent plaintext message encryption and digital signature.

[0106] In one possible implementation, the device further includes a first encryption module, which is used to divide the plaintext message into 128-bit blocks, perform 32 rounds of nonlinear iterative operations on each block using the session key via the SM4 block cipher algorithm to obtain an encrypted message; calculate the hash value of the encrypted message using the SM3 cryptographic hash algorithm, and perform an SM2 algorithm signature on the hash value based on the private key of the second communicating party to generate signature information; wherein, the secure message includes the encrypted message and the signature information.

[0107] In one possible implementation, the device further includes a verification module, which is used to extract time-series features, behavioral features, protocol field features, and business instruction features of the security message; input the extracted features into an intrusion detection model, and perform matching calculations with the normal communication behavior patterns of the power system learned by the intrusion detection model; determine whether the security message is an abnormal message based on the similarity distribution quantization comparison results; wherein, the intrusion detection model is obtained by collecting normal communication messages of the power system under various operating conditions to construct a training sample set, and training the training sample set using a multi-scale convolutional neural network; when the security message is determined to be a normal message, the second communication direction is allowed to send the security message to the first communication direction; when the security message is determined to be an abnormal message, the transmission of the security message is blocked.

[0108] This application embodiment also provides a communication connection device for a power system, characterized in that it is applied to a second communication party, and the device includes: The sending module is used to send a digital certificate issued based on a trusted root and the public key of the second communication party to the first communication party in response to a request to establish a communication connection with the first communication party. The second acquisition module is used to receive the first ciphertext and the public key of the first communication party sent by the first communication party; The second decryption module is used to decrypt the first ciphertext using the private key of the second communicating party to obtain a first random number; wherein the first ciphertext is obtained by the first communicating party encrypting the first random number based on the public key of the second communicating party; The first generation module is used to generate a second random number and encrypt the second random number using the public key of the first communicating party to generate a second ciphertext. The sending module is used to send the second ciphertext to the first communicating party; The second generation module is further configured to perform a fusion operation on the first random number and the second random number to generate a session key; The second acquisition module is used to receive the security message sent by the first communication party; The second encryption module is used to encrypt and digitally sign the plaintext message to be sent using the session key, generate a secure message, and send it to the first communication party.

[0109] This application also provides a control device. The control device may include a memory and a processor. The processor is used to execute the communication connection method of the power system described in any of the above embodiments. The memory may be random access memory (RAM), flash memory, read-only memory (ROM), non-volatile read-only memory (EPROM), registers, hard disk, removable disk, etc.

[0110] Memory can store computer instructions, which, when executed by a processor, can be used to implement communication connection methods in a power system. Memory can also store data.

[0111] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape) or a semiconductor medium (e.g., solid-state disk (SSD)).

[0112] This application also provides a readable storage medium for storing the methods provided in the above embodiments. For example, RAM, flash memory, ROM, EPROM, registers, hard disk, removable disk, or any other form of storage medium in the art.

[0113] In the embodiments of this application, the terms "first" and "second" (if they exist) are used only as name identifiers and do not represent the order of first and second.

[0114] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Regarding the methods disclosed in the embodiments, since they correspond to the product embodiments disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the description of the product embodiments.

[0115] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A communication connection method for a power system, characterized in that, Applied to the first communicating party, the method includes: In response to a request to establish a communication connection with a second communication party, the system obtains a digital certificate and a public key provided by the second communication party; wherein the digital certificate is issued based on a trusted root. If the validity of the digital certificate is verified, a first random number is generated; The first random number is encrypted using the public key of the second communicating party to generate a first ciphertext, and the first ciphertext and the public key of the first communicating party are sent to the second communicating party. The first communication party receives a second ciphertext sent by a second communication party, and decrypts the second ciphertext using the private key of the first communication party to obtain a second random number; wherein the second ciphertext is obtained by the second communication party encrypting the second random number based on the public key of the first communication party; The first random number and the second random number are fused to generate a session key; the key is used to decrypt and sign the secure message received by the first communicating party to obtain a plaintext message; the secure message is obtained by the second communicating party encrypting and digitally signing the plaintext message based on the session key.

2. The method according to claim 1, characterized in that, The method further includes: Verify that the issuing authority of the digital certificate is a trusted root recognized by the power system, that the digital certificate is within its validity period, and that the signature of the certificate digital is authentic and valid and the certificate chain is complete; Once all verification items pass, the digital certificate is deemed to have passed the legitimacy verification.

3. The method according to claim 1, characterized in that, The step of encrypting the first random number using the public key of the second communicating party includes: Using the public key of the second communicating party, the first random number is encrypted using the SM2 elliptic curve cryptography algorithm to generate the first ciphertext; wherein, the first ciphertext includes elliptic curve points, a key stream generated by a key derivation function, and the result of an XOR operation between the first random number and the key stream.

4. The method according to claim 1, characterized in that, The fusion operation on the first random number and the second random number includes: Perform an XOR operation on the first random number and the second random number to generate the session key, which serves as the base key for subsequent plaintext message encryption and digital signature.

5. The method according to claim 1, characterized in that, The security message is obtained through the following process: The plaintext message is divided into 128-bit blocks, and the session key is used to perform 32 rounds of nonlinear iterative operation on each block using the SM4 block cipher algorithm to obtain the encrypted message. The hash value of the encrypted message is calculated using the SM3 cryptographic hash algorithm, and the hash value is signed using the SM2 algorithm based on the private key of the second communicating party to generate signature information; wherein, the secure message includes the encrypted message and the signature information.

6. The method according to claim 1, characterized in that, During the process of the first communicating party receiving the security message, the method further includes: Extract the time-series features, behavioral features, protocol field features, and business instruction features of the security message; The extracted features are input into the intrusion detection model and matched with the normal communication behavior patterns of the power system learned by the intrusion detection model. The similarity distribution is used to quantify the comparison results to determine whether the security message is an abnormal message. The intrusion detection model is obtained by collecting normal communication messages of the power system under various operating conditions to construct a training sample set and training the training sample set with a multi-scale convolutional neural network. When the security message is determined to be a normal message, the second communication party is allowed to send the security message to the first communication party; when the security message is determined to be an abnormal message, the transmission of the security message is blocked.

7. A communication connection method for a power system, characterized in that, Applied to a second communicating party, the method includes: In response to a request to establish a communication connection with the first communication party, a digital certificate issued based on a trusted root and the public key of the second communication party are sent to the first communication party. The system receives a first ciphertext and the public key of the first communicating party, and decrypts the first ciphertext using the private key of the second communicating party to obtain a first random number; wherein the first ciphertext is obtained by the first communicating party encrypting the first random number based on the public key of the second communicating party. Generate a second random number, encrypt the second random number using the public key of the first communicating party, generate a second ciphertext, and send the second ciphertext to the first communicating party; The first random number and the second random number are fused together to generate a session key; the session key is used to encrypt and digitally sign the plaintext message to be sent to obtain a secure message.

8. A communication connection device for a power system, characterized in that, Applied to the first communication party, the device includes: The first acquisition module is used to acquire, in response to a request to establish a communication connection with the second communication party, a digital certificate and a public key provided by the second communication party; wherein the digital certificate is issued based on a trusted root. The first generation module is used to generate a first random number when the legality verification of the digital certificate is passed; The first generation module is further configured to encrypt the first random number using the public key of the second communication party, generate a first ciphertext, and send the first ciphertext and the public key of the first communication party to the second communication party; The first decryption module is used to receive the second ciphertext sent by the second communicating party, and decrypt the second ciphertext using the private key of the first communicating party to obtain a second random number; wherein, the second ciphertext is obtained by the second communicating party encrypting the second random number based on the public key of the first communicating party; The first generation module is further configured to perform a fusion operation on the first random number and the second random number to generate a session key; the key is used to decrypt and sign the secure message received by the first communication party to obtain a plaintext message; the secure message is obtained by the second communication party encrypting and digitally signing the plaintext message based on the session key.

9. A communication connection device for a power system, characterized in that, Applied to a second communication party, the device includes: The sending module is used to send a digital certificate issued based on a trusted root and the public key of the second communication party to the first communication party in response to a request to establish a communication connection with the first communication party. The second acquisition module is used to receive the first ciphertext and the public key of the first communication party sent by the first communication party; The second decryption module is used to decrypt the first ciphertext using the private key of the second communicating party to obtain a first random number; wherein the first ciphertext is obtained by the first communicating party encrypting the first random number based on the public key of the second communicating party; The first generation module is used to generate a second random number and encrypt the second random number using the public key of the first communicating party to generate a second ciphertext. The sending module is used to send the second ciphertext to the first communicating party; The second generation module is further configured to perform a fusion operation on the first random number and the second random number to generate a session key; the session key is used to encrypt and digitally sign the plaintext message to be sent to obtain a secure message.

10. A control device, characterized in that, It includes a processor and a memory, the memory being used to store programs, instructions, or code, and the processor being used to execute the programs, instructions, or code in the memory to complete the communication connection method of the power system as described in any one of claims 1-6 or 7.

11. A computer-readable storage medium, characterized in that, The system contains a computer program that is loaded by a processor to execute the communication connection method for the power system as described in any one of claims 1-6 or 7.