A parameter adjustment method, storage medium and terminal device for an electronic lock
Adjusting the motor control parameters of the electronic lock through external equipment, the motor rotation error problem caused by the inability to modify the existing electronic lock preset parameters is solved, and the reliability and success rate of the lock is improved.
Patent Information
- Application Number
- CN202410035718.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-01-10
AI Technical Summary
The preset control parameters of existing electronic locks cannot be modified, resulting in errors in the motor rotation stroke, and problems often occur that cannot be successfully unlocked and/or locked.
The parameter adjustment command is generated by external devices and the motor control parameters of the electronic lock are adjusted to avoid unlocking and/or locking failures caused by incorrect motor rotation.
It effectively reduces the probability of electronic locks being stuck and increases the success rate of unlocking and/or locking.
Smart Images

Figure CN117558077B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of electronic locks, and particularly relates to a method for adjusting parameters of an electronic lock, a storage medium, and a terminal device. Background Art
[0002] An electronic lock generally includes a control module, a motor, and a mechanical switch part. When the mechanical switch part is in the locked position, the control module can rotate the motor to lock or unlock the mechanical switch part, thereby restricting or allowing the mechanical switch part to move to the unlocked position.
[0003] In related technologies, an electronic lock usually stores preset control parameters, which are burned before the lock leaves the factory and are used to control the rotation of the motor to achieve unlocking. The preset control parameters in the electronic lock cannot be modified after leaving the factory, and the rotation stroke of the motor in the actual operation of the electronic lock is prone to errors. Therefore, there are often problems that some electronic locks get stuck and cannot be successfully unlocked and / or locked. Summary of the Invention
[0004] Embodiments of this application provide a method for adjusting parameters of an electronic lock, a storage medium, and a terminal device to reduce the probability of the electronic lock getting stuck.
[0005] In a first aspect, embodiments of this application provide a method for adjusting parameters of an electronic lock. The electronic lock includes a motor, and the motor is used to rotate to drive the electronic lock to unlock. The electronic lock also has preset motor control parameters, and the preset motor control parameters are obtained when the electronic lock burns the software and are used to control the rotation of the motor, so as to drive the electronic lock to unlock. The parameter adjustment method includes:
[0006] Controlling an external device to generate a parameter adjustment command, where the parameter adjustment command is used to control the electronic lock to adjust the preset motor control parameters based on the parameter adjustment command to obtain target motor control parameters;
[0007] Controlling the external device to send the parameter adjustment command to the electronic lock.
[0008] Optionally, controlling the external device to generate a parameter adjustment command includes:
[0009] Controlling the external device to receive an operation instruction input by a user;
[0010] Generating the parameter adjustment command based on the operation instruction.
[0011] Optionally, controlling the external device to generate a parameter adjustment command includes:
[0012] Control the external device to obtain the working log of the electronic lock, where the working log includes the real-time motor control parameters and the corresponding unlocking results during multiple unlocking processes of the electronic lock;
[0013] Control the external device to determine the target number of times of unlocking failure of the electronic lock in the working log;
[0014] If the target number of times is greater than the first preset value, control the external device to generate the parameter adjustment command according to the working log.
[0015] Optionally, the electronic lock further includes a locking component, which can move to the unlocking position or the locking position. The motor is used for: when the locking component is in the locking position, rotating forward for a first duration or a first angle to release the locking of the locking component; stopping rotating for a third duration when the forward rotation of the first duration or the first angle is completed, to allow the locking component to move to the unlocking position; after stopping rotating for the third duration is completed, rotating backward for a second duration and then returning to a preset angle, so that the locking component can be moved to the locking position and locked under the action of an external force;
[0016] Wherein, the motor control parameters include at least one of the first duration, the first angle, the third duration, and the second duration.
[0017] Optionally, the controlling the external device to generate the parameter adjustment command according to the working log includes:
[0018] Control the external device to obtain an intermediate second duration according to the first duration or the first angle in the working log;
[0019] Control the external device to generate the parameter adjustment command according to the intermediate second duration, so that the electronic lock can adjust the second duration in the current motor control parameters to the intermediate second duration based on the parameter adjustment command, thereby obtaining the target motor control parameters.
[0020] Optionally, the electronic lock further includes a housing, a locking tongue, and a first elastic member. The housing is provided with an installation cavity and a lock hole. The lock hole is respectively communicated with the installation cavity and the outside of the housing. The locking member includes a locking section movably installed in the lock hole. The locking section can move outward of the installation cavity to the unlocking position and can move into the installation cavity to the locking position. The locking tongue is slidably installed in the installation cavity. The locking tongue can move in a first direction to lock the locking section located at the locking position and can move in a second direction to release the locking section located at the locking position. The first direction and the second direction are opposite. The first elastic member is installed in the installation cavity to drive the locking tongue to move in the first direction. The motor is arranged in the installation cavity. The motor is in transmission connection with the locking tongue to drive the locking tongue to move in the second direction to release the locking section. The controlling the external device to obtain an intermediate second duration according to the first duration or the first angle in the work log includes:
[0021] Controlling the external device to obtain a plurality of first durations in the work log and determining the average value of the plurality of first durations in the work log as the average first duration;
[0022] Controlling the external device to determine the intermediate second duration according to the average first duration, and the intermediate second duration is less than the average first duration.
[0023] Optionally, the controlling the external device to generate the parameter adjustment command according to the work log includes:
[0024] Controlling the external device to obtain an intermediate first duration or an intermediate first angle according to the second duration in the work log;
[0025] Controlling the external device to generate the parameter adjustment command according to the intermediate first duration or the intermediate first angle, so that the electronic lock can adjust the first duration in the current motor control parameter to the intermediate first duration according to the parameter adjustment command, or the electronic lock can adjust the first angle in the current motor control parameter to the intermediate first angle according to the parameter adjustment command, thereby obtaining the target motor control parameter.
[0026] Optionally, the motor control parameter includes at least one of the working voltage and power consumption when the motor rotates to drive the electronic lock to unlock. The work log further includes the environmental information during the multiple unlocking processes of the electronic lock. The environmental information includes at least one of the temperature and magnetic field strength of the environment where the electronic lock is located. The controlling the external device to generate the parameter adjustment command according to the work log includes:
[0027] Control the external device to obtain at least one of an intermediate first duration, an intermediate second duration, an intermediate third duration, an intermediate operating voltage, and an intermediate power consumption according to the environmental information;
[0028] Control the external device to generate the parameter adjustment command according to at least one of the intermediate first duration, the intermediate second duration, the intermediate third duration, the intermediate operating voltage, and the intermediate power consumption, so that the electronic lock can adjust at least one of the first duration, the second duration, the third duration, the operating voltage, and the power consumption in the current motor control parameters to the corresponding intermediate first duration, intermediate second duration, intermediate third duration, intermediate operating voltage, or intermediate power consumption according to the parameter adjustment command, thereby obtaining the target motor control parameters.
[0029] In a second aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program runs, it executes the parameter adjustment method of any one of the above.
[0030] In a second aspect, an embodiment of the present application further provides a terminal device, including:
[0031] One or more processors; and
[0032] A storage device for storing one or more programs;
[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the parameter adjustment method of any one of the above.
[0034] In an embodiment of the present application, after the electronic lock is manufactured and during subsequent use, the motor control parameters of the electronic lock can be adjusted through a parameter adjustment command sent by an external device, so as to avoid unlocking and / or locking failure caused by incorrect rotation of the motor during actual operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the following drawings are only some embodiments of the present application, and those skilled in the art can obtain other drawings without creative efforts based on these drawings.
[0036] Figure 1 It is the first flowchart of the parameter adjustment method provided by the embodiment of the present application.
[0037] Figure 2 It is a schematic structural diagram of the electronic lock in the state where the lock tongue locks the locking member provided by the embodiment of the present application.
[0038] Figure 3The second flowchart of the parameter adjustment method provided by the embodiment of the present application.
[0039] Figure 4 is Figure 2 A schematic structural diagram of the electronic lock shown in the state where the lock tongue releases the locking member.
[0040] Figure 5 is Figure 2 A schematic diagram of the state of the electronic lock shown during the movement of the locking section from the unlocking position towards the locking position. Detailed implementation manners
[0041] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0042] To more fully understand the present application and its beneficial effects, the following will be described in conjunction with the drawings. Among them, the same reference numerals in the following description represent the same parts.
[0043] In the related art, an electronic lock usually stores preset control parameters, where the preset control parameters are burned before the lock leaves the factory and are used to control the rotation of the motor to achieve unlocking. The preset control parameters in the electronic lock cannot be modified after leaving the factory, and the rotation stroke of the motor is prone to errors during the actual operation of the electronic lock. Therefore, there are often problems that some electronic locks cannot be successfully unlocked or locked.
[0044] Based on this, the embodiment of the present application also provides a parameter adjustment method for an electronic lock. Please refer to Figure 1 and Figure 2 , Figure 1 which is the first flowchart of the parameter adjustment method provided by the embodiment of the present application, Figure 2 which is a schematic structural diagram of the electronic lock provided by the embodiment of the present application in the state where the lock tongue locks the locking member. The electronic lock includes a motor 200, and the motor 200 is used to rotate to drive the electronic lock to unlock. The electronic lock also has preset motor control parameters, and the preset motor control parameters are obtained by the electronic lock when burning the software and are used to control the rotation of the motor 200 to drive the electronic lock to unlock. The parameter adjustment method includes:
[0045] 101. Control an external device to generate a parameter adjustment command, where the parameter adjustment command is used to control the electronic lock to adjust the preset motor control parameters based on the parameter adjustment command to obtain target motor control parameters.
[0046] 102. Control the external device to send the parameter adjustment command to the electronic lock.
[0047] Of course, the parameter adjustment command can also be used to control the electronic lock to adjust the current motor control parameters to the target motor control parameters. Thus, the electronic lock can adjust the motor control parameters after leaving the factory and during subsequent use, so as to avoid the failure of unlocking and / or locking caused by the incorrect rotation of the motor 200 during the actual working process.
[0048] In some embodiments, the electronic lock may have a first wireless communication module, and the external device may have a second wireless communication module. The second wireless communication module can communicate with the first wireless communication module, so that the external device can send a parameter adjustment command to the electronic lock.
[0049] The first wireless communication module and the second wireless communication module may include the same type of Bluetooth module, NFC (Near Field Communication) module, WIFI (Wireless Fidelity) module or XingShan module, and thus can directly perform wireless communication. The embodiments of the present application do not limit this.
[0050] The external device may be a terminal carrying a server, or a smart phone, a tablet computer, etc. The embodiments of the present application do not limit this.
[0051] In some embodiments, controlling the external device to generate a parameter adjustment command may include: controlling the external device to receive an operation instruction input by the user; generating a parameter adjustment command based on the operation instruction.
[0052] Furthermore, the user can adjust the motor control parameters of the electronic lock through external devices such as mobile phones and computers.
[0053] For example, the user can directly input the specific parameters to be changed through the external device. Or, after the external device receives the operation instruction input by the user, the specific parameters to be changed are obtained by means of calculation by the external device itself or obtained from the cloud service, and a parameter adjustment command is further generated.
[0054] Optionally, it may also be that the external device actively determines whether to generate a parameter adjustment command according to the unlocking situation of the electronic lock to adjust the motor control parameters of the electronic lock.
[0055] In addition, when the electronic lock is a passive electronic lock, the method of completing the calculation by the external device to obtain the parameter adjustment command can reduce the power consumption of the electronic lock and improve the response speed of the electronic lock, thereby well overcoming the problem of low efficiency of the passive electronic lock in obtaining external energy.
[0056] Specifically, a passive electronic lock is an electronic lock that obtains radio frequency energy from the outside through radio frequency power harvesting technology. Such electronic locks do not require an internal battery or an external power supply. However, due to the relatively low radio frequency power harvesting efficiency, the efficiency of the passive electronic lock in obtaining external energy is also low. Therefore, by reducing the calculations required inside the electronic lock, the power consumption of the electronic lock itself can be reduced, so that the external radio frequency energy required by the electronic lock is reduced, thereby reducing to a certain extent the time required for the electronic lock to obtain external radio frequency energy.
[0057] Please continue to refer to Figure 3 , Figure 3 which is the second flowchart of the parameter adjustment method provided by the embodiments of this application. According to the method described in the previous embodiments, the following will give further detailed examples. The parameter adjustment method may include:
[0058] 201. Control an external device to obtain the working log of the electronic lock, where the working log includes the real-time motor control parameters and the corresponding unlocking results during multiple unlocking processes of the electronic lock.
[0059] In some embodiments, the motor control parameters may include at least one of the working voltage and power consumption when the motor 200 rotates to drive the electronic lock to unlock.
[0060] Furthermore, on the one hand, it is convenient to subsequently confirm according to the unlocking result whether it is necessary to increase the working voltage of the motor 200 when the electronic lock unlocks, to avoid unlocking failure due to insufficient working voltage of the motor 200, or whether it is necessary to reduce the working voltage of the motor 200 when the electronic lock unlocks, so that the passive electronic lock can be opened when obtaining less external radio frequency energy, thereby improving the unlocking efficiency.
[0061] On the other hand, it is convenient to subsequently confirm according to the unlocking result whether it is necessary to increase the power consumption of the motor 200 when the electronic lock unlocks, to avoid unlocking failure due to insufficient power consumption of the motor 200, or whether it is necessary to reduce the power consumption of the motor 200 when the electronic lock unlocks, so that the passive electronic lock can be opened when obtaining less external radio frequency energy, to improve the unlocking efficiency.
[0062] In some embodiments, the working log may further include environmental information during multiple unlocking processes of the electronic lock, and the environmental information includes at least one of the temperature and magnetic field strength of the environment where the electronic lock is located.
[0063] It can be understood that in actual use, both the environmental temperature and the magnetic field strength will have a certain impact on the rotation of the motor 200. Then, through the environmental information recorded in the working log, it is convenient for the external device to generate a more appropriate parameter adjustment command, and then adjust the rotation duration, rotation angle, working voltage, power consumption, etc. of the motor 200 to more appropriate values, so as to improve the success rate of unlocking and / or locking the electronic lock.
[0064] Please continue to refer to Figure 4 and Figure 5 , Figure 4 is Figure 2 a schematic structural view of the electronic lock shown in the state where the locking tongue releases the locking member, Figure 5 is Figure 2 a schematic state view of the electronic lock shown during the movement of the locking section from the unlocking position towards the locking position. In some embodiments, the electronic lock may further include a locking member 100 that can move to the unlocking position or the locking position, and the motor 200 is configured to: rotate forward for a first duration or a first angle when the locking member 100 is in the locking position to release the locking of the locking member 100; stop rotating for a third duration when the forward rotation for the first duration or the first angle is completed to allow the locking member 100 to move to the unlocking position; and rotate backward for a second duration and return to a preset angle when the stop rotation for the third duration is completed, so that the locking member 100 can move to the locking position under an external force and be locked.
[0065] Correspondingly, the motor control parameters may include at least one of the first duration, the first angle, the third duration, and the second duration.
[0066] For example, the electronic lock may further include a housing 300, a locking tongue 400, and a first elastic member 500.
[0067] The housing 300 is provided with an installation cavity 31 and a lock hole 32. The lock hole 32 is respectively communicated with the installation cavity 31 and the outside of the housing 300. The locking member 100 includes a locking section 11 movably installed in the lock hole 32. The locking section 11 can move out of the installation cavity 31 to the unlocking position, and can move into the installation cavity 31 to the locking position. The locking tongue 400 is slidably installed in the installation cavity 31. The locking tongue 400 can move along a first direction H1 to lock the locking section 11 located in the locking position, and can move along a second direction H2 to release the locking section 11 located in the locking position. The first direction H1 and the second direction H2 are opposite. The first elastic member 500 is installed in the installation cavity 31 and is used to drive the locking tongue 400 to move along the first direction H1. The motor 200 is arranged in the installation cavity 31, and the motor 200 is in transmission connection with the locking tongue 400, so as to drive the locking tongue 400 to move along the second direction H2 to release the locking section 11.
[0068] Next, a whole example will be given to illustrate the technical solution of the embodiment of the present application in combination with a lock opening and closing process of the lock:
[0069] First, in the initial state, the locking section 11 is in the locking position, and the locking tongue 400 locks the locking section 11, so that the housing 300 can lock an external object through the locking member 100.
[0070] Then, the motor 200 can rotate forward to drive the locking tongue 400 to move along the second direction H2, so that the locking tongue 400 releases the locking section 11 or unlocks the locking section 11.
[0071] Next, the motor 200 can stop rotating for a certain period of time to allow the locking section 11 to move to the unlocking position.
[0072] Finally, the motor 200 rotates in reverse to reset; at the same time, the first elastic member 500 also drives the locking tongue 400 to reset, so that during the subsequent movement of the locking section 11 towards the locking position again, the locking tongue 400 can be driven to move and avoid interference along the second direction H2, and after the locking section 11 moves to the locking position, the restoration of the first elastic member 500 can drive the locking tongue 400 to move along the first direction H1 to lock the locking section 11.
[0073] The ways for the locking tongue 400 to lock and release the locking section 11 can be diverse. For example, a limiting groove 111 is provided on the circumferential side of the locking section 11. When the locking section 11 moves to the locking position, the locking tongue 400 can move along the first direction H1 to enter the limiting groove 111 to lock the locking section 11, and the locking tongue 400 can move along the second direction H2 to disengage from the limiting groove 111 to release the locking section 11.
[0074] Exemplarily, the locking section 11 can move upward to the outside of the housing 300 to move to the unlocking position, and the locking section 11 can move downward into the installation cavity 31 to move to the locking position. At this time, the limiting groove 111 is provided on the left side of the locking section 11, or a circumferential limiting groove 111 is provided on the side wall of the locking section 11. Correspondingly, the locking tongue 400 can be slidably mounted in the installation cavity 31 and is located on the left side of the locking section 11; the first elastic member 500 such as a spring is mounted on the left side of the locking tongue 400.
[0075] Furthermore, when the locking section 11 is in the locking position, the first elastic member 500 can push the locking tongue 400, so that the locking tongue 400 moves to the right to enter the limiting groove 111, thereby clamping or locking the locking section 11 to restrict the movement of the locking section 11. When unlocking is required, the motor 200 drives the locking tongue 400 to move to the left to disengage from the limiting groove 111, thereby releasing the locking section 11 to allow the locking section 11 to move to the unlocking position.
[0076] In some embodiments, the side of the locking tongue 400 facing the lock hole 32 has an inclined surface 41. The inclined surface 41 is located at one end of the locking tongue 400 close to the lock hole 32 along the first direction H1, and the inclined surface 41 is inclined in a direction away from the lock hole 32.
[0077] Continuing with the example where the first direction H1 described above 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 locking tongue 400 and the inclined surface 41 slopes downwards. Therefore, when the locking section 11 moves from the unlocking position downwards towards the locking position, it will abut against the inclined surface 41. Then, the downward - moving locking section 11 exerts a component force on the locking tongue 400 through the inclined surface 41 to drive the locking tongue 400 to move leftwards or in the second direction H2, so as to drive the locking tongue 400 to move and avoid interference in the second direction H2. Finally, after the locking section 11 moves to the locking position, the first elastic member 500 starts to elastically recover to push the locking tongue 400 to move in the first direction H1 or rightwards until it enters the limiting groove 111, thereby locking the locking section 11.
[0078] In some embodiments, the electronic lock further includes a second elastic member 600. The second elastic member 600 is used to drive the locking section 11 towards the unlocking position. Thus, after the locking tongue 400 releases the locking section 11 in the locking position, when the motor 200 stops rotating, the second elastic member 600 can eject the locking end, making the opening and closing of the lock more convenient.
[0079] For example, the locking member 100 can be a lock beam. The lock beam includes a locking section 11 and an installation section 12 away from the locking section 11. The installation section 12 and the locking section 11 are parallel to each other, and the installation section 12 movably penetrates through the housing 300. The second elastic member 600, such as a spring, is arranged inside the housing 300 and is used to drive the installation section 12 to move outwards from the housing 300, so that the installation section 12 and the locking section 11 can slide relative to the housing 300 synchronously, enabling the locking section 11 to move to the unlocking position or the locking position.
[0080] Wherein, when the locking section 11 is in the locking position, the lock beam and the housing 300 form a closed annular structure to lock external items.
[0081] Certainly, in some other embodiments, the locking member 100 can also be some flexible steel cables. One end of the steel cable is provided with a locking section 11, and the other end is fixedly arranged on the housing 300. The embodiments of the present application do not limit this.
[0082] The output shaft of the motor 200 can be provided with a cam 21, and the locking tongue 400 is provided with a transmission hole 42, and the cam 21 is arranged in the transmission hole 42.
[0083] Thus, the motor 200 can rotate forward to push the inner wall of the transmission hole 42 along the second direction H2 through the cam 21, thereby unlocking the locking section 11 at the locked position. Also, the motor 200 can rotate in reverse, allowing the first elastic member 500 to push the locking tongue 400 along the first direction H1 to insert into the locking section 11 at the locked position, and allowing the locking tongue 400 to move along the second direction H2 to avoid interference when the locking section 11 moves towards the locked position, and after the locking section 11 moves to the locked position, the first elastic member 500 drives the locking tongue 400 to enter the locking section 11.
[0084] Furthermore, when the locking tongue 400 locks the locking section 11 at the locked position, the locking and unlocking process of the electronic lock can be as follows:
[0085] First, the motor 200 rotates forward to drive the locking tongue 400 away from the locking section 11, thus releasing the locking section 11.
[0086] 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 towards the unlocked position, or to allow the user to apply an external force to pull out the locking section 11 to the outside of the housing 300.
[0087] Next, after the locking section 11 is ejected or pulled out, the motor 200 can rotate in reverse to reset, so that the first elastic member 500 moves the locking tongue 400 along the first direction H1 to at least partially block the locking hole 32.
[0088] Finally, the locking section 11 moves towards the locked position under an external force such as the pressing force of the user. During the movement of the locking section 11 towards the locked position, the locking section 11 will first abut against the inclined surface 41 to drive the locking tongue 400 to avoid interference along the second direction H2, and when the locking section 11 moves to the locked position, the first elastic member 500 drives the locking tongue 400 along the first direction H1 again to insert into the limiting groove 111 of the locking section 11, realizing locking the locking section 11 at the locked position.
[0089] Exemplarily, the inner wall of the transmission hole 42 includes a first inner side wall 43 that is away from the locking hole 32 along the first direction H1. The cam 21 abuts against the first inner side wall 43.
[0090] Then, when the motor 200 rotates forward, the convex part of the cam 21 will deflect in the second direction H2, so that the convex part of the cam 21 pushes against the first inner wall 43 to drive the lock tongue 400 to move in the second direction H2. When the motor 200 rotates in reverse, the convex part of the cam 21 will deflect in the first direction H1 to avoid interference, thereby allowing the first elastic member 500 to drive the lock tongue 400 to move in the first direction H1, and during this process, the first inner wall 43 is always pressed against the cam 21. Therefore, by controlling the rotation angle of the convex part of the cam 21, that is, by controlling the forward rotation angle of the motor 200, the distance that the lock tongue 400 moves in the first direction H1 can be limited.
[0091] The inner wall of the transmission hole 42 includes a second inner wall 44 that is close to the lock hole 32 in the first direction H1. The cam 21 is arranged at an interval from the second inner wall 44. Thus, when the lock tongue 400 moves to block the lock hole 32 after the motor 200 rotates in reverse, if the locking section 11 moves from the unlocking position to the locking position and pushes against the inclined surface 41, the gap between the cam 21 and the second inner wall 44 allows the lock tongue 400 to move in the second direction H2 to avoid interference with the movement of the locking section 11.
[0092] In some embodiments, the electronic lock may further include one or more of a first sensor, a second sensor, and a third sensor. The first sensor is used to detect the rotation angle of the motor 200, the second sensor is used to detect the position of the lock tongue 400, and the third sensor is used to detect the position of the locking member 100. Then, the working log may further include one or more of the rotation angle data of the motor 200, the movement data of the lock tongue 400, and the movement data of the locking member 100 each time the motor 200 rotates to unlock.
[0093] So that in the subsequent process, the external device can better determine which one of the forward rotation, stop rotation, and reverse rotation of the motor 200 corresponds to an inappropriate rotation duration or rotation angle that causes the unlocking failure, and finally enables the external device to obtain a more appropriate parameter adjustment command according to the working log.
[0094] 202. Control the external device to determine the target number of times of unlocking failure of the electronic lock in the working log.
[0095] In some embodiments, unlocking failure may include: failure to unlock the locking section 11 when the motor 200 rotates forward, failure to eject the locking section 11 outside the housing 300 in time when the motor stops rotating so that it is locked again, failure of the lock tongue 400 to return to the position at the start of forward rotation after the electronic lock rotates in reverse, resulting in subsequent inability to lock, etc. The embodiments of the present application do not limit this.
[0096] In some embodiments, the target number of times may be the number of times the electronic lock fails to unlock during consecutive preset rounds of unlocking. For example, the target number of times may be the number of times of unlocking failure during the most recent 10 unlocking processes.
[0097] Then, it can also be understood that taking the consecutive preset rounds of unlocking processes as a reference sample group, if the number of unlocking failures in this sample group is relatively large, it can be considered that the electronic lock will also have a relatively high probability of unlocking failure during subsequent use. Therefore, a parameter adjustment command needs to be generated subsequently to adjust the motor control parameters of the electronic lock.
[0098] Optionally, the target number of times may also be the total number of unlocking failures in the work log of the electronic lock, and the embodiments of the present application do not limit this.
[0099] 203. If the target number of times is greater than the first preset value, control the external device to generate a parameter adjustment command according to the work log.
[0100] Next, taking the adjustment of the second duration as an example, the technical solution of the embodiments of the present application will be illustrated.
[0101] Controlling the external device to generate a parameter adjustment command according to the work log may include: controlling the external device to obtain an intermediate second duration based on the first duration or the first angle in the work log; controlling the external device to generate a parameter adjustment command according to the intermediate second duration, so that the electronic lock can adjust the second duration in the current motor control parameters to the intermediate second duration based on the parameter adjustment command, thereby obtaining the target motor control parameters.
[0102] In some embodiments, controlling the external device to generate a parameter adjustment command according to the intermediate second duration may include: controlling the external device to generate a parameter adjustment command with the intermediate second duration.
[0103] In some embodiments, controlling the external device to obtain an intermediate second duration based on the first duration or the first angle in the work log may include: controlling the external device to obtain multiple first durations in the work log and determining the average value of the multiple first durations in the work log as the average first duration; controlling the external device to determine the intermediate second duration according to the average first duration.
[0104] Among them, the average first duration and the intermediate second duration may be equal. Then, in the subsequent process, the second duration in the motor control parameters can be directly adjusted to be the same as the average first duration, so that the motor 200 can be more accurately reset after reversing.
[0105] Alternatively, the intermediate second duration may also be less than the average first duration.
[0106] For example, the surface of the locking tongue 400 facing the keyhole 32 also has a blocking surface 45. The blocking surface 45 is located on the side of the inclined surface 41 away from the keyhole 32 along the first direction H1, and the blocking surface 45 is perpendicular to the axis line of the keyhole 32.
[0107] Continuing with the example where the locking section 11 slides up and down and at least part of the inclined surface 41 is located on the upper side of the right end of the locking tongue 400, the blocking surface 45 is located on the left side of the inclined surface 41. At this time, if the reverse rotation duration of the motor 200 is the same as the forward rotation duration, that is, the first duration is equal to the second duration, the influence of the first elastic member 500 will cause the moving stroke of the blocking surface 45 along the first direction H1 to be too large and partially block the keyhole 32. Therefore, when the locking section 11 moves downward from the unlocking position to the locking position subsequently, the locking section 11 will abut against the blocking surface 45 and get stuck, resulting in the electronic lock being unable to complete the subsequent locking and unlocking operations normally.
[0108] In contrast, in the embodiment of the present application, the second duration after the subsequent electronic lock is adjusted according to the parameter adjustment command is less than the first duration, which can prevent the blocking surface 45 of the locking tongue 400 from partially blocking the keyhole 32 after the motor 200 reverses due to the first elastic member 500, thereby preventing the electronic lock from being unable to complete the subsequent locking and unlocking operations normally.
[0109] The above are some examples of adjusting the second duration in the preset motor control parameters in the embodiment of the present application. Next, examples of adjusting the first duration or the first angle in the preset motor control parameters will be continued.
[0110] Controlling the external device to generate a parameter adjustment command according to the work log may include: controlling the external device to obtain an intermediate first duration or an intermediate first angle according to the second duration in the work log; controlling the external device to generate a parameter adjustment command according to the intermediate first duration or the intermediate first angle, so that the electronic lock can adjust the first duration in the current motor control parameters to the intermediate first duration according to the parameter adjustment command, or so that the electronic lock can adjust the first angle in the current motor control parameters to the intermediate first angle according to the parameter adjustment command, thereby obtaining the target motor control parameters.
[0111] In some embodiments, controlling the external device to generate a parameter adjustment command according to the intermediate first duration or the intermediate first angle may include: controlling the external device to obtain multiple second durations in the work log and determining the average value of the multiple second durations in the work log as the average second duration; controlling the external device to determine the intermediate first duration or the intermediate first angle based on the average second duration.
[0112] In some embodiments, the intermediate first duration and the average second duration may be equal.
[0113] Then, in the subsequent process, the second duration in the motor control parameters can be directly adjusted to be the same as the average first duration, so that the motor 200 can be more accurately reset after reversing.
[0114] Alternatively, the intermediate first duration can be greater than the average second duration.
[0115] Then, since the second duration after the electronic lock adjusts according to the parameter adjustment command will be less than the first duration, it can be ensured that the locking tongue 400 or the blocking surface 45 of the locking tongue 400 will not block the movement of the locking section 11 after resetting, thereby avoiding the electronic lock from getting stuck.
[0116] The above are some examples of adjusting the first duration or the first angle in the preset motor control parameters in the embodiments of the present application. Next, an example of adjusting the motor control parameters based on environmental information will be continued.
[0117] Controlling the external device to generate a parameter adjustment command according to the work log may include: controlling the external device to obtain at least one of an intermediate first duration, an intermediate second duration, an intermediate third duration, an intermediate working voltage, and an intermediate power consumption according to the environmental information; controlling the external device to generate a parameter adjustment command according to at least one of the intermediate first duration, the intermediate second duration, the intermediate third duration, the intermediate working voltage, and the intermediate power consumption, so that the electronic lock can adjust at least one of the first duration, the second duration, the third duration, the working voltage, and the power consumption in the current motor control parameters to the corresponding intermediate first duration, intermediate second duration, intermediate third duration, intermediate working voltage, or intermediate power consumption according to the parameter adjustment command, thereby obtaining the target motor control parameters.
[0118] Among them, the intermediate first duration, the intermediate second duration, the intermediate third duration, the intermediate working voltage, and the intermediate power consumption respectively correspond one-to-one to the first duration, the second duration, the third duration, the working voltage, and the power consumption.
[0119] 204. Control the external device to send a parameter adjustment command to the electronic lock.
[0120] Thus, the electronic lock can adjust the motor control parameters after leaving the factory and during subsequent use, so as to avoid the unlocking and / or locking failure caused by the incorrect rotation of the motor 200 during the actual working process.
[0121] The embodiments of the present application further provide a storage medium applied to an electronic lock, on which a computer program is stored, and when the computer program runs, it executes the above parameter adjustment method.
[0122] An embodiment of the present application further provides a terminal device, including one or more processors and a storage device, where the storage device is used to store one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the parameter adjustment method as described above.
[0123] The terminal device may be a terminal carrying a server, or a smart phone, a tablet computer, etc., and the embodiments of the present application do not make any limitations thereto.
[0124] The parameter adjustment method provided by the embodiments of the present application has been introduced in detail above. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for adjusting parameters of an electronic lock, characterized in that: The electronic lock is a passive electronic lock that obtains radio frequency energy from the outside through radio frequency power extraction technology. 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: When the locking component is located at the locked position, the locking component is rotated forward for a first time length or a first angle to unlock the locking component; when the forward rotation for the first time length or the first angle is completed, the locking component is stopped for a third time length to allow the locking component to move to the unlocked position; when the rotation for the third time length is completed, the locking component is reversed for a second time length and returned to a preset angle, so that the locking component can be moved to the locked position and locked under the action of an external force; The electronic lock further has preset motor control parameters, which are obtained by the electronic lock when burning software and are used to control the rotation of the motor, and the motor control parameters include at least one of the first duration, the first angle, the third duration and the second duration; The parameter adjustment method comprises: Controlling external devices to receive operation instructions input by users; generating a parameter adjustment command based on the operation instruction, wherein the parameter adjustment command is used to control the electronic lock to adjust the preset motor control parameter based on the parameter adjustment command to obtain a target motor control parameter; Controlling the external device to obtain a work log of the electronic lock, wherein the work log includes real-time motor control parameters of the electronic lock during multiple unlocking processes and corresponding unlocking results; Controlling the external device to determine the target number of times the electronic lock fails to unlock in the work log; If the target number of times is greater than a first preset value, controlling the external device to generate the parameter adjustment command according to the work log, wherein the parameter adjustment command is used to control the electronic lock to adjust the preset motor control parameter based on the parameter adjustment command to obtain the target motor control parameter; The external device is controlled to send the parameter adjustment command to the electronic lock.
2. The parameter adjustment method according to claim 1, characterized in that: The controlling the external device to generate the parameter adjustment command according to the work log includes: Control the external device to obtain an intermediate second duration according to the first duration or the first angle in the work log; The external device is controlled to generate the parameter adjustment command according to the intermediate second time length, so that the electronic lock can adjust the second time length in the current motor control parameter to the intermediate second time length based on the parameter adjustment command, thereby obtaining the target motor control parameter.
3. The parameter adjustment method according to claim 2, characterized in that: The electronic lock further comprises a shell, a lock tongue and a first elastic member, the shell is provided with an installation cavity and a lock hole, the lock hole is communicated with the installation cavity and the outside of the shell respectively, the locking component comprises a locking segment movably mounted on the lock hole, the locking segment can move toward the outside of the installation cavity to the unlocking position, and can move toward the inside of the installation cavity to the locking position, the lock tongue is slidably mounted in the installation cavity, the lock tongue can move along a first direction to lock the locking segment at the locking position, and can move along a second direction to release the locking segment at the locking position, the first direction and the second direction are opposite, the first elastic member is mounted in the installation cavity to drive the lock tongue to move along the first direction, the motor is arranged in the installation cavity, the motor is in transmission connection with the lock tongue, so as to drive the lock tongue to move along the second direction to release the locking segment; The controlling the external device to obtain an intermediate second duration according to the first duration or the first angle in the work log includes: Control the external device to obtain multiple first durations in the work log, and determine an average value of the multiple first durations in the work log as an average first duration; The external device is controlled to determine the intermediate second duration according to the average first duration, wherein the intermediate second duration is smaller than the average first duration.
4. The parameter adjustment method according to claim 1, characterized in that: The controlling the external device to generate the parameter adjustment command according to the work log includes: Control the external device to obtain an intermediate first duration or an intermediate first angle according to the second duration in the work log; Control the external device to generate the parameter adjustment command according to the intermediate first duration or the intermediate first angle, so that the electronic lock can adjust the first duration in the current motor control parameter to the intermediate first duration according to the parameter adjustment command, or enable the electronic lock to adjust the first angle in the current motor control parameter to the intermediate first angle according to the parameter adjustment command, thereby obtaining the target motor control parameter.
5. The parameter adjustment method according to claim 1, characterized in that: The motor control parameter also includes at least one of the working voltage and power consumption when the motor rotates to drive the electronic lock to unlock; the work log also includes environmental information of the electronic lock during the multiple unlocking processes, and the environmental information includes at least one of the temperature and magnetic field strength of the environment in which the electronic lock is located; and the controlling the external device to generate the parameter adjustment command according to the work log includes: Controlling the external device to obtain at least one of an intermediate first duration, an intermediate second duration, an intermediate third duration, an intermediate operating voltage, and an intermediate power consumption according to the environmental information; Control the external device to generate the parameter adjustment command according to at least one of the intermediate first duration, the intermediate second duration, the intermediate third duration, the intermediate working voltage and the intermediate power consumption, so that the electronic lock can adjust at least one of the first duration, the second duration, the third duration, the working voltage and the power consumption in the current motor control parameters to the corresponding intermediate first duration, the intermediate second duration, the intermediate third duration, the intermediate working voltage or the intermediate power consumption according to the parameter adjustment command, thereby obtaining the target motor control parameters.
6. A storage medium, characterized in that: A computer program is stored thereon, and when the computer program is run, the parameter adjustment method according to any one of claims 1 to 5 is executed.
7. A terminal device, characterized in that: include: one or more processors; and A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the parameter adjustment method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for remotely controlling door lock by electric automobile
CN106485824A
Electronic lock unlocking method and device, electronic lock and readable storage medium
CN115713822A
Equipment control method and device, passive electronic lock and storage medium
CN117115942A
Device for preventing centrifugal pump from reversely rotating
CN203948318U
Lock
CN218668919U