Security control method and apparatus, central coordinator, station node, and storage medium

By dynamically adjusting the security mode according to the communication type and introducing certificate validity verification and key update mechanisms in the power communication network, the problem of insufficient communication security between the central coordinator and site nodes in the power communication system is solved, and the effect of security against eavesdropping is achieved.

CN116800413BActive Publication Date: 2026-11-24BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310790212.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-11-24
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

In power communication systems, the communication security between the central coordinator and site nodes is insufficient, posing a risk of eavesdropping, especially in the case of HPLC and HRF communication methods where there is a lack of effective security strategies.

Method used

By introducing security control methods into the power communication network, the central coordinator and site nodes dynamically adjust the security mode according to the communication type. Single-mode nodes enter the network in unencrypted mode, while multi-mode nodes enter the network in encrypted mode. Certificate validity verification and key update mechanisms are adopted to ensure the encrypted processing of communication data.

Benefits of technology

This improved secure communication between the central coordinator and site nodes, reduced eavesdropping incidents, and achieved a secure anti-eavesdropping solution based on normal communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116800413B_ABST
    Figure CN116800413B_ABST
Patent Text Reader

Abstract

This invention discloses a security control method, device, central coordinator, site nodes, and storage medium. When the security mode of the power communication network is unencrypted, the site node sends a first network access request (i.e., sends a first network access request) to the central coordinator (CCO). The CCO decides whether to activate encryption mode based on the communication type of the site node attached to the first network access request. If the security mode of the power communication network is set to encryption mode, the site node sends a second network access request (i.e., sends a second network access request) to the CCO to re-establish the network. Therefore, security control is achieved on the basis of normal communication, improving the secure communication between the central coordinator (CCO) and the site nodes (STAs), and reducing the probability of eavesdropping incidents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of power communication technology, and in particular to a security control method, device, central coordinator, site node and storage medium. Background Technology

[0002] Power communication acquisition systems typically include a master station and electricity meters. The master station can be configured with a Central Coordinator (CCO), and the electricity meters can be configured with Site Nodes (STAs). Data exchange between the master station and the electricity meters is supported by the CCO and the STAs.

[0003] Among related technologies, HPLC (High-speed Power Line Carrier) and HRF (High-speed Radio Frequency) are the main communication methods used in power communication acquisition systems. However, the communication security between the Central Coordinator (CCO) and the Station Nodes (STAs) needs to be improved. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in related technologies. To this end, this invention proposes a security control method, apparatus, central coordinator, site nodes, and storage medium.

[0005] This invention provides a security control method for a power communication network, used for site nodes included in the power communication network; the method includes: When the security mode of the power communication network is unencrypted, a first network access request is sent to the central coordinator included in the power communication network; wherein, the first network access request is accompanied by the communication type of the site node; the first network access request is used to instruct the central coordinator to set the security mode of the power communication network according to the communication type of the site node in the power communication network. If the central coordinator sets the security mode of the power communication network to encrypted mode, a second network access request is sent to the central coordinator to re-establish the network.

[0006] This invention provides a security control method for a power communication network, applied to a central coordinator within the power communication network; the method includes: When the security mode of the power communication network is unencrypted, a first network access request sent by a station node in the power communication network is received; wherein the first network access request includes the communication type of the station node. If the security mode of the power communication network is set to encryption mode according to the communication type of the station nodes in the power communication network, the second network access request sent by the station nodes in the power communication network is received to re-establish the network.

[0007] This invention provides a security control device for a power communication network, applied to site nodes included in the power communication network; the device includes: The first request sending module is configured to send a first network access request to the central coordinator included in the power communication network when the security mode of the power communication network is unencrypted; wherein the first network access request is accompanied by the communication type of the site node; the first network access request is used to instruct the central coordinator to set the security mode of the power communication network according to the communication type of the site node in the power communication network. The second request sending module is used to send a second network access request to the central coordinator to re-establish the network if the central coordinator sets the security mode of the power communication network to encrypted mode.

[0008] This invention provides a security control device for a power communication network, applied to a central coordinator within the power communication network; the device includes: The first request receiving module is configured to receive a first network access request sent by a station node in the power communication network when the security mode of the power communication network is unencrypted; wherein the first network access request includes the communication type of the station node. The second request receiving module is used to receive a second network access request sent by a station node in the power communication network, in order to re-establish the network, if the security mode of the power communication network is set to encryption mode according to the communication type of the station node in the power communication network.

[0009] The present invention provides a central coordinator, characterized in that it includes a transceiver, a processor, and a memory, wherein the memory is used to store a computer program, and the processor invokes the computer program to execute a method as applied in any of the above embodiments of the central coordinator.

[0010] The present invention provides a site node, the site node including a transceiver, a processor and a memory, the memory for storing a computer program, the processor calling the computer program to execute a method as described in any of the above embodiments applied to the site node.

[0011] The present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method in any of the above embodiments.

[0012] In this invention, when the security mode of the power communication network is unencrypted, the site node sends a network access request (i.e., sends the first network access request) to the Central Coordinator (CCO) for the first time. The CCO decides whether to activate encryption mode based on the communication type of the site node attached to the first network access request. If the security mode of the power communication network is set to encryption mode, the site node sends a second network access request (i.e., sends the second network access request) to the CCO to re-establish the network. Therefore, security control is achieved on the basis of normal communication, improving the secure communication between the CCO and the site node (STA), reducing the probability of eavesdropping incidents, and realizing a secure anti-eavesdropping scheme between the CCO and the site node (STA).

[0013] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0014] Figure 1 This is a flowchart illustrating the implementation of the security strategy provided in the embodiments of this specification.

[0015] Figure 2a This is a schematic diagram illustrating the secure network access authentication process for dual-mode nodes provided in the embodiments described in this specification.

[0016] Figure 2b This is a schematic diagram illustrating the secure network access authentication process for dual-mode nodes provided in the embodiments described in this specification.

[0017] Figure 3 This is a schematic diagram illustrating the certificate validity verification provided for the implementation of this specification.

[0018] Figure 4a This is a schematic diagram illustrating the CCO sending a CEK update message as provided in the embodiments of this specification.

[0019] Figure 4b This is a schematic diagram illustrating the process of a STA sending a CEK request message in an embodiment of this specification.

[0020] Figure 4c This is a schematic diagram illustrating the process of CCO sending a CEK confirmation message in the embodiments described in this specification.

[0021] Figure 5a This is a schematic diagram of the data structure corresponding to the hierarchical structure provided in the embodiments of this specification.

[0022] Figure 5b This is a flowchart illustrating the data encryption and transmission process provided for the embodiments of this specification.

[0023] Figure 5cThis is a flowchart illustrating the data decryption and reception process provided for the embodiments of this specification.

[0024] Figure 6 This is a flowchart illustrating a safety control method provided in one embodiment of this specification.

[0025] Figure 7 This is a flowchart illustrating a safety control method provided in another embodiment of this specification.

[0026] Figure 8 This is a flowchart illustrating whether or not a key is sent, provided for implementation of this specification.

[0027] Figure 9a This is a flowchart illustrating a safety control method provided in yet another embodiment of this specification.

[0028] Figure 9b This is a flowchart illustrating a safety control method provided in another embodiment of this specification.

[0029] Figure 10 This is a flowchart illustrating the process of sending a key request message to the central coordinator, as provided in the embodiments of this specification.

[0030] Figure 11 This is a flowchart illustrating the safety control method provided in the embodiments of this specification.

[0031] Figure 12 This is a schematic diagram of the framework of a safety control device provided in one embodiment of this specification.

[0032] Figure 13 A schematic diagram of the framework of a safety control device provided for yet another embodiment of this specification. Detailed Implementation

[0033] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0034] In related technologies, power communication data acquisition systems primarily rely on ESAM encryption to prevent external devices from actively reading meter data. The main components are the meter and the master station, and the encryption is implemented at the service layer. However, during the system's construction, only secure communication between the master station and the meter was considered. For example, in fee control-like interactions, the master station directly interacts with the meter, with the concentrator acting as a transparent forwarder. Current data acquisition tasks such as daily data freezing can only achieve ESAM encryption with the help of certain terminals; ESAM encryption cannot be implemented for some terminals.

[0035] In the related technology's data acquisition systems, two communication methods are employed: HPLC (High-speed Power Line Carrier) and HRF (High-speed Radio Frequency). Power line communication technology uses power lines as the communication medium for data transmission. HRF is a broadband, low-power wireless communication technology. In these related technologies, at least the networking methods of power line communication systems based on these two communication methods lack security measures. Therefore, there is a certain risk of eavesdropping when the CCO and STA communicate directly.

[0036] Specifically, the communication module includes single-mode nodes (also called single-mode modules) that do not support security encryption, and multi-mode nodes (also called multi-mode modules) that do support security encryption. To ensure security control while maintaining normal communication when both types of modules coexist in the network, a secure communication method to prevent eavesdropping is needed for direct communication between the CCO and STA. This reduces the probability of eavesdropping during normal communication between the CCO and STA. It should be noted that multi-mode nodes can be based on two communication methods (e.g., dual-mode nodes) or multiple communication methods. Multi-mode node communication methods can include at least HPLC and HRF, and can also include one or more of Ethernet, mobile links, Bluetooth links, Wi-Fi links, LoRa links, ZigBee links, and RS-485 links.

[0037] This example illustrates a scenario using a dual-mode node based on both HPLC and HRF communication methods. In power communication data acquisition systems based on HPLC and HRF, the current technology does not incorporate security strategies in the networking of the communication modules. If security strategies are required for this power communication data acquisition system, the following issues need to be considered: 1) Compatibility issues between single-mode nodes that do not support security encryption and dual-mode nodes that support security encryption.

[0038] 2) Verification of the legitimacy of certificates issued by third parties (such as designated metrology centers).

[0039] 3) Secure network access authentication process for communication modules.

[0040] 4) Maintenance and updating of the keys used for encryption.

[0041] 5) How to incorporate encryption and decryption processes during business data transmission and reception.

[0042] To address the above problems, this specification provides a security control method for a power communication network, which includes a central coordinator (CCO). For details, please refer to... Figure 1 After powering on, the CCO activates the whitelist for the power communication network and sets its security mode to unencrypted, allowing whitelisted nodes to join the network. When any STA joins the network, it sends a first network entry request to the CCO. The CCO receives this request, which includes the STA's communication type. The CCO maintains a topology list for the power communication network and records the communication type of each STA in this list. This process continues, with the topology list storing the communication types of STAs joining the network. Based on the communication types recorded in the topology list, the CCO selects different security modes for network configuration.

[0043] Please continue reading. Figure 1 When all STAs recorded in the topology list have single-mode communication types, the CCO's security mode remains unchanged, i.e., it remains unencrypted. When the STAs recorded in the topology list have dual-mode communication types, the CCO sets the security mode of the power communication network to encrypted mode.

[0044] Please continue reading. Figure 1 If both single-mode and dual-mode nodes exist in the communication type of the STA recorded in the topology list, the CCO sets the security mode of the power communication network to compatibility mode. After setting the security mode to compatibility mode, the CCO restarts, and the STAs in the power communication network apply for network access in compatibility mode. In compatibility mode, application layer messages transmitted by dual-mode nodes need to be encrypted. For example, an STA not yet joined to the power communication network receives a beacon sent by the CCO and determines the current security mode as compatibility mode based on the beacon. It then determines whether encryption of communication data is required. If it is a single-mode node, data encryption is not required, and it can join the network according to the single-mode node's network access process. For example, a single-mode node X sends a network access request to the CCO, carrying the MAC address of the single-mode node X. The CCO checks whether the MAC address of the single-mode node X exists in the whitelist. If it does, the CCO allows the single-mode node X to join the power communication network. If it is a dual-mode node, the application layer messages transmitted by the dual-mode node need to be encrypted. Therefore, the network access process of the dual-mode node needs to complete the secure exchange of the communication management key CMK and the communication encryption key CEK.

[0045] Please continue reading. Figure 1 If all STAs recorded in the topology list have a communication type of dual-mode node, the CCO sets the security mode of the power communication network to mandatory mode; in mandatory mode, all messages except for the transformer area identification message need to be encrypted.

[0046] Please see Figure 2a and Figure 2b This example illustrates the secure network access authentication process for a dual-mode node. A STA not yet joined to the power communication network receives a beacon from the CCO and determines its current security mode as encrypted. It then determines whether encryption of communication data is necessary; both dual-mode nodes in compatibility and mandatory modes require data encryption. Therefore, during the CCO's re-networking process after a reboot, dual-mode node Y sends a second network access request to the CCO. This second request carries authentication information, including its MAC address, identity certificate, and a random number.

[0047] Please continue reading. Figure 2a The CCO receives authentication information from dual-mode node Y, which includes Y's MAC address, identity certificate, and random number. First, the CCO determines whether to allow network access based on Y's MAC address: either Y's MAC address is in the blacklist or not in the whitelist. If not in the whitelist, Y is added to the blacklist, and a response is sent to Y denying network access, stating the reason as not being in the whitelist.

[0048] Please continue reading. Figure 2a If network access is allowed based on the MAC address of dual-mode node Y, it is necessary to further verify the validity of dual-mode node Y's identity certificate. If dual-mode node Y's identity certificate is invalid, dual-mode node Y will be added to the blacklist, and a reply will be sent to dual-mode node Y stating that network access is denied because the certificate of dual-mode node Y is invalid.

[0049] Please continue reading. Figure 2a If dual-mode node Y receives a rejection message indicating that the node is not on the whitelist, it will resend the authentication information to the CCO. If this still fails, dual-mode node Y will switch to another power communication network and request to join that network.

[0050] Please continue reading. Figure 2a If dual-mode node Y receives a rejection message indicating that the certificate is invalid, dual-mode node Y switches to other power communication networks and requests to join other power communication networks.

[0051] Please continue reading. Figure 2a If dual-mode node Y does not receive a reply message from CCO, dual-mode node Y restarts its timer. After the timer expires, dual-mode node Y sends its authentication information to CCO again.

[0052] Please continue reading. Figure 2aIf the identity certificate of dual-mode node Y is valid, CCO extracts the public key information from the identity certificate of dual-mode node Y, uses the extracted public key information to encrypt the communication management key CMK, and uses its own private key to encrypt the random number of dual-mode node Y. CCO then sends its own identity certificate, the encrypted random number, and the encrypted CMK together to dual-mode node Y.

