CN114142548B - Battery switching method and device of electronic equipment, electronic equipment and medium - Google Patents

Battery switching method and device of electronic equipment, electronic equipment and medium Download PDF

Info

Publication number
CN114142548B
CN114142548B CN202111256840.0A CN202111256840A CN114142548B CN 114142548 B CN114142548 B CN 114142548B CN 202111256840 A CN202111256840 A CN 202111256840A CN 114142548 B CN114142548 B CN 114142548B
Authority
CN
China
Prior art keywords
battery
working mode
electric quantity
power consumption
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111256840.0A
Other languages
Chinese (zh)
Other versions
CN114142548A (en
Inventor
舒舢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Goertek Technology Co Ltd
Original Assignee
Qingdao Goertek Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Goertek Technology Co Ltd filed Critical Qingdao Goertek Technology Co Ltd
Priority to CN202111256840.0A priority Critical patent/CN114142548B/en
Publication of CN114142548A publication Critical patent/CN114142548A/en
Application granted granted Critical
Publication of CN114142548B publication Critical patent/CN114142548B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0013Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries acting upon several batteries simultaneously or sequentially
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • H01M10/441Methods for charging or discharging for several batteries or cells simultaneously or sequentially
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits
    • H02J7/0048Detection of remaining charge capacity or state of charge [SOC]
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0063Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with circuits adapted for supplying loads from the battery
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/36Arrangements using end-cell switching
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J9/00Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting
    • H02J9/04Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source
    • H02J9/06Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J9/00Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting
    • H02J9/04Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source
    • H02J9/06Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems
    • H02J9/061Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems for DC powered loads
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J9/00Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting
    • H02J9/04Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source
    • H02J9/06Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems
    • H02J9/068Electronic means for switching from one power supply to another power supply, e.g. to avoid parallel connection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application discloses a battery switching method and device of electronic equipment, the electronic equipment and a medium. The method comprises the following steps: detecting the current working mode and the residual electric quantity of the current used battery; calculating a first duration according to the corresponding power consumption and the residual electric quantity of the current working mode; the first duration is the available time of the currently used battery; and judging whether the first time length is smaller than or equal to a first preset threshold value, if so, replacing the currently used battery with the largest electric quantity selected from all the first batteries to supply power to the electronic equipment. The method can automatically switch the battery at proper time in time, can efficiently utilize the electric quantity of the battery, and maintain continuous operation of the electronic equipment.

Description

Battery switching method and device of electronic equipment, electronic equipment and medium
Technical Field
The present invention relates to the technical field of electronic devices, and in particular, to a battery switching method and apparatus for an electronic device, and a computer readable storage medium.
Background
Many electronic devices, such as VR devices, are currently supported by multiple batteries, such as a dual battery or more, in order to keep the electronic device in continuous use when one of the batteries is removed for charging, and other first batteries, which greatly prolongs the duration of use of the electronic device, even by continuously switching between batteries.
Currently, in the technical scheme of performing battery switching on such electronic devices, a user usually manually switches a standby battery when finding that the remaining capacity of a current power supply battery is lower than a certain preset value (for example, 5%). This tends to result in an inability to reasonably utilize the power of each battery of the electronic device.
Disclosure of Invention
The application aims to provide a battery switching method and device of electronic equipment, the electronic equipment and a computer readable storage medium. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
According to one aspect of the embodiments of the present application, there is provided a battery switching method of an electronic device, the electronic device having a plurality of operation modes, the electronic device including a plurality of batteries; the method comprises the following steps:
detecting the current working mode and the residual electric quantity of the current used battery;
calculating a first duration according to the corresponding power consumption of the current working mode and the residual electric quantity; the first duration is the available time of the currently used battery;
judging whether the first time length is smaller than or equal to a first preset threshold value, if yes, selecting a battery with the largest electric quantity from all the first batteries to replace the currently used battery to supply power for the electronic equipment; wherein the first battery is a battery other than the currently used battery among the plurality of batteries.
In some embodiments of the present application, the method further comprises:
detecting the current residual electric quantity of each first battery;
calculating all second time lengths of each first battery according to the corresponding power consumption in each working mode and the current residual quantity of each first battery; the second duration of the first battery is the available time of the first battery in the corresponding working mode;
and respectively judging whether all second time lengths of each first battery are smaller than or equal to a second preset threshold value, and if yes, sending out a signal prompting the first battery to be charged.
In some embodiments of the present application, before the calculating the first time period according to the corresponding power consumption of the current operation mode and the remaining power, the method further includes:
detecting and recording the current working mode and the residual electricity value of the currently used battery in the current working mode;
when the recorded times reach a preset time threshold, calculating the average power consumption of the current working mode according to the third preset detection period and all recorded residual electric quantity values; the average power consumption is the corresponding power consumption in the current working mode.
In some embodiments of the present application, the calculating the average power consumption of the current working mode according to the third preset detection period and all the recorded residual power values includes:
calculating the absolute value of the difference between the two residual electric quantity values of each adjacent record;
dividing each absolute value by the third preset detection period to obtain each initial power consumption;
and calculating the average value of the initial power consumption to obtain the average power consumption of the current working mode.
In some embodiments of the present application, the method further comprises:
when an instruction for switching the working mode is received, calculating a third duration according to the corresponding power consumption of the working mode to be switched and the residual capacity of the currently used battery; the third duration is the available time of the currently used battery in the working mode to be switched;
and judging whether the third duration is greater than a third preset threshold value, if not, selecting the battery with the largest electric quantity from all the first batteries, and replacing the currently used battery with the largest electric quantity to supply power for the electronic equipment while or before the working mode is switched.
According to another aspect of the embodiments of the present application, there is provided a battery switching device of an electronic apparatus, the electronic apparatus having a plurality of operation modes, the electronic apparatus including a plurality of batteries; the device comprises:
the detection module is used for detecting the current working mode and the residual electric quantity of the current used battery;
the calculation module is used for calculating a first duration according to the corresponding power consumption of the current working mode and the residual electric quantity; the first duration is the available time of the currently used battery;
the judging module is used for judging whether the first time length is smaller than or equal to a first preset threshold value;
the switching module is used for selecting the battery with the highest electric quantity from all the first batteries to replace the currently used battery to supply power for the electronic equipment if the battery is used; wherein the first battery is a battery other than the currently used battery among the plurality of batteries.
According to another aspect of the embodiments of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the battery switching method of the electronic device of any one of the above.
In some embodiments of the present application, the electronic device is a head-mounted display device, the head-mounted display device including a head-mounted host housing a display screen and a rear head-mounted for securing the head-mounted host to a user's head, wherein at least one of the plurality of batteries is disposed in the head-mounted host and/or the rear head-mounted.
In some embodiments of the present application, the electronic device is an eyeglass, and the eyeglass includes a frame and two temples extending outward from two ends of the frame, wherein at least one of the plurality of batteries is disposed on one of the temples.
According to another aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the battery switching method of the electronic device of any one of the above.
One of the technical solutions provided in one aspect of the embodiments of the present application may include the following beneficial effects:
according to the battery switching method of the electronic equipment, the available time of the currently used battery is calculated according to the average power consumption of the current working mode and the residual power of the currently used battery, when the available time is insufficient, the appropriate first battery can be automatically switched to supply power for the electronic equipment, the battery can be automatically switched in time at appropriate time, the electric quantity of the battery can be effectively utilized, the continuous work of the electronic equipment is maintained, and the switching method is scientific, reasonable and flexible, and can prolong the service life of the battery.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a battery switching method flow diagram of an electronic device of one embodiment of the present application;
fig. 2 shows a flowchart of step S10 in fig. 1;
FIG. 3 is a flowchart showing the steps of calculating the average power consumption of the current operation mode according to the third preset detection period and all the recorded residual electric power values shown in FIG. 2;
fig. 4 shows a flowchart of steps S60 to S80 in a battery switching method of an electronic device according to another embodiment of the present application;
FIG. 5 shows a block diagram of a battery switching device of an electronic device according to one embodiment of the present application;
fig. 6 shows a block diagram of a battery switching device of an electronic apparatus according to another embodiment of the present application;
FIG. 7 shows a block diagram of the acquisition module shown in FIG. 6;
FIG. 8 shows a block diagram of the computing unit shown in FIG. 7;
FIG. 9 shows a block diagram of an electronic device of another embodiment of the present application;
fig. 10 shows a schematic diagram of a computer-readable storage medium according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
An embodiment of the present application provides a battery switching method of an electronic device, which may have a plurality of operation modes, the electronic device including a plurality of batteries; one of the plurality of batteries is used to power the electronic device and the other battery is used as a first battery, which may also be referred to as a backup battery, which is used to replace a currently used battery to power the electronic device when the currently used battery needs to be replaced. The electronic device may be, for example, a VR device. VR devices have a gaming mode, a video mode, and other modes of operation, with the gaming mode and video mode of operation having relatively large power consumption.
As shown in fig. 1, the battery switching method of the electronic device includes:
s10, acquiring corresponding power consumption of the electronic equipment in each working mode.
In certain embodiments, as shown in fig. 2, step S10 comprises:
s101, detecting and recording the current working mode and the residual electricity value of the currently used battery in the current working mode.
In step S101, the current operation mode and the remaining power value of the currently used battery in the current operation mode may be periodically detected and recorded based on a third preset detection period; the detection can also be carried out aperiodically, and the specific detection mode can be set or selected according to actual needs.
For example, the third preset detection period may be set to 30s, and the remaining electric power value of the currently used battery in the current operation mode is detected every 30 s.
S102, when the recorded times reach a preset time threshold, calculating the average power consumption of the current working mode according to a third preset detection period and all recorded residual electric quantity values; the average power consumption is the corresponding power consumption in the current operation mode.
Specifically, taking the preset number of times threshold value set to 21 as an example, it takes 10 minutes to complete 21 times of detection and recording.
As shown in fig. 3, in some embodiments, the calculating the average power consumption of the current operation mode according to the third preset detection period and all the recorded residual power values includes:
s1021, calculating the absolute value of the difference between two residual electric quantity values recorded adjacently.
Specifically, 21 residual electric power values, respectively denoted as Q, were detected and recorded within 10 minutes 1 ,Q 2 ,Q 3 ,…,Q 21 The absolute value of the difference between the two residual electric power values recorded adjacently is respectively
d 1 =|Q 1 -Q 2 |,d 2 =|Q 2 -Q 3 |,……,d 20 =|Q 20 -Q 21 |。
And S1022, dividing each absolute value by the third preset detection period to obtain each initial power consumption.
Specifically, each initial power consumption is P 1 =d 1 /30,P 2 =d 2 /30,……,P 20 =d 20 /30。
S1023, calculating the average value of the initial power consumption to obtain the average power consumption of the current working mode.
Specifically, the calculation method of average power consumption is P Average of =(P 1 +P 2 +…+P 20 )/20。
The average power consumption of various working modes can be calculated in real time through the steps.
S20, detecting the current working mode and the residual capacity of the currently used battery.
In some embodiments, step S20 may be to periodically detect the current operation mode and the remaining power of the currently used battery based on the first preset detection period.
Specifically, for example, the first preset detection period may be set to 60s, and the current operation mode of the electronic device and the remaining power of the currently used battery may be detected every 60 s.
In some embodiments, step S20 may also be performed by non-periodic detection, and may be specifically selected or set according to actual needs.
S30, calculating a first duration according to the corresponding power consumption of the current working mode and the residual electric quantity; the first duration is the available time of the currently used battery.
Specifically, the first time period=the remaining amount of currently used battery/the average power consumption of the current operation mode.
And S40, judging whether the first time length is smaller than or equal to a first preset threshold value, if yes, sending a signal for prompting to switch the battery, and if not, turning to the step S20.
Specifically, the first preset threshold is set to be 5 minutes, for example, and when the first time length is less than or equal to 5 minutes, a signal for prompting to switch the battery is sent.
S50, selecting the battery with the highest electric quantity from all the first batteries to replace the currently used battery to supply power for the electronic equipment according to the signal for prompting to switch the batteries; wherein the first battery is a battery other than the currently used battery among the plurality of batteries.
Specifically, after receiving a signal prompting to switch the batteries, detecting the electric quantity of all the first batteries, selecting the battery with the largest electric quantity from the first batteries to switch the currently used battery, and supplying power to the electronic equipment by the battery with the largest electric quantity.
According to the battery switching method of the electronic equipment, the available time of the currently used battery is calculated according to the average power consumption of the current working mode and the residual power of the currently used battery, when the available time is insufficient, the appropriate first battery can be automatically switched to supply power for the electronic equipment, the battery can be automatically switched in time at appropriate time, the electric quantity of the battery can be effectively utilized, the continuous work of the electronic equipment is maintained, and the switching method is scientific, reasonable and flexible, and can prolong the service life of the battery.
As shown in fig. 4, the battery switching method of the electronic device according to another embodiment of the present application further includes the following steps based on steps S10 to S50 of the embodiment shown in fig. 1:
s60, detecting the current residual electric quantity of each first battery.
In some embodiments, step S60 may be to periodically detect the current remaining power of each of the first batteries based on a second preset detection period.
Specifically, the second preset detection period may be set to 20 minutes, for example, and the current remaining power of each first battery is detected every 20 minutes.
In some embodiments, step S60 may also be performed in a non-periodic detection manner, and may be specifically selected or set according to actual needs.
S70, calculating all second time lengths of each first battery according to the corresponding power consumption in each working mode and the current residual electric quantity of each first battery; the second duration of the first battery is the available time of the first battery in the corresponding working mode.
Specifically, the time a first battery is available in an operating mode is equal to the quotient of the current remaining capacity of the first battery divided by the average power consumption of the operating mode.
Second time period t=q Residual of /P Average of ;Q Residual of Representing the current residual capacity of the first battery, P Average of Representing the average power consumption of this mode of operation.
All the second time lengths of each first battery are calculated through the steps.
And S80, judging whether all second time lengths of each first battery are smaller than or equal to a second preset threshold value or not respectively, and if yes, sending out a signal for prompting the first battery to be charged.
Specifically, the second preset threshold may be set to 10 minutes, for example, if all the second durations of a first battery are less than or equal to 10 minutes, it indicates that the first battery is not able to last for more than 10 minutes when power is supplied to any one of the working modes, and at this time, a signal prompting to charge the first battery is sent.
Through periodically detecting the residual electric quantity of the first battery, a signal for prompting charging is sent out when the residual electric quantity of the first battery can not meet the actual application requirement, so that a user can charge the first battery in time, the first battery is ensured to be kept in a usable state, and the situation that the first battery is lack of a proper first battery when the battery is required to be switched due to the fact that the first battery is not charged in time can be avoided.
In another embodiment of the present application, based on the embodiment shown in fig. 4, the method of the present embodiment further includes:
s90, when an instruction for switching the working mode is received, calculating a third duration according to the corresponding power consumption of the working mode to be switched and the residual capacity of the currently used battery; and the third duration is the available time of the currently used battery in the working mode to be switched.
The instruction to switch the operation mode may be, for example, a pressing signal of a user's finger pressing a button on the electronic device for instructing to switch the operation mode, or another form of instruction signal input to the electronic device by the user. For example, assuming that the electronic device is currently in the first operation mode, when the electronic device receives a pressing signal indicating to switch to the second operation mode, the electronic device calculates a third duration, that is, a duration of the currently used battery in the second operation mode according to the corresponding power consumption of the second operation mode and the remaining power of the currently used battery.
S100, judging whether the third duration is greater than a third preset threshold value, if not, selecting a battery with the largest electric quantity from all the first batteries, and replacing the currently used battery with the largest electric quantity to supply power for the electronic equipment while or before switching the working mode; if the third time length is greater than a third preset threshold value, the battery is not switched.
If the third duration is less than or equal to the third preset threshold, which means that the available time of the currently used battery in the second working mode is insufficient and the battery needs to be replaced, selecting the battery with the highest electric quantity from all the first batteries, and replacing the currently used battery with the highest electric quantity when or before the working mode is switched, so as to supply the power to the electronic equipment after the working mode is switched. If the third time period is longer than the third preset threshold value, the available time of the currently used battery in the second working mode is enough, and battery switching is not needed.
Another embodiment of the present application provides a battery switching device of an electronic device, where the electronic device has multiple operation modes, and the electronic device includes multiple batteries; the electronic device may be, for example, a VR device or the like.
As shown in fig. 5, the battery switching device includes:
the acquisition module is used for acquiring the corresponding power consumption of the electronic equipment in each working mode;
the first detection module is used for detecting the current working mode and the residual electric quantity of the current used battery;
the first calculation module is used for calculating a first duration according to the corresponding power consumption of the current working mode and the residual electric quantity; the first duration is the available time of the currently used battery;
the first judging module is used for judging whether the first time length is smaller than or equal to a first preset threshold value, if yes, a signal for prompting to switch the battery is sent out, and if not, the step executed by the first detecting module is turned to;
the switching module is used for selecting the battery with the highest electric quantity from all the first batteries to replace the currently used battery to supply power for the electronic equipment according to the signal for prompting to switch the batteries; wherein the first battery is a battery other than the currently used battery among the plurality of batteries.
As shown in fig. 6, the battery switching device according to another embodiment of the present application, on the basis of the embodiment shown in fig. 5, further includes:
the second detection module is used for detecting the current residual electric quantity of each first battery;
the second calculation module is used for calculating all second duration of each first battery according to the corresponding power consumption in each working mode and the current residual electric quantity of each first battery; the second duration of the first battery is the available time of the first battery in the corresponding working mode;
and the second judging module is used for respectively judging whether all second time lengths of each first battery are smaller than or equal to a second preset threshold value, and if yes, sending a signal for prompting the first battery to be charged.
As shown in fig. 7, in some embodiments, the acquisition module includes:
a detection recording unit for periodically detecting and recording the current working mode and the residual electricity value of the currently used battery in the current working mode based on a third preset detection period;
the calculating unit is used for calculating the average power consumption of the current working mode according to the third preset detection period and all the recorded residual electric quantity values when the recorded times reach a preset time threshold; the average power consumption is the corresponding power consumption in the current working mode.
As shown in fig. 8, in some embodiments, the computing unit includes:
a first calculation subunit for calculating an absolute value of a difference between two of the remaining electric power values of each adjacent record;
the second calculating subunit is used for dividing each absolute value by the third preset detection period to obtain each initial power consumption;
and the third calculation subunit is used for calculating the average value of the initial power consumption to obtain the average power consumption of the current working mode.
Another embodiment of the present application provides a battery switching device, which further includes, based on the embodiment shown in fig. 6:
the third calculation module is used for calculating a third duration according to the corresponding power consumption of the working mode to be switched and the residual electric quantity of the currently used battery when receiving the command for switching the working mode; the third duration is the available time of the currently used battery in the working mode to be switched;
the third judging module is used for judging whether the third duration is greater than a third preset threshold value or not;
the switching module is used for selecting the battery with the largest electric quantity from all the first batteries if not, and replacing the currently used battery with the largest electric quantity to supply power for the electronic equipment while or before the working mode is switched; if the third time length is greater than a third preset threshold value, the battery is not switched.
Another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the program to implement the battery switching method of the electronic device according to any one of the foregoing embodiments. As shown in fig. 9, the electronic device 10 may include: a processor 100, a memory 101, a bus 102 and a communication interface 103, the processor 100, the communication interface 103 and the memory 101 being connected by the bus 102; the memory 101 stores a computer program that can be executed on the processor 100, and the processor 100 executes the battery switching method of the electronic device according to any one of the foregoing embodiments of the present application when executing the computer program.
The memory 101 may include a high-speed random access memory (RAM: random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and the at least one other network element is implemented via at least one communication interface 103 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 102 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. The memory 101 is configured to store a program, and the processor 100 executes the program after receiving an execution instruction, and the method disclosed in any of the foregoing embodiments of the present application may be applied to the processor 100 or implemented by the processor 100.
The processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 100 or by instructions in the form of software. The processor 100 may be a general-purpose processor, and may include a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), and the like; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and, in combination with its hardware, performs the steps of the method described above.
In some embodiments, the electronic device is a head-mounted display device comprising a head-mounted host housing a display screen and a rear head-mounted for securing the head-mounted host to a user's head, wherein at least one of the plurality of batteries is disposed in the head-mounted host and/or the rear head-mounted.
In some embodiments, the electronic device is an eyeglass comprising a frame and two temples extending outwardly from opposite ends of the frame, wherein at least one of the plurality of batteries is disposed on one of the temples.
The electronic device provided by the embodiment of the application and the method provided by the embodiment of the application are the same in the invention conception, and have the same beneficial effects as the method adopted, operated or realized by the electronic device.
Another embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, where the program is executed by a processor to implement the battery switching method of an electronic device according to any one of the above embodiments. Referring to fig. 10, a computer readable storage medium is shown as an optical disc 20, on which a computer program (i.e., a program product) is stored, which when executed by a processor, performs the battery switching method of the electronic device according to any of the foregoing embodiments.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
The computer readable storage medium provided by the above-described embodiments of the present application has the same advantageous effects as the method adopted, operated or implemented by the application program stored therein, for the same inventive concept as the method provided by the embodiments of the present application.
It should be noted that:
the term "module" is not intended to be limited to a particular physical form. Depending on the particular application, modules may be implemented as hardware, firmware, software, and/or combinations thereof. Furthermore, different modules may share common components or even be implemented by the same components. There may or may not be clear boundaries between different modules.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may also be used with the examples herein. The required structure for the construction of such devices is apparent from the description above. In addition, the present application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and the above description of specific languages is provided for disclosure of preferred embodiments of the present application.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing examples merely represent embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (9)

1. A battery switching method of an electronic device, wherein the electronic device has a plurality of operation modes, and the electronic device comprises a plurality of batteries; the method comprises the following steps:
detecting the current working mode and the residual electric quantity of the current used battery;
calculating a first duration according to the corresponding power consumption of the current working mode and the residual electric quantity; the first duration is the available time of the currently used battery;
judging whether the first time length is smaller than or equal to a first preset threshold value;
if yes, the battery with the highest electric quantity is selected from all the first batteries to replace the currently used battery to supply power for the electronic equipment; wherein the first battery is a battery other than the currently used battery among the plurality of batteries;
detecting the current residual electric quantity of each first battery;
calculating all second time lengths of each first battery according to the corresponding power consumption in each working mode and the current residual quantity of each first battery; the second duration of the first battery is the available time of the first battery in the corresponding working mode;
and respectively judging whether all second time lengths of each first battery are smaller than or equal to a second preset threshold value, and if yes, sending out a signal prompting the first battery to be charged.
2. The method of claim 1, wherein prior to said calculating a first time period from the respective power consumption of the current operating mode and the remaining power, the method further comprises:
detecting and recording the current working mode and the residual electricity value of the currently used battery in the current working mode;
when the recorded times reach a preset time threshold, calculating the average power consumption of the current working mode according to a third preset detection period and all recorded residual electric quantity values; the average power consumption is the corresponding power consumption in the current working mode.
3. The method according to claim 2, wherein calculating the average power consumption of the current operation mode according to the third preset detection period and all the recorded remaining power values comprises:
calculating the absolute value of the difference between the two residual electric quantity values of each adjacent record;
dividing each absolute value by the third preset detection period to obtain each initial power consumption;
and calculating the average value of the initial power consumption to obtain the average power consumption of the current working mode.
4. The method according to claim 1, wherein the method further comprises:
when an instruction for switching the working mode is received, calculating a third duration according to the corresponding power consumption of the working mode to be switched and the residual capacity of the currently used battery; the third duration is the available time of the currently used battery in the working mode to be switched;
and judging whether the third duration is greater than a third preset threshold value, if not, selecting the battery with the largest electric quantity from all the first batteries, and replacing the currently used battery with the largest electric quantity to supply power for the electronic equipment while or before the working mode is switched.
5. A battery switching device of an electronic device, wherein the electronic device has a plurality of operation modes, and the electronic device comprises a plurality of batteries; the device comprises:
the detection module is used for detecting the current working mode and the residual electric quantity of the current used battery;
the calculation module is used for calculating a first duration according to the corresponding power consumption of the current working mode and the residual electric quantity; the first duration is the available time of the currently used battery;
the judging module is used for judging whether the first time length is smaller than or equal to a first preset threshold value;
the switching module is used for selecting the battery with the highest electric quantity from all the first batteries to replace the currently used battery to supply power for the electronic equipment if the battery is used; wherein the first battery is a battery other than the currently used battery among the plurality of batteries;
the second detection module is used for detecting the current residual electric quantity of each first battery;
the second calculation module is used for calculating all second duration of each first battery according to the corresponding power consumption in each working mode and the current residual electric quantity of each first battery; the second duration of the first battery is the available time of the first battery in the corresponding working mode;
and the second judging module is used for respectively judging whether all second time lengths of each first battery are smaller than or equal to a second preset threshold value, and if yes, sending a signal for prompting the first battery to be charged.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method of any of claims 1-4.
7. The device of claim 6, wherein the electronic device is a head mounted display device comprising a head mounted host housing a display screen and a rear head mounted for securing the head mounted host to a user's head, wherein at least one of the plurality of batteries is disposed at the head mounted host and/or the rear head mounted.
8. The device of claim 6, wherein the electronic device is an eyeglass comprising a frame and two temples extending outwardly from opposite ends of the frame, wherein at least one of the plurality of batteries is disposed on one of the temples.
9. A computer readable storage medium having stored thereon a computer program, characterized in that the program is executed by a processor to implement the method according to any of claims 1-4.
CN202111256840.0A 2021-10-27 2021-10-27 Battery switching method and device of electronic equipment, electronic equipment and medium Active CN114142548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111256840.0A CN114142548B (en) 2021-10-27 2021-10-27 Battery switching method and device of electronic equipment, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111256840.0A CN114142548B (en) 2021-10-27 2021-10-27 Battery switching method and device of electronic equipment, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN114142548A CN114142548A (en) 2022-03-04
CN114142548B true CN114142548B (en) 2024-01-30

Family

ID=80394578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111256840.0A Active CN114142548B (en) 2021-10-27 2021-10-27 Battery switching method and device of electronic equipment, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114142548B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003079067A (en) * 2001-08-31 2003-03-14 Internatl Business Mach Corp <Ibm> Electric device, computer device, charging method in electric device, and charging method in computer device, and program
CN103199310A (en) * 2013-02-05 2013-07-10 北京奇虎科技有限公司 Battery power guaranteeing method and battery power guaranteeing apparatus for portable electronic product, and mobile terminal
CN106612000A (en) * 2015-12-31 2017-05-03 北京数科技有限公司 Power supply method and power supply device
CN107037367A (en) * 2017-01-13 2017-08-11 孔文欣 Battery uses the measuring method and measuring system of electricity
CN108055386A (en) * 2017-10-30 2018-05-18 捷开通讯(深圳)有限公司 Mobile terminal and its management method, storage device
CN110365851A (en) * 2019-08-01 2019-10-22 Oppo(重庆)智能科技有限公司 Method of supplying power to and Related product
WO2019210678A1 (en) * 2018-05-04 2019-11-07 深圳市道通智能航空技术有限公司 Battery power consumption control method and apparatus, and unmanned aerial vehicle
CN111629299A (en) * 2020-06-05 2020-09-04 歌尔科技有限公司 TWS earphone, and battery replacement method, device and medium thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003079067A (en) * 2001-08-31 2003-03-14 Internatl Business Mach Corp <Ibm> Electric device, computer device, charging method in electric device, and charging method in computer device, and program
CN103199310A (en) * 2013-02-05 2013-07-10 北京奇虎科技有限公司 Battery power guaranteeing method and battery power guaranteeing apparatus for portable electronic product, and mobile terminal
CN106612000A (en) * 2015-12-31 2017-05-03 北京数科技有限公司 Power supply method and power supply device
CN107037367A (en) * 2017-01-13 2017-08-11 孔文欣 Battery uses the measuring method and measuring system of electricity
CN108055386A (en) * 2017-10-30 2018-05-18 捷开通讯(深圳)有限公司 Mobile terminal and its management method, storage device
WO2019210678A1 (en) * 2018-05-04 2019-11-07 深圳市道通智能航空技术有限公司 Battery power consumption control method and apparatus, and unmanned aerial vehicle
CN110365851A (en) * 2019-08-01 2019-10-22 Oppo(重庆)智能科技有限公司 Method of supplying power to and Related product
CN111629299A (en) * 2020-06-05 2020-09-04 歌尔科技有限公司 TWS earphone, and battery replacement method, device and medium thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
准确测量便携式设备电池剩余电量;飞兆半导体;中国电子商情(基础电子)(第10期);第65-67页 *
基于NFC技术和短距离无线通信技术在智能抄表中的应用;谷江涛;王颖;孙经;徐英;;自动化与仪器仪表(第12期);第61-63页 *

Also Published As

Publication number Publication date
CN114142548A (en) 2022-03-04

Similar Documents

Publication Publication Date Title
KR102546255B1 (en) Storage device initiating maintenance operation actively without instruction of host and electronic system including the same
CN101154190B (en) Mapping information managing apparatus and method
EP3050708A1 (en) Storage chip, imaging cartridge, method for changing a serial number and method of using storage chip
CN109683696A (en) Fault of server power supply detection system, method, apparatus, equipment and medium
CN107797642B (en) power backup method and device
US8402204B2 (en) Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same
US20180159342A1 (en) Electronic device and method for controlling battery of the electronic device to charge and discharge
JP2017537369A (en) Data storage method, apparatus and terminal
CN107515731B (en) Evolution storage system based on solid-state disk and working method thereof
US11502529B2 (en) Battery charging method employing historical data
CN111142644A (en) Hard disk operation control method and device and related components
CN109683983B (en) Method and equipment for generating and loading mirror image file
CN106648016B (en) Power supply circuit, power supply equipment and power supply method
CN114142548B (en) Battery switching method and device of electronic equipment, electronic equipment and medium
CN105739982A (en) System hibernation method and apparatus
CN111124094A (en) Server hard disk power-on and power-off control method, control device and control equipment
CN102360300B (en) Starting method and device of operation system
CN105677233B (en) The storage method and storage device of instant data
CN111798905B (en) Method, system, storage medium and terminal for reducing programming time of non-flash memory
CN104460938B (en) System-wide power conservation method and system using memory cache
CN109542351B (en) Power consumption control method of solid state disk and solid state disk
CN111475343B (en) Computer state outage restoration method and device and terminal equipment
TWI497274B (en) Rack and power controlling method thereof
CN112912743B (en) Calculation force control method, device, equipment and storage medium
CN108874318B (en) Data recovery method of solid state disk and solid state disk

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant