Control method and control device for electronic lock

A method and device for controlling an electronic lock are disclosed. The electronic lock includes a lock catch and a lock body that includes a first lock hook and a second lock hook. The first lock hook has a first lock hook locking position where it is engaged with the lock catch and a first lock hook unlocking position where it is separated from the lock catch. The second lock hook has a second lock hook locking position where it locks the first lock hook in the first lock hook locking position and a second lock hook unlocking position where it is separated from the first lock hook. The method includes: detecting whether a locking operation occurs; and when detecting a locking operation, controlling at least one of the first lock hook and the second lock hook to vibrate, allowing the second lock hook to lock the first lock hook in the first lock hook locking position or to be separated from the first lock hook.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a U.S. national phase application of PCT Patent Application Publication Serial No. PCT/CN2017/094606, filed Jul. 27, 2017, and claims priority to and benefit of Chinese Patent Application No. 201610634119.3, filed Aug. 3, 2016 before the State Intellectual Property Office of P.R. China, which are incorporated herein by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the electronic lock technology, and in particular to a method and a device for controlling an electronic lock.

BACKGROUND

The use of electronic locks in lockers is becoming increasingly widespread. For example, lockers used in the express delivery industry for temporary storage of express mails, and lockers for shopping malls and supermarkets for temporarily storing goods carried by shoppers are all provided with electronic locks. A control device of the locker controls the electronic lock to be unlocked or locked, so as to control the opening and closing of the door of the box.

The related art discloses an electronic lock, as shown inFIGS. 1A and 1B, the electronic lock includes a lock catch310′ and a lock body320′. The lock catch310′ is mounted on the door of the locker, and the lock body320′ is mounted on the body of the locker. The lock body320′ includes a first lock hook1′, a second lock hook2′, a first elastic member3′ and a second elastic member4′. The first lock hook1′ has a first position (as shown inFIG. 1A) that is locked with the lock catch310′ and a second position (as shown inFIG. 1B) that is separated from the lock catch310′. The second lock hook2′ has a third position configured to lock the lock hook1′ in the first position and a fourth position configured to be separated from the first lock hook1′. The first elastic member3′ is connected to the first lock hook1′. Under the elastic force of the first elastic member3′, the first lock hook1′ has a tendency to rotate toward the second position. The second elastic member4′ is connected to the second lock hook2′, and under the elastic force of the second elastic member4′, the second lock hook2′ has a tendency to rotate toward the third position. When the user performs a locking operation, the lock catch310moves in the direction indicated by the arrow inFIG. 1B, driving the first lock hook1′ to move from the second position to the first position. During the movement, a locking portion11′ of the first lock hook1′ is engaged with a slot21′ of the second lock hook2′, and the second lock hook2′ locks the first lock hook1′ in the first position under the elastic force of the second elastic member4′.

In an electronic lock of the related art, when the user performs the locking operation, a clamping cooperation between the second lock hook2′ and the first lock hook1′ are completed by pushing the door against the elastic force of the first elastic member3′ and the second elastic member4′. If the user applies an improper force, the locking portion11′ of the first lock hook1′ and the slot21′ of the second lock hook2′ are prone to a critical state like a snap-up unbonded state, which is usually called a pseudo lock state of the electronic lock. When the electronic lock is located in the pseudo lock state, the door seems to have been closed, but it is actually not closed tight. At this time, the items stored in the locker are vulnerable to security risks, and therefore, the electronic lock of the related art has the problem of poor safety performance.

In view of the poor safety performance of the electronic lock of the related art, no effective solution has been proposed yet.

SUMMARY

In view of this, the present disclosure provides a method and a device for controlling an electronic lock that solves the problem of poor security performance of electronic lock in the related art.

According to a first aspect, an embodiment of the present disclosure provides a method for controlling an electronic lock. The electronic lock includes a lock catch and a lock body, the lock body comprises a first lock hook and a second lock hook. The first lock hook has a first lock hook locking position where the first lock hook is engaged with the lock catch and a first lock hook unlocking position where the first lock hook is separated from the lock catch. The second lock hook has a second lock hook locking position where the second lock hook is operative to lock the first lock hook in the first lock hook locking position and a second lock hook unlocking position where the second lock hook is separated from the first lock hook. The method includes the following operations: Detecting whether a locking operation occurs, wherein the locking operation is an operation in which the first lock hook is moved away from the first lock hook unlocking position; Controlling at least one of the first lock hook and the second lock hook to vibrate when the locking operation is detected, so that the second lock hook locks the first lock hook in the first lock hook locking position or is separated from the first lock hook.

In one or more embodiments, the operation of controlling at least one of the first lock hook and the second lock hook to vibrate includes controlling the second lock hook to vibrate.

In one or more embodiments, the lock body includes a housing, the second lock hook is pivotally connected to the housing via a pivoting shaft, and the second lock hook is operative to rotate about the pivoting shaft to the second lock hook locking position or the second lock hook unlocking position. The step of controlling the second lock hook to vibrate includes driving the second lock hook to rotate back and forth a preset number of times with a rotation angle of a first angle, wherein the preset number of times is greater than or equal to one time, the first angle is smaller than a second angle, which is a rotation angle across which the second lock hook rotates from the second lock hook locking position to the second lock hook unlocking position.

In one or more embodiments, the electronic lock further includes a vibrator, the vibrator is disposed within the lock body, and when the vibrator vibrates, the vibrator is operative to drive at least one of the first lock hook and the second lock hook to vibrate. The step of controlling at least one of the first lock hook and the second lock hook to vibrate includes controlling the vibrator to vibrate to drive at least one of the first lock hook and the second lock hook to vibrate.

In one or more embodiments, after the operation of controlling at least one of the first lock hook and the second lock hook to vibrate, the method further includes detecting whether the first lock hook is located in the first lock hook unlocking position, and outputting a prompt message to remind a user to re-perform the locking operation when detecting that the first lock hook is located in the first lock hook unlocking position.

According to a second aspect, an embodiment of the present disclosure provides a device for controlling an electronic lock. The electronic lock includes a lock catch and a lock body, the lock body comprises a first lock hook and a second lock hook. The first lock hook has a first lock hook locking position where the first lock hook is engaged with the lock catch and a first lock hook unlocking position where the first lock hook is separated from the lock catch. The second lock hook has a second lock hook locking position where the second lock hook is operative to lock the first lock hook in the first lock hook locking position and a second lock hook unlocking position where the second lock hook is separated from the first lock hook. The control device includes a first detection module and a vibration module. The first detection module is configured to detect whether a locking operation occurs, wherein the locking operation is an operation in which the first lock hook is moved away from the first lock hook unlocking position. The vibration module is configured to control at least one of the first lock hook and the second lock hook to vibrate when the locking operation is detected, so that the second lock hook locks the first lock hook in the first lock hook locking position or is separated from the first lock hook.

In one or more embodiments, the vibration module includes a second lock hook vibration unit configured to control the second lock hook to vibrate.

In one or more embodiments, the lock body includes a housing, the second lock hook is pivotally connected to the housing via a pivoting shaft, and the second lock hook is operative to rotate about the pivoting shaft to the second lock hook locking position or the second lock hook unlocking position. The second lock hook vibration unit includes a vibration sub-unit. The vibration sub-unit is configured to drive the second lock hook to rotate back and forth a preset number of times with a rotation angle of a first angle. The preset number of times is greater than or equal to one time, the first angle is smaller than a second angle, the second angle being a rotation angle at which the second lock hook rotates from the second lock hook locking position to the second lock hook unlocking position.

In one or more embodiments, there is further disposed a vibrator within the lock body, and when the vibrator vibrates, the vibrator is operative to drive at least one of the first lock hook and the second lock hook to vibrate. The vibration module includes a vibrator vibration unit configured to control the vibrator to vibrate to drive at least one of the first lock hook and the second lock hook to vibrate.

In one or more embodiments, the control device further includes a second detection module and an information output module. The second detection module is configured to detect whether the first lock hook is located in the first lock hook unlocking position, after the operation of the vibration module controlling at least one of the first lock hook and the second lock hook to vibrate. The information output module is configured to output a prompt message to remind a user to re-perform the locking operation when detecting that the first lock hook is located in the first lock hook unlocking position.

According to a third aspect, an embodiment of the present disclosure provides a computer readable storage medium storing computer executable instructions, the computer executable instructions being configured to perform the method according to any one of the methods described above.

In the method and device for controlling an electronic lock in accordance with the embodiments of the present disclosure, when the locking operation is detected, at least one of the first lock hook and the second lock hook is controlled to vibrate. Since the electronic lock is easily changed in a pseudo lock state due to other external force, the method and device for controlling an electronic lock according to the embodiments of the present disclosure control at least one of the first lock hook and the second lock hook to vibrate, capable of changing the pseudo lock state of the electronic lock, so that the second lock hook locks the first lock hook in the first lock hook locking position or the second lock hook is separated from the first lock hook, and the electronic lock is accordingly locked or unlocked. When the electronic lock is locked, the door in which the electronic lock is installed will be locked. When the electronic lock is unlocked, the door in which the electronic lock is installed will be opened, and the user can observe the opening of the door and will re-execute the locking operation, so that the door is locked.

Therefore, the method and the device for controlling an electronic lock according to the embodiment can improve the safety of the user's stored items and effectively solve the problem of poor performance of electronic locker in the related art.

REFERENCE MARKS

In Related Art

In This Embodiment

DETAILED DESCRIPTION

The technical solutions reflected by the embodiments in accordance with the present disclosure will be described clearly and completely in connection with the drawings in the embodiments of the present disclosure. These embodiments however are merely a part rather than all of the embodiments in accordance with the present disclosure. The various components in the embodiments of the present disclosure, which are generally described and illustrated in the drawings herein, may be arranged and designed in various different configurations. The specific embodiments described herein are merely intended to explain the present disclosure rather than limiting the scope of the present disclosure, which is set forth in the claims, but merely to represent some possible embodiments of the present disclosure.

Since the electronic lock is usually disposed in the locker as a component of the locker, the following describes the specific structure of the electronic lock, the specific structure of the locker, and the specific functions of the locker according to the embodiments of the present disclosure to introduce the method and device for controlling an electronic lock provided by the embodiments of the present disclosure.

FIG. 2is a schematic diagram illustrating an electronic lock according to an embodiment of the present disclosure. As shown inFIG. 2, the electronic lock300includes a lock catch310and a lock body320. The lock body320may be engaged with or separated from the lock catch310. When the lock catch310and the lock body320are engaged, the electronic lock is in a locked state, and when the lock catch310and the lock body320are separated, the electronic lock is in an unlocked state.

FIG. 3andFIG. 4are schematic diagrams illustrating the internal structure of a lock body of an electronic lock according to an embodiment of the present disclosure. As illustrated inFIGS. 2, 3 and 4, the lock body320includes a first lock hook1and a second lock hook2. The first lock hook1has a first lock hook locking position where the first lock hook is engaged with the lock catch310of the electronic lock and a first lock hook unlocking position where the first lock hook is separated from the lock catch310. The second lock hook2is selectively connected to the first lock hook1, and the second lock hook2has a second lock hook locking position where the second lock hook is operative to lock the first lock hook1in the first lock hook locking position and a second lock hook unlocking position where the second lock hook is separated from the first lock hook1.

The lock body320further includes a housing4which includes a first housing41and a second housing42. The first housing41and the second housing42are butted up against each other to form a closed box, the first lock hook1and the second lock hook2are mounted in the closed box, and an opening43is provided in the housing4.