[0053] Please continue reading. Figure 2a The dual-mode node Y verifies the CCO's identity certificate and the correctness of the encrypted random number. If correct, it decrypts the encrypted CMK and saves it. The dual-mode node Y then encrypts its MAC address using the CMK, obtaining the CMK-encrypted MAC address. This CMK-encrypted MAC address is then attached to the association request and sent to the CCO. If incorrect, the dual-mode node Y adds the CCO to its blacklist.

[0054] Please continue reading. Figure 2b Upon receiving the association request from dual-mode node Y, the CCO decrypts the MAC address encrypted with the communication management key CMK to obtain the MAC address of dual-mode node Y. The decrypted MAC address of dual-mode node Y is compared with the MAC address of dual-mode node Y included in the authentication information. If they match, the CCO encrypts the communication encryption key CEK using the communication management key CMK and attaches the encrypted communication encryption key CEK to the association confirmation information or association summary information, sending it to dual-mode node Y. Dual-mode node Y decrypts the encrypted communication encryption key CEK using CMK to obtain and save the communication encryption key CEK. If dual-mode node Y fails to decrypt the encrypted communication encryption key CEK using CMK, dual-mode node Y switches to another power communication network and requests to join that network. If the two do not match, an association failure message is sent to dual-mode node Y, informing dual-mode node Y that the communication management key CMK is incorrect.

[0055] Please continue reading. Figure 2b If dual-mode node Y receives an association failure message, it switches to another power communication network and requests to join that network. Otherwise, it follows the single-mode node joining procedure.

[0056] This section provides an example of the identity certificate verification process. Dual-mode nodes can employ two encryption algorithms: asymmetric encryption, represented by SM2, and symmetric encryption, represented by SM4-CBC. Considering the timeliness requirements during data transmission and reception, symmetric encryption can be used to encrypt communication data; simultaneously, to ensure reliable data transmission, asymmetric encryption is used to encrypt the encryption key in the symmetric encryption algorithm. Asymmetric encryption requires an identity certificate provided by a third party (such as the State Grid Metrology Center) to extract the public and private keys. Therefore, the certificate must first be verified to ensure the correctness of the extracted public and private keys. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 The diagram illustrates the certificate validity verification process. The sender sends a certificate to the receiver. The certificate contains: a signature from the metrology center using its root key on the key required for the network access certificate; the key required for the network access certificate; and the root public key used for encryption by the metrology center on both the sender and receiver. The receiver verifies the signature in the certificate using its root key. If the signature is correct, the sender's certificate is valid and subsequent encryption / decryption can proceed. If the signature is incorrect, the sender's certificate is invalid and subsequent encryption / decryption cannot proceed.

[0057] Furthermore, CMK is mainly used for data encryption related to the network access process, and its usage efficiency is relatively low. CEK is used for data encryption throughout the entire business cycle after network access, and its usage time is long and its efficiency is high. To prevent CEK from being attacked during long-term use, CEK can be updated periodically, and different CEKs can be used for data encryption in different time periods. CEK is updated periodically, and the update cycle can be set to N. The current CEK used in the current CCO cycle is denoted as CEK(K), and the CEK used in the next CCO cycle is denoted as CEK(K+1).

[0058] Please see Figure 4a , Figure 4a The process of sending CEK update messages to the CCO. CEK update messages are broadcast periodically by the CCO.

[0059] When CCO restarts and reconfigures the network, CEK initializes, and CCO starts a timer with a duration of (12 / 24). N, when the timer expires and the current time is T1, CCO executes the following settings: CEK(K) countdown starts = 0; CEK(K) validity period = CEK(K+1) start time – update message creation time T1; CEK(K+1) start time = CEK(K) start time + CEK key update period; CEK(K+1) countdown starts = CEK(K+1) start time – update message creation time T1; CEK (K+1) validity period = CEK key update cycle; It should be noted that since CEK(K) is currently being used, the countdown of CEK(K) starts at 0. During the use of CEK(K), the effective duration of CEK(K) is equal to the countdown duration of CEK(K+1). The countdown of CEK(K+1) can be understood as the countdown duration from the start of using CEK(K+1). Therefore, broadcasting a CEK update message at the current moment can be interpreted as taking the creation time of the update message as the current moment.

[0060] The CCO sends the CEK(K+1) update message to the dual-mode node for the first time, and at the same time, the CCO modifies the timer duration to (2 / 24). N. When the timer expires, the current time is T2, and CCO executes the following settings: CEK(K) countdown starts = 0; CEK(K) validity period = CEK(K+1) start time – update message creation time T2; CEK(K+1) start time = CEK(K) start time + CEK key update period; CEK(K+1) countdown starts = CEK(K+1) start time – update message creation time T2; CEK (K+1) validity period = CEK key update cycle; The CCO sends the CEK(K+1) update message to the STA for the second time. Thus, the CCO has broadcast the CEK(K+1) update message twice.

[0061] After broadcasting the CEK (K+1) update message twice, the CCO modifies the timer duration to (10 / 24). N. When the timer expires, it is necessary to switch to CEK(K+1) and use CEK(K+1) as the currently used CEK. Then, repeat the above steps, starting the timer with a duration set to (12 / 24). N until a new key update cycle is reached.

[0062] Furthermore, the CCO can proactively send a CEK (K+1) by sending a CEK update message, or the STA can request a CEK (K+1). See also... Figure 4b , Figure 4b The process of sending a CEK request message to a STA.

[0063] In any of the following situations, such as data loss, short STA network access time, or STA needing to switch to CEK(K+1) upon initial network access, the STA sends a CEK request message to the CCO. For example, if the STA has not obtained the next cycle's CEK key CEK(K+1) when the CEK key validity period has 1 / 3 remaining or less than 20 minutes, it requests the next cycle's CEK key CEK(K+1) from the CCO by sending a CEK request message, and the CCO responds to the STA's CEK request message.

[0064] In this example, a request is sent when 1 / 3 of the CEK key validity period remains, or when less than 20 minutes have passed. If it is not received, a request is sent every 5 minutes until the start time of CEK(K+1). If CEK(K+1) is still not received, a request is sent every 2 minutes until 10 minutes after the start time. If it is still not received, STA restarts.

[0065] In this example, when the STA receives the association confirmation information, it initializes the CEK, sets the current remaining duration of the CEK to the key update cycle, and starts a timer, which is set to (16 / 24). N or the remaining time is 20 minutes; before the timer expires, if the STA receives a CEK update message broadcast by the CCO, it updates the CEK (K+1), updates the validity period, and changes the timer time to the start time of CEK (K+1). After the timer expires, it begins to execute in a loop: the timer is started and set to (16 / 24). N or 20 minutes remaining.

[0066] If the STA does not receive a CEK update message broadcast by the CCO, the STA sends a CEK request message to the CCO, changing the timer time to 5 minutes, meaning it sends a CEK request message to the CCO every 5 minutes. If a CEK update message or a CEK request confirmation message is received before each timer expires, the STA updates CEK(K+1), updates the validity period, and changes the timer time to the start time of CEK(K+1). Otherwise, after the timer expires, the STA sends a CEK request message to the CCO until the start time of CEK(K+1) is reached. Then, the STA sends a CEK request message to the CCO, changing the timer time to 2 minutes, meaning it sends a CEK request message to the CCO every 2 minutes. If a CEK update message or a CEK request confirmation message is received before each timer expires, the STA updates CEK(K+1), updates the validity period, and changes the timer time to the start time of CEK(K+1). Otherwise, after the timer expires, a CEK request message is sent to the CCO. If no CEK update message or CEK request confirmation message is received 10 minutes after the CEK (K+1) start time, the STA restarts. This involves a hardware reset, powering off and on again, and re-entering the network. It should be noted that network switching does not occur during this process.

[0067] Further, please refer to Figure 4c , Figure 4c The process for sending a CEK confirmation message to the CCO is as follows: After receiving the CEK request message, the CCO encrypts the CEK using the CMK key and replies with the encrypted CEK to the STA. The CEK request message includes the currently requested CEK sequence number. Upon receiving the CEK request message, the CCO determines whether the currently requested CEK sequence number is the next CEK sequence number. If not, it updates as follows: CEK(K) countdown starts = 0; CEK(K) validity period = CEK(K+1) start time – update message creation time; If so, update as follows: CEK(K+1) start time = CEK(K) start time + CEK key update period; CEK(K+1) countdown starts = CEK(K+1) start time – update message creation time; CEK (K+1) validity period = CEK key update cycle; The CCO sends a CEK update message to the STA.

[0068] This section provides an example of how encryption and decryption are performed during the transmission and reception of business data. The hierarchical structure includes the business layer, application layer, link layer, and physical layer. When business data is transmitted between different device sites, it should be encapsulated layer by layer according to the protocol stack's hierarchical requirements, and finally transmitted through the physical layer and power lines / space radiation. Data packets received by the physical layer via power lines or space radiation are then submitted to the application layer, requiring a reverse layer-by-layer decomposition and extraction process, ultimately delivering the business data to the application layer. Please refer to [link to relevant documentation]. Figure 5a The data structures corresponding to each layer. In this example, MSDU (MAC Service Data Unit) data frames are encrypted.

[0069] It should be noted that if the CCO is the data sender, it performs the encryption operation, while the STA is the data receiver, which performs the decryption operation. Similarly, if the STA is the data sender, it performs the encryption operation, while the CCO is the data receiver, it performs the decryption operation. Therefore, the data encryption and transmission process is the same at both the CCO and STA ends; hence, this example uses the module end as an example.

[0070] In this example, please refer to Figure 5b , Figure 5b The data encryption transmission process is as follows: When business data is sent at the module end, the module first determines whether it has enabled encryption mode. If encryption mode is not enabled, no encryption operation is performed, and the business data is sent directly. If encryption mode is enabled, it determines whether to encrypt the data based on the current encryption mode and whether the destination node supports encryption mode. During data encryption, the encryption key can be selected according to the encryption mode and the data type of the business. For forced mode messages such as association requests, association confirmations, association summaries, CEK request messages, CEK confirmation messages, and CEK update messages, CMK is selected. In other cases, such as application layer messages, CEK is used. The IV vector can be selected according to the MAC frame type: in a standard MAC frame, the first 4 bytes of the FC and bytes 0-7 of the standard MAC header are selected to form the IV vector from low to high bytes; in a single-hop MAC frame, the first 12 bytes of the single-hop MAC header FC are selected to form the IV vector from low to high bytes. The IV is used to combine with the key to form a key seed to generate an encrypted byte stream for data encryption.

[0071] The supported encryption types are divided into three categories: AES-GCM, AES-CBC, and SM4-CNC. When using AES-GCM encryption, the input data needs to be padded with zeros to ensure the string length is a multiple of 16. Then, the data is encrypted using the selected key type and IV vector. Finally, the ciphertext and MAC value are sent to the receiver. Similarly, when using the other two methods, AES-CBC and SM4-CNC encryption, the input data also needs to be padded with zeros to ensure it is a multiple of 16. The high-order bits of the IV are then padded with zeros to ensure it is 16 bytes. The data is then encrypted together with the selected key type, and the ciphertext is sent to the receiver.

[0072] In this example, please refer to Figure 5c , Figure 5c The data decryption and reception process is as follows: When business data is received at the module end, the module can determine whether the received data is encrypted and the key type through the MAC frame header. If it is not encrypted data, it is processed directly; if it is encrypted data, it is decrypted.

[0073] During data decryption, the key type can be directly obtained from the MAC frame header. The IV vector is selected according to the MAC frame type: in a standard MAC frame, the first 4 bytes of the FC and bytes 0-7 of the standard MAC header are selected to form the IV vector from low to high bytes; in a single-hop MAC frame, the first 12 bytes of the single-hop MAC header FC are selected to form the IV vector from low to high bytes.

[0074] Data decryption is performed based on the corresponding encryption type: AES-GCM, AES-CBC, or SM4-CNC. When using AES-GCM decryption, the selected key type and IV vector are used to decrypt the data, where the last 16 bytes of the data are the MAC value. When using the other two methods, the high-order bits of the IV need to be padded with zeros to reach 16 bytes before being decrypted together with the selected key type. If the decryption is successful, a SACK value is returned indicating successful decryption; otherwise, a SACK value is returned indicating decryption failure.

[0075] In some implementations, a security control method for a power communication network is provided, applied to a central coordinator within the power communication network. See also... Figure 6 The safety control method includes the following steps: S610. Set the security mode of the power communication network to unencrypted mode.

[0076] S620. Upon receiving the first network access request sent by the site node, obtain the communication type of the site node.

[0077] S630. If it is determined that there are multi-mode nodes in the power communication network based on the communication type of the site nodes and the list of node types corresponding to the power communication network, the security mode of the power communication network is set to encryption mode.

[0078] The node type list stores the communication types of nodes already connected to the power communication network. Multimode nodes can be nodes based on two communication methods (e.g., dual-mode nodes) or nodes based on multiple communication methods. Multimode node communication methods must include at least HPLC and HRF. Multimode node communication methods may also include one or more of the following: Ethernet, mobile link, Bluetooth link, Wi-Fi link, LoRa link, ZigBee link, and RS-485 link.

[0079] In some cases, the power acquisition system may contain single-mode nodes that do not support security encryption, or multi-mode nodes that do support security encryption. The communication types present in the power communication network are unknown to the central coordinator (CCO). First, to ensure that only single-mode nodes without security encryption can successfully join the power communication network, the CCO initially sets the security mode of the power communication network to unencrypted mode. Under this initial unencrypted mode, single-mode nodes are allowed to join the power communication network. Second, to guarantee secure communication for multi-mode nodes that support security encryption, and to implement security control strategies on top of normal communication, after initially setting the security mode of the power communication network to unencrypted mode, the first network access request sent by each communication module needs to include its communication type. This allows for setting a security mode appropriate to the actual communication types present in the power communication network. For example, if multi-mode nodes exist, the security mode of the power communication network is set to encrypted mode.

[0080] Specifically, upon initial power-on, the Central Coordinator (CCO) sets the security mode of the power communication network to unencrypted mode. In unencrypted mode, the CCO allows whitelisted site nodes to join the network. Site nodes (STAs) send a first network entry request to the CCO, which includes the STA's communication type. Upon receiving the first network entry request, the CCO retrieves the site node's communication type. The CCO pre-stores a list of node types corresponding to the power communication network, containing the communication types of already connected site nodes. It analyzes the STA's communication type in the first network entry request and the communication types present in the node type list to determine if multi-mode nodes exist in the power communication network. If so, it indicates a need for security policies for multi-mode nodes supporting encryption; therefore, the security mode of the power communication network is set to encrypted mode.

