Electronic lock and unlocking method therefor, and storage medium

By controlling the forward and reverse time of the motor and combined with the role of the elastic parts, the problem of jamming caused by rotation angle error during the unlocking of the electronic lock is solved, and the reliability of the electronic lock is improved.

WO2025148141A1PCT designated stage expired Publication Date: 2025-07-17SHENZHEN KAICONN INNOVATIVE TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/079271
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-10
Filing Date
2024-02-29
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

The rotation angle of existing electronic locks is prone to errors during unlocking, resulting in the problem of jamming.

Method used

By controlling the forward and reverse duration of the motor and combining the role of the elastic parts, the movement of the lock tongue is accurately controlled to ensure that the motor is reset more accurately when it is reversed and the probability of jamming is reduced.

Benefits of technology

It improves the accuracy of the electronic lock switch lock, reduces the probability of jamming, and improves the reliability of the electronic lock.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079271_17072025_PF_FP_ABST
    Figure CN2024079271_17072025_PF_FP_ABST
Patent Text Reader

Abstract

An electronic lock, comprising a locking component (100), a spring bolt (400), a first elastic member (500), an electric motor (200) and a processor (701), wherein the processor (701) is configured to: when the electronic lock needs to be unlocked, control the electric motor (200) to rotate forwards for a first duration, such that the spring bolt (400) moves in a second direction to reach a locking release section (11), and after the electric motor (200) rotates forwards for the first duration, control the electric motor (200) to rotate reversely for a second duration to perform resetting, wherein the second duration is less than the first duration. The electronic lock can reduce the probability of jamming. The present application further relates to an unlocking method for an electronic lock, and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic lock, unlocking method thereof, and storage medium

[0001] This application claims priority to a Chinese patent application filed with the Patent Office of China on January 10, 2024, with application number 202410035719.2 and entitled “AN ELECTRONIC LOCK, ITS UNLOCKING METHOD, AND STORAGE MEDIUM”; and

[0002] Priority to a Chinese patent application filed with the China Patent Office on January 10, 2024, with application number 202410038982.7 and titled “Device Control Method, Apparatus, Electronic Device, and Computer-Readable Storage Medium”;

[0003] The entire content thereof is incorporated into this application by reference. Technical Field

[0004] The present application belongs to the technical field of electronic locks, and in particular relates to an electronic lock, an unlocking method thereof, and a storage medium. Background Art

[0005] Electronic locks are primarily driven by motors to open and close the lock. In related technologies, the angle of rotation during the unlocking process can be incorrect, affecting subsequent unlocking and closing operations or causing the lock to become stuck.

[0006] Therefore, the existing technology needs to be improved and enhanced. Technical issues

[0007] The embodiments of the present application provide an electronic lock, an unlocking method thereof, and a storage medium, which can reduce the probability of the electronic lock getting stuck. Technical Solutions

[0008] In a first aspect, an embodiment of the present application provides an electronic lock, comprising:

[0009] The housing is provided with a mounting cavity and a lock hole, wherein the lock hole is communicated with the mounting cavity and the outside of the housing respectively;

[0010] a locking component, comprising a locking segment movably mounted in the lock hole, wherein the locking segment can move out of the mounting cavity to an unlocking position and can move into the mounting cavity to a locking position;

[0011] a lock tongue slidably mounted in the mounting cavity, the lock tongue being capable of moving in a first direction to lock the locking section in the locked position, and being capable of moving in a second direction to release the locking section in the locked position, the first direction and the second direction being opposite;

[0012] a first elastic member installed in the installation cavity, the first elastic member being used to drive the lock tongue to move along the first direction;

[0013] a motor, disposed in the mounting cavity, the motor being in transmission connection with the lock tongue; and

[0014] A processor configured to:

[0015] When the electronic lock needs to be unlocked, controlling the motor to rotate forward for a first time period so that the lock tongue moves along the second direction to release the locking section;

[0016] After the motor rotates forward for the first time period, the motor is controlled to reverse for a second time period for reset, where the second time period is shorter than the first time period.

[0017] In a second aspect, an embodiment of the present application further provides a method for unlocking an electronic lock, the electronic lock comprising a locking component and a motor, the locking component being movable to an unlocked position or a locked position, the motor being configured to unlock the locking component when the locking component is in the locked position, the unlocking method comprising:

[0018] When the electronic lock needs to be unlocked, controlling the motor to rotate forward for a first time period to release the locking component;

[0019] After the motor rotates forward for the first time period, the motor is controlled to reverse for a second time period for reset, where the second time period is shorter than the first time period.

[0020] In a third aspect, an embodiment of the present application further provides a method for unlocking an electronic lock, the electronic lock comprising a locking component and a motor, the locking component being movable to an unlocked position or a locked position, the motor being configured to unlock the locking component when the locking component is in the locked position, the unlocking method comprising:

[0021] When the electronic lock needs to be unlocked, the motor is controlled to rotate forward by a first preset angle to release the locking component;

[0022] After the motor rotates forward by the first preset angle, the motor is controlled to reverse for a second time period, where the second time period is obtained based on the first preset angle, so that the motor returns to the same angle as when it starts rotating forward by the first preset angle.

[0023] In a fourth aspect, an embodiment of the present application further provides a method for unlocking an electronic lock, the electronic lock comprising a locking component and a motor, the locking component being movable to an unlocked position or a locked position, the motor being configured to unlock the locking component when the locking component is in the locked position, the unlocking method comprising:

[0024] When the electronic lock needs to be unlocked, the initial angle of the motor is obtained and the motor is driven to rotate forward to release the locking component;

[0025] After the motor rotates forward, the real-time angle of the motor is monitored, and the motor is controlled to reverse to the initial angle.

[0026] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor to implement any of the unlocking methods described above. Beneficial effects

[0027] In the embodiment of the present application, since the first elastic member applies a resistance to the motor when the motor rotates forward and applies a thrust to the motor when the motor rotates reversely, the second time duration of the motor reversal is shorter than the first time duration of the motor forward rotation, which can reduce or even offset the interference caused by the first elastic member, and ultimately make the position accuracy of the motor higher when reversing and resetting, so as to avoid the electronic lock from getting stuck during the subsequent locking process. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] FIG1 is a schematic structural diagram of an electronic lock provided by an embodiment of the present application when a lock tongue is locked to a locking component.

[0029] FIG2 is a schematic structural diagram of the electronic lock shown in FIG1 with the lock tongue releasing the locking component.

[0030] FIG3 is a schematic diagram of the electronic lock shown in FIG1 during the process of the locking section moving from the unlocking position to the locking position.

[0031] FIG4 is another schematic structural diagram of the electronic lock shown in FIG1 .

[0032] FIG5 is a flowchart of a first method for unlocking an electronic lock provided in an embodiment of the present application.

[0033] FIG6 is a flow chart of controlling the first forward rotation time of the motor in the unlocking method shown in FIG5 .

[0034] FIG. 7 is a flow chart of controlling the motor to reverse for a second time period in FIG. 5 .

[0035] FIG8 is a flowchart of a first method for unlocking an electronic lock provided in an embodiment of the present application.

[0036] FIG9 is a flow chart of controlling the motor to reverse for a second time period in FIG8 .

[0037] FIG10 is a second flow chart of the unlocking method of the electronic lock provided in an embodiment of the present application.

[0038] FIG11 is a flow chart of controlling the motor reverse rotation in FIG10 . Modes for Carrying Out the Invention

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0040] Please refer to Figure 1, which is a schematic diagram of the structure of an electronic lock provided by an embodiment of the present application, with the deadbolt locked to the locking component. This embodiment of the present application provides an electronic lock, which may include a locking component 100 and a motor 200. The locking component 100 is movable to an unlocked position or a locked position. The motor 200 is configured to release the locking component 100 when the locking component 100 is in the locked position.

[0041] For example, referring to Figure 1 and Figure 2, Figure 2 is a schematic diagram of the structure of the electronic lock shown in Figure 1 when the lock tongue releases the locking component. The electronic lock may further include a housing 300, a lock tongue 400, and a first elastic member 500.

[0042] The housing 300 is provided with a mounting cavity 31 and a locking hole 32. The locking hole 32 is in communication with the mounting cavity 31 and the exterior of the housing 300, respectively. The locking component 100 includes a locking segment 11 movably mounted in the locking hole 32. The locking segment 11 can move outward from the mounting cavity 31 to an unlocked position and inward from the mounting cavity 31 to a locked position. A locking tongue 400 is slidably mounted within the mounting cavity 31. The locking tongue 400 can move in a first direction H1 to lock the locking segment 11 in the locked position and in a second direction H2 to release the locking segment 11 in the locked position. The first direction H1 and the second direction H2 are opposite. A first elastic member 500 is mounted within the mounting cavity 31 and is configured to drive the locking tongue 400 to move in the first direction H1. A motor 200 is disposed within the mounting cavity 31 and is in transmission connection with the locking tongue 400, thereby driving the locking tongue 400 to move in the second direction H2 to release the locking segment 11.

[0043] Below, the technical solution of the embodiment of the present application is described as a whole with reference to a lock opening and closing process of a lock:

[0044] First, in an initial state, the locking section 11 is located at the locked position, and the locking tongue 400 locks the locking section 11 , so that the housing 300 can lock external objects through the locking component 100 .

[0045] Then, the motor 200 can rotate forward to drive the lock tongue 400 to move along the second direction H2 , so that the lock tongue 400 releases the locking section 11 or unlocks the locking section 11 .

[0046] Then, the motor 200 may stop rotating for a certain period of time to allow the locking section 11 to move to the unlocking position.

[0047] Finally, the motor 200 reverses and resets; at the same time, the first elastic member 500 also drives the lock tongue 400 to reset, so that when the subsequent locking section 11 moves toward the locked position again, it can drive the lock tongue 400 to move along the second direction H2 to avoid the position, and after the locking section 11 moves to the locked position, the elastic recovery of the first elastic member 500 can drive the lock tongue 400 to move along the first direction H1 to lock the locking section 11.

[0048] The above is an overall example of the electronic lock provided by the embodiment of the present application. Next, the technical solution of the embodiment of the present application will be further explained and illustrated in combination with some matching structures of the lock tongue 400 and the locking section 11.

[0049] It is understood that the locking tongue 400 can lock and release the locking segment 11 in various ways. For example, a retaining groove 111 is provided on the periphery of the locking segment 11. When the locking segment 11 moves to the locked position, the locking tongue 400 can move in a first direction H1 until it enters the retaining groove 111 to lock the locking segment 11, and can also move in a second direction H2 until it leaves the retaining groove 111 to release the locking segment 11.

[0050] For example, the locking section 11 can move upward to the exterior of the housing 300 to an unlocked position, and can also move downward into the mounting cavity 31 to a locked position. In this case, a retaining groove 111 is provided on the left side of the locking section 11, or a circumferential retaining groove 111 is provided on the sidewall of the locking section 11. Accordingly, the locking tongue 400 is slidably mounted within the mounting cavity 31, to the left of the locking section 11; a first elastic member 500, such as a spring, is mounted on the left side of the locking tongue 400.