The first lock hook1is pivotally connected to the housing4through the first pivoting shaft11and is rotatable about an axis of the first pivoting shaft11, so as to be located at the first lock hook locking position or the first lock hook unlocking position. The first lock hook1includes a first slot12configured to be engaged with the lock latch310. The first slot12is a slot having an opening. As illustrated inFIG. 3, when the first lock hook1is located in the first lock hook unlocking position, the first slot12opens the opening43of the housing4, and the lock latch310may enter or exit the lock body320through the opening43. As shown inFIG. 4, when the first lock hook1is located in the first lock hook locking position, the first slot12closes the opening43. At this time, if the first slot12is engaged with the lock latch310, the lock latch310cannot be withdrawn from the lock body320through the opening43. The first lock hook1further includes a locking portion13which has a shape of a shaft or a rod, or other structures. In the present embodiment, the locking portion13is a shaft-shaped structure.

The second lock hook2is pivotally connected to the housing4via the second pivoting shaft21and is rotatable about an axis of the second pivoting shaft21. The second lock hook2includes a second slot22configured to be engaged with the locking portion13of the first lock hook1. When the second lock hook2rotates about the axis of the second pivoting shaft21, the second locking slot22is capable of engaging with or separating from the locking portion13. As illustrated in inFIG. 4, when the second slot22is engaged with the locking portion13, the second lock hook2is located in the second lock hook locking position, and the first lock hook1is locked in the first lock hook locking position, so that the first lock hook1cannot rotate around the axis of the first pivoting shaft11. When the second slot22is separated from the locking portion13, the second lock hook2is located in the second lock hook unlocking position, and the first lock hook1can rotate around the axis of the first pivoting shaft11.

The lock body320further includes an elastic reset assembly disposed inside the housing4, and the elastic reset assembly includes a first elastic member14and a second elastic member23. The first lock hook1is connected with the housing4through the first elastic member14, and under an elastic force of the first elastic member14, the first lock hook1would always have a tendency to rotate toward the first lock hook unlocking position. The second lock hook2is connected to the housing4through the second elastic member23, and under an elastic force of the second elastic member23, the second lock hook2always has a tendency to rotate toward the second lock hook locking position.

When no other external forces are present, the second lock hook2would always be located in the second lock hook locking position under the action of the second elastic member23. When the user performs a locking operation, the user pushes the lock latch310to drive the first lock hook1to move from the first lock hook unlocking position to the first lock hook locking position. During the movement of the first lock hook1, the locking portion13contacts the second lock hook2and drives the second lock hook2to rotate from the second lock hook locking position to the second lock hook unlocking position. As illustrated inFIG. 3, the second lock hook unlocking position is a position where the second lock hook2reaches when it rotates counterclockwise around its rotating center at a certain angle from the second lock hook locking position. When the locking portion13and the second lock hook2are opposite to each other, the second lock hook2rotates under the elastic force of the second elastic member23from the second lock hook unlocking position to the second lock hook locking position. The second slot22of the lock hook2is engaged with the locking portion13of the first lock hook1to lock the first lock hook1in the first lock hook locking position, the electronic lock is locked, and the second lock hook2is located in the second lock hook locking position.

When the user performs an unlocking operation, the second lock hook2rotates counterclockwise from the second lock hook locking position to the second lock hook unlocking position. The locking force between the second lock hook2and the first lock hook1disappears, so that the first lock hook1is separated from the second lock hook2, and the first lock hook1rotates under the elastic force of the first elastic member14to the first lock hook unlocking position. The opening43is opened, and when the first lock hook1moves towards the first lock hook unlocking position, the first lock hook drives the lock latch310to withdraw from the lock body320via the opening43, thereby completing the unlocking process. When the first lock hook1rotates to the first lock hook unlocking position, the second lock hook2is separated from the first lock hook1, and the second lock hook2rotates clockwise from the second lock hook unlocking position to the second lock hook locking position under the elastic force of the second elastic member23.

The lock body320further includes a driving assembly5, which is configured to drive the second lock hook2to rotate toward the second lock hook unlocking position. In this embodiment, the driving assembly5includes a motor51, a worm52, a turbine53, and a driving cylinder54. The motor51is fixed on the housing4. The worm52is fixedly connected with the output shaft of the motor51. The turbine53and the worm52form a meshing connection. The turbine53is pivotally connected to the housing4. The driving cylinder54is vertically disposed on an end surface of the turbine53, and is spaced apart from a center of rotation of the turbine53. When the output shaft of the motor51rotates, the worm52and the turbine53are driven. The driving cylinder54rotates with the turbine53about the center of rotation of the turbine53. When the driving cylinder54rotates, the driving cylinder54can be engaged or disengaged from the second lock hook2. When the driving cylinder54abuts against the second lock hook2, the driving cylinder54drives the second lock hook2to rotate from the second lock hook locking position to the second lock hook unlocking position by overcoming the elastic force of the second elastic member23. When the driving cylinder54is driven separated from the second lock hook2, the second lock hook2returns to the second lock hook locking position under the elastic force of the second elastic member23. When the motor51is stopped, the driving cylinder54is located in an initial position separated from the second lock hook2.

In the electronic lock in accordance with other embodiments provided by the present disclosure, the driving assembly5includes an electromagnet, where a driving shaft of the electromagnet is connected to the second lock hook2. When the electromagnet is energized, the driving shaft of the electromagnet drives the second lock hook2to rotate the set angle about the axis of the second pivoting shaft21toward the second lock hook unlocking position, and the second lock hook2reaches the second lock hook unlocking position. When the electromagnet is de-energized, the second lock hook2rotates to the second lock hook locking position under an action of the second elastic member23.

The lock body320further includes a sensor6that is capable of being engaged with or separated from the first lock hook1for detecting whether the first lock hook1is located in the first lock hook unlocking position. As illustrated inFIG. 3, when the first lock hook1is located in the first lock hook unlocking position, the first lock hook1engages with the sensor6and the sensor6outputs a first detecting signal, such as a high level voltage. As illustrated inFIG. 4, when the first lock hook1is separated from the first lock hook unlocking position, the sensor6is separated from the first lock hook1and the sensor6outputs a second detecting signal, such as a low level voltage.

FIG. 6is a structure diagram of a locker according to an embodiment of the present disclosure. As illustrated inFIG. 6, the locker includes a plurality of storage boxes, each storage box including a box100, a door200, and an electronic lock300. The box100is a rectangular parallelepiped structure with a single-sided opening. The door200and the box100are pivotally connected through a pivoting shaft. The door200may rotate around an axis of the pivoting shaft to close or open the box100. When the door200opens the box100, the user can put items in the box100or take out the items from the box100. When the door200closes the box100, the items in the box100cannot be taken out.

The electronic lock300is disposed between the box100and the door200and is configured to lock the door200onto the box100, so that the door200closes the box100. A lock catch310of the electronic lock300is disposed on the door200, and a lock body320is disposed on the box100. When the door200closes the box100, the first slot12of the first lock hook1of the lock body320is engaged with the lock catch310to lock the position of the door200. The structure and working principle of the electronic lock300are as described in the above embodiments ofFIGS. 2 to 4, and so details are not to be described herein again.

FIG. 7Ais a block diagram illustrating the composition of a locker according to an embodiment of the present disclosure. As shown inFIG. 7A, the locker further includes a controller400, a memory500, a receiving device600, and an indication device700.

A controller400is configured to control the work of other modules and to perform operations and processing of data. For example, the controller400sends a vibrating control signal to the driving assembly5of the electronic lock300to control the driving assembly5to drive the second lock hook2to rotate about the axis of the second pivoting shaft21. The controller400receives a detecting signal output by the sensor6of the electronic lock300and determines whether the first lock hook1is located in the first lock hook unlocking position according to detecting signal. For example, when receiving a first detecting signal output by the sensor6, the controller400determines that the first lock hook1is located in the first lock hook unlocking position. When receiving a second detecting signal output by the sensor6, the controller400determines that the first lock hook1is separated from the first lock hook unlocking position.

The memory500is configured to store the control program of the locker and controlling data and variables required during the running of the program, and the memory500may be a non-volatile memory. For example, when the driving assembly5includes the motor51, the memory500is configured to store a first preset angle and a second preset angle, and the first preset angle and the second preset angle are rotation angles of an output shaft of the motor51when the second lock hook is controlled to vibrate. When the driving assembly5includes the electromagnet, the memory500is configured to store a first preset time, a second preset time, and a third preset time. The first preset time is an energizing time of the electromagnet each time the second lock hook is vibrated, and the second preset time is the power-off time of the electromagnet each time the second lock hook is vibrated, and the third preset time is an energizing time of the electromagnet during the unlocking operation. The memory is further configured to store a preset number of times, where the preset number of times is a number of times the second lock hook rotates back and forth when the second lock hook is vibrated.

When the driving assembly5includes the electromagnet, the electromagnet performs the unlocking operation by energizing the third preset time: the electromagnet is energized for the third preset time, and the driving shaft of the electromagnet drives the second lock hook2to rotate counterclockwise around the axis of the second pivoting shaft21to the second lock hook unlocking position during the energization of the electromagnet, an engaging force between the second lock hook2and the first lock hook1disappears, and the first lock hook1rotates to the first lock hook unlocking position under the elastic force of the first elastic member14, the opening43is opened, and when the first lock hook1moves towards the first lock hook unlocking position, the first lock hook drives the lock latch310to withdraw from the lock body320via the opening43, thereby completing the unlocking operation. When the electromagnet is de-energized, the second lock hook2rotates clockwise from the second lock hook unlocking position to the second lock hook locking position under the elastic force of the second elastic member23.

A receiving device600is configured to receive an unlocking command input by the user, and the receiving device600may be a communication unit, a Radio Frequency Identification (RFID) data reading unit, a barcode scanning unit, a mechanical button, or a touching button, or the like. When the receiving device600is the communication unit, the receiving device600receives an unlocking command sent by the user through the host (such as a computer or network device connected to the locker). When the receiving device600is an RFID data reading unit, the receiving device600receives the unlocking command by reading the RFID data. When the receiving device600is a barcode scanning unit, the receiving device600receives the unlocking command by reading the barcode data. When the receiving device600is a mechanical button or a touch button, the receiving device600receives the unlocking command by receiving a user's pressing or tapping operation.

An indication device700is configured to send a prompt message to the user by means of light or sound according to the requirements of the controller400. The indication device700may be an indicator light, a liquid crystal display, a buzzer, a voice device, or the like. When the indication device700is an indicator light, the prompt message is sent to the user by flashing at a set frequency. When the indication device700is a liquid crystal display, the prompt message is sent to the user by displaying a corresponding text message. When the indication device700is a buzzer, the prompt message is sending to the user by buzzing at a set frequency. When the indication device700is a voice device, the prompt message is send to the user by issuing a corresponding voice message.

FIG. 8is a flowchart illustrating a method for controlling an electronic lock according to an embodiment of the present disclosure, and the method can be performed by the controller400inFIG. 7A. The controller400controls the electronic lock of the locker in the following manner. As illustrated in the drawings, the method includes the following steps S210-S220.

In step S210, the method includes detecting whether a locking operation occurs.

In detecting whether a locking operation occurs, the locking operation refers to an operation in which the first lock hook leaves the first lock hook unlocking position. That is, the first lock hook changes its position from the first lock hook unlocking position to a position that is detached from the first lock hook unlocking position. In this embodiment, a detection is performed regarding whether the locking operation occurs based on the detecting signal output by the sensor. Taking the locker of the embodiment as an example, the locking operation is the operation of the user closing the door. The controller400detects the detecting signal output by the sensor6of the electronic lock300, and determines whether the user has performed the locking operation according to the detecting signal output by the sensor6. For example, when detecting that a signal output by the sensor6is changed from the first detecting signal to the second detecting signal, it is determined that the position of the first lock hook1of the electronic lock300is changing from being located in the first lock hook unlocking position to being separated from the first lock hook unlocking position; that is, it is determined that the user have performed a locking operation. The method then proceeds to step S220.

