CN112085872A - NFC-based unlocking method, related device and system - Google Patents

NFC-based unlocking method, related device and system Download PDF

Info

Publication number
CN112085872A
CN112085872A CN201910506939.8A CN201910506939A CN112085872A CN 112085872 A CN112085872 A CN 112085872A CN 201910506939 A CN201910506939 A CN 201910506939A CN 112085872 A CN112085872 A CN 112085872A
Authority
CN
China
Prior art keywords
electronic lock
electronic device
electronic
state
lock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910506939.8A
Other languages
Chinese (zh)
Inventor
姚振栋
甄家灏
许浩维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910506939.8A priority Critical patent/CN112085872A/en
Publication of CN112085872A publication Critical patent/CN112085872A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • G07C2009/00365Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks in combination with a wake-up circuit
    • G07C2009/00373Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks in combination with a wake-up circuit whereby the wake-up circuit is situated in the lock
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00817Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed
    • G07C2009/00825Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys where the code of the lock can be programmed remotely by lines or wireless communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive or capacitive transmission systems
    • H04B5/70Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes
    • H04B5/72Near-field transmission systems, e.g. inductive or capacitive transmission systems specially adapted for specific purposes for local intradevice communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses an unlocking method based on NFC, a related device and a system. In the method, the electronic device works in a PCD mode, and the electronic lock works in a PICC mode. The electronic device and the electronic lock may establish an NFC communication connection based on a radio frequency field generated by the electronic device, and the electronic device may instruct the electronic lock to unlock based on the NFC communication connection. By implementing the technical scheme provided by the application, the power consumption and the cost of the electronic lock can be reduced.

Description