[0081] In the above implementation, the Central Coordinator (CCO) initially sets the security mode of the power communication network to unencrypted mode. In unencrypted mode, it receives the first network access request from a site node and, based on the communication type of the site node attached to the first network access request, decides whether to activate encrypted mode. If multi-mode nodes exist in the power communication network, the security mode is set to encrypted mode. This achieves simultaneous compatibility with both single-mode and multi-mode nodes, implements security control on the basis of normal communication, improves secure communication between the CCO and the site node (STA), reduces the probability of eavesdropping incidents, and realizes a secure anti-eavesdropping scheme between the CCO and the site node (STA).

[0082] In some implementations, the security control method may further include: if it is determined, based on the communication type of the site nodes and the list of node types corresponding to the power communication network, that all site nodes in the power communication network are single-mode nodes, maintaining the security mode of the power communication network as unencrypted mode.

[0083] The single-mode node is a module that communicates using the HPLC method. The Central Coordinator (CCO) pre-stores a list of node types corresponding to the power communication network, which contains the communication types of the network's connected site nodes. The CCO analyzes the communication types of the site nodes (STAs) attached to the first network access request and the communication types present in the node type list to determine if multi-mode nodes exist in the power communication network. If the analysis reveals that all site nodes in the power communication network are single-mode nodes, it indicates that no multi-mode nodes support encryption, and encryption mode cannot be enabled. Therefore, the CCO maintains the power communication network in unencrypted mode.

[0084] In the above embodiments, by determining that all station nodes in the power communication network are single-mode nodes, the security mode of the power communication network is maintained in unencrypted mode. This enables the setting of a security mode that is compatible with single-mode nodes for the actual communication type of STAs in the power communication network, thus ensuring the normal communication of the power communication network.

[0085] In some implementations, if it is determined that multi-mode nodes exist in the power communication network based on the communication type of the site nodes and the list of node types corresponding to the power communication network, the security mode of the power communication network is set to encryption mode, including at least one of the following: If, based on the communication type of the site nodes and the corresponding node type list of the power communication network, it is determined that both single-mode and multi-mode nodes exist in the power communication network, the security mode of the power communication network is set to compatibility mode. In compatibility mode, application layer messages transmitted by multi-mode nodes need to be encrypted, and multi-mode nodes are site nodes based on at least two communication methods: HPLC and HRF. Alternatively... If the power communication network is determined to be a multi-mode network based on the communication type of the site nodes and the node type list corresponding to the power communication network, the security mode of the power communication network is set to mandatory mode. In mandatory mode, all messages except for the transformer area identification message need to be encrypted.

[0086] Specifically, the Central Coordinator (CCO) pre-stores a list of node types corresponding to the power communication network. This list contains the communication types of existing network-connected STAs. The CCO analyzes the communication types of the STAs accompanying the first network access request, as well as the communication types present in the node type list. If it's determined that both single-mode and multi-mode nodes exist in the power communication network, the security mode is set to compatibility mode. This requires a CCO restart, and each STA reapplies for network access in compatibility mode. In compatibility mode, single-mode nodes can communicate unencrypted, while multi-mode nodes require encryption of application layer messages. Other message formats can also be communicated unencrypted.

[0087] If it is determined that all STAs in the power communication network are multi-mode nodes, it indicates that each STA in the power communication network supports encryption functions. There is no need to consider compatibility with single-mode nodes. The security mode of the power communication network is set to mandatory mode, and all messages except for the transformer area identification message need to be encrypted to improve communication security performance.

[0088] In the above embodiments, a security mode that is compatible with both single-mode and multi-mode nodes can be flexibly set according to the actual communication type of STAs in the power communication network, and a security strategy can be implemented on the basis of normal communication.

[0089] In some implementations, the security control method may further include at least one of the following: after setting the security mode to compatibility mode, receiving a second network access request sent by a station node in the power communication network in compatibility mode to reconfigure the network; or, after setting the security mode to mandatory mode, receiving a second network access request sent by a station node in the power communication network in mandatory mode to reconfigure the network.

[0090] Specifically, after the Central Coordinator (CCO) sets the security mode to compatibility mode, the CCO needs to be restarted. After the CCO restarts, the receiving site nodes (STAs) will send a second network access request to the CCO in compatibility mode in order to re-establish the network.

[0091] After the Central Coordinator (CCO) sets the security mode to forced mode, the CCO needs to be restarted. After the CCO restarts, all receiving site nodes (STAs) will send a second network access request to the CCO in forced mode to re-establish the network.

[0092] In the above implementation, by restarting the Central Coordinator (CCO), the site node (STA) resends the second network access request to re-establish the network and achieve secure communication in a security mode (compatible mode or forced mode) that matches the actual situation of the site communication type in the power communication network. Moreover, different security schemes can be adopted to encrypt and decrypt the transmitted service data.

[0093] In some implementations, after obtaining the communication type of the site node, the security control method may further include: recording the communication type of the site node to the node type list corresponding to the power communication network.

[0094] Specifically, before the Central Coordinator (CCO) and the Site Node (STA) can communicate securely, the CCO can store the communication type corresponding to the Site Node (STA) in the node type list corresponding to the power communication network.

[0095] In other cases, before the Central Coordinator (CCO) and the Site Nodes (STAs) can communicate securely, the CCO can store information such as the Site Nodes, their corresponding levels, communication types, and network node attributes in a topology list corresponding to the power communication network within the CCO. A topology map can be constructed based on the information data of the Site Nodes in the power communication network stored in the topology list.

[0096] In some implementations, please refer to Figure 7 The safety control method may also include the following steps: S710, broadcast beacon.

[0097] S720 receives the second network access request from the target multimode node.

[0098] S730: Determine whether to send the communication management key and communication encryption key to the target multi-mode node based on the identity authentication information.

[0099] The beacon includes an authentication enable flag; the beacon instructs unregistered target multi-mode nodes to determine their current encryption mode based on the authentication enable flag and send authentication information corresponding to that encryption mode to the central coordinator. The second network access request also includes authentication information.

[0100] In some cases, compared to the network access process for single-mode nodes, the normal network access of multi-mode nodes requires the secure exchange of the symmetric encryption keys CMK (communication management key) and CEK (communication encryption key).

[0101] Specifically, the broadcast beacon includes an authentication enable flag. When this flag is enabled, all target multi-mode nodes requesting a second network access are considered unregistered target multi-mode nodes. These unregistered nodes can obtain their current security mode based on the beacon sent by the central coordinator. The central coordinator receives the second network access request from the target multi-mode node and obtains the authentication information corresponding to the current encryption mode sent by the target multi-mode node. The central coordinator authenticates the target multi-mode node based on this information. If authentication is successful, the central coordinator can send both a communication management key and a communication encryption key to the target multi-mode node. Otherwise, if authentication is successful, neither the communication management key nor the communication encryption key is sent to the target multi-mode node.

[0102] In some other implementations, after sending the communication management key to the target multi-mode node, an authentication process for the CCO can be set up by the STA. If the CCO is authenticated by the STA, it can then send the communication encryption key to the target multi-mode node. That is, the CCO first sends the communication management key to the target multi-mode node and then sends the communication encryption key. Conversely, if the CCO is not authenticated by the STA, the CCO will not send the communication encryption key to the target multi-mode node.

[0103] In the above implementation, it is possible to flexibly determine whether to send communication management keys and communication encryption keys to the target multi-mode node based on the identity authentication information, thereby enabling security policies to be implemented on the basis of normal communication.

[0104] In some implementations, the authentication information includes a first random number, the MAC address of the target multi-mode node, and first certificate data. Determining whether to send a communication management key and a communication encryption key to the target multi-mode node based on the authentication information includes: if the MAC address of the target multi-mode node is in the network whitelist of the central coordinator and the first certificate data is verified as valid, encrypting the first random number using the private key of the central coordinator; extracting the first public key information from the first certificate data, and encrypting the communication management key using the extracted first public key information; sending the encrypted first random number, the encrypted communication management key, and the second certificate data of the central coordinator to the target multi-mode node, so that if the second certificate data is valid and the encrypted first random number passes the signature verification, the target multi-mode node decrypts and saves the encrypted communication management key using its private key.

[0105] The first certificate data may include a third party's signature using the root key for the key required for the first certificate data, and a key required for network access authentication. The MAC address can be used to uniquely identify a site node (STA).

[0106] Specifically, the process involves determining whether the target multi-mode node's MAC address is in the central coordinator's whitelist. If so, the validity of the first certificate data is further verified. If valid, the Central Coordinator (CCO) can encrypt the first random number using its private key. The CCO can then extract the first public key information from the first certificate data and use it to encrypt the communication management key. The CCO can then send an authentication confirmation message containing the encrypted first random number, the encrypted communication management key, and the CCO's second certificate data to the target multi-mode node. Upon receiving the authentication confirmation message, the target multi-mode node can verify the validity of the second certificate data and use the CCO's public key to verify the signature of the encrypted first random number. If the second certificate data is invalid, an authentication timer can be started. After the timer expires, the authentication confirmation message can be sent again. If the first random number fails verification, the Central Coordinator (CCO) is considered illegitimate. The CCO can be added to the CCO's network blacklist, and the authentication process can be restarted via a different network. If the second certificate data is valid and the encrypted first random number passes verification, the target multi-mode node can decrypt the encrypted communication management key using its private key. If decryption is successful, the target multi-mode node can save the communication management key, thus completing the exchange of communication management keys between the CCO and the target multi-mode node. If decryption fails, the authentication process can be restarted via a different network.

[0107] In the above implementation, after confirming that the MAC address of the target multi-mode node is in the network access whitelist of the central coordinator and verifying that the first certificate data is valid, the second certificate data of the central coordinator is sent to the target multi-mode node again. This allows the target multi-mode node to decrypt and save the encrypted communication management key using its private key, provided that the second certificate data is valid and the encrypted first random number passes the signature verification. This can improve the secure communication between the central coordinator (CCO) and the site node (STA).

[0108] In some implementations, please refer to Figure 8 Determining whether to send the communication management key and communication encryption key to the target multi-mode node based on the identity authentication information may include the following steps: S810: Receive association request sent by the target multi-mode node.

[0109] S820. Use the communication management key to decrypt the MAC address encrypted with the communication management key to obtain the decrypted MAC address of the target multi-mode node.

[0110] S830. If the decrypted MAC address of the target multi-mode node matches the MAC address included in the identity authentication information, send an association confirmation message to the target multi-mode node.

[0111] The association request includes the MAC address of the target multi-mode node, encrypted using the communication management key. The association confirmation message instructs the target multi-mode node to complete network access and saves the communication encryption key attached to the association confirmation message.

[0112] In some cases, when the second certificate data is valid and the encrypted first random number passes verification, the target multi-mode node can use its private key to decrypt and save the encrypted communication management key. To further enhance secure communication, the target multi-mode node needs to send an association request to the Central Coordinator (CCO). Specifically, the target multi-mode node can encrypt its MAC address using the communication management key and send the association request, along with its encrypted MAC address, to the CCO. Upon receiving the association request, the CCO can decrypt the encrypted MAC address using its communication management key to obtain the decrypted MAC address of the target multi-mode node. The decrypted MAC address of the target multi-mode node can be compared with the MAC address included in the authentication information. If the decrypted MAC address matches, the Central Coordinator (CCO) can send an association confirmation message to the target multi-mode node. Upon receiving the association confirmation message, the target multi-mode node can use it to instruct itself to complete network access. If network access is successful, the target multi-mode node saves the communication encryption key attached to the association confirmation message.

[0113] In the above implementation, after the target multi-mode node and the central coordinator (CCO) have completed their respective identity authentication, the target multi-mode node sends an association request to the central coordinator (CCO). After confirming that the decrypted MAC address of the target multi-mode node matches the MAC address included in the identity authentication information, the central coordinator (CCO) sends an association confirmation message to the target multi-mode node to instruct the target multi-mode node to complete the network access, thus ensuring network security. Furthermore, the association confirmation message includes a communication encryption key to facilitate the exchange of communication encryption keys between the central coordinator (CCO) and the target multi-mode node.

[0114] In some implementations, before sending the association confirmation information to the target multi-mode node, the security control method may further include: encrypting the communication encryption key using the communication management key to obtain the encrypted communication encryption key.

[0115] The associated confirmation information includes an encrypted communication encryption key. The associated confirmation information is used to instruct the target multi-mode node to decrypt the encrypted communication encryption key using the communication management key, and to obtain and save the communication encryption key.

[0116] Specifically, when the decrypted MAC address of the target multi-mode node matches the MAC address included in the authentication information, the Central Coordinator (CCO) can encrypt the communication encryption key using the communication management key to obtain the encrypted communication encryption key. This encrypted communication encryption key is then sent to the target multi-mode node along with the association confirmation information. Upon receiving the association confirmation information, the target multi-mode node can decrypt the encrypted communication encryption key using the communication management key. If decryption is successful, the target multi-mode node can obtain the encrypted communication encryption key and store it. If decryption fails, it indicates that the communication management key is incorrect, and the target multi-mode node can switch networks and re-initiate authentication.

[0117] In the above implementation, the communication encryption key is encrypted using the communication management key to obtain the encrypted communication encryption key, thereby improving the security of the communication encryption key exchange process between the central coordinator (CCO) and the target multi-mode node and further enhancing communication security.

[0118] In some implementations, the security control method may further include: if the decrypted MAC address of the target multi-mode node does not match the MAC address included in the authentication information, sending an association failure message to the target multi-mode node. The association failure message is used to notify the target multi-mode node that the communication management key is incorrect.

[0119] Specifically, the Central Coordinator (CCO) decrypts the MAC address encrypted with the communication management key using the communication management key. After obtaining the decrypted MAC address of the target multi-mode node, if the decrypted MAC address does not match the MAC address included in the authentication information, it can be considered that the MAC address of the target multi-mode node used for encryption with the communication management key is incorrect. This proves that the communication management key used to encrypt the target multi-mode node's MAC address is incorrect. The CCO can then send an association failure message to the target multi-mode node, stating that the failure is due to the incorrect communication management key. Upon receiving the association failure message, the target multi-mode node can switch networks and resend the authentication request.

[0120] In the above implementation, by determining that the decrypted MAC address of the target multi-mode node is inconsistent with the MAC address included in the identity authentication information, it can be determined that the communication management key is incorrect. Therefore, identity authentication needs to be performed again in order to obtain an accurate communication management key. The encrypted MAC address is then decrypted using the accurate communication management key, and subsequent encryption and decryption operations can be performed using the communication management key to prevent the problem of inconsistent communication management keys from occurring throughout the entire network operation process.

[0121] In some implementations, the authentication information includes a first random number, the MAC address of the target multi-mode node, and first certificate data. Determining whether to send a communication management key and a communication encryption key to the target multi-mode node based on the authentication information includes at least one of the following: If the MAC address of the target multi-mode node is not in the whitelist of the central coordinator or is in the blacklist of the central coordinator, a denial of access to the network is sent to the target multi-mode node.

[0122] If the first certificate data is found to be invalid, the target multi-mode node's MAC address is added to the central coordinator's blacklist for network access, and a network access denial message is sent to the target multi-mode node.

[0123] The whitelist and blacklist can be sent from the master station to the concentrator, and then from the concentrator to the central coordinator (CCO). The whitelist and blacklist store the MAC addresses of the station nodes (STAs) that are allowed to join the power communication network.

[0124] Specifically, after receiving the authentication message, the Central Coordinator (CCO) can determine whether to allow the target multi-mode node to join the network based on the MAC address of the target multi-mode node included in the authentication information. If the target multi-mode node's MAC address is in the CCO's blacklist or not in its whitelist, it can be considered that the target multi-mode node is not allowed to join the power communication network. The CCO can add the MAC address of the target multi-mode node not in the whitelist to its blacklist and reply to the target multi-mode node with a rejection message, the reason for which could be that the target multi-mode node's MAC address is not in the CCO's whitelist. After receiving the rejection message and the reason for rejection, the target multi-mode node can restart the authentication timer and resend the authentication message to the CCO. If authentication still fails, it can switch networks and resend the authentication request.

[0125] If the MAC address of the target multi-mode node is in the Central Coordinator's (CCO) whitelist, further verification of the validity of the initial certificate data is required. If the verification result indicates that the initial certificate data is invalid, the target multi-mode node's identity can be considered illegitimate. The MAC address of the illegitimate target multi-mode node can be added to the CCO's blacklist, and a network access denial response can be sent to the target multi-mode node, with the reason for the denial being authentication failure. After receiving the network access denial and the reason, the target multi-mode node can switch networks and resend the authentication request.

[0126] In the above implementation, by determining that the MAC address of the target multi-mode node is not in the network access whitelist of the central coordinator, or the MAC address of the target multi-mode node is in the network access blacklist of the central coordinator, or the verification of the first certificate data is invalid, a network access denial message can be sent to the target multi-mode node. This not only improves communication security, but also enables timely switching to other networks.

[0127] In some implementations, the verification process of the first certificate data includes: verifying the signature in the first certificate data using the root public key provided by a third party; if the signature in the first certificate data is correct, determining that the first certificate data is valid; if the signature in the first certificate data is incorrect, determining that the first certificate data is invalid.

[0128] In some cases, verifying certificate data using the root key ensures the correctness of the subsequently extracted public key. Multi-mode nodes support both asymmetric encryption algorithms, such as SM2 and symmetric encryption algorithms, such as SM4-CBC. Considering the timeliness requirements of multi-mode nodes when sending and receiving business data, symmetric encryption algorithms can be used to encrypt business data; simultaneously, to ensure reliable transmission of business data, asymmetric encryption algorithms can be used to encrypt the encryption key in the symmetric encryption algorithm. Asymmetric encryption algorithms require the first certificate data provided by the State Grid Metering Center to extract the public and private keys. Therefore, the first certificate data must be verified to ensure the correctness of the extracted public and private keys. The third party can be a certification authority that manages the electricity information keys throughout their entire lifecycle, such as the State Grid Metering Center. The root public key can be the third party's public key.

[0129] Specifically, after receiving the first certificate data, the Central Coordinator (CCO) can use the root public key provided by the third party to verify the signature in the first certificate data. If the verification result indicates that the signature in the first certificate data is correct, the first certificate data sent by the site node (STA) can be considered legitimate, and subsequent encryption and decryption of business data can continue. If the verification result indicates that the signature in the first certificate data is incorrect, the first certificate data sent by the site node (STA) can be considered illegitimate, and therefore subsequent encryption and decryption of business data cannot continue.

[0130] In the above implementation, the security of the key can be guaranteed by using the root public key provided by a third party to verify the signature in the first certificate data.

[0131] In some implementations, the communication encryption key is updated periodically, with a corresponding update cycle. The security control method may further include sending a key update message to a multi-mode node in the power communication network within the current validity period of the communication encryption key.

[0132] The key update message includes the first remaining validity period of the current communication encryption key, the start time of the next cycle communication encryption key, and the second remaining validity period of the next cycle communication encryption key. The first remaining validity period is related to the start time of the next cycle communication encryption key and the creation time of the key update message. The second remaining validity period is the update cycle. The start time of the next cycle communication encryption key is related to the start time of the current communication encryption key and the update cycle.

[0133] In some cases, communication encryption keys are used for data encryption throughout the entire service cycle after network access. These keys have long usage periods and high efficiency. To prevent attacks on these keys during prolonged use, they can be periodically updated, using different keys for data encryption in different time periods. Therefore, within the current validity period of the communication encryption key, the Central Coordinator (CCO) sends a key update message to the multi-mode nodes (STAs) in the power communication network to ensure that the STAs can switch to the next cycle's communication encryption key at the start of the next cycle. It should be noted that within the current validity period of the communication encryption key, a key update message is sent to the multi-mode nodes (STAs) at at least one specified time.

[0134] In the above embodiments, by sending a key update message to the multi-mode node in the power communication network within the validity period of the current communication encryption key, the validity of the current communication encryption key can be guaranteed, and the current communication encryption key can be used for encryption and decryption.

[0135] In some implementations, sending a key update message to a multi-mode node in the power communication network within the validity period of the current communication encryption key includes: if a first preset duration is reached within the validity period of the current communication encryption key, sending a key update message to the multi-mode node in the power communication network for the first time; if a second preset duration is reached within the validity period, sending a key update message to the multi-mode node in the power communication network for the second time.

[0136] In some cases, a key update message is sent to the multi-mode nodes in the power communication network for the first time after a first preset time period, and a key update message is sent to the multi-mode nodes in the power communication network for the second time after a second preset time period. By broadcasting the message twice to the multi-mode nodes in the power communication network, the success rate of the multi-mode nodes in the power communication network receiving the key can be improved.

[0137] Specifically, each time the central coordinator re-establishes the network, the current communication encryption key CEK is initialized, and the communication encryption key attached to the associated confirmation information is set as the current communication encryption key. The central coordinator starts a timer, the duration of which can be set to a first preset duration. Since the current communication encryption key has already been used, the countdown to the start of the current communication encryption key is set to 0. Within the valid duration of the current communication encryption key, if the timer reaches the first preset duration, the current time can be set as the creation time of the key update message. The first remaining valid duration of the current communication encryption key is set to the start time of the next cycle communication encryption key minus the creation time of the key update message. The start time of the next cycle communication encryption key is set to the start time of the current communication encryption key plus the corresponding update cycle of the communication encryption key. The countdown to the start of the next cycle communication encryption key is set to the start time of the next cycle communication encryption key minus the creation time of the key update message. The second remaining valid duration of the next cycle communication encryption key is equal to the corresponding update cycle of the communication encryption key. After the timer reaches the first preset duration, the central coordinator sends the key update message of the next cycle communication encryption key to the multi-mode nodes in the power communication network for the first time. It should be noted that the first remaining valid duration of the current communication encryption key is equal to the countdown duration for the start of the next communication encryption key cycle.

[0138] After the timer reaches the first preset duration and sends the first key update message to the multi-mode nodes in the power communication network, the timer duration is modified to the second preset duration. If the timer reaches the second preset duration, the current time can be set as the creation time of the key update message. The first remaining valid duration of the current communication encryption key is set to the start time of the next cycle communication encryption key minus the creation time of the key update message. The countdown to the start of the next cycle communication encryption key is also set to the start time of the next cycle communication encryption key minus the creation time of the key update message. After the timer reaches the second preset duration, the central coordinator sends the next cycle communication encryption key update message to the multi-mode nodes in the power communication network for the second time. It should be noted that the creation time of the first key update message is the current time corresponding to the first transmission of the key update message, and the creation time of the second key update message is the current time corresponding to the second transmission of the key update message.

[0139] In the above embodiments, by reaching the first preset duration and the second preset duration, the Central Coordinator (CCO) can broadcast the key update message twice. By actively broadcasting the key update message, the CCO can avoid decryption failure due to key update and ensure the reliability, effectiveness and smoothness of communication encryption key update.

[0140] In some embodiments, the security control method may further include: if the timeout reaches a third preset duration, using the next cycle communication encryption key as the current communication encryption key. Wherein, the sum of the first preset duration, the second preset duration, and the third preset duration equals the update cycle.

[0141] Specifically, after the second preset duration is reached and a key update message is sent to the multi-mode node in the power communication network for the second time, the remaining duration after subtracting the first preset duration from the update period and then subtracting the second preset duration can be used as the third preset duration. The duration of the timer can be set to the third preset duration. When the third preset duration is reached, it indicates that the current communication encryption key for this period needs to be updated, and the communication encryption key for the next period is then used as the current communication encryption key.

[0142] For example, the update cycle can be set to The first preset duration can be The second preset duration can be Therefore, the third preset duration can be... .

[0143] In the above implementation, when the timer reaches the third preset duration, the next cycle communication encryption key is used as the current communication encryption key. This can prevent the use of a single communication encryption key during long-term operation, reduce the possibility of the communication encryption key being attacked, and improve network security.

[0144] In some implementations, the communication encryption key is updated periodically, with a corresponding update cycle. The security control method may further include: receiving a key request message sent by a multi-mode node in the power communication network when the multi-mode node in the power communication network has not received a key update message; and sending a key update message to the multi-mode node in the power communication network based on the key request message.

[0145] Specifically, when a multi-mode node in the power communication network receives an association confirmation, it starts a timer and sets the remaining time. If the multi-mode node has not received a key update message after the timer expires, it sends a key request message to the Central Coordinator (CCO). The CCO receives the key request message and, based on it, sends a key update message to the multi-mode node.

[0146] In the above embodiments, when the multi-mode node in the power communication network does not receive the key update message, the multi-mode node in the power communication network can periodically unicast the request mechanism to avoid decryption failure due to key update and improve the reliability, effectiveness and smoothness of communication encryption key update.

[0147] In some implementations, the key request message includes a current request sequence number. Based on the key request message, a key update message is sent to a multi-mode node in the power communication network, including: if the current request sequence number matches the sequence number of the communication encryption key for the next cycle, sending a first key update message.

[0148] The first key update message includes the start time of the next cycle communication encryption key, the second remaining valid duration, and the start countdown duration. The start countdown duration is related to the start time of the next cycle communication encryption key and the creation time of the key update message. The second remaining valid duration is the update cycle. The start time of the next cycle communication encryption key is related to the start time of the current communication encryption key and the update cycle.

[0149] In situations such as data loss, short network access time, or switching to the next cycle immediately after network access, multi-mode nodes in the power communication network may not receive key update messages. When a multi-mode node in the power communication network is within the validity period of the current cycle's communication encryption key, it can apply for the next cycle's communication encryption key. In this case, the current application sequence number is consistent with the sequence number of the next cycle's communication encryption key.

[0150] Specifically, the Central Coordinator (CCO) receives a key request message with the current request sequence number from a site node (STA) in the power communication network. If the current request sequence number matches the sequence number of the communication encryption key for the next cycle, the CCO can set the current time as the creation time of the key update message. The CCO can update the start time of the next cycle communication encryption key to be equal to the start time of the current cycle communication encryption key plus the communication encryption key update period. It can also update the start countdown length to be equal to the start time of the next cycle communication encryption key minus the creation time of the key update message. Furthermore, it can update the second remaining valid duration to be equal to the communication encryption key update period. Then, the CCO sends a first key update message, including the start time of the next cycle communication encryption key, the second remaining valid duration, and the start countdown length, to the site node (STA) in the power communication network.

[0151] In the above implementation, if the current application sequence number is consistent with the sequence number of the next cycle communication encryption key, a first key update message can be sent to avoid decryption failure due to key update.

[0152] In some implementations, the key request message includes a current application sequence number; sending a key update message to a multi-mode node in the power communication network based on the key request message may include: if the current application sequence number is inconsistent with the sequence number of the communication encryption key for the next cycle, sending a second key update message.

[0153] The second key update message includes the first remaining validity period of the current communication encryption key; the first remaining validity period is related to the start time of the next cycle of communication encryption key and the creation time of the key update message.

[0154] In some cases, when the validity period of the current cycle communication encryption key A is zero, the next cycle communication encryption key B can be set as the current cycle communication encryption key B, and the next cycle communication encryption key of the current cycle communication encryption key B can be set as the next cycle communication encryption key C. Multi-mode nodes in the power communication network have short network access times, therefore, they may not receive the key update messages corresponding to the communication encryption key B broadcast twice by the Central Coordinator (CCO). When a multi-mode node in the power communication network is within the validity period of the current cycle communication encryption key B, it requests a key update message for the current cycle communication encryption key B. However, at this time, the current cycle communication encryption key B sends a key update message corresponding to the next cycle communication encryption key C. Therefore, the current request sequence number is consistent with the sequence number of the next cycle communication encryption key. Thus, for a period of time after the communication encryption key B becomes the starting point of the current cycle communication encryption key B, both communication encryption key B and communication encryption key A can be used as keys for encryption and decryption operations between communications. This can solve the problem of current key synchronization between the Central Coordinator (CCO) and the station nodes (STAs) in the power communication network.

[0155] Specifically, the Central Coordinator (CCO) receives a key request message with the current request sequence number from a Station Node (STA) in the power communication network. If the current request sequence number does not match the sequence number of the next cycle's communication encryption key, the CCO can set the current time as the creation time of the key update message. The CCO can also update the first remaining validity period to be equal to the start time of the next cycle's communication encryption key minus the creation time of the key update message. Then, the CCO sends a second key update message, including the first remaining validity period of the current communication encryption key, to the Station Node (STA) in the power communication network.