In step S220, when it is detected that the locking operation has occurred, at least one of the first lock hook and the second lock hook is controlled to vibrate, so that the second lock hook locks the first lock hook in the first lock hook locking position or the second lock hook is separated from the first lock hook.

When the first lock hook and the second lock hook are in a pseudo lock state by the locking operation in step S210, if the electronic lock is vibrated by an external force, the pseudo lock state will be changed. Basing on this, at least one of the first lock hook and the second lock hook is controlled to vibrate when the locking operation is detected, so that the second lock hook locks the first lock hook in the first lock hook locking position or the second lock hook is separated from the first lock hook, thereby changing the pseudo lock state of the electronic lock, improving the safety performance of the electronic lock.

In view of the fact that the electronic lock is internally provided with a driving assembly configured to drive the second lock hook, controlling at least one of the first lock hook and the second lock hook to vibrate may control the second lock hook to vibrate. The process of controlling the second lock hook to vibrate includes following: Driving the second lock hook to rotate back and forth a preset number of times with a first angle as a rotation angle, where the preset number of times is greater than or equal to one time. The first angle is smaller than the second angle, and the second angle is a rotation angle at which the second lock hook rotates from the second lock hook locking position to the second lock hook unlocking position.

Taking the locker of the embodiment as an example, when the locking operation is detected, the controller400sends a vibrating control signal to the driving assembly5of the electronic lock300, so that the driving assembly5drives the second lock hook2to rotate with a first angle back and forth for a preset number of times, where the preset number of times is greater than or equal to one time, the first angle is smaller than the second angle, and the second angle is a rotation angle at which the second lock hook rotates from the second lock hook locking position to the second lock hook unlocking position. In one or more embodiments, the first angle is less than one third of the second angle and the first angle is greater than one tenth of the second angle.

For example, in the embodiment illustrated inFIG. 3andFIG. 4of the present disclosure, the driving assembly5of the electronic lock300includes the motor51, and the vibrating control signal is a control signal for controlling the output shaft of the motor51to rotate the first preset angle in different directions. During the rotation of the output shaft of the motor51, the second lock hook2rotates back and forth with the first angle, thereby realizing the vibration of the second locking hook2.

In one embodiment, the controller400sends a vibrating control signal to the motor51. After the motor51receives the vibrating control signal, firstly, the output shaft of the motor51rotates toward the first direction with a first preset angle, and the output shaft of the motor51rotates and drives the turbine53to drive the driving cylinder54to rotate counterclockwise from the initial position. During the rotation of the driving cylinder54, the driving cylinder54abuts against the second lock hook2and moves toward the second lock hook2, thereby driving the second lock hook2to rotate counterclockwise about the axis of the second pivoting shaft21.

When the rotation angle of the output shaft of the motor51reaches the first preset angle, the rotation angle of the second lock hook2reaches the first angle, and then the output shaft of the motor51rotates along a second direction with the first preset angle. The output shaft of the motor51rotates and drives the turbine53to drive the driving cylinder54to rotate clockwise, and the driving cylinder54moves away from the second lock hook2during the rotation of the driving cylinder54. A driving force of the driving cylinder54on the second lock hook2disappears, and the second lock hook2rotates clockwise around the axis of the second pivoting shaft21under the elastic force of the second elastic member23. When the rotation angle of the output shaft of the motor51reaches the first preset angle, the driving cylinder54returns to the initial position, and the rotation angle of the second lock hook2reaches the first angle. The controller400sends the vibrating control signal to the motor51for a preset number of times, so that the second lock hook2rotates back and forth with the first angle as a rotation angle by the preset number of times.

FIG. 5Ais a schematic diagram illustrating a control signal received by the motor when the second lock hook vibrates according to an embodiment of the present disclosure. The control signal includes a vibrating control signal, and when the control signal received by the motor51is at a high level, the output of the motor51rotates along the first direction. When the control signal received by the motor51is a low level, the output shaft of the motor51rotates along the second direction. As illustrated inFIG. 5A, the motor51receives a high level for a duration T1, during which the output shaft of the motor51rotates the first preset angle along the first direction. During the process, the column54drives the second lock hook2to rotate counterclockwise about the axis of the second pivoting shaft21with the first angle. And then the motor51receives a low level for duration T1, and the output shaft of the motor51rotates with the first preset angle along the second direction. During the process, the second lock hook2rotates clockwise about the axis of the second pivoting shaft21under the elastic force of the second elastic member23with the first angle. The motor51receives the vibrating control signal for three cycles. Therefore, the motor51drives the second lock hook2to rotate back and forth three times with the first angle.

In another embodiment, the controller400sends a first control signal, the vibrating control signal, and a second control signal to the motor51. Firstly, the controller400sends the first control signal to the motor51, and after the motor51receives the first control signal, the output shaft of the motor51rotates along the second direction with the second preset angle. The output shaft of the motor51rotates and drives the turbine53to drive the driving cylinder54to rotate clockwise from the initial position. When the angle of the output shaft of the motor51reaches the second preset angle, the driving cylinder54starts to abut against the second lock hook2. Secondly, the controller400sends a vibrating control signal to the motor51, and after receiving the vibrating control signal, firstly the output shaft of the motor51rotates along the second direction with the first preset angle. The output shaft of the motor51rotates and drives the turbine53to rotate clockwise, and the driving cylinder54abuts against the second lock hook2during the rotation of the driving cylinder54and moves toward the second lock hook2, thereby driving the second lock hook2to rotate clockwise about the axis of the second pivoting shaft21. When the rotation angle of the output shaft of the motor51reaches the first preset angle, the rotation angle of the second lock hook2reaches the first angle. Secondly, the output shaft of the motor51rotates with a first preset angle along the first direction, and the output shaft of the motor51rotates and drives the turbine53to drive the driving cylinder54to rotate counterclockwise. During the rotation of the driving cylinder54, the driving cylinder54moves away from the second lock hook2, the driving force of the driving cylinder54to the second lock hook2disappears, and the second lock hook2rotates counterclockwise around the axis of the second pivoting shaft21under the elastic force of the second elastic member23. When the rotation angle of the output shaft of the motor51reaches the first preset angle, the rotation angle of the second lock hook2reaches the first angle. The controller400sends the vibrating control signal to the motor51with a preset number of times, so that the second lock hook2rotates back and forth with the first angle as a rotation angle for a preset number of times. Finally, the controller400sends a second control signal to the motor51, after receiving the second control signal, the output shaft of the motor51rotates along the first direction with the second preset angle, and the output shaft of the motor51rotates and drives the turbine53to drive the driving cylinder54to rotate counterclockwise. When rotation angle of the output shaft of the motor51reaches the second preset angle, the driving cylinder54returns to the initial position.

