Parameter adjustment method for electronic lock, and storage medium and terminal apparatus
By adjusting the motor control parameters of the electronic lock through external equipment, the unlocking and locking failure caused by the motor rotation stroke error after the electronic lock leaves the factory is solved, and a higher success rate is achieved.
Patent Information
- Application Number
- PCT/CN2024/079284
- 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
After the electronic lock leaves the factory, there is an error in the motor rotation stroke, which causes some electronic locks to be unable to successfully unlock and/or close.
The parameter adjustment command is generated by external devices and the motor control parameters of the electronic lock are adjusted to avoid errors in the motor rotation during actual work.
After the electronic lock is shipped and during use, adjust the motor control parameters to avoid unlocking and/or locking failures.
Smart Images

Figure CN2024079284_17072025_PF_FP_ABST
Abstract
Description
Parameter adjustment method, storage medium and terminal device of electronic lock
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 10, 2024, with application number 202410035718.8 and invention name “A method for adjusting parameters of an electronic lock, a storage medium and a terminal device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application belongs to the technical field of electronic locks, and in particular relates to a parameter adjustment method, storage medium, and terminal device for an electronic lock. Background Art
[0003] Electronic locks typically include a control module, a motor, and a mechanical switch. When the mechanical switch is in the locked position, the control module rotates the motor to lock or unlock the mechanical switch, thereby restricting or allowing the mechanical switch to move to the unlocked position. Technical issues
[0004] In related art, electronic locks typically store preset control parameters. These parameters are programmed before the lock leaves the factory and are used to control the rotation of the motor to unlock the lock. These preset control parameters cannot be modified after leaving the factory. Furthermore, the motor's rotational travel is prone to errors in actual operation, often leading to problems with some electronic locks becoming stuck and unable to be successfully unlocked and / or locked. Technical Solutions
[0005] In a first aspect, an embodiment of the present application provides a parameter adjustment method for an electronic lock, wherein the electronic lock includes a motor, the motor being configured to rotate to unlock the electronic lock, and the electronic lock further having preset motor control parameters. The preset motor control parameters are obtained by the electronic lock when software is burned and are used to control the rotation of the motor, thereby unlocking the electronic lock. The parameter adjustment method includes:
[0006] controlling an external device to generate a parameter adjustment command, wherein 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] The external device is controlled to send the parameter adjustment command to the electronic lock.
[0008] 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 is run, any of the above-mentioned parameter adjustment methods is executed.
[0009] In a third aspect, an embodiment of the present application further provides a terminal device, including:
[0010] one or more processors; and
[0011] a storage device for storing one or more programs;
[0012] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the above parameter adjustment methods. Beneficial effects
[0013] In an embodiment of the present application, after the electronic lock leaves the factory and during subsequent use, the motor control parameters of the electronic lock can be adjusted through parameter adjustment commands sent by an external device to avoid unlocking and / or locking failures caused by incorrect rotation of the motor during actual operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] FIG1 is a flow chart of a first parameter adjustment method provided in an embodiment of the present application.
[0015] FIG2 is a schematic structural diagram of the electronic lock provided by an embodiment of the present application when the lock tongue is locked to the locking component.
[0016] FIG3 is a second flow chart of the parameter adjustment method provided in an embodiment of the present application.
[0017] FIG4 is a schematic structural diagram of the electronic lock shown in FIG2 with the lock tongue releasing the locking component.
[0018] FIG5 is a schematic diagram of the electronic lock shown in FIG2 during the process of the locking section moving from the unlocking position to the locking position. Modes for Carrying Out the Invention
[0019] 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.
[0020] In order to more completely understand the present application and its beneficial effects, the following description will be given in conjunction with the accompanying drawings. In the following description, the same reference numerals represent the same parts.
[0021] In related technologies, electronic locks typically store preset control parameters. These parameters are burned into the lock before leaving the factory and are used to control the rotation of the motor to unlock the lock. These preset control parameters cannot be modified after leaving the factory. Furthermore, the rotational travel of the motor in electronic locks is prone to errors in actual operation, which often results in some electronic locks failing to unlock or close successfully.
[0022] Based on this, an embodiment of the present application also provides a parameter adjustment method for an electronic lock. Please refer to Figures 1 and 2. Figure 1 is a flow chart of the first parameter adjustment method provided in the embodiment of the present application, and Figure 2 is a schematic structural diagram of the electronic lock provided in the embodiment of the present application with the lock tongue locked and the locking component in a state. The electronic lock includes a motor 200, which is used to rotate to drive the electronic lock to unlock. The electronic lock also has preset motor control parameters. The preset motor control parameters are obtained by the electronic lock when the software is burned and are used to control the rotation of the motor 200 to drive the electronic lock to unlock. The parameter adjustment method includes:
[0023] 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 preset motor control parameters based on the parameter adjustment command to obtain target motor control parameters.
[0024] 102. Control the external device to send a parameter adjustment command to the electronic lock.
[0025] 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 to avoid incorrect rotation of the motor 200 during actual operation, resulting in unlocking and / or locking failures.
[0026] In some embodiments, the electronic lock may have a first wireless communication module, and the external device may have a second wireless communication module, which can communicate with the first wireless communication module, so that the external device can send parameter adjustment commands to the electronic lock.
[0027] The first wireless communication module and the second wireless communication module may include the same one of a Bluetooth module, an NFC (Near Field Communication) module, a WIFI (Wireless Fidelity) module or a Star Flash module, and thus directly perform wireless communication. This embodiment of the present application is not limited to this.
[0028] The external device can be a terminal that hosts the server, or it can be a smart phone, tablet computer, etc., which is not limited in the embodiments of the present application.
[0029] In some implementations, controlling the external device to generate the parameter adjustment command may include: controlling the external device to receive an operation instruction input by a user; and generating the parameter adjustment command based on the operation instruction.
[0030] Furthermore, users can adjust the motor control parameters of the electronic lock through external devices such as mobile phones and computers.
[0031] For example, a user can directly input the specific parameters to be changed through an external device. Alternatively, after receiving the operation instruction input by the user, the external device can calculate and generate the specific parameters to be changed through its own calculations or obtain them from a cloud service, and then generate parameter adjustment commands.
[0032] Optionally, the external device may actively determine whether a parameter adjustment command needs to be generated according to the unlocking condition of the electronic lock, so as to adjust the motor control parameters of the electronic lock.
[0033] In addition, when the electronic lock is a passive electronic lock, the method of completing calculations through external devices to obtain parameter adjustment commands can reduce the power consumption of the electronic lock and improve the response speed of the electronic lock, thereby effectively overcoming the problem of low efficiency of passive electronic locks in obtaining external energy.
[0034] 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 inefficient in obtaining external energy. Therefore, by reducing the calculations required within the electronic lock, the lock's power consumption can be reduced, thereby reducing the external RF energy required and, to a certain extent, shortening the time required for the lock to obtain external RF energy.
[0035] Please continue to refer to Figure 3, which is a flow chart of the second parameter adjustment method provided in the embodiment of the present application. Based on the method described in the previous embodiment, the following examples will be given to further illustrate the parameter adjustment method. The parameter adjustment method may include:
[0036] 201. Control an external device to obtain a work log of the electronic lock, where the work log includes real-time motor control parameters of the electronic lock during multiple unlocking processes and corresponding unlocking results.
[0037] In some embodiments, the motor control parameter may include at least one of an operating voltage and power consumption when the motor 200 rotates to drive the electronic lock to unlock.
[0038] Furthermore, on the one hand, it is convenient to confirm whether it is necessary to increase the working voltage of the motor 200 when the electronic lock is unlocked according to the unlocking result, so as to avoid the 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 is unlocked, so that the passive electronic lock can open the electronic lock when it obtains less external radio frequency energy, thereby improving the unlocking efficiency.
[0039] On the other hand, it is convenient to confirm whether it is necessary to increase the power consumption of the motor 200 when unlocking the electronic lock according to the unlocking result, so as 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 unlocking the electronic lock, so that the passive electronic lock can open the electronic lock when it obtains less external radio frequency energy, thereby improving the unlocking efficiency.
[0040] In some embodiments, the work log may further include environmental information of the electronic lock during multiple unlocking processes, where the environmental information includes at least one of a temperature and a magnetic field strength of the environment in which the electronic lock is located.
[0041] It is understandable that in actual use, both ambient temperature and magnetic field strength will have a certain impact on the rotation of motor 200. Therefore, by recording the environmental information in the work log, it is convenient for the external device to generate more appropriate parameter adjustment commands, thereby adjusting the rotation duration, rotation angle, operating voltage, and power consumption of motor 200 to more appropriate values, thereby improving the success rate of unlocking and / or locking the electronic lock.
[0042] Please continue to refer to Figures 4 and 5. Figure 4 is a schematic diagram of the structure of the electronic lock shown in Figure 2 when the lock tongue releases the locking component. Figure 5 is a schematic diagram of the state of the electronic lock shown in Figure 2 when the locking section moves from the unlocked position to the locked position. In some embodiments, the electronic lock may further include a locking component 100, which is movable to an unlocked position or a locked position. The motor 200 is configured to: when the locking component 100 is in the locked position, rotate forward for a first time period or a first angle to release the locking component 100; stop rotating for a third time period after the first time period or the first angle is completed to allow the locking component 100 to move to the unlocked position; and when the third time period is completed, reverse the rotation for a second time period and return to the preset angle, so that the locking component 100 can move to the locked position under the action of an external force and be locked.
[0043] Accordingly, the motor control parameter may include at least one of a first duration, a first angle, a third duration, and a second duration.
[0044] For example, the electronic lock may further include a housing 300 , a lock tongue 400 and a first elastic member 500 .
[0045] 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.
[0046] 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:
[0047] 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 .
[0048] 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 .
[0049] 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.
[0050] 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 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.
[0051] The locking tongue 400 can lock and release the locking section 11 in various ways. For example, a retaining groove 111 is provided around the locking section 11. When the locking section 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 section 11, and can also move in a second direction H2 until it leaves the retaining groove 111 to release the locking section 11.
[0052] 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.
[0053] 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.
[0054] 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 .
[0055] Continuing with the example of the first direction H1 being the left-right direction and the locking segment 11 moving 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 can be downwardly inclined. Therefore, when the locking segment 11 moves downward from the unlocked position to the locked position, it will abut against the inclined surface 41. The downwardly moving locking segment 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 in the second direction H2 to avoid the position. Finally, after the locking segment 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 limiting groove 111, thereby locking the locking segment 11.
[0056] 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 end when the motor 200 stops rotating, making the lock more convenient to open and close.
[0057] 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 or a locked position.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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 section 11 in the closed position. Furthermore, the motor 200 can rotate reversely, 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 section 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 section 11 moves toward the closed position, and after the locking section 11 moves to the closed position, the first elastic member 500 drives the lock tongue 400 to enter the locking section 11.
[0062] 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:
[0063] 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 .
[0064] 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.
[0065] 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 moves the locking tongue 400 along the first direction H1 to at least partially cover the locking hole 32 .
[0066] 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.
[0067] 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 .
[0068] 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.
[0069] 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.
[0070] 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 component 100. The work log may also include one or more of the following: the rotation angle data of the motor 200, the movement data of the lock tongue 400, and the movement data of the locking component 100 during each rotation of the motor 200 to unlock the lock.
[0071] So that in the subsequent process, the external device can better determine which of the forward rotation, stopped rotation and reverse rotation of the motor 200 corresponds to the corresponding rotation duration or the inappropriate rotation angle that caused the unlocking failure, and finally the external device can generate a more appropriate parameter adjustment command based on the work log.
[0072] 202. Control an external device to determine a target number of electronic lock unlocking failures in a work log.
[0073] In some embodiments, unlocking failure may include: failure to unlock the locking segment 11 when the motor 200 rotates forward, failure to eject the locking segment 11 from the outside of the housing 300 in time when the electronic lock stops rotating and is locked again, failure of the lock tongue 400 to return to the position at the start of forward rotation after the electronic lock is reversed, resulting in subsequent inability to lock, etc. The embodiments of the present application do not limit this.
[0074] In some embodiments, the target number can be the number of unlocking failures of the electronic lock during consecutive preset rounds of unlocking. For example, the target number can be the number of unlocking failures during the most recent 10 unlocking rounds.
[0075] This means that if a set of consecutive unlocking attempts is used as a reference sample group, and a high number of unlocking failures in this sample group indicates a high probability of unlocking failures in subsequent use, then a parameter adjustment command will need to be generated to adjust the motor control parameters of the electronic lock.
[0076] Optionally, the target number may also be the total number of unlocking failures in the work log of the electronic lock, which is not limited in the embodiment of the present application.
[0077] 203. If the target number is greater than a first preset value, control the external device to generate a parameter adjustment command according to the work log.
[0078] Below, the technical solution of the embodiment of the present application is illustrated by taking the adjustment of the second duration as an example.
[0079] Controlling an external device to generate a parameter adjustment command based on a work log may include: controlling the external device to obtain an intermediate second duration based on a first duration or a first angle in the work log; controlling the external device to generate a parameter adjustment command based on the intermediate second duration, so that the electronic lock can adjust the second duration in the current motor control parameter to the intermediate second duration based on the parameter adjustment command, thereby obtaining the target motor control parameter.
[0080] 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 having the intermediate second duration.
[0081] In some embodiments, controlling the external device to obtain the intermediate second duration based on the first duration or 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 based on the average first duration.
[0082] The average first duration and the middle second duration may be equal. In the subsequent process, the second duration in the motor control parameter may be directly adjusted to be the same as the average first duration, so that the motor 200 can be reset more accurately after reverse rotation.
[0083] Alternatively, the middle second duration may also be smaller than the average first duration.
[0084] For example, 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.
[0085] Continuing with the example of the locking segment 11 sliding up and down, with the inclined surface 41 at least partially located above the right end of the lock tongue 400, the blocking surface 45 is located to the left of the inclined surface 41. In this case, if the reverse rotation duration and forward rotation duration of the motor 200 are the same, that is, the first duration is equal to the second duration, the first elastic member 500 will cause the blocking surface 45 to 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.
[0086] In contrast, in the embodiment of the present application, the second time duration after the subsequent electronic lock is adjusted according to the parameter adjustment command is shorter than the first time duration, which can prevent the blocking surface 45 of the lock tongue 400 from partially blocking the lock hole 32 after the first elastic member 500 causes the motor 200 to reverse, thereby preventing the electronic lock from being unable to normally complete the subsequent switch lock action.
[0087] The above are some examples of adjusting the second duration in the preset motor control parameters in the embodiment of the present application. The following examples will continue to illustrate how to adjust the first duration or first angle in the preset motor control parameters.
[0088] Controlling an external device to generate a parameter adjustment command according to a work log may include: controlling the external device to obtain an intermediate first duration or an intermediate first angle according to a 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 parameter to the intermediate first duration according to the parameter adjustment command, or 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.
[0089] In some embodiments, controlling an external device to generate a parameter adjustment command based on 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.
[0090] In some implementations, the median first duration and the average second duration may be equal.
[0091] Then, in the subsequent process, the second time duration in the motor control parameter can be directly adjusted to be the same as the average first time duration, so that the motor 200 can be reset more accurately after reverse rotation.
[0092] Alternatively, the median first duration may be greater than the average second duration.
[0093] Then, since the second time length after the electronic lock is adjusted according to the parameter adjustment command will be shorter than the first time length, it can be ensured that the lock tongue 400 or the blocking surface 45 of the lock tongue 400 will not block the movement of the locking section 11 after being reset, thereby avoiding the electronic lock from getting stuck.
[0094] The above are some examples of adjusting the first duration or the first angle in the preset motor control parameters in the embodiment of the present application. The following continues with examples of adjusting the motor control parameters based on environmental information.
[0095] Controlling the external device to generate a parameter adjustment command based on the work log may include: controlling the external device to obtain 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 based on environmental information; controlling the external device to generate a parameter adjustment command based on 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, the intermediate second duration, the intermediate third duration, the intermediate operating voltage or the intermediate power consumption according to the parameter adjustment command, thereby obtaining the target motor control parameters.
[0096] Among them, the middle first duration, the middle second duration, the middle third duration, the middle working voltage and the middle power consumption correspond one to one with the first duration, the second duration, the third duration, the working voltage and the power consumption respectively.
[0097] 204. Control the external device to send a parameter adjustment command to the electronic lock.
[0098] Therefore, the electronic lock can adjust the motor control parameters after leaving the factory and in subsequent use to avoid unlocking and / or locking failures caused by incorrect rotation of the motor 200 during actual operation.
[0099] An embodiment of the present application further provides a storage medium for an electronic lock, on which a computer program is stored. When the computer program is run, the above-mentioned parameter adjustment method is executed.
[0100] An embodiment of the present application also provides a terminal device, including one or more processors and a storage device, the storage device being used to store one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the parameter adjustment method as described above.
[0101] The terminal device can be a terminal that hosts a server, or it can be a smart phone, a tablet computer, etc., which is not limited in the embodiments of the present application.
[0102] The above is a detailed introduction to the parameter adjustment method 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 ideas. 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. A method for adjusting parameters of an electronic lock, wherein, The electronic lock includes a motor, which is used to rotate to drive the electronic lock to unlock. The electronic lock also 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, so as to drive the electronic lock to unlock. The parameter adjustment method includes: Controlling an external device to generate a parameter adjustment command, which 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; Controlling the external device to send the parameter adjustment command to the electronic lock.
2. The parameter adjustment method according to claim 1, wherein Controlling the external device to generate a parameter adjustment command includes: Controlling the external device to receive an operation instruction input by a user; Generating the parameter adjustment command based on the operation instruction.
3. The parameter adjustment method according to claim 1, wherein Controlling the external device to generate a parameter adjustment command includes: Controlling 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; Controlling the external device to determine the target number of times of unlocking failure of the electronic lock in the working log; If the target number is greater than a first preset value, controlling the external device to generate the parameter adjustment command according to the working log.
4. The parameter adjustment method according to claim 3, wherein, The electronic lock further includes a locking component, which can move to an unlocking position or a locking position. The motor is used for: when the locking component is in the locking position, rotating forward for a first duration to release the locking of the locking component; stopping rotating for a third duration when the forward rotation of the first duration is completed, to allow the locking component to move to the unlocking position; reversing for a second duration and returning to a preset angle when the third duration of stopping rotation is completed, so that the locking component can move to the locking position and be locked under the action of an external force; Wherein, the motor control parameters include at least one of the first duration, the third duration, and the second duration.
5. The parameter adjustment method according to claim 4, wherein, Controlling the external device to generate the parameter adjustment command according to the working log includes: Controlling the external device to obtain an intermediate second duration according to the first duration in the working log; Controlling 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.
6. The parameter adjustment method according to claim 5, wherein, 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 out 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 and is in transmission connection with the locking tongue, so as to drive the locking tongue to move in the second direction to release the locking section; Controlling the external device to obtain an intermediate second duration according to the first duration in the work log includes: 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; Controlling the external device to determine the intermediate second duration according to the average first duration.
7. The parameter adjustment method according to claim 6, wherein, The intermediate second duration is less than the average first duration.
8. The parameter adjustment method according to claim 3, wherein The electronic lock further includes a locking member. The locking member can move to the unlocking position or the locking position. The motor is used for: when the locking member is at the locking position, rotating forward by a first angle to release the locking of the locking member; stopping rotating for a third duration when the forward rotation of the first angle is completed, so that the locking member can move to the unlocking position; after the third duration of stopping rotation is completed, rotating backward for a second duration and then returning to a preset angle, so that the locking member can be moved to the locking position and locked under the action of an external force; Wherein, the motor control parameters include at least one of the first angle, the third duration and the second duration.
9. The parameter adjustment method according to claim 4, wherein Controlling the external device to generate the parameter adjustment command according to the work log includes: Controlling the external device to obtain an intermediate second duration according to the first angle in the work log; Controlling 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.
10. The parameter adjustment method according to claim 3, wherein, Controlling the external device to generate the parameter adjustment command according to the work log includes: Controlling the external device to obtain an intermediate first duration according to the second duration in the work log; Controlling the external device to generate the parameter adjustment command according to the intermediate first duration, 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.
11. The parameter adjustment method according to claim 10, wherein, Controlling the external device to obtain an intermediate first duration according to the second duration in the work log includes: Control the external device to obtain the multiple second durations in the work log, and determine the average of the multiple second durations in the work log as the average second duration; control the external device to determine the intermediate first duration based on the average second duration, where the intermediate first duration is greater than the average second duration.
12. The parameter adjustment method according to claim 3, wherein 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 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 angle, 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.
13. The parameter adjustment method according to claim 3, wherein, The motor control parameters include at least one of the working voltage and power consumption when the motor rotates to drive the electronic lock to unlock.
14. The parameter adjustment method according to claim 13, wherein, The work log further includes the environmental information during the 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.
15. The parameter adjustment method according to claim 14, wherein, The controlling the external device to generate the parameter adjustment command according to the work log includes: Control 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; 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, 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.
16. The parameter adjustment method according to claim 3, wherein, The target number of times is the number of times the electronic lock fails to unlock during consecutive preset rounds of unlocking processes.
17. The parameter adjustment method according to claim 3, wherein, The target number of times can also be the total number of times the electronic lock fails to unlock in the work log.
18. The parameter adjustment method according to claim 1, wherein, The electronic lock is a passive electronic lock.
19. A storage medium, wherein, A computer program is stored thereon, and when the computer program runs, it executes the parameter adjustment method according to any one of claims 1 to 18.
20. A terminal device, wherein, Including: 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 18.
Citation Information
Patent Citations
Work log storage method of intelligent electronic lock, system and intelligent electronic lock
CN107845167A
Electronic lock test method, test system, test device, equipment and medium
CN113064012A
Electronic lock unlocking method and device, electronic lock and readable storage medium
CN115713822A
Method and device for monitoring running state of electronic lock, equipment and storage medium
CN115856478A
Lock control method, lock, lock control device, medium and electronic equipment
CN117027554A
Cited By
Adjusting method and device for motor driving, equipment and storage medium
CN120601805A
A method, apparatus, device, and storage medium for regulating a motor drive.
CN120601805B