Electric quantity display method and device of electronic equipment
By obtaining the output signal of the electronic device battery and determining its working status, and displaying the battery power in combination with the target mapping relationship, the problem that electronic devices cannot display the battery power when the battery is powered is solved, and accurate real-time battery power display is achieved, improving the user experience.
Patent Information
- Application Number
- CN202411929425.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, electronic devices cannot display the power when powered by batteries, which affects the user experience.
By obtaining the output signal of the battery, it is determined whether the battery is working normally, and when there is no communication connection between the battery and the load, the target mapping relationship is obtained to characterize the relationship between the battery's power and the output voltage, and thus accurately display the current power of the battery.
It realizes that when the battery and load are not connected in communication, the battery power is accurately displayed, adapting to the battery performance attenuation, and improving the accuracy of user experience and battery power display.
Smart Images

Figure CN119846467A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a method for displaying power of an electronic device, a device for displaying power of an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the improvement of people's living standards, people's requirements for the functionality of air conditioners are also constantly increasing. At present, the two main air conditioners on the market are split units and integrated units. Due to the small size and easy portability of integrated units, their selection ratio among consumers has increased significantly. Portable air conditioners generally have two power supply methods, one is battery power and the other is direct power supply. In the case of battery power supply, usually only the battery has a power display. When in use, the battery is located at the bottom of the main unit, which makes it a little complicated and unclear to observe its power. Summary of the invention
[0003] The main purpose of the present application is to provide a method for displaying the power level of an electronic device, a device for displaying the power level of an electronic device, a computer-readable storage medium, and a computer program product, so as to at least solve the problem in the prior art that the power level of the electronic device cannot be displayed when the battery power supply is abnormal, thereby affecting the user experience.
[0004] According to one aspect of the present application, a method for displaying the power level of an electronic device is provided, wherein the electronic device includes an electrically connected battery and a load, and the method includes: acquiring an output signal of the battery at a current moment to obtain a current output signal, wherein the current output signal includes a current output voltage of the battery and a current output current of the battery; determining whether the battery is operating normally according to the current output signal, and determining whether the battery and the load are communicatively connected if the battery is not operating normally; acquiring a target mapping relationship if the battery and the load are not communicatively connected, and determining a power level result according to the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize a mapping relationship between the power level of the battery and the output voltage of the battery, and the power level result includes at least the current power level of the battery; and displaying the power level result on a display interface of the load.
[0005] Optionally, determining whether the battery is working normally based on the current output signal includes at least one of the following: determining whether the output signal of the battery is greater than a first signal threshold or less than a second signal threshold, and determining that the battery is not working normally when the output signal of the battery is greater than the first signal threshold or less than the second signal threshold, wherein the output signal includes one of voltage and current, and the first signal threshold is greater than the second signal threshold; acquiring the output signal of the battery before the current moment to obtain a historical output signal, and determining that the battery is not working normally when the difference between the historical output signal and the current output signal is greater than a difference threshold.
[0006] Optionally, after determining whether the battery is operating normally and before displaying the power result on the display interface of the load, the method further includes: when the battery is operating normally, acquiring the power of the battery at the current moment to obtain the power result.
[0007] Optionally, determining whether the battery and the load are communicatively connected comprises: acquiring an input signal of the load at the current moment to obtain a current input signal; determining that the battery and the load are communicatively connected when the current input signal is the same as the current output signal; and determining that the battery and the load are not communicatively connected when the current input signal is the same as the current output signal.
[0008] Optionally, obtaining the target mapping relationship includes: obtaining the power of the battery within a predetermined time period to obtain multiple power values, wherein the end time of the predetermined time period is before the current time; obtaining the output voltage of the battery within the predetermined time period to obtain multiple voltage values; fitting the multiple power values and the multiple voltage values to obtain the target mapping relationship.
[0009] Optionally, the electronic device also includes a power supply circuit, an input end of the power supply circuit is electrically connected to the battery, and an output end of the power supply circuit is electrically connected to the load. After determining whether the battery is working normally, the method also includes: obtaining the input signal of the load at the current moment to obtain a current input signal; when at least one of the current input signal and the current output signal is 0, determining that the power supply circuit is not working normally; obtaining the power level of the battery at the current moment to obtain the power level result, and outputting a first alarm signal, wherein the first alarm signal is used to indicate that the power supply circuit is not working normally.
[0010] Optionally, after determining the power result according to the target mapping relationship and the current output voltage, the method further includes: outputting a second alarm signal, wherein the second alarm signal is used to indicate that there is no communication connection between the battery and the load.
[0011] According to another aspect of the present application, a power display device for an electronic device is provided, the electronic device comprising an electrically connected battery and a load, the device comprising: an acquisition unit, used to acquire an output signal of the battery at a current moment to obtain a current output signal, wherein the current output signal comprises a current output voltage of the battery and a current output current of the battery; a first determination unit, used to determine whether the battery is operating normally according to the current output signal, and to determine whether the battery and the load are communicatively connected if the battery is not operating normally; a second determination unit, used to acquire a target mapping relationship if the battery and the load are not communicatively connected, and to determine a power result according to the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize a mapping relationship between the power of the battery and the output voltage of the battery, and the power result comprises at least the current power of the battery; and a display unit, used to display the power result on a display interface of the load.
[0012] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned methods for displaying the power of an electronic device.
[0013] According to another aspect of the present application, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the steps of any one of the above-mentioned methods for displaying the power level of an electronic device are implemented.
[0014] By applying the technical solution of the present application, since the target mapping relationship represents the mapping relationship between the battery power and the output voltage, the target mapping relationship can adapt to the performance degradation of the battery during use and maintain the accuracy of the power display; through the target mapping relationship and the current output voltage, even if the battery and the load are not connected in communication, accurate real-time display of the battery power can be achieved. In addition, since the battery is set at the bottom of the electronic device in the prior art, even if a display interface is set on the battery, it is impossible to achieve convenient display of the power. Therefore, the power result is displayed on the display interface of the load, and the user does not need to search the bottom of the load, and can see the battery power more intuitively, which can improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for displaying power of an electronic device according to an embodiment of the present invention;
[0017] Figure 2 is a flow chart of a method for displaying power of an electronic device according to an embodiment of the present application;
[0018] Figure 3 is a schematic diagram of a host and a battery according to an embodiment of the present application;
[0019] Figure 4 is a flow chart of a method for displaying power of another electronic device according to an embodiment of the present application;
[0020] Figure 5 is a schematic diagram of the host self-learning module logic according to an embodiment of the present application;
[0021] Figure 6 is a schematic diagram of a power display device of an electronic device according to an embodiment of the present application.
[0022] The above drawings include the following reference numerals:
[0023] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device; 1. Host; 2. Battery; 11. Power display area; 12. Connecting line; 13. Indicator light display area; 14. Host display area; 15. Power display area. DETAILED DESCRIPTION
[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] As introduced in the background technology, in the prior art, when the battery power supply of an electronic device is abnormal, the power level cannot be displayed, which affects the user experience. To solve the above problem, the embodiments of the present application provide a power display method for an electronic device, a power display device for an electronic device, a computer-readable storage medium, and a computer program product.
[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for displaying power of an electronic device according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the power display method of the electronic device in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal 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 a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In this embodiment, a method for displaying the power of an electronic device running on a mobile terminal, a computer terminal or a similar computing device 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.
[0032] Figure 2 FIG. 1 is a flow chart of a method for displaying power of an electronic device according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0033] Step S201, acquiring the output signal of the battery at the current moment to obtain a current output signal, wherein the current output signal includes the current output voltage and the current output current of the battery.
[0034] Specifically, by displaying the current output voltage and current of the battery, the user can know the working status and operating conditions of the battery, so as to better manage power and extend the battery life. Obtaining the output signal of the battery can also help the device automatically adjust the power consumption and power management strategy to ensure the stable operation and energy saving of the device. By monitoring the output signal of the battery, the device can adjust the working mode and energy-saving strategy in time to improve the performance and battery life of the device. It can help users understand the status and usage of the battery in real time, and also help the device automatically adjust the power consumption and power management strategy to improve the performance and energy saving effect of the device.
[0035] Step S202, determining whether the battery is working normally according to the current output signal, and if the battery is not working normally, determining whether the battery and the load are in communication connection.
[0036] Specifically, by determining whether the battery is working properly and whether there is a communication connection between the battery and the load, it can help users judge the battery's usage status and health condition. If the battery is not working properly or there is no communication connection with the load, users can take timely measures, such as replacing the battery or repairing the communication connection problem, to ensure the normal operation of the device and extend the battery life, which can improve the user experience and ensure the reliability and stability of the device.
[0037] Step S203, when there is no communication connection between the battery and the load, obtain the target mapping relationship, and determine the power result based on the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize the mapping relationship between the battery power and the output voltage of the battery, and the power result includes at least the current power of the battery.
[0038] Specifically, the current power of the battery is accurately displayed through the target mapping relationship and the current output voltage without the need for a communication connection between the battery and the load. Users can easily understand the remaining power of the battery, thereby better managing the use of the battery. The accuracy and stability of the power display can also be improved, allowing users to use electronic devices with greater confidence.
[0039] Step S204, displaying the power result on the display interface of the load.
[0040] Specifically, by displaying the power results on the display interface of the load, users can intuitively understand the power status of electronic devices, so as to better manage power and avoid affecting the user experience due to insufficient power. It can also remind users to charge in time to ensure the normal use of the equipment, improve users' awareness of the power status of electronic devices, and enhance users' sense of control and convenience over the equipment.
[0041] Through this embodiment, since the target mapping relationship represents the mapping relationship between the battery power and the output voltage, the target mapping relationship can adapt to the performance degradation of the battery during use and maintain the accuracy of the power display; through the target mapping relationship and the current output voltage, even if the battery and the load are not connected in communication, accurate real-time display of the battery power can be achieved. In addition, since the battery is set at the bottom of the electronic device in the prior art, even if a display interface is set on the battery, it is impossible to achieve convenient display of the power. Therefore, the power result is displayed on the display interface of the load, and the user does not need to search the bottom of the load, and can see the battery power more intuitively, which can improve the user experience.
[0042] Figure 3 is a schematic diagram of a host and a battery according to an embodiment of the present application. Figure 3 As shown, the battery 2 is connected to the host 1 through a connecting line 12 for power supply, and the battery 2 displays the battery power through the power display area 11. There is a communication device on the connecting line 12 between the battery 2 and the host 1. By collecting the displayed power in the battery power display area 11, the battery power is quantified on the host display area 14 and displayed through the power display area 15.
[0043] During the specific implementation process, determining whether the battery is working normally based on the current output signal can be achieved through at least one of the following steps: determining whether the output signal of the battery is greater than a first signal threshold or less than a second signal threshold, and determining that the battery is not working normally when the output signal of the battery is greater than the first signal threshold or less than the second signal threshold, wherein the output signal includes one of voltage and current, and the first signal threshold is greater than the second signal threshold; obtaining the output signal of the battery before the current moment to obtain a historical output signal, and determining that the battery is not working normally when the difference between the historical output signal and the current output signal is greater than the difference threshold.
[0044] In this scheme, by comparing whether the output signal of the battery is within the set threshold range, it can be determined whether the battery status is normal. If the output signal of the battery exceeds the set threshold range, it can be determined that the battery is not working properly. By comparing the difference between the historical output signal before the current moment and the current output signal, if it exceeds the set difference threshold, it can also be determined that the battery is not working properly. This can improve the accuracy and reliability of the user's understanding of the battery status, ensure that the user can understand the working status of the battery in a timely manner when using electronic equipment, and avoid problems caused by abnormal battery operation.
[0045] Figure 4 is a flow chart of a method for displaying power of another electronic device according to an embodiment of the present application. Figure 4As shown, first determine whether the battery is working properly. For example, the battery voltage threshold of the electronic device is 3.5V and 4.2V, the current threshold is 1A and 0.5A, and the difference threshold is 0.2V or 0.1A. If the current battery voltage is 3.3V, it is less than 3.5V, and the battery is not working properly. If the historical current is 0.8A and the current current is 1.2A, the difference is 0.4A, and the battery is not working properly.
[0046] In the specific implementation process, after determining whether the battery is working normally, before displaying the power result on the display interface of the load, the above method also includes the following steps: when the battery is working normally, obtain the battery power at the current moment to obtain the power result.
[0047] In this solution, the normal operation of the battery can be ensured and accurate power results can be obtained, and the results can be displayed on the display interface of the load, thereby improving the confidence of electronic device users in the accuracy and reliability of battery power. At the same time, it can also help users better understand the battery usage and take appropriate measures in time to extend the battery life. It can improve the user experience of electronic devices and ensure that users can accurately understand the power status when using electronic devices, so as to better manage battery usage.
[0048] Figure 5 is a schematic diagram of the host self-learning module logic according to an embodiment of the present application, such as Figure 5 As shown, the host display area will be air-conditioned by the host autonomous learning module by identifying the voltage V provided by the battery to the host x and the learned function F y Calculate the displayed power C x .
[0049] In the specific implementation process, determining whether the battery and the load are connected in communication can be achieved through the following steps: obtaining the input signal of the load at the current moment to obtain the current input signal; when the current input signal is the same as the current output signal, determining that the battery and the load are connected in communication; when the current input signal is the same as the current output signal, determining that the battery and the load are not connected in communication.
[0050] In this solution, by determining whether the battery and the load are communicatively connected, the remaining battery power can be accurately displayed. If the battery and the load are communicatively connected, the power display will be updated in real time, and the user can accurately understand the remaining battery power. If the battery and the load are not communicatively connected, the power display may remain at a fixed value, and the user cannot know the actual battery power status, thereby improving the user experience of electronic devices and allowing users to more conveniently manage and monitor battery usage.
[0051] Specifically, Figure 3As shown, when the battery 2 supplies power to the host 1 normally, the communication system and the host's autonomous learning module will work synchronously. At this time, the host display area 14 will be controlled by the connection line 12 communication, and the green light on the top of the indicator display area 13 will be on. When an abnormal failure occurs in the battery 2 power display area 11, the battery 2 cannot transmit the battery 2 display power to the host 1 through the connection line 12, and the communication fails.
[0052] In the specific implementation process, the target mapping relationship can be obtained through the following steps: obtain the power of the battery within a predetermined time period to obtain multiple power values, wherein the end time of the predetermined time period is before the current time; obtain the output voltage of the battery within the predetermined time period to obtain multiple voltage values; fit the multiple power values and the multiple voltage values to obtain the target mapping relationship.
[0053] In this scheme, by obtaining the battery power and output voltage within a predetermined time period and fitting them, a target mapping relationship, that is, the relationship between the power level and the output voltage, can be obtained. The electronic device can infer the corresponding output voltage value based on the current power value, thereby more accurately displaying the actual power status of the battery, which can improve the accuracy and stability of the power display, help users understand the battery usage more conveniently, and avoid misoperation or inconvenience caused by inaccurate power display.
[0054] like Figure 5 As shown, in order to deal with possible display failures of the battery and its power supply failures, when the host quantifies the battery display power and displays it on the host screen, the host's self-learning module works synchronously. When the air conditioner leaves the factory, the function F of the battery display power C and the power supply voltage V is determined through factory testing. 0 , with F 0 As the initial functional relationship, during the use of the user, due to the continuous decrease in the battery life, the function F 0 When the battery starts to supply power to the host, the learning module will collect a set of (C i , V i ), and refit the function through the collected data to construct a new function F k At the same time, in order to ensure the real-time nature of the data, after collecting every thousand sets of data, F k-1 The data collected will be deleted.
[0055] During the specific implementation process, the electronic device also includes a power supply circuit, the input end of the power supply circuit is electrically connected to the battery, and the output end of the power supply circuit is electrically connected to the load. After determining whether the battery is working normally, the above method also includes the following steps: obtaining the input signal of the load at the current moment to obtain the current input signal; when at least one of the current input signal and the current output signal is 0, determining that the power supply circuit is not working normally; obtaining the power level of the battery at the current moment, obtaining the power level result, and outputting a first alarm signal, wherein the first alarm signal is used to indicate that the power supply circuit is not working normally.
[0056] This solution can help users promptly discover whether the power supply circuit is working properly. By obtaining the input signal of the load and the battery power at the current moment, the status of the power supply circuit can be quickly determined. When the power supply circuit is not working properly, the system will output the first alarm signal to remind the user to deal with the problem in time, ensure the normal use of electronic equipment, effectively protect the safety of electronic equipment and users, and improve the reliability and stability of electronic equipment.
[0057] Specifically, Figure 3 As shown, when the battery 2 supplies power to the host circuit abnormally, the host 1 will not be able to work normally, and the automatic learning module will not be able to operate normally. However, the connecting line communication system will not be affected at this time. The host can still transmit the power to the host display area according to the battery display power. At this time, the power display area 15 displays normally, and the red light at the bottom of the indicator display area 13 is on (i.e., the first alarm signal), indicating that the user's battery power supply has been abnormal and it is necessary to stop using and inspect the battery.
[0058] In a specific implementation process, after determining the power result according to the target mapping relationship and the current output voltage, the method further includes the following steps: outputting a second alarm signal, wherein the second alarm signal is used to indicate that there is no communication connection between the battery and the load.
[0059] In this solution, by outputting the second alarm signal, the user can understand whether there is a communication connection problem between the battery and the load, and take necessary measures in time to solve the problem, avoiding the device from malfunctioning due to poor connection or failure, providing the user with real-time information about the connection status of the battery and the load, ensuring that the battery can power the device normally, and enhancing the user's monitoring and management of the device's power status, improving the reliability and stability of the device, and ensuring that the user can obtain accurate power information in a timely manner.
[0060] Specifically, Figure 3 As shown, the C calculated above is x The battery level display area 15 displays a yellow light in the middle of the indicator light display area (ie, the second warning signal), reminding the user that an abnormality has occurred in the battery display area.
[0061] From the above, it can be seen that in an embodiment of the present invention, in order to improve the comfort of using a portable air conditioner, a host display battery power method and an alarm for different problems that occur when the battery is powered are proposed. On the basis of the existing BX portable air conditioner, the battery power is displayed through the adapter connection line communication technology, and the host automatic learning module is used to remind different situations that occur during the power supply process. The current battery power can be displayed through the host, and the user can be informed by identifying various abnormal states under power supply conditions, which can facilitate the user to understand the condition of the air conditioner and improve the user experience comfort.
[0062] The embodiment of the present application also provides a power display device for an electronic device. It should be noted that the power display device for the electronic device of the embodiment of the present application can be used to execute the power display method for the electronic device provided in the embodiment of the present application. The device 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 for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0063] The following is an introduction to the power display device of the electronic device provided in the embodiment of the present application.
[0064] Figure 6 Schematic diagram of a power display device of an electronic device according to an embodiment of the present application. Figure 6 As shown, the device includes: an acquisition unit 601, a first determination unit 602, a second determination unit 603 and a display unit 604.
[0065] The acquisition unit 601 is used to acquire the output signal of the battery at the current moment to obtain the current output signal, wherein the current output signal includes the current output voltage and the current output current of the battery.
[0066] The first determination unit 602 is used to determine whether the battery is working normally according to the current output signal, and when the battery is not working normally, determine whether the battery and the load are in communication connection.
[0067] The second determination unit 603 is used to obtain a target mapping relationship when there is no communication connection between the battery and the load, and determine a power result based on the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize the mapping relationship between the battery power and the output voltage of the battery, and the power result includes at least the current power of the battery.
[0068] The display unit 604 is used to display the power result on the display interface of the load.
[0069] Through this embodiment, since the target mapping relationship represents the mapping relationship between the battery power and the output voltage, the target mapping relationship can adapt to the performance degradation of the battery during use and maintain the accuracy of the power display; through the target mapping relationship and the current output voltage, even if the battery and the load are not connected in communication, accurate real-time display of the battery power can be achieved. In addition, since the battery is set at the bottom of the electronic device in the prior art, even if a display interface is set on the battery, it is impossible to achieve convenient display of the power. Therefore, the power result is displayed on the display interface of the load, and the user does not need to search the bottom of the load, and can see the battery power more intuitively, which can improve the user experience.
[0070] During the specific implementation process, the first determination unit includes at least one of a first determination module and a first acquisition module. The first determination module is used to determine whether the output signal of the battery is greater than a first signal threshold or less than a second signal threshold. When the output signal of the battery is greater than the first signal threshold or less than the second signal threshold, it is determined that the battery is not working properly, wherein the output signal includes one of voltage and current, and the first signal threshold is greater than the second signal threshold; the first acquisition module is used to acquire the output signal of the battery before the current moment to obtain a historical output signal. When the difference between the historical output signal and the current output signal is greater than the difference threshold, it is determined that the battery is not working properly.
[0071] In this scheme, by comparing whether the output signal of the battery is within the set threshold range, it can be determined whether the battery status is normal. If the output signal of the battery exceeds the set threshold range, it can be determined that the battery is not working properly. By comparing the difference between the historical output signal before the current moment and the current output signal, if it exceeds the set difference threshold, it can also be determined that the battery is not working properly. This can improve the accuracy and reliability of the user's understanding of the battery status, ensure that the user can understand the working status of the battery in a timely manner when using electronic equipment, and avoid problems caused by abnormal battery operation.
[0072] In the specific implementation process, the above method also includes a second acquisition unit, which is used to determine whether the battery is working normally before displaying the power result on the display interface of the load. When the battery is working normally, the battery power at the current moment is obtained to obtain the power result.
[0073] In this solution, the normal operation of the battery can be ensured and accurate power results can be obtained, and the results can be displayed on the display interface of the load, thereby improving the confidence of electronic device users in the accuracy and reliability of battery power. At the same time, it can also help users better understand the battery usage and take appropriate measures in time to extend the battery life. It can improve the user experience of electronic devices and ensure that users can accurately understand the power status when using electronic devices, so as to better manage battery usage.
[0074] During the specific implementation process, the first determination unit includes a second acquisition module, a second determination module and a third determination module. The second acquisition module is used to acquire the input signal of the load at the current moment to obtain the current input signal; the second determination module is used to determine that the battery and the load are in communication connection when the current input signal is the same as the current output signal; the third determination module is used to determine that the battery and the load are not in communication connection when the current input signal is the same as the current output signal.
[0075] In this solution, by determining whether the battery and the load are communicatively connected, the remaining battery power can be accurately displayed. If the battery and the load are communicatively connected, the power display will be updated in real time, and the user can accurately understand the remaining battery power. If the battery and the load are not communicatively connected, the power display may remain at a fixed value, and the user cannot know the actual battery power status, thereby improving the user experience of electronic devices and allowing users to more conveniently manage and monitor battery usage.
[0076] During the specific implementation process, the second determination unit includes a third acquisition module, a fourth acquisition module and a fitting module. The third acquisition module is used to acquire the power of the battery within a predetermined time period to obtain multiple power values, wherein the end time of the predetermined time period is before the current time; the fourth acquisition module is used to acquire the output voltage of the battery within the predetermined time period to obtain multiple voltage values; the fitting module is used to fit multiple power values and multiple voltage values to obtain a target mapping relationship.
[0077] In this scheme, by obtaining the battery power and output voltage within a predetermined time period and fitting them, a target mapping relationship, that is, the relationship between the power level and the output voltage, can be obtained. The electronic device can infer the corresponding output voltage value based on the current power value, thereby more accurately displaying the actual power status of the battery, which can improve the accuracy and stability of the power display, help users understand the battery usage more conveniently, and avoid misoperation or inconvenience caused by inaccurate power display.
[0078] During the specific implementation process, the above method also includes a third acquisition unit, a third determination unit and a fourth acquisition unit. The third acquisition unit is used for the electronic device also including a power supply circuit, the input end of the power supply circuit is electrically connected to the battery, and the output end of the power supply circuit is electrically connected to the load. After determining whether the battery is working normally, the input signal of the load at the current moment is obtained to obtain the current input signal; the third determination unit is used to determine that the power supply circuit is not working normally when at least one of the current input signal and the current output signal is 0; the fourth acquisition unit is used to obtain the power of the battery at the current moment, obtain the power result, and output a first alarm signal, wherein the first alarm signal is used to indicate that the power supply circuit is not working normally.
[0079] This solution can help users promptly discover whether the power supply circuit is working properly. By obtaining the input signal of the load and the battery power at the current moment, the status of the power supply circuit can be quickly determined. When the power supply circuit is not working properly, the system will output the first alarm signal to remind the user to deal with the problem in time, ensure the normal use of electronic equipment, effectively protect the safety of electronic equipment and users, and improve the reliability and stability of electronic equipment.
[0080] In a specific implementation process, the method further includes an output unit, which is used to output a second alarm signal after determining the power result according to the target mapping relationship and the current output voltage, wherein the second alarm signal is used to indicate that there is no communication connection between the battery and the load.
[0081] In this solution, by outputting the second alarm signal, the user can understand whether there is a communication connection problem between the battery and the load, and take necessary measures in time to solve the problem, avoiding the device from malfunctioning due to poor connection or failure, providing the user with real-time information about the connection status of the battery and the load, ensuring that the battery can power the device normally, and enhancing the user's monitoring and management of the device's power status, improving the reliability and stability of the device, and ensuring that the user can obtain accurate power information in a timely manner.
[0082] The power display device of the electronic device includes a processor and a memory. The acquisition unit, the first determination unit, the second determination unit and the display unit are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0083] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the problem in the prior art that the battery power of the electronic device cannot be displayed when the battery power is abnormal, affecting the user experience.
[0084] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0085] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, a device where the computer-readable storage medium is located is controlled to execute a method for displaying the power level of an electronic device.
[0086] Specifically, the method for displaying the power of an electronic device includes:
[0087] Step S201, acquiring the output signal of the battery at the current moment to obtain a current output signal, wherein the current output signal includes the current output voltage and the current output current of the battery.
[0088] Specifically, by displaying the current output voltage and current of the battery, the user can know the working status and operating conditions of the battery, so as to better manage power and extend the battery life. Obtaining the output signal of the battery can also help the device automatically adjust the power consumption and power management strategy to ensure the stable operation and energy saving of the device. By monitoring the output signal of the battery, the device can adjust the working mode and energy-saving strategy in time to improve the performance and battery life of the device. It can help users understand the status and usage of the battery in real time, and also help the device automatically adjust the power consumption and power management strategy to improve the performance and energy saving effect of the device.
[0089] Step S202, determining whether the battery is working normally according to the current output signal, and if the battery is not working normally, determining whether the battery and the load are in communication connection.
[0090] Specifically, by determining whether the battery is working properly and whether there is a communication connection between the battery and the load, it can help users judge the battery's usage status and health condition. If the battery is not working properly or there is no communication connection with the load, users can take timely measures, such as replacing the battery or repairing the communication connection problem, to ensure the normal operation of the device and extend the battery life, which can improve the user experience and ensure the reliability and stability of the device.
[0091] Step S203, when there is no communication connection between the battery and the load, obtain the target mapping relationship, and determine the power result based on the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize the mapping relationship between the battery power and the output voltage of the battery, and the power result includes at least the current power of the battery.
[0092] Specifically, the current power of the battery is accurately displayed through the target mapping relationship and the current output voltage without the need for a communication connection between the battery and the load. Users can easily understand the remaining power of the battery, thereby better managing the use of the battery. The accuracy and stability of the power display can also be improved, allowing users to use electronic devices with greater confidence.
[0093] Step S204, displaying the power result on the display interface of the load.
[0094] Specifically, by displaying the power results on the display interface of the load, users can intuitively understand the power status of electronic devices, so as to better manage power and avoid affecting the user experience due to insufficient power. It can also remind users to charge in time to ensure the normal use of the equipment, improve users' awareness of the power status of electronic devices, and enhance users' sense of control and convenience over the equipment.
[0095] Optionally, determining whether the battery is working normally based on the current output signal includes at least one of the following: determining whether the output signal of the battery is greater than a first signal threshold or less than a second signal threshold, and determining that the battery is not working normally when the output signal of the battery is greater than the first signal threshold or less than the second signal threshold, wherein the output signal includes one of voltage and current, and the first signal threshold is greater than the second signal threshold; acquiring the output signal of the battery before the current moment to obtain a historical output signal, and determining that the battery is not working normally when the difference between the historical output signal and the current output signal is greater than the difference threshold.
[0096] Optionally, after determining whether the battery is operating normally and before displaying the power result on the display interface of the load, the method further includes: when the battery is operating normally, acquiring the power of the battery at the current moment to obtain the power result.
[0097] Optionally, determining whether the battery and the load are communicatively connected includes: acquiring an input signal of the load at a current moment to obtain a current input signal; determining that the battery and the load are communicatively connected when the current input signal is the same as a current output signal; and determining that the battery and the load are not communicatively connected when the current input signal is the same as a current output signal.
[0098] Optionally, obtaining the target mapping relationship includes: obtaining the power of the battery within a predetermined time period to obtain multiple power values, wherein the end time of the predetermined time period is before the current time; obtaining the output voltage of the battery within the predetermined time period to obtain multiple voltage values; fitting the multiple power values and the multiple voltage values to obtain the target mapping relationship.
[0099] Optionally, the electronic device also includes a power supply circuit, the input end of the power supply circuit is electrically connected to the battery, and the output end of the power supply circuit is electrically connected to the load. After determining whether the battery is working normally, the method also includes: obtaining the input signal of the load at the current moment to obtain the current input signal; when at least one of the current input signal and the current output signal is 0, determining that the power supply circuit is not working normally; obtaining the power level of the battery at the current moment, obtaining the power level result, and outputting a first alarm signal, wherein the first alarm signal is used to indicate that the power supply circuit is not working normally.
[0100] Optionally, after determining the power result according to the target mapping relationship and the current output voltage, the method further includes: outputting a second alarm signal, wherein the second alarm signal is used to indicate that there is no communication connection between the battery and the load.
[0101] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes a method for displaying the power of an electronic device when it is run.
[0102] The embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. The device in this article may be a server, a PC, a PAD, a mobile phone, etc.
[0103] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes at least the following method steps: obtaining the output signal of the battery at the current moment to obtain the current output signal, wherein the current output signal includes the current output voltage of the battery and the current output current of the battery; determining whether the battery is operating normally based on the current output signal, and determining whether the battery and the load are communicatively connected if the battery is not operating normally; obtaining a target mapping relationship if the battery and the load are not communicatively connected, and determining a power result based on the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize the mapping relationship between the battery power and the output voltage of the battery, and the power result includes at least the current power of the battery; and displaying the power result on the display interface of the load.
[0104] Optionally, determining whether the battery is working normally based on the current output signal includes at least one of the following: determining whether the output signal of the battery is greater than a first signal threshold or less than a second signal threshold, and determining that the battery is not working normally when the output signal of the battery is greater than the first signal threshold or less than the second signal threshold, wherein the output signal includes one of voltage and current, and the first signal threshold is greater than the second signal threshold; acquiring the output signal of the battery before the current moment to obtain a historical output signal, and determining that the battery is not working normally when the difference between the historical output signal and the current output signal is greater than the difference threshold.
[0105] Optionally, after determining whether the battery is operating normally and before displaying the power result on the display interface of the load, the method further includes: when the battery is operating normally, acquiring the power of the battery at the current moment to obtain the power result.
[0106] Optionally, determining whether the battery and the load are communicatively connected includes: acquiring an input signal of the load at a current moment to obtain a current input signal; determining that the battery and the load are communicatively connected when the current input signal is the same as a current output signal; and determining that the battery and the load are not communicatively connected when the current input signal is the same as a current output signal.
[0107] Optionally, obtaining the target mapping relationship includes: obtaining the power of the battery within a predetermined time period to obtain multiple power values, wherein the end time of the predetermined time period is before the current time; obtaining the output voltage of the battery within the predetermined time period to obtain multiple voltage values; fitting the multiple power values and the multiple voltage values to obtain the target mapping relationship.
[0108] Optionally, the electronic device also includes a power supply circuit, the input end of the power supply circuit is electrically connected to the battery, and the output end of the power supply circuit is electrically connected to the load. After determining whether the battery is working normally, the method also includes: obtaining the input signal of the load at the current moment to obtain the current input signal; when at least one of the current input signal and the current output signal is 0, determining that the power supply circuit is not working normally; obtaining the power level of the battery at the current moment, obtaining the power level result, and outputting a first alarm signal, wherein the first alarm signal is used to indicate that the power supply circuit is not working normally.
[0109] Optionally, after determining the power result according to the target mapping relationship and the current output voltage, the method further includes: outputting a second alarm signal, wherein the second alarm signal is used to indicate that there is no communication connection between the battery and the load.
[0110] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0111] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0112] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0113] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0115] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0116] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0117] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0118] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0119] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for displaying the power level of an electronic device, characterized in that: The electronic device comprises a battery and a load which are electrically connected, and the method comprises: Acquire the output signal of the battery at the current moment to obtain a current output signal, wherein the current output signal includes the current output voltage of the battery and the current output current of the battery; Determine whether the battery is operating normally according to the current output signal, and if the battery is not operating normally, determine whether the battery and the load are in communication connection; In the case where the battery and the load are not in communication connection, a target mapping relationship is acquired, and a power result is determined according to the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize a mapping relationship between the power of the battery and the output voltage of the battery, and the power result includes at least the current power of the battery; The power result is displayed on the display interface of the load.
2. The method according to claim 1, characterized in that Determining whether the battery is operating normally according to the current output signal includes at least one of the following: determining whether the output signal of the battery is greater than a first signal threshold or less than a second signal threshold, and determining that the battery is not working properly when the output signal of the battery is greater than the first signal threshold or less than the second signal threshold, wherein the output signal includes one of a voltage and a current, and the first signal threshold is greater than the second signal threshold; The output signal of the battery before the current moment is acquired to obtain a historical output signal, and when a difference between the historical output signal and the current output signal is greater than a difference threshold, it is determined that the battery is not operating normally.
3. The method according to claim 1, characterized in that After determining whether the battery is operating normally, and before displaying the power result on the display interface of the load, the method further includes: Under the condition that the battery operates normally, the power of the battery at the current moment is acquired to obtain the power result.
4. The method according to claim 1, characterized in that Determining whether the battery and the load are in communication connection, comprising: Acquire the input signal of the load at the current moment to obtain a current input signal; In a case where the current input signal is identical to the current output signal, determining that the battery and the load are in communication connection; When the current input signal is identical to the current output signal, it is determined that there is no communication connection between the battery and the load.
5. The method according to claim 1, characterized in that Get the target mapping relationship, including: Acquire the power of the battery within a predetermined time period to obtain multiple power values, wherein the end time of the predetermined time period is before the current time; Acquire the output voltage of the battery within the predetermined time period to obtain a plurality of voltage values; Fitting the plurality of electrical quantity values and the plurality of voltage values is performed to obtain the target mapping relationship.
6. The method according to claim 1, characterized in that The electronic device further includes a power supply circuit, an input end of the power supply circuit is electrically connected to the battery, and an output end of the power supply circuit is electrically connected to the load. After determining whether the battery is working normally, the method further includes: Acquire the input signal of the load at the current moment to obtain a current input signal; When at least one of the current input signal and the current output signal is 0, determining that the power supply circuit is not working properly; The power level of the battery at the current moment is obtained, the power level result is obtained, and a first alarm signal is output, wherein the first alarm signal is used to indicate that the power supply circuit is not working properly.
7. The method according to claim 1, characterized in that After determining the power result according to the target mapping relationship and the current output voltage, the method further includes: A second alarm signal is output, wherein the second alarm signal is used to indicate that there is no communication connection between the battery and the load.
8. A power display device for an electronic device, characterized in that: The electronic device comprises a battery and a load which are electrically connected, and the device comprises: an acquisition unit, configured to acquire an output signal of the battery at a current moment to obtain a current output signal, wherein the current output signal includes a current output voltage of the battery and a current output current of the battery; A first determining unit, configured to determine whether the battery is operating normally according to the current output signal, and to determine whether the battery and the load are in communication connection when the battery is not operating normally; a second determining unit, configured to obtain a target mapping relationship when there is no communication connection between the battery and the load, and determine a power result according to the target mapping relationship and the current output voltage, wherein the target mapping relationship is used to characterize a mapping relationship between the power of the battery and the output voltage of the battery, and the power result includes at least the current power of the battery; The display unit is used to display the power result on the display interface of the load.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.