[0051] Furthermore, when the locking section 11 is in the locked position, the first elastic member 500 can push the locking tongue 400, causing the locking tongue 400 to move rightward into the limiting groove 111, thereby locking or locking the locking section 11 and restricting the movement of the locking section 11. When unlocking is required, the motor 200 drives the locking tongue 400 to move leftward to disengage the limiting groove 111, thereby releasing the locking section 11 and allowing the locking section 11 to move to the unlocked position.

[0052] In some embodiments, the locking tongue 400 has a slope 41 on one side facing the locking hole 32 . The slope 41 is located at an end of the locking tongue 400 close to the locking hole 32 along the first direction H1 , and is tilted away from the locking hole 32 .

[0053] For example, referring to Figures 1 and 3, Figure 3 illustrates the electronic lock shown in Figure 1 as the locking section moves from the unlocked position to the locked position. Continuing with the example where the first direction H1 is the left-right direction and the locking section 11 moves in the up-down direction within the lock hole 32, the inclined surface 41 can be located at the right end of the lock tongue 400, and the inclined surface 41 is downwardly inclined. Therefore, as the locking section 11 moves downward from the unlocked position to the locked position, it abuts against the inclined surface 41. The downwardly moving locking section 11 then applies a force component to the lock tongue 400 through the inclined surface 41, driving the lock tongue 400 to move leftward, or in the second direction H2, thereby moving the lock tongue 400 out of position along the second direction H2. Finally, after the locking section 11 moves to the locked position, the first elastic member 500 begins to elastically recover, pushing the lock tongue 400 in the first direction H1 or rightward until it enters the retaining groove 111, thereby locking the locking section 11.

[0054] In some embodiments, the electronic lock further includes a second elastic member 600. The second elastic member 600 is used to drive the locking segment 11 toward the unlocked position. Thus, after the lock tongue 400 releases the locking segment 11 from the locked position, the second elastic member 600 can eject the locking segment 11, making the lock more convenient to open and close.

[0055] For example, the locking component 100 may be a locking beam comprising a locking segment 11 and a mounting segment 12 spaced apart from the locking segment 11. The mounting segment 12 and the locking segment 11 are parallel to each other and are movably disposed within the housing 300. A second elastic member 600, such as a spring, is disposed within the housing 300 and is configured to drive the mounting segment 12 outward from the housing 300, thereby enabling the mounting segment 12 and the locking segment 11 to slide synchronously relative to the housing 300, thereby moving the locking segment 11 to an unlocked position.

[0056] When the locking section 11 is located at the locked position, the locking beam and the housing 300 form a closed annular structure to lock external objects.

[0057] Of course, in some other embodiments, the locking component 100 can also be some flexible steel cables, one end of which is provided with a locking section 11 and the other end is fixed to the housing 300. This embodiment of the present application does not limit this.

[0058] The above is an illustrative description of some optional structures of the lock tongue 400 and the locking section 11 in the embodiment of the present application. The following further illustrative description is given in combination with some optional transmission structures of the lock tongue 400 and the motor 200.

[0059] The output shaft of the motor 200 may be provided with a cam 21 , and the lock tongue 400 is provided with a transmission hole 42 , in which the cam 21 is disposed.

[0060] Thus, the motor 200 can rotate forward to push the inner wall of the transmission hole 42 to move along the second direction H2 via the cam 21, thereby unlocking the locking segment 11 in the closed position. Furthermore, the motor 200 can rotate reversely to drive the cam 21 to reset and avoid the position, thereby allowing the first elastic member 500 to push the lock tongue 400 to move along the first direction H1 until it is inserted into the locking segment 11 in the closed position, and allowing the lock tongue 400 to move along the second direction H2 to avoid the position when the locking segment 11 moves toward the closed position, and after the locking segment 11 moves to the closed position, the first elastic member 500 drives the lock tongue 400 to enter the locking segment 11.

[0061] Furthermore, when the lock tongue 400 locks the locking section 11 in the locked position, the opening and closing process of the electronic lock can be as follows:

[0062] First, the motor 200 rotates forward to drive the locking tongue 400 to separate from the locking section 11 , thereby releasing the locking section 11 .

[0063] Then, the motor 200 can stop for a certain period of time to allow the second elastic member 600 to eject the locking section 11 from the locked position toward the unlocked position, or for the user to apply external force to pull the locking section 11 out of the housing 300.

[0064] Then, after the locking section 11 is ejected or pulled out, the motor 200 can be reversed and reset, so that the first elastic member 500 pushes the lock tongue 400 along the first direction H1 to block the lock hole 32 .

[0065] Finally, the locking segment 11 moves toward the locked position under the action of an external force, such as a user's pressing force. During the movement of the locking segment 11 toward the locked position, the locking segment 11 first abuts against the inclined surface 41, thereby driving the locking tongue 400 to avoid the position in the second direction H2. After the locking segment 11 moves to the locked position, the first elastic member 500 again drives the locking tongue 400 to move in the first direction H1 until it is inserted into the limiting groove 111 of the locking segment 11, thereby locking the locking segment 11 in the locked position.

[0066] Exemplarily, the inner wall of the transmission hole 42 includes a first inner sidewall 43 extending away from the locking hole 32 along the first direction H1 . The cam 21 abuts against the first inner sidewall 43 .

[0067] Then, when the motor 200 rotates forward, the protruding portion of the cam 21 deflects in the second direction H2, thereby pushing against the first inner sidewall 43 to propel the lock tongue 400 in the second direction H2. When the motor 200 rotates backward, the protruding portion of the cam 21 deflects in the first direction H1, thereby avoiding the position, thereby allowing the first elastic member 500 to drive the lock tongue 400 in the first direction H1. During this process, the first inner sidewall 43 always abuts against the cam 21. Therefore, by controlling the rotation angle of the protruding portion of the cam 21, or in other words, controlling the forward rotation angle of the motor 200, the distance that the lock tongue 400 can move in the first direction H1 can be limited.

[0068] The inner wall of the transmission hole 42 includes a second inner sidewall 44 that extends along the first direction H1 and is adjacent to the lock hole 32. The cam 21 is spaced apart from the second inner sidewall 44. Thus, when the motor 200 rotates in reverse and the lock tongue 400 moves to block the lock hole 32, if the locking segment 11 moves from the unlocked position to the locked position and pushes against the inclined surface 41, the gap between the cam 21 and the second inner sidewall 44 allows the lock tongue 400 to move in the second direction H2, thereby avoiding the movement of the locking segment 11.

[0069] The above is an example of some transmission modes of the lock tongue 400 and the motor 200 in the embodiment of the present application. The technical solution of the embodiment of the present application will be further explained and illustrated in combination with the control mode of the electronic lock.

[0070] The electronic lock may further include a processor. The processor may be configured to: when the electronic lock needs to be unlocked, control the motor 200 to rotate forward for a first duration to move the lock tongue 400 in the second direction H2 to release the locking section 11; after the motor 200 rotates forward for the first duration, control the motor 200 to rotate reversely for a second duration to reset the lock, the second duration being shorter than the first duration.

[0071] It is understandable that during the actual operation of the motor 200, the forces acting on the motor 200 in different rotation stages are different. Specifically, when the motor 200 rotates forward to release the locking section 11 in the locked position, the lock tongue 400 is hindered by the friction of the groove wall of the limiting groove 111 on the one hand, and by the elastic potential energy of the first elastic member 500 when it is compressed on the other hand, thereby causing the lock tongue 400 to exert a relatively large resistance to the forward rotation of the motor 200. During the reverse rotation of the motor 200, on the one hand, because the locking section 11 has been ejected, the lock tongue 400 is not hindered by the friction of the limiting groove 111 on the one hand, and on the other hand, the lock tongue 400 is driven by the elastic restoring force of the first elastic member 500, thereby causing the lock tongue 400 to exert a relatively large thrust to the reverse rotation of the motor 200.

[0072] That is, during the forward rotation of the motor 200, the motor 200 will experience a relatively large resistance, while during the reverse rotation of the motor 200, the motor 200 will experience a relatively large thrust. In this case, if the forward and reverse rotation durations of the motor 200 are the same, the reverse position of the motor 200 will significantly exceed the initial position before the forward rotation, thereby preventing the lock from being properly closed, or causing the lock to become stuck. In contrast, by controlling the reverse rotation duration of the motor 200 to be shorter than the forward rotation duration of the motor 200, the embodiment of the present application can more accurately stop the motor 200 at the initial position before the forward rotation after the reverse rotation.

[0073] Exemplarily, the locking tongue 400 further has a blocking surface 45 on one side facing the locking hole 32. The blocking surface 45 is located on the side of the inclined surface 41 away from the locking hole 32 along the first direction H1, and the blocking surface 45 is perpendicular to the axis of the locking hole 32.

[0074] Continuing with the example of the locking segment 11 sliding up and down, with the inclined surface 41 located on the upper right side of the lock tongue 400, and the blocking surface 45 located on the upper left side of the lock tongue 400, if the reverse rotation duration and forward rotation duration of the motor 200 are the same, that is, the first duration equals the second duration, the blocking surface 45 will move excessively in the first direction H1, partially obstructing the lock hole 32. Consequently, when the locking segment 11 subsequently moves downward from the unlocked position to the locked position, it will abut against the blocking surface 45 and become stuck, preventing the electronic lock from properly completing subsequent opening and closing operations.

[0075] In contrast, in the embodiment of the present application, since the first time length is greater than the second time length, it can ensure that the lock tongue 400 or the blocking surface 45 of the lock tongue 400 does not move too much, thereby preventing the electronic lock from getting stuck.

[0076] For example, the processor may be configured to control the motor 200 to reverse for a second time period to limit the blocking surface 45 from moving to cover at least a portion of the lock hole 32 .

[0077] Then, continuing with the above-mentioned motor 200 driving the lock tongue 400 to move through the cam 21, the position of the convex part of the cam 21 can be controlled by controlling the angle of the motor 200, so that the convex part of the cam 21 limits the movement of the lock tongue 400 along the first direction H1, and finally achieves the effect of limiting the blocking surface 45 from moving to blocking at least part of the lock hole 32.

[0078] In contrast, in the embodiment of the present application, after the motor 200 is reversed for the second time period, the locking segment 11 moving toward the locked position can push the inclined surface 41 , so that the locking tongue 400 moves along the second direction H2 to avoid the position.

[0079] In some embodiments, the processor is configured to, after the motor 200 rotates forward for a first duration, control the motor 200 to rotate in the reverse direction for a second duration, so that the motor 200 returns to the same angle as at the beginning of the first forward rotation duration. This ensures that the motor 200 eliminates travel errors caused by different forces during the forward and reverse rotation phases.

[0080] Exemplarily, the first duration may be greater than or equal to 265 milliseconds and less than or equal to 300 milliseconds, and the second duration may be greater than or equal to 225 milliseconds and less than or equal to 260 milliseconds. For example, the first duration is 265 milliseconds and the second duration is 225 milliseconds, or the first duration is 265 milliseconds and the second duration is 245 milliseconds, or the first duration is 275 milliseconds and the second duration is 235 milliseconds, or the first duration is 280 milliseconds and the second duration is 24 milliseconds, or the first duration is 300 milliseconds and the second duration is 245 milliseconds, and this embodiment of the present application does not limit this.

[0081] In some embodiments, the processor may be configured to obtain the second duration based on the first duration and the elastic coefficient of the first elastic member 500 .

[0082] For example, the processor is configured to obtain the second time period based on the first time period, the friction between the locking tongue 400 and the locking section 11 , and the elastic coefficient of the first elastic member 500 .

[0083] It is understandable that during the forward and reverse rotation of the motor 200 , the motor 200 is subjected to forces of varying magnitudes, which are mainly affected by the first elastic member 500 , and secondly by the friction between the locking tongue 400 and the locking segment 11 .

[0084] Therefore, the second time length can be accurately obtained by combining the first time length, i.e., the time length of the forward rotation of the motor 200, with the friction between the lock tongue 400 and the locking section 11, and the elastic coefficient of the first elastic member 500, so that the motor 200 can more accurately return to the initial angle when it reverses.

[0085] In some embodiments, the processor is configured to: when the motor 200 is controlled to rotate forward for a first time period, control the motor 200 to stop for a third time period; when the motor 200 is controlled to stop for the third time period, control the motor 200 to rotate reversely for a second time period.

[0086] Therefore, by adjusting the third time length, the second elastic member 600 can be allowed enough time to eject the locking section 11, or the user can be allowed enough time to pull out the locking section 11, thereby improving the success rate of unlocking the electronic lock and reducing the probability of the electronic lock being stuck.

[0087] In some embodiments, the electronic lock may be a passive electronic lock. Furthermore, by making the second time duration shorter than the first time duration, the power consumption of the motor reverse rotation can be reduced, thereby effectively overcoming the problem of low efficiency of passive electronic locks in obtaining external energy.

[0088] Specifically, passive electronic locks use RF power generation technology to obtain external RF energy. These locks do not require internal batteries or an external power supply. However, due to the low efficiency of RF power generation, passive electronic locks are also less efficient in obtaining external energy. Therefore, by reducing the duration of the motor's reverse rotation, the electronic lock's power consumption can be reduced, thereby reducing the external RF energy required by the electronic lock and, to a certain extent, shortening the time required to obtain external RF energy.

[0089] In some embodiments, the processor can be configured to control the electronic lock to perform the following actions:

[0090] Receive a device driving instruction sent by an electronic device, wherein the device driving instruction includes a target device to be driven and a target operation to be performed by the target device, wherein the target device is a motor 200 of an electronic lock, and the target operation is to control the motor 200 to rotate forward for a first duration;

[0091] Get the current ambient temperature and make a judgment on the above ambient temperature;

[0092] When the ambient temperature is lower than a preset battery temperature tolerance threshold, the target device is driven to perform the target task based on the device driving instruction, and the current battery charge is detected during the driving process;

[0093] If the battery power level is less than a preset power driving threshold, stopping driving the target device to perform the target work and charging the device;

[0094] When the battery is fully charged, the target device continues to be driven to perform the target work, and the current battery charge is detected during the continued driving process. When the battery charge is less than the charge driving threshold, the process returns to the step of stopping driving the target device to perform the target work until the target device completes the target work.

[0095] In some embodiments, after stopping driving the target device to perform the target task, the method further includes:

[0096] Recording the stop node when the target device stops executing the target work;

[0097] The above-mentioned continuing to drive the above-mentioned target device to perform the above-mentioned target work includes:

[0098] Based on the stop node, the target device is continued to be driven to perform the target work.

[0099] In some embodiments, it further includes:

[0100] Detecting the number of times the target device is charged when driving the target device to perform the target task;

[0101] If the charging times are equal to a preset times threshold, a work error message is generated and sent to the electronic device, so that the electronic device issues an error prompt based on the work error message.

[0102] In some embodiments, it further includes:

[0103] Determining historical charging information when driving at least one historical device of the same type as the target device to perform a historical task with the same attributes as the target task;

[0104] Based on the historical charging information, determine a historical number of charging times when at least one historical device was driven to complete a corresponding historical operation when the historical ambient temperature was less than the battery temperature tolerance threshold;

[0105] The above-mentioned number threshold is determined based on the historical number of charging times corresponding to at least one historical device.

[0106] In some embodiments, the step of driving the target device to perform the target task based on the device driver instruction includes:

[0107] Obtaining the device identification of the electronic device carried in the device driver instruction;

[0108] Sending the device identification to the cloud platform so that the cloud platform authenticates the identity of the electronic device based on the device identification, and when the authentication is successful, feedback the driving instruction parameters required to drive the target device;

[0109] Based on the driving instruction parameters and the device driving instruction, the target device is driven to perform the target task.

[0110] In some embodiments, it further includes:

[0111] Obtaining the device type of the target device and the work attribute information of the target work;

[0112] Determining a power indication parameter when driving the target device based on the device type and the operating attribute information;

[0113] The power driving threshold is determined based on the power indication parameter.

[0114] Therefore, the electronic lock provided by this embodiment can bring the following technical effects: avoiding the phenomenon of the passive electronic lock failing to work due to the small capacitance of the battery in a low temperature environment.

[0115] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0116] Please continue to refer to Figure 4, which is another schematic diagram of the structure of the electronic lock shown in Figure 1. Optionally, the electronic lock further includes: a touch screen 703, a radio frequency circuit 704, an audio circuit 705, an input unit 706, and a power supply 707. The processor 701 is electrically connected to the touch screen 703, the radio frequency circuit 704, the audio circuit 705, the input unit 706, and the power supply 707.

[0117] The touch screen display 703 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch screen display 703 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos, or any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. The touch panel can be used to collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or near the touch panel), generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 701, and can receive the command sent by the processor 701 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 701 to determine the type of touch event, and then the processor 701 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 703 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize input and output functions. That is, the touch display screen 703 can also be used as part of the input unit 706 to realize the input function.

[0118] The radio frequency circuit 704 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.

[0119] The audio circuit 705 can be used to provide an audio interface between the user and the electronic device through a speaker and microphone. The audio circuit 705 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 705 and converted into audio data. The audio data is then output to the processor 701 for processing, and then sent to another electronic device through the radio frequency circuit 704, or the audio data is output to the memory 702 for further processing. The audio circuit 705 may also include an earphone jack to provide communication between external headphones and the electronic device.

[0120] The input unit 706 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal input related to user settings and function control.

[0121] Power supply 707 is used to power the various components of the electronic lock. Optionally, power supply 707 can be logically connected to processor 701 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 707 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0122] Of course, the electronic lock may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0123] In some embodiments, the processor may also be configured to control the electronic lock to implement the electronic lock unlocking method described later, which is not limited in this embodiment of the present application.

[0124] Please continue to refer to Figure 5, which is a flow chart of the first method of unlocking an electronic lock provided by an embodiment of the present application. Based on the above-mentioned electronic lock, the embodiment of the present application also provides a first method of unlocking an electronic lock, which includes the following steps:

[0125] 101. When the electronic lock needs to be unlocked, the motor 200 is controlled to rotate forward for a first time period to release the locking component 100.

[0126] The specific structure of the electronic lock can be found in the above-mentioned electronic lock, and the embodiments of this application will not be described in detail here.

[0127] Please continue to refer to Figure 6, which is a flow chart of controlling the motor to rotate forward for a first time period in the unlocking method shown in Figure 5. In some embodiments, controlling the motor 200 to rotate forward for a first time period to unlock the locking component 100 may include the following steps 1011 to 1015:

[0128] 1011. Receive a device driving instruction sent by an electronic device, where the device driving instruction includes a target device to be driven and a target task to be performed by the target device.

[0129] The target device is the motor 200 of the electronic lock, and the target operation is to control the motor 200 to rotate forward for a first duration.

[0130] Among them, the above-mentioned electronic device can be a terminal device or a server. For example, the terminal device can be a mobile terminal device held by a user, so that the user can issue instructions to an electronic lock such as a passive electronic lock through an electronic device, such as a mobile phone, tablet, notebook, etc., which can be set specifically according to needs.

[0131] In this embodiment, the above-mentioned device driving instruction is used to instruct the electronic lock to drive the target device to perform the target work. The device driving instruction can be sent by the host computer according to preset rules, or people can send the instructions currently required for the electronic lock to work in advance through an electronic device. Since different electronic locks need to drive different target devices (i.e., motors) under the same work task, the working methods of the target work performed by the target device are also different, so the above-mentioned device driving instruction is generated based on the electronic lock.

[0132] Specifically, the electronic device needs to establish a connection with the electronic lock in advance so that when the electronic lock needs to complete a certain work task, the electronic device determines the target device in the electronic lock that can complete the work task and the target work that the target device needs to perform based on the device type of the electronic lock, thereby generating the above-mentioned device driving instructions based on the target device and the target work.

[0133] 1012. Obtain the current ambient temperature and make a judgment on the ambient temperature.

[0134] In this embodiment, the electronic lock obtains its current ambient temperature to determine whether the current battery capacitance will decrease through the current ambient temperature. If the capacitance decreases, the remaining battery power may be insufficient to support the electronic lock to complete the target work indicated by the device driving instruction.

[0135] It is understandable that the battery capacitance will decrease under low temperature conditions. Therefore, in this embodiment, the electronic lock can determine whether the current state is in a low temperature state that will reduce the battery capacitance by judging the ambient temperature.

[0136] 1013. When the ambient temperature is lower than a preset battery temperature resistance threshold, the target device is driven to perform the target task based on the device driving instruction, and the current battery power is detected during the driving process.

[0137] In this embodiment, the electronic lock can determine whether it is currently in a low-temperature state that will reduce the battery's capacitance by comparing the threshold value. That is, a battery temperature resistance threshold value is preset in the electronic lock to compare the acquired environment with the battery temperature resistance threshold value to determine whether it is currently in a low-temperature state that will reduce the battery's capacitance.

[0138] Specifically, if the ambient temperature is lower than the preset battery temperature resistance threshold, indicating that the current state is in a low temperature state that will reduce the battery capacitance, the electronic lock needs to detect the current battery power while driving the target device to perform the target work based on the device driving instruction, so as to stop driving the target device to perform the target work at an appropriate time and continue charging, so that the charged electronic lock can continue to have power to drive the target device to perform the target work.

[0139] If the ambient temperature is greater than or equal to the preset battery temperature resistance threshold, it means that the current temperature is not in a low temperature state that will reduce the battery capacitance. Then the passive electronic lock can directly drive the target device to perform the target work based on the device driving instruction.

[0140] In some embodiments, in order to prevent abnormal factors from occurring, which may cause the capacitor capacity to not decrease but still lack sufficient power to support the electronic lock to complete the target work indicated by the device driving instruction, in a scenario where the ambient temperature is greater than or equal to the preset battery temperature resistance threshold, the electronic lock can also detect the current battery power while driving the above-mentioned target device to perform the above-mentioned target work. The specific setting can be made according to needs and is not limited here.

[0141] In some embodiments, to ensure security, the electronic lock may use authentication to determine whether the electronic device that sends the device driving instruction to the electronic lock has the corresponding authority.

[0142] Specifically, the aforementioned driving the target device to perform the target operation based on the device driving instruction may include: the electronic lock obtaining a device identifier of the electronic device carried in the device driving instruction. Then, the device identifier is transmitted to a cloud platform, so that the cloud platform authenticates the identity of the electronic device based on the device identifier. Upon successful authentication, the cloud platform provides feedback on driving instruction parameters required to drive the target device. The driving instruction parameters may be parameters indicating whether the electronic lock can drive the target device, or may be protocol information required for the electronic lock to drive the target device. The specific configuration can be determined based on actual needs and is not limited herein.

[0143] After obtaining the drive instruction parameters, the electronic lock can drive the target device to perform the target operation based on the drive instruction parameters and the device drive instruction. If the drive instruction parameters are the protocol information required for the electronic lock to drive the target device, the electronic lock can use the protocol information to drive the target device specified in the device drive instruction to perform the target operation.

[0144] 1014. If the battery power is less than a preset power driving threshold, stop driving the target device to perform the target task and charge the battery.

[0145] In this embodiment, the electronic lock detects the current battery level to determine whether there is sufficient power to drive the target device and perform the target task. A power drive threshold is preset in the electronic lock, and the power drive threshold is compared with the battery level to determine whether there is sufficient power to drive the target device and perform the target task.

[0146] Specifically, if the electronic lock does not have sufficient power to support it to continue driving the above-mentioned target device to perform the above-mentioned target work, the electronic lock needs to be charged so that the electronic lock can have sufficient power to support it to drive the above-mentioned target device to perform the above-mentioned target work through charging; and if the electronic lock has sufficient power to support it to continue driving the above-mentioned target device to perform the above-mentioned target work, the electronic lock continues to drive the target device and continues to detect the current battery power during the driving process.

[0147] Specifically, the electronic lock can be charged based on a charging curve. This charging curve can be a user-preset charging curve to ensure that the charging method of the electronic lock meets the user's needs. The charging curve can also be a charging curve generated according to preset rules based on the battery status of the electronic lock to ensure safer and faster charging of the electronic lock. The charging curve can include the relative relationship between charging time and charging power, or the relative relationship between charging time and charging current.

[0148] In some embodiments, due to the different device types of the target devices and the different work attribute information of the target tasks performed by target devices of different device types, different target devices require different battery capacities to complete different target tasks. Therefore, in order to more accurately determine the power driving threshold compared with the battery power, in this embodiment, the electronic lock can determine the power driving threshold based on the device type and work attribute information of the target device.

[0149] Specifically, the electronic lock can obtain the device type of the target device and the operating attribute information of the target operation. Then, based on the device type and operating attribute information, it determines a battery indicator parameter when driving the target device. Finally, it determines a battery driving threshold based on the battery indicator parameter.

[0150] A reference power level may be set, such as 50% of the entire battery capacity, and then the power driving threshold may be determined by calculating the product between the reference power level and the power indication parameter.

[0151] Specifically, multiple historical working power quantities required for a target device of the same device type to complete a target work with the same working attribute information can be obtained. If the multiple historical working power quantities are all less than the first preset power quantity, the corresponding power indication parameter is determined to be the preset first power indication sub-parameter; if a certain proportion (for example, 3 / 2) of the historical working power quantities among the multiple historical working power quantities is greater than or equal to the first preset power quantity and less than the second preset power quantity, the corresponding power indication parameter is determined to be the preset second power indication sub-parameter; if a certain proportion (for example, 3 / 2) of the historical working power quantities among the multiple historical working power quantities is greater than or equal to the second preset power quantity, the corresponding power indication parameter is determined to be the preset third power indication sub-parameter. The power indication parameter corresponding to the device type and working attribute information can be determined by the above means.

[0152] 1015. When the battery is fully charged, continue to drive the target device to perform the target task, and detect the current battery charge during the continued driving process. When the battery charge is less than the charge driving threshold, return to the step of stopping driving the target device to perform the target task until the target device completes the target task.

[0153] In this embodiment, when the battery is fully charged, it indicates that the electronic lock has sufficient power to support it to continue driving the target device to perform the target task, and the target device will continue to be driven. However, if the target task is not completed when the battery is exhausted, the target task will fail. Therefore, in this embodiment, the electronic lock continues to detect the current battery power consumed during the driving process, and continues to compare the current battery power consumed with the power driving threshold, so as to continue charging at an appropriate time, so as to ultimately drive the target device to perform and complete the target task.

[0154] Among them, the above-mentioned appropriate time is when the battery power is less than the above-mentioned power driving threshold. Since the battery power is less than the above-mentioned power driving threshold, it means that the passive electronic lock does not have sufficient power to support it to continue to drive the above-mentioned target device to perform the above-mentioned target work, so the electronic lock needs to be charged so that it can be charged to enable the electronic lock to have sufficient power to support it to drive the above-mentioned target device to perform the above-mentioned target work; and if the electronic lock has sufficient power to support it to continue to drive the above-mentioned target device to perform the above-mentioned target work, the electronic lock continues to drive the target device and continues to detect the current battery power during the driving process until the above-mentioned target device completes the above-mentioned target work.

[0155] In some embodiments, since the passive electronic lock may stop driving the target device to perform the target work during the driving process of the target device to perform the target work, in order to prevent the electronic lock from forgetting the position of the target device when it stopped performing the target work the next time it continues to drive the target device to perform the target work, in this embodiment, a node can be introduced for recording.

[0156] Specifically, after stopping driving the target device to perform the target task, the electronic lock may further include recording a stop node of the target device when the target device stopped performing the target task, where the stop node indicates the position of the target device when the target task stopped. Accordingly, continuing to drive the target device to perform the target task may include continuing to drive the target device to perform the target task based on the stop node.

[0157] For example, if the electronic lock is set to a passive electronic lock, and the above-mentioned device driving instruction is set to drive the motor of the passive electronic lock to perform unlocking, then after stopping driving the above-mentioned target device to perform the above-mentioned target work, it is necessary to record the rotation position or number of rotations of the current motor when performing the unlocking work, so that the next time the above-mentioned target device is continued to be driven to perform the above-mentioned target work, the rotation unlocking can be continued based on the rotation position or number of rotations.

[0158] In some embodiments, due to abnormal reasons, the passive electronic lock may be charged multiple times but still cannot drive the target device to complete the target work, so an abnormal error report is required to prompt relevant staff.

[0159] Specifically, the passive electronic lock can detect the number of charging times when driving the above-mentioned target device to perform the above-mentioned target work, and judge the number of charging times. If the above-mentioned charging times are equal to the preset number threshold, it means that there may be an abnormal situation at present, which makes it impossible to complete the target work. Therefore, it is necessary to generate a work error message and send the above-mentioned work error message to the above-mentioned electronic device so that the above-mentioned electronic device will issue an error prompt based on the above-mentioned work error message, thereby reminding the corresponding staff.

[0160] In some embodiments, the threshold value for comparing the number of charging times can be determined based on the historical charging status of the same device and the same operation, so that when an abnormal situation occurs, the abnormal situation can be quickly discovered and the relevant staff can be reminded.

[0161] Specifically, the system can first determine historical charging information when at least one historical device of the same type as the target device was driven to perform a historical operation with the same attributes as the target operation. Then, based on this historical charging information, the system can determine the number of historical charging times when the at least one historical device was driven to complete the corresponding historical operation when the historical ambient temperature was less than the battery temperature tolerance threshold. Finally, the threshold number of times can be determined based on the historical number of charging times corresponding to the at least one historical device.

[0162] From the above content, it can be seen that a device driving instruction sent by an electronic device is received, the device driving instruction includes a target device to be driven and a target work to be performed by the target device; the current ambient temperature is obtained and the ambient temperature is judged; when the ambient temperature is lower than a preset battery temperature resistance threshold, the target device is driven to perform the target work based on the device driving instruction, and the current battery power is detected during the driving process; if the battery power is lower than the preset power driving threshold, the target device is stopped from being driven to perform the target work and is charged; when the battery power is full, the target device is continued to be driven to perform the target work, and the current battery power is detected during the continued driving process, and when the battery power is lower than the power driving threshold, the step of stopping driving the target device to perform the target work is returned to and executed until the target device completes the target work. In this way, by charging multiple times in a low temperature environment and being able to drive the target device to perform the target work when the battery power is full, until the target work is completed, the phenomenon of failure of the passive electronic lock caused by the small capacitance of the battery in the low temperature environment is avoided.

[0163] 102. After the motor 200 rotates forward for a first time period, control the motor 200 to rotate reversely for a second time period for reset, where the second time period is shorter than the first time period.

[0164] Then, since the time duration of the motor 200 reversing is shorter than the time duration of the motor 200 rotating forward, the interference caused by uneven force during the forward and reverse rotation of the motor 200 can be avoided, so that the motor 200 can stop more accurately at the initial position before the forward rotation after reversing, thereby reducing the probability of the electronic lock getting stuck.

[0165] In some embodiments, the first duration may be greater than or equal to 265 milliseconds and less than or equal to 300 milliseconds, and the second duration may be greater than or equal to 225 milliseconds and less than or equal to 260 milliseconds. For example, the first duration is 265 milliseconds and the second duration is 225 milliseconds, or the first duration is 265 milliseconds and the second duration is 245 milliseconds, or the first duration is 275 milliseconds and the second duration is 235 milliseconds, or the first duration is 280 milliseconds and the second duration is 24 milliseconds, or the first duration is 300 milliseconds and the second duration is 245 milliseconds, and this embodiment of the present application does not limit this.

[0166] Please continue to refer to FIG7 , which is a flow chart of controlling the motor 200 to rotate in reverse for a second time period in FIG5 . In some embodiments, after the motor 200 rotates forward for a first time period, controlling the motor 200 to rotate in reverse for a second time period may include:

[0167] 1021. When the motor 200 completes the first forward rotation time, the motor 200 is controlled to stop rotating for a third time, so that the locking component 100 can move to the unlocking position.

[0168] 1022. When the motor 200 stops for the third time, control the motor 200 to reverse for a second time, where the second time is shorter than the first time.