[0156] In the above implementation, if the current application sequence number is inconsistent with the sequence number of the communication encryption key for the next cycle, it indicates that the communication encryption key updates between the Central Coordinator (CCO) and the multi-mode nodes in the power communication network are not synchronized. When the current application sequence number is inconsistent with the sequence number of the communication encryption key for the next cycle, the communication encryption key corresponding to the current application sequence number can be sent to ensure that the communication encryption key updates between the Central Coordinator (CCO) and the multi-mode nodes in the power communication network are synchronized.

[0157] In some implementations, the security control method may further include: if there is service data to be sent in encrypted mode, determining the data type of the service data to be sent and the security mode of the destination node; and selecting the corresponding key type from the communication management key or the communication encryption key according to the data type of the service data to be sent and the security mode of the destination node.

[0158] Specifically, when there is business data to be sent in encrypted mode, the security mode of the business data to be sent and the security mode of the destination node can be determined. When the security mode of the destination node is not enabled, there is no need to encrypt the business data to be sent, and the business data to be sent can be sent directly to the destination node. When the security mode of the destination node is enabled, the corresponding key type can be selected from the communication management key or the communication encryption key according to the data type of the business data to be sent and the security mode of the destination node.

[0159] In the above implementation, by determining the data type of the service data to be sent and the security mode of the destination node, it can be determined whether the service data to be sent needs to be encrypted, which can reduce the consumption of computer resources.

[0160] In some implementations, the security mode of the destination node is the mandatory mode; the security control method may also include at least one of the following: if the data type of the service data to be sent belongs to the first type set, a communication management key is selected to encrypt the service data to be sent.

[0161] If the data type of the service data to be sent belongs to the second type set, select a communication encryption key to encrypt the service data to be sent.

[0162] The first type set includes at least one of association request, association confirmation information, association summary information, key update message, key request message, and key request confirmation message; the second type set includes application layer messages.

[0163] Specifically, when the destination node's security mode is forced mode, it can be determined whether the data to be sent needs to be transmitted between different central coordinators. If the data is transmitted between different central coordinators, encryption is not required. If the data is not transmitted between different central coordinators, the data type can be determined. If the data type belongs to the first type set, the communication management key is selected to encrypt the data. If the data type belongs to the second type set, the communication encryption key is selected to encrypt the data.

[0164] In the above implementation, by determining the data type of the service data to be sent and selecting either a communication management key or a communication encryption key to encrypt the service data to be sent, the secure communication between the Central Coordinator (CCO) and the Station Node (STA) is improved, the probability of eavesdropping incidents is reduced, and a secure anti-eavesdropping scheme is realized between the Central Coordinator (CCO) and the Station Node (STA).

[0165] In some implementations, the security mode of the destination node is a compatibility mode; the security control method may also include at least one of the following: If the destination node is a multi-mode node and the data type of the service data to be sent belongs to the application layer message, select the communication encryption key to encrypt the service data to be sent.

[0166] If the destination node is a multi-mode node and the data type of the business data to be sent does not belong to the application layer message, the business data to be sent will not be encrypted.

[0167] If the destination node is a single-mode node, the business data to be sent will not be encrypted.

[0168] Specifically, when the destination node's security mode is compatibility mode, the destination node's mode can be determined. When the destination node is a single-mode node, there is no need to encrypt the data to be sent. When the destination node is a multi-mode node, the data type of the data to be sent can be determined. If the data type of the data to be sent belongs to application layer messages, a communication encryption key is selected to encrypt the data to be sent. If the data type of the data to be sent does not belong to application layer messages, there is no need to encrypt the data to be sent.

[0169] In the above implementation, by determining whether the destination node is a multi-mode node or a single-mode node, and then by judging the data type of the service data to be sent, it can be determined whether the service data to be sent needs to be encrypted, thereby improving the secure communication between the Central Coordinator (CCO) and the Site Node (STA), reducing the probability of eavesdropping incidents, and realizing a secure anti-eavesdropping scheme between the Central Coordinator (CCO) and the Site Node (STA).

[0170] In some implementations, the service data to be sent includes MSDU data frames; the security control method may further include: determining an IV vector based on the MAC frame type; encrypting the MSDU data frame using the IV vector and a selected key type to obtain the corresponding ciphertext and sending it.

[0171] A MAC frame consists of Frame Control (FC), Duration / ID, Address, Sequence Control (SC), Data, and Cyclic Redundancy Check (CRC). FC is a 2-byte field that defines the frame type and some control information. Duration / ID is a 4-byte field containing a value (in µs) indicating the duration of media usage. Address1, Address2, Address3, and Address4 are 6-byte fields containing the standard IEEE 802 MAC address (48 bits each), the meaning of which depends on the DS bit in the Frame Control field. SC (Sequence Control) is a 16-bit field consisting of two subfields: Sequence Number (12 bits) and Fragment Number (4 bits). The sequence number is used to filter duplicate frames because acknowledgment frames may be copied. Data is a variable-length field containing information specific to each frame transparently transmitted from the sender to the receiver. CRC is a 4-byte field containing a 32-bit CRC error detection sequence to ensure the frame is error-free. In the Wired Equivalent Privacy (WEP) protocol, the Initialization Vector (IV) is used in conjunction with the key to form a key seed, which serves as input to the RC4 algorithm to generate an encrypted byte stream for encrypting data.

[0172] The fields present in FC are as follows: Protocol Version is a 2-bit field indicating the current protocol version, currently fixed at 0; Type is a 2-bit field that determines the function of the frame, i.e., management (00), control (01), or data (10), with a value of 11 reserved; Subtype is a 4-bit field indicating the subtype of the frame, for example, 0000 indicates an association request, and 1000 indicates a beacon; To DS is a 1-bit field, set to indicate that the target frame is for DS (Distributed System); From DS (To DS) is a 1-bit field, set to indicate that the frame comes from DS; More frag is a 1-bit field, set to 1 to indicate that other fragments follow the frame; Retry is a 1-bit field, set to 1 if the current frame is a retransmission of an earlier frame; Power Management is a 1-bit field indicating the station's mode after successful frame transmission, set to 1 to indicate that the station enters power-saving mode, and set to 0 to indicate that the station remains active; More The `data` field is a 1-bit field used to indicate that the sender has more data to transmit than the current frame. This can be used by the access point to indicate to a station in power-saving mode that more data packets are being buffered, or by a station to indicate to the access point after being polled that more polling is needed because the station has more data packets ready to transmit. The `WEP` field is a 1-bit field indicating that the 802.11 standard security mechanism is applied. The `order` field is a 1-bit field; if this bit is set to 1, received frames must be processed strictly in order.

[0173] Specifically, the IV vector can be determined based on the MAC frame type. Then, a method for encrypting the MSDU data frame can be selected. Different encryption methods may require different bit lengths in the IV vector. The IV vector is updated according to the selected encryption method. When encrypting the MSDU data frame using the selected encryption method, the data is encrypted using the selected key type and the corresponding bit length of the IV vector for the selected encryption method to obtain the corresponding ciphertext, which is then sent to the destination node.

[0174] For example, the IV vector can be determined based on the MAC frame type. In a standard MAC frame, the first 4 bytes of the FC (Frame Startup) and bytes 0-7 of the standard MAC frame can be selected to form the IV vector from low to high bytes. In a single-hop MAC frame, the first 12 bytes of the FC (Frame Startup) can be selected to form the IV vector from low to high bytes. Then, the encryption method can be determined. When the encryption method is AES-GCM, AES-GCM is used to encrypt the MSDU data frame. When encrypting the MSDU data frame using AES-GCM, the selected key type and IV vector are used to encrypt the MSDU data frame, obtaining the corresponding ciphertext, which is then sent to the receiver. When the encryption type is AES-CBC or SM4-CNC, AES-CBC or SM4-CNC is used to encrypt the MSDU data frame. When using AES-CBC or SM4-CNC to encrypt MSDU data frames, it is necessary to pad the high-order bits of the IV vector with zeros to make the IV vector 16 bytes. Then, the received service data is encrypted using the selected key type and the 16-byte IV vector to obtain the corresponding ciphertext, which is then sent to the receiver.

[0175] In the above implementation, the IV vector is determined based on the MAC frame type; the MSDU data frame is encrypted using the IV vector and the selected key type to obtain the corresponding ciphertext, which is then sent. A data encryption process is designed in the MSDU data transmission stage to ensure the reliability of the data transmission of services to be sent.

[0176] In some implementations, the safety control method may further include at least one of the following: If the received business data is in an encrypted state, determine the key type as either a communication management key or a communication encryption key; if the key type is a communication management key, use the communication management key and the IV vector to decrypt the data and obtain the corresponding plaintext.

[0177] If the key type is a communication encryption key, the data is decrypted using the communication encryption key and the IV vector to obtain the corresponding plaintext.

[0178] Specifically, the receiving party can determine whether the received service data is encrypted by checking the MAC frame header stored within the service data. If the information in the MAC frame header indicates that the received service data is encrypted, the key type corresponding to the received service data can be directly determined based on the key type stored in the MAC frame header. When the key type is a communication management key, the IV vector can be determined based on the MAC frame type, and the corresponding decryption method can be determined based on the encryption method used for the MSDU data frame. Different decryption methods may require different bit lengths in the IV vector, and the IV vector is updated according to the selected decryption method. When decrypting using the decryption method, the data is decrypted using the communication management key and the corresponding bit length of the IV vector. If decryption is successful, the corresponding plaintext is obtained. When the key type is a communication encryption key, the IV vector can be determined based on the MAC frame type, and the corresponding decryption method can be determined based on the encryption method used for the MSDU data frame. Different decryption methods may require different bit lengths in the IV vector, and the IV vector is updated according to the selected decryption method. When decrypting using the decryption method, the data is decrypted using the communication encryption key and the corresponding bit length of the IV vector. If decryption is successful, the corresponding plaintext is obtained.

[0179] For example, the data receiver can determine whether the received data is encrypted by checking the MAC frame header stored within the data. If the information in the MAC frame header indicates that the received data is encrypted, then the data is indeed encrypted. The key type corresponding to the received data can then be directly determined based on the key type stored in the MAC frame header. The IV vector can be determined according to the MAC frame type. In a standard MAC frame, the first 4 bytes of the FC (Front-End Frame) and bytes 0-7 of the standard MAC frame can be selected to form the IV vector from low to high bytes. In a single-hop MAC frame, the first 12 bytes of the FC can be selected to form the IV vector from low to high bytes. The encryption method can then be determined. When the encryption method is AES-GCM, AES-GCM is used to decrypt the received data. When decrypting the received data using AES-GCM, the key type and IV vector corresponding to the received data are used. Successful decryption yields the plaintext. When the encryption method is AES-CBC or SM4-CNC, the received service data is decrypted using AES-CBC or SM4-CNC. During decryption, the high-order bits of the IV vector are padded with zeros to make the IV vector 16 bytes. Then, the received service data is decrypted using the key type corresponding to the received service data and the 16-byte IV vector. Successful decryption yields the corresponding plaintext. The last 16 bytes of the plaintext are the MAC value. Upon successful decryption, a SACK value is generated and sent as a reply message to the sender of the service data.

[0180] In the above implementation, if the received service data is encrypted, the key type is determined to be either a communication management key or a communication encryption key. If the key type is a communication management key, the data is decrypted using the communication management key and the IV vector to obtain the corresponding plaintext. If the key type is a communication encryption key, the data is decrypted using the communication encryption key and the IV vector to obtain the corresponding plaintext. Different decryption methods can be determined by using different key types, MAC frame types, and encryption methods, which can improve the security of service data.

[0181] In some implementations, the security control method may further include: sending a decryption failure reply message if decryption fails.

[0182] Specifically, when decrypting data using the communication management key and IV vector or the communication encryption key and IV vector, if decryption fails, a decryption failure can be generated and a decryption failure reply message can be sent to the party sending the business data.

[0183] In some implementations, the central coordinator can act as the sender of the service data, and the site nodes can act as the receivers of the service data. The site nodes decrypt the service data according to the key type of the received service data. If decryption fails, the site node can generate a SACK value indicating decryption failure and send the SACK value as a reply message to the central coordinator.

[0184] In other implementations, the site nodes may act as the senders of service data, and the central coordinator as the receivers. The central coordinator decrypts the service data according to the key type of the received service data. If decryption fails, the central coordinator can generate a SACK value indicating decryption failure and send the SACK value as a reply message to the site nodes.

[0185] In the above implementation, when decryption fails, a decryption failure reply message can be sent to notify the data sender that decryption has failed, ensuring that the data sender and receiver can make a rapid and reasonable response.

[0186] In some embodiments, this application provides a security control method for a power communication network, applied to the site nodes included in the power communication network; please refer to... Figure 9a The safety control method may include: S902. When the security mode of the power communication network is unencrypted, send a first network access request to the central coordinator included in the power communication network.

[0187] S904. If the central coordinator sets the security mode of the power communication network to encrypted mode, a second network access request is sent to the central coordinator to re-establish the network.

[0188] The first network access request includes the communication type of the site node; the first network access request is used to instruct the central coordinator to set the security mode of the power communication network according to the communication type of the site node in the power communication network.

[0189] In the above implementation, the Central Coordinator (CCO) initially sets the security mode of the power communication network to unencrypted mode. In unencrypted mode, a site node sends its first network access request (i.e., sends the first network access request) to the CCO. Based on the communication type of the site node attached to the first network access request, the CCO further decides whether to activate encrypted mode based on the communication types of each site node in the power communication network. If the security mode of the power communication network is set to encrypted mode, the site node sends its second network access request (i.e., sends the second network access request) to the CCO to re-establish the network. Therefore, security control is achieved on the basis of normal communication, improving the secure communication between the CCO and the site nodes (STAs), reducing the probability of eavesdropping incidents, and realizing a secure anti-eavesdropping scheme between the CCO and the site nodes (STAs).

[0190] In some implementations, in unencrypted mode, the Central Coordinator (CCO) allows whitelisted site nodes to join the network. A site node (STA) sends a first network entry request to the CCO. This first request includes the site node's communication type. Upon receiving the first network entry request from the site node, the CCO obtains the site node's communication type. The CCO analyzes the site node's communication type attached to the first request, as well as the communication types present in the node type list, to determine if multi-mode nodes exist in the power communication network. If so, it indicates a need for security policies for multi-mode nodes supporting encryption; therefore, the security mode of the power communication network is set to encrypted mode. The node type list stores the communication types of already connected site nodes in the power communication network.

[0191] In some implementations, if multi-mode nodes exist in the power communication network, and the encryption mode includes a compatible mode or a mandatory mode, the security control method for the power communication network may also include at least one of the following: When the security mode is in compatibility mode, a second network access request is sent to the central coordinator in compatibility mode to reconfigure the network.

[0192] When the security mode is in forced mode, a second network access request is sent in forced mode to re-establish the network.

[0193] In the compatibility mode, application layer messages transmitted by multi-mode nodes need to be encrypted, and multi-mode nodes are site nodes based on at least two communication methods: HPLC and HRF. In the mandatory mode, messages other than the area identification message need to be encrypted.

[0194] Specifically, when the security mode is in compatibility mode, the Central Coordinator (CCO) needs to be restarted. After restarting, the CCO receives the second network access request sent by all station nodes (STAs) in the power communication network in compatibility mode to the CCO for re-networking.

[0195] When the security mode is in forced mode, the Central Coordinator (CCO) needs to be restarted. After restarting, the CCO receives the second network access request sent by all the station nodes (STAs) in the power communication network in forced mode to the CCO for re-networking.

[0196] In the above implementation, by restarting the Central Coordinator (CCO), the site node (STA) resends the second network access request to re-establish the network and achieve secure communication in a security mode (compatible mode or forced mode) that matches the actual situation of the site communication type in the power communication network. Moreover, different security schemes can be adopted to encrypt and decrypt the transmitted service data.

[0197] In some implementations, please refer to Figure 9b For target multi-mode nodes that have not yet joined the network, sending a second network access request to the central coordinator may include the following steps: S910 receives beacons sent by the central coordinator.

[0198] S920. Determine the current encryption mode based on the authentication enable flag.

[0199] S930, sends a second network access request to the central coordinator.

[0200] The beacon includes an authentication enable flag; the second network access request includes authentication information corresponding to the current encryption mode, which is used to instruct the central coordinator whether to send the communication management key and the communication encryption key.

[0201] Specifically, the target multi-mode node can receive a beacon sent by the central coordinator. Then, the target multi-mode node determines its current encryption mode based on the authentication enable flag attached to the beacon. If no data encryption is required, it can join the network according to the single-mode node joining process. If data encryption is required, the target multi-mode node sends the identity authentication information corresponding to the current encryption mode to the central coordinator, and sends a second joining request to the central coordinator.

[0202] In the above implementation, different security policies can be determined by sending the identity authentication information corresponding to the current encryption mode and the second network access request to the central coordinator.

[0203] In some implementations, the authentication information includes a first random number, the MAC address of the target multi-mode node, and first certificate data; the security control method may further include: if the MAC address of the target multi-mode node is in the network access whitelist of the central coordinator and the first certificate data is verified to be valid, receiving the encrypted first random number, the encrypted communication management key, and the second certificate data of the central coordinator.

[0204] The encrypted first random number is obtained by encrypting the first random number using the private key of the central coordinator, and the encrypted communication management key is obtained by encrypting the communication management key using the first public key information extracted from the first certificate data. If the second certificate data is valid and the encrypted first random number passes the signature verification, the encrypted communication management key is decrypted and saved using the private key of the target multi-mode node.

[0205] Specifically, when the target multi-mode node's MAC address is in the central coordinator's network whitelist and the first certificate data is verified as valid, the target multi-mode node can receive the first random number, the encrypted communication management key, and the central coordinator's second certificate data sent by the central coordinator. The target multi-mode node can then verify the validity of the second certificate data and use the central coordinator's public key to verify the signature of the encrypted first random number. If the second certificate data is valid and the encrypted first random number passes verification, the target multi-mode node can use its own private key to decrypt the encrypted communication management key. If decryption is successful, the target multi-mode node can save the communication management key; if decryption fails, it can switch networks and re-initiate authentication.

[0206] In the above implementation, if the MAC address of the target multi-mode node is in the network access whitelist of the central coordinator and the first certificate data is verified to be valid, the encrypted first random number, the encrypted communication management key, and the second certificate data of the central coordinator are received. After confirming that the MAC address of the target multi-mode node is in the network access whitelist of the central coordinator and the first certificate data is verified to be valid, the second certificate data of the central coordinator is sent to the target multi-mode node again. This improves the secure communication between the central coordinator (CCO) and the site node (STA) when the second certificate data of the target multi-mode node is valid and the encrypted first random number passes the signature verification.

[0207] In some implementations, the security control method may further include sending an association request to a central coordinator.

[0208] The association request includes the MAC address of the target multi-mode node encrypted using the communication management key; if the decrypted MAC address of the target multi-mode node matches the MAC address included in the identity authentication information, the association confirmation information sent by the central coordinator is received; and the communication encryption key attached to the association confirmation information is saved.

[0209] Specifically, the target multi-mode node can encrypt its MAC address using a communication management key. The target multi-mode node can then send an association request, along with its encrypted MAC address, to the Central Coordinator (CCO). Upon receiving the association request, the CCO decrypts it to obtain the decrypted MAC address. If the decrypted MAC address matches the MAC address included in the authentication information, the CCO sends an association confirmation message to the target multi-mode node. This confirmation message instructs the target multi-mode node to complete network access. If network access is successful, the target multi-mode node saves the communication encryption key attached to the association confirmation message.

[0210] In the above implementation, an association request is sent to the central coordinator. The MAC address of the target multi-mode node, encrypted with the communication management key attached to the association request, is compared with the MAC address included in the identity authentication information. If they match, an association confirmation message instructing the target multi-mode node to complete the network access can be sent to the target multi-mode node. The communication encryption key attached to the association confirmation message is saved, which can ensure the security of the network.

[0211] In some implementations, the security control method may further include: starting a timer if no response message for the second network access request is received from the central coordinator; and resending the second network access request if the timer reaches a preset time.

[0212] The preset time can be set according to specific circumstances.

[0213] Specifically, after the target multi-mode node sends a second network access request to the central coordinator, if the target multi-mode node does not receive a reply message from the central coordinator for the second network access request, the target multi-mode node can start a timer. When the timer reaches a preset time, the target multi-mode node can send a second network access request to the central coordinator again.

[0214] In the above implementation, if no reply message for the second network access request is received from the central coordinator, a timer is started; if the timer reaches the preset time, the second network access request is sent again, ensuring the timeliness of the target multi-mode node's network access.

[0215] In some implementations, the safety control method may also include at least one of the following: If no response message for the second network access request is received from the central coordinator, determine the type of response message; If the reply message indicates that the MAC address of the target multi-mode node is not in the central coordinator's whitelist for network access, try sending a second network access request; if network access still fails, switch to another power communication network. If the reply message type is "First certificate data invalid", switch to other power communication networks.

[0216] Specifically, when the target multi-mode node does not receive a response message from the central coordinator for the second network access request, the type of the response message can be determined. If the response message indicates that the target multi-mode node's MAC address is not in the central coordinator's network access whitelist, the target multi-mode node can start a timer. When the timer reaches a preset time, the target multi-mode node can try sending the second network access request to the central coordinator again. If it still fails to access the network, it can switch to another power communication network to re-initiate identity authentication. If the response message indicates that the first certificate data is invalid, it can switch to another power communication network to re-initiate identity authentication.

[0217] In the above implementation, if no response message is received from the central coordinator for the second network access request, and if the response message indicates that the MAC address of the target multi-mode node is not in the central coordinator's network access whitelist, the second network access request is sent again. If network access still fails, the system switches to another power communication network. If the response message indicates that the first certificate data is invalid, the system switches to another power communication network. By switching to another power communication network and then resending the second network access request, the accuracy of network selection is ensured.

[0218] In some implementations, the security control method may further include: if the decrypted MAC address of the target multi-mode node is inconsistent with the MAC address included in the authentication information, receiving association failure information; the association failure information is used to notify the target multi-mode node that the communication management key is incorrect.

[0219] Specifically, if the decrypted MAC address of the target multi-mode node does not match the MAC address included in the authentication information, it can be assumed that the MAC address of the target multi-mode node using the communication management key for encryption is incorrect, thus proving that the communication management key used to encrypt the target multi-mode node's MAC address is incorrect. The target multi-mode node receives association failure information sent by the Central Coordinator (CCO); the reason for the failure in the association failure information is that the target multi-mode node's communication management key is incorrect.

[0220] In the above implementation, if the decrypted MAC address of the target multi-mode node is inconsistent with the MAC address included in the identity authentication information, an association failure message is received. The association failure message is used to notify the target multi-mode node that the communication management key is incorrect, preventing the problem of inconsistent communication management keys from occurring throughout the entire network operation process.

[0221] In some implementations, the verification process for the second certificate data includes: verifying the signature in the second certificate data using the root public key provided by a third party; if the signature in the second certificate data is correct, determining that the second certificate data is valid; if the signature in the second certificate data is incorrect, determining that the second certificate data is invalid.

[0222] Specifically, after receiving the second certificate data, the STA in the power communication network can use the root public key provided by the third party to verify the signature in the second certificate data. If the verification result indicates that the signature in the second certificate data is correct, the second certificate data sent by the Central Coordinator (CCO) can be considered legitimate, and subsequent encryption and decryption of business data can be performed. If the verification result indicates that the signature in the second certificate data is incorrect, the second certificate data sent by the CCO can be considered illegitimate, and therefore subsequent encryption and decryption of business data cannot be performed.

[0223] In the above implementation, the security of the key can be guaranteed by using the root public key provided by a third party to verify the signature in the first certificate data.

[0224] In some implementations, the communication encryption key is updated periodically, and the communication encryption key has an update cycle; the security control method may also include: receiving a key update message sent by the central coordinator within the validity period of the current communication encryption key.

[0225] The key update message includes the first remaining validity period of the current communication encryption key, the start time of the next cycle communication encryption key, and the second remaining validity period of the next cycle communication encryption key. The first remaining validity period is related to the start time of the next cycle communication encryption key and the creation time of the key update message. The second remaining validity period is the update cycle. The start time of the next cycle communication encryption key is related to the start time of the current communication encryption key and the update cycle.

[0226] In some implementations, receiving a key update message sent by the central coordinator within the validity period of the current communication encryption key may include: receiving a key update message sent by the central coordinator for the first time when the timer reaches a first preset duration within the validity period of the current communication encryption key; and receiving a key update message sent by the central coordinator for the second time when the timer reaches a second preset duration.

[0227] Specifically, within the current effective duration of the communication encryption key, the station node STA in the power communication network can receive the key update message sent by the central coordinator for the first time when the timer reaches the first preset duration; after the timer reaches the first preset duration and sends the key update message to the multi-mode node in the power communication network for the first time, the duration of the timer is modified to the second preset duration. If the timer reaches the second preset duration, the station node STA in the power communication network can receive the key update message sent by the central coordinator for the second time when the timer reaches the second preset duration.

[0228] In the above embodiments, by reaching the first preset duration and the second preset duration, the Central Coordinator (CCO) can broadcast the key update message twice. By actively broadcasting the key update message, the CCO can avoid decryption failure due to key update and ensure the reliability, effectiveness and smoothness of communication encryption key update.

[0229] In some implementations, the security control method may further include: if the timer reaches a third preset duration, the next cycle communication encryption key is used as the current communication encryption key; wherein the sum of the first preset duration, the second preset duration, and the third preset duration is equal to the update cycle.

[0230] In some implementations, the communication encryption key is updated periodically, with a corresponding update cycle. The security control method may further include sending a key request message to the central coordinator if no key update message is received. The key request message instructs the central coordinator to send a key update message.

[0231] In some implementations, please refer to Figure 10 If no key update message is received, a key request message is sent to the central coordinator, including: S1010. If no key update message is received, and the timer reaches the fourth preset duration, a key request message is sent to the central coordinator for the first time.

[0232] S1020. If the key update message is still not received, a key request message is sent to the central coordinator every five preset intervals until the start of the next communication encryption key cycle.

[0233] S1030. If the target multi-mode node is restarted after the sixth preset time after the start time of the next cycle communication encryption key.

[0234] Specifically, if the target multi-mode node has not received a key update message by the fourth preset timeout period, it sends a key request message to the Central Coordinator (CCO) for the first time. The CCO responds to the target multi-mode node's key request message by sending a key update message. If the target multi-mode node still has not received the key update message, it can send a key request message to the CCO every fifth preset timeout period until the current time reaches the start time of the next communication encryption key cycle. If a key update message is received before the timeout period expires, the next communication encryption key cycle can be updated, the remaining valid timeout period can be updated, and the timer time can be changed to the start time of the next communication encryption key cycle. If no key update message is received before the start time of the next communication encryption key cycle, and the target multi-mode node still has not received a key update message within the sixth preset timeout period after the start time of the next communication encryption key cycle, the target multi-mode node is restarted—that is, the hardware is reset and power is turned on / off without switching networks.

[0235] For example, if a multi-mode node in a power communication network has not received a key update message when the remaining validity period of the current key is 1 / 3 or less than 20 minutes, it sends a key request message to the Central Coordinator (CCO). The CCO responds to the key request message from the site node (STA) (multi-mode node) in the power communication network by sending a key update message to the STA. If the site node still has not received the key update message, the timer is set to 5 minutes, meaning that the site node sends a key request message to the CCO every 5 minutes. If a key update message is received before the timer expires, the communication encryption key for the next cycle can be updated, the remaining validity period can be updated, and the timer can be set to the start time of the next cycle's communication encryption key. If no key update message is received before the timer expires, a key request message can be sent to the CCO every 5 minutes until the current time reaches the start time of the next cycle's communication encryption key. When the current time reaches the start time of the next communication encryption key cycle, the station node (STA) in the power communication network sends a key request message to the central coordinator (CCO), changing the timer to 2 minutes. That is, every 2 minutes, the station node (STA) sends a key request message to the CCO. If a key update message is received before each timer expires, the next communication encryption key can be updated, the remaining validity period can be updated, and the timer time can be changed to the start time of the next communication encryption key cycle. If no key update message is received before the timer expires, a key request message can be sent to the CCO every 2 minutes until 10 minutes after the start time of the next communication encryption key cycle. If no key update message is received, the station node (STA) in the power communication network is restarted; that is, without switching networks, the hardware is reset and power is restored.

[0236] In the above implementation, if no key update message is received, a key request message is sent to the central coordinator for the first time after a fourth preset time interval. If no key update message is received again, a key request message is sent to the central coordinator every fifth preset time interval until the start of the next communication encryption key cycle. If no key update message is received after the sixth preset time interval following the start of the next communication encryption key cycle, the target multi-mode node is restarted. This avoids decryption failure due to key updates, ensuring the reliability, effectiveness, and smoothness of communication encryption key updates.

[0237] In some implementations, the security control method may further include: if there is service data to be sent in the encryption mode, determining the data type of the service data to be sent and the security mode of the current node; and selecting the corresponding key type from the communication management key or the communication encryption key according to the data type of the service data to be sent and the security mode of the current node, so as to encrypt the service data to be sent.

[0238] Specifically, when there is business data to be sent in encrypted mode, the security mode of the business data to be sent and the security mode of the destination node can be determined. When the security mode of the destination node is not enabled, there is no need to encrypt the business data to be sent, and the business data to be sent can be sent directly to the destination node. When the security mode of the destination node is enabled, the corresponding key type can be selected from the communication management key or the communication encryption key according to the data type of the business data to be sent and the security mode of the destination node to encrypt the business data to be sent.

[0239] In the above implementation, by determining the data type of the service data to be sent and the security mode of the destination node, it can be determined whether the service data to be sent needs to be encrypted, which can reduce the consumption of computer resources.

[0240] In some implementations, the service data to be sent includes MSDU data frames; the security control method may further include: determining an IV vector based on the MAC frame type; encrypting the MSDU data frame using the IV vector and the selected key type to obtain the corresponding ciphertext and sending it.

[0241] Specifically, the IV vector can be determined based on the MAC frame type, and then a method for encrypting the MSDU data frame can be selected. Different encryption methods may require different numbers of bits in the IV vector. When encrypting the MSDU data frame using the selected encryption method, the key type selected above and the corresponding number of bits in the IV vector of the selected encryption method are used to encrypt the MSDU data frame, obtaining the corresponding ciphertext, which is then sent to the receiver.

[0242] In the above implementation, the IV vector is determined based on the MAC frame type; the MSDU data frame is encrypted using the IV vector and the selected key type to obtain the corresponding ciphertext, which is then sent. A data encryption process is designed in the MSDU data transmission stage to ensure the reliability of the data transmission of services to be sent.

[0243] In some implementations, the security control method may further include: if the received service data is in an encrypted state, determining the key type as a communication management key or a communication encryption key; if the key type is a communication management key, using the communication management key and the IV vector to decrypt the data to obtain the plaintext corresponding to the received service data; if the key type is a communication encryption key, using the communication encryption key and the IV vector to decrypt the data to obtain the plaintext corresponding to the received service data.

[0244] Specifically, the data receiver can determine whether the received data is encrypted by checking the MAC frame header stored within the data frame. If the information in the MAC frame header indicates that the received data is encrypted, then the data is indeed encrypted. The key type corresponding to the received data can then be directly determined based on the key type stored in the MAC frame header. When the key type is a communication management key, the IV vector can be determined based on the MAC frame type, and the corresponding decryption method can be determined based on the encryption method used for the MSDU data frame. Different decryption methods may require IV vectors of different bit lengths. When decrypting using the decryption method, if the key type is a communication management key, the data is decrypted using the communication management key and the IV vector to obtain the plaintext of the received data; if the key type is a communication encryption key, the data is decrypted using the communication encryption key and the IV vector to obtain the plaintext of the received data.

[0245] In the above implementation, if the received service data is encrypted, the key type is determined to be either a communication management key or a communication encryption key. If the key type is a communication management key, the data is decrypted using the communication management key and the IV vector to obtain the corresponding plaintext. If the key type is a communication encryption key, the data is decrypted using the communication encryption key and the IV vector to obtain the corresponding plaintext. Different decryption methods can be determined by using different key types, MAC frame types, and encryption methods, which can improve the security of service data.

[0246] In some implementations, the security control method may further include: sending a decryption failure reply message if decryption fails.

[0247] In some implementations, if the encryption mode is a forced mode, the security control method may further include: if the data type of the service data to be sent belongs to a first type set, selecting a communication management key to encrypt the service data to be sent; wherein the first type set includes at least one of association request, association confirmation information, association summary information, key update message, key request message, and key request confirmation message; if the data type of the service data to be sent belongs to a second type set, selecting a communication encryption key to encrypt the service data to be sent; wherein the second type set includes application layer messages.

[0248] In some implementations, if the encryption mode is a compatibility mode; if the data type of the service data to be sent belongs to the application layer message, the multi-mode node selects the communication encryption key to encrypt the service data to be sent; if the data type of the service data to be sent does not belong to the application layer message, the multi-mode node does not encrypt the service data to be sent; and the single-mode node does not encrypt the service data to be sent.

[0249] For a detailed description of the business data encryption and decryption process, please refer to the above text, which will not be repeated here.

[0250] This specification provides a security control method for a power communication network, applied to a central coordinator within the power communication network. Please refer to... Figure 11 Security control methods for power communication networks may include: S1102. When the security mode of the power communication network is unencrypted, receive the first network access request sent by the station node in the power communication network; wherein the first network access request is accompanied by the communication type of the station node; S1104. If the security mode of the power communication network is set to encryption mode according to the communication type of the station nodes in the power communication network, the second network access request sent by the station nodes in the power communication network is received to re-establish the network.

[0251] In some implementations, the security mode of the power communication network is set to encryption mode according to the communication type of the site nodes in the power communication network, including: if there are multi-mode nodes in the power communication network, the security mode of the power communication network is set to encryption mode; wherein, the multi-mode nodes are site nodes based on at least two communication methods, HPLC and HRF.

[0252] In some implementations, the method further includes: broadcasting a beacon; wherein the beacon includes an authentication enable flag; the authentication enable flag is used to determine the current encryption mode; a second network access request includes authentication information corresponding to the current encryption mode; and a determination is made based on the authentication information whether to send a communication management key and a communication encryption key.

[0253] For a detailed description of the security control methods applied to the central coordinator, please refer to the above text, which will not be repeated here.

[0254] This specification provides a security control device for a power communication network, applied to the site nodes included in the power communication network. Please refer to... Figure 12 The safety control device 1200 includes: The first request sending module 1210 is configured to send a first network access request to the central coordinator included in the power communication network when the security mode of the power communication network is unencrypted; wherein the first network access request includes the communication type of the site node; the first network access request is used to instruct the central coordinator to set the security mode of the power communication network according to the communication type of the site node in the power communication network. The second request sending module 1220 is used to send a second network access request to the central coordinator to re-establish the network if the central coordinator sets the security mode of the power communication network to encryption mode.

[0255] In some implementations, if multi-mode nodes exist in the power communication network, the encryption mode includes a compatibility mode or a mandatory mode. The second request sending module 1220 is further configured to send a second network access request to the central coordinator in the compatibility mode when the security mode is the compatibility mode, in order to reconfigure the network. In the compatibility mode, the application layer messages transmitted by the multi-mode nodes need to be encrypted, and the multi-mode nodes are site nodes based on at least two communication methods: HPLC and HRF. Alternatively, in the mandatory mode, the second network access request is sent in the mandatory mode to reconfigure the network. In the mandatory mode, messages other than the transformer area identification message need to be encrypted.

[0256] In some implementations, for a target multi-mode node that has not yet joined the network, the second request sending module 1220 is further configured to receive a beacon sent by the central coordinator; wherein the beacon includes an authentication enable flag; determine the current encryption mode based on the authentication enable flag; and send the second network access request to the central coordinator; wherein the second network access request includes authentication information corresponding to the current encryption mode, and the authentication information is used to indicate whether the central coordinator should send a communication management key and a communication encryption key.

[0257] In some embodiments, the authentication information includes a first random number, the MAC address of the target multi-mode node, and first certificate data; the device further includes: An encrypted data receiving module is configured to receive, if the MAC address of the target multi-mode node is in the network access whitelist of the central coordinator and the first certificate data is verified to be valid, an encrypted first random number, an encrypted communication management key, and the second certificate data of the central coordinator; wherein, the encrypted first random number is obtained by encrypting the first random number using the private key of the central coordinator, and the encrypted communication management key is obtained by encrypting the communication management key using the first public key information extracted from the first certificate data; The management key decryption module is used to decrypt and save the encrypted communication management key using the private key of the target multi-mode node, provided that the second certificate data is valid and the encrypted first random number passes the signature verification.

[0258] In some embodiments, the apparatus further includes: An association request sending module is used to send an association request to the central coordinator; wherein the association request includes the MAC address of the target multi-mode node encrypted using the communication management key; The association confirmation receiving module is used to receive association confirmation information sent by the central coordinator if the decrypted MAC address of the target multi-mode node is consistent with the MAC address included in the identity authentication information. An encryption key retention module is used to store the communication encryption key attached to the associated confirmation information.

[0259] In some embodiments, the apparatus further includes: The timer start module is used to start a timer if no reply message for the second network access request is received from the central coordinator. The request resend module is used to resend the second network access request if the timer reaches a preset time.

[0260] In some embodiments, the apparatus further includes: The response type determination module is used to determine the response message type if no response message for the second network access request is received from the central coordinator. The communication network switching module is used to attempt to send a second network access request again if the response message type indicates that the MAC address of the target multi-mode node is not in the network access whitelist of the central coordinator; if the network access still fails, switch to another power communication network; or, if the response message type indicates that the first certificate data is invalid, switch to another power communication network.

[0261] In some embodiments, the apparatus further includes: The association failure receiving module is used to receive association failure information if the decrypted MAC address of the target multi-mode node is inconsistent with the MAC address included in the identity authentication information; the association failure information is used to notify the target multi-mode node that the communication management key is incorrect.

[0262] In some embodiments, the communication encryption key is updated periodically, and the communication encryption key corresponds to an update cycle; the device further includes: The key update message receiving module is used to receive a key update message sent by the central coordinator within the validity period of the current communication encryption key; wherein, the key update message includes a first remaining validity period of the current communication encryption key, the start time of the next cycle communication encryption key, and a second remaining validity period of the next cycle communication encryption key; the first remaining validity period is related to the start time of the next cycle communication encryption key and the creation time of the key update message; the second remaining validity period is the update cycle; the start time of the next cycle communication encryption key is related to the start time of the current communication encryption key and the update cycle.

[0263] In some implementations, the key update message receiving module is further configured to receive, within the validity period of the current communication encryption key, a key update message first sent by the central coordinator when the timer reaches a first preset duration; and to receive a key update message second sent by the central coordinator when the timer reaches a second preset duration.

[0264] In some embodiments, the apparatus further includes: The next key activation module is used to activate the next cycle communication encryption key as the current communication encryption key when the timer reaches the third preset duration; wherein the sum of the first preset duration, the second preset duration, and the third preset duration is equal to the update cycle.

[0265] In some embodiments, the communication encryption key is updated periodically, and the communication encryption key corresponds to an update cycle; the device further includes: A key request message sending module is used to send a key request message to the central coordinator when a key update message has not been received; wherein the key request message is used to instruct the central coordinator to send the key update message.

[0266] In some implementations, the key request message sending module is further configured to, if no key update message is received, send a key request message to the central coordinator for the first time after a fourth preset time interval; if no key update message is received again, send a key request message to the central coordinator every fifth preset time interval until the start time of the next cycle communication encryption key; and restart the target multimode node after a sixth preset time interval following the start time of the next cycle communication encryption key.

[0267] In some embodiments, the apparatus further includes: The type mode determination module is used to determine the data type of the business data to be sent and the security mode of the current node if there is business data to be sent under the encryption mode. The key type selection module is used to select the corresponding key type from the communication management key or the communication encryption key according to the data type of the service data to be sent and the security mode of the current node, so as to encrypt the service data to be sent.

[0268] In some embodiments, this specification provides a security control device for a power communication network, applied to a central coordinator included in the power communication network; please refer to... Figure 13 The safety control device 1300 includes: The first request receiving module 1310 is used to receive a first network access request sent by a station node in the power communication network when the security mode of the power communication network is unencrypted mode; wherein the first network access request is accompanied by the communication type of the station node. The second request receiving module 1320 is used to receive a second network access request sent by a station node in the power communication network, so as to re-establish the network, if the security mode of the power communication network is set to encryption mode according to the communication type of the station node in the power communication network.

[0269] In some embodiments, the second request receiving module is further configured to set the security mode of the power communication network to an encrypted mode if a multi-mode node exists in the power communication network; wherein the multi-mode node is a site node based on at least two communication methods, HPLC and HRF.

[0270] In some embodiments, the apparatus further includes: A beacon broadcasting module is used to broadcast beacons; wherein, the beacon includes an authentication enable flag; the authentication enable flag is used to determine the current encryption mode; the second network access request includes identity authentication information corresponding to the current encryption mode; The identity authentication determination module is used to determine whether to send the communication management key and the communication encryption key based on the identity authentication information.

[0271] For a detailed description of the security control devices for power communication networks, please refer to the description of the security control methods for power communication networks above, which will not be repeated here.

[0272] In some embodiments, this specification provides a central coordinator, including a transceiver, a processor, and a memory, wherein the memory stores a computer program, and the processor invokes the computer program to execute the method steps described above.

[0273] In some embodiments, this specification provides a site node including a transceiver, a processor, and a memory, wherein the memory stores a computer program, and the processor invokes the computer program to execute the method steps described above.

[0274] This specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the above embodiments.

[0275] One embodiment of this specification provides a computer program product including instructions that, when executed by a processor of a computer device, enable the computer device to perform the steps of the method described in any of the above embodiments.

[0276] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0277] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0278] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0279] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0280] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0281] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A security control method for a power communication network, characterized in that, The method is applied to the site nodes included in the power communication network; the method includes: When the security mode of the power communication network is unencrypted, a first network access request is sent to the central coordinator included in the power communication network; wherein, the first network access request is accompanied by the communication type of the site node; the first network access request is used to instruct the central coordinator to set the security mode of the power communication network according to the communication type of the site node in the power communication network. If the central coordinator sets the security mode of the power communication network to encrypted mode, a second network access request is sent to the central coordinator to re-establish the network.

2. The method according to claim 1, characterized in that, If multi-mode nodes exist in the power communication network, the encryption mode includes a compatibility mode or a mandatory mode. Specifically, if both single-mode and multi-mode nodes exist simultaneously in the power communication network, the encryption mode is a compatibility mode; if all nodes in the power communication network are multi-mode nodes, the encryption mode is a mandatory mode. The method further includes: When the security mode is in compatibility mode, a second network access request is sent to the central coordinator in compatibility mode to reconfigure the network; wherein, in compatibility mode, the application layer messages transmitted by the multi-mode nodes need to be encrypted, and the multi-mode nodes are site nodes based on at least two communication methods: HPLC and HRF. When the security mode is in forced mode, a second network access request is sent in forced mode to re-establish the network; wherein, in forced mode, all messages except the area identification message need to be encrypted.

