Communication mechanism, control method and control system of intelligent cabinet electric control lock
The intelligent cabinet electric lock communication mechanism and control method with a three-level architecture solves the problems of communication delay and inflexible key binding in the existing technology, realizes flexible unlocking methods and efficient status synchronization, improves the reliability and security of the system, and adapts to various scenario requirements.
Patent Information
- Application Number
- CN202511697548.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-27
AI Technical Summary
Existing smart cabinet electric locks suffer from problems such as large communication delays, inability to unlock offline when communication is interrupted, inflexible key binding methods, limited unlocking methods, poor scalability of communication mechanisms, and insufficient redundancy of control systems, resulting in inadequate ease of use, management flexibility, and security.
The communication mechanism adopts a three-level architecture, including the controller, lock control board and electric lock, which supports two unlocking methods: controller end and electric lock end. It enables flexible switching between key binding and unbinding, and designs a bus preemption and contention mechanism to support offline unlocking. It also integrates lighting modules and a back-end system for status monitoring and management.
It improves communication stability and flexibility, supports multi-scenario adaptation, enhances system reliability and security, reduces latency and bit error rate, and improves user experience and management efficiency.
Smart Images

Figure CN121583018A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart cabinet electric control lock technology, specifically relating to a communication mechanism and control method for a smart cabinet electric control lock, as well as a control system for implementing the method. It is applicable to various smart cabinet devices that require flexible unlocking management and status monitoring, such as smart express cabinets, smart industrial tool cabinets, laboratory sample storage cabinets, community shared storage cabinets, and office file cabinets. Background Technology
[0002] With the rapid popularization of IoT technology, artificial intelligence, and mobile internet, smart lockers, as efficient storage and management devices, have been widely adopted in various fields such as logistics and express delivery, industrial production, scientific research experiments, community services, and office settings. The core execution unit of a smart locker is the electronic lock, and its communication stability, control flexibility, and security reliability directly determine the user experience and management efficiency of the smart locker.
[0003] In recent years, the smart locker market has experienced explosive growth. According to industry data, the global smart locker market size exceeded US$30 billion in 2023, with a compound annual growth rate of over 15%. Among them, express delivery smart lockers, as the earliest scenario for large-scale application, have a coverage rate of over 70% in urban communities in my country. In the industrial sector, tool smart lockers have seen their market penetration rate increase year by year due to the need for standardized management of spare parts and production tools. Special scenarios such as laboratories and archives have higher requirements for the security and traceability of smart lockers, driving the development of electronic locker technology towards higher precision and higher security levels.
[0004] As a core component of smart lockers, the technological evolution of electronic lockers has gone through three stages: mechanical locks, electromagnetic locks, and intelligent electronic locks. Early mechanical locks relied on physical keys, resulting in high management costs and poor security; electromagnetic locks controlled switches through simple electrical signals, lacking identification and status feedback functions; modern intelligent electronic locks integrate functions such as identification, communication transmission, and status detection, enabling complex needs such as key binding, remote control, and operation traceability, and have become the core carrier for the technological upgrade of smart lockers.
[0005] The existing defects of smart cabinet electronic locks are as follows:
[0006] 1. The electric lock lacks an independent key recognition chip and relies on the controller for identity verification. This requires real-time communication between the lock and controller when the card is swiped, resulting in significant communication latency and the inability to unlock offline if communication is interrupted. The lock control board has a limited function, acting only as a signal forwarding unit and lacking local data storage, command parsing, and status detection capabilities. This leads to an excessive load on the controller and low communication efficiency.
[0007] 2. Key binding methods for smart locker electronic locks are mainly divided into two categories: one-time binding and permanent binding, lacking flexible binding logic to adapt to different scenarios. In one-time binding mode, the smart key can only be used once after binding to the electronic lock, and automatically unbinds after unlocking, suitable for one-time package retrieval scenarios such as parcel lockers. However, in existing technologies, one-time binding requires pre-configuration through the backend system, preventing users from binding on-site, resulting in insufficient flexibility; furthermore, in some products, if the lock is not unlocked promptly after binding, the key will be locked, requiring administrator unlocking, which is cumbersome. In permanent binding mode, the smart key remains valid indefinitely after binding to the electronic lock, suitable for scenarios with frequent use by fixed personnel, such as industrial tool cabinets. However, in existing technologies, unbinding permanent binding is complex, requiring administrators to enter an authorization password through the backend system or connect to debugging equipment on-site for unbinding, making it impossible to quickly switch binding states according to usage needs.
[0008] 3. Existing smart cabinet electric locks mainly use two unlocking methods: "controller-side unlocking" and "electric lock-side unlocking." However, most products only support one method, or the two methods cannot work together. Some products that support both unlocking methods have unlocking logic conflicts. For example, after unlocking on the controller side, the electric lock side can still use the same key to unlock again, leading to security risks; or after unlocking on the electric lock side, the controller does not update its status in time, causing the controller to display "unlocked," affecting management statistics.
[0009] 4. Existing products have a single unlocking mode, with most only supporting a "single unlock" mode and lacking the function of switching between "empty mode" and "non-empty mode". For example, express delivery lockers need to automatically unbind after unlocking (empty mode), while tool cabinets need to remain bound after unlocking (non-empty mode). Existing products require different customized control programs, resulting in poor versatility and increased R&D and production costs.
[0010] 5. Communication Mechanism: RS485 bus conflicts are frequent, scalability is poor, bus preemption is disordered, coordination of multiple communication modes is poor, and long-distance transmission stability is insufficient; Control Method: Binding and unbinding mechanisms are rigid, unlocking methods lack flexibility and redundancy design, mode settings conflict with front-end operations, and status synchronization and data traceability are incomplete; Control System: Component function allocation is unreasonable, hardware design lacks redundancy and fault tolerance, and system scalability is poor.
[0011] In summary, these pain points prevent existing smart cabinet electric lockers from meeting the needs of various scenarios in terms of ease of use, management flexibility, system stability, and security, thus limiting the further development of the smart cabinet industry. Therefore, there is an urgent need to propose a stable communication mechanism, control method, and control system for smart cabinet electric lockers that is flexible in control and has a reasonable structure to address the shortcomings of existing technologies. Summary of the Invention
[0012] To overcome the above-mentioned shortcomings of the prior art, the present invention provides a communication mechanism and control method for an intelligent cabinet electronic lock.
[0013] The technical solution of this invention to solve its technical problem is: a communication mechanism and control method for an intelligent cabinet electric lock, comprising:
[0014] T1. Initial Unlocking and Smart Key Binding: When a user selects an electric lock, they must first swipe their card on the controller. The controller reads the key identity information of the current smart key and binds it to the selected electric lock, thus completing the initial unlocking action. Subsequent operations and settings of the electric lock, as well as the lock opening and closing status information, are all synchronously saved to the controller. The controller then synchronizes the relevant information to the backend system to complete the entire binding process.
[0015] T2. Controller-side unlocking: The controller sends an on / off lock command to the lock control board. The lock control board parses the on / off lock command and then sends the corresponding on / off lock command to the electric lock. The electric lock executes the corresponding action in the on / off lock command and reports the execution result and on / off lock status to the lock control board. The lock control board updates and saves the on / off lock status and result reported by the electric lock and reports it to the controller synchronously. The controller receives the result and on / off lock status reported by the lock control board.
[0016] T3. Unlocking via electronic lock: When the smart key is brought close to the bound electronic lock, the electronic lock reads the key's identity information and compares and analyzes it. If the key's identity information matches the key's identity information currently stored in the lock, the lock will unlock directly. After successful unlocking, the unlocking result and key identity information are reported to the lock control board according to the current mode. The lock control board simultaneously reports the key's identity information to the controller. The controller selects whether to clear the key's identity information based on the unlocking mode and updates the lock / unlock status.
[0017] T4. Mode and System Settings: It is necessary to log in to the back-end system associated with the controller. The back-end system sends setting command packets through the controller. After receiving the setting command packets, the lock control board parses and saves the corresponding mode and system setting parameters.
[0018] During the setup process of logging into the backend system, downward queries are paused, and card swiping operations cannot be performed on the electric lock during this process.
[0019] The unlocking mode includes at least a clearing mode and a non-clearing mode. In the clearing mode, after unlocking by swiping a card through the controller, the key identity information of the electric lock is unbound from the corresponding smart key. In the non-clearing mode, after unlocking by swiping a card through the controller, the key identity information of the electric lock remains bound to the corresponding smart key.
[0020] T5. Unbinding the electric lock: After unlocking via the electric lock terminal, the electric lock cannot be released, and the smart key remains bound to the current electric lock after the lock is opened and closed.
[0021] When the device is in clearing mode and unlocked via the controller, the electric lock is released after the item is retrieved, thus unbinding the smart key from the current electric lock.
[0022] The above technical solution is further configured as follows: In mode T4, when the user-selected electric lock is idle, a card is swiped at the controller, the controller sends the key identity information to the lock control board, the lock control board synchronously transmits the key identity information to the corresponding electric lock, and the electric lock saves the corresponding key identity information; when the door is idle, when a card is swiped at the electric lock, the electric lock saves the key identity information and uploads it to the lock control board, and the lock control board synchronously uploads the key identity information to the controller for saving.
[0023] The above technical solution is further configured as follows: In mode T2, when the controller swipes a card to unlock, it sends an unlocking command with key identity information to the lock control board. The lock control board then sends the corresponding unlocking command to the electric lock. When the electric lock successfully unlocks, it needs to select whether to clear the key identity information of the current smart key according to the unlocking type mode sent by the controller, and then send the unlocking result back to the lock control board. The lock control board then uploads the unlocking result to the controller.
[0024] The above technical solution is further configured as follows: In mode T3, when the electronic lock is unlocked by swiping a card, after successful unlocking, the user selects whether to clear the key identity information of the current smart key according to the unlocking type mode issued by the controller, and then feeds back the unlocking result and lock / unlock status to the lock control board. The lock control board uploads the unlocking result and lock / unlock status to the controller, and the controller updates the lock / unlock status according to the information uploaded by the lock control board.
[0025] The above technical solution is further configured as follows: Controller and lock control board communication: The controller and lock control board communicate via RS485 bus. The controller periodically sends query packets and sequentially polls the status of all connected lock control boards. If an unlocking request is received from a lock control board port, the periodic query is stopped first, and an unlocking command is sent. After receiving the unlocking result from the lock control board, the periodic query is restarted.
[0026] Communication between the lock control board and the electric lock: The lock control board broadcasts query packets via the RS485 protocol. When the electric lock recognizes the smart key and unlocks, it will temporarily preempt the RS485 communication bus. The electric lock will also temporarily preempt the RS485 communication bus when it sends the unlocking result and lock / unlock status to the lock control board. When the RS485 communication bus is idle, the electric lock will report the key identity information of the smart key and the unlocking request to the lock control board.
[0027] The above technical solution is further configured as follows: the controller and the lock control board adopt a master-slave communication mode, wherein the controller is the master and the multiple lock control boards connected in series are slaves;
[0028] When the controller is in transmit mode, it broadcasts commands to the lock control boards via the RS485 protocol. Commands are sent to all lock control boards on the RS485 communication bus or to a specific lock control board. When sending commands to all lock control boards, each board receives and processes the command. When sending commands to a specific lock control board, the command packet contains the address of the target lock control board; only the corresponding lock control board will receive and process the command.
[0029] When the controller is in receive mode, all lock control boards on the RS485 communication bus will send response data to the controller in sequence according to a predetermined mechanism, and implement a bus contention mechanism. The bus contention mechanism only allows the controller to actively send messages. Only when the controller queries the lock control board can the lock control board send a message to the controller within a specified time. Each lock control board is divided into time periods, and only one corresponding lock control board sends a message to the controller within a specific time period.
[0030] This invention also provides a control system for an intelligent cabinet electric lock, used to implement the communication mechanism and control method of the intelligent cabinet electric lock, including:
[0031] The controller, which is configured in the smart cabinet, has an independent first key recognition chip;
[0032] The back-end system communicates with the controller, and the back-end system and the controller exchange information.
[0033] The lock control board is connected to the controller, and the controller interacts with multiple lock control boards. Each lock control board is connected to one or more electric locks and interacts with them.
[0034] An electric lock is connected to a lock control board. Each electric lock has a unique address and an independent second key identification chip.
[0035] The smart key is capable of communicating with both the first key recognition chip and the second key recognition chip.
[0036] A power supply is used to provide electrical energy to various components.
[0037] The lock control panel and / or the electric lock integrate a lighting module, which is capable of displaying at least one of a first color and a second color.
[0038] The above technical solution is further configured as follows: each controller communicates with multiple lock control boards via RS485 bus to achieve bidirectional information interaction, and each lock control board communicates with multiple associated electric locks via RS485 bus to achieve bidirectional information interaction.
[0039] A further provision of the above technical solution is that the smart key adopts any one or more of the following: smart card key, mobile smart device key, remote control key, biometric key, and password key.
[0040] The beneficial effects of this invention are as follows:
[0041] I. Flexible Control for Multiple Scenarios: Supports two unlocking methods, one from the controller and one from the electric lock, meeting the needs of administrators and users for convenient operation; the clearing mode and non-clearing mode can be flexibly switched to adapt to different scenarios such as express cabinets (single-use) and tool cabinets (reusable); the binding and first unlocking are integrated, the unbinding logic is clear, and the operation is convenient.
[0042] II. Significantly Improved Communication Stability: The adoption of a three-tier architecture of "controller-lock control board-electric lock" reduces bus load; a bus management mechanism of timed polling + emergency preemption is designed to resolve multi-node communication conflicts; standardized instruction packet format and format verification reduce the bit error rate and greatly improve the communication success rate.
[0043] III. Strong System Reliability and Fault Tolerance: Binding data and status information are redundantly stored in the controller, lock control board, and electric lock, supporting offline unlocking and status recording when communication is interrupted; the controller and lock control board adopt a master-slave mode, and the failure of a single lock control board will not affect the operation of other devices; the power module has multiple protection functions to avoid data loss in the event of a sudden power outage.
[0044] IV. High security and traceability: The smart key uses a unique identification code + encryption verification to prevent copying and misuse; all operations (binding, unlocking, unbinding, parameter configuration) are logged, including information such as the operator, time, device, and result, and the logs are permanently stored; the backend system supports hierarchical permission management to prevent unauthorized operations.
[0045] V. High scalability to adapt to different scale requirements: The lock control board supports the expansion of multiple (e.g., 1-24) electric locks, and the controller supports cascading of 16 lock control boards, which can be adapted to smart cabinets from single cabinets (1-16 compartments) to large clusters (196 compartments or more); it supports the expansion of multiple smart key types and communication methods, and has strong compatibility.
[0046] VI. Improved User Experience and Management Efficiency: The electric lock is equipped with a light module to intuitively display the working status; the back-end system supports remote monitoring, batch configuration, and data statistics, reducing manual intervention; the unlocking response speed is fast, reducing the unlocking delay on the controller side, and also reducing the unlocking delay on the electric lock side. Attached Figure Description
[0047] Figure 1 This is a system application framework diagram of the present invention.
[0048] Figure 2This is a hardware block diagram of the present invention.
[0049] Figure 3 This is a flowchart of the control method T1 in this invention.
[0050] Figure 4 This is a flowchart of control method T2 in this invention.
[0051] Figure 5 This is a flowchart of control method T3 in this invention.
[0052] Figure 6 This is a flowchart of control method T4 in this invention.
[0053] Figure 7 This is a flowchart of control method T5 in this invention.
[0054] In the diagram: 1. Controller; 2. Backend system; 3. Lock control board; 4. Electric lock; 5. Smart key; 6. Power supply; 7. Lighting module. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] Example 1
[0057] Reference Figures 1 to 7 The communication mechanism and control method of the smart cabinet electric lock described in this invention uses RS485 bus as the core communication carrier to build a three-level communication architecture of "controller-lock control board-electric lock". It realizes the binding, unlocking, mode setting and unbinding functions of smart key and electric lock through five core modes (T1-T5). At the same time, an optimized bus management mechanism is designed to ensure stable communication and precise control.
[0058] The core logic of the control method in this invention is as follows: the smart key and the electric lock are bound together through the first unlocking action, establishing a two-way identity authentication basis; two unlocking methods are supported, one on the controller side and one on the electric lock side, to meet the operational needs of different scenarios; a clearing mode and a non-clearing mode are set to achieve flexible switching of the binding state; the mode and system parameters are uniformly managed through the back-end system, and conflicting front-end operations are suspended during the setting period; the unbinding trigger conditions are clearly defined to ensure that key management is safe and controllable.
[0059] Specifically, a communication mechanism and control method for an intelligent cabinet electronic lock 4 includes:
[0060] T1. Initial unlocking and binding of smart key 5 (this is the basis for establishing a connection between smart key 5 and the electronic lock 4, ensuring the legitimacy of identity for subsequent operations), refer to... Figure 3 :
[0061] The user selects the electronic lock 4, which must be in an idle state (not bound to any other smart key 5);
[0062] First, a card must be swiped at the controller 1 terminal. The controller 1 terminal reads the key identity information of the current smart key 5 and binds it to the selected electric lock 4, thus completing the first unlocking action. Specifically, the user brings the smart key 5 close to the first key recognition chip at the controller 1 terminal. The controller 1 reads the key identity information of the smart key 5 (including a unique identification code, encryption verification code, etc.) through the first key recognition chip. The controller 1 associates and binds the read key identity information with the address of the electric lock 4 selected by the user, generating binding relationship data (including key ID, electric lock 4 address, binding time, initial mode, etc.). The controller 1 sends an initial unlocking command to the corresponding lock control board 3. This command includes the key identity information, the address of the electric lock 4, and unlocking permissions. After parsing the unlocking command, the lock control board 3 forwards the unlocking signal to the target electric lock 4. The electric lock 4 executes the unlocking action, completing the first unlocking.
[0063] Subsequent operations and settings information, as well as lock status information, for the electric lock 4 are all synchronously saved to the controller 1. Specifically: after the electric lock 4 successfully unlocks, it sends its own address, key identity information, and unlocking result (success / failure) back to the lock control board 3; the lock control board 3 stores the binding relationship data and unlocking result, and synchronously reports it to the controller 1; the controller 1 updates the locally stored binding relationship, unlocking status, and operation records, and synchronizes the relevant information to the backend system 2, completing the entire binding process.
[0064] The core advantage of this mode is that the binding action and the first unlocking action are integrated, requiring no additional operation and improving the user experience; the binding data is stored simultaneously in controller 1, lock control board 3 and electric lock 4 (for models that support local storage), realizing data redundancy backup, and the subsequent unlocking operation of electric lock 4 is not affected when communication is interrupted.
[0065] T2, Controller 1 unlocking (primarily supports users initiating unlocking requests through Controller 1, suitable for scenarios such as batch unlocking by administrators and remote authorized unlocking), refer to Figure 4 :
[0066] The user (or administrator) initiates the unlocking operation at the controller 1, including selecting the target electric lock 4 and verifying identity (swiping card, entering password, etc.);
[0067] After verifying the user's identity, controller 1 generates a lock / unlock command based on the current mode (clear mode / non-clear mode). This command includes parameters such as key identity information, electric lock 4 address, unlocking mode, and command validity period.
[0068] The controller 1 sends the lock opening and closing command to the lock control board 3. Generally, the controller 1 communicates via RS485 bus. After parsing the lock opening and closing command, the lock control board 3 sends the corresponding lock opening and closing command to the electric lock 4. The electric lock 4 executes the corresponding action in the lock opening and closing command and reports the execution result and lock opening and closing status to the lock control board 3.
[0069] Lock control board 3 updates and saves the lock / unlock status and results reported by electric lock 4 and synchronously reports them to controller 1. Controller 1 receives the results and lock / unlock status reported by lock control board 3, updates its local status record, and synchronizes it to the background system 2. If the current mode is clear, controller 1 triggers the unbinding logic and subsequently performs the unbinding operation of electric lock 4.
[0070] In T2 mode, the lock and unlock commands issued by controller 1 are preferably in encrypted format to prevent the commands from being tampered with; the electric lock 4 adds a local authentication step to improve unlocking security; the execution results are fed back bidirectionally to ensure accurate state synchronization.
[0071] Optionally, in mode T2, when the controller 1 unlocks the door by swiping a card, it sends an unlocking command with key identity information to the lock control board 3. The lock control board 3 then sends the corresponding unlocking command to the electric lock 4. When the electric lock 4 successfully unlocks, it needs to select whether to clear the key identity information of the current smart key 5 according to the unlocking type mode sent by the controller 1, and then send the unlocking result back to the lock control board 3. The lock control board 3 then uploads the unlocking result to the controller 1.
[0072] T3, 4-terminal unlocking of the electronic lock (mainly supports users to directly initiate unlocking requests from the 4 terminals of the electronic lock, suitable for scenarios such as quick retrieval of items at close range and temporary unlocking), refer to Figure 5 :
[0073] Bring the smart key 5 close to the bound electric lock 4, and the smart key 5 has been bound to the electric lock 4 beforehand;
[0074] The electric lock 4 reads the key identity information of the smart key 5 through the second key recognition chip;
[0075] The electronic lock 4 calls the locally stored binding relationship data to compare and parse the read key identity information (including unique identification code verification, encrypted verification code verification, etc.); if the identity information matches, the electronic lock 4 performs the unlocking action according to the current mode (clear mode / non-clear mode); if the comparison does not match, it refuses to unlock and issues a warning signal through the light module 7.
[0076] After successful unlocking, the unlocking result and key identity information are reported to the lock control board 3 according to the current mode. After receiving the data, the lock control board 3 updates the locally stored status information and reports it to the controller 1. After receiving the reported data, the controller 1 updates the global status record and synchronizes it to the background system 2. It should be noted that the controller 1 selects whether to clear the key identity information (whether it is in clear mode) according to the unlocking mode. If the current mode is clear mode, the controller 1 determines whether to trigger the unbinding logic based on the unlocking result.
[0077] It is worth mentioning that, since there are multiple electric locks 4 in the smart cabinet, when executing T3 mode, the electric lock 4 needs to check the RS485 bus status. If the bus is idle, it directly reports the above data to the lock control board 3; if the bus is busy, it temporarily preempts the bus resources to complete the data reporting (the preemption time does not exceed 50ms to avoid affecting other communications).
[0078] The core advantages of the T3 mode are: the four terminals of the electric lock achieve independent authentication and unlocking control, without relying on the controller 1 for real-time communication, and support offline unlocking; the bus preemption mechanism ensures that the unlocking result is reported in a timely manner, avoiding state synchronization delay.
[0079] Optionally, in mode T3, when the electronic lock 4 is unlocked by swiping a card, after successful unlocking, the system selects whether to clear the key identity information of the current smart key 5 according to the unlocking type mode issued by the controller 1, and then sends the unlocking result and lock / unlock status back to the lock control board 3. The lock control board 3 uploads the unlocking result and lock / unlock status to the controller 1, and the controller 1 updates the lock / unlock status according to the information uploaded by the lock control board 3.
[0080] T4, Mode and System Settings (Supports administrators to configure unlocking modes and system parameters through the backend system 2, enabling refined management of the smart locker), refer to Figure 6 :
[0081] You need to log in to the backend system 2 associated with controller 1. After the backend system 2 verifies that the login permission is valid, you will enter the mode and system settings interface.
[0082] The administrator configures relevant parameters, including unlocking type mode (clear mode / non-clear mode), communication parameters (baud rate, polling cycle, etc.), status reporting frequency, unlocking permission restrictions, and light indication rules. After the administrator confirms the configuration, the backend system 2 generates a setting instruction package. This instruction package contains configuration parameters, effective time, target device (controller 1 / lock control board 3 / electric lock 4) address, and other information. The instruction package is encrypted, and the backend system 2 sends the setting instruction package through controller 1.
[0083] After receiving the instruction packet, controller 1 pauses sending timed query packets to lock control board 3 (to avoid instruction conflicts) and forwards the setting instruction packet to the target lock control board 3;
[0084] After receiving the command packet, the lock control board 3 parses the configuration parameters, updates the local system settings, and forwards relevant parameters (such as unlocking mode, lighting rules, etc.) to the associated electric lock 4. After receiving the parameters, the electric lock 4 updates its local configuration and saves it, and sends the configuration effect result back to the lock control board 3. The lock control board 3 summarizes the configuration results of all electric locks 4 and reports them to the controller 1. The controller 1 updates the local system parameters, sends the configuration completion status back to the background system 2, and the background system 2 records the configuration log. After the configuration is completed, the controller 1 resumes the periodic query packet distribution, and the system resumes normal operation.
[0085] It should be noted that during the setup process of logging into the backend system 2, downward queries are paused, and card swiping operations cannot be performed on the electric lock 4 during this process.
[0086] It should be emphasized that the unlocking type modes include at least a clearing mode and a non-clearing mode. In the clearing mode, after unlocking by swiping a card through the controller 1, the key identity information of the electric lock 4 and the corresponding smart key 5 are unbound. In the non-clearing mode, after unlocking by swiping a card through the controller 1, the key identity information of the electric lock 4 and the corresponding smart key 5 remain bound.
[0087] The key design features of T4 mode are: during the setup period, the controller 1 is paused from querying downwards, and card swiping operations at the four ends of the electric lock are prohibited to avoid conflicts between parameter configuration and front-end operations; the setting instruction packet is transmitted in encrypted form and includes the effective time to prevent the instruction from being maliciously intercepted or repeatedly executed; batch configuration and individual configuration are supported, and administrators can choose to set parameters for all devices or specified devices as needed.
[0088] Preferably, in mode T4, when the user-selected electric lock 4 is idle, a card is swiped from the controller 1, and the controller 1 sends the key identity information to the lock control board 3. The lock control board 3 then simultaneously transmits the key identity information to the corresponding electric lock 4, and the electric lock 4 saves the corresponding key identity information. When the door is idle, when a card is swiped from the electric lock 4, the electric lock 4 saves the key identity information and uploads it to the lock control board 3. The lock control board 3 then simultaneously uploads the key identity information to the controller 1 for storage.
[0089] T5, Unbinding of Electric Lock 4 (Clearly define the triggering conditions and execution process for unbinding to ensure secure and controllable key management), refer to Figure 7 :
[0090] After unlocking via the electronic lock 4 terminal, the electronic lock 4 cannot be released, and the smart key 5 remains bound to the current electronic lock 4 after the lock is opened and closed. When in clear mode and unlocked via the controller 1 terminal, the electronic lock 4 is released after the item is retrieved, thus unbinding the smart key 5 from the current electronic lock 4. The administrator can issue a manual unbinding command through the backend system 2 to specify the target electronic lock 4 and smart key 5 for unbinding. In more detail:
[0091] Automatic unbinding execution process (if in clear mode): a) After the controller 1 successfully unlocks, the electric lock 4 detects the closed status of the cabinet door; b) After the cabinet door is closed and remains stable, the electric lock 4 sends an unbinding request to the lock control board 3, along with the key identification information and the address of the electric lock 4; c) After receiving the request, the lock control board 3 deletes the locally stored binding relationship data and forwards the unbinding request to the controller 1; d) The controller 1 deletes the local binding relationship, updates the status of the electric lock 4 to "idle", and synchronizes it to the background system 2; e) The background system 2 records the unbinding log and completes the automatic unbinding.
[0092] Manual unbinding execution process (e.g., through backend system 2): a) The administrator initiates a manual unbinding operation in backend system 2, specifying the target electric lock 4 address and smart key 5 ID; b) Backend system 2 generates a manual unbinding command and sends it to controller 1; c) Controller 1 forwards the unbinding command to the corresponding lock control board 3; d) Lock control board 3 sends an unbinding signal to the target electric lock 4, electric lock 4 deletes the local binding relationship, and reports the unbinding result; e) Lock control board 3 and controller 1 update their status sequentially and synchronize with backend system 2, completing the manual unbinding.
[0093] Example 2
[0094] In this invention, regarding the selection of communication protocol and bus management mechanism, the RS485 bus is preferably used as the core communication carrier. An optimized communication protocol and bus management mechanism are designed to solve problems such as communication conflicts and transmission delays in existing technologies. (Refer to...) Figures 1-2 The details are as follows:
[0095] I. Communication between controller 1 and lock control board 3:
[0096] Communication method: Controller 1 and lock control board 3 achieve bidirectional information exchange through RS485 bus, using differential signal transmission, which has strong anti-interference ability;
[0097] Communication mode: One master and multiple slave modes are adopted, with controller 1 as the master and multiple series-connected lock control boards 3 as slaves;
[0098] Command issuance methods: Controller 1 issues commands in two categories: broadcast commands and designated commands.
[0099] a) Broadcast command: Send to all lock control boards 3 on the bus (e.g., unified configuration of system parameters), and each lock control board 3 receives and processes it;
[0100] b) Designated instruction: The instruction packet carries the unique address of the target lock control board 3, which is only received and processed by the corresponding lock control board 3, and ignored by other lock control boards 3;
[0101] Periodic query mechanism: Controller 1 periodically sends out query packets (the polling period can be set in the background, for example, 100ms) to sequentially poll the status of all lock control boards 3;
[0102] Conflict handling mechanism: If controller 1 receives an unlocking request or status report from a lock control board 3 during the polling process, it immediately stops the timed query, prioritizes the processing of the request, and resumes polling after receiving feedback to ensure that emergency commands are executed first.
[0103] II. Communication between lock control board 3 and electric lock 4:
[0104] Communication method: The lock control board 3 communicates with the electric lock 4 via RS485 bus, supporting a single lock control board 3 to connect to multiple (e.g., 1-24) electric locks 4 (expandable as needed);
[0105] Query mechanism: Lock control board 3 broadcasts query packets via RS485 protocol (default period 50ms) to obtain the status of all associated electric locks 4;
[0106] Bus preemption mechanism: When the electric lock 4 recognizes the smart key 5 and unlocks, if it needs to report data but the bus is busy, it can temporarily preempt the RS485 communication bus (the preemption priority is higher than the query packet of the lock control board 3). The preemption time is limited to 50ms to avoid occupying the bus for a long time.
[0107] Data reporting timing: The electric lock 4 prioritizes reporting key identity information and unlocking requests when the RS485 communication bus is idle, to ensure data transmission success rate.
[0108] III. Bus contention mechanism (to avoid conflicts caused by multiple slave devices reporting data simultaneously):
[0109] The controller 1 and the lock control board 3 adopt a master-slave communication mode, where the controller 1 is the master and the multiple serially connected lock control boards 3 are slaves, sending messages only when the controller 1 queries or grants permission. A fixed response time period (default 10ms) is allocated to each lock control board 3. When the controller 1 polls the corresponding lock control board 3, the lock control board 3 sends response data within the specified time period. The data reported by the electric lock 4 needs to be summarized by the lock control board 3 and reported uniformly within the response time period of the lock control board 3 to avoid conflicts caused by the electric lock 4 directly occupying the bus. Emergency data (such as unlocking failure alarm, equipment failure) is identified by priority. The controller 1 processes it first after receiving it to shorten the response time.
[0110] When controller 1 is in transmit mode, during communication, controller 1 sends instructions to lock control board 3 via RS485 protocol in a broadcast manner. The instruction sending is divided into sending to all lock control boards 3 on the RS485 communication bus and sending to a specific lock control board 3. When sending instructions to all lock control boards 3, each lock control board 3 will receive and process the instructions sent by controller 1. When sending instructions to a specific lock control board 3, the instruction packet will contain the address of the target lock control board 3, and only the corresponding lock control board 3 will receive and process the instructions.
[0111] When controller 1 is in receive mode, all lock control boards 3 on the RS485 communication bus will send response data to controller 1 in sequence according to the established mechanism, and implement a bus contention mechanism. The bus contention mechanism only allows controller 1 to actively send messages. Only when controller 1 queries lock control board 3 can lock control board 3 send messages to controller 1 within a specified time. Each lock control board 3 is divided into time periods, and only one corresponding lock control board 3 sends a message to controller 1 within a specific time period.
[0112] Application instructions for bus contention and preemption mechanism: 1. When the electric lock unlocks at terminal 4, if data needs to be reported, the idle status of the RS485 bus is first checked (by checking whether the bus level is stable); 2. If the bus is idle, the electric lock 4 immediately sends a report command packet and releases the bus after sending; 3. If the bus is busy (e.g., the lock control board 3 is sending a query packet), the electric lock 4 waits for the bus to be idle. If the waiting time exceeds a preset value (e.g., 50ms), the bus preemption mechanism is triggered: a) The electric lock 4 sends a bus preemption request signal; b) After receiving the preemption request, the lock control board 3 pauses the current query packet transmission and releases the bus; c) The electric lock 4 completes data reporting within 50ms after successful preemption; d) After reporting is completed, the lock control board 3 resumes the previous query process.
[0113] Example 3
[0114] This embodiment provides a control system for an intelligent cabinet electric lock 4, used to implement the communication mechanism and control method of the intelligent cabinet electric lock 4, referring to... Figures 1-2 This includes:
[0115] Controller 1, configured within the smart cabinet, has the following core functions: reading the identity information of smart key 5, processing binding and unbinding logic, issuing lock / unlock commands, managing RS485 bus communication, storing operation records and status data, and interacting with the backend system 2. Controller 1 has an independent first key recognition chip. Controller 1 also integrates a main control chip, storage module, display module, input module, etc., which are not specifically limited here.
[0116] The backend system 2 communicates with the controller 1 and supports local server deployment or cloud deployment (without special restrictions). The backend system 2 and the controller 1 realize information interaction. The core functions of the backend system 2 are user permission management, mode and system parameter configuration, device status monitoring, operation log query, data statistical analysis, and remote control command issuance.
[0117] Lock control board 3, which communicates with controller 1, is configured in the column control area of the intelligent cabinet (e.g., one board per column). Each lock control board 3 can connect to up to N electric locks 4. Controller 1 interacts with multiple lock control boards 3, and each lock control board 3 communicates with one or more electric locks 4 to achieve information exchange. The core functions of lock control board 3 are: receiving commands from controller 1 and forwarding them to electric locks 4; receiving feedback data from electric locks 4 and reporting it to controller 1; locally storing binding relationships and status data; and achieving bus load balancing.
[0118] An electric lock 4, which is communicatively connected to the lock control board 3, is configured in each storage compartment of the smart cabinet (one lock 4 per compartment). Each electric lock 4 has a unique address and an independent second key identification chip. The core functions of the electric lock 4 are: receiving commands from the lock control board 3 and executing locking / unlocking actions; reading and locally verifying the identity information of the smart key 5; detecting the cabinet door status; displaying the working status via the light module 7; and storing binding relationship data.
[0119] The smart key 5 can communicate with both the first and second key recognition chips. The smart key 5 can employ one or more of the following: smart card key, mobile smart device key (phone / bracelet / watch, etc., NFC / Bluetooth), remote control key, biometric key (fingerprint / face recognition), and password key, selectable according to the application scenario. The core feature of the smart key 5 is that it must possess unique key identity information (ID).
[0120] Power supply 6 provides power to controller 1, lock control board 3, and electric lock 4, supporting centralized or distributed power supply. Power supply 6 can be a built-in power supply in the smart cabinet or can be connected to an external power supply 6 via wiring harness; no special restrictions are imposed here.
[0121] In the above, each controller 1 communicates with multiple lock control boards 3 via RS485 bus to achieve bidirectional information exchange, and each lock control board 3 communicates with multiple associated electric locks 4 via RS485 bus to achieve bidirectional information exchange.
[0122] Preferably, the lock control panel 3 and / or the electric lock 4 integrates a lighting module 7, which can display at least one of a first color and a second color. During use, when the lighting module 7 displays the first color, it indicates that the electric lock 4 is currently bound; when the lighting module 7 displays the second color, it indicates that the electric lock 4 is currently unbound. Extending this further, it allows users to visually observe whether each electric lock 4 (cabinet) is occupied through color, and then quickly select the desired electric lock 4 (cabinet) according to their needs. Optionally, the lighting module 7 may also have other modes, such as a flashing mode, to indicate the presence of a fault indicator function, which is not specifically limited here.
[0123] The above description is merely a preferred embodiment of the present invention and does not constitute any limitation on the present invention. Any simple modifications, alterations, or equivalent structural changes made to the above embodiments based on the technical essence of the invention shall still fall within the protection scope of the present invention.
Claims
1. A communication mechanism and control method for an intelligent cabinet electronic lock, characterized in that, Including: T1. First unlocking and smart key (5) binding: When the user selects the electric lock (4), he must first swipe his card at the controller (1) end. The controller (1) end reads the key identity information of the current smart key (5) and binds it to the selected electric lock (4), and realizes the first unlocking action. The subsequent operation and setting information of the electric lock (4) and the lock opening and closing status information are all saved to the controller (1) in sync. The controller (1) synchronizes the relevant information to the background system (2) to complete the entire binding process. T2, Controller (1) unlocking: The controller (1) sends the lock opening and closing command to the lock control board (3). The lock control board (3) parses the lock opening and closing command and then sends the corresponding lock opening and closing command to the electric lock (4). The electric lock (4) executes the corresponding action in the lock opening and closing command and reports the execution result and lock opening and closing status to the lock control board (3). The lock control board (3) updates and saves the lock opening and closing status and result reported by the electric lock (4) and reports it to the controller (1) synchronously. The controller (1) receives the result and lock opening and closing status reported by the lock control board (3). T3, Unlocking the electric lock (4): Bring the smart key (5) close to the bound electric lock (4). After the electric lock (4) reads the key identity information, it compares and analyzes the key identity information. If the key identity information is consistent with the key identity information currently stored in the lock, it will unlock directly. After successful unlocking, the unlocking result and key identity information are reported to the lock control board (3) according to the current mode. The lock control board (3) synchronously reports the key identity information to the controller (1). The controller (1) selects whether to clear the key identity information according to the unlocking mode and updates the lock opening and closing status. T4. Mode and System Settings: It is necessary to log in to the back-end system (2) associated with the controller (1). The back-end system (2) sends a setting instruction package through the controller (1). After receiving the setting instruction package, the lock control board (3) parses and saves the corresponding mode and system setting parameters. During the setup of the login backend system (2), the downward query is paused, and the card swiping operation cannot be performed on the electric lock (4) during this process; The unlocking type modes include at least a clearing mode and a non-clearing mode; in the clearing mode, after unlocking by swiping a card through the controller (1), the key identity information of the electric lock (4) and the corresponding smart key (5) is unbound; in the non-clearing mode, after unlocking by swiping a card through the controller (1), the key identity information of the electric lock (4) and the corresponding smart key (5) remains bound. T5, Unbinding of electric lock (4): After unlocking through the electric lock (4), the electric lock (4) cannot be released, and the smart key (5) remains bound to the current electric lock (4) after the lock is opened and closed; When in clear mode and unlocked via controller (1), the electric lock (4) is released after the item is retrieved, thus unbinding the smart key (5) from the current electric lock (4).
2. The communication mechanism and control method of the intelligent cabinet electric lock according to claim 1, characterized in that: In T4, when the user selects an electric lock (4) and it is idle, the user swipes a card from the controller (1), and the controller (1) sends the key identity information to the lock control board (3). The lock control board (3) then transmits the key identity information to the corresponding electric lock (4), and the electric lock (4) saves the corresponding key identity information. When the door is idle, the user swipes a card from the electric lock (4), and the electric lock (4) saves the key identity information and uploads it to the lock control board (3). The lock control board (3) then uploads the key identity information to the controller (1) for saving.
3. The communication mechanism and control method of the intelligent cabinet electric lock according to claim 1, characterized in that: In T2, when the controller (1) swipes the card to unlock, it sends an unlocking command with key identity information to the lock control board (3). The lock control board (3) sends the corresponding unlocking command to the electric lock (4). When the electric lock (4) unlocks successfully, the electric lock (4) needs to select whether to clear the key identity information of the current smart key (5) according to the unlocking type mode sent by the controller (1), and then send the unlocking result back to the lock control board (3). The lock control board (3) then uploads the unlocking result to the controller (1).
4. The communication mechanism and control method of the intelligent cabinet electric lock according to claim 1, characterized in that: In T3, when the electric lock (4) is unlocked by swiping a card, after successful unlocking, it selects whether to clear the key identity information of the current smart key (5) according to the unlocking type mode issued by the controller (1), and then sends the unlocking result and lock status back to the lock control board (3). The lock control board (3) uploads the unlocking result and lock status to the controller (1), and the controller (1) updates the lock status according to the information uploaded by the lock control board (3).
5. The communication mechanism and control method of the intelligent cabinet electric lock according to claim 1, characterized in that: Communication between controller (1) and lock control board (3): Controller (1) and lock control board (3) communicate via RS485 bus. Controller (1) sends out query packets periodically and polls the status of all connected lock control boards (3) in turn. If a lock control board (3) port unlocking request is received, the periodic query is stopped first and an unlocking command is sent. After receiving the unlocking result from the lock control board (3), the periodic query is restarted. Communication between the lock control board (3) and the electric lock (4): The lock control board (3) broadcasts a query packet via the RS485 protocol. When the electric lock (4) recognizes the smart key (5) and unlocks, it will temporarily occupy the RS485 communication bus. The electric lock (4) will also temporarily occupy the RS485 communication bus when it sends the unlocking result and lock / unlock status to the lock control board (3). When the RS485 communication bus is idle, the electric lock (4) will report the key identity information of the smart key (5) and the unlocking request to the lock control board (3).
6. The communication mechanism and control method of the intelligent cabinet electric lock according to claim 1, characterized in that: The controller (1) and the lock control board (3) adopt a master-slave communication mode, wherein the controller (1) is the master and the multiple lock control boards (3) connected in series are slaves; When the controller (1) is in the sending mode, during communication, the controller (1) sends instructions to the lock control board (3) via RS485 protocol in a broadcast manner. The instructions are sent to all lock control boards (3) on the RS485 communication bus and to a specific lock control board (3). When sending instructions to all lock control boards (3), each lock control board (3) will receive and process the instructions sent by the controller (1). When sending instructions to a specific lock control board (3), the instruction packet will contain the address of the target lock control board (3), and only the corresponding lock control board (3) will receive and process the instructions. When the controller (1) is in receiving mode, all lock control boards (3) on the RS485 communication bus will send response data to the controller (1) in sequence according to the established mechanism and implement the bus competition mechanism. The bus competition mechanism only allows the controller (1) to actively send messages. Only when the controller (1) queries the lock control board (3) can the lock control board (3) send a message to the controller (1) within a specified time. Each lock control board (3) is divided into time periods, and only one corresponding lock control board (3) sends a message to the controller (1) within a specific time period.
7. A control system for an intelligent cabinet electric lock (4), used to implement the communication mechanism and control method of the intelligent cabinet electric lock as described in any one of claims 1-6, characterized in that, Including: The controller (1) is configured in the smart cabinet and has an independent first key recognition chip; The back-end system (2) is connected to the controller (1) for communication, and information interaction is realized between the back-end system (2) and the controller (1); The lock control board (3) is connected to the controller (1) for communication. The controller (1) interacts with multiple lock control boards (3) respectively, and each lock control board (3) is connected to one or more electric locks (4) for communication and information interaction. An electric lock (4) is connected in communication with a lock control board (3). Each electric lock (4) has a unique address and has an independent second key identification chip. The smart key (5) is capable of communicating with the first key recognition chip and the second key recognition chip respectively; The power supply (6) is used to provide electrical energy to various components.
8. The control system of the intelligent cabinet electric lock (4) according to claim 7, characterized in that: The lock control board (3) and / or the electric lock (4) integrates a lighting module (7), which is capable of displaying at least one of a first color and a second color.
9. The control system of the intelligent cabinet electric lock (4) according to claim 7, characterized in that: Each controller (1) communicates with multiple lock control boards (3) via RS485 bus to achieve bidirectional information interaction, and each lock control board (3) communicates with multiple associated electric locks (4) via RS485 bus to achieve bidirectional information interaction.
10. The control system of the intelligent cabinet electric lock (4) according to claim 7, characterized in that: The smart key (5) mentioned above adopts any one or more of the following: smart card key, mobile smart device key, remote control key, biometric key, and password key.