FIG. 5Bis a schematic diagram illustrating another control signal received by the motor when the second lock hook vibrates according to an embodiment of the present disclosure. The control signal includes a first control signal, a vibrating control signal, and a second control signal. Similarly, when the control signal received by the motor51is a high level, the output shaft of the motor51rotates along the first direction. When the control signal received by the motor51is a low level, the output shaft of the motor51rotates along the second direction. As illustrated inFIG. 5B, the motor51receives the first control signal, which is a low level of duration T2, and after receiving the first control signal, the output shaft of the motor51rotates along the second direction. During the process, the turbine53drives the driving cylinder54to rotate clockwise from the initial position until the driving cylinder54starts to abut against the second lock hook2. Then, the motor51receives the vibrating control signal includes the following steps. Firstly, the motor51receives a low level for the duration T1, the output shaft of the motor51rotates along the second direction with a first preset angle. During the process, the driving cylinder54drives the second lock hook2to rotate clockwise about the axis of the second pivoting shaft21with the first angle. Secondly, the motor51receives a high level for duration T1, and the output shaft of the motor51rotates along the first direction with the first preset angle. During the process, the second lock hook2rotates counterclockwise about the axis of the second pivoting shaft21with the first angle under the elastic force of the second elastic member23. The motor51receives the three-cycle vibrating control signal. Therefore, the motor51drives the second lock hook2to rotate back and forth three times with the first angle. Finally, the motor51receives the second control signal, which is a high level that continues for duration T2. After receiving the second control signal, the output shaft of the motor51rotates along the first direction with the second preset angle. During the process, the turbine53drives the driving cylinder54to rotate counterclockwise until the driving cylinder54returns to the initial position.

It should be noted that, in the embodiment, when the driving assembly5stops working, the driving cylinder54is always located in the initial position. The implementation method may be: when the locker is powered on, the controller400controls the driving assembly5to move the driving cylinder54to the initial position. Each time the unlocking command is received and the unlocking operation is performed, the controller400outputs an unlocking control signal to the motor51. After the motor51receiving the unlocking control signal, the driving turbine53drives the driving cylinder54to rotate 360 degrees and then stops rotating, so that the driving cylinder54drives the second lock hook2to the second lock hook unlocking position and after being separated from the second lock hook2, the second lock hook2rotates back to the initial position.

In the electronic lock of other embodiments provided by the present disclosure, the driving assembly5includes an electromagnet. The vibrating control signal is a control signal for controlling the electromagnet to be energized for the first preset time and be power-off for the second preset time. During the process the electromagnet is energized and power-off, the second lock hook2rotates back and forth with a rotation angle of a first angle, thereby realizing the vibration of the second lock hook2. The implementation process may include the followings. After receiving the vibrating control signal, the electromagnet is energized for the first preset time, and during the process the electromagnet is energized the driving shaft of the electromagnet drives the second lock hook2to rotate counterclockwise about the axis of the second pivoting shaft21with the first angle, and then power-off for a second preset time. During the process the electromagnet is power-off, the second lock hook2rotates clockwise around the axis of the second pivoting shaft21with the first angle under the elastic force of the second elastic member23. The controller400sends the vibrating control signal to the electromagnet the preset number of times, so that the second lock hook2rotates back and forth with a rotation angle of the first angle for the preset number of times.

The above implementation process may also include the followings. After receiving the vibrating control signal, the electromagnet is energized for the first preset time. During the process the electromagnet is energized, firstly, the driving shaft of the electromagnet drives the second lock hook2to rotate clockwise around the axis of the second pivoting shaft21with the first angle. Secondly, the electromagnet is power-off for the first preset time. During the time the electromagnet is power-off, the second lock hook2rotates counterclockwise around the axis of the second pivoting shaft21with the first angle under the elastic force of the second elastic member23. The controller400sends the vibrating control signal to the electromagnet the preset number of times, so that the second lock hook2rotates back and forth with rotation angle of the first angle for a preset number of times.

The electronic lock300is in the locked state or the pseudo lock state after the locking operation is performed, when the electronic lock is in the locked state, the second lock hook2is located in the second lock hook locking position, and when the electronic lock is in the pseudo lock state, the second lock hook2is located adjacent to the second lock hook locking position. When the locking operation is detected and the second lock hook is controlled to vibrate, the second lock hook2starts from the second lock hook locking position or adjacent to the second lock hook locking position, and rotates back and forth for a preset number of times and with the rotation angle of the first angle. The first angle is smaller than the second angle, and the second angle is a rotation angle at which the second lock hook2rotates from the second lock hook locking position to the second lock hook unlocking position. Therefore, when the electronic lock300is in the locked state, the second lock hook2cannot reach the second lock hook unlocking position when it rotates for the first angle. That is, the snap-fit engagement of the second lock hook2and the first lock hook1cannot be changed when the second hook2rotates back and forth with the rotation angle of the first angle for the preset number of times. When the electronic lock300is in the pseudo lock state, it is easy to change the pseudo lock state due to other external forces. Therefore, when the electronic lock300is in the pseudo state, when the second lock hook2rotates back and forth with the rotation angle of the first angle for the preset number of times, the second lock hook2locks the first lock hook1in the first lock hook locking position or the second lock hook2is separated from the first lock hook1.

In the electronic lock of other embodiments provided by the present disclosure, a first lock hook driving assembly is further disposed inside the electronic lock, and the first lock hook driving assembly is configured to drive the first lock hook to rotate. A process that controlling the first lock hook to vibrate via the first lock hook driving assembly includes the followings: The controller sends a vibrating control signal to the first lock hook driving assembly to control the first lock hook driving assembly to drive the first lock hook to rotate back and forth with the first vibration angle for a first vibration preset number of times, thereby changing the pseudo lock state, so that the second lock hook locks the first lock hook in the first lock hook locking position or the second lock hook is separated from the first lock hook. The first vibration angle is smaller than an unlocking angle, and the unlocking angle is a rotation angle at which the first lock hook rotates from the first lock hook locking position to the first lock hook unlocking position, and the first vibration preset number is greater than one time.

In the electronic lock of the other embodiments provided by the present disclosure, as shown inFIG. 4, a vibrator7is disposed inside the lock body of the electronic lock. When the locking operation is detected, at least one of the first lock hook and the second lock hook is controlled to vibrate, and the operation includes the following: controlling the vibrator7to vibrate to enable at least one of the first lock hook and the second lock hook to vibrate.FIG. 4exemplarily shows a condition that the vibrator controls the second lock hook to vibrate.

In one or more embodiments, when the locking operation is detected, the vibrator of the electronic lock vibrates with a preset amplitude by a vibrating control signal sent to the vibrator. When the vibrator vibrates, the vibrator drives the second lock hook to vibrate with a first amplitude, or drives the first lock hook to vibrate with a second amplitude. The first amplitude satisfies the condition that when the electronic lock is fully locked, the snap-fit engagement of the second lock hook and the first lock hook cannot be changed when the second lock hook vibrates with the first amplitude. When the electronic lock is in the pseudo lock state, the second lock hook is separated from the first lock hook or the second lock hook locks the first lock hook in the first lock hook locking position when the second lock hook vibrates with the first amplitude. The second amplitude satisfies the condition that when the electronic lock is fully locked, the snap-fit engagement of the second lock hook and the first lock hook cannot be changed when the first lock hook vibrates with the second amplitude. When the electronic lock is in the pseudo lock state, the second lock hook is separated from the first lock hook or the second lock hook locks the first lock hook in the first lock hook locking position when the first lock hook vibrates with the second amplitude.

In the method for controlling an electronic lock according to this embodiment, at least one of the first lock hook and the second lock hook is controlled to vibrate when the locking operation is detected. Because of the pseudo lock state is easily changed due to other external forces, therefore, via the method for controlling an electronic lock according to this embodiment, the pseudo lock state of the electronic lock can be changed by controlling at least one of the first lock hook and the second lock hook to vibrate. The second lock hook locks the first lock hook in the first lock hook locking position or the second lock hook is separated from the first lock hook, so that the electronic lock is in the locked state or the unlocked state. When the electronic lock is in the locked state, the door of the locker in which the electronic lock is installed is locked. When the electronic lock is in the unlocked state, the door of the locker in which the electronic lock is installed is opened, and the user can observe that the door has been opened and re-perform the locking operation, so that the door is locked. Therefore, the method for controlling an electronic lock according to this embodiment can improve the safety of the stored items of the user, and effectively solve the problem that the electronic lock of the related art has poor safety performance.

FIG. 9is a flowchart of a method for controlling an electronic lock according to another embodiment of the present disclosure. The embodiment shown inFIG. 9can be used as an alternative implementation of the embodiment shown inFIG. 8. As shown inFIG. 9, comparing with the embodiment shown inFIG. 8, after performing the step S210and step S220, the embodiment further includes step S230and step S240.

In step S230, the method includes detecting whether the first lock hook is located in the first lock hook unlocking position.

In this step, a detection is carried out as to whether the first lock hook is located in the first lock hook unlocking position. When the first lock hook is located in the first lock hook unlocking position, the electronic lock is determined to be in the unlocked state. Whether the first lock hook is located in the first lock hook unlocking position is detected via the detecting signal output by the sensor. Taking the locker of the embodiment as an example, after the step of controlling at least one of the first lock hook and the second lock hook to vibrate, the controller400detects the detecting signal output by the sensor6of the electronic lock300, and determines whether the first lock hook1is located in the first lock hook unlocking position based on the detecting signal output by the sensor6. For example, when detecting that the detecting signal output by the sensor6is the first detecting signal, the first lock hook1of the electronic lock300is determined to be located in the first lock hook unlocking position. That is, after controlling at least one of the first lock hook and the second lock hook to vibrate in step S220, the electronic lock300is unlocked.

In step S240, the method includes outputting a prompt message to remind a user to re-perform the locking operation, when detecting that the first lock hook is located in the first lock hook unlocking position.

When detecting that the first lock hook is located in the first lock hook unlocking position, the controller400controls the indication device700to output a prompt message to remind the user to re-perform the locking operation, thereby reminding the user to reclose the door. The indication device700may output the prompt message to remind the user to re-perform the locking operation in the form of light, sound, or the like, as is required by the controller400. For example, the indication device700sends a prompt message to the user by flashing light at a set frequency, or the indication device700sends a prompt message to the user by displaying a corresponding text message, or the indication device700sends a prompt message to the user by buzzing at a set frequency, or the indication device700sends a prompt message to the user by issuing a corresponding voice message.

In the method for controlling an electronic lock according to this embodiment, after the step that at least one of the first lock hook and the second lock hook is controlled to vibrate, a detection is carried out as to whether the electronic lock is unlocked. When it is detected that the electronic lock is unlocked, a prompt message is output to remind the user to re-closed the door to avoid potential safety hazards caused by users not being able to detect door being opened in time. Therefore, the controlling method for electronic lock of the present embodiment can further solve the problem that the electronic lock of the related art has poor safety performance.

Corresponding to the method for controlling an electronic lock illustrated inFIGS. 8 and 9, the embodiment further provides a control device for electronic lock. The control device for electronic lock may be integrated in the controller400ofFIG. 7Afor performing the method for controlling an electronic lock illustrated inFIGS. 8 and 9.FIG. 10is a block diagram illustrating the composition of a control device for electronic lock according to an embodiment of the present disclosure. As illustrated inFIG. 10, the control device for electronic lock in this embodiment includes the following:

A first detection module81configured to detect whether a locking operation occurs, and the locking operation refers to an operation in which the first lock hook is moved away from the first lock hook unlocking position.

A vibration module82configured to control at least one of the first lock hook and the second lock hook to vibrate when the first detection module81detects that the locking operation has occurred, so that the second lock hook locks the first lock hook at the first lock hook locking position or the second lock hook is separated from the first lock hook.

In one or more embodiments, the vibration module82includes a second lock hook vibration unit configured to control the second lock hook to vibrate. The second lock hook vibration unit includes a vibration subunit configured to drive the second lock hook to rotate back and forth for a preset number of times with a rotation angle of a first angle. The preset number of times is greater than or equal to one time, and the first angle is smaller than the second angle. The second angle is a rotation angle at which the second lock hook rotates from the second lock hook locking position to the second lock hook unlocking position.

In one or more embodiments, as illustrated inFIG. 7B, the inside of the lock body of the electronic lock is further provided with a vibrator7, vibrator7drives at least one of the first lock hook and the second lock hook to vibrate when the vibrator7vibrates. The vibration module82is realized by a vibrator vibration unit which is configured to control the vibrator to vibrate, so that drives at least one of the first lock hook and the second lock hook to vibrate.

In the control device for electronic lock of the embodiment, when the locking operation is detected at least one of the first lock hook and the second lock hook is controlled to vibrate. The pseudo lock state is easily changed due to other external forces when the electronic lock is in the locked state. The control device for electronic lock of the embodiment controls at least one of the first lock hook and the second lock hook to change the pseudo lock state of the electronic lock. The second lock hook locks the first lock hook in the first lock hook locking position or the second lock hook is separated from the first lock hook, so that the electronic lock is in the locked state or the unlocked state. When the electronic lock is in the locked state, the door of the locker in which the electronic lock is installed is locked. When the electronic lock is in the unlocked state, the door of the locker in which the electronic lock is installed is opened, and the user can observe that the door has been opened and re-perform the locking operation, so that the door is locked. Therefore, the control device for electronic lock according to this embodiment can improve the safety of the stored items of the user, effectively solving the problem that the electronic lock of the related art has poor safety performance.

FIG. 11is a block diagram illustrating the composition of control device for electronic lock according to another embodiment of the present disclosure. The illustrated shown inFIG. 11can be used as an alternative implement of the embodiment illustrated inFIG. 10. As illustrated inFIG. 11, in comparison with the embodiment illustrated inFIG. 10, the control device further includes the following modules:

A second detection module91configured to detect whether the first lock hook is located in the first lock hook unlocking position after the vibration module82controls at least one of the first lock hook and the second lock hook to vibrate.

An information output module92configured to output a prompt message to prompt the user to re-perform the locking operation when the second detection module91detects that the first lock hook is located in the first lock hook unlocking position.

In the control device for electronic lock of the embodiment, after the step of at least one of the first lock hook and the second lock hook is controlled to vibrate, a detection is carried out as to whether the electronic lock is unlocked. When detecting the electronic lock is unlocked, a prompt message is output to remind the user to re-close the door to avoid potential safety hazards caused by users not being able to detect door being opened in time. Therefore, the control device for electronic lock of the present embodiment can further solve the problem that the electronic lock of the related art has poor safety performance.

The control device for electronic lock provided by the embodiment of the present disclosure may be specific hardware on the device or software or firmware installed on the device and the like. The implementation principle and the technical effects of the device provided in this embodiment are the same as those in the foregoing method embodiments. For the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiments where it is not mentioned in the device embodiments. Those skilled in the art may clearly understand that for convenience and brevity of description, the working processes of the system, the device and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and so details are not to be described herein again.

In the embodiments provided by the present disclosure, it should be understood that the device and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, other division manners would also be possible. For example, multiple units or components may be combined or may be integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some communication interface, device or unit, and may be in an electrical, mechanical or other form.

The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, namely they may be located in one place, or may be distributed as multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present disclosure.

In addition, each functional unit in the embodiment provided by the present disclosure may be integrated into one processing unit, or each unit may exist physically separate, or two or more units may be integrated into one.

An embodiment of the present disclosure further provides a computer readable storage medium storing computer executable instructions configured to perform the method for controlling an electronic lock in accordance with any of the above embodiments.

The functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such an understanding, a portion of the technical solution of the present disclosure that contributes in essence or to the prior art or a portion of the technical solution may be embodied in the form of a software product stored in a storage medium, including the instructions configured to cause a computer device (which may be a personal computer, server, or network device, and the like) to perform all or part of the steps of the methods described in various embodiments of the present disclosure. The foregoing storage medium includes: a USB flash disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code.

It should be noted that similar reference numerals and letters indicate similar items in the accompanying drawings. Therefore, once an item is defined in a drawing, it is unnecessary to further define and explain it in the subsequent drawings. Moreover, the terms “first”, “second”, “third”, and the like are used merely to distinguish from one another, and are not to be construed as indicating or implying a relative importance.

INDUSTRIAL APPLICABILITY

The present disclosure can improve the security of the user's stored items, and effectively solve the problem that the electronic lock in the related art has unsatisfactory security performance.