NFC-based unlocking method, related device and system
Technical Field
The present disclosure relates to Near Field Communication (NFC) technologies, and in particular, to an NFC-based unlocking method, a related apparatus and a system.
Background
NFC is a short-distance high-frequency wireless communication technology, and is often applied to various electronic locks, such as door locks, door guards, movable devices with locks, and the like. Unlocking requires two devices to participate: a key and a lock. When based on the NFC unblock, electronic equipment such as cell-phone, intelligent bracelet, intelligent wrist-watch can regard as the electron key, utilizes NFC and electronic lock communication to open the electronic lock. That is to say, the electronic equipment can realize non-contact no-operation unlocking by utilizing NFC, so that the unlocking process is more convenient and faster.
Generally, the electronic lock is powered by a battery, and a user is required to replace the battery of the electronic lock when the battery is exhausted. The electronic lock with low power consumption has stronger cruising ability, and can reduce the times of battery replacement of a user. Therefore, a technical scheme is needed to be provided to reduce the power consumption of the electronic lock and improve the cruising ability of the electronic lock, so as to improve the use experience of a user.
Disclosure of Invention
The application provides an NFC-based unlocking method, a related device and a system. In this application, the electronic lock is as PICC, need not to provide the radio frequency field, and the electronic lock can have lower consumption and cost.
In a first aspect, an embodiment of the present application provides an unlocking method based on NFC, which is applied to an unlocking system based on NFC. The system comprises a first electronic device and an electronic lock, wherein the first electronic device works in a PCD mode, and the electronic lock works in a PICC mode. The method comprises the following steps: the first electronic device generating a radio frequency field; the first electronic device and the electronic lock establish NFC communication connection through the radio frequency field; the first electronic device sends a state switching instruction to the electronic lock based on the NFC communication connection, wherein the state switching instruction is used for indicating that the electronic lock is switched from a locking state to an unlocking state; and responding to the state switching instruction, and switching the electronic lock from the locking state to the unlocking state under the condition that the authentication of the first electronic device is successful.
In the method of the first aspect, the communication mode between the first electronic device and the electronic lock is a passive communication mode, the first electronic device operates in a PCD mode, and the electronic lock operates in a PICC mode. Wherein, the first electronic device operating in the PCD mode means that the first electronic device is configured to generate and provide a radio frequency field during communication, i.e. configured to transmit an RF carrier wave with a certain frequency (e.g. 13.56 MHz). The electronic lock works in the PICC mode, namely the electronic lock does not need to actively generate a radio frequency field, and the electronic lock is used for detecting the radio frequency field generated by the first electronic equipment and transmitting and receiving data by utilizing a load modulation technology.
By implementing the method of the first aspect, the electronic lock is used as the PICC, and the electronic lock can have lower power consumption and cost without providing a radio frequency field.
With reference to the first aspect, in some embodiments, the first electronic device generates a radio frequency field when in the bright screen state and the unlocked state. The screen-on state may refer to that the first electronic device turns on power supply of the display screen to light up part or all of the display screen. After the first electronic device verifies the validity of the identity of the current user, the first electronic device is in an unlocked state. The first electronic device generates a radio frequency field in a screen-on state and an unlocking state, so that the unlocking method based on the NFC provided by the embodiment of the application can be executed only in the screen-on state and the unlocking state of the first electronic device, the electronic lock is prevented from being started in the screen-off state, the screen-locking state or the power-off state of the first electronic device, and the use safety of the electronic lock can be improved.
In combination with the first aspect, in some embodiments, the first electronic device may send the state switching instruction to the electronic lock based on the NFC communication connection in two cases:
1. the first electronic device actively sends a state switching instruction to the electronic lock based on the NFC communication connection. Through the mode of initiatively sending the state switching instruction like this, the user only needs to be close to the electronic lock with first electronic equipment, can accomplish the unblock, convenient and fast.
2. The first electronic device sends the state switching instruction to the electronic lock based on the NFC communication connection in response to the detected operation for switching the state of the electronic lock. By the mode that the user triggers the first electronic device to send the state switching instruction, whether the electronic lock is unlocked can be autonomously determined by the user.
With reference to the first aspect, in some embodiments, an electronic lock includes an NFC module and a controller. The first electronic device and the NFC module establish NFC communication connection through a radio frequency field. After the first electronic device and the NFC module establish the NFC communication connection through the radio frequency field, the method further includes: the NFC module sends a wake-up instruction to the controller, and the controller is switched from a dormant state to a wake-up state in response to the wake-up instruction; the power consumption of the controller in the sleep state is lower than the power consumption of the controller in the wake state. After the controller is switched to the awakening state, the electronic lock can be controlled to be switched from the locking state to the unlocking state. Through this kind of mode, the controller of electronic lock is in the dormant state at ordinary times, gets into the state of awakening up after receiving the NFC module, can practice thrift the consumption of electronic lock, promotes the duration of electronic lock.
With reference to the first aspect, in some embodiments, before the first electronic device sends the state switching instruction to the electronic lock based on the NFC communication connection, the electronic lock may authenticate the first electronic device. Authentication refers to the electronic lock determining whether the first electronic device matches itself. If the two are matched, the authentication is successful, and if the two are not matched, the authentication is failed. The electronic lock is matched with the electronic equipment, that is, the electronic lock and the electronic equipment respectively store the same authentication information. The electronic lock can execute operations of unlocking, modifying authentication information, deleting authentication information and the like under the instruction of the electronic equipment matched with the electronic lock. Here, the authentication information may include a key, an algorithm, or other types of information.
In some embodiments, when the number of times that the electronic lock fails to authenticate the first electronic device reaches a threshold value, the electronic lock enters a deadlock state. In the locking state, the electronic lock is only switched from the locking state to the unlocking state in response to the operation that the physical key rotates after being inserted into the jack of the electronic lock. Through this kind of mode, after unmatched electronic equipment tried to open the electronic lock many times, this electronic lock can get into the dead lock state, can prevent that the electronic lock from receiving exhaustive attack, promotes the safety in utilization of electronic lock.
In some embodiments, in combination with the first aspect, the first electronic device and the electronic lock store the same authentication information, i.e. the first electronic device and the electronic lock match. After the first electronic device and the electronic lock establish the NFC communication connection through the radio frequency field, the first electronic device may instruct the electronic lock to perform any one of the following operations:
1. and modifying the authentication information. Specifically, the first electronic device sends a first instruction to the electronic lock based on the NFC communication connection, where the first instruction carries new authentication information; in response to the first instruction, the electronic lock changes the stored authentication information into the new authentication information if the authentication of the first electronic device is successful; the electronic lock sends a first result to the first electronic device, wherein the first result is used for indicating that the electronic lock changes the stored authentication information into the new authentication information; and the first electronic equipment changes the stored authentication information into the new authentication information.
2. And deleting the authentication information. Specifically, the first electronic device sends a second instruction to the electronic lock based on the NFC communication connection; in response to the second instruction, the electronic lock deletes the stored authentication information under the condition that the authentication of the first electronic device is successful; the electronic lock sends a second result to the first electronic device, wherein the second result is used for indicating the authentication information to be stored by the electronic lock; and the first electronic equipment deletes the stored authentication information. After the first electronic device indicates the electronic lock to delete the authentication information, the first electronic device and the electronic lock are in a unmatched relationship.
3. And establishing a matching relation with other electronic equipment. Specifically, the first electronic device sends a third instruction to the electronic lock based on the NFC communication connection; and responding to the third instruction, and under the condition that the electronic lock successfully authenticates the first electronic device, the electronic lock and the second electronic device establish NFC communication connection and respectively store the same authentication information after negotiation.
In a second aspect, an embodiment of the present application provides an unlocking method based on NFC, where the method is applied to an electronic device side. The method can comprise the following steps: the electronic equipment generates a radio frequency field and establishes NFC communication connection with the electronic lock through the radio frequency field; the electronic device works in a PCD mode, and the electronic lock works in a PICC mode; and sending a state switching instruction to the electronic lock based on the NFC communication connection, wherein the state switching instruction is used for indicating that the electronic lock is switched from a locking state to an unlocking state.
In the method of the second aspect, the communication mode between the electronic device and the electronic lock is a passive communication mode, the electronic device operates in a PCD mode, and the electronic lock operates in a PICC mode. In the method of the second aspect, the electronic lock is used as the PICC, the radio frequency field is not required to be provided, and the electronic lock can have lower power consumption and cost.
In combination with the second aspect, in some embodiments, the electronic device generates a radio frequency field when in the bright screen state and the unlocked state. The electronic device generates the radio frequency field in the screen-on state and the unlocking state, so that the unlocking method based on the NFC provided by the embodiment of the application can be executed only in the screen-on state and the unlocking state of the electronic device, the electronic lock is prevented from being started in the screen-off state, the screen-locking state or the power-off state of the electronic device, and the use safety of the electronic lock can be improved.
In combination with the second aspect, in some embodiments, the electronic device may send the state switching instruction to the electronic lock based on the NFC communication connection in two cases:
1. the electronic device actively sends a state switching instruction to the electronic lock based on the NFC communication connection. Through the mode of initiatively sending the state switching instruction like this, the user only needs to be close to the electronic lock with electronic equipment, can accomplish the unblock, convenient and fast.
2. The electronic device sends the state switching instruction to the electronic lock based on the NFC communication connection in response to the detected operation for switching the state of the electronic lock. By the mode that the user triggers the electronic equipment to send the state switching instruction, whether the electronic lock is unlocked can be autonomously determined by the user.
In combination with the second aspect, in some embodiments, the electronic device and the electronic lock store the same authentication information, i.e., the electronic device and the electronic lock match. After the electronic device and the electronic lock establish the NFC communication connection through the radio frequency field, the electronic device may instruct the electronic lock to perform any one of the following operations:
1. and modifying the authentication information. Specifically, after the electronic device establishes an NFC communication connection with the electronic lock through the radio frequency field, sending a first instruction to the electronic lock based on the NFC communication connection, where the first instruction carries new authentication information, and the first instruction is used to instruct the electronic lock to change the stored authentication information into the new authentication information; receiving a first result sent by the electronic lock, wherein the first result is used for indicating that the electronic lock changes the stored authentication information into the new authentication information; and changing the stored authentication information into the new authentication information.
2. And deleting the authentication information. Specifically, after the electronic device establishes an NFC communication connection with the electronic lock through the radio frequency field, a second instruction is sent to the electronic lock based on the NFC communication connection, where the second instruction is used to instruct the electronic lock to delete the stored authentication information; receiving a second result sent by the electronic lock, wherein the second result is used for indicating that the electronic lock deletes the stored authentication information; deleting the stored authentication information.
3. And establishing a matching relation with other electronic equipment. Specifically, after the electronic device establishes the NFC communication connection with the electronic lock through the radio frequency field, a third instruction is sent to the electronic lock based on the NFC communication connection, where the third instruction is used to instruct the electronic lock and the second electronic device to establish the NFC communication connection and store the same secret key after negotiation.
In a third aspect, an embodiment of the present application provides an unlocking method based on NFC, where the method is applied to an electronic lock side. The method can comprise the following steps: the electronic lock detects a radio frequency field generated by the first electronic device; the electronic lock and the first electronic device establish NFC communication connection through the radio frequency field; the electronic lock receives a state switching instruction sent by the first electronic device based on the NFC communication connection; and responding to the state switching instruction, and switching the electronic lock from the locking state to the unlocking state under the condition that the authentication of the first electronic device is successful. The electronic lock works in a PICC mode, and the electronic equipment works in a PCD mode.
In the method of the third aspect, the communication mode between the electronic device and the electronic lock is a passive communication mode, the electronic device operates in a PCD mode, and the electronic lock operates in a PICC mode. In the method of the third aspect, the electronic lock is used as the PICC, and the electronic lock can have lower power consumption and lower cost without providing a radio frequency field.
With reference to the third aspect, in some embodiments, an electronic lock includes an NFC module and a controller. And the NFC module of the electronic lock and the first electronic equipment establish NFC communication connection through a radio frequency field. After the NFC module of the electronic lock and the first electronic device establish the NFC communication connection through the radio frequency field, the method of the third aspect may further include: the NFC module sends a wake-up instruction to the controller, and the controller is switched from a dormant state to a wake-up state in response to the wake-up instruction; the power consumption of the controller in the sleep state is lower than the power consumption of the controller in the wake state. After the controller is switched to the awakening state, the electronic lock can be controlled to be switched from the locking state to the unlocking state. Through this kind of mode, the controller of electronic lock is in the dormant state at ordinary times, gets into the state of awakening up after receiving the NFC module, can practice thrift the consumption of electronic lock, promotes the duration of electronic lock.
With reference to the third aspect, in some embodiments, before the electronic lock receives the state switching instruction sent by the first electronic device based on the NFC communication connection, the electronic lock may authenticate the first electronic device. Authentication refers to the electronic lock determining whether the first electronic device matches itself. If the two are matched, the authentication is successful, and if the two are not matched, the authentication is failed. The electronic lock is matched with the electronic equipment, that is, the electronic lock and the electronic equipment respectively store the same authentication information. The electronic lock can execute operations of unlocking, modifying authentication information, deleting authentication information and the like under the instruction of the electronic equipment matched with the electronic lock. Here, the authentication information may include a key, an algorithm, or other types of information.
In some embodiments, when the number of times that the electronic lock fails to authenticate the first electronic device reaches a threshold value, the electronic lock enters a deadlock state. In the locking state, the electronic lock is only switched from the locking state to the unlocking state in response to the operation that the physical key rotates after being inserted into the jack of the electronic lock. Through this kind of mode, after unmatched electronic equipment tried to open the electronic lock many times, this electronic lock can get into the dead lock state, can prevent that the electronic lock from receiving exhaustive attack, promotes the safety in utilization of electronic lock.
With reference to the third aspect, in some embodiments, the electronic lock and the first electronic device store the same authentication information, and after the electronic lock and the first electronic device establish an NFC communication connection through the radio frequency field, the electronic lock may further perform any one of the following operations under an instruction of the electronic lock:
1. and modifying the authentication information. Specifically, after the electronic lock and the first electronic device establish NFC communication connection through the radio frequency field, the electronic lock may receive a first instruction sent by the first electronic device; in response to the first instruction, the electronic lock changes the stored authentication information into the new authentication information if the authentication of the first electronic device is successful; the electronic lock sends a first result to the first electronic device, wherein the first result is used for indicating that the electronic lock changes the stored authentication information into the new authentication information.
2. And deleting the authentication information. Specifically, after the electronic lock and the first electronic device establish NFC communication connection through the radio frequency field, the electronic lock may receive a second instruction sent by the first electronic device; in response to the second instruction, the electronic lock deletes the stored authentication information under the condition that the authentication of the first electronic device is successful; the electronic lock sends a second result to the first electronic device, wherein the second result is used for indicating the authentication information to be stored by the electronic lock.
3. And establishing a matching relation with other electronic equipment. Specifically, after the electronic lock and the first electronic device establish NFC communication connection through the radio frequency field, the electronic lock may receive a third instruction sent by the first electronic device; and responding to the third instruction, and under the condition that the electronic lock successfully authenticates the first electronic device, the electronic lock and the second electronic device establish NFC communication connection and respectively store the same authentication information after negotiation.
In a fourth aspect, an embodiment of the present application provides an electronic device, where the electronic device is configured to execute the NFC-based unlocking method described in the second aspect. The electronic device includes: one or more processors, memory, and an NFC module; the memory coupled with the one or more processors, the memory to store computer program code, the computer program code including computer instructions, the one or more processors to invoke the computer instructions to cause the electronic device to perform:
generating a radio frequency field through the NFC module, and establishing NFC communication connection through the radio frequency field and the electronic lock; the electronic device works in a PCD mode, and the electronic lock works in a PICC mode;
and sending a state switching instruction to the electronic lock based on the NFC communication connection, wherein the state switching instruction is used for indicating that the electronic lock is switched from a locking state to an unlocking state.
In some embodiments, in combination with the fourth aspect, the one or more processors invoke the computer instructions to cause the electronic device to perform in particular: and entering a screen-lighting state and an unlocking state.
In some embodiments, in combination with the fourth aspect, the one or more processors invoke the computer instructions to cause the electronic device to perform in particular: actively sending the state switching instruction to the electronic lock based on the NFC communication connection; or, in response to the detected operation for switching the state of the electronic lock, the state switching instruction is sent to the electronic lock based on the NFC communication connection.
In combination with the fourth aspect, in some embodiments, the electronic device and the electronic latch store the same authentication information, and the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: after establishing NFC communication connection with the electronic lock through the radio frequency field, sending a first instruction to the electronic lock based on the NFC communication connection, wherein the first instruction carries new authentication information and is used for indicating the electronic lock to change the stored authentication information into the new authentication information; receiving a first result sent by the electronic lock, wherein the first result is used for indicating that the electronic lock changes the stored authentication information into the new authentication information; and changing the stored authentication information into the new authentication information.
In combination with the fourth aspect, in some embodiments, the electronic device and the electronic latch store the same authentication information, and the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: after the NFC communication connection is established between the radio frequency field and the electronic lock, a second instruction is sent to the electronic lock based on the NFC communication connection, and the second instruction is used for indicating the electronic lock to delete the stored authentication information; receiving a second result sent by the electronic lock, wherein the second result is used for indicating that the electronic lock deletes the stored authentication information; deleting the stored authentication information.
In combination with the fourth aspect, in some embodiments, the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform: after the NFC communication connection is established between the radio frequency field and the electronic lock, a third instruction is sent to the electronic lock based on the NFC communication connection, and the third instruction is used for instructing the electronic lock and the second electronic device to establish the NFC communication connection and storing the same secret key respectively after negotiation.
In a fifth aspect, an embodiment of the present application provides an electronic lock, where the electronic lock is configured to perform the NFC-based unlocking method described in the third aspect. This electronic lock includes: a controller, an NFC module, and a mechanical lock. Wherein:
the NFC module is used for detecting a radio frequency field generated by first electronic equipment and establishing NFC communication connection with the first electronic equipment through the radio frequency field;
the NFC module is further used for receiving a state switching instruction sent by the first electronic device;
the controller is used for responding to the state switching instruction and controlling the mechanical lock to be switched from a locking state to an unlocking state;
the electronic lock works in a PICC mode, and the first electronic device works in a PCD mode.
With reference to the fifth aspect, in some embodiments, the NFC module is further configured to send a wakeup instruction to the controller after establishing the NFC communication connection with the first electronic device; the controller responds to the wake-up instruction to switch from the sleep state to the wake-up state; the power consumption of the controller in the sleep state is lower than the power consumption of the controller in the wake state. The control module is specifically configured to, in the wake-up state, respond to the state switching instruction and control the mechanical lock to be switched from the locked state to the unlocked state.
Here, the controller has two states: a sleep state and a wake state. When the controller is in the dormant state, the electronic lock can suspend providing part of unnecessary functions, such as the analysis work of the signal by the controller, the communication between the control and the mechanical lock, and the like. The power consumption of the electronic lock can be saved in the dormant state, and the cruising ability of the electronic lock is improved.
In the electronic lock provided in the fifth aspect, the mechanical lock has two states: an unlocked state and a locked state. When the mechanical lock is in an unlocked state, the container provided with the electronic lock is in a non-closed state, and a user can interact with objects in the container, for example, the objects in the container can be taken out or new objects can be put in. When the mechanical lock is in a locked state, the container provided with the electronic lock is in a closed state, and a user cannot interact with an object in the container.
The electronic lock provided by the fifth aspect can work in the PICC mode, a radio frequency field does not need to be provided, and the electronic lock can have lower power consumption and lower cost.
In combination with the fifth aspect, in some embodiments, the controller is further configured to authenticate the first electronic device. Authentication refers to the electronic lock determining whether the first electronic device matches itself. If the two are matched, the authentication is successful, and if the two are not matched, the authentication is failed. The electronic lock is matched with the electronic equipment, namely that the controller of the electronic lock and the electronic equipment respectively store the same authentication information. Here, the authentication information may include a key, an algorithm, or other types of information.
In combination with the fifth aspect, in some embodiments, the controller also has error counting capability. Specifically, the controller is configured to control the mechanical lock to enter a locked state when the number of times of authentication failure on the first electronic device reaches a threshold; in the locking state, the mechanical lock is only switched from the locking state to the unlocking state in response to the operation that the physical key rotates after being inserted into the jack of the mechanical lock.
With reference to the fifth aspect, in some embodiments, the electronic lock and the first electronic device store the same authentication information, that is, the electronic lock and the first electronic device are matched. Specifically, the controller is configured to store the authentication information. In the case where the electronic lock and the first electronic device are matched, the electronic lock of the fifth aspect is further configured to perform any one of the following operations under the instruction of the first electronic device:
1. the authentication information is modified. Specifically, after establishing an NFC communication connection with the first electronic device through the radio frequency field, the NFC module is further configured to receive a first instruction sent by the first electronic device, where the first instruction carries new authentication information; the controller is also used for responding to the first instruction to change the stored authentication information into the new authentication information if the authentication of the first electronic equipment is successful; the NFC module is further configured to send a first result to the first electronic device, where the first result is used to indicate that the electronic lock has changed the stored authentication information into the new authentication information.
2. And deleting the authentication information. Specifically, the NFC module is further configured to receive a second instruction sent by the first electronic device after establishing an NFC communication connection with the first electronic device through the radio frequency field; the controller is also used for responding to the second instruction to delete the stored authentication information under the condition that the first electronic equipment is successfully authenticated; the NFC module is further used for sending a second result to the first electronic device, and the second result is used for indicating the authentication information to be stored by the electronic lock.
3. And establishing a matching relation with other electronic equipment. Specifically, the NFC module is further configured to receive a third instruction sent by the first electronic device after establishing an NFC communication connection with the first electronic device through the radio frequency field; the controller is further used for responding to the second instruction to instruct the NFC module to detect a radio frequency field generated by the second electronic device under the condition that the first electronic device is successfully authenticated; the NFC module is also used for establishing NFC communication connection with the second electronic equipment; the controller is further used for negotiating with the second electronic device and respectively storing the same authentication information based on the NFC communication connection established by the NFC module and the second electronic device.
In a sixth aspect, an embodiment of the present application provides a chip applied to the electronic device provided in the fourth aspect, where the chip includes: one or more processors, interfaces. Wherein the interface is configured to receive code instructions and transmit the code instructions to the processor, and the processor is configured to execute the code instructions to cause the electronic device to perform: generating a radio frequency field, and establishing NFC communication connection through the radio frequency field and the electronic lock; the electronic device works in a PCD mode, and the electronic lock works in a PICC mode; and sending a state switching instruction to the electronic lock based on the NFC communication connection, wherein the state switching instruction is used for indicating that the electronic lock is switched from a locking state to an unlocking state.
With reference to the sixth aspect, in some embodiments, the processor is configured to execute the code instructions to cause the electronic device to specifically perform: and entering a screen-lighting state and an unlocking state.
With reference to the sixth aspect, in some embodiments, the processor is configured to execute the code instructions to cause the electronic device to specifically perform: actively sending the state switching instruction to the electronic lock based on the NFC communication connection; or, in response to the detected operation for switching the state of the electronic lock, the state switching instruction is sent to the electronic lock based on the NFC communication connection.
In a seventh aspect, an embodiment of the present application provides a chip, where the chip is applied to the electronic lock provided in the fifth aspect, and the chip includes: one or more processors, interfaces. Wherein: the interface is used for receiving code instructions and transmitting the code instructions to the processor, and the processor is used for executing the code instructions to enable the electronic lock to execute: detecting a radio frequency field generated by a first electronic device; establishing NFC communication connection with the first electronic equipment through the radio frequency field; receiving a state switching instruction sent by the first electronic device based on the NFC communication connection; and responding to the state switching instruction, and switching from the locking state to the unlocking state under the condition that the first electronic equipment is successfully authenticated. The electronic lock works in a PICC mode, and the electronic equipment works in a PCD mode.
With reference to the seventh aspect, in some embodiments, the electronic lock includes an NFC module and a controller. The processor is used for executing the code instructions to enable the electronic lock body to execute: the NFC module and the first electronic device establish NFC communication connection through a radio frequency field. The processor is further configured to execute the code instructions to cause the electronic lock to perform: after the NFC module and the first electronic device establish NFC communication connection through a radio frequency field, the NFC module sends a wake-up instruction to the controller, and the controller is switched from a dormant state to a wake-up state in response to the wake-up instruction; the power consumption of the controller in the sleep state is lower than the power consumption of the controller in the wake state.
In an eighth aspect, an embodiment of the present application provides an NFC-based unlocking system, where the system is configured to execute the NFC-based unlocking method described in the first aspect. The system includes an electronic device and an electronic lock. The electronic device may be the electronic device described in any possible implementation manner of the fourth aspect and the fourth aspect, and the electronic lock may be the electronic lock described in any possible implementation manner of the fifth aspect and the fifth aspect.
In a ninth aspect, the present application provides a computer program product comprising instructions that, when run on an electronic device, cause the electronic device to perform the method as described in the second aspect and any possible implementation manner of the second aspect.
In a tenth aspect, the present application provides a computer-readable storage medium, which includes instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in the second aspect and any possible implementation manner of the second aspect.
In an eleventh aspect, the present application provides a computer program product containing instructions, which, when run on an electronic lock, causes the electronic lock to perform the method described in any one of the possible implementations of the third aspect and the fourth aspect.
In a twelfth aspect, the present application provides a computer-readable storage medium, which includes instructions that, when executed on an electronic lock, cause the electronic lock to perform the method described in any possible implementation manner of the third aspect and the third aspect.
According to the technical scheme, the electronic lock serves as the PICC, a radio frequency field does not need to be provided, and the electronic lock can have low power consumption and low cost.
Drawings
Fig. 1 is a schematic structural diagram of an NFC-based unlocking system provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an electronic lock provided in an embodiment of the present application;
fig. 4 is a flowchart illustrating an NFC-based unlocking method provided in an embodiment of the present application;
FIG. 5 is an exemplary user interface provided by embodiments of the present application;
FIG. 6A is a schematic flowchart illustrating an electronic device instructing an electronic lock to modify authentication information according to an embodiment of the present application;
6B-6C are exemplary user interfaces provided by embodiments of the present application;
fig. 7 is a schematic flowchart illustrating an electronic device indicating that an electronic lock and the electronic device are in a dematching relationship according to an embodiment of the present application;
fig. 8A is a schematic flowchart illustrating an electronic device instructing an electronic lock to establish a matching relationship with another electronic device according to an embodiment of the present application;
fig. 8B is an exemplary user interface provided by an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
First, basic concepts involved in NFC-based communication (hereinafter referred to as NFC communication) are introduced.
NFC communication involves two devices, one being a Proximity Coupling Device (PCD) and one being a proximity card or proximity entity (PICC). PCD may also be referred to as a card reader and PICC may also be referred to as a card. High frequency signal communication may be used over short distances between the PCD and the PICC.
In the NFC-based unlocking method provided in the embodiment of the present application, a communication mode between a PCD and a PICC is a passive mode. The PCD is an active device in NFC communication, and is configured to generate and provide a radio frequency field (RF-field) during communication, that is, an RF carrier for transmitting a certain frequency (for example, 13.56 MHz). The PICC is a passive device in NFC communication, and a radio frequency field does not need to be actively generated. The PICC is used for detecting a radio frequency field generated by the PCD and performing data transceiving by using a load modulation (load modulation) technology.
In the passive communication mode of NFC, PCD is used for providing a radio frequency field, and PICC only needs to detect the field intensity provided by PCD and converts the field intensity into the working power supply of itself, and the PICC configured with the battery can also omit the step of converting the field intensity into the working power supply. The PCD and the PICC are configured with chips for performing their respective functions. The chip capability determines the complexity of its internal structure and the chip area, and thus the chip area of PCD is larger than that of PICC. Since chip area is an important factor in cost, PCD is more costly than PICC. In addition, the PCD needs to provide the radio frequency field continuously or periodically, and needs a continuous power supply, i.e., the power consumption of the PCD is high.
In the following embodiments of the present application, when a device is used as a PCD in NFC communication, it may also be referred to as that the device operates in a PCD mode, and when the device is used as a PICC in NFC communication, it may also be referred to as that the device operates in a PICC mode.
The unlocking principle of the electronic lock is described below.
In the unlocking technology of the electronic lock, an electronic device and an electronic lock which store the same key can form a pair of key and lock, and the electronic device is matched with the electronic lock, or can be regarded as corresponding to the electronic device and the electronic lock. The key may comprise a combination of one or more of a number, letter or symbol. The electronic device can unlock the matched electronic lock. Specifically, in the unlocking process, the electronic lock verifies whether a key stored in the electronic device is consistent with a key stored in the electronic lock, if so, the electronic lock indicates that the electronic device is a key matched with the electronic lock, and the electronic lock can perform one or more of the following operations under the control of the electronic device: unlocking, modifying a key stored in association with the identification of the electronic device, matching other electronic devices, disassociating a match with the electronic device, and the like.
It will be appreciated that an electronic lock may be mated to a plurality of electronic devices, similar to a lock corresponding to a plurality of keys. Referring to table 1, a possible key storage relationship between the electronic device and the electronic lock is shown. As shown in table 1, the electronic lock 1 and the electronic device 1 store the same key 1, the two are matched to form a pair of key and lock, and the electronic device 1 can unlock the electronic lock 1; the electronic lock 1 and the electronic device 2 store the same key 2, the two are matched to form another pair of key and lock, and the electronic device 2 can also unlock the electronic lock 1.
Likewise, one electronic device may be matched to multiple electronic locks. As shown in table 1, the electronic device 1 and the electronic lock 1 store the same key 1, the two are matched to form a pair of key and lock, and the electronic device 1 can unlock the electronic lock 1; the electronic device 1 and the electronic lock 2 store the same key 3, and the two keys are matched to form another pair of key and lock, so that the electronic device 1 can also unlock the electronic lock 2.
Electronic equipment 1 Electronic equipment 2
Electronic lock 1 Key 1 Key 2
Electronic lock 2 Key 3 Key 4
TABLE 1 Key storage relationship between an electronic device and an electronic Lock
In combination with the above mentioned NFC communication and electronic lock unlocking principle, the prior art proposes an unlocking scheme based on NFC. In the existing unlocking scheme based on NFC, an electronic lock is used as PCD in NFC communication to generate and provide a radio frequency field, and electronic devices such as a mobile phone, an intelligent bracelet and an intelligent watch are used as PICC in the NFC communication. The electronic device and the electronic lock may communicate based on NFC, and the electronic lock may be unlocked under the direction of the electronic device if the electronic device and the electronic lock are matched. Taking an example that the electronic door lock is opened by the mobile phone based on the NFC in the prior art as an example, the electronic door lock is used as PCD, and the mobile phone is used as PICC. The electronic door lock generates and provides a radio frequency field, the mobile phone can detect the radio frequency field, the electronic door lock and the mobile phone communicate based on the radio frequency field, and the electronic door lock can be unlocked under the instruction of the mobile phone.
The existing unlocking scheme of taking the electronic lock as PCD and the electronic equipment as PICC has the following defects:
1. the electronic lock has high power consumption and high cost. Electronic locks, which are PCDs in NFC communication, need to be configured with means for generating a radio frequency field for continuous or periodic generation of the radio frequency field, resulting in higher cost and power consumption.
2. The security is low.
At present, when an electronic device such as a mobile phone is in a state of being on and unlocked and no PICC or PCD exists around the electronic device, the electronic device may alternately operate in a PICC mode and a PCD mode; when the PICC or PCD appears around the electronic device, the electronic device continuously works in the corresponding PCD mode or PICC mode. In a state of turning off, locking or turning off, the electronic device, such as a mobile phone, may operate as a PICC, that is, in a state of turning off, locking or turning off, the electronic device, such as a mobile phone, may operate in a PICC mode. Referring to table 2, table 2 shows the operation modes of the electronic device in different states.
Status of state Mode of operation
Bright screen and unlock PICC mode, PCD mode
Screen-off/lock screen/power-off PICC mode
TABLE 2
In the existing NFC-based unlocking scheme, the electronic device needs to operate in the PICC mode as a key. Because the electronic equipment can work in the PICC mode in any states of screen lightening, screen extinguishing, screen locking, shutdown and the like, the electronic equipment can unlock the electronic lock in any states of screen lightening, screen extinguishing, screen locking, shutdown and the like. That is to say, the user need not to verify the identity, can use electronic equipment to open electronic lock, and such scheme has great potential safety hazard.
In view of the shortcomings of the NFC-based unlocking scheme in the prior art, embodiments of the present application provide an NFC-based unlocking method, a related apparatus, and a system. In the unlocking method based on the NFC provided in the embodiment of the application, the electronic device serves as a PCD in NFC communication, and the electronic lock matched with the electronic device serves as a PICC in the NFC communication, and the electronic device can control the electronic lock to perform operations of unlocking, modifying a key stored in association with an identifier of the electronic device, matching with other electronic devices, releasing a matching relationship with the electronic device, and the like based on the NFC communication with the electronic lock. In the NFC-based unlocking method, the electronic lock is used as the PICC, a radio frequency field does not need to be provided, and the electronic lock can have lower power consumption and cost.
The following describes an NFC-based unlocking system provided in the present application. Referring to fig. 1, fig. 1 illustrates an NFC-based unlocking system provided in an embodiment of the present application. As shown in fig. 1, the NFC-based unlocking system may include: electronic equipment 100, electronic lock 200. The electronic device 100 and the electronic lock 200 are matched, i.e. the electronic device 100 and the electronic lock 200 store the same key. Wherein:
the electronic device 100 is a device that can communicate with other devices using NFC. In the NFC-based unlocking method provided by the present application, the electronic device 100 serves as a PCD in NFC communication, that is, the electronic device 100 operates in a PCD mode, and is configured to generate and provide a radio frequency field. The electronic device 100 may communicate with the electronic lock 200 based on the radio frequency field and control the electronic lock 200 to perform operations of unlocking, modifying a key stored in association with an identification of the electronic device 100, matching other electronic devices, releasing a matching relationship with the electronic device 100, and the like.
The type of the electronic device 100 is not limited in the embodiments of the present application, and the electronic device 100 may be a portable electronic device such as a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a wearable device (e.g., a smart band, a smart watch), a laptop computer (laptop) with a touch-sensitive surface (e.g., a touch panel), and the like. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices that carry an iOS, android, microsoft, or other operating system.
The electronic lock 200 may be mounted on a container, the interior of which may be used to place items. The container may include, but is not limited to: luggage, safes, rooms. The electronic lock 200 has two states: an unlocked state and a locked state. When the electronic lock 200 is in the unlocked state, the container is in the non-closed state, and a user can interact with objects in the container, for example, to take out the objects in the container or to put in new objects. When the electronic lock 200 is in the locked state, the container is in the closed state, and the user cannot interact with the objects in the container.
The electronic lock 200 is configured with a mechanical lock by which an unlocked state and a locked state are achieved. The structure of the mechanical lock may include, but is not limited to: single bead structures, blade structures, finger bead structures, dual bead-in-snap structures, interactive bead structures, joggle structures, or hybrid structures, etc.
In the embodiment of the present application, the electronic lock 200 may communicate with the electronic device 100 by using NFC. In the NFC-based unlocking method provided in the present application, the electronic lock 200 serves as a PICC in NFC communication, that is, the electronic lock 200 operates in a PICC mode, and is configured to detect a radio frequency field provided by the electronic device 100 and perform NFC communication with the electronic device 100 by using a load modulation technique. The electronic lock 200 may perform operations of unlocking, modifying a key stored in association with an identifier of the electronic device 100, matching other electronic devices, releasing a matching relationship with the electronic device 100, and the like under the control of the electronic device 100. After receiving the unlocking instruction sent by the electronic device 100 in the locked state, the electronic lock 200 may be switched from the locked state to the unlocked state.
Compared with the unlocking scheme of the electronic lock serving as the PCD in the prior art, the unlocking system based on the NFC provided by the application has the advantages that the electronic lock serving as the PICC does not need to provide a radio frequency field, and therefore the electronic lock can have lower cost and power consumption. In some embodiments, the electronic lock requires only a small amount of power (e.g., power provided by a button cell) to operate.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure.
As shown in fig. 2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In the embodiment of the present application, the wireless communication module 160 may include an NFC module, and the NFC module is used to provide an NFC solution applied to the electronic device 100. Specifically, the NFC module is configured to receive or transmit a radio frequency signal. The NFC module may receive a signal to be transmitted from the processor 110, perform frequency modulation, amplification, and the like on the signal, convert the signal into a radio frequency signal via the antenna, and radiate the radio frequency signal. The NFC module may further receive a radio frequency signal through the antenna, modulate and filter the radio frequency signal, and send the processed signal to the processor 110. The processor 110 may interpret the signal and perform a corresponding operation in response to the signal.
In NFC communication, the electronic device 100 may function as a PCD or a PICC. When the electronic device 100 is operating as a PCD, i.e., when the electronic device 100 is operating in a PCD mode, the NFC module is configured to generate a radio frequency field. When the electronic device 100 is operating as the PICC, that is, when the electronic device 100 operates in the PICC mode, the NFC module is configured to detect a radio frequency field generated by another device.
In some embodiments of the present application, the electronic device 100 may alternatively operate in the PCD mode and the PICC mode when in the bright screen and unlocked state, and operate in the PICC mode when in the off screen state, the locked screen state, or the power off state. Here, the bright screen state may mean that the electronic device 100 turns on the power supply of the display screen 194, and lights part or all of the display screen 194. The off state may refer to the electronic device 100 turning off the power supply of the display 194. The screen locking state may refer to that part of the functions of the electronic device 100 are locked and cannot be used, and the user may use the locked functions only after the user inputs a password or verifies the validity of the identity through a preset method, that is, after the electronic device 100 is unlocked.
In other embodiments of the present application, the electronic device 100 may also operate in the PCD mode or the PICC mode in other states. For example, the electronic device 100 may alternatively operate in the PCD mode and the PICC mode when in the off-screen state.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
In the embodiment of the present application, one or more pieces of electronic lock information may be stored in the internal memory 121. The electronic lock information may include: an identification of the electronic lock that matches the electronic device 100, and a key stored in association with the identification of the electronic lock. The key stored in association with the identification of the electronic lock is also stored in the electronic lock, and can be used for verifying the identity of the other party between the electronic device 100 and the electronic lock as a certificate matching the electronic lock and the electronic device 100. Here, the key stored in association with the identifier of the electronic lock may be an initial key preset when the electronic lock leaves the factory, which is acquired by the electronic device 100, or may be a key after the electronic device 100 and the electronic lock negotiate and modify. Referring to table 1, taking the electronic device 1 as an example, the electronic device 1 may store an identifier and a key 1 of the electronic lock 1 in an associated manner, and may also store an identifier and a key 3 of the electronic lock 2 in an associated manner.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake.
The air pressure sensor 180C is used to measure air pressure.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes).
A distance sensor 180F for measuring a distance.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode.
The ambient light sensor 180L is used to sense the ambient light level.
The fingerprint sensor 180H is used to collect a fingerprint.
The temperature sensor 180J is used to detect temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic lock 200 according to an embodiment of the present application.
As shown in fig. 3, the electronic lock 200 may include: controller 210, NFC module 220, mechanical lock 230, battery 240.
In the embodiment of the present application, the electronic lock 200 may be used as a PICC, that is, the electronic lock 200 operates in the PICC mode.
The NFC module 220 is configured to detect a radio frequency field generated by another device (e.g., the electronic device 100), and implement data transceiving through the detected radio frequency field. Specifically, the NFC module 220 performs data transceiving using a load modulation technique. The NFC module 220 may be configured with an antenna, and the NFC module may modulate information to be transmitted in an inductor inside the antenna (e.g., regularly change the impedance of the inductor), so as to regularly change the load of the inductor inside the antenna in the electronic device 100 within the radio frequency field. The electronic device 100 can detect the change of the load of the inductive coil, read the information sent by the NFC module 220, and implement information transfer.
Controller 210 may include one or more processing units, for example, a modem processor, a digital signal processor, a baseband processor, etc., may be included in controller 210. The different processing units may be separate devices or may be integrated into one or more processors. The controller 210 may generate operation control signals according to the instruction operation code and the timing signals, so as to complete the control of instruction fetching and instruction execution.
The controller 210 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface. The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). The controller 210 may be coupled to the NFC module 220 through an I2C bus interface to enable data transmission with the NFC module 220.
The controller 210 is configured to receive a signal transmitted by the NFC module, parse the signal, and perform a corresponding operation in response to the signal. The controller 210 is further configured to generate a signal to be sent, and send the signal to be sent to the NFC module 210.
A memory may also be provided in the controller 210 for storing instructions and data. In the embodiment of the present application, the memory may store information of one or more electronic devices matching the electronic lock 200. The information of the electronic device may include: an identification of the electronic device that matches the electronic lock 200, and a key stored in association with the identification of the electronic device. The key stored in association with the identification of the electronic device is also stored in the electronic device as a certificate matching the electronic lock 200 and the electronic device. Here, the key stored in association with the identifier of the electronic device may be an initial key pre-stored in the electronic lock 200 when the electronic lock is shipped from a factory, or may be a key modified by negotiation between the electronic lock 200 and an electronic device matching the electronic lock 200. Referring to table 1, taking the electronic lock 1 as an example, the memory of the electronic lock 1 may store an identifier and a key 1 of the electronic device 1 in an associated manner, and may also store an identifier and a key 2 of the electronic device 2 in an associated manner.
The controller 210 is also used to verify whether the electronic device 100 is matched with the electronic lock 200, i.e. whether the keys stored in the electronic device 100 and the electronic lock 200 are the same. This process of verifying whether the electronic device 100 and the electronic lock 200 are matched may also be referred to as an authentication process for the electronic device 100. If the electronic device 100 and the electronic lock are matched, the controller 210 may manage the electronic lock 200 in response to an instruction of the electronic device 100, for example, control the mechanical lock 240 to unlock, modify a key stored in the electronic lock 200 in association with an identification of the electronic device 100, match other electronic devices for the electronic lock 200, release a matching relationship with other electronic devices for the electronic lock, and the like.
In some embodiments of the present application, the controller 210 may have two states: a sleep state and a wake state. The controller 210 may further include an interrupt pin, and the controller 210 may couple the NFC module 220 through the interrupt pin to enable transition between the sleep state and the wake state. Specifically, when the NFC module 220 detects a radio frequency field generated by another device, the NFC module 220 may send an interrupt signal to the controller 210 through an interrupt pin, where the interrupt signal may be used to wake up the controller 210 in a sleep state. When the controller 210 is in the wake-up state, if the signal from the NFC module 220 is not received within a certain time, the controller 210 automatically enters the sleep state. When the controller 210 is in the sleep state, the electronic lock 200 may suspend providing some unnecessary functions, for example, may suspend the operation of interpreting signals by the controller, communication between the controller 210 and the mechanical lock 230, and the like. The dormant state can save the power consumption of the electronic lock 200 and improve the cruising ability of the electronic lock 200.
In some embodiments of the present application, the controller 210 has an error counting capability, and after the number of times of authentication failures of the electronic device 100 reaches a threshold value, the controller 210 may control the electronic lock 200 to no longer respond to the authentication request sent by the electronic device 100. The fact that the electronic lock 200 no longer responds to the authentication request sent by the electronic device 100 may refer to: the NFC module 220 no longer receives the signal transmitted by the electronic device 100, or the NFC module 220 still receives the signal transmitted by the electronic device 100 but the controller 210 does not perform corresponding processing in response to the signal.
The mechanical lock 230 has two states: an unlocked state and a locked state. When the mechanical lock 230 is in the unlocked state, the container with the electronic lock 200 installed therein is in the non-closed state, and a user may interact with objects in the container, for example, to take out the articles in the container or put in new articles. When the mechanical lock 230 is in the locked state, the container with the electronic lock 200 installed therein is in a closed state, and a user cannot interact with objects in the container.
The mechanical lock 230 and the controller 210 may be connected via a data bus, through which the controller 210 may control the mechanical lock to switch between the unlocked state and the locked state.
The structure of the mechanical lock 230 may include, but is not limited to: single bead structures, blade structures, finger bead structures, dual bead-in-snap structures, interactive bead structures, joggle structures, or hybrid structures, etc.
The battery 240 is used to supply power to the respective modules of the electronic lock 200. The battery 240 may include, but is not limited to: dry cells, button cells, rechargeable cells, and the like.
It is understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic lock 200. In other embodiments, the electronic lock 200 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Based on the NFC-based unlocking system shown in fig. 1, the electronic device 100 shown in fig. 2, and the electronic lock 200 shown in fig. 3, the NFC-based unlocking method provided in the embodiment of the present application is described below.
In the NFC-based unlocking method provided in the following embodiments, the electronic device may be the electronic device 100 shown in fig. 2, and the electronic lock may be the electronic lock 200 shown in fig. 3, which may refer to the related description.
In the unlocking method based on the NFC provided by the embodiment of the application, the electronic device works in a PCD mode, and the electronic lock works in a PICC mode. The electronic device may actively generate a radio frequency field. When the distance between the electronic device and the electronic lock is smaller than a preset value (for example, 10 cm), that is, the electronic lock is within the coverage of the radio frequency field, the electronic device can communicate with the electronic lock. The electronic lock can verify whether the electronic equipment is the electronic equipment matched with the electronic lock, and if yes, the electronic equipment can instruct the electronic lock to unlock.
In the unlocking method based on the NFC provided in the embodiment of the present application, the electronic device stores information of one or more electronic locks matched with the electronic device. The information of the electronic lock matched with the electronic equipment comprises: an identification of the electronic lock, and a key stored in association with the identification of the electronic lock. The identity of the electronic lock is used to indicate the electronic lock, and may be a Unique Identifier (UID) of the electronic lock. Referring to table 3, table 3 shows information of the electronic lock stored by the electronic device 1 based on the key storage relationship shown in table 1. As shown in table 3, the electronic device 1 and the electronic lock 1 are matched, and the identifier of the electronic lock 1 and the key 1 are stored in association; the electronic device 1 is also matched with the electronic lock 2 and stores the identification of the electronic lock 2 and the secret key 3 in association.
Electronic lock mark Secret key
Identification of electronic lock 1 Key 1
Identification of electronic lock 2 Key 3
Table 3 electronic lock information stored in the electronic device 1
In the NFC-based unlocking method provided in the embodiment of the present application, the electronic lock stores information of one or more electronic devices that are matched with the electronic lock. The information of the electronic device matched with the electronic lock comprises: an identification of the electronic device, and a key stored in association with the identification of the electronic device. The identifier of the electronic device is used to indicate the electronic device, and may be a media access control address (MAC), an international mobile equipment identity (IMSI), and the like of the electronic device. Referring to table 4, table 4 shows information of the electronic lock stored by the electronic lock 1 based on the key storage relationship shown in table 1. As shown in table 4, the electronic lock 1 and the electronic device 1 are matched, and the identifier of the electronic device 1 and the key 1 are stored in association; the electronic lock 1 is also matched with the electronic device 2 and stores the identification of the electronic device 2 and the secret key 2 in an associated manner.
Electronic equipment identification Secret key
Identification of electronic device 1 Key 1
Identification of the electronic device 2 Key 2
Table 4 electronic lock information stored in the electronic lock 1
In the embodiment of the present application, the electronic device and the electronic lock are matched, which means that the electronic device and the electronic lock store the same secret key. The electronic device and the electronic lock can verify whether the other party is matched with the electronic lock through the key. The electronic device can unlock the electronic lock matched with the electronic device by using the key.
Referring to fig. 4, fig. 4 illustrates a flowchart of an NFC-based unlocking method provided in an embodiment of the present application. As shown in fig. 4, the method may include the steps of:
step S110, the electronic device and the electronic lock establish NFC communication connection through the radio frequency field generated by the electronic device.
In the NFC-based unlocking method provided in the embodiment of the present application, the electronic device operates in a PCD mode as a PCD in NFC communication, and is configured to generate a radio frequency field.
In some embodiments of the present application, the electronic device may be configured to alternately operate in the PCD mode and the PICC mode when in the bright screen and unlocked state, and operate in the PICC mode when in the off screen state, the locked screen state, or the power off state. Such an arrangement is the same as the operation mode of the electronic device in the prior art, and therefore, the electronic device can generate the radio frequency field with the time period of operating in the PCD mode in the bright-screen and unlocked state without changing the operation mode of the electronic device in the prior art. By means of the working mode, the unlocking method based on the NFC provided by the embodiment of the application can be executed only in the screen-on and unlocking states of the electronic equipment, the electronic lock is prevented from being started in the screen-off state, the screen-locking state or the power-off state of the electronic equipment, and the use safety of the electronic lock can be improved.
In other embodiments of the present application, the electronic device may be configured to operate in PCD mode in other states. For example, the electronic device may alternatively operate in the PCD mode and the PICC mode in the off-screen state. In this case, the electronic device may generate the radio frequency field with a time period of operation in the PCD mode.
The process by which the electronic device generates the radio frequency field may include: the processor of the electronic equipment generates a signal to be transmitted, the processor transmits the signal to the NFC module of the electronic equipment, the NFC module performs frequency modulation, amplification and other processing on the signal, the signal is converted into a radio frequency signal by the antenna of the electronic equipment and is radiated out, an electromagnetic field which is transmitted through space is generated, and the electromagnetic field is a radio frequency field generated by the electronic equipment.
After the electronic device generates the radio frequency field, the electronic lock within a predetermined distance (e.g., 10 cm) from the electronic device may detect the radio frequency field. The electronic lock detects the radio frequency field generated by the electronic device, that is, an antenna of the electronic lock receives a radio frequency signal sent by the electronic device.
After the electronic device generates the radio frequency field and the electronic lock detects the radio frequency field, the electronic device and the electronic lock can communicate through the radio frequency field. The communication process between the electronic device and the electronic lock may include: the method comprises the steps of establishing an NFC communication connection, and carrying out a data transmission process based on the established NFC communication connection. Step S110 is a process of establishing an NFC communication connection between the electronic device and the electronic lock, and steps S120 to S160 are a data transmission process performed by the electronic device and the electronic lock based on the established communication connection.
In some embodiments, the process of establishing the NFC communication connection between the electronic device and the electronic lock is a process of establishing a communication connection between the PCD and the PICC. In this process, the electronic device serves as a PCD and the electronic lock serves as a PICC. The process may include the steps of:
step 1, PCD sends REQA (REQuest A)/WUPA (WakeUP A).
The electronic device, as a PCD, transmits either a REQA command or a WUPA command, both of which are used to instruct the PICC that detects the radio frequency field generated by the electronic device to enter a ready mode (ready).
And2, the PICC detecting the radio frequency field sends ATQA (answer To REQuest A) To the PCD.
All PICCs that detect the rf field (i.e., all PICCs within the rf field coverage area) send an ATQA response indicating that they have entered the rf field coverage area of the PCD.
And3, the PCD sends the SSD.
And step 4, the PICC sends SSD RESP to the PCD. The SSD _ RESP response carries a Unique Identifier (UID) of the PICC.
In the conventional NFC PCD and PICC scenarios, there may be multiple PICCs, and at this time, steps 3 and 4 are repeatedly executed, and finally, a PICC is selected by the PCD for communication. In the present embodiment, since there is only one PICC (i.e., electronic lock), steps 3 and 4 are performed only once.
Step 5, the PCD sends SEL _ req (select request).
The PCD sends a SEL _ REQ command, and the SEL _ REQ command is used for selecting one PICC from the PICCs in the radio frequency field coverage range to establish NFC communication connection. The SEL _ REQ carries the UID of the selected PICC.
And 6, the selected PICC sends SAK to the PCD. SAK is the response of the selected PICC to the SEL _ REQ command.
In the above steps 1 to 6, the PCD is an electronic device, and the PICC selected by the PCD is an electronic lock. Through the steps 1 to 6, the NFC connection is successfully established between the electronic equipment and the electronic lock.
It is understood that the above steps 1-6 may be interactions between the NFC module of the electronic lock and the electronic device. The NFC module of the electronic lock may use a communication protocol (e.g., ISO14443-3 communication protocol) between the PICC and the PCD to perform parsing of the signal received in the above step, and use the communication protocol to perform encapsulation of the signal to be transmitted.
It can be understood that the foregoing steps 1 to 6 are only examples, and the electronic device and the electronic lock may also establish the NFC communication connection in other manners, which is not limited in this embodiment of the application.
After the electronic device and the electronic lock successfully establish the NFC communication connection, data transmission may be performed based on the NFC communication connection, that is, the following steps S120 to S160 may be performed.
Step S120, the electronic device sends an authentication request to the electronic lock, wherein the authentication request carries indication information of the first secret key. The first key is a key stored in the electronic device in association with the identifier of the electronic lock, or the first key is a key generated by the electronic device.
If the electronic equipment and the electronic lock are matched, the identification of the electronic lock and the key are stored in the electronic equipment in an associated mode, and the key is the first key. If the electronic device and the electronic lock do not match, the electronic device does not store the identification and the key of the electronic lock in an associated manner, and the electronic device can randomly generate a key as the first key.
In the authentication request, the indication information of the first key may include: data encrypted using the first key, or the first key itself.
When the indication information of the first key is data encrypted by using the first key, the electronic device may request the electronic lock for the data in advance. In some embodiments, the electronic device may request a random number from the electronic lock, and after receiving the random number sent by the electronic lock, encrypt the random number using the first key to obtain another random number. Here, the random number requested from the electronic lock by the electronic device may be referred to as a first random number, and the random number encrypted using the first key may be referred to as a second random number. The second random number may be carried in an authentication request sent by the electronic device to the electronic lock as indication information of the first key. Therefore, the key is not directly transmitted between the electronic equipment and the electronic lock, and whether the keys of the electronic equipment and the electronic lock are consistent or not can be verified, so that the safety of the whole verification process is ensured.
Step S130, the electronic lock receives the authentication request sent by the electronic device, and determines whether the first key is the same as the second key, where the second key is a key stored in the electronic lock in association with the identifier of the electronic device.
After receiving the authentication request sent by the electronic device, the electronic lock may determine whether the first key and the second key are the same by any one of the following manners:
(1) in the authentication request, if the indication information of the first key is the data encrypted by using the first key, the electronic lock may encrypt the same data by using the second key, and compare whether the data encrypted by using the first key is the same as the data encrypted by using the second key. If so, it may be determined that the first key and the second key are the same.
For example, the electronic device requests the electronic lock for a first random number, encrypts the first random number using the first key to obtain a second random number, and sends the second random number to the electronic lock as indication information of the first key. The electronic lock may encrypt the first random number using the second key, and determine whether a value obtained by encrypting the first random number using the second key is the same as the second random number, and if so, may determine that the first key is the same as the second key.
(2) In the authentication request, if the indication information of the first key is the first key itself, the electronic lock may compare the first key and the second key to determine whether the first key and the second key are the same.
If the first key and the second key are the same, it is indicated that the electronic lock and the electronic device store the same key, and the electronic lock and the electronic device are matched. The electronic lock and the electronic device store the same key means that the electronic lock stores the identifier of the electronic device and the key in association, and the electronic device stores the identifier of the electronic lock and the key in association.
Step S140, the electronic lock feeds back an authentication result to the electronic device, where the authentication result is used to indicate whether the electronic device and the electronic lock are matched.
If the determination result in the step S130 is yes, the authentication result is successful, that is, the electronic device and the electronic lock are matched.
If the determination result in the step S130 is negative, the authentication result is failure, that is, the electronic device and the electronic lock are not matched.
In some embodiments of the present application, if the number of times of failure of the authentication result reaches the threshold, the electronic lock may stop responding to the authentication request of the electronic device, and enter a locked state. Since the electronic lock no longer responds to the authentication request of the electronic device, if the electronic lock is in the locked state, the electronic lock cannot perform the unlocking operation under the instruction of the electronic device. In the locking state, the electronic lock is switched from the locking state to the unlocking state only in response to the operation that the physical key rotates after being inserted into the jack of the electronic lock. By setting the threshold value of the number of authentication failures, exhaustive attack can be prevented, and the use safety of the electronic lock is improved.
And step S150, under the condition that the electronic equipment is matched with the electronic lock, the electronic equipment sends a state switching instruction to the electronic lock.
The electronic lock has two states: an unlocked state and a locked state. The state switching instruction is used for indicating the electronic lock to be switched from the unlocking state to the locking state, or the state switching instruction is used for indicating the electronic lock to be switched from the locking state to the unlocking state.
In some embodiments of the present application, if the electronic device and the electronic lock match, the electronic device may actively send a state switching instruction to the electronic lock. Therefore, the user can finish the operations of unlocking, locking and the like only by approaching the electronic equipment to the electronic lock, and the operation is convenient and fast.
In other embodiments of the present application, the electronic device may be matched with the electronic lock, and send a state switching instruction to the electronic lock when receiving an operation for switching the state of the electronic lock. Referring to fig. 5, fig. 5 shows an exemplary user interface 51 provided by the electronic device, and the electronic device may receive an operation for switching the state of the electronic lock on the user interface 51. The user interface 51 may be a page provided by an application installed on the electronic device for managing the electronic lock.
As shown in fig. 5, the user interface 51 may include: a status bar 501, a return key 502, a current page indicator 503, an icon 504, prompt information 505, and a control 506. Wherein:
the status bar 501 may include: one or more signal strength indicators 201A for mobile communication signals (which may also be referred to as cellular signals), an operator name (e.g., "china mobile"), one or more signal strength indicators for wireless fidelity (Wi-Fi) signals, a battery status indicator, a time indicator, etc.
The return key 502 is used to receive a user operation (e.g., a touch operation) in response to which the electronic device can display the last page of the user interface 51. The last page of the user interface 51 may be a home page of an application installed on the electronic device for managing the electronic lock.
The current page indicator 503 is used to indicate the current page, e.g., the text message "electronic lock on luggage" is used to indicate that the currently displayed page is used to manage an electronic lock installed on luggage. Not limited to text information, the current page indicator 503 may also be an icon.
Icon 504 is used to indicate the current status of the electronic lock. The electronic device may obtain the current state of the electronic lock from the electronic lock after receiving the message that the authentication is successful, which is fed back by the electronic lock. The icon 504 may also be used to receive a user operation (e.g., a touch operation) in response to which the electronic device may send a state switching instruction to the electronic lock, the state switching instruction being used to instruct the electronic lock to switch from the locked state to the unlocked state.
The prompt 505 prompts the method for switching the state of the electronic lock, for example, the text message "locked, click on top unlock" is used to prompt the user to unlock the electronic lock by clicking on the icon 504.
The control 506 may be used to manage electronic device information matched with the electronic lock, as described in the following embodiments.
Not limited to the operation received on the icon 504 shown in fig. 5, the user may trigger the electronic device to send a state switching instruction to the electronic lock in other ways. For example, the user may also trigger the electronic device to send a state switching instruction through a voice instruction or a gesture, which is not limited in this embodiment of the application.
Step S160, the electronic lock receives a state switching instruction of the electronic device, and switches states in response to the state switching instruction.
After receiving the state switching instruction of the electronic equipment, the electronic lock can switch the state in response to the state switching instruction. The electronic lock may be switched from the unlocked state to the locked state or from the locked state to the unlocked state (i.e., unlocked) in response to the state switching instruction.
It can be understood that the electronic lock in the embodiment of the present application is configured with a controller, and the controller is a processing hub of the electronic lock. Some steps performed by the electronic lock after detecting the radio frequency field generated by the electronic device, such as step S130 and step S160, may be performed by the controller. That is, the controller may analyze the authentication request sent by the electronic device, determine whether the first key is the same as the second key, and may instruct the mechanical lock in the electronic lock to perform an unlocking or locking operation in response to a state switching instruction sent by the electronic device.
In some embodiments of the present application, a controller in an electronic lock may have two states: a sleep state and a wake state. When the controller is in a dormant state, the electronic lock can suspend providing part of unnecessary functions, so that the power consumption of the electronic lock is saved, and the cruising ability of the electronic lock is improved. When the controller is in the wake-up state, the electronic lock may resume providing most functions, for example, functions required for executing the above steps S130 and S160.
In some embodiments, the controller of the electronic lock may initially be in a sleep state, and after the NFC module detects the radio frequency field generated by the electronic device, the controller may be woken up by the NFC module to transition to a wake state. After the controller is awakened, the electronic lock may perform the steps S130 and S160. By means of the mode, the dormant state and the awakening state of the controller are converted, power consumption of the electronic lock can be saved, and endurance of the electronic lock is improved.
Step S170, the electronic lock feeds back a state switching result to the electronic device, where the state switching result is used to indicate whether the electronic lock successfully switches the state.
In the method described in the embodiment of fig. 4, the electronic device operates in the PCD mode, the electronic lock operates in the PICC mode, and the electronic device actively generates the radio frequency field for supporting NFC communication between the electronic device and the electronic lock. The electronic lock can verify whether the electronic equipment is the electronic equipment matched with the electronic lock, and if yes, the electronic equipment can instruct the electronic lock to unlock. By implementing the NFC-based unlocking method, the electronic lock is used as the PICC without providing a radio frequency field, and the electronic lock can have lower power consumption and cost. In addition, the NFC-based unlocking method is implemented, the electronic equipment and the electronic lock store the secret key locally, the electronic lock can authenticate whether the electronic equipment is matched with the electronic lock without the aid of a network, and if the electronic equipment is matched with the electronic lock, unlocking operation can be completed, so that the NFC-based unlocking method is convenient and fast.
It can be understood that, in the embodiment of the method shown in fig. 4, steps S120 to S140 are processes of the electronic lock verifying whether the electronic device matches the electronic lock, and the processes may also be referred to as authentication processes. In other embodiments of the present application, the authentication is not limited to be performed by using a secret key, and the electronic device and the electronic lock may also be authenticated by using another method, so that the electronic lock verifies whether the electronic device is matched with the electronic lock, and the authentication method is not specifically limited in the present application.
For example, the electronic device and the electronic lock may store the same algorithm without storing the same key, and the electronic device may first initiate an authentication request to the electronic lock; after receiving the authentication request, the electronic lock may generate a random number RAND1, and send the random number RAND1 to the electronic device; the electronic equipment processes the random number RAND1 by using a stored algorithm, generates a random number RAND2 and sends the random number RAND2 to the electronic lock; the electronic lock uses a stored algorithm to process a random number RAND1 generated by the electronic lock, generates a random number RAND3, and judges whether the RAND3 is the same as the received RAND 2; if the two algorithms are the same, the electronic equipment and the electronic lock store the same algorithm, the authentication is successful, and if the two algorithms are not the same, the authentication fails.
That is, in the embodiment of the present application, the electronic device and the electronic lock matching may refer to: the same authentication information is stored in the electronic device and the electronic lock. The authentication information may be a secret key or an algorithm, which is not limited in this embodiment of the present application.
In the embodiment of the present application, one or more electronic devices that are matched with the electronic lock may be classified into a management device and a general device. The number of management devices is one, and the number of general devices may be one or more. In some embodiments, the management device may be an electronic device to which the electronic lock is first paired, and may also be an electronic device selected by the user.
In some embodiments of the present application, after the electronic device receives the authentication result fed back by the electronic lock, that is, after the above steps S110 to S140, if the electronic device and the electronic lock are matched, the electronic device may further instruct the electronic lock to perform more operations.
After receiving the authentication result of successful authentication fed back by the electronic lock, the management device may instruct the electronic lock to perform the following operations: unlocking, modifying the key stored in association with the identification of the management device, releasing the matching relationship with the management device/the ordinary device, and establishing the matching relationship with other electronic devices.
After receiving the authentication result of successful authentication fed back by the electronic lock, the common device may instruct the electronic lock to perform the following operations: unlocking, modifying the key stored in association with the identity of the generic device.
The process of instructing the electronic lock to unlock by the management device or the generic device may refer to the related description of the embodiment of fig. 4.
The following describes a procedure in which a management device or a general device instructs an electronic lock to modify a key. Referring to fig. 6A, the process may include the steps of:
step S210, the electronic device receives an operation for modifying the key, and in response to the operation, the electronic device sends a key modification instruction to the electronic lock, where the key modification instruction carries a new key.
Here, the electronic device may be a management device or a general device.
Referring to fig. 6B and 6C, which illustrate an exemplary user interface provided by the management device, taking the management device as an example, the management device may receive an operation for modifying the key on the user interface 62 shown in fig. 6C.
The user interface 61 shown in fig. 6B is used to present information of the management device and the general device matched with the electronic lock. The user interface 61 may be an interface that the management apparatus opens in response to a user operation (e.g., a touch operation) received on a control 506 in the user interface shown in fig. 5. The user interface 61 may include: status bar 601, return key 602, current page indicator 603, information of managing device 604, control 605, information of general device 606, control 607, control 608.
The status bar 601 can refer to the status bar 501 in the user interface 51 shown in fig. 5, and the details are not repeated here.
The return key 602 is used to receive a user operation (e.g., a touch operation), and in response to the user operation, the management apparatus may display the last page of the user interface 61. The last page of the user interface 61 may be the user interface 51 shown in fig. 5.
The current page indicator 603 is used to indicate the current page, for example, the text message "device management" is used to indicate that the currently displayed page is used to manage the electronic device that matches the electronic lock. Not limited to text information, the current page indicator 603 may also be an icon.
The information 604 of the management device may include an identification, name, or icon of the management device, etc. Control 605 may be used to receive a user operation (e.g., a touch operation) in response to which the managing device may display a page for managing the device.
The information 606 of the generic device may include an identification, name, or icon of the generic device, etc. The control 607 may be used to receive a user operation (e.g., a touch operation) in response to which the management device may display a page for managing the general device.
Here, the information of the management device and the information of the general device may be fed back to the management device by the electronic lock after the management device requests the electronic lock to acquire the device information after successful authentication. Specifically, the management device may send a request for obtaining identifiers of all electronic devices matched with the electronic lock to the electronic lock, and the electronic lock may feed back the identifiers of all electronic devices matched with the electronic lock to the management device in response to the request.
The control 608 may be configured to receive a user operation (e.g., a touch operation), and in response to the user operation, the management device may trigger the electronic lock to establish a matching relationship with another electronic device, that is, add a new generic device to the electronic lock.
The user interface 62 shown in fig. 6C is a page for managing the management device, and the user interface 62 may be opened by the management device in response to a user operation received on the control 605. The user interface 62 may include: status bar 609, return key 610, current page indicator 611, control 612, and control 613.
The status bar 609 can refer to the status bar 501 in the user interface 51 shown in fig. 5, and will not be described in detail here.
The return key 610 is used to receive a user operation (e.g., a touch operation), and in response to the user operation, the management apparatus may display the last page of the user interface 62. The last page of the user interface 62 may be the user interface 61 shown in fig. 6B.
The current page indicator 611 is used to indicate the current page, e.g., the textual information "manage device" is used to indicate that the currently displayed page is used to present and manage device-related content. Not limited to text information, the current page indicator 611 may also be an icon.
Control 612 may be configured to receive a user operation (e.g., a touch operation), in response to which the management device sends a key change instruction to the electronic lock.
The control 613 may be configured to receive a user operation (e.g., a touch operation), and in response to the user operation, the management device sends a device information deletion instruction to the electronic lock.
It will be appreciated that, without being limited to entering user actions on control 612, the user may also trigger the electronic device to send a key change instruction to the electronic lock in other ways. For example, the user may also trigger the electronic device to send a key change instruction to the electronic lock through a voice instruction or a gesture, which is not limited in this embodiment of the application.
Here, the new key carried in the key change instruction may be generated by the electronic device or input by the user, which is not limited in this embodiment of the application.
Step S220, the electronic lock receives the key update instruction, and changes the key stored in association with the identifier of the electronic device into a new key in response to the key change instruction.
Step S230, the electronic lock feeds back a key change result to the electronic device, where the key change result is used to indicate that the electronic lock has successfully changed the key.
Step S240, the electronic device receives the key change result, and changes the key stored in association with the identifier of the electronic lock into a new key.
In other embodiments of the present application, after receiving the operation for modifying the key, the electronic device may also change the key stored in association with the identifier of the electronic lock to a new key, and then send a key change instruction to the electronic lock.
By the method shown in fig. 6A, the electronic device and the electronic lock each update the key, and in the next authentication process, the electronic lock can authenticate whether the electronic device matches itself by using the new key.
In the method embodiment shown in fig. 6A, the key change instruction may also be referred to as a first instruction, and the key change result may also be referred to as a first result.
The following describes a procedure in which the management apparatus instructs the electronic lock release and the management apparatus/general apparatus matching relationship. Referring to fig. 7, the process may include the steps of:
step S310, the management device receives an operation for releasing the matching relationship between the electronic lock and the management device/normal device, and in response to the operation, the management device sends a device information deletion instruction to the electronic lock, where the device information deletion instruction carries an identifier of the management device/normal device.
Referring to fig. 6B, the operation for releasing the matching relationship of the electronic lock and the management device may be an operation (e.g., a touch operation) that the management device receives on the control 613 in the user interface 62. Without being limited to this, the user may also trigger the electronic device to send the device information deletion instruction to the electronic lock by other means. For example, the user may also trigger the electronic device to send a device information deletion instruction to the electronic lock through a voice instruction or a gesture, which is not limited in this embodiment of the application.
Step S320, the electronic lock receives the device information deleting instruction, and deletes the identifier of the management device/generic device and the key stored in association with the identifier according to the identifier of the management device/generic device carried in the device information deleting instruction.
Step S330, the electronic lock feeds back a device information deleting result to the management device, wherein the device information deleting result is used for indicating that the electronic lock has successfully deleted the corresponding device information.
In some embodiments, if the management device receives an operation for releasing the matching relationship between the electronic lock and the management device in step S310, the management device may delete the identification of the electronic lock and the key stored in association with the identification after receiving the device information deletion result. In other embodiments, after receiving an operation for releasing the matching relationship between the electronic lock and the management device, the management device may further delete the identifier of the electronic lock and the key stored in association with the identifier, and then send a device information deletion instruction to the electronic lock.
By the method shown in fig. 7, the electronic device and the electronic lock are released from the matching relationship.
In the method embodiment shown in fig. 7, the device information deletion instruction may also be referred to as a second instruction, and the device information deletion result may also be referred to as a second result.
The following describes a process of the management device instructing the electronic lock to establish a matching relationship with other electronic devices. Referring to fig. 8A, the process may include the steps of:
step S410, the management device receives an operation for establishing a matching relationship between the electronic lock and other electronic devices, and in response to the operation, the management device sends a device adding instruction to the electronic lock.
Referring to fig. 5, the operation for establishing a matching relationship between the electronic lock and the other electronic device may be an operation (e.g., a touch operation) received on a control 608 in the user interface 61. Without being limited thereto, the user may trigger the electronic device to send the add device instruction to the electronic lock by other means. For example, the user may also trigger the electronic device to send a device adding instruction to the electronic lock through a voice instruction or a gesture, which is not limited in this embodiment of the application.
In some embodiments, after receiving the operation for establishing the matching relationship between the electronic lock and the other electronic device, the management device may further prompt the user to place the other electronic device near the electronic lock, so as to match the electronic lock with a new common device. Referring to fig. 8B, one possible way of prompting the user by the management device is shown. As shown in fig. 8B, the management device may prompt the user through a text message 804. The management device may also prompt the user through voice, which is not limited in this embodiment of the present application.
Step S420, the electronic lock receives the device adding instruction, and detects the radio frequency field generated by the other electronic device.
After the user triggers the management device to send a device adding instruction to the electronic lock, the distance between the management device and the electronic lock can be increased, and the distance between other electronic devices and the electronic lock can be reduced, for example, the other electronic devices are close to the electronic lock. When the distance between the other electronic device and the electronic lock is within a preset value (for example, 10 meters), the electronic lock may detect the radio frequency field generated by the other electronic device.
Step S430, after the electronic lock detects the radio frequency field generated by other electronic device, a matching relationship is established based on the radio frequency field and the other electronic device to negotiate a key.
The electronic lock can establish NFC communication connection with other electronic equipment and complete the process of negotiating the key based on the NFC communication connection communication, so as to establish a matching relationship.
Specifically, the step of establishing the matching relationship between the electronic lock and the other electronic device includes storing the identifier of the other electronic device and the negotiated key in the electronic lock in an associated manner, and storing the identifier of the electronic lock and the negotiated key in the other electronic device in an associated manner. The electronic lock and the other electronic device form a pair of a key and a lock.
Step S440, the electronic lock feeds back an execution result of the adding device to the management device, where the execution result is used to indicate that the electronic lock has successfully established a matching relationship with other electronic devices.
By the method shown in fig. 8A, the electronic lock and the other electronic device establish a matching relationship, and the electronic lock and the other electronic device form a pair of a key and a lock.
In the method embodiment shown in FIG. 8A, the add device instruction may also be referred to as a third instruction.
In this embodiment of the application, the electronic device 100 in the NFC-based unlocking system shown in fig. 1 and the electronic devices mentioned in the method embodiments of fig. 4, 6A, 7, and 8A may also be referred to as a first electronic device, and the other electronic devices mentioned in steps S420 to S440 in the method embodiment shown in fig. 8A may also be referred to as a second electronic device. The first electronic device is different from the second electronic device.
In the embodiment of the present application, the electronic device and the electronic lock may communicate with each other by using an Application Protocol Data Unit (APDU). The following describes a general format of an instruction referred to in the embodiments of the present application.
Referring to table 5, table 5 shows a general format of a command referred to in the embodiments of the present application, which is generally transmitted to an electronic lock by an electronic device.
Field(s) Value (carry system: hexadecimal) Means of Length (Unit: byte)
Command 20 Command sign 1
Instructions Specific commands 1
Length of Data field length 1
Data of Specific data N
TABLE 5 Universal Command Format
Referring to table 6, table 6 shows a general format of a response referred to in the embodiment of the present application, where the response is an execution result that is fed back to the electronic device after the electronic lock executes a corresponding operation in response to a command sent by the electronic device. In some embodiments, a status field in the reply may be used to indicate that the command execution result was successful when a "00" is taken and may be used to indicate that the command execution result was failed when a "01" is taken.
Field(s) Value (hexadecimal) Means of Length (byte)
Answering 40 Response sign 1
Instructions Specific responses 1
Length of State plus data field length 1
Status of state Result of command execution 1
Data of Specific data N
TABLE 6 general answer Format
Based on the general command format shown in table 5 and the general response format shown in table 6, several specific commands and specific response formats referred to in the embodiments of the present application are exemplarily listed below.
Table 7 shows a format of a command (GetRandCmd) for the electronic device to request the first random number from the electronic lock, and table 8 shows a format of a response of the electronic lock to the command. The command and the corresponding response of the electronic device to request the first random number from the electronic lock may refer to the related description in the embodiment of fig. 4. In the response shown in table 8, the data field is used to carry the first random number that the electronic lock returns to the electronic device.
Field(s) Value (carry system: hexadecimal) Means of Length (Unit: byte)
Command 20 Command sign 1
Instructions 81 GetRandCmd 1
Length of 00 Data field length 1
Data of Is free of Specific data 0
Table 7 format of command requesting first random number
Field(s) Value (hexadecimal) Means of Length (byte)
Answering 40 Response sign 1
Instructions 81 GetRandCmd 1
Length of 01 or 09 State plus data field length 1
Status of state 00 or 01 Result of command execution 1
Data of Specific data 0 or 8
Table 8 formats for responses to the commands shown in Table 7
Table 9 shows the format of the authentication request (AuthCmd) sent by the electronic device to the electronic lock, and table 10 shows the format of the response (i.e., the authentication result) of the electronic lock to the command. The authentication request and the corresponding response may refer to the relevant description in the embodiment of fig. 4. In the authentication request shown in table 9, the data field is used to carry the first random number, i.e. the second random number, which is returned to the electronic device by the electronic lock and encrypted by the key.
Field(s) Value (carry system: hexadecimal) Means of Length (Unit: byte)
Command 20 Command sign 1
Instructions 82 AuthCmd 1
Length of 09 Data field length 1
Data of Identification of electronic device 1
Data of Encrypting data 8
Table 9 format of authentication request
Figure BDA0002092137300000271
Figure BDA0002092137300000281
TABLE 10 format of authentication result
Table 11 shows a format of a status switching instruction (OpenClockCmd) sent by the electronic device to the electronic lock, and table 12 shows a format of a response (i.e., a status switching result) of the electronic lock to the command. The status switch command and the corresponding response may refer to the related description in the embodiment of fig. 4.
Figure BDA0002092137300000282
TABLE 11 Format of State switch instruction
Field(s) Value (hexadecimal) Means of Length (byte)
Answering 40 Response sign 1
Instructions 87 OpenClockCmd 1
Length of 01 State plus data field length 1
Status of state 00 or 01 Result of command execution 1
Data of Is free of Is free of 0
TABLE 12 Format of State switching result
Table 13 shows the format of the key change instruction (ModifyKeyCmd) sent by the electronic device to the electronic lock, and table 14 shows the format of the response (i.e., the key change result) of the electronic lock to the command. The key change instruction and the corresponding response may refer to the related description in the embodiment of fig. 6A. In the key change instruction shown in table 13, the data field is used to carry the new key.
Field(s) Value (carry system: hexadecimal) Means of Length (Unit: byte)
Command 20 Command sign 1
Instructions 85 ModifyKeyCmd 1
Length of 10 Data field length 1
Data of New key 16
Table 13 format of key change instruction
Figure BDA0002092137300000283
Figure BDA0002092137300000291
Table 14 format of key change result
Table 15 shows the format of a request (GetUserCmd) sent by the management device to the electronic lock to acquire the identities of all electronic devices matching the electronic lock, and table 16 shows the format of a response (i.e., execution result) to the command by the electronic lock. The request for obtaining the electronic device identifier matched with the electronic lock and the corresponding response may refer to the related descriptions in the embodiments of fig. 6A and fig. 6B. In the execution results shown in table 16, the data field is used to carry the identification of all electronic devices that match the electronic lock.
Field(s) Value (carry system: hexadecimal) Means of Length (Unit: byte)
Command 20 Command sign 1
Instructions 86 GetUserCmd 1
Length of 01 Data field length 1
Data of Is free of Is free of 0
Table 15 format of request to obtain electronic device identification for electronic lock matching
Figure BDA0002092137300000292
TABLE 16 Format of execution results
Table 17 shows the format of a device information deletion instruction (deluasicmd) sent by the management device to the electronic lock, and table 18 shows the format of a response to the command (i.e., a device information deletion result) by the electronic lock. The device information deleting instruction and the corresponding response may refer to the related description in the embodiment of fig. 7. In the device information deletion instruction shown in table 17, the data field is used to carry the identifier of the management device/general device that needs to be deleted.
Figure BDA0002092137300000293
Table 17 format of device information deletion instruction
Figure BDA0002092137300000294
Figure BDA0002092137300000301
Table 18 format of device information deletion result
Table 19 shows the format of an add device command (AddUserCmd) sent by the management device to the electronic lock, and table 20 shows the format of a response (i.e., execution result) of the electronic lock to the command. The add device command and corresponding reply may be as described with respect to the embodiment of fig. 8A.
Field(s) Value (carry system: hexadecimal) Means of Length (Unit: byte)
Command 20 Command sign 1
Instructions 83 AddUserCmd 1
Length of 01 Data field length 1
Data of Is free of Is free of 0
Table 19 adds the format of the device instructions
Field(s) Value (hexadecimal) Means of Length (byte)
Answering 40 Response sign 1
Instructions 83 AddUserCmd 1
Length of 01 State plus data field length 1
Status of state 00 or 01 Result of command execution 1
Data of Is free of Is free of 0
Table 20 format of execution result
The embodiments of the present application can be combined arbitrarily to achieve different technical effects.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
In short, the above description is only an example of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present invention are intended to be included within the scope of the present invention.

