CN108843145A - A kind of method for unlocking based on optic communication, electronic lock and electron key - Google Patents
A kind of method for unlocking based on optic communication, electronic lock and electron key Download PDFInfo
- Publication number
- CN108843145A CN108843145A CN201810316611.5A CN201810316611A CN108843145A CN 108843145 A CN108843145 A CN 108843145A CN 201810316611 A CN201810316611 A CN 201810316611A CN 108843145 A CN108843145 A CN 108843145A
- Authority
- CN
- China
- Prior art keywords
- key
- signal
- electronic
- unlocking
- pool
- 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.)
- Granted
Links
Classifications
-
- E—FIXED CONSTRUCTIONS
- E05—LOCKS; KEYS; WINDOW OR DOOR FITTINGS; SAFES
- E05B—LOCKS; ACCESSORIES THEREFOR; HANDCUFFS
- E05B49/00—Electric permutation locks; Circuits therefor ; Mechanical aspects of electronic locks; Mechanical keys therefor
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME 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/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00571—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by interacting with a central unit
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Lock And Its Accessories (AREA)
Abstract
本发明实施例提供一种基于光通信的开锁方法、电子锁和电子钥匙。方法包括:若判定电子钥匙与电子锁相适配,则将预设密钥池中的任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙;接收所述电子钥匙根据所述预开锁信号发送的开锁信号,并将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作;其中,所述电子钥匙与所述电子锁共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。本发明实施例提供的方法可以有效防止钥匙丢失或被盗取后不法分子开锁,同时弥补了智能锁适用范围局限于个人、易受外界条件干扰的缺陷。
Embodiments of the present invention provide an optical communication-based unlocking method, an electronic lock, and an electronic key. The method includes: if it is determined that the electronic key is compatible with the electronic lock, sending an optical signal corresponding to any key in the preset key pool as a pre-unlocking signal to the electronic key; receiving the electronic key according to the The unlock signal sent by the pre-unlock signal, and the unlock signal is matched with the pre-unlock signal, and if the match is successful, the unlock operation is performed; wherein, the electronic key shares the preset key with the electronic lock pool, the preset key pool is a key set including a plurality of keys, and the unlocking signal is an optical signal corresponding to a key selected by the electronic key from the preset key pool. The method provided by the embodiment of the present invention can effectively prevent criminals from opening the lock after the key is lost or stolen, and at the same time makes up for the defects that the scope of application of the smart lock is limited to individuals and is easily disturbed by external conditions.
Description
技术领域technical field
本发明实施例涉及动态智能密码锁技术领域,尤其涉及一种基于光通信的开锁方法、电子锁和电子钥匙。Embodiments of the present invention relate to the technical field of dynamic intelligent combination locks, in particular to an optical communication-based unlocking method, an electronic lock and an electronic key.
背景技术Background technique
目前,市面上流通的密码锁概括起来主要有两种:第一种是电子密码锁,它具有成本低,抗干扰能力强的优点,但电子密码锁基本采用的是固定键盘式,使得用户在操作时隐蔽性低,容易被人看见或偷拍,使得密码容易被盗取,安全性能低。第二种是智能锁(如:指纹辨别、面部识别、IC卡识别),但这类密码锁的特点是常适用于保密要求高且仅供一小部分人使用的箱、柜或房间等。指纹、面部识别的锁容易受外界条件的限制,抗干扰能力差;IC卡容易丢失,加上成本一般较高,在一定程度上限制了此类成品的推广。At present, there are mainly two types of coded locks circulating on the market: the first is electronic coded locks, which have the advantages of low cost and strong anti-interference ability, but electronic coded locks basically use a fixed keyboard type, so that users can The concealment is low during operation, and it is easy to be seen or secretly photographed, so that the password is easy to be stolen, and the security performance is low. The second is smart locks (such as fingerprint identification, facial recognition, IC card identification), but this type of combination lock is often suitable for boxes, cabinets or rooms with high confidentiality requirements and only used by a small number of people. Fingerprint and facial recognition locks are easily restricted by external conditions and have poor anti-interference ability; IC cards are easy to lose, and the cost is generally high, which limits the promotion of such finished products to a certain extent.
发明内容Contents of the invention
本发明实施例提供一种基于光通信的开锁方法、电子锁和电子钥匙,用以解决现有技术中锁的安全性低、适用范围窄且成本高的缺陷,提高了安全性、扩大了实用范围并降低了成本。Embodiments of the present invention provide an optical communication-based unlocking method, electronic lock, and electronic key to solve the defects of low security, narrow application range, and high cost of locks in the prior art, improve security, and expand practicality. range and reduce costs.
本发明实施例提供一种基于光通信的开锁方法,包括:An embodiment of the present invention provides an optical communication-based unlocking method, including:
若判定电子钥匙与电子锁相适配,则将预设密钥池中的任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙;If it is determined that the electronic key is compatible with the electronic lock, the optical signal corresponding to any key in the preset key pool is sent to the electronic key as a pre-unlock signal;
接收所述电子钥匙根据所述预开锁信号发送的开锁信号,并将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作;receiving an unlocking signal sent by the electronic key according to the pre-unlocking signal, and matching the unlocking signal with the pre-unlocking signal, and performing an unlocking operation if the matching is successful;
其中,所述电子钥匙与所述电子锁共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic key and the electronic lock share the preset key pool, the preset key pool is a key set including a plurality of keys, and the unlocking signal is obtained from the electronic key by the The optical signal corresponding to the key selected in the preset key pool.
本发明实施例提供一种基于光通信的开锁方法,包括:An embodiment of the present invention provides an optical communication-based unlocking method, including:
接收电子锁发送的预开锁信号;Receive the pre-unlock signal sent by the electronic lock;
根据所述预开锁信号从预设密钥池中选取一个密钥,将所述密钥对应的光信号作为开锁信号发送给所述电子锁,以使得所述电子锁在所述开锁信号和所述预开锁信号匹配成功时,执行开锁操作;Select a key from the preset key pool according to the pre-unlocking signal, and send the optical signal corresponding to the key as an unlocking signal to the electronic lock, so that the electronic lock is connected between the unlocking signal and the unlocking signal. When the pre-unlocking signal matches successfully, execute the unlocking operation;
其中,所述电子锁与电子钥匙共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述预开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic lock and the electronic key share the preset key pool, the preset key pool is a set of keys including a plurality of keys, and the pre-unlock signal is the electronic key from the preset key pool. Set the optical signal corresponding to the key selected in the key pool.
本发明实施例提供一种电子锁,包括:An embodiment of the present invention provides an electronic lock, including:
第一控制模块,用于在判定电子钥匙与电子锁相适配时,从预设密钥池中选取任一密钥;The first control module is used to select any key from the preset key pool when it is determined that the electronic key is compatible with the electronic lock;
第一信号输出模块,用于将所述任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙;A first signal output module, configured to send an optical signal corresponding to any key to the electronic key as a pre-unlock signal;
第一信号接收模块,用于接收所述电子钥匙根据所述预开锁信号发送的开锁信号;相应地,所述第一控制模块,还用于将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作;The first signal receiving module is configured to receive the unlocking signal sent by the electronic key according to the pre-unlocking signal; correspondingly, the first control module is also configured to match the unlocking signal with the pre-unlocking signal , if the match is successful, perform the unlock operation;
其中,所述电子钥匙与所述电子锁共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic key and the electronic lock share the preset key pool, the preset key pool is a key set including a plurality of keys, and the unlocking signal is obtained from the electronic key by the The optical signal corresponding to the key selected in the preset key pool.
本发明实施例提供一种电子钥匙,包括:An embodiment of the present invention provides an electronic key, including:
第二信号接收模块,用于接收电子锁发送的预开锁信号;The second signal receiving module is used to receive the pre-unlock signal sent by the electronic lock;
第二控制模块,用于根据所述预开锁信号从预设密钥池中选取一个密钥;A second control module, configured to select a key from a preset key pool according to the pre-unlock signal;
第二信号输出模块,用于将所述密钥对应的光信号作为开锁信号发送给所述电子锁,以使得所述电子锁在所述开锁信号和所述预开锁信号匹配成功时,执行开锁操作;The second signal output module is configured to send the optical signal corresponding to the key to the electronic lock as an unlocking signal, so that the electronic lock performs unlocking when the unlocking signal and the pre-unlocking signal match successfully operate;
其中,所述电子锁与电子钥匙共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述预开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic lock and the electronic key share the preset key pool, the preset key pool is a set of keys including a plurality of keys, and the pre-unlock signal is the electronic key from the preset key pool. Set the optical signal corresponding to the key selected in the key pool.
本发明实施例提供一种电子锁,包括存储器和处理器,所述处理器和所述存储器通过总线完成相互间的通信;所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行本发明实施例所述基于光通信的开锁方法的电子锁侧开锁方法及其任一可选实施例所述方法。An embodiment of the present invention provides an electronic lock, including a memory and a processor, the processor and the memory communicate with each other through a bus; the memory stores program instructions executable by the processor, and the memory stores program instructions that can be executed by the processor. The processor calls the program instructions to execute the unlocking method based on optical communication, the electronic lock side unlocking method in the embodiment of the present invention and the method in any optional embodiment.
本发明实施例提供一种电子钥匙,包括存储器和处理器,所述处理器和所述存储器通过总线完成相互间的通信;所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行本发明实施例所述基于光通信的开锁方法的电子钥匙侧开锁方法及其任一可选实施例所述方法。An embodiment of the present invention provides an electronic key, including a memory and a processor, the processor and the memory communicate with each other through a bus; the memory stores program instructions that can be executed by the processor, the The processor calls the program instructions to execute the electronic key-side unlocking method of the optical communication-based unlocking method in the embodiment of the present invention and the method in any optional embodiment.
本发明实施例提供的一种基于光通信的开锁方法、电子锁和电子钥匙,“按下”钥匙之后,锁会对钥匙发出的信号进行判断,若钥匙与锁相适配,既而锁会向钥匙发出预开锁信号,钥匙收到预开锁信号后才会向锁发送开锁信号,之后锁会验证开锁信号是否与预开锁信号相匹配,最后由锁决定是否开锁。本发明实施例提供的开锁方法,可以有效防止钥匙丢失或被盗取后不法分子开锁,同时弥补了指纹识别锁和面部识别锁等智能锁适用范围局限于个人、易受外界条件干扰的缺陷。达到了使用方便、安全性高的有益效果。An optical communication-based unlocking method, an electronic lock, and an electronic key provided in an embodiment of the present invention. After the key is "pressed", the lock will judge the signal sent by the key. If the key is compatible with the lock, the lock will The key sends out a pre-unlock signal, and the key will send an unlock signal to the lock after receiving the pre-unlock signal, and then the lock will verify whether the unlock signal matches the pre-unlock signal, and finally the lock decides whether to unlock. The unlocking method provided by the embodiment of the present invention can effectively prevent criminals from unlocking after the key is lost or stolen, and at the same time makes up for the defects that the scope of application of smart locks such as fingerprint recognition locks and face recognition locks is limited to individuals and is easily disturbed by external conditions. The beneficial effects of convenient use and high safety are achieved.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明一种基于光通信的开锁方法实施例流程图;Fig. 1 is a flow chart of an embodiment of an unlocking method based on optical communication in the present invention;
图2为本发明一种基于光通信的开锁方法实施例流程图;2 is a flow chart of an embodiment of an optical communication-based unlocking method according to the present invention;
图3为本发明实施例提供的一种光锁的结构图;FIG. 3 is a structural diagram of an optical lock provided by an embodiment of the present invention;
图4为本发明实施例提供的一种光锁的使用流程图;Fig. 4 is a flow chart of using an optical lock provided by an embodiment of the present invention;
图5为本发明一种电子锁实施例结构框图;Fig. 5 is a structural block diagram of an electronic lock embodiment of the present invention;
图6为本发明一种电子钥匙实施例结构框图。Fig. 6 is a structural block diagram of an embodiment of an electronic key according to the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
图1为本发明一种基于光通信的开锁方法实施例流程图,如图1所示,该方法包括:Fig. 1 is a flowchart of an embodiment of an optical communication-based unlocking method according to the present invention. As shown in Fig. 1, the method includes:
若判定电子钥匙与电子锁相适配,则将预设密钥池中的任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙。If it is determined that the electronic key is compatible with the electronic lock, the optical signal corresponding to any key in the preset key pool is sent to the electronic key as a pre-unlocking signal.
接收所述电子钥匙根据所述预开锁信号发送的开锁信号,并将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作。receiving an unlocking signal sent by the electronic key according to the pre-unlocking signal, matching the unlocking signal with the pre-unlocking signal, and performing an unlocking operation if the matching is successful.
其中,所述电子钥匙与所述电子锁共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic key and the electronic lock share the preset key pool, the preset key pool is a key set including a plurality of keys, and the unlocking signal is obtained from the electronic key by the The optical signal corresponding to the key selected in the preset key pool.
在本发明实施例中引入“光锁”概念,光锁为基于无线光通信的密码锁,其包含电子钥匙和电子钥匙两部分。对于一套光锁来说,电子钥匙和电子锁相适配,两者之间基于无线光通信原理实现双向通信。In the embodiment of the present invention, the concept of "optical lock" is introduced. The optical lock is a combination lock based on wireless optical communication, which includes two parts: an electronic key and an electronic key. For a set of optical locks, the electronic key and electronic lock are compatible, and the two-way communication is realized based on the principle of wireless optical communication.
对于一套光锁来说,电子钥匙和电子锁共享一个密钥池,其中,“共享一个密钥池”的意思为:在电子钥匙和电子锁双方互发光信号时,均是基于该密钥池中的密钥来发送光信号的。例如,当电子锁向电子钥匙发送光信号时,是先需要从密钥池中选取一个密钥,然后将该密钥对应的光信号发送给电子钥匙。因为这个密钥池是预先设置的,因此,也可称其为预设密钥池。其中,预设密钥池中包含多个密钥。密钥即特定信号序列,其构成包括起止标志位和数据位,数据位可根据需要更改。需要说明的是,该预设密钥池可以仅位于云端,电子锁和配套的电子钥匙均共享该密钥池。可以理解的是,该预设密钥池也可以同时位于电子锁和电子钥匙中。For a set of optical locks, the electronic key and the electronic lock share a key pool. Among them, "share a key pool" means: when the electronic key and the electronic lock exchange light signals, they are based on the key The keys in the pool are used to send optical signals. For example, when the electronic lock sends an optical signal to the electronic key, it first needs to select a key from the key pool, and then send the optical signal corresponding to the key to the electronic key. Because this key pool is preset, it can also be called a preset key pool. Wherein, the preset key pool includes multiple keys. The key is a specific signal sequence, and its composition includes start and stop flag bits and data bits, and the data bits can be changed as needed. It should be noted that the preset key pool may only be located in the cloud, and both the electronic lock and the supporting electronic keys share the key pool. It can be understood that the preset key pool can also be located in the electronic lock and the electronic key at the same time.
本发明实施例提供的开锁方法,其执行主体为电子锁。首先电子锁需判定用户持有的电子钥匙是否与该电子锁相适配,如果相适配,则电子锁会从预设密钥池中随机抽取一个密钥,将该密钥对应的光信号作为预开锁信号发送给电子钥匙。需要说明的是,不同密钥对应的光信号不同。The unlocking method provided by the embodiment of the present invention is executed by an electronic lock. First of all, the electronic lock needs to determine whether the electronic key held by the user is compatible with the electronic lock. If it is compatible, the electronic lock will randomly extract a key from the preset key pool, and the optical signal corresponding to the key It is sent to the electronic key as a pre-unlock signal. It should be noted that the optical signals corresponding to different keys are different.
当电子钥匙收到电子锁发送的预开锁信号后,持有电子钥匙的用户可根据预开锁信号从预设密钥池中选取一个密钥作为开锁信号发送给电子锁。When the electronic key receives the pre-unlock signal sent by the electronic lock, the user holding the electronic key can select a key from the preset key pool according to the pre-unlock signal and send it to the electronic lock as an unlock signal.
当电子锁收到电子钥匙发送的开锁信号后,将开锁信号与预开锁信号进行匹配,若匹配成功,则电子锁执行开锁操作。When the electronic lock receives the unlocking signal sent by the electronic key, it matches the unlocking signal with the pre-unlocking signal, and if the matching is successful, the electronic lock executes the unlocking operation.
可以知道的是,若持有电子钥匙的用户为光锁的主人,则主人从预设密钥池中选取的密钥一定是正确的,换言之,该密钥对应的光信号即开锁信号一定与预开锁信号匹配。若持有电子钥匙的用户为不法分子,那么不法分子从预设密钥池中选取到正确的密钥的概率极低,换言之,开锁的概率极低。It can be known that if the user holding the electronic key is the owner of the optical lock, the key selected by the owner from the preset key pool must be correct. Pre-unlock signal match. If the user holding the electronic key is a criminal, the probability of the criminal selecting the correct key from the preset key pool is extremely low, in other words, the probability of unlocking is extremely low.
本发明实施例提供的开锁方法,通过“按下”钥匙之后,锁会对钥匙发出的信号进行判断,若钥匙与锁相适配,既而锁会向钥匙发出预开锁信号,钥匙收到预开锁信号后才会向锁发送开锁信号,之后锁会验证开锁信号是否与预开锁信号相匹配,最后由锁决定是否开锁。本发明实施例提供的开锁方法,可以有效防止钥匙丢失或被盗取后不法分子开锁,同时弥补了指纹识别锁和面部识别锁等智能锁适用范围局限于个人、易受外界条件干扰的缺陷。达到了使用方便、安全性高的有益效果。In the unlocking method provided by the embodiment of the present invention, after "pressing" the key, the lock will judge the signal sent by the key. If the key matches the lock, the lock will send a pre-unlock signal to the key, and the key will receive the pre-unlock signal. The unlock signal will be sent to the lock after the signal, and then the lock will verify whether the unlock signal matches the pre-unlock signal, and finally the lock decides whether to unlock. The unlocking method provided by the embodiment of the present invention can effectively prevent criminals from unlocking after the key is lost or stolen, and at the same time makes up for the defects that the scope of application of smart locks such as fingerprint recognition locks and face recognition locks is limited to individuals and is easily disturbed by external conditions. The beneficial effects of convenient use and high safety are achieved.
基于上述实施例,本实施例对如何判定电子钥匙与电子锁相适配作出说明。判定电子钥匙与电子锁相适配,之前还包括:Based on the above embodiments, this embodiment describes how to determine whether the electronic key is compatible with the electronic lock. It is determined that the electronic key is compatible with the electronic lock, which also includes:
接收所述电子钥匙发送的触发信号,若所述触发信号对应的密钥为所述预设密钥池中的任一密钥,则判定所述电子钥匙与所述电子锁相适配。否则,判定所述电子钥匙与所述电子锁不相适配。A trigger signal sent by the electronic key is received, and if the key corresponding to the trigger signal is any key in the preset key pool, it is determined that the electronic key is compatible with the electronic lock. Otherwise, it is determined that the electronic key is not compatible with the electronic lock.
具体地,电子锁接收电子钥匙发送的触发信号,若触发信号对应的密钥为电子锁的预设密钥池中的某一个密钥,则电子锁判定电子钥匙与电子锁相适配。需要说明的是,触发信号为电子钥匙从自身的预设密钥池中随机抽取的一个密钥对应的光信号。Specifically, the electronic lock receives a trigger signal sent by the electronic key, and if the key corresponding to the trigger signal is a certain key in the preset key pool of the electronic lock, the electronic lock determines that the electronic key is compatible with the electronic lock. It should be noted that the trigger signal is an optical signal corresponding to a key randomly drawn by the electronic key from its own preset key pool.
可以理解的是,对于一套光锁来说,其电子钥匙与电子锁共享一个预设密钥池,那么,电子钥匙从该预设密钥池中随机抽取的密钥一定满足“所述触发信号为所述预设密钥池中的任一密钥”这个条件,因此,电子钥匙一定与电子锁相适配。It can be understood that, for a set of optical locks, its electronic key shares a preset key pool with the electronic lock, then, the key randomly extracted by the electronic key from the preset key pool must satisfy the "trigger The signal is any key in the preset key pool", therefore, the electronic key must be compatible with the electronic lock.
本实施例提供的开锁方法,与普通密码锁的开锁方法不同。普通密码锁收到钥匙发出的信号后会直接核对,如果相等就开锁。本实施例提供的开锁方法,在收到钥匙发出的信号1(触发信号)之后,如果触发信号正确,才会从密钥池中抽取并给钥匙发一个信号2,需要说明的是,信号1和信号2没有必然联系。钥匙收到信号2之后,需要使用者判断钥匙应该向锁发什么信号,当使用者使用钥匙向锁发出一个信号3,锁收到信号3之后会根据密钥规则判断信号3是否与锁之前发出的信号2匹配。The unlocking method provided in this embodiment is different from the unlocking method of a common combination lock. Ordinary combination locks will check directly after receiving the signal from the key, and if they are equal, the lock will be unlocked. The unlocking method provided in this embodiment, after receiving the signal 1 (trigger signal) sent by the key, if the trigger signal is correct, it will extract from the key pool and send a signal 2 to the key. It should be noted that the signal 1 There is no necessary connection with signal 2. After the key receives signal 2, the user needs to judge what signal the key should send to the lock. When the user uses the key to send a signal 3 to the lock, the lock will judge whether the signal 3 is the same as that sent by the lock according to the key rules after receiving signal 3. Signal 2 matches.
换言之,钥匙收到预开锁信号后,需要使用者判断应该向锁发什么信号。如果是主人的话,就会依据预开锁信号知道使锁打开的信号是什么样的,就会向锁发开锁信号。锁收到钥匙再次发的信号之后,如果这个信号与锁之前规定的开锁信号相同,则锁就会打开。In other words, after the key receives the pre-unlock signal, the user needs to judge what signal should be sent to the lock. If it is the owner, it will know what kind of signal the lock is opened according to the pre-unlock signal, and it will send an unlock signal to the lock. After the lock receives the signal sent by the key again, if this signal is the same as the unlocking signal specified before the lock, the lock will be opened.
基于上述实施例,若匹配失败,则再次将所述预设密钥池中的任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙,并接收所述电子钥匙发送的开锁信号,并将所述开锁信号与所述预开锁信号进行匹配;若连续匹配失败的次数超过预设报警次数阈值,则执行报警操作。Based on the above embodiment, if the matching fails, send the optical signal corresponding to any key in the preset key pool as a pre-unlock signal to the electronic key again, and receive the unlock signal sent by the electronic key , and match the unlock signal with the pre-unlock signal; if the number of consecutive matching failures exceeds the preset alarm times threshold, an alarm operation is performed.
具体地,若第一次匹配失败,则电子锁会重新从预设密钥池中随机抽取一个密钥作为预开锁信号发送给电子钥匙,电子钥匙再次根据电子钥匙持有者的操作发送开锁信号给电子锁。电子锁将开锁信号和预开锁信号进行匹配,若匹配失败,则再次重复执行上述过程。若连续匹配失败的次数超过预设报警次数阈值,则电子锁执行报警操作。Specifically, if the first match fails, the electronic lock will randomly extract a key from the preset key pool as a pre-unlock signal and send it to the electronic key, and the electronic key will send the unlock signal again according to the operation of the electronic key holder. Give the electronic lock. The electronic lock matches the unlocking signal with the pre-unlocking signal, and if the matching fails, the above process is repeated again. If the number of consecutive matching failures exceeds the preset alarm threshold, the electronic lock will perform an alarm operation.
本发明实施例提供的开锁方法,通过记录连续开锁失败的次数,当次数超过阈值时执行报警,提高了光锁的安全性。The unlocking method provided by the embodiment of the present invention improves the security of the optical lock by recording the number of consecutive unlocking failures and performing an alarm when the number exceeds a threshold.
基于上述实施例,本实施例中的密钥优选为结构相同的二进制序列。每一二进制序列包含起止标志位和数据位。且所有二进制序列对应的十进制数均不同。相应地,将开锁信号与所述预开锁信号进行匹配,之前还包括:对所述预设密钥池中的所有密钥进行编号,不同密钥对应的编号均不同。Based on the above embodiments, the keys in this embodiment are preferably binary sequences with the same structure. Each binary sequence includes start and stop flag bits and data bits. And the decimal numbers corresponding to all binary sequences are different. Correspondingly, matching the unlocking signal with the pre-unlocking signal also includes: numbering all the keys in the preset key pool, and the numbers corresponding to different keys are different.
将开锁信号与预开锁信号进行匹配,进一步包括:Matching the unlock signal with the pre-unlock signal further includes:
若编号为Xi的密钥对应的预开锁信号和编号为Xj的密钥对应的开锁信号满足以下条件:If the pre-unlock signal corresponding to the key numbered X i and the unlock signal corresponding to the key numbered X j meet the following conditions:
其中,Z为所述预设密钥池中的所有密钥的个数,Wherein, Z is the number of all keys in the preset key pool,
则所述开锁信号与所述预开锁信号匹配成功;否则,匹配失败。Then the unlocking signal matches the pre-unlocking signal successfully; otherwise, the matching fails.
具体地,作为一种优选的实施例,假设密钥池中共有Z个密钥,为了方便描述,令Z=2n+1,n为非零正整数,密钥采用二进制编码并且可以与十进制进行转换。设2n+1个信号序列的编号分别为X1、X2、X3、……、X2n+1。X1、X2、X3、……、X2n+1所指代的值为二进制,也可以为该二进制转换成的十进制数值。例如,当判定电子钥匙与电子锁相适配后,电子锁会从预设密钥池中抽取一个编号为Xi的密钥作为预开锁信号发送给电子钥匙,电子钥匙将该预开锁信号对应的二进制序列转换成十进制数值后显示给使用者看,使用者根据该十进制数值,从预设密钥池中抽取一个密钥,将该密钥作为开锁信号发送给电子锁。只有当开锁信号对应的密钥的编号为Xj时,电子锁才执行开锁操作。需要说明的是,此时下标i和j需满足:当i≤n+1时,j=i+n且当i>n+1时,j=i-n-1的条件,才说明开锁信号与预开锁信号相匹配。需要说明的是,上述匹配验证方法只有钥匙的主人知道。Specifically, as a preferred embodiment, assuming that there are Z keys in the key pool, for the convenience of description, let Z=2n+1, n is a non-zero positive integer, and the keys are encoded in binary and can be compared with decimal convert. Assume that the numbers of the 2n+1 signal sequences are respectively X 1 , X 2 , X 3 , . . . , X 2n+1 . The values indicated by X 1 , X 2 , X 3 , . For example, when it is determined that the electronic key is compatible with the electronic lock, the electronic lock will extract a key numbered Xi from the preset key pool as a pre-unlock signal and send it to the electronic key, and the electronic key will correspond to the pre-unlock signal The binary sequence is converted into a decimal value and displayed to the user. According to the decimal value, the user extracts a key from the preset key pool and sends the key to the electronic lock as an unlock signal. Only when the number of the key corresponding to the unlocking signal is Xj , the electronic lock performs the unlocking operation. It should be noted that the subscripts i and j need to meet the following conditions: when i≤n+1, j=i+n and when i>n+1, j=in-1, only then can the unlocking signal and pre-locking signal be explained. The unlock signal matches. It should be noted that only the owner of the key knows the above matching verification method.
图2为本发明一种基于光通信的开锁方法实施例流程图,如图2所示,该方法包括:Fig. 2 is a flow chart of an embodiment of an optical communication-based unlocking method according to the present invention. As shown in Fig. 2, the method includes:
接收电子锁发送的预开锁信号;Receive the pre-unlock signal sent by the electronic lock;
根据所述预开锁信号从预设密钥池中选取一个密钥,将所述密钥对应的光信号作为开锁信号发送给所述电子锁,以使得所述电子锁在所述开锁信号和所述预开锁信号匹配成功时,执行开锁操作;Select a key from the preset key pool according to the pre-unlocking signal, and send the optical signal corresponding to the key as an unlocking signal to the electronic lock, so that the electronic lock is connected between the unlocking signal and the unlocking signal. When the pre-unlocking signal matches successfully, execute the unlocking operation;
其中,所述电子锁与电子钥匙共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述预开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic lock and the electronic key share the preset key pool, the preset key pool is a set of keys including a plurality of keys, and the pre-unlock signal is the electronic key from the preset key pool. Set the optical signal corresponding to the key selected in the key pool.
本发明实施例提供的开锁方法,其执行主体为电子钥匙。电子钥匙接收电子锁发送的预开锁信号后,根据使用者的操作,从预设密钥池中选取一个密钥,并将该密钥对应的光信号作为开锁信号发送给电子锁,以使得电子锁在开锁信号和预开锁信号匹配成功时,执行开锁操作。The unlocking method provided by the embodiment of the present invention is executed by an electronic key. After receiving the pre-unlock signal sent by the electronic lock, the electronic key selects a key from the preset key pool according to the user's operation, and sends the optical signal corresponding to the key to the electronic lock as an unlock signal, so that the electronic When the unlock signal and the pre-unlock signal match successfully, the lock performs an unlock operation.
需要说明的是,本实施例已默认电子锁与电子钥匙相适配。关于如何确定两者是否适配以及如何判定开锁信号与预开锁信号是否匹配的过程已在上述实施例中具体说明,此处不再赘述。It should be noted that, in this embodiment, the electronic lock and the electronic key are matched by default. The process of how to determine whether the two match and how to determine whether the unlocking signal matches the pre-unlocking signal has been specifically described in the above embodiments, and will not be repeated here.
基于上述实施例,所述根据所述预开锁信号从预设密钥池中选取一个密钥,进一步包括:Based on the above embodiment, the selecting a key from the preset key pool according to the pre-unlock signal further includes:
若所述预开锁信号对应的密钥的编号为Xi,则在所述预设密钥池中选取编号为Xj的密钥作为所述开锁信号;其中,If the number of the key corresponding to the pre-unlock signal is X i , then select the key number X j in the preset key pool as the unlock signal; wherein,
Z为所述预设密钥池中的所有密钥的个数。Z is the number of all keys in the preset key pool.
需要说明的是,只有电子钥匙的主人才会知道按照上述方法向电子锁发送开锁信号。It should be noted that only the owner of the electronic key will know to send an unlocking signal to the electronic lock according to the above method.
本发明实施例提供开锁方法,“按下”钥匙之后,锁会对钥匙发出的信号进行判断,若钥匙与锁相适配,既而锁会向钥匙发出预开锁信号,钥匙收到预开锁信号后才会向锁发送开锁信号,之后锁会验证开锁信号是否与预开锁信号相匹配,最后由锁决定是否开锁。本发明实施例提供的开锁方法,可以有效防止钥匙丢失或被盗取后不法分子开锁,同时弥补了指纹识别锁和面部识别锁等智能锁适用范围局限于个人、易受外界条件干扰的缺陷。达到了使用方便、安全性高的有益效果。The embodiment of the present invention provides an unlocking method. After the key is "pressed", the lock will judge the signal sent by the key. If the key is compatible with the lock, the lock will send a pre-unlock signal to the key. After the key receives the pre-unlock signal Only then will the unlock signal be sent to the lock, and then the lock will verify whether the unlock signal matches the pre-unlock signal, and finally the lock decides whether to unlock. The unlocking method provided by the embodiment of the present invention can effectively prevent criminals from unlocking after the key is lost or stolen, and at the same time makes up for the defects that the scope of application of smart locks such as fingerprint recognition locks and face recognition locks is limited to individuals and is easily disturbed by external conditions. The beneficial effects of convenient use and high safety are achieved.
本发明实施例提供一种电子锁,该电子锁包括:An embodiment of the present invention provides an electronic lock, which includes:
第一控制模块,用于在判定电子钥匙与电子锁相适配时,从预设密钥池中选取任一密钥;The first control module is used to select any key from the preset key pool when it is determined that the electronic key is compatible with the electronic lock;
第一信号输出模块,用于将所述任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙;A first signal output module, configured to send an optical signal corresponding to any key to the electronic key as a pre-unlock signal;
第一信号接收模块,用于接收所述电子钥匙根据所述预开锁信号发送的开锁信号;相应地,所述第一控制模块,还用于将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作;The first signal receiving module is configured to receive the unlocking signal sent by the electronic key according to the pre-unlocking signal; correspondingly, the first control module is also configured to match the unlocking signal with the pre-unlocking signal , if the match is successful, perform the unlock operation;
其中,所述电子钥匙与所述电子锁共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic key and the electronic lock share the preset key pool, the preset key pool is a key set including a plurality of keys, and the unlocking signal is obtained from the electronic key by the The optical signal corresponding to the key selected in the preset key pool.
需要说明的是,本发明实施例的电子锁可用于执行图1所示的一种基于光通信的开锁方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。It should be noted that the electronic lock of the embodiment of the present invention can be used to implement the technical solution of an embodiment of an optical communication-based unlocking method shown in FIG. 1 , and its implementation principle and technical effect are similar, and will not be repeated here.
其中,所述第一信号接收模块,还用于接收所述电子钥匙发送的触发信号;相应地,所述第一控制模块,还用于判定所述电子钥匙与所述电子锁是否相适配。Wherein, the first signal receiving module is also used to receive the trigger signal sent by the electronic key; correspondingly, the first control module is also used to determine whether the electronic key is compatible with the electronic lock .
在上述实施例的基础上,本实施例中的电子锁还包括:On the basis of the foregoing embodiments, the electronic lock in this embodiment also includes:
第一显示模块,用于显示所述电子锁的状态信息,所述状态信息包括开锁成功、密码错误和报警中的任一种。The first display module is used to display the status information of the electronic lock, and the status information includes any one of successful unlocking, password error and alarm.
本发明实施例提供一种电子钥匙,该电子钥匙包括:第二信号接收模块,用于接收电子锁发送的预开锁信号;An embodiment of the present invention provides an electronic key, which includes: a second signal receiving module, configured to receive a pre-unlock signal sent by the electronic lock;
第二控制模块,用于根据所述预开锁信号从预设密钥池中选取一个密钥;A second control module, configured to select a key from a preset key pool according to the pre-unlock signal;
第二信号输出模块,用于将所述密钥对应的光信号作为开锁信号发送给所述电子锁,以使得所述电子锁在所述开锁信号和所述预开锁信号匹配成功时,执行开锁操作;The second signal output module is configured to send the optical signal corresponding to the key to the electronic lock as an unlocking signal, so that the electronic lock performs unlocking when the unlocking signal and the pre-unlocking signal match successfully operate;
其中,所述电子锁与电子钥匙共享所述预设密钥池,所述预设密钥池为包含多个密钥的密钥集合,所述预开锁信号为所述电子钥匙从所述预设密钥池中选取的密钥所对应的光信号。Wherein, the electronic lock and the electronic key share the preset key pool, the preset key pool is a set of keys including a plurality of keys, and the pre-unlock signal is the electronic key from the preset key pool. Set the optical signal corresponding to the key selected in the key pool.
需要说明的是,本发明实施例的电子锁可用于执行图2所示的一种基于光通信的开锁方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。It should be noted that the electronic lock of the embodiment of the present invention can be used to implement the technical solution of an embodiment of an optical communication-based unlocking method shown in FIG. 2 , and its implementation principle and technical effect are similar, and will not be repeated here.
作为一个优选实施例,本实施例将结合附图来说明光锁中的电子锁和电子钥匙的通信过程。图3为本发明实施例提供的一种光锁的结构图,如图3所示:As a preferred embodiment, this embodiment will illustrate the communication process between the electronic lock and the electronic key in the light lock with reference to the accompanying drawings. Figure 3 is a structural diagram of an optical lock provided by an embodiment of the present invention, as shown in Figure 3:
电子钥匙由第二信号输出模块、第二信号接收模块和第二控制模块组成。第二信号输出模块输出的是可见光LED光信号,波段范围是380~780nm,通过第二控制模块中的程序控制,电子钥匙可以向电子锁发出特定序列光信号(触发信号),继而也可以通过信号接收模块接收到电子锁向电子钥匙回复的特定序列光信号(预开锁信号)。相对于红外光通信,可见光通信具有无辐射、对人体无伤害、价格便宜以及不易被电磁波干扰等优势。此外可见光通信还具有绿色环保、应用范围广、通信带宽大和数据密度高等优点。The electronic key is composed of a second signal output module, a second signal receiving module and a second control module. The output of the second signal output module is the visible light LED light signal, and the wavelength range is 380-780nm. Through the program control in the second control module, the electronic key can send a specific sequence of light signals (trigger signals) to the electronic lock, and then can also pass The signal receiving module receives a specific sequence of optical signals (pre-unlocking signals) returned by the electronic lock to the electronic key. Compared with infrared optical communication, visible light communication has the advantages of no radiation, no harm to the human body, low price, and not easily interfered by electromagnetic waves. In addition, visible light communication also has the advantages of green environmental protection, wide application range, large communication bandwidth and high data density.
电子锁由第一信号输出模块、第一信号接收模块、第一控制模块和第一显示模块组成。电子锁在接收到电子钥匙发送的触发信号后,能通过第一信号输出模块和第一控制模块向电子钥匙发送预开锁信号,既而接收电子钥匙发出的开锁信号并对其进行密钥验证,最后判断是否执行开锁指令。第一显示模块可以显示开锁、密码错误和报警三种情况。The electronic lock is composed of a first signal output module, a first signal receiving module, a first control module and a first display module. After receiving the trigger signal sent by the electronic key, the electronic lock can send a pre-unlock signal to the electronic key through the first signal output module and the first control module, then receive the unlock signal sent by the electronic key and perform key verification on it, and finally Determine whether to execute the unlock command. The first display module can display three situations of unlocking, password error and alarm.
电子锁的功能模块介绍:Introduction to the functional modules of the electronic lock:
第一信号输出模块包括可见光LED和密钥池,密钥池是一系列密钥的集合,本发明中电子钥匙和电子锁采用同一密钥池,密钥即特定信号序列,其构成包括起止标志位和数据位,其中数据位可以根据需要更改。The first signal output module includes a visible light LED and a key pool. The key pool is a collection of a series of keys. In the present invention, the electronic key and the electronic lock use the same key pool. The key is a specific signal sequence, and its composition includes start and stop signs. bit and data bit, where the data bit can be changed as desired.
第一信号接收模块采用PIN光电二极管,用于将光信号转换为电信号。The first signal receiving module uses a PIN photodiode for converting optical signals into electrical signals.
第一控制模块包括密钥验证和无线光通信控制。主要用于密钥验证和系统控制。The first control module includes key verification and wireless optical communication control. Mainly used for key verification and system control.
作为一个优选实施例,本实施例将结合附图来说明光锁中的电子锁和电子钥匙的使用过程。图4为本发明实施例提供的一种光锁的使用流程图,如图4所示:As a preferred embodiment, this embodiment will illustrate the use process of the electronic lock and the electronic key in the optical lock with reference to the accompanying drawings. Fig. 4 is a flow chart of using an optical lock provided by an embodiment of the present invention, as shown in Fig. 4:
步骤一:电子钥匙和电子锁初始化。Step 1: Electronic key and electronic lock initialization.
步骤二:电子钥匙通过信号输出模块从自身的密钥池中随机抽取一个密钥作为触发信号发送给电子锁。Step 2: The electronic key randomly extracts a key from its own key pool through the signal output module as a trigger signal and sends it to the electronic lock.
步骤三:利用无线光通信,电子锁的信号接收模块接收触发信号并通过控制模块中已编好的程序判断触发信号是否符合要求。经验证,若触发信号是电子锁的密钥池中密钥之一,则说明触发信号符合要求,电子锁被触发,之后电子锁的信号输出模块会从密钥池中随机抽取一个密钥作为预开锁信号1发送给电子钥匙。若触发信号不符合要求,电子锁将没有反应。Step 3: Using wireless optical communication, the signal receiving module of the electronic lock receives the trigger signal and judges whether the trigger signal meets the requirements through the programmed program in the control module. After verification, if the trigger signal is one of the keys in the key pool of the electronic lock, it means that the trigger signal meets the requirements, the electronic lock is triggered, and then the signal output module of the electronic lock will randomly extract a key from the key pool as The pre-unlock signal 1 is sent to the electronic key. If the trigger signal does not meet the requirements, the electronic lock will not respond.
步骤四:电子钥匙的信号接收模块接收由电子锁发送的预开锁信号1,通过控制模块中已编好的程序对预开锁信号1进行分析,继而使用者根据分析结果,通过电子钥匙向电子锁发送一个开锁信号1。Step 4: The signal receiving module of the electronic key receives the pre-unlock signal 1 sent by the electronic lock, and analyzes the pre-unlock signal 1 through the programmed program in the control module, and then the user sends the electronic key to the electronic lock according to the analysis result. Send an unlock signal 1.
步骤五:电子锁的信号接收模块接收开锁信号1,通过控制模块中已编好的程序判断开锁信号1是否与之前电子锁的信号输出模块发出的预开锁信号1相匹配。若开锁信号1与预开锁信号1相匹配,则显示模块中代表“开锁”的指示灯亮,锁打开。若开锁信号1与预开锁信号1不匹配,则显示模块中代表“密码错误”的指示灯亮,锁保持关闭状态,同时电子锁会重新从密钥池中任意抽取一个密钥作为预开锁信号2发送给电子钥匙,重复步骤四,电子钥匙会依据密钥规则和预开锁信号2再次向电子锁发送一个开锁信号2,之后电子锁会再次判断开锁信号2与预开锁信号2是否匹配,如此类推,电子锁最多可以向电子钥匙发送三次预开锁信号,若电子锁收到的开锁信号与先前发出的预开锁信号相匹配,则显示模块中代表“开锁”的指示灯亮,锁打开;若不匹配,则显示模块中代表“密码错误”的指示灯亮,锁保持关闭状态。若三次之后,密码依然错误,则显示模块中代表“报警”的指示灯亮,系统会自锁,将无法进行输入。Step 5: The signal receiving module of the electronic lock receives the unlocking signal 1, and judges whether the unlocking signal 1 matches the pre-unlocking signal 1 sent by the signal output module of the electronic lock through the programmed program in the control module. If the unlocking signal 1 matches the pre-unlocking signal 1, the indicator light representing "unlocking" in the display module is on, and the lock is opened. If the unlock signal 1 does not match the pre-unlock signal 1, the indicator light representing "password error" in the display module will be on, and the lock will remain closed, and at the same time, the electronic lock will randomly extract a key from the key pool as the pre-unlock signal 2 Send to the electronic key, repeat step 4, the electronic key will send an unlock signal 2 to the electronic lock again according to the key rules and the pre-unlock signal 2, and then the electronic lock will judge whether the unlock signal 2 matches the pre-unlock signal 2 again, and so on , the electronic lock can send a pre-unlock signal to the electronic key three times at most, if the unlock signal received by the electronic lock matches the previously sent pre-unlock signal, the indicator light representing "unlock" in the display module is on, and the lock is opened; if it does not match , the indicator light representing "wrong password" in the display module is on, and the lock remains closed. If the password is still wrong after three times, the indicator light representing "alarm" in the display module will be on, and the system will be self-locked, and input will not be possible.
步骤六:当系统出现自锁状态时,使用者须按下复位键,将系统重新复位,恢复正常工作。Step 6: When the system is in a self-locking state, the user must press the reset button to reset the system and resume normal operation.
图5为本发明一种电子锁实施例结构框图,如图5所示,所述开锁设备包括:处理器(processor)501、存储器(memory)502和总线503;其中,所述处理器501和所述存储器502通过所述总线503完成相互间的通信;所述处理器501用于调用所述存储器502中的程序指令,以执行上述各方法实施例所提供的方法,例如包括:若判定电子钥匙与电子锁相适配,则将预设密钥池中的任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙;接收所述电子钥匙根据所述预开锁信号发送的开锁信号,并将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作。Fig. 5 is a structural block diagram of an embodiment of an electronic lock according to the present invention. As shown in Fig. 5, the unlocking device includes: a processor (processor) 501, a memory (memory) 502 and a bus 503; wherein, the processor 501 and The memory 502 communicates with each other through the bus 503; the processor 501 is used to call the program instructions in the memory 502 to execute the methods provided in the above method embodiments, for example, including: If the key is compatible with the electronic lock, the optical signal corresponding to any key in the preset key pool is sent to the electronic key as a pre-unlock signal; the unlock signal sent by the electronic key according to the pre-unlock signal is received. signal, and match the unlock signal with the pre-unlock signal, and if the match is successful, execute the unlock operation.
图6为本发明一种电子钥匙实施例结构框图,如图6所示,所述定位设备包括:处理器(processor)601、存储器(memory)602和总线603;其中,所述处理器601和所述存储器602通过所述总线603完成相互间的通信;所述处理器601用于调用所述存储器602中的程序指令,以执行上述各方法实施例所提供的方法,例如包括:接收电子锁发送的预开锁信号;根据所述预开锁信号从预设密钥池中选取一个密钥,将所述密钥对应的光信号作为开锁信号发送给所述电子锁,以使得所述电子锁在所述开锁信号和所述预开锁信号匹配成功时,执行开锁操作Fig. 6 is a structural block diagram of an embodiment of an electronic key according to the present invention. As shown in Fig. 6, the positioning device includes: a processor (processor) 601, a memory (memory) 602 and a bus 603; wherein, the processor 601 and The memory 602 communicates with each other through the bus 603; the processor 601 is used to call the program instructions in the memory 602 to execute the methods provided in the above method embodiments, for example, including: receiving an electronic lock The pre-unlock signal sent; according to the pre-unlock signal, a key is selected from the preset key pool, and the optical signal corresponding to the key is sent to the electronic lock as an unlock signal, so that the electronic lock is When the unlocking signal and the pre-unlocking signal match successfully, perform an unlocking operation
本发明实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的方法,例如包括:若判定电子钥匙与电子锁相适配,则将预设密钥池中的任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙;接收所述电子钥匙根据所述预开锁信号发送的开锁信号,并将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作。An embodiment of the present invention discloses a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, The computer can execute the methods provided by the above method embodiments, for example, including: if it is determined that the electronic key is compatible with the electronic lock, then sending the optical signal corresponding to any key in the preset key pool as a pre-unlock signal to The electronic key: receiving an unlocking signal sent by the electronic key according to the pre-unlocking signal, and matching the unlocking signal with the pre-unlocking signal, and performing an unlocking operation if the matching is successful.
本发明实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的方法,例如包括:接收电子锁发送的预开锁信号;根据所述预开锁信号从预设密钥池中选取一个密钥,将所述密钥对应的光信号作为开锁信号发送给所述电子锁,以使得所述电子锁在所述开锁信号和所述预开锁信号匹配成功时,执行开锁操作。An embodiment of the present invention discloses a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, The computer can execute the methods provided by the above-mentioned method embodiments, for example, including: receiving a pre-unlock signal sent by the electronic lock; selecting a key from a preset key pool according to the pre-unlock signal; The optical signal is sent to the electronic lock as an unlocking signal, so that the electronic lock performs an unlocking operation when the unlocking signal and the pre-unlocking signal match successfully.
本发明实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述各方法实施例所提供的方法,例如包括:若判定电子钥匙与电子锁相适配,则将预设密钥池中的任一密钥对应的光信号作为预开锁信号发送给所述电子钥匙;接收所述电子钥匙根据所述预开锁信号发送的开锁信号,并将所述开锁信号与所述预开锁信号进行匹配,若匹配成功,则执行开锁操作。An embodiment of the present invention provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the methods provided in the above method embodiments, for example Including: if it is determined that the electronic key is compatible with the electronic lock, then sending the optical signal corresponding to any key in the preset key pool as a pre-unlocking signal to the electronic key; receiving the electronic key according to the preset The unlocking signal is sent by the unlocking signal, and the unlocking signal is matched with the pre-unlocking signal, and if the matching is successful, the unlocking operation is performed.
本发明实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述各方法实施例所提供的方法,例如包括:接收电子锁发送的预开锁信号;根据所述预开锁信号从预设密钥池中选取一个密钥,将所述密钥对应的光信号作为开锁信号发送给所述电子锁,以使得所述电子锁在所述开锁信号和所述预开锁信号匹配成功时,执行开锁操作。An embodiment of the present invention provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the methods provided in the above method embodiments, for example It includes: receiving a pre-unlock signal sent by the electronic lock; selecting a key from a preset key pool according to the pre-unlock signal, and sending an optical signal corresponding to the key to the electronic lock as an unlock signal, so that The electronic lock performs an unlocking operation when the unlocking signal and the pre-unlocking signal match successfully.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the above description of the implementations, those skilled in the art can clearly understand that each implementation can be implemented by means of software plus a necessary general hardware platform, and of course also by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic discs, optical discs, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810316611.5A CN108843145B (en) | 2018-04-10 | 2018-04-10 | An optical communication-based unlocking method, electronic lock and electronic key |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810316611.5A CN108843145B (en) | 2018-04-10 | 2018-04-10 | An optical communication-based unlocking method, electronic lock and electronic key |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108843145A true CN108843145A (en) | 2018-11-20 |
| CN108843145B CN108843145B (en) | 2019-07-16 |
Family
ID=64211928
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810316611.5A Active CN108843145B (en) | 2018-04-10 | 2018-04-10 | An optical communication-based unlocking method, electronic lock and electronic key |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108843145B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110656819A (en) * | 2019-09-18 | 2020-01-07 | 上海电机学院 | An optical signal intelligent lock based on embedded system |
| CN115063907A (en) * | 2021-12-30 | 2022-09-16 | 广西金网通电子科技有限公司 | Data processing method, equipment and system |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105321236A (en) * | 2014-07-30 | 2016-02-10 | 许加庆 | Bluetooth bidirectional communication intelligent lock |
| CN105931331A (en) * | 2016-04-20 | 2016-09-07 | 上海斐讯数据通信技术有限公司 | Intelligent lock based on optical communication and unlocking method |
| US20170103595A1 (en) * | 2015-10-09 | 2017-04-13 | Wal-Mart Stores, Inc. | Apparatus and method for securing merchandise with optical lock and key |
-
2018
- 2018-04-10 CN CN201810316611.5A patent/CN108843145B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105321236A (en) * | 2014-07-30 | 2016-02-10 | 许加庆 | Bluetooth bidirectional communication intelligent lock |
| US20170103595A1 (en) * | 2015-10-09 | 2017-04-13 | Wal-Mart Stores, Inc. | Apparatus and method for securing merchandise with optical lock and key |
| CN105931331A (en) * | 2016-04-20 | 2016-09-07 | 上海斐讯数据通信技术有限公司 | Intelligent lock based on optical communication and unlocking method |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110656819A (en) * | 2019-09-18 | 2020-01-07 | 上海电机学院 | An optical signal intelligent lock based on embedded system |
| CN115063907A (en) * | 2021-12-30 | 2022-09-16 | 广西金网通电子科技有限公司 | Data processing method, equipment and system |
| CN115063907B (en) * | 2021-12-30 | 2024-03-22 | 广西处处通电子科技有限公司 | Data processing method, device and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108843145B (en) | 2019-07-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN204791234U (en) | Opening system | |
| US20080065900A1 (en) | Method and apparatus for biometrics | |
| CN104717069B (en) | Based on the electronic transaction identification method of face recognition | |
| CN204833406U (en) | An electronic lock based on user identity feature recognition | |
| CN1972186A (en) | A mobile identity authentication system and its authentication method | |
| CN103699995A (en) | Payment authentication method based on fingerprints and finger veins | |
| CN105225314A (en) | A kind of dynamic two-dimension code door control system based on pseudo-random sequence | |
| CN106780866A (en) | Gate control system based on living things feature recognition | |
| CN105430015A (en) | Dynamic password lock | |
| CN110210855A (en) | Hardware wallet illegal method and system based on biological identification technology | |
| AU2020210529B2 (en) | Offline interception-free interaction with a cryptocurrency network using a network-disabled device | |
| Teh et al. | NFC smartphone based access control system using information hiding | |
| Ayoup et al. | Cancellable Multi-Biometric Template Generation Based on Arnold Cat Map and Aliasing. | |
| CN108510635A (en) | A kind of intelligent lock system and its method for unlocking based on light sensation identification | |
| CN108843145B (en) | An optical communication-based unlocking method, electronic lock and electronic key | |
| CN205788363U (en) | A kind of multiple authentication Gate-ban Monitoring System of Home House | |
| CN108830091A (en) | A method of for protecting information security of intelligent terminal | |
| CN204715923U (en) | Optical verification device | |
| CN205320105U (en) | Dynamic password lock | |
| US20190028470A1 (en) | Method For Verifying The Identity Of A Person | |
| CN108305408A (en) | A kind of safe and reliable intelligent locker system and management method | |
| Chand et al. | Biometric authentication using SaaS in cloud computing | |
| Kelkboom et al. | Binary biometrics: An analytic framework to estimate the bit error probability under gaussian assumption | |
| CN106384037B (en) | Safety system and method based on identity authentication | |
| Chang et al. | [Retracted] Application of Face Recognition in E‐commerce Security Authentication in the Era of Big Data |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |