A method, system, device and storage medium for reporting battery power of smart lock
By performing power measurement when the smart lock wakes up, and using the comparison between the front and rear power values and the thresholds to determine the actual power value, the problem of inaccurate power detection of the smart lock battery is solved, and the accuracy of power reporting is improved.
Patent Information
- Application Number
- CN202210726344.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-06-24
AI Technical Summary
When detecting the battery capacity, the existing smart locks cause unstable voltage measurement due to the increase in the internal resistance of the dry battery and the fluctuation of the system's working current, which in turn affects the accurate reporting of the power percentage.
The power measurement is performed when the smart lock wakes up, and the actual power value is determined and reported by comparing the current measured first power value and the last measured second power value with the preset threshold value.
It improves the accuracy of the battery reporting of smart lock batteries, reduces the impact of current fluctuations on battery measurement, and ensures the reliability of battery information.
Smart Images

Figure CN115047358B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart locks, and in particular to a method, system, device and storage medium for reporting battery power of a smart lock. Background Art
[0002] Smart locks are generally powered by dry batteries, and the current voltage of the power supply dry batteries is detected by the AD circuit to convert it into the current power supply value. For stand-alone smart locks that are not networked, when low power is detected (such as voltage below 80% of full power is low power), a reminder of the current low power is sufficient; for networked smart locks, two indicators need to be reported: the current power percentage and whether it is low power.
[0003] In the existing detection method, because the internal resistance of the dry cell increases as the power level decreases, the voltage detected by the AD circuit will become smaller under the same power supply current. However, if the current of the smart lock fluctuates when measuring the voltage (because the system operating current fluctuates), the measured voltage will also fluctuate, sometimes high and sometimes low. As a result, when the voltage is measured and converted into a power percentage for the same set of dry cells, the current value will be higher than the last measured value. This does not conform to the usage logic of the battery power gradually decreasing, and also affects the accuracy of the reported smart lock battery power. Summary of the invention
[0004] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.
[0005] To this end, an object of an embodiment of the present invention is to provide a method for reporting the battery power of a smart lock, which improves the accuracy of reporting the battery power of the smart lock.
[0006] Another object of an embodiment of the present invention is to provide a smart lock battery power reporting system.
[0007] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:
[0008] On the one hand, an embodiment of the present invention provides a method for reporting battery power of a smart lock, comprising the following steps:
[0009] When the smart lock is awakened, measure the battery power of the smart lock;
[0010] Obtaining a first power value of the smart lock battery currently measured and a second power value of the smart lock battery last measured;
[0011] When the first power value is greater than or equal to a preset first threshold, reporting the first power value as an actual power value;
[0012] When the first power value is less than the first threshold value and greater than or equal to a preset second threshold value, determining an actual power value according to the first power value and the second power value and reporting it;
[0013] When the first power value is less than the second threshold, the first power value is reported as the actual power value, and a low power alarm is issued.
[0014] Furthermore, in one embodiment of the present invention, the step of measuring the power value of the smart lock battery specifically includes:
[0015] Measuring the voltage value of the smart lock battery through the AD detection circuit;
[0016] The power value of the smart lock battery is determined according to the voltage value and a preset conversion formula.
[0017] Furthermore, in one embodiment of the present invention, the conversion formula is:
[0018] Q=A·UB
[0019] Among them, Q represents the power value, U represents the voltage value, and A and B are preset parameters.
[0020] Furthermore, in one embodiment of the present invention, the step of measuring the power value of the smart lock battery specifically includes:
[0021] Measuring the voltage value of the smart lock battery through the AD detection circuit;
[0022] The voltage value is input into a pre-trained power recognition model to obtain the power value of the smart lock battery.
[0023] Furthermore, in one embodiment of the present invention, the smart lock battery power reporting method further includes the step of training a power recognition model, which specifically includes:
[0024] Obtain the test voltage value and the corresponding test power value of the smart lock battery obtained by the test, and construct a training data set according to the test voltage value and the test power value;
[0025] Inputting the training data set into a pre-built deep neural network to obtain a predicted power value;
[0026] Determining a loss value of the deep neural network according to the predicted power value and the tested power value;
[0027] Updating the parameters of the deep neural network through a back propagation algorithm according to the loss value;
[0028] When the deep neural network reaches a preset convergence condition, the training is stopped to obtain a power recognition model.
[0029] Further, in one embodiment of the present invention, the step of determining the actual power value according to the first power value and the second power value and reporting the actual power value is specifically as follows:
[0030] When the first power value is greater than or equal to the second power value, calculating a first difference between the first power value and the second power value;
[0031] Determine that the first difference is greater than a preset third threshold, and report the first power value as the actual power value;
[0032] Determine that the first difference is less than or equal to the third threshold, and report the second power value as the actual power value;
[0033] When the first power value is less than the second power value, calculating a second difference between the second power value and the first power value;
[0034] Determine that the second difference is greater than a preset fourth threshold, and report an average of the first power value and the second power value as an actual power value;
[0035] It is determined that the second difference is less than or equal to a preset fourth threshold, and the first power value is reported as the actual power value.
[0036] Furthermore, in one embodiment of the present invention, the step of issuing a low battery alarm specifically includes:
[0037] Play low battery notification via voice playback unit;
[0038] and / or,
[0039] The warning light is emitted by the light prompt unit.
[0040] On the other hand, an embodiment of the present invention provides a smart lock battery power reporting system, including:
[0041] The power value measurement module is used to measure the power value of the smart lock battery when the smart lock is awakened;
[0042] A power value acquisition module, used to acquire a first power value of the smart lock battery currently measured and a second power value of the smart lock battery last measured;
[0043] A first reporting module, configured to report the first power value as an actual power value when the first power value is greater than or equal to a preset first threshold;
[0044] A second reporting module, configured to determine and report an actual power value according to the first power value and the second power value when the first power value is less than the first threshold value and greater than or equal to a preset second threshold value;
[0045] The third reporting module is configured to report the first power value as the actual power value and issue a low power alarm when the first power value is less than the second threshold.
[0046] On the other hand, an embodiment of the present invention provides a smart lock battery power reporting device, including:
[0047] at least one processor;
[0048] at least one memory for storing at least one program;
[0049] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned method for reporting the battery power of a smart lock.
[0050] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to execute the above-mentioned method for reporting the battery power of a smart lock.
[0051] The advantages and beneficial effects of the present invention will be partly given in the following description, partly become apparent from the following description, or be understood through the practice of the present invention:
[0052] The embodiment of the present invention measures the power level when the smart lock is awakened, thereby avoiding the influence of different power-consuming components started after the smart lock is awakened by different awakening methods on the power level measurement, and improving the accuracy of the smart lock battery power reporting; the actual power value reported is determined by comparing the currently measured first power value, the last measured second power value, and the preset first threshold and second threshold, thereby reducing the influence of current fluctuations during the operation of the smart lock on the power measurement, and further improving the accuracy of the smart lock battery power reporting. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 A flowchart of a method for reporting battery power of a smart lock provided by an embodiment of the present invention;
[0055] Figure 2 A structural block diagram of a smart lock battery power reporting system provided by an embodiment of the present invention;
[0056] Figure 3 A structural block diagram of a smart lock battery power reporting device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0058] In the description of the present invention, the meaning of "a plurality" is two or more than two. If there is a description of "a first" or "a second", it is only used for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features. In addition, unless otherwise defined, all technical and scientific terms used in this document have the same meaning as those commonly understood by those skilled in the art.
[0059] Reference Figure 1 The embodiment of the present invention provides a method for reporting battery power of a smart lock, which specifically includes the following steps:
[0060] S101. When the smart lock is awakened, measure the power value of the smart lock battery.
[0061] Specifically, after the smart lock is awakened, due to the different awakening methods (fingerprint awakening, touch keyboard awakening, and IC card awakening, etc.), the power supply peripherals started after the smart lock is awakened are different, causing current changes, which will affect the power measurement. However, the current is stable when the smart lock is awakened. The embodiment of the present invention chooses to measure the battery power value at the moment the smart lock is awakened, which improves the accuracy of the battery power reporting of the smart lock to a certain extent.
[0062] In one embodiment of the present invention, the step of measuring the power value of the smart lock battery specifically includes:
[0063] S1011, measuring the voltage value of the smart lock battery through the AD detection circuit;
[0064] S1012. Determine the power value of the smart lock battery according to the voltage value and a preset conversion formula.
[0065] As an optional implementation, the conversion formula is:
[0066] Q=A·UB
[0067] Among them, Q represents the power value, U represents the voltage value, and A and B are preset parameters.
[0068] Specifically, taking a smart lock with four dry batteries as an example, when the total voltage is not less than 6V, the power value is set to 100%, when the total voltage is less than 4.8V, the power value is set to 20%, and when the total voltage is between 6V and 4.8V, the power value is considered to change linearly between 100% and 20%. Through calculation, it can be seen that in the embodiment of the present invention, A = 2 / 3, B = 3, that is, Q = 2 / 3U-3.
[0069] In another embodiment of the present invention, the step of measuring the power value of the smart lock battery specifically includes:
[0070] S1013, measuring the voltage value of the smart lock battery through the AD detection circuit;
[0071] S1014. Input the voltage value into a pre-trained power recognition model to obtain the power value of the smart lock battery.
[0072] Specifically, the voltage value and power value of the smart lock battery at each stage can be determined through testing during the production of the smart lock, and training data can be constructed for training the power recognition model. In actual use, only the voltage value measured by the AD detection circuit needs to be input into the power recognition model to obtain the current power value.
[0073] As an optional implementation, the smart lock battery power reporting method further includes the step of training a power recognition model, which specifically includes:
[0074] A1. Obtain the test voltage value and the corresponding test power value of the smart lock battery obtained by the test, and construct a training data set according to the test voltage value and the test power value;
[0075] A2. Input the training data set into the pre-built deep neural network to obtain the predicted power value;
[0076] A3. Determine the loss value of the deep neural network based on the predicted power value and the tested power value;
[0077] A4. Update the parameters of the deep neural network through the back propagation algorithm according to the loss value;
[0078] A5. When the deep neural network reaches the preset convergence condition, the training is stopped and the power recognition model is obtained.
[0079] Specifically, after inputting the data in the training data set into the initialized deep neural network, the predicted power value output by the model can be obtained. The accuracy of the power recognition model can be evaluated based on the predicted power value and the test power value, thereby updating the parameters of the model. For the power recognition model, the accuracy of the model recognition result can be measured by the loss function. The loss function is defined on a single training data and is used to measure the prediction error of a training data. Specifically, the loss value of the training data is determined by the label of a single training data and the prediction result of the model for the training data. In actual training, a training data set has a lot of training data, so the cost function is generally used to measure the overall error of the training data set. The cost function is defined on the entire training data set and is used to calculate the average value of the prediction error of all training data, which can better measure the prediction effect of the model. For general machine learning models, based on the aforementioned cost function, plus the regularization term that measures the complexity of the model, it can be used as the objective function of the training. Based on this objective function, the loss value of the entire training data set can be calculated. There are many types of commonly used loss functions, such as 0-1 loss function, square loss function, absolute loss function, logarithmic loss function, cross entropy loss function, etc., which can all be used as loss functions of machine learning models, which will not be elaborated here one by one. In the embodiment of the present application, any loss function can be selected to determine the loss value of training. Based on the loss value of training, the back propagation algorithm is used to update the parameters of the model, and a trained power recognition model can be obtained by iterating several rounds. Specifically, the number of iterations can be pre-set, or the training is considered to be completed when the test set meets the accuracy requirements.
[0080] S102: Obtain a first power value of a smart lock battery currently measured and a second power value of a smart lock battery last measured.
[0081] Specifically, the first power value currently measured is the power value measured when the smart lock is currently awakened, and the second power value last measured is the power value measured when the smart lock was last awakened.
[0082] S103: When the first power value is greater than or equal to a preset first threshold, report the first power value as the actual power value.
[0083] Specifically, in an embodiment of the present invention, the first threshold is 100%. When the first power value is greater than or equal to 100% (when replacing a new battery, the voltage will exceed the rated value and the power value may be greater than 100%), it means that the current smart lock battery is saturated, and the first power value can be directly reported as the actual power value.
[0084] S104: When the first power value is less than a first threshold value and greater than or equal to a preset second threshold value, determine the actual power value according to the first power value and the second power value and report it.
[0085] Specifically, in an embodiment of the present invention, the first threshold is 100%, and the second threshold is 20%. When the first power value is less than 100% and greater than or equal to 20%, it is necessary to determine whether the current first power value and the second power value measured last time are affected by current fluctuations, and determine the actual power value according to different situations.
[0086] As an optional implementation, the step of determining the actual power value according to the first power value and the second power value and reporting the actual power value is specifically as follows:
[0087] S1041, when the first power value is greater than or equal to the second power value, calculating a first difference between the first power value and the second power value;
[0088] S1042: Determine that the first difference is greater than a preset third threshold, and report the first power value as the actual power value;
[0089] S1043: Determine that the first difference is less than or equal to a third threshold, and report the second power value as the actual power value;
[0090] Specifically, when the first power value is greater than or equal to the second power value, whether there is a current fluctuation influence is determined based on the relationship between the first difference between the first power value and the second power value and the preset third threshold value. In the embodiment of the present invention, the third threshold value is 20%. When the first difference is greater than 20%, it exceeds the range of current fluctuation influence. It may be that the battery pack has been replaced, resulting in a large increase in power value. Therefore, the first power value can be reported as the actual power value; when the first difference is less than or equal to 20%, the power change may be affected by current fluctuations. Therefore, the second power value measured last time can be reported as the actual power value.
[0091] S1044, when the first power value is less than the second power value, calculating a second difference between the second power value and the first power value;
[0092] S1045: Determine that the second difference is greater than a preset fourth threshold, and report the average of the first power value and the second power value as the actual power value;
[0093] S1046: Determine whether the second difference is less than or equal to a preset fourth threshold, and report the first power value as the actual power value.
[0094] Specifically, when the first power value is less than the second power value, whether there is a current fluctuation influence is determined according to the magnitude relationship between the second difference between the second power value and the first power value and the preset fourth threshold value. In the embodiment of the present invention, the fourth threshold value is 5%. When the second difference is greater than 5%, the power change may be affected by the current fluctuation, so the average of the first power value and the second power value can be reported as the actual power value; when the second difference is less than or equal to 5%, the power change belongs to normal use consumption, so the currently measured first power value can be reported as the actual power value.
[0095] S105: When the first power value is less than a second threshold, the first power value is reported as an actual power value, and a low power alarm is issued.
[0096] Specifically, in an embodiment of the present invention, the second threshold is 20%. When the first power value is less than 20%, it indicates that the smart lock battery is in a low power state. Therefore, the currently measured first power value can be reported as the actual power value, and a low power alarm can be issued at the same time.
[0097] As an optional implementation, the step of issuing a low battery alarm specifically includes:
[0098] Play low battery notification via voice playback unit;
[0099] and / or,
[0100] The warning light is emitted by the light prompt unit.
[0101] It can be understood that the embodiment of the present invention measures the power when the smart lock is awakened, avoiding the influence of different power consumption components started after awakening the smart lock by different awakening methods on the power measurement, and improving the accuracy of the smart lock battery power reporting; the actual power value reported is determined by comparing the currently measured first power value, the last measured second power value with the preset first threshold and second threshold, which reduces the influence of current fluctuations when the smart lock is working on the power measurement, and further improves the accuracy of the smart lock battery power reporting. In addition, the embodiment of the present invention makes the power value of the smart lock battery reported on the APP side more accurate, and can present an accurate power change curve, which is convenient for users to monitor the smart lock battery power and improves the user experience.
[0102] Reference Figure 2 The embodiment of the present invention provides a smart lock battery power reporting system, including:
[0103] The power value measurement module is used to measure the power value of the smart lock battery when the smart lock is awakened;
[0104] A power value acquisition module, used to acquire a first power value of a smart lock battery currently measured and a second power value of a smart lock battery last measured;
[0105] A first reporting module, configured to report the first power value as the actual power value when the first power value is greater than or equal to a preset first threshold;
[0106] A second reporting module, configured to determine and report the actual power value according to the first power value and the second power value when the first power value is less than the first threshold value and greater than or equal to a preset second threshold value;
[0107] The third reporting module is configured to report the first power value as the actual power value and issue a low power alarm when the first power value is less than the second threshold.
[0108] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0109] Reference Figure 3 The embodiment of the present invention provides a smart lock battery power reporting device, comprising:
[0110] at least one processor;
[0111] at least one memory for storing at least one program;
[0112] When the at least one program is executed by the at least one processor, the at least one processor implements the method for reporting battery power of a smart lock.
[0113] The contents of the above method embodiments are all applicable to the present device embodiments. The functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0114] An embodiment of the present invention also provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to execute the above-mentioned smart lock battery power reporting method.
[0115] A computer-readable storage medium of an embodiment of the present invention can execute a smart lock battery power reporting method provided by a method embodiment of the present invention, can execute any combination of implementation steps of the method embodiment, and has the corresponding functions and beneficial effects of the method.
[0116] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.
[0117] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0118] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified to the contrary, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0119] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0120] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0121] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the above-mentioned program is printed, since the above-mentioned program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in other suitable ways as necessary, and then stored in a computer memory.
[0122] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0123] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0124] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0125] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A method for reporting battery power of a smart lock, characterized in that: The following steps are involved: When the smart lock is awakened, measure the battery power of the smart lock; Obtaining a first power value of the smart lock battery currently measured and a second power value of the smart lock battery last measured; When the first power value is greater than or equal to a preset first threshold, reporting the first power value as an actual power value; When the first power value is less than the first threshold value and greater than or equal to a preset second threshold value, determining an actual power value according to the first power value and the second power value and reporting it; When the first power value is less than the second threshold, reporting the first power value as the actual power value and issuing a low power alarm; The step of determining the actual power value according to the first power value and the second power value and reporting the actual power value is specifically as follows: When the first power value is greater than or equal to the second power value, calculating a first difference between the first power value and the second power value; Determine that the first difference is greater than a preset third threshold, and report the first power value as the actual power value; Determine that the first difference is less than or equal to the third threshold, and report the second power value as the actual power value; When the first power value is less than the second power value, calculating a second difference between the second power value and the first power value; Determine that the second difference is greater than a preset fourth threshold, and report an average of the first power value and the second power value as an actual power value; It is determined that the second difference is less than or equal to a preset fourth threshold, and the first power value is reported as the actual power value.
2. A method for reporting battery power of a smart lock according to claim 1, characterized in that: The step of measuring the power value of the smart lock battery specifically includes: Measuring the voltage value of the smart lock battery through the AD detection circuit; The power value of the smart lock battery is determined according to the voltage value and a preset conversion formula.
3. A method for reporting battery power of a smart lock according to claim 2, characterized in that: The conversion formula is: Q=A·UB Among them, Q represents the power value, U represents the voltage value, and A and B are preset parameters.
4. A method for reporting battery power of a smart lock according to claim 1, characterized in that: The step of measuring the power value of the smart lock battery specifically includes: Measuring the voltage value of the smart lock battery through the AD detection circuit; The voltage value is input into a pre-trained power recognition model to obtain the power value of the smart lock battery.
5. A method for reporting battery power of a smart lock according to claim 4, characterized in that: The smart lock battery power reporting method also includes the step of training a power recognition model, which specifically includes: Obtain the test voltage value and the corresponding test power value of the smart lock battery obtained by the test, and construct a training data set according to the test voltage value and the test power value; Inputting the training data set into a pre-built deep neural network to obtain a predicted power value; Determining a loss value of the deep neural network according to the predicted power value and the tested power value; Updating the parameters of the deep neural network through a back propagation algorithm according to the loss value; When the deep neural network reaches a preset convergence condition, the training is stopped to obtain a power recognition model.
6. A method for reporting battery power of a smart lock according to any one of claims 1 to 5, characterized in that: The step of issuing a low battery alarm specifically includes: Play low battery notification via voice playback unit; and / or, The warning light is emitted by the light prompt unit.
7. A smart lock battery power reporting system, characterized in that: include: The power value measurement module is used to measure the power value of the smart lock battery when the smart lock is awakened; A power value acquisition module, used to acquire a first power value of the smart lock battery currently measured and a second power value of the smart lock battery last measured; A first reporting module, configured to report the first power value as an actual power value when the first power value is greater than or equal to a preset first threshold; A second reporting module, configured to determine and report an actual power value according to the first power value and the second power value when the first power value is less than the first threshold value and greater than or equal to a preset second threshold value; a third reporting module, configured to report the first power value as an actual power value and issue a low power alarm when the first power value is less than the second threshold; The step of determining the actual power value according to the first power value and the second power value and reporting the actual power value is specifically as follows: When the first power value is greater than or equal to the second power value, calculating a first difference between the first power value and the second power value; Determine that the first difference is greater than a preset third threshold, and report the first power value as the actual power value; Determine that the first difference is less than or equal to the third threshold, and report the second power value as the actual power value; When the first power value is less than the second power value, calculating a second difference between the second power value and the first power value; Determine that the second difference is greater than a preset fourth threshold, and report an average of the first power value and the second power value as an actual power value; It is determined that the second difference is less than or equal to a preset fourth threshold, and the first power value is reported as the actual power value.
8. A smart lock battery power reporting device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a smart lock battery power reporting method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to execute a smart lock battery power reporting method as described in any one of claims 1 to 6 when executed by the processor.
Citation Information
Patent Citations
Self-adaptive battery electric quantity monitoring method and system
CN114509684A