A cluster verification method, system and storage medium for smart locks
Through joint verification of smart lock local clusters, verification problems caused by smart lock management platform failure or network link failure are solved to ensure that verification services are available and secure.
Patent Information
- Application Number
- CN202510752921.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-06
AI Technical Summary
In the smart lock system, the problem of the failure of the smart lock management platform or the failure of the network link causes the large-area smart lock to be unable to be verified and opened.
When the smart lock management platform is unreachable, through local cluster joint verification, the smart lock broadcasts messages to other smart locks in the permission list, collaboratively calculates verification codes and compares them to ensure that the verification service is available.
When the smart lock management platform is unreachable, local cluster joint verification is used to ensure that the smart lock verification service is available, avoid single point of risk, and ensure verification security.
Smart Images

Figure CN120260170B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart locks, and in particular to a cluster verification method, system and storage medium for smart locks. Background Art
[0002] In the smart lock system, in order to prevent the local smart lock from being hacked and for more convenient centralized management, a smart lock management platform will be used for centralized verification. The smart lock will read the user ID and send it to the smart lock management platform. The smart lock management platform will determine whether the user ID has the authority to open the smart lock, and then notify the smart lock whether to open the door lock.
[0003] However, this centralized management method places very high demands on the reliability of the smart lock management platform. If the smart lock management platform fails or the intermediate network link fails, a large number of smart locks will be unable to be verified and opened.
[0004] To this end, there is an urgent need for a verification solution to solve the situation where the smart lock management platform fails or the intermediate network link fails, resulting in the smart lock and the smart lock management platform being unable to communicate. Summary of the Invention
[0005] The purpose of the embodiment of the present invention is to provide a method for ensuring the availability of smart lock verification services through local cluster joint verification when the smart lock management platform is unreachable, while ensuring the security of verification and avoiding the single point risk of a single smart lock being easily hacked.
[0006] A first aspect of the present invention provides a cluster verification method for a smart lock, the method comprising:
[0007] According to the access permission card read by the first smart lock, if the first smart lock ID is in the permission list and the first smart lock is unreachable from the smart lock management platform, a first message is broadcast to the second smart lock in the permission list; the first message includes the smart lock management platform IP, permission list, and the second smart lock ID; the second smart lock is all other smart locks in the permission list except the first smart lock; the permission list includes user ID, smart lock ID, opening hours, and verification information;
[0008] Check the connection status between the second smart lock and the smart lock management platform according to the first message, and return a second message to the second smart lock; the connection status includes reachable or unreachable; the second message includes the connection status, the second smart lock ID, and the second smart lock IP;
[0009] In response to the connection status in the second message being unreachable, the first smart lock sends a collaborative calculation verification code request to the second smart lock based on the second smart lock IP address; the first smart lock determines the first verification code based on the first smart lock ID and its access time in the permission list; the second smart lock determines the second verification code based on the collaborative calculation verification code request and the second smart lock ID and its access time in the permission list, and returns the second verification code to the first smart lock;
[0010] The first smart lock opens the first smart lock based on the comparison of the first verification code, the second verification code and the verification information.
[0011] Furthermore, before reading the access permission card according to the first smart lock, the method further includes:
[0012] An access permission card is created for the user based on the smart lock management platform; the access permission card stores a permission list; wherein, based on the user ID, smart lock ID, and opening time, verification information corresponding to different smart lock IDs is generated through HASH algorithm calculation; the verification information includes a verification code.
[0013] Furthermore, while creating an access permission card for the user based on the smart lock management platform, the method also includes:
[0014] Generate different encryption keys according to different smart lock IDs and send them to the corresponding smart locks;
[0015] Encrypting the verification information in the permission list according to the encryption key and forming encrypted verification codes respectively;
[0016] The encrypted verification codes are accumulated to form a composite verification code, and the composite verification code is written into the access permission card.
[0017] Furthermore, the collaborative calculation verification code request includes the user ID and the opening time of the first smart lock ID;
[0018] The second smart lock determines the second verification code according to the collaborative calculation verification code request, the second smart lock ID and the opening time in the permission list, and returns the second verification code to the first smart lock, including:
[0019] After receiving the collaborative calculation verification code request, the second smart lock calculates the second verification code through the HASH algorithm based on the user ID, the second smart lock ID and its opening time;
[0020] The second verification code is encrypted based on the encryption key corresponding to the second smart lock ID, the second encrypted verification code is obtained, and sent to the first smart lock.
[0021] Furthermore, the first smart lock determines the first verification code according to the first smart lock ID and its opening time in the permission list, including:
[0022] The first smart lock calculates a first verification code using a HASH algorithm based on the user ID, the first smart lock ID and its opening time;
[0023] The first verification code is encrypted based on the encryption key corresponding to the first smart lock ID to obtain a first encrypted verification code.
[0024] Furthermore, the first smart lock opens the first smart lock according to the comparison of the first verification code, the second verification code and the verification information, including:
[0025] The first smart lock accumulates the first encrypted verification code and the second encrypted verification code to generate a third verification code;
[0026] According to the comparison between the third verification code and the composite verification code, if they are consistent, the verification is passed and the first smart lock is opened.
[0027] In addition, a third aspect of the present invention provides a cluster verification system for a smart lock, the system comprising a reading module, a checking module, a collaboration request module, and a verification module; wherein:
[0028] A reading module is configured to read the access permission card based on the first smart lock. If the first smart lock ID is in the permission list and the first smart lock is unreachable from the smart lock management platform, a first message is broadcast to the second smart lock in the permission list. The first message includes the smart lock management platform IP address, the permission list, and the second smart lock ID. The second smart lock is defined as all other smart locks in the permission list except the first smart lock. The permission list includes the user ID, smart lock ID, opening hours, and verification information.
[0029] A checking module, configured to check the connection status between the second smart lock and the smart lock management platform according to the first message, and return a second message to the second smart lock; the connection status includes reachable or unreachable; the second message includes the connection status, the second smart lock ID, and the second smart lock IP;
[0030] a collaborative request module, configured to, in response to the connection status in the second message being unreachable, cause the first smart lock to send a collaborative calculation verification code request to the second smart lock based on the second smart lock IP; the first smart lock determines the first verification code based on the first smart lock ID and its opening time in the permission list; the second smart lock determines the second verification code based on the collaborative calculation verification code request and the second smart lock ID and its opening time in the permission list, and returns the second verification code to the first smart lock;
[0031] The verification module enables the first smart lock to open the first smart lock according to the first verification code, the second verification code and the verification information.
[0032] Furthermore, the system also includes a creation module for:
[0033] An access permission card is created for the user based on the smart lock management platform; the access permission card stores a permission list; wherein, based on the user ID, smart lock ID, and opening time, verification information corresponding to different smart lock IDs is generated through HASH algorithm calculation; the verification information includes a verification code.
[0034] The process of creating an access permission card for a user based on the smart lock management platform also includes:
[0035] Generate different encryption keys according to different smart lock IDs and send them to the corresponding smart locks;
[0036] Encrypting the verification information in the permission list according to the encryption key and forming encrypted verification codes respectively;
[0037] The encrypted verification codes are accumulated to form a composite verification code, and the composite verification code is written into the access permission card.
[0038] In addition, the third aspect of the present invention provides a storage medium storing a computer program; the program is loaded and executed by a processor to implement the cluster verification method steps of the smart lock as described in the first aspect above.
[0039] In the solution of the present invention, by reading the access permission card according to the first smart lock, if the first smart lock ID is in the permission list and the first smart lock is unreachable from the smart lock management platform, a first message is broadcast to the second smart lock in the permission list; the first message includes the smart lock management platform IP, permission list, and the second smart lock ID; the second smart lock is all other smart locks in the permission list except the first smart lock; the permission list includes user ID, smart lock ID, opening hours, and verification information; the connection status of the second smart lock and the smart lock management platform is checked according to the first message, and a second message is returned to the second smart lock; the connection The connection status includes reachable and unreachable; the second message includes the connection status, the second smart lock ID, and the second smart lock IP; in response to the connection status in the second message being unreachable, the first smart lock sends a collaborative calculation verification code request to the second smart lock based on the second smart lock IP; the first smart lock determines the first verification code based on the first smart lock ID and its opening time in the permission list, and the second smart lock determines the second verification code based on the collaborative calculation verification code request and the second smart lock ID and its opening time in the permission list, and returns it to the first smart lock; the first smart lock opens the first smart lock based on the first verification code, the second verification code, and the verification information. Compared with the prior art, the embodiment of the present application has the following main beneficial effects: when the smart lock management platform is unreachable, the smart lock ensures the availability of the smart lock verification service through local cluster joint verification, while ensuring the security of the verification and avoiding the single point risk of a single smart lock being easily hacked. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 This is a flow chart of a cluster verification method for a smart lock disclosed in an embodiment of the present invention;
[0042] Figure 2 Schematic diagram of the cluster verification system structure of the smart lock disclosed in an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are only for the purpose of describing specific embodiments and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0045] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0046] It should be noted that the “plurality” mentioned in this article refers to two or more.
[0047] The following is a detailed description of the implementation details of the technical solution of the embodiment of the present application:
[0048] In the first aspect of this embodiment, a cluster verification method for a smart lock is implemented. Figure 1 , Figure 1 This is a flow chart of a cluster verification method for a smart lock disclosed in an embodiment of the present invention. The method includes:
[0049] S101: Reading the access permission card based on the first smart lock, if the first smart lock ID is in the permission list and the first smart lock is unreachable from the smart lock management platform, broadcasting a first message to the second smart lock in the permission list; the first message includes the smart lock management platform IP address, the permission list, and the second smart lock ID; the second smart lock is all other smart locks in the permission list except the first smart lock; the permission list includes the user ID, smart lock ID, opening hours, and verification information;
[0050] Before reading the access permission card according to the first smart lock, the method further includes:
[0051] An access permission card is created for the user based on the smart lock management platform; the access permission card stores a permission list; wherein, based on the user ID, smart lock ID, and opening time, verification information corresponding to different smart lock IDs is generated through HASH algorithm calculation; the verification information includes a verification code.
[0052] Specifically, in this embodiment, the smart lock management platform creates an access permission card for the user. When writing verification information, for user ID-1, based on the list of smart lock IDs that can be opened (i.e., the permission list), corresponding to the different opening start and end dates of the smart locks, the user ID, smart lock ID, and start and end date information are used to calculate through the HASH algorithm to generate a verification code.
[0053] For example: For user ID 0x0011, the following items need to be opened: Smart Lock-1: ID0x0021, opening time is from 2025-1-1 to 2025-1-30, and the verification code calculated by the HASH algorithm is 0xAEDF;
[0054] Smart lock-2: ID0x0022, opening time is from 2025-1-1 to 2025-2-30, the verification code calculated by the HASH algorithm is 0xA13A;
[0055] Smart lock-3: ID0x0023, opening hours: 2025-1-15 to 2025-2-30, the verification code calculated by the HASH algorithm is 0xB1E3.
[0056] Furthermore, while creating an access permission card for the user based on the smart lock management platform, the method also includes:
[0057] Generate different encryption keys according to different smart lock IDs and send them to the corresponding smart locks;
[0058] Encrypting the verification information in the permission list according to the encryption key and forming encrypted verification codes respectively;
[0059] The encrypted verification codes are accumulated to form a composite verification code, and the composite verification code is written into the access permission card.
[0060] Specifically, in this embodiment, to prevent the smart lock from reading the verification code and deducing the hash algorithm, the smart lock management platform also encrypts the verification code. The smart lock management platform generates different encryption keys based on the smart lock ID and synchronizes them to the corresponding smart lock. For example, the smart lock management platform generates encryption keys abcd for smart lock 1 (ID 0x0021) and hijk for smart lock 2 (ID 0x0022). Each smart lock only knows its own encryption key.
[0061] It should be noted that smart lock-1 can correspond to the first smart lock in this example; smart lock-2 and smart lock-3 (mentioned below) correspond to the second smart lock in this example.
[0062] The smart lock management platform encrypts the corresponding verification code using the encryption key corresponding to the smart lock in the smart lock ID list. For example, the verification code 0xAEDF is encrypted using the encryption key abcd, and the verification code 0xA13A is encrypted using the encryption key hijk. The smart lock management platform accumulates all encrypted verification codes to generate a final verification code, such as 0x1ehf. Finally, the user ID-1, the list of smart lock IDs that can be opened, the corresponding start and end dates for the smart locks, and the resulting verification code are written to the user access permission card.
[0063] Below, this example begins to explain how the smart lock reads access permission card information, and when it is identified that the smart lock management platform is unreachable, the local cluster mode is used to calculate the verification code for joint verification.
[0064] Specifically, in this embodiment, when a user uses a user access permission card to open a smart lock, such as Smart Lock-1, Smart Lock-1 reads the user access permission card information, first obtaining the user ID and then reading the smart lock ID list. If the smart lock's ID is not in the list, it returns a verification failure. If it is, it further compares the unlocking time. If the unlocking time is within the unlocking start and end date time period corresponding to the lock ID, it enters the verification code verification phase. If it is not within the time period, it returns a verification failure.
[0065] S102, checking the connection status between the second smart lock and the smart lock management platform according to the first message, and returning a second message to the second smart lock; the connection status includes reachable or unreachable; the second message includes the connection status, the second smart lock ID, and the second smart lock IP;
[0066] Specifically, in this embodiment, when the smart lock-1 enters the verification code verification phase, if the smart lock management platform is reachable, the user ID and the corresponding verification code are sent to the smart lock management platform; if the smart lock management platform is found to be unreachable, the local cluster mode is used for verification;
[0067] Smart lock 1 sends a broadcast query message to other smart locks, asking if the smart lock management platform is unreachable. If the smart locks are deployed on a Layer 2 network, they can be sent using Layer 2 broadcast mode. If a Layer 3 network is used, multicast can be used. The smart locks join the same multicast group by sending IGMP join messages, establishing a multicast forwarding tree. The broadcast query message is then sent to the multicast forwarding tree and then to other smart locks. The broadcast query message (the first message) sent by the smart lock includes the IP address of the smart lock management platform and the ID of the smart lock that requires collaborative verification (consistent with the smart lock list). This confirms whether any other smart locks in the smart lock list are connected to the smart lock management platform.
[0068] After receiving the query message from smart lock-1, other smart locks, i.e. the second smart lock in this example, such as smart lock-2 and smart lock-3, first determine whether the sent smart lock management platform IP is consistent with their own smart lock management platform IP and whether their own ID is in the smart lock ID list. If they are inconsistent, no action will be taken. If they are consistent, they check their connection status with the smart lock management platform. If they are reachable, they return a unicast message that the smart lock management platform is reachable to smart lock-1, carrying the local smart lock ID and IP. If they are unreachable, they return a unicast message that the smart lock management platform is unreachable to smart lock-1, carrying the local smart lock ID and IP.
[0069] If Smart Lock-1 receives a reachable message from another smart lock indicating that the smart lock management platform is reachable, it considers that its own smart lock is faulty, exits the local cluster mode, and waits for Smart Lock-1 to restore the connection with the smart lock management platform.
[0070] S103: In response to the connection status in the second message being unreachable, the first smart lock sends a collaborative calculation verification code request to the second smart lock based on the second smart lock IP address; the first smart lock determines the first verification code based on the first smart lock ID and its access time in the permission list; the second smart lock determines the second verification code based on the collaborative calculation verification code request and the second smart lock ID and its access time in the permission list, and returns the second verification code to the first smart lock;
[0071] Furthermore, the collaborative computing verification code request includes the user ID and the opening time of the first smart lock ID; the second smart lock determines the second verification code based on the collaborative computing verification code request and the second smart lock ID and its opening time in the permission list, and returns it to the first smart lock, including: after the second smart lock receives the collaborative computing verification code request, it calculates the second verification code through the HASH algorithm based on the user ID, the second smart lock ID and its opening time; encrypts the second verification code based on the encryption key corresponding to the second smart lock ID, obtains the second encrypted verification code, and sends it to the first smart lock.
[0072] Furthermore, the first smart lock determines the first verification code based on the first smart lock ID and its opening time in the permission list, including: the first smart lock calculates the first verification code through the HASH algorithm based on the user ID, the first smart lock ID and its opening time; encrypts the first verification code based on the encryption key corresponding to the first smart lock ID to obtain the first encrypted verification code.
[0073] Specifically, in this embodiment, if a confirmation message indicating that the smart lock management platform is unreachable is received from all other smart locks in the smart lock list, the smart lock ID and corresponding IP address are recorded, and a request for collaborative verification code calculation is sent to each of the smart locks in the list, carrying the user ID and the corresponding opening time of the smart lock ID. For example, smart lock-1 sends user ID: 0x0011 and opening time from 2025-1-1 to 2025-2-30 to smart lock-2, and sends ID: 0x0011 and opening time from 2025-1-15 to 2025-2-30 to smart lock-3.
[0074] After Smart Lock-2 and Smart Lock-3 receive the request message for collaborative calculation of the verification code sent by Smart Lock-1, they use the user ID, their own smart lock ID and the corresponding opening time to calculate the verification code through the HASH algorithm, and then further use the encryption key synchronized to their own smart locks by the previous smart lock management platform to encrypt the verification code to form a second encrypted verification code, which is returned to Smart Lock-1.
[0075] Smart lock-1 will also calculate the verification code based on the opening time of its own lock ID, user ID and smart lock ID through the HASH algorithm, and then encrypt it with the encryption key synchronized to its own smart lock by the smart lock management platform to form the first encrypted verification code.
[0076] S104, the first smart lock opens the first smart lock according to the comparison of the first verification code, the second verification code and the verification information.
[0077] Furthermore, the first smart lock opens the first smart lock based on the comparison of the first verification code, the second verification code and the verification information, including: the first smart lock accumulates the first encrypted verification code and the second encrypted verification code to generate a third verification code; compares the third verification code and the synthesized verification code, if they are consistent, the verification is passed and the first smart lock is opened.
[0078] Specifically, in this embodiment, Smart Lock-1 uses a hash algorithm to calculate a verification code based on the lock ID's opening time, user ID, and smart lock ID. This code is then encrypted using the encryption key synchronized to the smart lock by the smart lock management platform. This code is then added to the encrypted verification codes returned by Smart Lock-2 and Smart Lock-3 to obtain an encrypted verification code for verification. Smart Lock-1 compares the encrypted verification code with the verification code read from the user access permission card. If they match, verification succeeds and the smart lock opens. If they don't, verification fails and a "No Access" message is returned.
[0079] Based on this, in this embodiment, the smart lock management platform generates verification codes for users based on the different lock IDs that can be accessed and the corresponding access time, and encrypts them with different encryption keys, and then summarizes them into the final encrypted verification code; the smart lock synchronizes the reachability status of the smart lock management platform through broadcast or multicast, and uses the local cluster mode for verification for those that are consistently judged to be unreachable; the smart lock initiates a collaborative verification operation to other smart locks in the smart lock list in the local cluster mode, and different smart locks calculate the verification code corresponding to their own locks respectively, and encrypt them with their own encryption keys respectively, and finally the verified smart lock makes a summary judgment. In this way, when the smart lock management platform is unreachable, the smart lock can be jointly verified through the local cluster, ensuring the availability of the smart lock verification service, while ensuring the security of the verification, and avoiding the single point risk of a single smart lock being easily hacked.
[0080] In addition, the second aspect of this embodiment provides a cluster verification system for a smart lock, such as Figure 2 As shown, the system includes a reading module 201, a checking module 202, a collaboration request module 203, and a verification module 204; wherein:
[0081] The reading module 201 is configured to read the access permission card based on the first smart lock. If the first smart lock ID is in the permission list and the first smart lock is unreachable from the smart lock management platform, the reading module 201 broadcasts a first message to the second smart lock in the permission list. The first message includes the smart lock management platform IP address, the permission list, and the second smart lock ID. The second smart lock is defined as all other smart locks in the permission list except the first smart lock. The permission list includes the user ID, smart lock ID, opening hours, and verification information.
[0082] A checking module 202 is configured to check the connection status between the second smart lock and the smart lock management platform according to the first message, and return a second message to the second smart lock; the connection status includes reachable or unreachable; the second message includes the connection status, the second smart lock ID, and the second smart lock IP;
[0083] The collaborative request module 203 is configured to, in response to the connection status in the second message being unreachable, cause the first smart lock to send a collaborative calculation verification code request to the second smart lock based on the second smart lock IP address; the first smart lock determines the first verification code based on the first smart lock ID and its opening time in the permission list; the second smart lock determines the second verification code based on the collaborative calculation verification code request and the second smart lock ID and its opening time in the permission list, and returns the second verification code to the first smart lock;
[0084] The verification module 204 enables the first smart lock to open the first smart lock according to the first verification code, the second verification code and the verification information.
[0085] Furthermore, the system further includes a creation module 200 for:
[0086] An access permission card is created for the user based on the smart lock management platform; the access permission card stores a permission list; wherein, based on the user ID, smart lock ID, and opening time, verification information corresponding to different smart lock IDs is generated through HASH algorithm calculation; the verification information includes a verification code.
[0087] Furthermore, while creating an access permission card for the user based on the smart lock management platform, the method also includes:
[0088] Generate different encryption keys according to different smart lock IDs and send them to the corresponding smart locks;
[0089] Encrypting the verification information in the permission list according to the encryption key and forming encrypted verification codes respectively;
[0090] The encrypted verification codes are accumulated to form a composite verification code, and the composite verification code is written into the access permission card.
[0091] Furthermore, the collaborative calculation verification code request includes the user ID and the opening time of the first smart lock ID;
[0092] The second smart lock determines the second verification code according to the collaborative calculation verification code request, the second smart lock ID and the opening time in the permission list, and returns the second verification code to the first smart lock, including:
[0093] After receiving the collaborative calculation verification code request, the second smart lock calculates the second verification code through the HASH algorithm based on the user ID, the second smart lock ID and its opening time;
[0094] The second verification code is encrypted based on the encryption key corresponding to the second smart lock ID, the second encrypted verification code is obtained, and sent to the first smart lock.
[0095] Furthermore, the first smart lock determines the first verification code according to the first smart lock ID and its opening time in the permission list, including:
[0096] The first smart lock calculates a first verification code using a HASH algorithm based on the user ID, the first smart lock ID and its opening time;
[0097] The first verification code is encrypted based on the encryption key corresponding to the first smart lock ID to obtain a first encrypted verification code.
[0098] Furthermore, the first smart lock opens the first smart lock according to the comparison of the first verification code, the second verification code and the verification information, including:
[0099] The first smart lock accumulates the first encrypted verification code and the second encrypted verification code to generate a third verification code;
[0100] According to the comparison between the third verification code and the composite verification code, if they are consistent, the verification is passed and the first smart lock is opened.
[0101] In addition, the third aspect of the present invention provides a storage medium storing a computer program; the program is loaded and executed by a processor to implement the cluster verification method steps of the smart lock as described in the first aspect above.
[0102] In addition, the present application also discloses an electronic device, such as Figure 3 As shown, the electronic device includes: one or more processors, a memory, and the memory is used to store one or more computer programs; it is characterized in that the computer program is configured to be executed by the one or more processors, and the program includes steps for executing the cluster verification method of the smart lock as described in the first aspect above.
[0103] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0105] The units described as separate components may or may not be physically separated. As a unit, a person of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0106] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or grid device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0108] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A cluster verification method for smart locks, characterized in that: The method comprises: According to the access permission card read by the first smart lock, if the first smart lock ID is in the permission list and the first smart lock is unreachable from the smart lock management platform, a first message is broadcast to the second smart lock in the permission list; the first message includes the smart lock management platform IP, permission list, and the second smart lock ID; the second smart lock is all other smart locks in the permission list except the first smart lock; the permission list includes user ID, smart lock ID, opening hours, and verification information; Check the connection status between the second smart lock and the smart lock management platform according to the first message, and return a second message to the first smart lock; the connection status includes reachable or unreachable; the second message includes the connection status, the second smart lock ID, and the second smart lock IP; In response to the connection status in the second message being unreachable, the first smart lock sends a collaborative calculation verification code request to the second smart lock based on the second smart lock IP address; the first smart lock determines the first verification code based on the user ID in the permission list, the first smart lock ID, and its opening time; the second smart lock determines the second verification code based on the collaborative calculation verification code request, the user ID in the permission list, the second smart lock ID, and its opening time, and returns the second verification code to the first smart lock; The first smart lock opens the first smart lock based on the comparison of the first verification code, the second verification code and the verification information.
2. The cluster verification method for smart locks according to claim 1, characterized in that: Before reading the access permission card according to the first smart lock, the method further includes: creating an access permission card for the user according to the smart lock management platform; the access permission card stores a permission list; wherein, according to the user ID, smart lock ID, and opening time, verification information corresponding to different smart lock IDs is generated by calculating through a HASH algorithm; the verification information includes a verification code.
3. The cluster verification method for smart locks according to claim 2, characterized in that: While creating an access permission card for the user based on the smart lock management platform, it also includes: generating different encryption keys according to different smart lock IDs and sending them to the corresponding smart locks; encrypting the verification information in the permission list according to the encryption key and forming encrypted verification codes respectively; accumulating the encrypted verification codes to form a composite verification code, and writing it into the access permission card.
4. The cluster verification method for smart locks according to claim 3, characterized in that: The collaborative computing verification code request includes the user ID and the opening time of the first smart lock ID; the second smart lock determines the second verification code based on the collaborative computing verification code request and the second smart lock ID and its opening time in the permission list, and returns it to the first smart lock, including: after the second smart lock receives the collaborative computing verification code request, it calculates the second verification code through the HASH algorithm based on the user ID, the second smart lock ID and its opening time; encrypts the second verification code based on the encryption key corresponding to the second smart lock ID, obtains the second encrypted verification code, and sends it to the first smart lock.
5. The cluster verification method for smart locks according to claim 4, characterized in that: The first smart lock determines the first verification code based on the first smart lock ID and its opening time in the permission list, including: the first smart lock calculates the first verification code through the HASH algorithm based on the user ID, the first smart lock ID and its opening time; encrypts the first verification code based on the encryption key corresponding to the first smart lock ID to obtain the first encrypted verification code.
6. The cluster verification method for smart locks according to claim 5, characterized in that: The first smart lock opens the first smart lock based on the comparison of the first verification code, the second verification code and the verification information, including: the first smart lock accumulates the first encrypted verification code and the second encrypted verification code to generate a third verification code; compares the third verification code and the synthesized verification code, if they are consistent, the verification is passed and the first smart lock is opened.
7. A cluster verification system for smart locks, characterized in that: The system includes a reading module, a checking module, a collaboration request module, and a verification module; wherein: A reading module is configured to read the access permission card based on the first smart lock. If the first smart lock ID is in the permission list and the first smart lock is unreachable from the smart lock management platform, a first message is broadcast to the second smart lock in the permission list. The first message includes the smart lock management platform IP address, the permission list, and the second smart lock ID. The second smart lock is defined as all other smart locks in the permission list except the first smart lock. The permission list includes the user ID, smart lock ID, opening hours, and verification information. A checking module, configured to check the connection status between the second smart lock and the smart lock management platform according to the first message, and return a second message to the first smart lock; the connection status includes reachable or unreachable; the second message includes the connection status, the second smart lock ID, and the second smart lock IP; A collaborative request module is configured to, in response to the connection status in the second message being unreachable, cause the first smart lock to send a collaborative calculation verification code request to the second smart lock based on the second smart lock IP address; the first smart lock determines the first verification code based on the user ID, the first smart lock ID, and its opening time in the permission list; the second smart lock determines the second verification code based on the collaborative calculation verification code request, the user ID, the second smart lock ID, and its opening time in the permission list, and returns the second verification code to the first smart lock; The verification module enables the first smart lock to open the first smart lock according to the first verification code, the second verification code and the verification information.
8. The cluster verification system for smart locks according to claim 7, characterized in that: The system also includes a creation module for: An access permission card is created for the user based on the smart lock management platform; the access permission card stores a permission list; wherein, based on the user ID, smart lock ID, and opening time, verification information corresponding to different smart lock IDs is generated through HASH algorithm calculation; the verification information includes a verification code.
9. The cluster verification system for smart locks according to claim 8, characterized in that: The process of creating an access permission card for a user based on the smart lock management platform also includes: According to different smart lock IDs, different encryption keys are generated and sent to the corresponding smart locks; the verification information in the permission list is encrypted according to the encryption key, and encrypted verification codes are formed respectively; the encrypted verification codes are accumulated to form a composite verification code, and written to the access permission card.
10. A storage medium storing a computer program; the program is loaded and executed by a processor to implement the cluster verification method steps of the smart lock according to any one of claims 1 to 6.
Citation Information
Patent Citations
Unlocking system and method and intelligent door lock
CN114241637A
Intelligent lock system supported by block chain
CN118196938A