Battery charging method, device and equipment, medium, program product and intelligent lock
By deploying a charger within the smart lock, using the door shutdown signal to detect the battery power and automatically control the charging, the problem of the smart door lock being unable to automatically charge at low power is solved, and automatic charging without manual intervention is achieved, improving battery health and user experience.
Patent Information
- Application Number
- CN202510069356.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-25
AI Technical Summary
The smart door lock cannot be automatically charged when the battery is low, causing the user to forget to replace or charge, and thus cannot open the smart lock, affecting the user experience.
Automatic charging is achieved by deploying a charger within the smart lock, using the shutdown signal to detect the battery's power, and automatically controlling the charger to charge or power off the battery according to the preset minimum and maximum power thresholds.
There is no need for users to manually plug and unplug the battery or external mobile power supply to avoid the inability to enter the door due to low battery power. At the same time, avoid overshoot or over-discharge, improve the health and service life of the battery and improve user experience.
Smart Images

Figure CN119891455A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart door locks, and in particular to a battery charging method, device, equipment, medium, program product and a smart lock. Background Art
[0002] In daily life, when the smart lock installed on the entrance door or safe is low on power, it will sound an alarm, but the user may forget to replace the battery or forget to charge it because of other things, so the next time the door is opened, the smart lock cannot be opened due to low power. Take the smart lock installed on the entrance door as an example. If the user is in a hurry to go out when the smart lock is low on power, it is possible that the battery power will no longer be able to support the lock to open the door and the door cannot be opened electronically when the user returns home next time. At this time, an external mobile power supply is required, and charging outside the door can pass the electronic verification to open the door. If the user does not bring an external mobile power supply, the mechanical key is required to manually open the door. After opening the door, remove the battery to charge it, or replace the battery. And after removing the battery and charging it, you may forget to put the battery back into the smart lock, which will cause the door to be unable to be powered on when it is opened again. An external mobile power supply or manual mechanical door opening is still required, which greatly reduces the user's experience of the smart lock. Summary of the invention
[0003] In view of this, the present invention provides a battery charging method, device, equipment, medium, program product and smart lock to solve the problem that the battery cannot be automatically charged.
[0004] In a first aspect, the present invention provides a method for charging a battery, wherein the battery is electrically connected to a charger in advance, and the method comprises:
[0005] When a door closing signal is received, a first power level of the battery is obtained;
[0006] determining whether charging is required according to the first power level and a preset minimum power level threshold, and if charging is required, controlling the charger to charge the battery;
[0007] During the charging process, obtaining a second amount of power of the battery;
[0008] Whether charging needs to be terminated is determined according to the second power level and a preset maximum power level threshold, and if charging needs to be terminated, the charger is controlled to cut off power to the battery.
[0009] The battery charging method provided by the present invention determines whether charging is required according to the first power level of the battery and the preset minimum power level threshold after receiving the door closing signal, and controls the charger in the smart lock to charge the battery if necessary, and determines whether charging needs to be terminated according to the second power level of the battery and the preset maximum power level threshold during the charging process, and controls the charger to cut off the power to the battery if necessary. The present invention can automatically charge according to the power level of the battery by controlling the charger to charge and cut off the power of the battery, without the need to manually plug and unplug the battery or connect an external mobile power supply, thereby avoiding the user being unable to enter the door due to the battery being too low, and also avoiding overcharging or over-discharging of the battery, thereby improving the health of the battery, extending the service life of the battery, and improving the user experience and satisfaction.
[0010] In an optional embodiment, before detecting the first power level of the battery, it also includes: obtaining a preset charging mode, the charging mode includes an automatic charging mode and an active charging mode, and determining whether the charging mode is an automatic charging mode; if it is an automatic charging mode, obtaining a preset minimum power threshold and a preset maximum power threshold, wherein the preset minimum power threshold is the first minimum power threshold set by the user or the second minimum power threshold set by the system by default, and the preset maximum power threshold is the first maximum power threshold set by the user or the second maximum power threshold set by the system by default.
[0011] The present invention obtains the system default or user-set power threshold in the automatic charging mode, and can provide users with the option of personalized function settings on the basis of automatic charging according to the battery power, so that the power threshold can be set according to personal habits, thereby improving the user experience.
[0012] In an optional embodiment, before detecting the first power level of the battery, it also includes: if the charging mode is an active charging mode, obtaining a charging signal or a power-off signal, and controlling the charger to charge the battery according to the charging signal, or controlling the charger to power off the battery according to the power-off signal.
[0013] The present invention can provide users with more autonomous personalized function setting options by setting an active charging mode. Users can directly control charging or power off according to personal needs, further improving the user experience.
[0014] In an optional embodiment, the charging process also includes: detecting whether a door opening signal is received, and if so, controlling the charger to cut off power to the battery; detecting whether a door closing signal is received within a preset time interval, and if so, returning to the step of controlling the charger to charge the battery; and generating a prompt message if no door closing signal is received within the preset time interval.
[0015] The present invention can stop charging the battery during the process of controlling the door lock based on the power provided by the battery by detecting the door opening and closing operations, that is, avoiding charging the battery when using the battery, reducing damage to the battery, further improving the health of the battery, and extending the battery life.
[0016] In an optional embodiment, whether charging is required is determined based on the first power level and a preset minimum power threshold, including: if the first power level is lower than or equal to the first minimum power threshold or the second minimum power threshold, it is determined that charging is required; if the first power level is higher than the first minimum power threshold or the second minimum power threshold, it is determined that charging is not required; whether charging needs to be ended is determined based on the second power level and a preset maximum power threshold, including: if the second power level is lower than the first maximum power threshold or the second maximum power threshold, it is determined that charging does not need to be ended; if the second power level is higher than or equal to the first maximum power threshold or the second maximum power threshold, it is determined that charging needs to be ended.
[0017] By obtaining the minimum power threshold and the maximum power threshold, the present invention can control the charging and disconnecting of the battery by the charger according to the real-time power of the battery, thereby avoiding overcharging or over-discharging of the battery and reducing the impact on the health and service life of the battery.
[0018] In a second aspect, the present invention provides a battery charging device, wherein the battery is pre-electrically connected to the charger, and the device comprises:
[0019] A first power detection module, used for obtaining a first power of the battery after receiving a door closing signal;
[0020] a charging control module, used for judging whether charging is required according to the first power level and a preset minimum power level threshold, and if charging is required, controlling the charger to charge the battery;
[0021] A second power detection module, used for detecting a second power of the battery during charging;
[0022] The power-off control module is used to determine whether charging needs to be terminated according to the second power level and a preset maximum power level threshold, and if charging needs to be terminated, control the charger to power off the battery.
[0023] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the battery charging method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the battery charging method of the first aspect or any corresponding embodiment thereof.
[0025] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the battery charging method of the first aspect or any corresponding embodiment thereof.
[0026] In a sixth aspect, the present invention provides a smart lock, comprising:
[0027] A battery is detachably disposed in the smart lock and is used to provide power to the smart lock;
[0028] The charger is installed in the smart lock and is used to detect the battery power and charge the battery;
[0029] An operation panel, used to provide the user with a charging mode selection function and a preset power threshold setting function;
[0030] The control module is connected to the charger and is used to execute the battery charging method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 is a schematic flow chart of a battery charging method according to an embodiment of the present invention;
[0033] Figure 2 is a schematic flow chart of another battery charging method according to an embodiment of the present invention;
[0034] Figure 3 is a schematic diagram of a specific flow chart of another battery charging method according to an embodiment of the present invention;
[0035] Figure 4 is a schematic flow chart of another battery charging method according to an embodiment of the present invention;
[0036] Figure 5 is a structural block diagram of a battery charging device according to an embodiment of the present invention;
[0037] Figure 6It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0039] The embodiment of the present invention is applicable to the scenario of charging the battery in the smart lock installed in the device such as the entrance door or the safe. The embodiment of the present invention provides a battery charging method, which achieves the effect of automatically charging and disconnecting the battery according to the battery power by deploying a charger in the smart lock.
[0040] According to an embodiment of the present invention, a battery charging method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] In this embodiment, a battery charging method is provided, which can be used for the above-mentioned smart lock. Figure 1 is a flow chart of a battery charging method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0042] Step S101, when a door closing signal is received, a first battery power level is obtained.
[0043] Specifically, in the embodiment of the present invention, taking the smart lock installed at the entrance door as an example, the smart lock selected by the user is pre-installed with a battery and a charger, and the charger is connected to an external power source. The charger and the battery can be wirelessly charged through a coil, or wired charged through a USB port or other electronic terminals, etc., which are not limited here. Moreover, the battery is still set to be detachable, so that the user can remove the battery according to their own needs.
[0044] In some optional implementations, after the smart lock is installed and powered on for initialization, the battery provides power to the smart lock, and combines sensor technology and lock working identification technology to detect and identify the standby state of the smart lock in real time. When it is detected that the user is opening or closing the door, the control module controls the lock tongue and other components to open or close the door, thereby realizing the conversion of the smart lock to the standby state. In order to accurately grasp the current power of the battery and avoid the inability to open the door due to the battery being too low, after receiving the door closing signal, the charger or other special power detection device detects the current power of the battery in the smart lock to obtain the first power. In addition, the charger or other special power detection device can also calculate the current health of the battery based on the detection situation. The specific calculation method is a conventional technical means in this field and will not be repeated here.
[0045] Step S102, judging whether charging is required according to the first power level and a preset minimum power level threshold, and if charging is required, controlling the charger to charge the battery.
[0046] Specifically, in an embodiment of the present invention, a preset minimum power threshold is pre-stored in the smart lock. By comparing the first power level with the minimum power threshold, it can be determined whether the battery needs to be charged at this time. That is, after determining that the first power level is lower than the minimum power threshold, it means that the battery is in a low power state at this time. If it is not charged in time, the smart lock may be shut down due to low power, and the user cannot enter the door without a mechanical key and an external mobile power supply. Therefore, when the embodiment of the present invention determines that the first power level is lower than the minimum power threshold when the door is closed, it determines that the smart lock needs to be charged at this time, and triggers the charging program, and controls the charger to charge the battery in the closed state, thereby ensuring that the smart lock is always in a standby state.
[0047] Step S103, during the charging process, obtaining a second power level of the battery.
[0048] Specifically, in the embodiment of the present invention, in order to avoid battery overcharge, during the charging process, the charger or other special power detection device detects the current power of the battery in the smart lock to obtain the second power. At this time, as the charging time increases, the second power will gradually increase.
[0049] Step S104, judging whether charging needs to be terminated according to the second power level and the preset maximum power level threshold, and if charging needs to be terminated, controlling the charger to cut off power to the battery.
[0050] Specifically, in an embodiment of the present invention, a preset maximum power threshold is pre-stored in the smart lock. By comparing the second power with the maximum power threshold, it can be determined whether the battery needs to end charging at this time. That is, after determining that the second power is higher than the maximum power threshold, it means that the battery is in a high power state at this time. If charging is not terminated in time, it may cause battery overcharge, thereby affecting the health and service life of the battery. Therefore, when the embodiment of the present invention determines that the second power is higher than the maximum power threshold during charging, it determines that the smart lock needs to end charging at this time, and controls the charger to cut off the power to the battery when the door is closed, thereby ensuring that the smart lock is always in the best power state.
[0051] The battery charging method provided by the present invention determines whether charging is required according to the first power level of the battery and the preset minimum power level threshold after receiving the door closing signal, and controls the charger in the smart lock to charge the battery if necessary, and determines whether charging needs to be terminated according to the second power level of the battery and the preset maximum power level threshold during the charging process, and controls the charger to cut off the power to the battery if necessary. The present invention can automatically charge according to the power level of the battery by controlling the charger to charge and cut off the power of the battery, without the need to manually plug and unplug the battery or connect an external mobile power supply, thereby avoiding the user being unable to enter the door due to the battery being too low, and also avoiding overcharging or over-discharging of the battery, thereby improving the health of the battery, extending the service life of the battery, and improving the user experience and satisfaction.
[0052] In this embodiment, a battery charging method is provided, which can be used for the above-mentioned smart lock. Figure 2 is a flow chart of a battery charging method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0053] Step S201, obtaining a preset charging mode, which includes an automatic charging mode and an active charging mode, and determining whether the charging mode is an automatic charging mode; if it is an automatic charging mode, obtaining a preset minimum power threshold and a preset maximum power threshold.
[0054] Specifically, in the embodiment of the present invention, the smart lock is pre-set with automatic charging mode and active charging mode. The user can select the mode through the display interface of the smart lock or the corresponding APP. Before each power detection, the smart lock will obtain the charging mode currently set by the user, such as Figure 3 shown.
[0055] In some optional implementations, the automatic charging mode is that the smart lock automatically detects the battery power and automatically determines whether charging and power off are required. In this mode, the system is pre-set with a default minimum power threshold and a maximum power threshold during development. During the use of the smart lock, the user can also set the minimum power threshold or the maximum power threshold through the display interface of the smart lock or the corresponding APP, so that on the basis of automatic charging according to the battery power, the user can be provided with the choice of personalized function settings, and the user can set the power threshold according to personal habits to improve the user experience.
[0056] In some optional embodiments, such as Figure 3 As shown, if the charging mode set by the user is the active charging mode, the smart lock will not actively charge or power off the battery. At this time, the user needs to operate on the display interface of the smart lock or the corresponding APP to select charging or power off. The smart door lock obtains the corresponding charging signal or power-off signal, and controls the charger to charge the battery according to the charging signal, or controls the charger to power off the battery according to the power-off signal. In this mode, the charger or other power detection device can still detect the battery power to display the power on the display interface of the smart lock or the corresponding APP, thereby prompting the user whether charging or power off is needed. By setting the active charging mode, the present invention can provide users with more autonomous personalized function setting options. Users can directly control charging or power off according to personal needs, further improving the user experience.
[0057] Step S202: After receiving the door closing signal, obtain the first battery power. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0058] Step S203, judging whether charging is required according to the first power level and a preset minimum power level threshold, and if charging is required, controlling the charger to charge the battery.
[0059] Specifically, the above step S203 includes:
[0060] Step S2031: if the first power level is lower than or equal to the first minimum power level threshold or the second minimum power level threshold, it is determined that charging is required.
[0061] Step S2032: if the first power level is higher than the first minimum power level threshold or the second minimum power level threshold, it is determined that charging is not required.
[0062] Specifically, in the embodiment of the present invention, if the smart lock detects that the user has not set the minimum power threshold and the maximum power threshold, the system default minimum power threshold is used as a benchmark, for example, 5%, and the first power detected when the door is closed is compared with the system default minimum power threshold, such as 5%. Figure 3As shown, if the first power level is lower than or equal to the system default minimum power level threshold, it is determined that charging is required; if the first power level is higher than the system default minimum power level threshold, it is determined that charging is not required.
[0063] In some optional implementations, if it is detected that the user has set a minimum power threshold and a maximum power threshold, the minimum power threshold set by the user is used as a reference, for example, 10%, and the first power detected when the door is closed is compared with the minimum power threshold set by the user. Figure 3 As shown, if the first power level is lower than or equal to the minimum power level threshold set by the user, it is determined that charging is required; if the first power level is higher than the minimum power level threshold set by the user, it is determined that charging is not required.
[0064] Step S204: During the charging process, obtain the second power of the battery. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0065] Step S205, judging whether charging needs to be terminated according to the second power level and the preset maximum power level threshold, and if charging needs to be terminated, controlling the charger to cut off power to the battery.
[0066] Specifically, the above step S205 includes:
[0067] Step S2051: if the second power level is lower than the first maximum power level threshold or the second maximum power level threshold, it is determined that charging does not need to be terminated.
[0068] Step S2052: If the second power level is higher than or equal to the first maximum power level threshold or the second maximum power level threshold, it is determined that charging needs to be terminated.
[0069] Specifically, in the embodiment of the present invention, the minimum power threshold and the maximum power threshold are corresponding, and are both system default thresholds or user-set thresholds. Therefore, if the user does not set the minimum power threshold and the maximum power threshold, the system default maximum power threshold is used as a reference, for example, 80%, and the second power detected during the charging process is compared with the system default maximum power threshold, such as Figure 3 As shown, if the second power level is lower than the system default maximum power level threshold, it is determined that charging does not need to be terminated; if it is higher than or equal to the system default maximum power level threshold, it is determined that charging needs to be terminated.
[0070] In some optional implementations, if the user sets a minimum power threshold and a maximum power threshold, the second power detected during the charging process is compared with the system default maximum power threshold, for example, 85%, based on the maximum power threshold set by the user. Figure 3As shown, if the second power level is lower than the maximum power level threshold set by the user, it is determined that charging does not need to be terminated; if the second power level is higher than or equal to the maximum power level threshold set by the user, it is determined that charging needs to be terminated.
[0071] The battery charging method provided by the present invention determines whether charging is required according to the first power level of the battery and the preset minimum power level threshold after receiving the door closing signal, and controls the charger in the smart lock to charge the battery if necessary, and determines whether charging needs to be terminated according to the second power level of the battery and the preset maximum power level threshold during the charging process, and controls the charger to cut off the power to the battery if necessary. The present invention can automatically charge according to the power level of the battery by controlling the charger to charge and cut off the power of the battery, without the need to manually plug and unplug the battery or connect an external mobile power supply, thereby avoiding the user being unable to enter the door due to the battery being too low, and also avoiding overcharging or over-discharging of the battery, thereby improving the health of the battery, extending the service life of the battery, and improving the user experience and satisfaction.
[0072] In this embodiment, a battery charging method is provided, which can be used for the above-mentioned smart lock. Figure 3 is a flow chart of a battery charging method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0073] Step S401, after receiving the door closing signal, obtain the first battery power. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.
[0074] Step S402: Determine whether charging is required based on the first power level and the preset minimum power level threshold. If charging is required, control the charger to charge the battery. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.
[0075] Step S403: during the charging process, obtaining a second power level of the battery.
[0076] Specifically, the above step S403 includes:
[0077] Step S4031, detecting whether a door opening signal is received, and if a door opening signal is received, controlling the charger to cut off power to the battery.
[0078] Specifically, in the embodiment of the present invention, in order to avoid charging the battery during power supply, thereby affecting the health and service life of the battery, the standby state of the smart lock is detected in real time during the charging process to see if it changes. Figure 3As shown, when a door opening signal is received in the door closing state, the smart lock needs to control the internal components to perform the corresponding door opening action. The execution of the door opening action requires battery power, so the charger needs to be controlled to stop charging the battery.
[0079] Step S4032, detecting whether a door closing signal is received within a preset time interval, if a door closing signal is received within the preset time interval, returning to the step of controlling the charger to charge the battery.
[0080] Specifically, in the embodiment of the present invention, if the user enters the door normally, the door will be opened and closed in a short time. Figure 3 As shown, if the door closing signal is received again within the preset time interval, the charger is controlled to continue charging the battery, and the battery power is continuously detected during the charging process until the battery power reaches the maximum power threshold and then the charging is terminated. The preset time interval is set according to the user's door opening and closing habits, such as 10s, which is only an example and is not limited thereto.
[0081] Step S4033: if no door closing signal is received within a preset time interval, a prompt message is generated.
[0082] Specifically, in the embodiment of the present invention, if the user forgets to close the door after entering, or does not close the door tightly, such as Figure 3 As shown, the smart lock recognizes that the door is not closed because it does not receive a door closing signal within a preset time interval. At this time, a prompt message is generated to prompt the user through voice playback or APP message of the smart lock. It can be set to prompt the user to close the door, or to prompt the user to remove the battery for charging, which is not limited here.
[0083] Step S404: determine whether charging needs to be terminated based on the second power level and the preset maximum power level threshold. If charging needs to be terminated, control the charger to cut off power to the battery. Figure 2 Step S205 of the illustrated embodiment will not be described in detail here.
[0084] The battery charging method provided by the present invention determines whether charging is required according to the first power level of the battery and the preset minimum power level threshold after receiving the door closing signal, and controls the charger in the smart lock to charge the battery if necessary, and determines whether charging needs to be terminated according to the second power level of the battery and the preset maximum power level threshold during the charging process, and controls the charger to cut off the power to the battery if necessary. The present invention can automatically charge according to the power level of the battery by controlling the charger to charge and cut off the power of the battery, without the need to manually plug and unplug the battery or connect an external mobile power supply, thereby avoiding the user being unable to enter the door due to the battery being too low, and also avoiding overcharging or over-discharging of the battery, thereby improving the health of the battery, extending the service life of the battery, and improving the user experience and satisfaction.
[0085] In this embodiment, a battery charging device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0086] This embodiment provides a battery charging device, such as Figure 5 As shown, including:
[0087] The first power detection module 501 is used to obtain a first power of the battery after receiving a door closing signal.
[0088] The charging control module 502 is used to determine whether charging is required according to the first power level and a preset minimum power level threshold, and if charging is required, control the charger to charge the battery.
[0089] The second power detection module 503 is used to detect the second power of the battery during the charging process.
[0090] The power-off control module 504 is used to determine whether charging needs to be terminated according to the second power level and a preset maximum power level threshold, and if charging needs to be terminated, control the charger to power off the battery.
[0091] In some optional embodiments, the device also includes: an automatic mode control module, which is used to obtain a pre-set charging mode, the charging mode includes an automatic charging mode and an active charging mode, and determine whether the charging mode is an automatic charging mode; if it is an automatic charging mode, a preset minimum power threshold and a preset maximum power threshold are obtained, wherein the preset minimum power threshold is the first minimum power threshold set by the user or the second minimum power threshold set by the system by default, and the preset maximum power threshold is the first maximum power threshold set by the user or the second maximum power threshold set by the system by default.
[0092] In an optional embodiment, the device also includes: an active mode control unit, which is used to obtain a charging signal or a power-off signal if the charging mode is an active charging mode, and control the charger to charge the battery according to the charging signal, or control the charger to power off the battery according to the power-off signal.
[0093] In some optional implementations, the second power detection module 503 includes:
[0094] The door opening detection unit is used to detect whether a door opening signal is received. If a door opening signal is received, the charger is controlled to cut off power to the battery.
[0095] The door closing detection unit is used to detect whether a door closing signal is received within a preset time interval. If the door closing signal is received within the preset time interval, the process returns to the step of controlling the charger to charge the battery.
[0096] The prompt unit is used to generate a prompt message if no door closing signal is received within a preset time interval.
[0097] In some optional implementations, the charging control module 502 includes:
[0098] The first comparison unit is used to determine that charging is required if the first power level is lower than or equal to a first minimum power level threshold or a second minimum power level threshold.
[0099] The second comparison unit is used to determine that charging is not required if the first power level is higher than a first minimum power level threshold or a second minimum power level threshold.
[0100] In some optional implementations, the power-off control module 504 includes:
[0101] The third comparison unit is used to determine that charging does not need to be terminated if the second power level is lower than the first maximum power level threshold or the second maximum power level threshold.
[0102] The fourth comparison unit is used to determine that charging needs to be terminated if the second power level is higher than or equal to the first maximum power level threshold or the second maximum power level threshold.
[0103] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0104] The battery charging device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0105] The embodiment of the present invention also provides a computer device having the above Figure 5 The battery charging device shown.
[0106] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0107] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0108] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0109] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0111] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0112] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0113] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0114] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0115] The embodiment of the present invention further provides a smart lock, such as a smart lock installed on a device such as a door or a safe, but not limited thereto, and the smart lock includes:
[0116] A battery is detachably disposed in the smart lock and is used to provide power to the smart lock;
[0117] The charger is installed in the smart lock and is used to detect the battery power and charge the battery;
[0118] An operation panel, used to provide the user with a charging mode selection function and a preset power threshold setting function;
[0119] The control module is connected to the charger to execute the above Figure 1 , Figure 2 or Figure 4 How to charge the battery shown.
[0120] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A battery charging method, characterized in that: The battery is electrically connected to the charger in advance, and the method comprises: After receiving the door closing signal, obtaining a first power level of the battery; determining whether charging is required according to the first power level and a preset minimum power level threshold, and if charging is required, controlling the charger to charge the battery; During the charging process, obtaining a second amount of electricity of the battery; It is determined whether charging needs to be terminated according to the second power level and a preset maximum power level threshold, and if charging needs to be terminated, the charger is controlled to cut off power to the battery.
2. The method according to claim 1, characterized in that Before detecting the first power level of the battery, the method further includes: Acquire a preset charging mode, the charging mode including an automatic charging mode and an active charging mode, and determine whether the charging mode is the automatic charging mode; If it is the automatic charging mode, the preset minimum power threshold and the preset maximum power threshold are obtained, wherein the preset minimum power threshold is the first minimum power threshold set by the user or the second minimum power threshold defaulted by the system, and the preset maximum power threshold is the first maximum power threshold set by the user or the second maximum power threshold defaulted by the system.
3. The method according to claim 2, characterized in that Before detecting the first power level of the battery, the method further includes: if the charging mode is the active charging mode, obtaining a charging signal or a power-off signal, and controlling the charger to charge the battery according to the charging signal, or controlling the charger to power off the battery according to the power-off signal.
4. The method according to claim 1, characterized in that The charging process also includes: detecting whether a door opening signal is received, and if the door opening signal is received, controlling the charger to cut off power to the battery; detecting whether the door closing signal is received within a preset time interval, and if the door closing signal is received within the preset time interval, returning to the step of controlling the charger to charge the battery; If the door closing signal is not received within the preset time interval, a prompt message is generated.
5. The method according to claim 2, characterized in that: Determining whether charging is required according to the first power level and a preset minimum power level threshold includes: If the first power level is lower than or equal to the first minimum power level threshold or the second minimum power level threshold, determining that charging is required; If the first power level is higher than the first minimum power level threshold or the second minimum power level threshold, determining that charging is not required; The determining whether to terminate charging according to the second power level and a preset maximum power level threshold includes: If the second power level is lower than the first maximum power level threshold or the second maximum power level threshold, determining that charging does not need to be terminated; If the second power level is higher than or equal to the first maximum power level threshold or the second maximum power level threshold, it is determined that charging needs to be terminated.
6. A battery charging device, characterized in that: The battery is electrically connected to the charger in advance, and the device comprises: A first power detection module, configured to obtain a first power of the battery after receiving a door closing signal; a charging control module, configured to determine whether charging is required according to the first power level and a preset minimum power level threshold, and if charging is required, control the charger to charge the battery; A second power detection module, used for detecting a second power of the battery during charging; The power-off control module is used to determine whether charging needs to be terminated according to the second power level and a preset maximum power level threshold, and if charging needs to be terminated, control the charger to power off the battery.
7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the battery charging method according to any one of claims 1 to 5 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the battery charging method according to any one of claims 1 to 5.
9. A computer program product, characterized in that The invention comprises computer instructions, wherein the computer instructions are used to make a computer execute the battery charging method according to any one of claims 1 to 5.
10. A smart lock, characterized in that: include: A battery is detachably disposed in the smart lock and is used to provide power to the smart lock; A charger, arranged in the smart lock, for detecting the power level of the battery and charging the battery; An operation panel, used to provide the user with a charging mode selection function and a preset power threshold setting function; A control module is connected to the charger and is used to execute the battery charging method according to any one of claims 1 to 5.