Claims (18)

1. An NFC-based unlocking method is applied to an NFC-based unlocking system, the system comprises a first electronic device and an electronic lock, the first electronic device works in a PCD mode, and the electronic lock works in a PICC mode; the method comprises the following steps:
the first electronic device generating a radio frequency field;
the first electronic device and the electronic lock establish NFC communication connection through the radio frequency field;
the first electronic device sends a state switching instruction to the electronic lock based on the NFC communication connection, wherein the state switching instruction is used for indicating that the electronic lock is switched from a locking state to an unlocking state;
and responding to the state switching instruction, and switching the electronic lock from a locking state to an unlocking state under the condition that the authentication of the first electronic equipment is successful.
2. The method of claim 1, wherein the first electronic device is in a bright screen state and an unlocked state.
3. The method according to claim 1 or 2, wherein the sending, by the first electronic device, a state switching instruction to the electronic lock based on the NFC communication connection specifically includes:
the first electronic device actively sends the state switching instruction to the electronic lock based on the NFC communication connection;
alternatively, the first and second electrodes may be,
the first electronic device sends the state switching instruction to the electronic lock based on the NFC communication connection in response to the detected operation for switching the state of the electronic lock.
4. The method of any of claims 1-3, wherein the electronic lock comprises an NFC module and a controller,
the first electronic device and the electronic lock establish NFC communication connection through the radio frequency field, and specifically include: the first electronic device and the NFC module establish NFC communication connection through the radio frequency field;
after the first electronic device and the NFC module establish an NFC communication connection through the radio frequency field, the method further includes: the NFC module sends a wake-up instruction to the controller, and the controller is switched from a dormant state to a wake-up state in response to the wake-up instruction; the power consumption of the controller in the sleep state is lower than the power consumption of the controller in the wake state;
the electronic lock is switched from a locking state to an unlocking state, and the method specifically comprises the following steps: the controller controls the electronic lock to be switched from a locking state to an unlocking state.
5. The method of any of claims 1-4, wherein prior to the first electronic device sending a state switch instruction to the electronic lock based on the NFC communication connection, the method further comprises:
and the electronic lock authenticates the first electronic equipment.
6. The method of claim 5, further comprising:
when the number of times that the electronic lock fails to authenticate the first electronic device reaches a threshold value, the electronic lock enters a locking state; in the locking state, the electronic lock is switched from the locking state to the unlocking state only in response to the operation that the physical key rotates after being inserted into the jack of the electronic lock.
7. The method of any of claims 1-6, wherein the first electronic device and the electronic lock store the same authentication information, and wherein after the first electronic device and the electronic lock establish an NFC communication connection via the radio frequency field, the method further comprises:
the first electronic equipment sends a first instruction to the electronic lock based on the NFC communication connection, wherein the first instruction carries new authentication information;
in response to the first instruction, the electronic lock changes the stored authentication information into the new authentication information if the authentication of the first electronic device is successful;
the electronic lock sends a first result to the first electronic device, wherein the first result is used for indicating that the electronic lock changes the stored authentication information into the new authentication information;
and the first electronic equipment changes the stored authentication information into the new authentication information.
8. The method of any of claims 1-6, wherein the first electronic device and the electronic lock store the same authentication information, and wherein after the first electronic device and the electronic lock establish an NFC communication connection via the radio frequency field, the method further comprises:
the first electronic device sends a second instruction to the electronic lock based on the NFC communication connection;
in response to the second instruction, the electronic lock deletes the stored authentication information under the condition that the authentication of the first electronic device is successful;
the electronic lock sends a second result to the first electronic device, wherein the second result is used for indicating the authentication information to be stored by the electronic lock;
and the first electronic equipment deletes the stored authentication information.
9. The method of any of claims 1-6, wherein after the first electronic device and the electronic lock establish an NFC communication connection via the radio frequency field, the method further comprises:
the first electronic device sends a third instruction to the electronic lock based on the NFC communication connection;
and responding to the third instruction, and under the condition that the electronic lock successfully authenticates the first electronic device, the electronic lock and the second electronic device establish NFC communication connection and respectively store the same authentication information after negotiation.
10. An electronic device, comprising: one or more processors, memory, and an NFC module;
the memory coupled with the one or more processors, the memory to store computer program code, the computer program code including computer instructions, the one or more processors to invoke the computer instructions to cause the electronic device to perform:
generating a radio frequency field through the NFC module, and establishing NFC communication connection through the radio frequency field and the electronic lock; the electronic device works in a PCD mode, and the electronic lock works in a PICC mode;
and sending a state switching instruction to the electronic lock based on the NFC communication connection, wherein the state switching instruction is used for indicating that the electronic lock is switched from a locking state to an unlocking state.
11. The electronic device of claim 10, wherein the one or more processors invoke the computer instructions to cause the electronic device to perform in particular:
and entering a screen-lighting state and an unlocking state.
12. The electronic device of claim 10 or 11, wherein the one or more processors invoke the computer instructions to cause the electronic device to perform in particular:
actively sending the state switching instruction to the electronic lock based on the NFC communication connection;
alternatively, the first and second electrodes may be,
and in response to the detected operation for switching the state of the electronic lock, sending the state switching instruction to the electronic lock based on the NFC communication connection.
13. The electronic device of any of claims 10-12, wherein the electronic device and the electronic lock store the same authentication information, and wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform:
after an NFC communication connection is established between the radio frequency field and the electronic lock, a first instruction is sent to the electronic lock based on the NFC communication connection, the first instruction carries new authentication information, and the first instruction is used for indicating the electronic lock to change the stored authentication information into the new authentication information;
receiving a first result sent by the electronic lock, wherein the first result is used for indicating that the electronic lock changes the stored authentication information into the new authentication information;
and changing the stored authentication information into the new authentication information.
14. The electronic device of any of claims 10-12, wherein the electronic device and the electronic lock store the same authentication information, and wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform:
after an NFC communication connection is established between the radio frequency field and the electronic lock, a second instruction is sent to the electronic lock based on the NFC communication connection, and the second instruction is used for instructing the electronic lock to delete the stored authentication information;
receiving a second result sent by the electronic lock, wherein the second result is used for indicating that the electronic lock deletes the stored authentication information;
and deleting the stored authentication information.
15. The electronic device of any of claims 10-14, wherein the one or more processors are further configured to invoke the computer instructions to cause the electronic device to perform:
after the NFC communication connection is established between the radio frequency field and the electronic lock, a third instruction is sent to the electronic lock based on the NFC communication connection, and the third instruction is used for instructing the electronic lock and the second electronic device to establish the NFC communication connection and storing the same secret key after negotiation.
16. A chip, the chip is applied to an electronic device, the chip includes: one or more processors, interfaces;
the interface is configured to receive code instructions and transmit the code instructions to the processor, and the processor is configured to execute the code instructions to cause the electronic device to perform:
generating a radio frequency field, and establishing NFC communication connection through the radio frequency field and the electronic lock; the electronic device works in a PCD mode, and the electronic lock works in a PICC mode;
and sending a state switching instruction to the electronic lock based on the NFC communication connection, wherein the state switching instruction is used for indicating that the electronic lock is switched from a locking state to an unlocking state.
17. The chip of claim 16, wherein the processor is configured to execute the code instructions to cause the electronic device to perform, in particular:
and entering a screen-lighting state and an unlocking state.
18. The chip according to claim 16 or 17, wherein the processor is configured to execute the code instructions to cause the electronic device to perform in particular:
actively sending the state switching instruction to the electronic lock based on the NFC communication connection;
alternatively, the first and second electrodes may be,
and in response to the detected operation for switching the state of the electronic lock, sending the state switching instruction to the electronic lock based on the NFC communication connection.
CN201910506939.8A 2019-06-12 2019-06-12 NFC-based unlocking method, related device and system Pending CN112085872A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910506939.8A CN112085872A (en) 2019-06-12 2019-06-12 NFC-based unlocking method, related device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910506939.8A CN112085872A (en) 2019-06-12 2019-06-12 NFC-based unlocking method, related device and system

Publications (1)

Publication Number Publication Date
CN112085872A true CN112085872A (en) 2020-12-15

Family

ID=73733360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910506939.8A Pending CN112085872A (en) 2019-06-12 2019-06-12 NFC-based unlocking method, related device and system

Country Status (1)

Country Link
CN (1) CN112085872A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113034743A (en) * 2021-03-03 2021-06-25 台铃科技(江苏)股份有限公司 Electric bicycle with NFC intelligence unblock function
WO2022134084A1 (en) * 2020-12-25 2022-06-30 深圳市大疆创新科技有限公司 Control method and apparatus for electronic devices
CN115701158A (en) * 2022-10-28 2023-02-07 重庆长安汽车股份有限公司 Method and device for realizing vehicle control function of Bluetooth entity key RKE

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202362845U (en) * 2011-09-30 2012-08-01 重庆交通大学 Key-less antitheft door lock system
CN105788035A (en) * 2014-12-25 2016-07-20 北京同方微电子有限公司 With the passive intelligence lock that has NFC function card reader mode mobile communication
CN106127888A (en) * 2016-06-14 2016-11-16 天津宅美智能科技有限公司 Smart lock operational approach and smart lock operating system
CN205920526U (en) * 2016-07-04 2017-02-01 东莞市猫头鹰智能科技有限公司 Passive intelligent electronic lock and unlocking control system thereof
US20180115859A1 (en) * 2016-10-24 2018-04-26 Lear Corporation Passive Entry Passive Start Systems Employing Consumer Mobile Devices as Portable Remote Control Units
CN108876973A (en) * 2017-05-15 2018-11-23 天津工业大学 A kind of cell phone application access control system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202362845U (en) * 2011-09-30 2012-08-01 重庆交通大学 Key-less antitheft door lock system
CN105788035A (en) * 2014-12-25 2016-07-20 北京同方微电子有限公司 With the passive intelligence lock that has NFC function card reader mode mobile communication
CN106127888A (en) * 2016-06-14 2016-11-16 天津宅美智能科技有限公司 Smart lock operational approach and smart lock operating system
CN205920526U (en) * 2016-07-04 2017-02-01 东莞市猫头鹰智能科技有限公司 Passive intelligent electronic lock and unlocking control system thereof
US20180115859A1 (en) * 2016-10-24 2018-04-26 Lear Corporation Passive Entry Passive Start Systems Employing Consumer Mobile Devices as Portable Remote Control Units
CN108876973A (en) * 2017-05-15 2018-11-23 天津工业大学 A kind of cell phone application access control system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022134084A1 (en) * 2020-12-25 2022-06-30 深圳市大疆创新科技有限公司 Control method and apparatus for electronic devices
CN113034743A (en) * 2021-03-03 2021-06-25 台铃科技(江苏)股份有限公司 Electric bicycle with NFC intelligence unblock function
CN115701158A (en) * 2022-10-28 2023-02-07 重庆长安汽车股份有限公司 Method and device for realizing vehicle control function of Bluetooth entity key RKE