[0169] Then, in an actual unlocking process, the actions of the various components of the electronic lock can be as follows:

[0170] First, in an initial state, the locking section 11 is located at the locked position, and the locking tongue 400 locks the locking section 11 , so that the housing 300 can lock external objects through the locking component 100 .

[0171] Then, the motor 200 rotates forward for a first period of time to drive the lock tongue 400 to move in the second direction H2 , so that the lock tongue 400 releases the locking section 11 or unlocks the locking section 11 .

[0172] Then, the motor 200 stops rotating for a third time period to allow the locking section 11 to move to the unlocking position.

[0173] Finally, the motor 200 reverses for a second period of time, and at the same time, the first elastic member 500 also drives the lock tongue 400 to reset, so that the lock tongue 400 can be driven to move along the second direction H2 to avoid the position during the subsequent movement of the locking section 11 toward the locked position again, and after the locking section 11 moves to the locked position, the first elastic member 500 can be restored to drive the lock tongue 400 to move along the first direction H1 to lock the locking section 11.

[0174] In some embodiments, controlling the motor 200 to reverse for a second time period may include: controlling the motor 200 to reverse for the second time period so that the motor 200 can limit the blocking surface 45 from moving to cover at least a portion of the lock hole 32 .

[0175] For example, in combination with the above-mentioned motor 200 driving the lock tongue 400 to move through the cam 21, the position of the convex part of the cam 21 can be controlled by controlling the angle of the motor 200, so that the convex part of the cam 21 limits the movement of the lock tongue 400 along the first direction H1, and finally achieves the effect of limiting the blocking surface 45 from moving to blocking at least part of the lock hole 32.

[0176] In some embodiments, controlling the motor 200 to reverse for a second period of time may include: controlling the motor 200 to reverse for a second period of time so that the locking segment 11 moving toward the locked position can push the inclined surface 41, thereby causing the locking tongue 400 to move along the second direction H2 to avoid the position.

[0177] In some embodiments, controlling the motor 200 to rotate in reverse for the second duration may include controlling the motor 200 to rotate in reverse for the second duration so that the motor 200 returns to the same angle as when the motor 200 began rotating in the forward direction for the first duration. This ensures that the motor 200 reduces travel errors caused by different forces during the forward and reverse rotation phases.

[0178] In some embodiments, before controlling the motor 200 to reverse for the second time period, the unlocking method may further include: obtaining the second time period based on the first time period and the elastic coefficient of the first elastic member 500 .

[0179] For example, before controlling the motor 200 to reverse for the second time period, the unlocking method may further include: obtaining the second time period based on the first time period, the friction between the lock tongue 400 and the locking section 11 , and the elastic coefficient of the first elastic member 500 .

[0180] It is understandable that during the forward and reverse rotation of the motor 200 , the motor 200 is subjected to forces of varying magnitudes, which are mainly affected by the first elastic member 500 , and secondly by the friction between the locking tongue 400 and the locking segment 11 .

[0181] Therefore, the second time length can be accurately obtained by combining the first time length, i.e., the time length of the forward rotation of the motor 200, with the friction between the lock tongue 400 and the locking section 11, and the elastic coefficient of the first elastic member 500, so that the motor 200 can more accurately return to the initial angle when it reverses.

[0182] Please continue to refer to Figure 8, which is a flow chart of the first method of unlocking an electronic lock provided by an embodiment of the present application. Based on the above electronic lock, the embodiment of the present application also provides a second method of unlocking an electronic lock, which includes the following steps:

[0183] 201. When the electronic lock needs to be unlocked, the motor 200 is controlled to rotate forward by a first preset angle to release the locking component 100.

[0184] The specific structure of the electronic lock can be found in the above-mentioned electronic lock, and the embodiments of this application will not be described in detail here.

[0185] In some embodiments, controlling the motor 200 to rotate forward by a first preset angle to unlock the locking component 100 may include the following steps 2011 to 2015:

[0186] 2011. Receive a device driving instruction sent by an electronic device, where the device driving instruction includes a target device to be driven and a target task to be performed by the target device.

[0187] The target device is the motor 200 of the electronic lock, and the target operation is to control the motor 200 to rotate forward by a first preset angle.

[0188] Among them, the above-mentioned electronic device can be a terminal device or a server. For example, the terminal device can be a mobile terminal device held by a user, so that the user can issue instructions to an electronic lock such as a passive electronic lock through an electronic device, such as a mobile phone, tablet, notebook, etc., which can be set specifically according to needs.

[0189] In this embodiment, the above-mentioned device driving instruction is used to instruct the electronic lock to drive the target device to perform the target work. The device driving instruction can be sent by the host computer according to preset rules, or people can send the instructions currently required for the electronic lock to work in advance through an electronic device. Since different electronic locks need to drive different target devices (i.e., motors) under the same work task, the working methods of the target work performed by the target device are also different, so the above-mentioned device driving instruction is generated based on the electronic lock.

[0190] Specifically, the electronic device needs to establish a connection with the electronic lock in advance so that when the electronic lock needs to complete a certain work task, the electronic device determines the target device in the electronic lock that can complete the work task and the target work that the target device needs to perform based on the device type of the electronic lock, thereby generating the above-mentioned device driving instructions based on the target device and the target work.

[0191] 2012. Obtain the current ambient temperature and make a judgment on the ambient temperature.

[0192] In this embodiment, the electronic lock obtains its current ambient temperature to determine whether the current battery capacitance will decrease through the current ambient temperature. If the capacitance decreases, the remaining battery power may be insufficient to support the electronic lock to complete the target work indicated by the device driving instruction.

[0193] It is understandable that the battery capacitance will decrease under low temperature conditions. Therefore, in this embodiment, the electronic lock can determine whether the current state is in a low temperature state that will reduce the battery capacitance by judging the ambient temperature.

[0194] 2013. When the ambient temperature is lower than a preset battery temperature resistance threshold, the target device is driven to perform the target task based on the device driving instruction, and the current battery power is detected during the driving process.

[0195] In this embodiment, the electronic lock can determine whether it is currently in a low-temperature state that will reduce the battery's capacitance by comparing the threshold value. That is, a battery temperature resistance threshold value is preset in the electronic lock to compare the acquired environment with the battery temperature resistance threshold value to determine whether it is currently in a low-temperature state that will reduce the battery's capacitance.

[0196] Specifically, if the ambient temperature is lower than the preset battery temperature resistance threshold, indicating that the current state is in a low temperature state that will reduce the battery capacitance, the electronic lock needs to detect the current battery power while driving the target device to perform the target work based on the device driving instruction, so as to stop driving the target device to perform the target work at an appropriate time and continue charging, so that the charged electronic lock can continue to have power to drive the target device to perform the target work.

[0197] If the ambient temperature is greater than or equal to the preset battery temperature resistance threshold, it means that the current temperature is not in a low temperature state that will reduce the battery capacitance. Then the passive electronic lock can directly drive the target device to perform the target work based on the device driving instruction.

[0198] In some embodiments, in order to prevent abnormal factors from occurring, which may cause the capacitor capacity to not decrease but still lack sufficient power to support the electronic lock to complete the target work indicated by the device driving instruction, in a scenario where the ambient temperature is greater than or equal to the preset battery temperature resistance threshold, the electronic lock can also detect the current battery power while driving the above-mentioned target device to perform the above-mentioned target work. The specific setting can be made according to needs and is not limited here.

[0199] In some embodiments, to ensure security, the electronic lock may use authentication to determine whether the electronic device that sends the device driving instruction to the electronic lock has the corresponding authority.

[0200] Specifically, the aforementioned driving the target device to perform the target operation based on the device driving instruction may include: the electronic lock obtaining a device identifier of the electronic device carried in the device driving instruction. Then, the device identifier is transmitted to a cloud platform, so that the cloud platform authenticates the identity of the electronic device based on the device identifier. Upon successful authentication, the cloud platform provides feedback on driving instruction parameters required to drive the target device. The driving instruction parameters may be parameters indicating whether the electronic lock can drive the target device, or may be protocol information required for the electronic lock to drive the target device. The specific configuration can be determined based on actual needs and is not limited herein.

[0201] After obtaining the drive instruction parameters, the electronic lock can drive the target device to perform the target operation based on the drive instruction parameters and the device drive instruction. If the drive instruction parameters are the protocol information required for the electronic lock to drive the target device, the electronic lock can use the protocol information to drive the target device specified in the device drive instruction to perform the target operation.

[0202] 2014. If the battery power is less than a preset power driving threshold, stop driving the target device to perform the target work and charge the battery.

[0203] In this embodiment, the electronic lock detects the current battery level to determine whether there is sufficient power to drive the target device and perform the target task. A power drive threshold is preset in the electronic lock, and the power drive threshold is compared with the battery level to determine whether there is sufficient power to drive the target device and perform the target task.

[0204] Specifically, if the electronic lock does not have sufficient power to support it to continue driving the above-mentioned target device to perform the above-mentioned target work, the electronic lock needs to be charged so that the electronic lock can have sufficient power to support it to drive the above-mentioned target device to perform the above-mentioned target work through charging; and if the electronic lock has sufficient power to support it to continue driving the above-mentioned target device to perform the above-mentioned target work, the electronic lock continues to drive the target device and continues to detect the current battery power during the driving process.

[0205] Specifically, the electronic lock can be charged based on a charging curve. This charging curve can be a user-preset charging curve to ensure that the charging method of the electronic lock meets the user's needs. The charging curve can also be a charging curve generated according to preset rules based on the battery status of the electronic lock to ensure safer and faster charging of the electronic lock. The charging curve can include the relative relationship between charging time and charging power, or the relative relationship between charging time and charging current.

[0206] In some embodiments, due to the different device types of the target devices and the different work attribute information of the target tasks performed by target devices of different device types, different target devices require different battery capacities to complete different target tasks. Therefore, in order to more accurately determine the power driving threshold compared with the battery power, in this embodiment, the electronic lock can determine the power driving threshold based on the device type and work attribute information of the target device.

[0207] Specifically, the electronic lock can obtain the device type of the target device and the operating attribute information of the target operation. Then, based on the device type and operating attribute information, it determines a battery indicator parameter when driving the target device. Finally, it determines a battery driving threshold based on the battery indicator parameter.

[0208] A reference power level may be set, such as 50% of the entire battery capacity, and then the power driving threshold may be determined by calculating the product between the reference power level and the power indication parameter.

[0209] Specifically, multiple historical working power quantities required for a target device of the same device type to complete a target work with the same working attribute information can be obtained. If the multiple historical working power quantities are all less than the first preset power quantity, the corresponding power indication parameter is determined to be the preset first power indication sub-parameter; if a certain proportion (for example, 3 / 2) of the historical working power quantities among the multiple historical working power quantities is greater than or equal to the first preset power quantity and less than the second preset power quantity, the corresponding power indication parameter is determined to be the preset second power indication sub-parameter; if a certain proportion (for example, 3 / 2) of the historical working power quantities among the multiple historical working power quantities is greater than or equal to the second preset power quantity, the corresponding power indication parameter is determined to be the preset third power indication sub-parameter. The power indication parameter corresponding to the device type and working attribute information can be determined by the above means.

[0210] 2015. When the battery is fully charged, continue to drive the target device to perform the target task, and detect the current battery charge during the driving process. When the battery charge is less than the charge driving threshold, return to the step of stopping driving the target device to perform the target task until the target device completes the target task.

[0211] In this embodiment, when the battery is fully charged, it indicates that the electronic lock has sufficient power to support it to continue driving the target device to perform the target task, and the target device will continue to be driven. However, if the target task is not completed when the battery is exhausted, the target task will fail. Therefore, in this embodiment, the electronic lock continues to detect the current battery power consumed during the driving process, and continues to compare the current battery power consumed with the power driving threshold, so as to continue charging at an appropriate time, so as to ultimately drive the target device to perform and complete the target task.

[0212] Among them, the above-mentioned appropriate time is when the battery power is less than the above-mentioned power driving threshold. Since the battery power is less than the above-mentioned power driving threshold, it means that the passive electronic lock does not have sufficient power to support it to continue to drive the above-mentioned target device to perform the above-mentioned target work, so the electronic lock needs to be charged so that it can be charged to enable the electronic lock to have sufficient power to support it to drive the above-mentioned target device to perform the above-mentioned target work; and if the electronic lock has sufficient power to support it to continue to drive the above-mentioned target device to perform the above-mentioned target work, the electronic lock continues to drive the target device and continues to detect the current battery power during the driving process until the above-mentioned target device completes the above-mentioned target work.

[0213] In some embodiments, since the passive electronic lock may stop driving the target device to perform the target work during the driving process of the target device to perform the target work, in order to prevent the electronic lock from forgetting the position of the target device when it stopped performing the target work the next time it continues to drive the target device to perform the target work, in this embodiment, a node can be introduced for recording.

[0214] Specifically, after stopping driving the target device to perform the target task, the electronic lock may further include recording a stop node of the target device when the target device stopped performing the target task, where the stop node indicates the position of the target device when the target task stopped. Accordingly, continuing to drive the target device to perform the target task may include continuing to drive the target device to perform the target task based on the stop node.

[0215] For example, if the electronic lock is set to a passive electronic lock, and the above-mentioned device driving instruction is set to drive the motor of the passive electronic lock to perform unlocking, then after stopping driving the above-mentioned target device to perform the above-mentioned target work, it is necessary to record the rotation position or number of rotations of the current motor when performing the unlocking work, so that the next time the above-mentioned target device is continued to be driven to perform the above-mentioned target work, the rotation unlocking can be continued based on the rotation position or number of rotations.

[0216] In some embodiments, due to abnormal reasons, the passive electronic lock may be charged multiple times but still cannot drive the target device to complete the target work, so an abnormal error report is required to prompt relevant staff.

[0217] Specifically, the passive electronic lock can detect the number of charging times when driving the above-mentioned target device to perform the above-mentioned target work, and judge the number of charging times. If the above-mentioned charging times are equal to the preset number threshold, it means that there may be an abnormal situation at present, which makes it impossible to complete the target work. Therefore, it is necessary to generate a work error message and send the above-mentioned work error message to the above-mentioned electronic device so that the above-mentioned electronic device will issue an error prompt based on the above-mentioned work error message, thereby reminding the corresponding staff.

[0218] In some embodiments, the threshold value for comparing the number of charging times can be determined based on the historical charging status of the same device and the same operation, so that when an abnormal situation occurs, the abnormal situation can be quickly discovered and the relevant staff can be reminded.

[0219] Specifically, the system can first determine historical charging information when at least one historical device of the same type as the target device was driven to perform a historical operation with the same attributes as the target operation. Then, based on this historical charging information, the system can determine the number of historical charging times when the at least one historical device was driven to complete the corresponding historical operation when the historical ambient temperature was less than the battery temperature tolerance threshold. Finally, the threshold number of times can be determined based on the historical number of charging times corresponding to the at least one historical device.

[0220] From the above content, it can be seen that a device driving instruction sent by an electronic device is received, the device driving instruction includes a target device to be driven and a target work to be performed by the target device; the current ambient temperature is obtained and the ambient temperature is judged; when the ambient temperature is lower than a preset battery temperature resistance threshold, the target device is driven to perform the target work based on the device driving instruction, and the current battery power is detected during the driving process; if the battery power is lower than the preset power driving threshold, the target device is stopped from being driven to perform the target work and is charged; when the battery power is full, the target device is continued to be driven to perform the target work, and the current battery power is detected during the continued driving process, and when the battery power is lower than the power driving threshold, the step of stopping driving the target device to perform the target work is returned to and executed until the target device completes the target work. In this way, by charging multiple times in a low temperature environment and being able to drive the target device to perform the target work when the battery power is full, until the target work is completed, the phenomenon of failure of the passive electronic lock caused by the small capacitance of the battery in the low temperature environment is avoided.

[0221] 202. After the motor 200 rotates forward by a first preset angle, control the motor 200 to reverse for a second time period, where the second time period is obtained based on the first preset angle, so that the motor 200 returns to the same angle as when it started to rotate forward by the first preset angle.

[0222] The specific structure of the electronic lock can be found in the above-mentioned electronic lock, and the embodiments of this application will not be described in detail here.

[0223] Then, by adjusting the second duration of the motor 200's reverse rotation, the interference caused by uneven force during the forward and reverse rotation of the motor 200 can be avoided, so that the motor 200 can stop more accurately at the initial position before the forward rotation after the reverse rotation, thereby reducing the probability of the electronic lock getting stuck.

[0224] Please continue to refer to Figure 9, which is a flow chart of controlling the motor to reverse for a second time period in Figure 8. Exemplarily, after the motor 200 rotates forward by a first preset angle, controlling the motor 200 to reverse for a second time period may include:

[0225] 2021. When the motor 200 completes the forward rotation of the first preset angle, the motor 200 is controlled to stop rotating for a third time period so that the locking component 100 can move to the unlocking position.

[0226] 2022. When the motor 200 stops for the third time period, control the motor 200 to reverse for the second time period.

[0227] Then, in an actual unlocking process, the actions of the various components of the electronic lock can be as follows:

[0228] First, in an initial state, the locking section 11 is located at the locked position, and the locking tongue 400 locks the locking section 11 , so that the housing 300 can lock external objects through the locking component 100 .

[0229] Then, the motor 200 rotates forward by a first preset angle to drive the lock tongue 400 to move along the second direction H2 , so that the lock tongue 400 releases the locking section 11 or unlocks the locking section 11 .

[0230] Then, the motor 200 stops rotating for a third time period to allow the locking section 11 to move to the unlocking position.

[0231] Finally, the motor 200 reverses for a second period of time, and at the same time, the first elastic member 500 also drives the lock tongue 400 to reset, so that the lock tongue 400 can be driven to move along the second direction H2 to avoid the position during the subsequent movement of the locking section 11 toward the locked position again, and after the locking section 11 moves to the locked position, the first elastic member 500 can elastically recover to drive the lock tongue 400 to move along the first direction H1 to the locked locking section 11.

[0232] In some embodiments, controlling the motor 200 to reverse for a second time period may include: controlling the motor 200 to reverse for the second time period so that the motor 200 can limit the blocking surface 45 from moving to cover at least a portion of the lock hole 32 .

[0233] For example, in combination with the above-mentioned motor 200 driving the lock tongue 400 to move through the cam 21, the position of the convex part of the cam 21 can be controlled by controlling the angle of the motor 200, so that the convex part of the cam 21 limits the movement of the lock tongue 400 along the first direction H1, and finally achieves the effect of limiting the blocking surface 45 from moving to blocking at least part of the lock hole 32.

[0234] In some embodiments, controlling the motor 200 to reverse for a second period of time may include: controlling the motor 200 to reverse for a second period of time so that the locking segment 11 moving toward the locked position can push the inclined surface 41, thereby causing the locking tongue 400 to move along the second direction H2 to avoid the position.

[0235] In some embodiments, the second time length is obtained based on the first preset angle, and the second time length may be obtained based on the first preset angle, the friction between the lock tongue 400 and the locking section 11 , and the elastic coefficient of the first elastic member 500 .

[0236] It is understandable that during the forward and reverse rotation of the motor 200 , the motor 200 is subjected to forces of varying magnitudes, which are mainly affected by the first elastic member 500 , and secondly by the friction between the locking tongue 400 and the locking segment 11 .

[0237] Therefore, the second time length can be accurately obtained by combining the first time length, i.e., the time length of the forward rotation of the motor 200, with the friction between the lock tongue 400 and the locking section 11, and the elastic coefficient of the first elastic member 500, so that the motor 200 can more accurately return to the initial angle when it reverses.

[0238] Please continue to refer to Figure 10, which is a flow chart of the second method of unlocking an electronic lock provided in an embodiment of the present application. Based on the above electronic lock, the embodiment of the present application also provides a third method of unlocking an electronic lock, which includes the following steps:

[0239] 301. When the electronic lock needs to be unlocked, the initial angle of the motor 200 is obtained and the motor 200 is driven to rotate forward to release the locking component 100.

[0240] The specific structure of the electronic lock can be found in the above-mentioned electronic lock, and the embodiments of this application will not be described in detail here.

[0241] In some embodiments, controlling the motor 200 to rotate forward to unlock the locking component 100 may include the following steps 3011 to 3015:

[0242] 3011. Receive a device driving instruction sent by an electronic device, where the device driving instruction includes a target device to be driven and a target task to be performed by the target device.

[0243] The target device is the motor 200 of the electronic lock, and the target operation is to control the motor 200 to rotate forward.

[0244] Among them, the above-mentioned electronic device can be a terminal device or a server. For example, the terminal device can be a mobile terminal device held by a user, so that the user can issue instructions to an electronic lock such as a passive electronic lock through an electronic device, such as a mobile phone, tablet, notebook, etc., which can be set specifically according to needs.

[0245] In this embodiment, the above-mentioned device driving instruction is used to instruct the electronic lock to drive the target device to perform the target work. The device driving instruction can be sent by the host computer according to preset rules, or people can send the instructions currently required for the electronic lock to work in advance through an electronic device. Since different electronic locks need to drive different target devices (i.e., motors) under the same work task, the working methods of the target work performed by the target device are also different, so the above-mentioned device driving instruction is generated based on the electronic lock.

[0246] Specifically, the electronic device needs to establish a connection with the electronic lock in advance so that when the electronic lock needs to complete a certain work task, the electronic device determines the target device in the electronic lock that can complete the work task and the target work that the target device needs to perform based on the device type of the electronic lock, thereby generating the above-mentioned device driving instructions based on the target device and the target work.

[0247] 3012. Obtain the current ambient temperature and make a judgment on the ambient temperature.

[0248] In this embodiment, the electronic lock obtains its current ambient temperature to determine whether the current battery capacitance will decrease through the current ambient temperature. If the capacitance decreases, the remaining battery power may be insufficient to support the electronic lock to complete the target work indicated by the device driving instruction.

[0249] It is understandable that the battery capacitance will decrease under low temperature conditions. Therefore, in this embodiment, the electronic lock can determine whether the current state is in a low temperature state that will reduce the battery capacitance by judging the ambient temperature.

[0250] 3013. When the ambient temperature is lower than a preset battery temperature resistance threshold, the target device is driven to perform the target task based on the device driving instruction, and the current battery power is detected during the driving process.

[0251] In this embodiment, the electronic lock can determine whether it is currently in a low-temperature state that will reduce the battery's capacitance by comparing the threshold value. That is, a battery temperature resistance threshold value is preset in the electronic lock to compare the acquired environment with the battery temperature resistance threshold value to determine whether it is currently in a low-temperature state that will reduce the battery's capacitance.

[0252] Specifically, if the ambient temperature is lower than the preset battery temperature resistance threshold, indicating that the current state is in a low temperature state that will reduce the battery capacitance, the electronic lock needs to detect the current battery power while driving the target device to perform the target work based on the device driving instruction, so as to stop driving the target device to perform the target work at an appropriate time and continue charging, so that the charged electronic lock can continue to have power to drive the target device to perform the target work.

[0253] If the ambient temperature is greater than or equal to the preset battery temperature resistance threshold, it means that the current temperature is not in a low temperature state that will reduce the battery capacitance. Then the passive electronic lock can directly drive the target device to perform the target work based on the device driving instruction.

[0254] In some embodiments, in order to prevent abnormal factors from occurring, which may cause the capacitor capacity to not decrease but still lack sufficient power to support the electronic lock to complete the target work indicated by the device driving instruction, in a scenario where the ambient temperature is greater than or equal to the preset battery temperature resistance threshold, the electronic lock can also detect the current battery power while driving the above-mentioned target device to perform the above-mentioned target work. The specific setting can be made according to needs and is not limited here.

[0255] In some embodiments, to ensure security, the electronic lock may use authentication to determine whether the electronic device that sends the device driving instruction to the electronic lock has the corresponding authority.

[0256] Specifically, the aforementioned driving the target device to perform the target operation based on the device driving instruction may include: the electronic lock obtaining a device identifier of the electronic device carried in the device driving instruction. Then, the device identifier is transmitted to a cloud platform, so that the cloud platform authenticates the identity of the electronic device based on the device identifier. Upon successful authentication, the cloud platform provides feedback on driving instruction parameters required to drive the target device. The driving instruction parameters may be parameters indicating whether the electronic lock can drive the target device, or may be protocol information required for the electronic lock to drive the target device. The specific configuration can be determined based on actual needs and is not limited herein.

[0257] After obtaining the drive instruction parameters, the electronic lock can drive the target device to perform the target operation based on the drive instruction parameters and the device drive instruction. If the drive instruction parameters are the protocol information required for the electronic lock to drive the target device, the electronic lock can use the protocol information to drive the target device specified in the device drive instruction to perform the target operation.

[0258] 3014. If the battery power is less than a preset power driving threshold, stop driving the target device to perform the target work and charge the battery.

[0259] In this embodiment, the electronic lock detects the current battery level to determine whether there is sufficient power to drive the target device and perform the target task. A power drive threshold is preset in the electronic lock, and the power drive threshold is compared with the battery level to determine whether there is sufficient power to drive the target device and perform the target task.

[0260] Specifically, if the electronic lock does not have sufficient power to support it to continue driving the above-mentioned target device to perform the above-mentioned target work, the electronic lock needs to be charged so that the electronic lock can have sufficient power to support it to drive the above-mentioned target device to perform the above-mentioned target work through charging; and if the electronic lock has sufficient power to support it to continue driving the above-mentioned target device to perform the above-mentioned target work, the electronic lock continues to drive the target device and continues to detect the current battery power during the driving process.

[0261] Specifically, the electronic lock can be charged based on a charging curve. This charging curve can be a user-preset charging curve to ensure that the charging method of the electronic lock meets the user's needs. The charging curve can also be a charging curve generated according to preset rules based on the battery status of the electronic lock to ensure safer and faster charging of the electronic lock. The charging curve can include the relative relationship between charging time and charging power, or the relative relationship between charging time and charging current.

[0262] In some embodiments, due to the different device types of the target devices and the different work attribute information of the target tasks performed by target devices of different device types, different target devices require different battery capacities to complete different target tasks. Therefore, in order to more accurately determine the power driving threshold compared with the battery power, in this embodiment, the electronic lock can determine the power driving threshold based on the device type and work attribute information of the target device.

[0263] Specifically, the electronic lock can obtain the device type of the target device and the operating attribute information of the target operation. Then, based on the device type and operating attribute information, it determines a battery indicator parameter when driving the target device. Finally, it determines a battery driving threshold based on the battery indicator parameter.

[0264] A reference power level may be set, such as 50% of the entire battery capacity, and then the power driving threshold may be determined by calculating the product between the reference power level and the power indication parameter.

[0265] Specifically, multiple historical working power quantities required for a target device of the same device type to complete a target work with the same working attribute information can be obtained. If the multiple historical working power quantities are all less than the first preset power quantity, the corresponding power indication parameter is determined to be the preset first power indication sub-parameter; if a certain proportion (for example, 3 / 2) of the historical working power quantities among the multiple historical working power quantities is greater than or equal to the first preset power quantity and less than the second preset power quantity, the corresponding power indication parameter is determined to be the preset second power indication sub-parameter; if a certain proportion (for example, 3 / 2) of the historical working power quantities among the multiple historical working power quantities is greater than or equal to the second preset power quantity, the corresponding power indication parameter is determined to be the preset third power indication sub-parameter. The power indication parameter corresponding to the device type and working attribute information can be determined by the above means.

[0266] 3015. When the battery is fully charged, continue to drive the target device to perform the target task, and detect the current battery charge during the continued driving process. When the battery charge is less than the charge driving threshold, return to the step of stopping driving the target device to perform the target task until the target device completes the target task.

[0267] In this embodiment, when the battery is fully charged, it indicates that the electronic lock has sufficient power to support it to continue driving the target device to perform the target task, and the target device will continue to be driven. However, if the target task is not completed when the battery is exhausted, the target task will fail. Therefore, in this embodiment, the electronic lock continues to detect the current battery power consumed during the driving process, and continues to compare the current battery power consumed with the power driving threshold, so as to continue charging at an appropriate time, so as to ultimately drive the target device to perform and complete the target task.

[0268] Among them, the above-mentioned appropriate time is when the battery power is less than the above-mentioned power driving threshold. Since the battery power is less than the above-mentioned power driving threshold, it means that the passive electronic lock does not have sufficient power to support it to continue to drive the above-mentioned target device to perform the above-mentioned target work, so the electronic lock needs to be charged so that it can be charged to enable the electronic lock to have sufficient power to support it to drive the above-mentioned target device to perform the above-mentioned target work; and if the electronic lock has sufficient power to support it to continue to drive the above-mentioned target device to perform the above-mentioned target work, the electronic lock continues to drive the target device and continues to detect the current battery power during the driving process until the above-mentioned target device completes the above-mentioned target work.

[0269] In some embodiments, since the passive electronic lock may stop driving the target device to perform the target work during the driving process of the target device to perform the target work, in order to prevent the electronic lock from forgetting the position of the target device when it stopped performing the target work the next time it continues to drive the target device to perform the target work, in this embodiment, a node can be introduced for recording.

[0270] Specifically, after stopping driving the target device to perform the target task, the electronic lock may further include recording a stop node of the target device when the target device stopped performing the target task, where the stop node indicates the position of the target device when the target task stopped. Accordingly, continuing to drive the target device to perform the target task may include continuing to drive the target device to perform the target task based on the stop node.

[0271] For example, if the electronic lock is set to a passive electronic lock, and the above-mentioned device driving instruction is set to drive the motor of the passive electronic lock to perform unlocking, then after stopping driving the above-mentioned target device to perform the above-mentioned target work, it is necessary to record the rotation position or number of rotations of the current motor when performing the unlocking work, so that the next time the above-mentioned target device is continued to be driven to perform the above-mentioned target work, the rotation unlocking can be continued based on the rotation position or number of rotations.

[0272] In some embodiments, due to abnormal reasons, the passive electronic lock may be charged multiple times but still cannot drive the target device to complete the target work, so an abnormal error report is required to prompt relevant staff.

[0273] Specifically, the passive electronic lock can detect the number of charging times when driving the above-mentioned target device to perform the above-mentioned target work, and judge the number of charging times. If the above-mentioned charging times are equal to the preset number threshold, it means that there may be an abnormal situation at present, which makes it impossible to complete the target work. Therefore, it is necessary to generate a work error message and send the above-mentioned work error message to the above-mentioned electronic device so that the above-mentioned electronic device will issue an error prompt based on the above-mentioned work error message, thereby reminding the corresponding staff.

[0274] In some embodiments, the threshold value for comparing the number of charging times can be determined based on the historical charging status of the same device and the same operation, so that when an abnormal situation occurs, the abnormal situation can be quickly discovered and the relevant staff can be reminded.

[0275] Specifically, the system can first determine historical charging information when at least one historical device of the same type as the target device was driven to perform a historical operation with the same attributes as the target operation. Then, based on this historical charging information, the system can determine the number of historical charging times when the at least one historical device was driven to complete the corresponding historical operation when the historical ambient temperature was less than the battery temperature tolerance threshold. Finally, the threshold number of times can be determined based on the historical number of charging times corresponding to the at least one historical device.

[0276] From the above content, it can be seen that a device driving instruction sent by an electronic device is received, the device driving instruction includes a target device to be driven and a target work to be performed by the target device; the current ambient temperature is obtained and the ambient temperature is judged; when the ambient temperature is lower than a preset battery temperature resistance threshold, the target device is driven to perform the target work based on the device driving instruction, and the current battery power is detected during the driving process; if the battery power is lower than the preset power driving threshold, the target device is stopped from being driven to perform the target work and is charged; when the battery power is full, the target device is continued to be driven to perform the target work, and the current battery power is detected during the continued driving process, and when the battery power is lower than the power driving threshold, the step of stopping driving the target device to perform the target work is returned to and executed until the target device completes the target work. In this way, by charging multiple times in a low temperature environment and being able to drive the target device to perform the target work when the battery power is full, until the target work is completed, the phenomenon of failure of the passive electronic lock caused by the small capacitance of the battery in the low temperature environment is avoided.

[0277] 302. After the motor 200 finishes rotating forward, the real-time angle of the motor 200 is monitored, and the motor 200 is controlled to rotate in the reverse direction to the initial angle.

[0278] The specific structure of the electronic lock can be found in the above-mentioned electronic lock, and the embodiments of this application will not be described in detail here.

[0279] Therefore, by real-time monitoring of the angle of the motor 200 during reverse rotation, interference caused by uneven force during forward and reverse rotation of the motor 200 can be avoided, so that the motor 200 can stop more accurately at the initial position before forward rotation after reverse rotation, thereby reducing the probability of the electronic lock getting stuck.

[0280] Please continue to refer to Figure 11, which is a flow chart of controlling the motor reversal in Figure 10. Exemplarily, after the motor 200 finishes forward rotation, monitoring the real-time angle of the motor 200 and controlling the motor 200 to reverse to the initial angle may include:

[0281] 3021. When the motor 200 completes forward rotation, the motor 200 is controlled to stop rotating for a third time period so that the locking component 100 can move to the unlocking position.

[0282] 3022. When the motor 200 stops for the third period of time, monitor the real-time angle of the motor 200 and control the motor 200 to reverse to the initial angle.

[0283] In some embodiments, controlling the motor 200 to reverse to the initial angle may include: controlling the motor 200 to reverse to the initial angle so that the locking section 11 moving toward the locked position can push the inclined surface 41, thereby causing the locking tongue 400 to move along the second direction H2 to avoid the position.

[0284] In some embodiments, controlling the motor 200 to reverse to the initial angle may include: controlling the motor 200 to reverse to the initial angle so that the motor 200 can limit the blocking surface 45 from moving to cover at least a portion of the lock hole 32 .

[0285] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program is executed by a processor to implement the unlocking method as described above.

[0286] The above is a detailed introduction to the parameter adjustment method, storage medium and electronic lock provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An electronic lock, wherein, Comprising: A housing, provided with an installation cavity and a keyhole, the keyhole being respectively communicated with the installation cavity and the outside of the housing; A locking member, including a locking section movably installed in the keyhole, the locking section being capable of moving out of the installation cavity to the unlocking position, and being capable of moving into the installation cavity to the locking position; A locking tongue, slidably installed in the installation cavity, the locking tongue being capable of moving in a first direction to lock the locking section in the locking position, and being capable of moving in a second direction to release the locking section in the locking position, the first direction and the second direction being opposite; A first elastic member, installed in the installation cavity, the first elastic member being used to drive the locking tongue to move in the first direction; A motor, arranged in the installation cavity, the motor being in transmission connection with the locking tongue; And A processor, the processor being configured to: When the electronic lock needs to be unlocked, control the motor to rotate forward for a first duration, so that the locking tongue moves in the second direction to release the locking section; After the motor rotates forward for the first duration, control the motor to rotate backward for a second duration for resetting, the second duration being less than the first duration.

2. The electronic lock according to claim 1, wherein, A limiting groove is provided on the circumferential side of the locking section. When the locking section moves to the locking position, the locking tongue can move in the first direction to enter the limiting groove to lock the locking section, and the locking tongue can move in the second direction to disengage from the limiting groove to release the locking section; Wherein, one side of the locking tongue facing the keyhole has an inclined surface, the inclined surface is located at one end of the locking tongue close to the keyhole along the first direction, and the inclined surface is inclined in a direction away from the keyhole; After the motor rotates backward for the second duration, the locking section moving toward the locking position can push against the inclined surface, so that the locking tongue moves in the second direction to avoid interference.

3. The electronic lock according to claim 2, wherein, One side surface of the locking tongue facing the keyhole further has a blocking surface, the blocking surface is located on the side of the inclined surface away from the keyhole along the first direction, and the blocking surface is perpendicular to the axis of the keyhole; The processor is configured to: control the motor to rotate backward for the second duration to limit the movement of the blocking surface to block at least part of the keyhole.

4. The electronic lock according to claim 2, wherein, The processor is further configured to: obtain the second duration based on the first duration, the friction force between the locking tongue and the locking section, and the elastic coefficient of the first elastic member.

5. The electronic lock according to claim 1, wherein, The locking tongue is provided with a transmission hole, and the inner wall of the transmission hole includes a first inner wall away from the keyhole along the first direction; The output shaft of the motor is provided with a cam, the cam is arranged in the transmission hole, and the cam abuts against the first inner wall.

6. The electronic lock according to claim 1, wherein, The electronic lock further includes a second elastic member, the second elastic member being used to drive the locking section to move toward the unlocking position.

7. The electronic lock according to claim 1, wherein, The processor is configured to: when the first duration of controlling the motor to rotate forward is completed, control the motor to stop for a third duration; when the third duration of controlling the motor to stop is completed, control the motor to rotate in reverse for the second duration.

8. The electronic lock according to claim 1, wherein, The electronic lock is a passive electronic lock.

9. The electronic lock according to claim 1, wherein, The processor is configured to: receive a device driving instruction sent by an electronic device, where the device driving instruction includes a target device to be driven and a target task to be performed by the target device. The target device is the motor of the electronic lock, and the target task is to control the motor to rotate forward for the first duration. Obtain the current ambient temperature and judge the ambient temperature. When the ambient temperature is less than a preset battery temperature tolerance threshold, drive the target device to perform the target task based on the device driving instruction, and detect the current battery power during the driving process. If the battery power is less than a preset power driving threshold, stop driving the target device to perform the target task and charge the battery. When the battery is fully charged, continue to drive the target device to perform the target task, detect the current battery power during the continuous driving process, and when the battery power is less than the power driving threshold, return to the step of stopping driving the target device to perform the target task until the target device completes the target task.

10. An unlocking method for an electronic lock, wherein, The electronic lock includes a locking component and a motor. The locking component can move to an unlocking position or a locking position. The motor is used to unlock the locking component when the locking component is in the locking position. The unlocking method includes: When the electronic lock needs to be unlocked, control the motor to rotate forward for a first duration to unlock the locking component. After the motor rotates forward for the first duration, control the motor to rotate in reverse for a second duration for resetting, and the second duration is shorter than the first duration.

11. The unlocking method according to claim 10, wherein, The step of controlling the motor to rotate forward for a first duration to unlock the locking component includes: Receive a device driving instruction sent by an electronic device, where the device driving instruction includes a target device to be driven and a target task to be performed by the target device. The target device is the motor of the electronic lock, and the target task is to control the motor to rotate forward for the first duration. Obtain the current ambient temperature and judge the ambient temperature. When the ambient temperature is less than a preset battery temperature tolerance threshold, drive the target device to perform the target task based on the device driving instruction, and detect the current battery power during the driving process. If the battery power is less than a preset power driving threshold, stop driving the target device to perform the target task and charge the battery. When the battery is fully charged, continue to drive the target device to perform the target task, detect the current battery power during the continuous driving process, and when the battery power is less than the power driving threshold, return to the step of stopping driving the target device to perform the target task until the target device completes the target task.

12. The unlocking method according to claim 11, wherein, After stopping driving the target device to perform the target task, it further includes: Record the stop node when the target device stops executing the target work; Said continuing to drive the target device to execute the target work includes: Based on the stop node, continue to drive the target device to execute the target work.

13. The unlocking method according to claim 11, wherein, It further includes: Detect the number of charging times when driving the target device to execute the target work; If the number of charging times is equal to a preset number threshold, generate a work error message and send the work error message to the electronic device, so that the electronic device performs an error prompt based on the work error message.

14. The unlocking method according to claim 13, wherein, It further includes: Determine the historical charging information when driving at least one historical device of the same type as the target device to execute historical work with the same attribute as the target work; Based on the historical charging information, determine the historical charging times when driving at least one historical device to complete the corresponding historical work when the historical environmental temperature is less than the battery temperature tolerance threshold; Based on the historical charging times corresponding to at least one historical device, determine the number threshold.

15. The unlocking method according to claim 11, wherein, Said driving the target device to execute the target work based on the device driving instruction includes: Obtain the device identifier of the electronic device carried in the device driving instruction; Send the device identifier to the cloud platform, so that the cloud platform authenticates the identity of the electronic device based on the device identifier, and when the authentication is successful, feedback the driving instruction parameters required to drive the target device; Based on the driving instruction parameters and the device driving instruction, drive the target device to execute the target work.

16. The unlocking method according to claim 11, wherein, It further includes: Obtain the device type of the target device and the work attribute information of the target work; Based on the device type and the work attribute information, determine the power indication parameter when driving the target device; Determine the power driving threshold based on the power indication parameter.

17. An unlocking method for an electronic lock, wherein, The electronic lock includes a locking component and a motor. The locking component can move to an unlocking position or a locking position. The motor is used to unlock the locking component when the locking component is in the locking position. The unlocking method includes: When the electronic lock needs to be unlocked, control the motor to rotate forward by a first preset angle to unlock the locking component; After the motor rotates forward by the first preset angle, control the motor to rotate backward for a second duration, and the second duration is obtained based on the first preset angle, so that the motor returns to the same angle as when it starts to rotate forward by the first preset angle.

18. The unlocking method according to claim 17, wherein, Said controlling the motor to rotate forward by a first preset angle to unlock the locking component includes: Receive a device driving instruction sent by an electronic device. The device driving instruction includes a target device to be driven and a target work to be executed by the target device. Wherein, the target device is the motor of the electronic lock, and the target work is to control the motor to rotate forward by the first preset angle; Obtain the current environmental temperature and judge the environmental temperature; When the environmental temperature is less than the preset battery temperature tolerance threshold, drive the target device to execute the target work based on the device driving instruction, and detect the current battery power during the driving process; If the battery power is less than the preset power driving threshold, stop driving the target device to perform the target operation and charge the battery. When the battery is fully charged, continue to drive the target device to perform the target operation, and detect the current battery power during the continuous driving. When the battery power is less than the power driving threshold, return to the step of stopping driving the target device to perform the target operation until the target device completes the target operation.

19. An unlocking method for an electronic lock, wherein, The electronic lock includes a locking component and a motor. The locking component can move to an unlocking position or a locking position. The motor is used to unlock the locking component when the locking component is in the locking position. The unlocking method includes: When the electronic lock needs to be unlocked, obtain the initial angle of the motor and drive the motor to rotate forward to unlock the locking component. After the motor rotates forward, monitor the real-time angle of the motor and control the motor to rotate backward to the initial angle.

20. A computer-readable storage medium, wherein, A computer program is stored on the storage medium, and the computer program is executed by a processor to implement the unlocking method according to any one of claims 10 to 19.

Citation Information

Patent Citations

  • Battery temperature control method and terminal equipment

    CN115513571A

  • Battery performance pre-judgment method and device and storage medium

    CN116794540A

  • Electronic lock, unlocking method thereof and storage medium

    CN117552685A

  • Switching mechanism and intelligent lock

    CN211313739U

  • Electronic lock switch lock state detection device

    CN212201681U