3. The method according to claim 1, characterized in that, For target multi-mode nodes that have not yet joined the network, sending a second network access request to the central coordinator includes: Receive a beacon sent by the central coordinator; wherein the beacon includes an authentication enable flag; The current encryption mode is determined based on the authentication enable flag; Send the second network access request to the central coordinator; wherein the second network access request is accompanied by the identity authentication information corresponding to the current encryption mode, and the identity authentication information is used to indicate whether the central coordinator sends the communication management key and the communication encryption key.

4. The method according to claim 3, characterized in that, The identity authentication information includes a first random number, the MAC address of the target multi-mode node, and first certificate data; the method further includes: If the MAC address of the target multi-mode node is in the network access whitelist of the central coordinator and the first certificate data is verified to be valid, the encrypted first random number, the encrypted communication management key, and the second certificate data of the central coordinator are received; wherein, the encrypted first random number is obtained by encrypting the first random number using the private key of the central coordinator, and the encrypted communication management key is obtained by encrypting the communication management key using the first public key information extracted from the first certificate data; If the second certificate data is valid and the encrypted first random number passes the signature verification, the encrypted communication management key is decrypted and saved using the private key of the target multi-mode node.

5. The method according to claim 4, characterized in that, The method further includes: Send an association request to the central coordinator; wherein the association request includes the MAC address of the target multi-mode node encrypted using the communication management key; If the decrypted MAC address of the target multimode node matches the MAC address included in the identity authentication information, the associated confirmation information sent by the central coordinator is received. Save the communication encryption key attached to the associated confirmation information.

6. The method according to claim 5, characterized in that, The method further includes: If no response message for the second network access request is received from the central coordinator, start a timer; If the timer reaches the preset time, a second network access request will be sent again.

7. The method according to claim 6, characterized in that, The method further includes: If the decrypted MAC address of the target multi-mode node does not match the MAC address included in the identity authentication information, an association failure message is received; the association failure message is used to notify the target multi-mode node that the communication management key is incorrect.

8. The method according to claim 4, characterized in that, The verification process for the second certificate data includes: The signature in the second certificate data is verified using the root public key provided by a third party. If the signature in the second certificate data is correct, the second certificate data is deemed valid. If the signature in the second certificate data is incorrect, the second certificate data is determined to be invalid.

9. The method according to claim 3, characterized in that, The communication encryption key is updated periodically, and the communication encryption key has a corresponding update cycle; the method further includes: Within the validity period of the current communication encryption key, a key update message sent by the central coordinator is received; wherein, the key update message includes a first remaining validity period of the current communication encryption key, the start time of the next cycle communication encryption key, and a second remaining validity period of the next cycle communication encryption key; the first remaining validity period is related to the start time of the next cycle communication encryption key and the creation time of the key update message; the second remaining validity period is the update cycle; the start time of the next cycle communication encryption key is related to the start time of the current communication encryption key and the update cycle.

10. The method according to claim 9, characterized in that, The step of receiving a key update message sent by the central coordinator within the validity period of the current communication encryption key includes: Within the validity period of the current communication encryption key, receive the first key update message sent by the central coordinator when the timer reaches the first preset duration; Receive the second key update message sent by the central coordinator when the timer reaches the second preset duration.

11. The method according to claim 10, characterized in that, The method further includes: If the timer reaches the third preset duration, the next cycle communication encryption key is used as the current communication encryption key; wherein, the sum of the first preset duration, the second preset duration, and the third preset duration is equal to the update cycle.

12. The method according to claim 3, characterized in that, The communication encryption key is updated periodically, and the communication encryption key has a corresponding update cycle; the method further includes: If no key update message is received, a key request message is sent to the central coordinator; wherein the key request message is used to instruct the central coordinator to send the key update message.

13. The method according to claim 12, characterized in that, The step of sending a key request message to the central coordinator when no key update message is received includes: If no key update message is received, and the fourth preset time period is reached, a key request message is sent to the central coordinator for the first time. If a key update message is still not received, a key request message is sent to the central coordinator every five preset time intervals until the start of the next communication encryption key cycle. If the target multi-mode node is restarted after the sixth preset time after the start time of the next cycle's communication encryption key.

14. The method according to claim 1, characterized in that, The method further includes: If there is business data to be sent in the encryption mode, determine the data type of the business data to be sent and the security mode of the current node; Based on the data type of the service data to be sent and the security mode of the current node, select the corresponding key type from the communication management key or the communication encryption key to encrypt the service data to be sent.

15. The method according to claim 14, characterized in that, The service data to be transmitted includes MSDU data frames; the method further includes: Determine the IV vector based on the MAC frame type; The MSDU data frame is encrypted using the IV vector and the selected key type to obtain the corresponding ciphertext, which is then sent.

16. The method according to claim 1, characterized in that, The method further includes: If the received business data is encrypted, determine the key type as either a communication management key or a communication encryption key. If the key type is the communication management key, the data is decrypted using the communication management key and the IV vector to obtain the plaintext corresponding to the received service data.

17. The method according to claim 16, characterized in that, The method further includes: If decryption fails, a decryption failure reply message will be sent.

18. The method according to claim 16, characterized in that, The method further includes: If the key type is the communication encryption key, the data is decrypted using the communication encryption key and the IV vector to obtain the corresponding plaintext.

19. The method according to claim 14, characterized in that, If the encryption mode is a forced mode, the method further includes: If the data type of the service data to be sent belongs to the first type set, the communication management key is selected to encrypt the service data to be sent; wherein, the first type set includes at least one of association request, association confirmation information, association summary information, key update message, key request message, and key request confirmation message; If the data type of the service data to be sent belongs to the second type set, the communication encryption key is selected to encrypt the service data to be sent; wherein, the second type set includes application layer messages.

20. The method according to claim 14, characterized in that, If the encryption mode is a compatibility mode; If the data type of the service data to be sent belongs to the application layer message, the multi-mode node selects the communication encryption key to encrypt the service data to be sent; If the data type of the service data to be sent does not belong to the application layer message, the multi-mode node does not encrypt the service data to be sent; The single-mode node does not encrypt the service data to be sent.

21. A security control method for a power communication network, characterized in that, The method is applied to a central coordinator within the power communication network; the method includes: When the security mode of the power communication network is unencrypted, a first network access request sent by a station node in the power communication network is received; wherein the first network access request includes the communication type of the station node. If the security mode of the power communication network is set to encrypted mode according to the communication type of the station nodes in the power communication network, a second network access request sent by the station nodes in the power communication network is received to re-establish the network; wherein, if there are multi-mode nodes in the power communication network, the security mode of the power communication network is set to encrypted mode, wherein the multi-mode nodes are station nodes based on at least two communication methods: HPLC and HRF.

22. The method according to claim 21, characterized in that, The method further includes: A broadcast beacon; wherein the beacon includes an authentication enable flag; the authentication enable flag is used to determine the current encryption mode; the second network access request includes authentication information corresponding to the current encryption mode; Whether to send the communication management key and the communication encryption key is determined based on the identity authentication information.

23. A security control device for a power communication network, characterized in that, The device is applied to the site nodes included in the power communication network; the device includes: The first request sending module is configured to send a first network access request to the central coordinator included in the power communication network when the security mode of the power communication network is unencrypted; wherein the first network access request is accompanied by the communication type of the site node; the first network access request is used to instruct the central coordinator to set the security mode of the power communication network according to the communication type of the site node in the power communication network. The second request sending module is used to send a second network access request to the central coordinator to re-establish the network if the central coordinator sets the security mode of the power communication network to encrypted mode.

24. The apparatus according to claim 23, characterized in that, If multi-mode nodes exist in the power communication network, the encryption mode includes a compatibility mode or a mandatory mode. Specifically, if both single-mode and multi-mode nodes exist in the power communication network, the encryption mode is a compatibility mode; if all nodes in the power communication network are multi-mode nodes, the encryption mode is a mandatory mode. The second request sending module is further configured to, when the security mode is in compatibility mode, send a second network access request to the central coordinator in compatibility mode to reconfigure the network; wherein, in compatibility mode, the application layer messages transmitted by the multi-mode nodes need to be encrypted, and the multi-mode nodes are site nodes based on at least two communication methods, HPLC and HRF; or, when the security mode is in mandatory mode, send a second network access request in mandatory mode to reconfigure the network; wherein, in mandatory mode, messages other than the station identification message need to be encrypted.

25. The apparatus according to claim 23, characterized in that, For a target multi-mode node that has not yet joined the network, the second request sending module is further configured to receive a beacon sent by the central coordinator; wherein the beacon includes an authentication enable flag; determine the current encryption mode based on the authentication enable flag; and send the second network access request to the central coordinator; wherein the second network access request includes authentication information corresponding to the current encryption mode, and the authentication information is used to indicate whether the central coordinator should send a communication management key and a communication encryption key.

26. The apparatus according to claim 25, characterized in that, The identity authentication information includes a first random number, the MAC address of the target multi-mode node, and first certificate data; the device further includes: An encrypted data receiving module is configured to receive, if the MAC address of the target multi-mode node is in the network access whitelist of the central coordinator and the first certificate data is verified to be valid, an encrypted first random number, an encrypted communication management key, and the second certificate data of the central coordinator; wherein, the encrypted first random number is obtained by encrypting the first random number using the private key of the central coordinator, and the encrypted communication management key is obtained by encrypting the communication management key using the first public key information extracted from the first certificate data; The management key decryption module is used to decrypt and save the encrypted communication management key using the private key of the target multi-mode node, provided that the second certificate data is valid and the encrypted first random number passes the signature verification.

27. The apparatus according to claim 26, characterized in that, The device further includes: An association request sending module is used to send an association request to the central coordinator; wherein the association request includes the MAC address of the target multi-mode node encrypted using the communication management key; The association confirmation receiving module is used to receive association confirmation information sent by the central coordinator if the decrypted MAC address of the target multi-mode node is consistent with the MAC address included in the identity authentication information. An encryption key retention module is used to store the communication encryption key attached to the associated confirmation information.

28. The apparatus according to claim 27, characterized in that, The device further includes: The timer start module is used to start a timer if no reply message for the second network access request is received from the central coordinator. The request resend module is used to resend the second network access request if the timer reaches a preset time.

29. The apparatus according to claim 28, characterized in that, The device further includes: The association failure receiving module is used to receive association failure information if the decrypted MAC address of the target multi-mode node is inconsistent with the MAC address included in the identity authentication information; the association failure information is used to notify the target multi-mode node that the communication management key is incorrect.

30. The apparatus according to claim 25, characterized in that, The communication encryption key is updated periodically, and the communication encryption key has a corresponding update cycle; the device further includes: The key update message receiving module is used to receive a key update message sent by the central coordinator within the validity period of the current communication encryption key; wherein, the key update message includes a first remaining validity period of the current communication encryption key, the start time of the next cycle communication encryption key, and a second remaining validity period of the next cycle communication encryption key; the first remaining validity period is related to the start time of the next cycle communication encryption key and the creation time of the key update message; the second remaining validity period is the update cycle; the start time of the next cycle communication encryption key is related to the start time of the current communication encryption key and the update cycle.

31. The apparatus according to claim 30, characterized in that, The key update message receiving module is also used to receive, within the validity period of the current communication encryption key, the key update message sent by the central coordinator for the first time when the timer reaches the first preset time; and to receive the key update message sent by the central coordinator for the second time when the timer reaches the second preset time.

32. The apparatus according to claim 31, characterized in that, The device further includes: The next key activation module is used to activate the next cycle communication encryption key as the current communication encryption key when the timer reaches the third preset duration; wherein the sum of the first preset duration, the second preset duration, and the third preset duration is equal to the update cycle.

33. The apparatus according to claim 25, characterized in that, The communication encryption key is updated periodically, and the communication encryption key has a corresponding update cycle; the device further includes: A key request message sending module is used to send a key request message to the central coordinator when a key update message has not been received; wherein the key request message is used to instruct the central coordinator to send the key update message.

34. The apparatus according to claim 33, characterized in that, The key request message sending module is also used to send a key request message to the central coordinator for the first time if a key update message is not received and the timer reaches the fourth preset duration. If no key update message is received, a key request message is sent to the central coordinator every fifth preset time interval until the start of the next cycle of communication encryption key; if the target multi-mode node is restarted after the sixth preset time interval following the start of the next cycle of communication encryption key.

35. The apparatus according to claim 23, characterized in that, The device further includes: The type mode determination module is used to determine the data type of the business data to be sent and the security mode of the current node if there is business data to be sent under the encryption mode. The key type selection module is used to select the corresponding key type from the communication management key or the communication encryption key according to the data type of the service data to be sent and the security mode of the current node, so as to encrypt the service data to be sent.

36. A security control device for a power communication network, characterized in that, The device is applied to a central coordinator within the power communication network; the device includes: The first request receiving module is configured to receive a first network access request sent by a station node in the power communication network when the security mode of the power communication network is unencrypted; wherein the first network access request includes the communication type of the station node. The second request receiving module is configured to receive a second network access request sent by a station node in the power communication network to re-establish the network if the security mode of the power communication network is set to encryption mode according to the communication type of the station node in the power communication network; wherein, if there are multi-mode nodes in the power communication network, the security mode of the power communication network is set to encryption mode, wherein the multi-mode nodes are station nodes based on at least two communication methods: HPLC and HRF.

37. The apparatus according to claim 36, characterized in that, The device further includes: A beacon broadcasting module is used to broadcast beacons; wherein, the beacon includes an authentication enable flag; the authentication enable flag is used to determine the current encryption mode; the second network access request includes identity authentication information corresponding to the current encryption mode; The identity authentication determination module is used to determine whether to send the communication management key and the communication encryption key based on the identity authentication information.

38. A site node, characterized in that, The site node includes a transceiver, a processor, and a memory, the memory being used to store a computer program, and the processor calling the computer program to perform the method as described in any one of claims 1 to 20.

39. A central coordinator, characterized in that, It includes a transceiver, a processor, and a memory, the memory being used to store a computer program, and the processor calling the computer program to perform the method as described in any one of claims 21 to 22.

40. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 22.

Citation Information

Patent Citations

  • Networking scheme of dual-mode hybrid network based on broadband carrier and narrowband wireless

    CN111200858A

  • Dual-mode fusion networking method

    CN115955400A