Similar Documents

Publication Publication Date Title
CN112351322B (en) Terminal device, method and system for realizing touch screen projection through remote controller
WO2021023032A1 (en) Device unlocking method and system, and related device
WO2021036835A1 (en) Bluetooth search method and system, and related apparatus
CN113225690B (en) Bluetooth connection method, system and electronic equipment
CN105993132B (en) The certification of low-power near-field communication
WO2020037795A1 (en) Voice recognition method, wearable device and electronic device
CN112771900B (en) Data transmission method and electronic equipment
CN111124503B (en) Automatic activation method of NFC application and terminal
CN111742361A (en) Method for updating voice wake-up of voice assistant by terminal and terminal
CN114638605A (en) Method and electronic equipment for near field wireless communication
CN112085872A (en) NFC-based unlocking method, related device and system
WO2020216160A1 (en) Automatic routing method for se, and electronic device
CN118051111A (en) High-energy-efficiency display processing method and equipment
CN112469011A (en) Bluetooth pairing method and related device
CN111835530A (en) Group joining method and device
CN113196236A (en) Cross-device authentication method and electronic device
CN113973398A (en) Wireless network connection method, electronic equipment and chip system
CN113343193A (en) Identity verification method and device and electronic equipment
CN113472861B (en) File transmission method and electronic equipment
JP2023543833A (en) Cross-device authentication method and related equipment
CN115119336B (en) Earphone connection system, earphone connection method, earphone, electronic device and readable storage medium
WO2023071940A1 (en) Cross-device method and apparatus for synchronizing navigation task, and device and storage medium
WO2022252812A1 (en) Information protection method and electronic device
CN116340913A (en) Login method, electronic equipment and computer readable storage medium
CN116346976A (en) Multi-screen unlocking method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination