Door lock unlocking verification method, door lock and door lock system
Activating the CPU card through the terminal device and establishing an NFC connection solves the problem of rapid battery depletion of electronic door locks in high-traffic situations, reduces door lock power consumption, extends battery life, and improves hotel operation efficiency.
Patent Information
- Application Number
- CN202410779142.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-09-24
AI Technical Summary
Frequent use of electronic door locks in high-traffic situations causes the battery to drain quickly, increasing the hotel's labor costs and affecting guest experience.
The terminal device emits an NFC signal to activate the CPU card and establish an NFC connection, which reduces the power consumption of the door lock during the unlocking and verification process, simplifies the operating logic of the CPU card, and reduces power consumption.
It effectively reduces the power consumption of the door lock, extends the battery life, reduces the hotel's maintenance costs, and improves the customer stay experience.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of unlocking technology, and in particular to a door lock unlocking verification method, a door lock, and a door lock system. Background Art
[0002] With the development of technology, electronic door locks have been widely used in various occasions, such as hotels, apartments, offices, etc. Compared with traditional mechanical locks, electronic door locks have higher security and convenience. However, there are some problems in the use of electronic door locks, one of which is the power consumption during the unlocking verification process.
[0003] Especially in hotels with high passenger flow, frequent use of electronic door locks will cause the battery to run out quickly, which requires hotel staff to regularly check and replace or recharge the battery to ensure the stable operation of the door lock system. This not only increases the hotel's labor costs, but may also affect the customer's stay experience due to battery exhaustion.
[0004] Therefore, how to reduce the power consumption of door locks has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the above problems, the embodiments of the present application provide a door lock unlocking verification method, a door lock and a door lock system, which are used to solve the problem of high power consumption of door locks in the prior art.
[0006] According to one aspect of an embodiment of the present application, a door lock unlocking verification method is provided, and the method is applied to a door lock including a CPU card, and the method includes: generating an activation signal in response to an NFC signal transmitted by a terminal device, and the terminal device includes an NFC module; activating the CPU card through the activation signal, and establishing an NFC connection between the CPU card and the terminal device; receiving a read instruction sent by the terminal device through the NFC connection, and sending first identification information of the CPU card to the terminal device, the read instruction is an instruction to read the first identification information; receiving a write instruction sent by the terminal device through the NFC connection, and writing a target key into the CPU card, the write instruction includes an instruction to write a target key, and the target key is determined based on the first identification information; verifying whether the target key matches the local key of the CPU card; if the target key matches the local key, the unlocking verification is successful; if the target key does not match the local key, the unlocking verification fails.
[0007] In an optional manner, the write instruction also includes an instruction for writing a second identification information, the second identification information is used to identify a user account of the terminal device, the target key is obtained by encrypting a target password based on the second identification information, and the target password is determined based on the first identification information; receiving the write instruction sent by the terminal device via an NFC connection, and writing the target key to the CPU card, including: receiving the write instruction sent by the terminal device via an NFC connection, and writing the target key and the second identification information to the CPU card; before verifying whether the target key matches the local key of the CPU card, the door lock unlocking verification method also includes: reading the local password of the CPU card; encrypting the local password based on the second identification information to obtain the local key.
[0008] In an optional manner, the door lock unlocking verification method also includes receiving a password update instruction from a terminal device via an NFC connection, writing the management password into the storage space where the local password of the CPU card is located to replace the old local password of the CPU card as a new local password, and the password update instruction includes an instruction to write the management password.
[0009] In an optional manner, the CPU card includes an electronic clock, and the target key is obtained by encrypting a target password based on the current time information of the terminal device, and the target password is determined based on the first identification information; before verifying whether the target key matches the local key of the CPU card, the door lock unlocking verification method also includes: reading the current time information of the electronic clock and the local password of the CPU card; encrypting the local password based on the current time information of the electronic clock to obtain the local key.
[0010] According to another aspect of an embodiment of the present application, a door lock unlocking verification method is provided, and the method is applied to a terminal device including an NFC module, and the method includes: in response to sensing a CPU card, transmitting an NFC signal to establish an NFC connection with the CPU card; sending a read instruction to the CPU card through the NFC connection, and receiving first identification information of the CPU card, the read instruction is an instruction to read the first identification information; determining a target key based on the first identification information; sending a write instruction to the CPU card through the NFC connection, and writing the target key into the CPU card, so that the CPU card completes the door lock unlocking verification based on the target key, and the write instruction includes an instruction to write the target key.
[0011] In an optional manner, determining the target key based on the first identification information includes: sending the first identification information to a server so that the server determines the target key based on the first identification information; receiving the target key sent by the server; and / or determining the target key based on the first identification information includes: determining the target key based on the first identification information on a terminal device.
[0012] In an optional manner, the write instruction also includes an instruction to write a second identification information, the second identification information being used to identify a user account of the terminal device; sending the first identification information to the server so that the server determines the target key based on the first identification information, further including: sending the first identification information and the second identification information to the server so that the server matches the target password corresponding to the first identification information, and encrypts the target password based on the second identification information to obtain the target key; determining the target key on the terminal device based on the first identification information, further including: matching the target password corresponding to the first identification information on the terminal device; encrypting the target password based on the second identification information to obtain the target key; sending a write instruction to the CPU card via the NFC connection, writing the target key to the CPU card, so that the CPU card completes the unlocking verification of the door lock based on the target key, further including: sending a write instruction to the CPU card via the NFC connection, writing the target key and the second identification information to the CPU card, so that the CPU card completes the unlocking verification of the door lock based on the target key and the second identification information.
[0013] In an optional manner, the terminal device includes an electronic clock. Before encrypting the target password based on the second identification information to obtain the target key, the door lock unlocking verification method also includes: reading the current time information of the electronic clock; encrypting the target password based on the second identification information to obtain the target key, and further including: encrypting the target password based on the second identification information and the current time information to obtain the target key.
[0014] According to another aspect of the embodiments of the present application, a door lock is provided, which includes a power module, a CPU card, a controller, a drive motor and a lock body; the power module is electrically connected to the CPU card, the controller and the drive motor, and is used to supply power to the CPU card, the controller and the drive motor; the CPU card is used to execute the door lock unlocking verification method applied to a door lock including a CPU card as described in any of the above embodiments; the CPU card is electrically connected to the controller, and is used to generate an unlocking instruction after the unlocking verification is successful, and send the unlocking instruction to the controller; the controller is electrically connected to the drive motor, and is used to control the drive motor to work after receiving the unlocking instruction; the drive motor is physically connected to the lock body, and is used to drive the lock body to move, so as to complete the unlocking of the door lock.
[0015] According to another aspect of the embodiments of the present application, a door lock system is provided, which includes the door lock described in the above embodiments and a terminal device including an NFC module; the terminal device is used to transmit an NFC signal after sensing the CPU card of the door lock to establish an NFC connection with the CPU card, and execute the door lock unlocking verification method applied to the terminal device including the NFC module as described in any of the above embodiments.
[0016] In the embodiment of the present application, after the terminal device senses the CPU card of the door lock, it transmits an NFC signal to activate the CPU card to establish an NFC connection with the CPU card. This can make the CPU card in a low-power sleep state before establishing an NFC connection with the NFC module of the terminal device, thereby reducing the power consumption of the door lock. In the unlocking verification process, the terminal device sends a read instruction and a write instruction to read the first identification information of the CPU card and write the target key into the CPU card. This can make the CPU card directly perform unlocking verification by verifying whether the target key matches the local key, without the need for the CPU card to generate a read instruction for the target key, thereby simplifying the operating logic of the CPU card and further reducing the power consumption of the door lock.
[0017] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0019] Figure 1 A schematic diagram of the structure of a door lock system provided in an embodiment of the present application is shown;
[0020] Figure 2 A schematic diagram of the structure of a door lock provided in an embodiment of the present application is shown;
[0021] Figure 3 A schematic diagram of a process flow of a door lock unlocking verification method provided in an embodiment of the present application is shown;
[0022] Figure 4 A schematic diagram of a process flow of a door lock unlocking verification method provided in an embodiment of the present application is shown;
[0023] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.
[0025] Electronic door locks usually use wireless communication technologies, such as Radio Frequency Identification (RFID) or Near Field Communication (NFC), and Bluetooth technology to perform unlocking verification. Although these technologies are convenient and fast, the frequent communication process consumes a lot of power.
[0026] For example, for RFID-based electronic door locks, the RFID module in the electronic door lock acts as a card reader, which continuously transmits radio frequency signals to promptly detect the approach of the room card. This continuous monitoring of the approach of the room card requires the electronic door lock to continuously transmit radio frequency signals, consuming a large amount of electrical energy; and, during the unlocking process, when the room card approaches the electronic door lock, the RFID module will read the information in the room card and verify it. The unlocking process requires the electronic door lock to actively read the information in the room card. The operating logic involved in this communication process is relatively complex, which will also increase the power consumption of the electronic door lock.
[0027] Based on this, the inventor of the present application found that the door lock can be used as a room card and the user's terminal device can be used as a card reader. Specifically, the door lock is set to a dormant state, and the terminal device transmits a radio frequency signal (such as an NFC signal) to wake up the door lock from the dormant state, and the door lock unlocking verification is performed through the door lock in the activated state. This method does not require the door lock to send radio frequency signals all the time, which can greatly reduce the power consumption of the door lock; after waking up the door lock and establishing a communication connection between the door lock and the terminal device, the terminal device sends a control instruction (such as a read instruction, a write instruction) to control the door lock to perform the door lock unlocking verification, which can make the door lock do not need to generate a read instruction for the verification information of the terminal device, but only need to read data, write data and verify whether the terminal device has the unlocking authority based on the written data, thereby simplifying the operation logic of the door lock unlocking verification process, which can further reduce the power consumption of the door lock.
[0028] See also Figure 1 , Figure 1 The schematic diagram of the structure of the door lock system provided by the embodiment of the present application is shown. The door lock system 1 includes a door lock 10 and a terminal device 20, the door lock 10 includes a CPU card 11, and the terminal device 20 includes an NFC module 21; the terminal device 20 is used to transmit an NFC signal after sensing the CPU card 11 of the door lock 10, so as to establish an NFC connection with the CPU card 11.
[0029] The door lock 10 is an electronic door lock including a CPU card 11, wherein a CPU card is a smart card that contains a central processing unit (CPU) chip capable of performing complex data processing and calculations. Unlike simple memory cards or magnetic stripe cards, CPU cards have the ability to process data and can run their own operating systems and applications, so they can provide more advanced security and versatility.
[0030] The terminal device 20 is a terminal device including an NFC module. The terminal device 20 can be a smart phone, a tablet computer, a smart watch or other portable electronic devices, all of which can communicate with the electronic door lock system through the built-in NFC module. In this case, the user can use NFC technology to unlock the door lock 10 by placing the terminal device 20 close to the door lock 10, without using a traditional physical key or room card. This NFC-based communication method brings a more intelligent user experience to the user.
[0031] Among them, NFC connection is a short-range wireless communication technology that allows two devices to exchange data within a few centimeters. NFC devices can transmit data by electromagnetic induction coupling, which makes NFC technology very useful in applications that require secure, fast and contactless data exchange. NFC connections usually use a frequency of 13.56MHz, which is an internationally recognized frequency and is used in various NFC applications.
[0032] See also Figure 2 , Figure 2 The schematic diagram of the structure of the door lock provided by the embodiment of the present application is shown. The door lock 10 includes a power module 15, a CPU card 11, a controller 12, a drive motor 13 and a lock body 14; the power module 15 is electrically connected to the CPU card 11, the controller 12 and the drive motor 13, and is used to supply power to the CPU card 11, the controller 12 and the drive motor 13; the CPU card 11 is used to execute the door lock unlocking verification method; the CPU card 11 is electrically connected to the controller 12, and is used to generate an unlocking instruction after the unlocking verification is successful, and send the unlocking instruction to the controller 12; the controller 12 is electrically connected to the drive motor 13, and is used to control the drive motor 13 to work after receiving the unlocking instruction; the drive motor 13 is physically connected to the lock body 14, and is used to drive the lock body 14 to move, so as to complete the unlocking of the door lock 10.
[0033] The power module 15 may be a lithium battery, an alkaline battery or a rechargeable battery.
[0034] When the CPU card 11 completes the unlocking verification (such as verifying the user's identity and authority) successfully, the CPU card 11 will generate an unlocking instruction. The unlocking instruction is an electrical signal for instructing the controller 12 to perform the unlocking operation.
[0035] The controller 12 is a main command device that changes the wiring of the main circuit or control circuit and the resistance value in the circuit in a predetermined order to control the start, speed regulation, braking and reversal of the motor. After receiving the unlocking command sent by the CPU card 11, the controller 12 generates an opening signal and sends the opening signal to the drive motor 13. After receiving the opening signal, the drive motor 13 rotates according to a preset program and transmits power to the lock body 14 through a series of transmission devices, thereby realizing the unlocking function.
[0036] The drive motor 13 is generally divided into two types: a DC motor and a stepper motor, both of which can provide sufficient torque to overcome the resistance of the lock core. The drive motor 13 is connected to the lock body 14 through some mechanical connection (such as a gear, rack, belt or other transmission mechanism). The lock body 14 is a physical part installed on the door, which cooperates with the lock tongue on the door frame to form a locking device. The lock body 14 contains a lock core and a mechanical structure connected to the drive motor 13. When the drive motor 13 is working, it will rotate the lock core or lock tongue, thereby locking or unlocking the door. Modern smart lock bodies may also include sensors and communication modules for feeding back status information to the controller 12 and networking with other smart home devices.
[0037] Among them, the door lock unlocking verification method executed by the CPU card 11 is as follows Figure 3 As shown, Figure 3 The flowchart of the door lock unlocking verification method provided by the embodiment of the present application is shown. Figure 3 , the method comprises the following steps:
[0038] S110, generating an activation signal in response to an NFC signal transmitted by a terminal device 20, where the terminal device 20 includes an NFC module.
[0039] When the user arrives at the door, he manually turns on the NFC function of the terminal device 20, uses the terminal device 20 as a card reader, and approaches the door lock 10 on the door. In response to sensing the CPU card 11 of the door lock 10, the terminal device 20 transmits an NFC signal.
[0040] In actual application, the CPU card 11 includes a microprocessor and a radio frequency module, and these two components work together to realize the functions of the card. When the CPU card 11 is in a dormant state, its power consumption is extremely low, and it will only be awakened when it receives an external signal. When the antenna of the radio frequency module receives the NFC signal, the radio frequency module is activated and generates an activation signal, and then the radio frequency module transmits the activation signal to the microprocessor to wake up the microprocessor through the activation signal.
[0041] S130, activating the CPU card through an activation signal, and establishing an NFC connection between the CPU card and the terminal device.
[0042] When the microprocessor of the CPU card 11 is awakened, the microprocessor instructs the radio frequency module to establish an NFC connection with the NFC module 21 of the terminal device 20 .
[0043] To verify the door lock unlocking based on NFC connection, the terminal device 20 needs to be close to the door lock 10, and the user must operate at the door, so that the door lock system 1 can avoid the transmission security problem based on wireless network communication while ensuring intelligence.
[0044] In S110 to S130, after the terminal device 20 senses the CPU card 11 of the door lock 10, the terminal device 20 transmits an NFC signal to activate the CPU card 11 to establish an NFC connection with the CPU card 11. The CPU card 11 can be in a low-power dormant state before establishing an NFC connection with the NFC module 21 of the terminal device 20, thereby reducing the power consumption of the door lock 10.
[0045] S150, receiving a read instruction sent by the terminal device 20 through the NFC connection, and sending the first identification information of the CPU card 11 to the terminal device 20, where the read instruction is an instruction for reading the first identification information.
[0046] When the user arrives at the door, he manually starts the door unlock verification program on the terminal device 20 to run the door unlock verification program. After the terminal device 20 establishes an NFC connection with the door lock 10, the door unlock verification program generates a read instruction when implementing the unlock function, which is used to read the identification information of the CPU card 11 from the door lock 10.
[0047] In an optional manner, the first identification information of the CPU card 11 is the logical card number (LCN) of the CPU card. LCN is a digital identifier used to identify and distinguish different cards in the smart card system. LCN is pre-written during the card manufacturing process and is solidified in the non-volatile memory of the card. It cannot be changed by the user and has high security.
[0048] In an optional manner, the door lock unlocking verification program running on the terminal device 20 can only be used after the user's identity is verified. For example, after the user places an order at the hotel front desk, the front desk authorizes the user to log in to the door lock unlocking verification program, and then the user can log in to the door lock unlocking verification program on the terminal device 20 and use the unlocking function of the door lock unlocking verification program.
[0049] After receiving the read instruction, the CPU card 11 reads the first identification information and transmits the first identification information to the terminal device 20 through the NFC connection. For example, after receiving the read instruction, the CPU card 11 reads the LCN from the non-volatile memory and transmits the LCN to the terminal device 20.
[0050] S170, receiving a write instruction sent by the terminal device 20 through the NFC connection, and writing the target key into the CPU card 11, the write instruction includes an instruction to write the target key, and the target key is determined based on the first identification information.
[0051] After reading the first identification information, the door lock unlocking verification program running on the terminal device 20 needs to determine the target key based on the first identification information. For example, the unlocking password of the door lock 10 and the LCN are stored in the hotel's access control system database in a one-to-one correspondence. The door lock unlocking verification program matches the unlocking password corresponding to the read LCN from the hotel's access control system database and uses it as the target key.
[0052] After determining the target key, the door lock unlocking verification program generates a write program for the target key, and sends the target key as verification information to the CPU card 11, so that the CPU card 11 verifies whether the terminal device 20 has the unlocking authority based on the verification information.
[0053] In an optional manner, the CPU card 11 writes the target key sent by the terminal device 20 into a random access memory (RAM) to temporarily store the target key.
[0054] In S150 to S170, compared to the method in which the door lock 10 generates a read instruction for verification information and reads the verification information of the terminal device 20 through the read instruction, the terminal device 20 reads the first identification information of the CPU card 11 through the read instruction, determines the target key based on the first identification information, and writes the target key as verification information to the CPU card 11 through the write instruction, which can simplify the running program in the CPU card 11; and, compared to the method in which the terminal device 20 can directly obtain the verification information, the verification information is the target key determined based on the first identification information, so that the terminal device 20 can determine the target key only after obtaining the first identification information, which can prevent the target key from being illegally obtained, thereby improving the security of the verification process of the door lock 10.
[0055] S190, verify whether the target key matches the local key of the CPU card; if the target key matches the local key, the unlocking verification is successful; if the target key does not match the local key, the unlocking verification fails.
[0056] In an optional manner, the local key of the CPU card 11 is stored in a non-volatile memory so that the local key can be reset multiple times without destroying the card.
[0057] After writing the target key, the terminal device 20 can send a verification instruction to control the CPU card 11 to verify whether the local key matches the target key through the verification instruction; or after the CPU card 11 detects data writing, the CPU card 11 can actively verify whether the newly written target key matches the local key.
[0058] Among them, verifying whether the local key and the target key match can be comparing whether the local key and the target key are the same, or it can be verifying whether the local key and the target key are a pair of public key and private key. For example, if the local key is a public key, the CPU card 11 needs to verify whether the received target key is the private key corresponding to the local key.
[0059] If the target key matches the local key, the CPU card 11 successfully verifies the unlocking of the terminal device 20, determines that the terminal device 20 has the unlocking authority, and generates an unlocking instruction to drive the lock body 14 to move and complete the unlocking of the door lock 10; if the target key does not match the local key, the CPU card 11 fails to verify the unlocking of the terminal device 20, determines that the terminal device 20 does not have the unlocking authority, and does not generate an unlocking instruction. In an optional manner, the door lock 10 also includes a speaker. After the door lock verification fails, the CPU card 11 generates a prompt voice and plays it through the speaker.
[0060] In an optional manner, after the unlocking verification is completed, the target key written into the CPU card 11 is erased to reduce the storage burden of the CPU card 11 .
[0061] In the embodiment of the present application, after the terminal device 20 senses the CPU card 11 of the door lock 10, the terminal device 20 transmits an NFC signal to activate the CPU card 11 to establish an NFC connection with the CPU card 11. This allows the CPU card 11 to be in a low-power sleep state before establishing an NFC connection with the NFC module 21 of the terminal device 20, thereby reducing the power consumption of the power module 15 of the door lock 10; and during the unlocking verification process, the terminal device 20 sends a read instruction and a write instruction to read the first identification information of the CPU card 11 and write the target key into the CPU card 11. This allows the CPU card 11 to directly perform an unlocking verification by verifying whether the target key matches the local key, without the need for the CPU card 11 to generate a read instruction for the target key, thereby simplifying the operating logic of the CPU card 11 and further reducing the power consumption of the power module 15 of the door lock 10.
[0062] In order to improve the security of the door lock 10, in an optional manner, the write instruction also includes an instruction to write a second identification information, the second identification information is used to identify a user account of the terminal device 20, and the target key is obtained by encrypting a target password based on the second identification information, and the target password is determined based on the first identification information.
[0063] S170 also includes the following sub-steps: S171, receiving a write instruction sent by the terminal device 20 through an NFC connection, and writing the target key and the second identification information into the CPU card 11.
[0064] The second identification information is used to identify the user account of the terminal device 20, and may be an identity certificate of the account, an identity certificate of the user, or a hotel order number under the user account.
[0065] In an optional manner, the unlocking password of the door lock 10 and the first identification information are stored one-to-one in the database of the hotel's access control system. The door lock unlocking verification program matches the target password from the database of the hotel's access control system through the first identification information, and then encrypts the matched target password based on the second identification information to obtain the target key.
[0066] The CPU card 11 is pre-written with a local password, which is the same as the target password (i.e., unlocking password) corresponding to the LCN of the CPU card 11 and stored in the hotel's access control system database. After the terminal device 20 writes the second identification information and the target key into the CPU card 11, the CPU card 11 reads the local password when performing unlocking verification, and then encrypts the read local password based on the second identification information to obtain the local key. After obtaining the local key, it verifies whether the local key matches the target key.
[0067] In actual applications, if the target key is obtained by the terminal device 20 under compliance conditions, the target password corresponding to the target key should match the local password of the CPU card 11.
[0068] In an optional manner, the target key is written into a volatile memory by the CPU card 11; the second identification information is written into a non-volatile memory by the CPU card 11, so that the second identification information stored in the CPU card 11 can be read, and the identity of the unlocker can be determined through the second identification information to obtain the unlocking record of the door lock 10.
[0069] Before S190, the door lock unlocking verification method also includes the following steps:
[0070] S181, read the local password of CPU card 11.
[0071] In an optional manner, the local password is stored in a non-volatile memory of the CPU card 11. The local password stored in the CPU card 11 can be reset by the management account. Specifically, the door lock unlocking verification method also includes:
[0072] S140, receiving the password update instruction of the terminal device 20 through the NFC connection, writing the management password into the storage space where the local password of the CPU card 11 is located to replace the old local password of the CPU card as a new local password, and the password update instruction includes an instruction to write the management password.
[0073] The management password is a new password set by the administrator, and only the terminal device 20 logged in to the management account can send a password update instruction to replace the local password in the CPU card 11 with the management password. The administrator also needs to modify the door lock password corresponding to the CPU card 11 stored in the database of the hotel access control system to ensure that the user account with unlocking authority can successfully unlock the door.
[0074] S183: Encrypt the local password based on the second identification information to obtain a local key.
[0075] The encryption algorithm used to encrypt the local password may be symmetric encryption, asymmetric encryption or hash function, such as Advanced Encryption Standard, Data Encryption Standard, RSA, elliptic curve cryptography, SHA-256 and hash message authentication code.
[0076] When different encryption algorithms are used to encrypt the local password, the verification method of the CPU card 11 is also different and the target password that can pass the verification is also different. For example, when an asymmetric encryption algorithm is selected to encrypt the second identification information, the CPU card 11 verifies whether the local key and the target key are corresponding public key and private key. If the target key can pass the verification of the CPU card 11, the local password and the target password should form a pair of public key and private key; when a symmetric encryption algorithm is selected to encrypt the second identification information, the CPU card 11 compares whether the local key and the target key are the same. If the target key can pass the verification of the CPU card 11, the local password and the target password should also be the same.
[0077] It should be noted that when setting the encryption algorithm for the target password, the encryption algorithm of the target password must be consistent with the encryption algorithm of the local password. For example, if the local password encryption algorithm is SHA-256, the encryption algorithm of the target password should also be SHA-256. Only when the local password matches the target password and the encryption algorithm of the local password is the same as the encryption algorithm of the target password, can the local key and the target key match.
[0078] Using the encrypted target key as verification information instead of the original target password as verification information can ensure that even if the original target password is leaked, the unlocking verification of the CPU card 11 cannot be passed with only the target password, thereby improving the security of the door lock 10; similarly, verifying the target key with the encrypted local key instead of the original local password can ensure that even if the local password in the CPU card 11 is illegally read, the target key cannot be forged with only the local password, thereby improving the security of the door lock 10.
[0079] In order to further improve the security of the door lock 10, in an optional manner, the CPU card 11 includes an electronic clock, and the target key is obtained by encrypting a target password based on the current time information of the terminal device 20, and the target password is determined based on the first identification information.
[0080] Before S190, the door lock unlocking verification method also includes the following steps:
[0081] S182, read the current time information of the electronic clock and the local password of the CPU card.
[0082] Among them, the current time information may include hour and minute information, and may also include year, month, day and time information, and may also include year, month, day and hour and minute information, for example, "2024-05-13 10:35".
[0083] S184, encrypting the local password based on the current time information of the electronic clock to obtain a local key.
[0084] In an optional manner, after reading the current time information, the current time information is first cleaned to obtain the current time data, for example, "2024-05-13 10:35" is cleaned to "202405131035". Then, the cleaned current time data is used to encrypt the local password to obtain the local key.
[0085] For the door lock unlocking verification program, correspondingly, it is also necessary to read the current time information, and use the read current time information to encrypt the obtained password to obtain the target key.
[0086] Only when the local password matches the target password, the encryption algorithm of the local password is consistent with the encryption method of the target password, and the current time information of the CPU card 11 is consistent with the current time information of the door lock unlocking verification program, can the local key match the target key.
[0087] In S182~S184, the local password is encrypted using the current time information to obtain a local key, which changes with the current time information. When the data of the CPU card 11 is monitored, the local password and the local key are leaked, and the target key forged based on the local password and the local key cannot be matched with the currently generated local key, thereby further improving the security of the door lock 10.
[0088] In actual use, the encryption algorithm and encryption parameters can be selected according to actual needs. Encryption can be based on a single parameter, for example, the local password is encrypted based only on the first identification information or the second identification information or the current time information to obtain a local key, and the target password is encrypted based on the first identification information or the second identification information or the current time information to obtain a target key; encryption can also be based on multiple parameters to further improve the security of the door lock 10, for example, the local password is encrypted based on the second identification information and the current time information to obtain a local key, and the target password is encrypted based on the second identification information and the current time information to obtain a target key.
[0089] According to another aspect of the embodiment of the present application, the door lock unlocking verification method performed by the terminal device 20 is as follows: Figure 4 As shown, Figure 4 A schematic flow chart of a door lock unlocking verification method provided in an embodiment of the present application is shown.
[0090] See also Figure 4 , the method comprises the following steps:
[0091] S210 , in response to sensing the CPU card, transmitting an NFC signal to establish an NFC connection with the CPU card.
[0092] S230, sending a read instruction to the CPU card through the NFC connection, and receiving first identification information of the CPU card, where the read instruction is an instruction for reading the first identification information.
[0093] S250: Determine a target key based on the first identification information.
[0094] S270, sending a write instruction to the CPU card through the NFC connection to write the target key into the CPU card, so that the CPU card completes the unlocking verification of the door lock based on the target key, and the write instruction includes an instruction to write the target key.
[0095] Among them, the implementation method and beneficial effects of S210~S270 can refer to the description of S110~S190 above, and will not be repeated here.
[0096] For the door lock unlocking verification program, the program can determine the target key locally on the terminal device 20, or after the cloud server determines the target key, the target key is loaded from the server to the local. If the target key is obtained from the server, in an optional manner, S250 includes:
[0097] S251, sending the first identification information to the server, so that the server determines the target key based on the first identification information.
[0098] S253, receiving the target key sent by the server.
[0099] In an optional manner, the unlocking key of the door lock 10 and the first identification information are stored in a database of the hotel's access control system in a one-to-one correspondence, and the database of the access control system is stored in a server. The terminal device 20 sends the first identification information to the server, so that the server matches the target key corresponding to the first identification information from the database of the access control system.
[0100] In another optional manner, the unlocking password of the door lock 10 and the first identification information are stored in a database of the hotel's access control system in a one-to-one correspondence, and the database of the access control system is stored in the server. The server needs to encrypt the target password after matching the target password corresponding to the first identification information.
[0101] Among them, when encrypting the target password, if the first identification information is used to encrypt the target password, the server uses the first identification information to encrypt the target password to generate a target key, and transmits the target key to the terminal device 20 to avoid directly transmitting the plaintext target password during the transmission process, which may cause the target password to be leaked and used for illegal unlocking.
[0102] Among them, when encrypting the target password, if the target password is encrypted using the current time information, the server reads the current time information, uses the current time information to encrypt the matched target password to generate a target key, and transmits the target key to the terminal device 20. The generated target key changes with the change of the current time information, so that even if the target key or target password is leaked, it is impossible to illegally unlock the door based on the target key and the target password.
[0103] When encrypting the target password, if the second identification information is used to encrypt the target password, the write instruction also includes an instruction to write the second identification information, and the second identification information is used to identify the user account of the terminal device 20.
[0104] S251, further includes the sub-steps of sending the first identification information and the second identification information to the server, so that the server matches the target password corresponding to the first identification information, and encrypts the target password based on the second identification information to obtain a target key.
[0105] S270 further includes the following sub-steps: S271, sending a write instruction to the CPU card 11 via the NFC connection, writing the target key and the second identification information into the CPU card 11, so that the CPU card 11 completes the unlocking verification of the door lock 10 based on the target key and the second identification information.
[0106] The terminal device 20 sends the second identification information and the first identification information read from the CPU card 11 to the server. After receiving the first identification information and the second identification information, the server matches the target password corresponding to the first identification information from the database of the access control system, encrypts the target password based on the second identification information to generate a target key, and transmits the target key to the terminal device 20.
[0107] After receiving the target key, the terminal device 20 generates a write instruction for the target key and the second identification information so that the CPU card 11 can encrypt the local password based on the second identification information to obtain the local key, and verify whether the local key matches the target key to verify whether the terminal device 20 has the unlocking authority.
[0108] In an optional manner, the server may back up the received first identification information and the second identification information, so that the unlocking record of the door lock 10 and the identity of the unlocking user can be queried on the server.
[0109] If the target key is determined locally on the terminal device 20, S250 further includes a sub-step: S252, determining the target key on the terminal device 20 based on the first identification information.
[0110] In an optional manner, the unlocking key of the door lock 10 and the first identification information are stored in a database of the hotel's access control system in a one-to-one correspondence, and the data in the access control system database is loaded locally as preset data to the terminal device 20. The terminal device 20 matches the target key corresponding to the first identification information from the data in the local access control system database.
[0111] When the management account modifies the local password of the CPU card 11, the data in the access control system database is updated synchronously. The user needs to update the door lock unlocking verification program on the terminal device 20 to pull the latest access control system database data from the cloud server, so as to load the updated data locally.
[0112] Among them, when encrypting the target password, if the first identification information is used to encrypt the target password, after reading the first identification information of the CPU card 11, the terminal device 20 can match the local password corresponding to the first identification information, and encrypt the local password through the first identification information to obtain the local key.
[0113] Among them, when encrypting the target password, if the current time information is used to encrypt the target password, the terminal device 20 includes an electronic clock. After matching the local password corresponding to the first identification information, the terminal device 20 reads the current time information of the electronic clock and encrypts the local password through the current time information to obtain a local key.
[0114] When encrypting the target password, if the second identification information is used to encrypt the target password, the write instruction also includes an instruction to write the second identification information, and the second identification information is used to identify the user account of the terminal device 20.
[0115] S252, further comprising the following sub-steps:
[0116] S2521, matching the target password corresponding to the first identification information on the terminal device 20.
[0117] S2523, encrypt the target password based on the second identification information to obtain a target key.
[0118] S270 further includes sub-steps: S271, sending a write instruction to the CPU card 11 through the NFC connection, writing the target key and the second identification information into the CPU card 11, so that the CPU card 11 completes the unlocking verification of the door lock based on the target key and the second identification information.
[0119] Similar to determining the target key through the server, when the target key is determined through the terminal device 20, the terminal device 20 locally matches the target password corresponding to the first identification information, and then runs the encryption algorithm locally to encrypt the target password using the second identification information to generate the target key.
[0120] After obtaining the target key, the terminal device 20 writes the target key and the second identification information into the CPU card 11, so that the CPU card 11 encrypts the local password through the second identification information to generate a local key and verifies whether the target key matches the local key.
[0121] Similarly, the terminal device 20 can also use multiple information together to encrypt the target password. When encrypting the target password, if the second identification information and the current time information are used to encrypt the target password, then before S2523, the door lock unlocking verification method also includes the step: S2522, reading the current time information of the electronic clock.
[0122] S2523 further includes a sub-step: encrypting the target password based on the second identification information and the current time information to obtain a target key.
[0123] In actual use, the terminal device 20 may only provide a solution for obtaining the target key from the server, or only provide a solution for determining the target key locally, or both a solution for obtaining the target key from the server and a solution for determining the target key locally. The above-mentioned solutions may be selected according to actual use requirements. When the terminal device 20 is limited to obtain the target key from the service area, it can prevent the situation where the security defense program of one of the terminal devices 20 is low when multiple terminal devices 20 are attacked, resulting in the leakage of all target passwords, thereby ensuring the security of the target password; when the terminal device 20 is provided with a solution for determining the target key locally, it can prevent network congestion and the user from being unable to open the door.
[0124] Figure 5 The electronic device provided in the embodiment of the present application is shown in the structural diagram, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device. The electronic device can be a door lock 10 or a terminal device 20.
[0125] like Figure 5 As shown, the electronic device may include: a processor (processor) 302 and a memory (memory) 304.
[0126] The memory 304 is used to store a computer program 306. The memory 304 may include a high-speed RAM memory, or may also include a non-volatile memory, such as at least one disk memory. The computer program 306 may include computer executable instructions.
[0127] When the electronic device is a door lock 10, the processor 302 is used to execute the computer program 306 to implement the steps in the embodiment of the door lock unlocking verification method executed at the door lock 10. When the electronic device is a terminal device 20, the processor 302 is used to execute the computer program 306 to implement the steps in the embodiment of the door lock unlocking verification method executed at the terminal device 20.
[0128] The processor 302 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0129] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned door lock unlocking verification method embodiment are implemented.
[0130] An embodiment of the present application provides a computer program, which can be executed by a processor to implement the steps in the above-mentioned door lock unlocking verification method embodiment.
[0131] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in the above-mentioned door lock unlocking verification method embodiment are implemented.
[0132] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present application described here, and the above description of specific languages is to disclose the best mode of implementation of the present application.
[0133] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0134] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed application requires more features than those explicitly recited in each claim.
[0135] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0136] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A door lock unlocking verification method, characterized in that: The method is applied to a door lock including a CPU card, and the method includes: generating an activation signal in response to an NFC signal transmitted by a terminal device, wherein the terminal device includes an NFC module; Activate the CPU card through the activation signal to establish an NFC connection between the CPU card and the terminal device; Receiving a read instruction sent by the terminal device through the NFC connection, and sending the first identification information of the CPU card to the terminal device, wherein the read instruction is an instruction for reading the first identification information; Receiving a write instruction sent by the terminal device through the NFC connection, and writing a target key into the CPU card, wherein the write instruction includes an instruction for writing the target key, and the target key is determined based on the first identification information; Verify whether the target key matches the local key of the CPU card; If the target key matches the local key, the unlock verification is successful; If the target key does not match the local key, the unlocking verification fails.
2. The method according to claim 1, characterized in that The write instruction further includes an instruction to write second identification information, the second identification information is used to identify a user account of the terminal device, the target key is obtained by encrypting a target password based on the second identification information, and the target password is determined based on the first identification information; The receiving a write instruction sent by the terminal device through the NFC connection and writing the target key into the CPU card includes: Receiving a write instruction sent by the terminal device through the NFC connection, and writing the target key and the second identification information into the CPU card; Before verifying whether the target key matches the local key of the CPU card, the method further comprises: Read the local password of the CPU card; The local password is encrypted based on the second identification information to obtain the local key.
3. The method according to claim 2, characterized in that The method further comprises, The password update instruction of the terminal device is received through the NFC connection, and the management password is written into the storage space where the local password of the CPU card is located to replace the old local password of the CPU card as a new local password. The password update instruction includes an instruction to write the management password.
4. The method according to claim 1, characterized in that: The CPU card includes an electronic clock, the target key is obtained by encrypting a target password based on the current time information of the terminal device, and the target password is determined based on the first identification information; Before verifying whether the target key matches the local key of the CPU card, the method further comprises: Read the current time information of the electronic clock and the local password of the CPU card; The local password is encrypted based on the current time information of the electronic clock to obtain the local key.
5. A door lock unlocking verification method, characterized in that: The door lock includes a CPU card, and the method is applied to a terminal device including an NFC module, and the method includes: In response to sensing the CPU card, transmitting an NFC signal to establish an NFC connection with the CPU card; Sending a read instruction to the CPU card through the NFC connection, and receiving first identification information of the CPU card, wherein the read instruction is an instruction for reading the first identification information; Determine a target key based on the first identification information; A write instruction is sent to the CPU card through the NFC connection to write the target key into the CPU card, so that the CPU card completes the unlocking verification of the door lock based on the target key, and the write instruction includes an instruction to write the target key.
6. The method according to claim 5, characterized in that The determining the target key based on the first identification information includes: Sending the first identification information to a server, so that the server determines a target key based on the first identification information; receiving the target key sent by the server; and / or, The determining the target key based on the first identification information includes: A target key is determined on the terminal device based on the first identification information.
7. The method according to claim 6, characterized in that The write instruction also includes an instruction to write second identification information, where the second identification information is used to identify a user account of the terminal device; The sending the first identification information to a server so that the server determines a target key based on the first identification information further includes: Sending the first identification information and the second identification information to a server, so that the server matches a target password corresponding to the first identification information, and encrypts the target password based on the second identification information to obtain the target key; The determining the target key based on the first identification information on the terminal device further includes: Matching a target password corresponding to the first identification information on the terminal device; Encrypting the target password based on the second identification information to obtain the target key; The sending of a write instruction to the CPU card through the NFC connection to write the target key into the CPU card, so that the CPU card completes the unlocking verification of the door lock based on the target key, further includes: A write instruction is sent to the CPU card through the NFC connection to write the target key and the second identification information into the CPU card, so that the CPU card completes the unlocking verification of the door lock based on the target key and the second identification information.
8. The method according to claim 7, characterized in that The terminal device includes an electronic clock. Before encrypting the target password based on the second identification information to obtain the target key, the method further includes: Reading the current time information of the electronic clock; The step of encrypting the target password based on the second identification information to obtain the target key further includes: The target password is encrypted based on the second identification information and the current time information to obtain the target key.
9. A door lock, characterized in that: The door lock includes a power module, a CPU card, a controller, a drive motor and a lock body; The power module is electrically connected to the CPU card, the controller and the drive motor, and is used to supply power to the CPU card, the controller and the drive motor; The CPU card is used to execute the door lock unlocking verification method according to any one of claims 1 to 4; The CPU card is electrically connected to the controller, and is used to generate an unlocking instruction after the unlocking verification is successful, and send the unlocking instruction to the controller; The controller is electrically connected to the drive motor and is used to control the drive motor to work after receiving the unlocking instruction; The driving motor is physically connected to the lock body and is used to drive the lock body to move so as to unlock the door lock.
10. A door lock system, characterized in that: The door lock system comprises the door lock as claimed in claim 9 and a terminal device comprising an NFC module; The terminal device is used to transmit an NFC signal after sensing the CPU card of the door lock to establish an NFC connection with the CPU card and execute the door lock unlocking verification method as described in any one of claims 5 to 8.
Citation Information
Patent Citations
System and method for remotely opening door based on mobile phone short message
CN102831682A
Electronic lock system, electronic lock and unlocking method based on NFC
CN104978781A
Anti-theft door system for forming interlock structure together with WiFi
CN106846566A
Unlocking method of intelligent door lock
CN106898065A
Control method and system for intelligent lock and related device
CN108055235A
