Transformer substation cabinet door lock and on-off state monitoring method
By combining device ID matching and dynamic unlocking commands, the problems of low energy consumption and high security of substation cabinet door locks are solved, and safe and reliable switch status monitoring of NFC padlocks is realized.
Patent Information
- Application Number
- CN202511218739.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-11-21
AI Technical Summary
Because of the low switching frequency of substation cabinet door locks, NFC padlocks with built-in power supplies result in unnecessary power waste, while NFC padlocks without power supply structures cannot obtain dynamic unlocking commands in a timely manner, leading to security and energy consumption issues.
The system employs device ID-based matching and dynamic unlocking commands. It uploads matching information between the NFC padlock and the unlocking terminal, and uses the previous unlocking command's encrypted challenge value and HMAC value for secure transmission. This ensures that only NFC padlocks that know the previous unlocking command can unlock the padlock. Combined with CRC value verification, it achieves dynamic unlocking operation.
The NFC padlock's unlocking operation is enhanced while maintaining low power consumption, ensuring timely alarms in abnormal situations and avoiding unnecessary power waste and safety hazards.
Smart Images

Figure CN120997929A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of door lock status monitoring technology, specifically a method for monitoring the status of substation cabinet door locks and switches. Background Technology
[0002] Currently, substation cabinet doors primarily use top and bottom linkage locks, with keys centrally managed within the station. The doors are typically unlocked, leading to accidental entry by staff and subsequent incidents. Therefore, strengthening lock control and monitoring of switch status is crucial. NFC padlocks, due to their elimination of physical keys and ease of unlocking, are considered the optimal choice for enhancing lock control. Ensuring the security of NFC padlocks during unlocking is therefore paramount, and monitoring and evaluating the switch status based on the unlocking information is equally important.
[0003] However, due to the low opening and closing frequency of substation cabinet doors, using NFC padlocks with built-in power supplies to continuously keep them powered on to ensure timely acquisition of dynamic unlocking commands results in unnecessary power waste. On the other hand, NFC padlocks without power supply structures cannot acquire dynamic unlocking commands in a timely manner and can only use static unlocking commands for unlocking, which poses security risks. Therefore, there is an urgent need for an unlocking solution that combines the low power consumption and high security of NFC padlocks to enhance the monitoring of cabinet door locking and opening / closing status.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide a method for monitoring the status of substation cabinet door locks and switches, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for monitoring switch status, used to monitor the switch status of substation cabinet door locks, includes the following steps: S1, based on the device ID, performs matching judgment on the unlocking terminal and the NFC padlock powered by it and uploads the matching information. If the matching is successful, the NFC padlock sends the challenge value encrypted by the previous unlocking command to the unlocking terminal. S2, based on the encrypted challenge value processed by the unlocking terminal to obtain the response value, and based on the current unlocking command, the response value is encrypted, the previous unlocking command is used as the initialization vector to encrypt the randomly generated current unlocking command and calculate its HMAC value, and the encrypted response value, the encrypted current unlocking command and HMAC value are combined as the payload and its CRC value is calculated to generate an unlocking request signal and transmit it to the NFC padlock; S3, based on the NFC padlock, processes the unlock request signal. After verifying that the CRC value and HMAC value are correct, it decrypts the encrypted unlock command for this round and uses the decrypted unlock command for this round to decrypt the encrypted response value. After verifying that the decrypted response value is correct, it performs the unlock operation and replaces the previous unlock command with the decrypted unlock command for this round. S4 uploads the NFC padlock's open / closed status information and the cabinet door's open / closed status information in real time, and combines the matching information to determine if there are any abnormalities, and alarms are triggered when abnormalities are found.
[0007] Furthermore, the unlocking terminal consists of an NFC card reader, a rechargeable battery, and a LoRa wireless communication module. The NFC padlock is a padlock with a built-in energy harvesting module, and the NFC padlock also includes an NFC module, a microcontroller unit, and non-volatile memory.
[0008] Furthermore, the logic for matching the unlocking terminal and the NFC padlock is as follows: the unlocking terminal sends a pairing request signal containing the device ID to the NFC padlock. The NFC padlock analyzes the pairing request signal to make a matching judgment and uploads the matching information through the NFC padlock. When the matching is successful, the NFC padlock sends a pairing feedback signal containing an encrypted challenge value to the unlocking terminal. The matching information includes the device ID of the NFC padlock and the matching result. The matching result is either a successful match or a failed match.
[0009] Furthermore, the specific logic of the NFC padlock analyzing the pairing request signal to make a matching judgment is as follows: After receiving the pairing request signal, the NFC padlock parses the data packet, verifies the start marker, check code and end marker, and reads the type information and device ID information in the pairing request signal. Based on the type information, it determines to perform a matching judgment, specifically: it compares the read device ID information with the device ID information stored in itself. If the two are the same, the match is judged to be successful; otherwise, the match is judged to be unsuccessful.
[0010] Furthermore, the logic for encrypting the challenge value based on the previous unlock command is as follows: using the previous unlock command as the key, a challenge value is randomly generated. The key and challenge value are then processed using the AES encryption algorithm to generate the challenge value encrypted with the previous unlock command. The specific expression is as follows:
[0011] In the formula, These are the challenge value and the unlock command from the previous round, respectively. For AES encryption function, This represents the ciphertext, which is the challenge value encrypted after the previous round of unlocking instructions.
[0012] Furthermore, the logic for the unlocking terminal to process the encrypted challenge value to obtain the response value is as follows:
[0013] In the formula, Indicates the response value. This is the AES decryption function; The logic for encrypting the response value based on this round of unlocking instructions is as follows:
[0014] In the formula, This indicates the unlock command for this round. This represents the encrypted response value; The logic for AES encryption of this round of unlocking commands is as follows:
[0015] In the formula, This indicates the encrypted unlock command for this round. This indicates that the unlock command uses a shared key.
[0016] Furthermore, the logic for performing the unlocking operation in S3 is as follows: 1) The NFC padlock reads the type information, CRC value, HMAC value, encrypted response value, and encrypted unlock command for this round from the unlock request signal, and determines the subsequent operation to be performed based on the type information; 2) Calculate the CRC value of the payload in the unlock request signal based on the NFC padlock, and compare it with the CRC value in the unlock request signal. If they are the same, the CRC value is confirmed to be correct and subsequent verification is performed. Otherwise, the NFC padlock stops subsequent verification and sends an error message to the unlocking terminal to request the unlocking terminal to resend the unlock request signal. 3) Calculate the encrypted HMAC value of the unlocking command in the unlocking request signal based on the NFC padlock, and compare it with the HMAC value in the unlocking request signal. If they are the same, the HMAC value is confirmed to be correct and subsequent decryption is performed. Otherwise, the NFC padlock stops subsequent verification and uploads alarm information. 4) Decrypt the encrypted unlock command for this round based on the NFC padlock to obtain the decrypted unlock command for this round. The specific formula is as follows:
[0017] In the formula, This indicates the unlock command for this round after decryption; 5) Based on the decrypted unlock command of this round, the encrypted response value is decrypted to obtain the decrypted response value. If the decrypted response value matches the challenge value, it means that the unlock command of this round is correct and the unlock operation is executed; otherwise, the NFC padlock does not execute the unlock operation and uploads alarm information. The logic for decrypting the encrypted response value is as follows:
[0018] In the formula, This represents the decrypted response value.
[0019] Furthermore, the logic for determining whether there is an anomaly is as follows: under the same round of unlocking operation, if the matching information is successful, the NFC padlock's switch status information is locked, while the cabinet door's switch status information is open, then an anomaly is determined to exist. If, during the same unlocking operation, the matching information is unsuccessful, the NFC padlock's switch status is unlocked, or the cabinet door's switch status is open, then an anomaly is identified.
[0020] A substation cabinet door, using the aforementioned switch status monitoring method for switch status monitoring, includes: The cabinet door is movably installed on the substation box; Linkage lock: Installed on the cabinet door, and includes a hanging ring structure; The NFC padlock is mounted on the ring structure of the linkage lock and is unlocked using an unlocking terminal.
[0021] Compared with the prior art, the beneficial effects of the present invention are: The substation cabinet door lock and switch status monitoring method of the present invention introduces matching information for anomaly judgment when monitoring the switch status information of NFC padlocks and cabinet doors, ensuring timely alarm when switch status monitoring is abnormal. It also encrypts the challenge value using the previous unlock command, ensuring the security of the challenge value during transmission. Then, when transmitting the current unlock command, it uses the previous unlock command as an initialization vector to encrypt the current unlock command, ensuring that only NFC padlocks that know the previous unlock command can decrypt it to obtain the current unlock command. Finally, the NFC padlock uses the decrypted current unlock command to set the decryption of the encrypted response value. Only when the decrypted response value matches the challenge value is the current unlock command considered correct. This achieves the purpose of using dynamic unlock commands for unlocking operations, improving the security of NFC padlock unlocking operations while maintaining low energy consumption. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the monitoring method in this invention; Figure 2 This is a schematic diagram of the substation box door lock in this invention.
[0023] Attached diagram descriptions: 1-Cabinet door, 2-Linked lock, 21-Hanging ring structure, 3-NFC padlock. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0025] It should be noted that, unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0026] Example 1: Please see Figure 1 This invention provides a switch status monitoring method for monitoring the switch status of substation cabinet door locks, comprising the following steps: S1, based on the device ID, performs matching judgment on the unlocking terminal and the NFC padlock powered by it and uploads the matching information. If the matching is successful, the NFC padlock sends the challenge value encrypted by the previous unlocking command to the unlocking terminal. As one implementation method, the unlocking terminal consists of an NFC card reader, a rechargeable battery, and a LoRa wireless communication module. The unlocking terminal supplies power and transmits information to the NFC padlock through the NFC card reader. The NFC card reader reads the device ID of the NFC padlock through the background. The unlocking command can also be obtained through the background or randomly generated based on the unlocking terminal. The rechargeable battery is used to power the LoRa wireless communication module. The LoRa wireless communication module is used to upload the NFC padlock's on / off status information and matching information to the cabinet door information node, and then transmit it to the background for aggregation so that staff can query it. It should be noted that the cabinet door information node is a network transmission node that aggregates the status information of a single cabinet door. It can be set up at the nearest cabinet door. The cabinet door information node uploads the status information of the cabinet door to the backend through wired or wireless communication. The status information includes the open / closed status information of the cabinet door, the matching information of the NFC padlock, and the open / closed status information. The NFC card reader of the unlocking terminal can send a pairing request signal or an unlocking request signal to the NFC padlock as needed. This is achieved by setting up a user interface (UI) or physical buttons, which is existing technology and will not be described in detail here. It should be noted that the unlock command is stored in the NFC padlock's own non-volatile memory. Specifically, a separate storage area is set up in the non-volatile memory to store the unlock command, so as to avoid the problem of the previous unlock command being lost after the NFC padlock is powered off. Only the unlock command that has been verified by the NFC padlock is stored to ensure the correctness of the stored unlock command and prevent the problem of unscrupulous people using incorrect unlock commands to replace correct unlock commands and maliciously unlock the padlock. As one implementation method, the NFC padlock is a padlock with a built-in energy harvesting module. The energy harvesting module includes an antenna coil, a rectifier circuit, and a voltage regulator. When the unlocking terminal is brought close to the NFC padlock (generally no more than 10 cm), the NFC reader of the unlocking terminal generates an electromagnetic field during the signal transmission process. The antenna coil in the energy harvesting module converts the energy of the electromagnetic field into alternating current, and then the rectifier circuit converts the alternating current into direct current. Since the rectified direct current may fluctuate, a voltage regulator is used to stabilize the output voltage. Finally, the stable direct current regulated by the voltage regulator is supplied to the internal circuit of the NFC padlock. When the NFC padlock obtains enough power (usually within tens of milliseconds), it activates the internal circuit to enter the working state. This is existing technology and will not be described in detail here. In addition, the NFC padlock also includes an NFC module for receiving and sending signals, a microcontroller unit for performing logical judgments, and a non-volatile memory for storing shared keys and unlocking instructions. The NFC module consists of an antenna, a modem, and necessary driving circuits. The microcontroller unit consists of a computing unit (such as a CPU), a storage unit (such as RAM and Flash memory), and an encryption unit (such as an encryption chip). The NFC padlock can be assembled using existing models of equipment, and no restrictions are imposed here. The logic for matching the unlocking terminal and the NFC padlock is as follows: The unlocking terminal sends a pairing request signal containing the device ID to the NFC padlock. The NFC padlock, which is in working mode, analyzes the pairing request signal to make a matching judgment and uploads the matching information through the NFC padlock. When the matching is successful, the NFC padlock sends a pairing feedback signal containing an encrypted challenge value to the unlocking terminal. The matching information includes the device ID of the NFC padlock and the matching result. The matching result is either a successful match or a failed match. It should be noted that the pairing request signal is transmitted in the form of data packets, the specific structure of which is shown in Table 1 below: Table 1. Data packet structure diagram
[0027] Where n represents the number of bytes occupied by the payload; As one implementation, the data packet structure of the pairing request signal can be specifically represented as "| 0xAA | 0x01 |Length | Device ID | Checksum | 0xFF |", where "0xAA" is the start marker, "0x01" indicates that the data packet is used to reflect matching information, so that the NFC padlock performs a matching judgment based on this field, rather than an unlocking operation, "Length" is the number of bytes of the payload, which makes it easier for the NFC padlock to accurately read the payload data, "Device ID" is the device ID of the NFC padlock, usually represented in the form of UUID, "Checksum" is used for checksum or CRC check to ensure the integrity of the signal transmission process, and "0xFF" is the end marker; The specific logic of the NFC padlock analyzing the pairing request signal is as follows: After receiving the pairing request signal, the NFC padlock parses the data packet, verifies the start marker, check code, and end marker, and reads the type information and payload information (i.e., device ID information) in the pairing request signal. Based on the type information, it determines to perform a matching judgment. Specifically, it compares the read device ID information with its own stored device ID information. If the two are the same, the match is successful; otherwise, the match is unsuccessful. The NFC padlock stores its own device ID information in non-volatile memory. As one implementation method, the NFC padlock transmits matching information to the network transmission node through its own wireless communication module. The network transmission node then uploads the matching information to the backend. The matching information can use the same data packet structure, such as "| 0xAA | 0x01 | Length | Device ID | Matching Result | Verification Code | 0xFF|". The payload consists of two parts: the NFC padlock's device ID and the matching result (e.g., "YES" indicates successful matching, and "NO" indicates unsuccessful matching). "0x01" indicates that the data packet is used to reflect the matching information, which facilitates the subsequent execution of corresponding reading operations and the visualization of the NFC padlock's matching information. This is existing technology and will not be elaborated here. The logic for encrypting the challenge value based on the previous unlock command is as follows: using the previous unlock command as the key, a challenge value is randomly generated. The key and challenge value are then processed using the AES encryption algorithm to generate the challenge value encrypted with the previous unlock command. The specific expression is as follows:
[0028] In the formula, These are the challenge value and the unlock command from the previous round, respectively. This is an AES encryption function used to bypass the previous decryption command. Challenge value Encryption processing is performed. This represents the ciphertext, which is the challenge value encrypted after the previous unlock command; As one implementation method, the pairing feedback signal can specifically adopt the same data packet structure, such as being represented as "|0xAA | 0x01 | Length | E | Checksum | 0xFF |"; As another implementation method, the pairing feedback signal also includes matching information, whose data packet structure is represented as "|0xAA | 0x01 | Length | Device ID | Matching Result | E | Verification Code | 0xFF |". This setting is used to transmit the matching information and the encrypted challenge value together to the unlocking terminal. The unlocking terminal then uploads the matching information to the cabinet door information node through its own LoRa wireless communication module to realize the upload of matching information. This approach eliminates the need to upload matching information separately through the NFC padlock, reducing the workload of the NFC padlock. However, if criminals forge the unlocking terminal to unlock, the backend cannot obtain the "unsuccessful matching" warning information in time, which poses a certain risk. S2, based on the encrypted challenge value processed by the unlocking terminal to obtain the response value, and based on the current unlocking command, the response value is encrypted, the previous unlocking command is used as the initialization vector to encrypt the randomly generated current unlocking command and calculate its HMAC value, and the encrypted response value, the encrypted current unlocking command and HMAC value are combined as the payload and its CRC value is calculated to generate an unlocking request signal and transmit it to the NFC padlock; The logic for unlocking the terminal to process the encrypted challenge value to obtain the response value is as follows:
[0029] In the formula, Indicates the response value. This is the AES decryption function, used to decrypt the code from the previous round of unlocking commands. The encrypted challenge value To decrypt and unlock the terminal, the unlock command is entered simultaneously with the unlock command from the current round and the previous round. Furthermore, before decrypting the challenge value, it needs to be padded until the padded challenge value meets the input requirements of the AES encryption algorithm. For example, when the unlock command is randomly generated based on the unlock terminal or the background, the generated unlock command is a random number with a byte size of 16. When padded the challenge value, the PKCS#7 padded method is used to padded the challenge value to an integer multiple of its byte size of 16. The padded value is removed when the response value is obtained through decryption. Subsequent encryption and decryption operations are similar. This is existing technology and will not be elaborated here. The logic for encrypting the response value based on this round of unlocking instructions is as follows:
[0030] In the formula, This indicates the unlock command for this round. This represents the encrypted response value; The logic for AES encryption of this round of unlocking commands is as follows:
[0031] In the formula, This indicates the encrypted unlock command for this round. This indicates the shared key for unlocking commands. This shared key is synchronously stored in both the unlocking terminal and the NFC padlock, and is used to encrypt or decrypt the current unlocking command. When encrypting, use the previous unlock command. It is used as an initialization vector in the encryption process to increase randomness and security, thereby improving the anti-replay attack capability of the current unlock command; The method for calculating the HMAC value of the encrypted unlock command for this round is as follows: 1) Based on the hash function shared key, generate the internal padding key and the external padding key, as shown in the following formula:
[0032]
[0033] In the formula, These represent the shared hash function key, the internal padding key, and the external padding key, respectively. The unlocking terminal and the NFC padlock store the same shared hash function key. and Both are hexadecimal numbers, representing 54 and 92 in decimal, respectively. This indicates the block size of the hash function. For example, the SHA-256 hash function used in this technical solution has a block size of 512 bits, or 64 bytes. This represents the XOR operation, which generates XOR values of length 1. The internal padding key and the external padding key; 2) Connect the internal padding key and the encrypted unlock command for this round to calculate the internal hash value, using the following formula:
[0034] In the formula, This indicates a join operation, used to concatenate the internal padding key and the encrypted unlock command for this round. For the hash function, we use SHA-256 here. Indicates the internal hash value; 3) Connect the internal hash value and the external padding key to calculate the HMAC value after encrypting the current unlock command. The specific formula is as follows:
[0035] In the formula, The encrypted HMAC value of the unlock command for this round; The method for calculating the CRC value of the payload is as follows: 1) Combine the encrypted response value, the encrypted unlock command for this round, and the HMAC value to form the payload, as shown below:
[0036] In the formula, Indicates the payload; 2) Perform Cyclic Redundancy Check (CRC) calculation on the payload to determine its CRC value. The calculation formula is as follows:
[0037] In the formula, The CRC value representing the payload. This indicates Cyclic Redundancy Check (CRC), used to perform CRC calculations on the payload P to generate the corresponding CRC value. As one implementation, the data packet structure of the unlock request signal can be specifically represented as "| 0xAA | 0x02 |Length | | | | "| 0xFF |", "0x02" indicates that the data packet is used to reflect unlocking information, so that the NFC padlock performs the unlocking operation based on this field, rather than matching; S3, based on the NFC padlock, processes the unlock request signal. After verifying that the CRC value and HMAC value are correct, it decrypts the encrypted unlock command for this round and uses the decrypted unlock command for this round to decrypt the encrypted response value. After verifying that the decrypted response value is correct, it performs the unlock operation and replaces the previous unlock command with the decrypted unlock command for this round. The logic for performing the unlock operation is as follows: 1) The NFC padlock reads the type information, CRC value, HMAC value, encrypted response value, and encrypted unlock command for this round from the unlock request signal, and determines the subsequent operation to be performed based on the type information; 2) Calculate the CRC value of the payload in the unlock request signal based on the NFC padlock, and compare it with the CRC value in the unlock request signal. If they are the same, the CRC value is confirmed to be correct and subsequent verification is performed. Otherwise, it indicates that an error occurred in the transmission of the unlock request signal. The NFC padlock then stops the subsequent verification and sends an error message to the unlock terminal to request the unlock terminal to resend the unlock request signal. 3) Calculate the encrypted HMAC value of the unlocking command in the unlocking request signal based on the NFC padlock, and compare it with the HMAC value in the unlocking request signal. If they are the same, the HMAC value is confirmed to be correct and subsequent decryption is performed. Otherwise, it indicates that the unlocking command in this round may come from an unauthorized device or have been tampered with. The NFC padlock then stops the subsequent verification and uploads alarm information. Specifically, it sends alarm information to the cabinet door information node, which then forwards it to the backend. 4) Decrypt the encrypted unlock command for this round based on the NFC padlock to obtain the decrypted unlock command for this round. The specific formula is as follows:
[0038] In the formula, This indicates the unlock command for this round after decryption; 5) Based on the decrypted unlock command of this round, the encrypted response value is decrypted to obtain the decrypted response value. If the decrypted response value matches the challenge value, it indicates that the unlock command of this round is correct and the unlocking operation is executed. Otherwise, it indicates that the unlock command of this round may have come from an unauthorized device or been tampered with. The NFC padlock will not execute the unlocking operation and will upload alarm information. Specifically, an alarm message is sent to the cabinet door information node, which then forwards it to the backend. The logic for decrypting the encrypted response value is as follows:
[0039] In the formula, This represents the decrypted response value; It should be noted that NFC padlocks are offline for extended periods due to their lack of a power source. Generally, static unlock commands are required for unlocking. However, static unlock commands are vulnerable to brute-force attacks by malicious actors. Even if a key is used to encrypt the static unlock command, the same key is still required to decrypt it. Therefore, static keys are generally used for encryption, but they are also vulnerable to brute-force attacks by malicious actors. To address this issue, this technical solution enhances the security of NFC padlock unlocking operations by randomly generating unlock commands. Specifically, the challenge value is first encrypted based on the previous unlock command. Since the previous unlock command is a randomly generated value, the security of the challenge value during transmission is ensured, guaranteeing that only unlocking terminals that know the previous unlock command can decrypt it to obtain the response value. Similarly, when transmitting the current unlock command, the unlocking terminal uses the previous unlock command as an initialization vector to encrypt the current unlock command, ensuring that only NFC padlocks that know the previous unlock command can decrypt it to obtain the response value. The NFC padlock receives a series of unlock commands, but since it cannot verify the correctness of these commands, this solution addresses this technical issue by having the unlocking terminal transmit an encrypted response value to the NFC padlock. The NFC padlock then uses the decrypted unlock command to set the decryption of the encrypted response value. Only when the decrypted response value matches the challenge value is the unlock command considered correct. This achieves the goal of using dynamic unlock commands for unlocking operations, improving the security of NFC padlock unlocking operations. Furthermore, this solution also uses CRC and HMAC values to ensure the security of the transmission process. In addition, existing technologies also employ methods to use dynamic unlocking commands, such as: after the NFC padlock is powered on, it first sends a signal to the cabinet door information node requesting a dynamic unlocking command, which is then relayed to the backend via the cabinet door information node. The backend then relays the dynamic unlocking command to the NFC padlock via the cabinet door information node. However, this operation has a long delay, and the dynamic unlocking command is easily intercepted during transmission due to "man-in-the-middle attacks," posing a significant security vulnerability. Furthermore, this approach requires the dynamic unlocking command to be generated only by the backend, which lacks flexibility compared to the unlocking terminal generating the command in this technical solution. This makes it impossible to open the door and rescue personnel in a timely manner when they are accidentally locked inside a substation box. It should be noted that the above operations are all performed through the microcontroller unit of the NFC padlock. Specifically, the above operations can be performed through a pre-written program, which is existing technology and will not be elaborated here. S4, uploads the NFC padlock's open / close status information and the cabinet door's open / close status information in real time, and combines the matching information to determine if there is any abnormality, and alarms when there is an abnormality; As one implementation method, the on / off state of the NFC padlock can be monitored by a Hall effect sensor. For example, the Hall effect sensor can be installed inside the lock body on the side near the bolt, and a small magnet can be installed at the end of the bolt with the sensing surface of the Hall effect sensor facing the small magnet. In the unlocked state, the Hall effect sensor is far away from the small magnet and cannot sense the small magnet, indicating that the NFC padlock is in the unlocked state. Conversely, when the bolt is fully inserted, the Hall effect sensor is close to the small magnet and is sensed, indicating that the NFC padlock is in the locked state. This is how the on / off state of the NFC padlock is monitored. Of course, the on / off state of the NFC padlock can also be monitored by an inductive proximity switch, which will not be elaborated here. As one implementation method, the opening and closing status of the cabinet door can be monitored by a magnetic switch sensor with a built-in power supply. Specifically, the magnetic switch sensor body (i.e., the reed switch) is installed on the top of the door frame, and the magnet is installed on the top of the cabinet door. When the cabinet door is closed, the magnet is aligned with and close to the reed switch. The reed switch closes under the magnetic field generated by the magnet, and the circuit state is "closed". When the cabinet door is opened, the magnet moves away from the reed switch with the cabinet door, causing the reed switch to no longer sense the magnetic field and open, and the circuit state switches to "open". This completes the monitoring of the opening and closing status of the cabinet door. For example, a magnetic switch sensor of model "MCCGQ02HL" can be used, and there are no restrictions. The NFC padlock's open / close status can be sent directly to the cabinet door information node via its own NFC module, or it can be sent to the unlocking terminal first via its own NFC module, and then sent to the cabinet door information node by the unlocking terminal. There is no restriction here. The cabinet door's open / close status is sent to the cabinet door information node through the pressure plate sensor wireless communication technology, thereby realizing the real-time uploading of the NFC padlock's open / close status information and the cabinet door's open / close status information. The specific information transmission can adopt a data packet structure similar to the above, which will not be elaborated here. The logic for determining whether there is an anomaly is as follows: In the same round of unlocking operations, if the matching information is successful, the NFC padlock's switch status information is locked, while the cabinet door's switch status information is open, it indicates that the NFC padlock was accidentally locked when the cabinet door was open, or there is an error in either the NFC padlock's switch status information or the cabinet door's switch status information. In this case, an anomaly is determined, and the backend needs to send an alarm message in a timely manner and arrange for staff to conduct a timely review and verification. In the same unlocking operation, if the matching information is unsuccessful, the NFC padlock's switch status is unlocked, or the cabinet door's switch status is open, it indicates that the NFC padlock was not closed after the previous unlocking, or that the NFC padlock was forcibly opened. This indicates an anomaly, and the backend needs to promptly send an alarm message and arrange for staff to conduct a timely review or reprimand the personnel who performed the previous unlocking operation. Any other statuses are considered normal.
[0040] Example 2: Please see Figure 2 This embodiment provides a substation cabinet door, which uses the switch status monitoring method in Embodiment 1 above to monitor the switch status, including: Cabinet door 1 is movably mounted on the substation box; Linkage lock 2: Installed on the cabinet door and includes a hanging ring structure 21. The linkage lock 2 is obtained by adding a hanging ring structure 21 to the existing upper and lower linkage lock structure. The upper and lower linkage lock structure includes a lock body, a linkage and a lock tongue. The metal linkage connects to the lock tongue on the cabinet door. Due to its simple structure and multi-point locking characteristics, it has good anti-prying and durability and is widely used on the cabinet doors of substation cabinets. The NFC padlock 3 is movably mounted on the hanging ring structure of the linkage lock 2 and is unlocked using an unlocking terminal.
[0041] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0042] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0043] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0044] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for monitoring switch status, used to monitor the switch status of substation cabinet door locks, characterized in that, Includes the following steps: S1, based on the device ID, performs matching judgment on the unlocking terminal and the NFC padlock powered by it and uploads the matching information. If the matching is successful, the NFC padlock sends the challenge value encrypted by the previous unlocking command to the unlocking terminal. S2, based on the encrypted challenge value processed by the unlocking terminal to obtain the response value, and based on the current unlocking command, the response value is encrypted, the previous unlocking command is used as the initialization vector to encrypt the randomly generated current unlocking command and calculate its HMAC value, and the encrypted response value, the encrypted current unlocking command and HMAC value are combined as the payload and its CRC value is calculated to generate an unlocking request signal and transmit it to the NFC padlock; S3, based on the NFC padlock, processes the unlock request signal. After verifying that the CRC value and HMAC value are correct, it decrypts the encrypted unlock command for this round and uses the decrypted unlock command for this round to decrypt the encrypted response value. After verifying that the decrypted response value is correct, it performs the unlock operation and replaces the previous unlock command with the decrypted unlock command for this round. S4 uploads the NFC padlock's open / closed status information and the cabinet door's open / closed status information in real time, and combines the matching information to determine if there are any abnormalities, and alarms are triggered when abnormalities are found.
2. The switch status monitoring method according to claim 1, characterized in that: The unlocking terminal consists of an NFC card reader, a rechargeable battery, and a LoRa wireless communication module. The NFC padlock is a padlock with a built-in energy harvesting module, and the NFC padlock also includes an NFC module, a microcontroller unit, and non-volatile memory.
3. The switch status monitoring method according to claim 1, characterized in that, The logic for matching the unlocking terminal and the NFC padlock is as follows: The unlocking terminal sends a pairing request signal containing the device ID to the NFC padlock. The NFC padlock analyzes the pairing request signal to make a matching judgment and uploads the matching information through the NFC padlock. When the matching is successful, the NFC padlock sends a pairing feedback signal containing an encrypted challenge value to the unlocking terminal. The matching information includes the device ID of the NFC padlock and the matching result. The matching result is either a successful match or a failed match.
4. The switch status monitoring method according to claim 3, characterized in that, The specific logic of the NFC padlock analyzing the pairing request signal to make a matching judgment is as follows: After receiving the pairing request signal, the NFC padlock parses the data packet, verifies the start marker, check code and end marker, and reads the type information and device ID information in the pairing request signal. Based on the type information, it determines to perform a matching judgment. Specifically, it compares the read device ID information with the device ID information stored in itself. If the two are the same, the match is successful; otherwise, the match is unsuccessful.
5. The switch status monitoring method according to claim 1, characterized in that, The logic for encrypting the challenge value based on the previous unlock command is as follows: using the previous unlock command as the key, a challenge value is randomly generated. The key and challenge value are then processed using the AES encryption algorithm to generate the challenge value encrypted with the previous unlock command. The specific expression is as follows: ; In the formula, These are the challenge value and the unlock command from the previous round, respectively. For AES encryption function, This represents the ciphertext, which is the challenge value encrypted after the previous round of unlocking instructions.
6. The switch status monitoring method according to claim 5, characterized in that, The logic for the unlocking terminal to process the encrypted challenge value to obtain the response value is as follows: ; In the formula, Indicates the response value. This is the AES decryption function.
7. The switch status monitoring method according to claim 6, characterized in that, The logic by which the unlocking terminal encrypts the response value based on the current unlocking command is as follows: ; In the formula, This indicates the unlock command for this round. This represents the encrypted response value.
8. The switch status monitoring method according to claim 7, characterized in that, The logic for the unlocking terminal to encrypt the unlocking command in this round using AES is as follows: ; In the formula, This indicates the encrypted unlock command for this round. This indicates that the unlock command uses a shared key.
9. The switch status monitoring method according to claim 8, characterized in that, The logic for performing the unlocking operation in S3 is as follows: 1) The NFC padlock reads the type information, CRC value, HMAC value, encrypted response value, and encrypted unlock command for this round from the unlock request signal, and determines the subsequent operation to be performed based on the type information; 2) Calculate the CRC value of the payload in the unlock request signal based on the NFC padlock, and compare it with the CRC value in the unlock request signal. If they are the same, the CRC value is confirmed to be correct and subsequent verification is performed. Otherwise, the NFC padlock stops subsequent verification and sends an error message to the unlocking terminal to request the unlocking terminal to resend the unlock request signal. 3) Calculate the encrypted HMAC value of the unlocking command in the unlocking request signal based on the NFC padlock, and compare it with the HMAC value in the unlocking request signal. If they are the same, the HMAC value is confirmed to be correct and subsequent decryption is performed. Otherwise, the NFC padlock stops subsequent verification and uploads alarm information. 4) Decrypt the encrypted unlock command for this round based on the NFC padlock to obtain the decrypted unlock command for this round. The specific formula is as follows: ; In the formula, This indicates the unlock command for this round after decryption; 5) Based on the decrypted unlock command of this round, the encrypted response value is decrypted to obtain the decrypted response value. If the decrypted response value matches the challenge value, it means that the unlock command of this round is correct and the unlock operation is executed; otherwise, the NFC padlock does not execute the unlock operation and uploads alarm information. The logic for decrypting the encrypted response value is as follows: ; In the formula, This represents the decrypted response value.
10. The switch status monitoring method according to claim 1, characterized in that, The logic for determining whether there is an anomaly is as follows: In the same round of unlocking operations, if the matching information is successful, the NFC padlock's switch status information is locked, while the cabinet door's switch status information is open, then an anomaly is determined to exist. If, during the same unlocking operation, the matching information is unsuccessful, the NFC padlock's switch status is unlocked, or the cabinet door's switch status is open, then an anomaly is identified.
11. A substation cabinet door, wherein the switch status monitoring method of any one of claims 1-10 is used for switch status monitoring, characterized in that, include: The cabinet door is movably installed on the substation box; Linkage lock: Installed on the cabinet door, and includes a hanging ring structure; The NFC padlock is mounted on the ring structure of the linkage lock and is unlocked using an unlocking terminal.