Dual-battery serial power supply method, battery module, earphone device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of earphones, in particular to a double-battery serial power supply method, a battery module, earphone equipment and a storage medium.
Background
Neck-wearing type bluetooth headset, it has a neck area to link to each other to indicate between two earphones about, and the neck area is hung on the neck when wearing, is the bluetooth headset of a common type on the existing market. Compared with other types of Bluetooth earphones, the neck-worn Bluetooth earphone not only can be worn and used in all weather morphologically, but also can be used for placing a battery with larger capacity inside the neck strap, provides more spaces for complex circuit design, and can also enable a user to obtain better experience in wearing, tone quality and functions.
However, the current neck-wearing type bluetooth earphones adopt a single battery power supply design, and although the power supply time of the neck-wearing type bluetooth earphones has certain advantages compared with other types of bluetooth earphones, the power supply time of the neck-wearing type bluetooth earphones still cannot meet the requirement of a user on using the earphones for a long time; in addition, when the electric quantity of the single battery is exhausted, the single battery needs to be taken down or the single battery needs to be charged through the USB interface on the connecting belt, and the earphone cannot be normally used in the charging process due to the two charging modes.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a dual-battery serial power supply method, a battery module, an earphone device and a storage medium, so as to solve the problems that the above single-battery power supply scheme cannot meet the requirement of a user on using an earphone for a long time and the earphone cannot be used normally during charging.
The technical scheme adopted by the embodiment of the invention for solving the technical problems is as follows:
according to a first aspect of the embodiments of the present invention, a dual-battery serial power supply method is provided, which is applied to an earphone device, where the earphone device includes an earphone component and a dual-battery component for providing a power supply for the earphone component, and the dual-battery component includes a first battery module and a second battery module; one end of the second battery module is electrically connected with the earphone component, and the other end of the second battery module is electrically connected with the first battery module in a pluggable manner; the double-battery serial power supply method comprises the following steps of adopting the second battery module to execute:
when the earphone equipment runs, supplying power to the earphone assembly, monitoring the electric quantity of a battery of the earphone assembly in real time, and judging whether the first battery module is on line or not when the electric quantity is smaller than a first preset threshold value;
if the first battery module is on line, sending an electric quantity request signal to the first battery module; the electric quantity request signal is used for triggering the first battery module to supplement the electric quantity to the second battery module.
Wherein, the judging whether the first battery module is on-line comprises:
monitoring whether an access signal generated when the first battery module is plugged is received in real time in the running process of the earphone equipment;
if the access signal is received, an online confirmation signal is sent to the first battery module, and whether an online signal fed back by the first battery module is received within a preset time is judged;
and if the online signal fed back by the first battery module is received within the preset time and the confirmation times exceed the preset times, judging that the first battery module is online.
Wherein, if the first battery module is online, then still include after sending electric quantity request signal to the first battery module:
when the situation that the electric quantity of the battery in the second battery module is larger than a second preset electric quantity threshold value is monitored, an electric quantity ending request signal is sent to the first battery module; and the electric quantity ending request signal is used for triggering the first battery module to stop supplementing the electric quantity to the second battery module.
The first battery module and the second battery module are connected through Bluetooth; if the first battery module is online, the method further comprises the following steps after sending the electric quantity request signal to the first battery module:
monitoring whether the first battery module is off-line;
if the first battery module is offline, sending a power ending request signal to the first battery module through Bluetooth connection; and the electric quantity ending request signal is used for triggering the first battery module to be switched from a discharging state to a charging state.
Wherein, whether monitoring first battery module off-line includes:
monitoring whether a pulling-out signal generated when the first battery module is pulled out is received;
if the pulling-out signal is received, sending an off-line confirmation signal to the first battery module, and judging whether an off-line signal fed back by the first battery module is received within a preset time;
and if the offline signal fed back by the first battery module is received within the preset time and the confirmation times exceed the preset times, determining that the first battery module is offline.
Wherein, when earphone equipment moves, for earphone subassembly power supply to the electric quantity of real-time supervision self battery, when the electric quantity is less than first preset threshold value, judge whether first battery module still includes after online:
if first battery module off-line, then output low power alarm information.
According to a second aspect of the embodiments of the present invention, there is provided a dual-battery serial power supply method, applied to an earphone device, where the earphone device includes an earphone component and a dual-battery component for providing a power supply for the earphone component, and the dual-battery component includes a first battery module and a second battery module; one end of the second battery module is electrically connected with the earphone component, and the other end of the second battery module is electrically connected with the first battery module in a pluggable manner; the double-battery serial power supply method comprises the following steps of adopting the first battery module to execute:
detecting whether the second battery module is on line or not;
and if the second battery module is online, controlling the first battery module to enter a discharging state when receiving an electric quantity request signal sent by the second battery module, and charging the second battery module.
Wherein, whether the second battery module of detection is online includes:
after the first battery module is powered on, monitoring whether an access signal generated when the second battery module is plugged is received in real time;
if the access signal is received, an online confirmation signal is sent to the second battery module, and whether an online signal fed back by the second battery module is received within a preset time is judged;
and if the online signal fed back by the second battery module is received within the preset time and the confirmation times exceed the preset times, judging that the second battery module is online.
If the second battery module is online, the first battery module is controlled to enter a discharging state when receiving an electric quantity request signal sent by the second battery module, and the method further comprises the following steps after the second battery module is charged:
monitoring whether an electric quantity finishing request signal sent by the second battery module is received;
and if an electric quantity ending request signal sent by the second battery module is received, controlling the first battery module to stop discharging outwards.
If the second battery module is online, the first battery module is controlled to enter a discharging state when receiving an electric quantity request signal sent by the second battery module, and the method further comprises the following steps after the second battery module is charged:
monitoring whether the second battery module is off-line;
and if the second battery module is offline, controlling the first battery module to stop discharging outwards, and controlling the first battery module to enter a power supplementing state after a preset time.
Wherein, first battery module with establish the bluetooth connection between the second battery module, monitoring whether the second battery module off-line includes:
monitoring whether a pulling-out signal generated when the second battery module is pulled out is received;
if the pulling-out signal is received, sending an off-line confirmation signal to the second battery module through Bluetooth connection, and judging whether the off-line signal fed back by the second battery module is received within preset time;
and if the offline signal fed back by the second battery module is received within the preset time and the confirmation times exceed the preset times, determining that the second battery module is offline.
A third aspect of the embodiments of the present invention provides a battery module, including a second processor, a second battery electrically connected to the second processor, a second USB interface, a power management unit having a control terminal connected to the second processor, a power terminal connected to the battery, a charging terminal connected to the second USB interface, a power supply terminal connected to an earphone assembly, and a second detection unit connected between the second processor and the second USB interface; the battery module further includes:
a second memory and a second computer program stored on the second memory and executable on the second processor, the second computer program, when executed by the second processor, implementing the steps of the dual battery serial power supply method according to any of the first aspect.
A fourth aspect of the present invention provides a battery module, including a first processor, a first battery electrically connected to the first processor, and a first USB interface, further including: the control end is connected to the first processor, the input end is connected to the first battery, and the output end is connected to the discharge unit of the first USB interface; the control end is connected to the first processor, the input end is connected to the first USB interface, and the output end is connected to the power supplementing unit of the first battery; and a first detection unit connected between the first processor and the first USB interface; the battery module further includes:
a first memory and a first computer program stored on the first memory and executable on the first processor, the first computer program, when executed by the first processor, implementing the steps of the dual battery serial power supply method according to any of the second aspects.
A fifth aspect of the embodiments of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the dual-battery serial power supply method according to any of the first aspect are implemented; and/or implementing the steps of the dual battery serial power supply method as described in any of the second aspects above.
A sixth aspect of the present invention provides an earphone device, where the earphone device includes an earphone component and a dual battery component for providing a power supply to the earphone component, where the dual battery component includes a first battery module and a second battery module; one end of the second battery module is electrically connected with the earphone component, and the other end of the second battery module is electrically connected with the first battery module in a pluggable manner; the first battery module is the battery module of the fourth aspect; the second battery module is the battery module according to the third aspect.
According to the double-battery serial power supply method, the battery module, the earphone device and the storage medium provided by the embodiment of the invention, due to the adoption of the double-battery module, the second battery module is adopted to supply power to the earphone when the earphone works normally, and when the electric quantity of the battery in the second battery module is lower than the first preset electric quantity threshold value, the electric quantity request signal is sent to the first battery module, so that the first battery module supplements the electric quantity to the second module, and the endurance time of the earphone device can be prolonged; because first battery module and second battery module adopt but plug electric connection, and break away from as first battery module when the second battery module adopts external equipment to charge to first battery module, the second battery module can continue to provide the power for earphone equipment, makes earphone equipment normal operating, consequently can realize the limit and charge the limit and supply the user to use, has promoted user experience.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a block diagram showing the structure of an earphone device in the embodiment of the present invention;
fig. 2 is a schematic structural view illustrating a first battery module and a second battery module in the earphone device of fig. 1;
fig. 3 is a schematic flowchart illustrating a specific implementation flow of a dual-battery serial power supply method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a specific implementation of a dual-battery serial power supply method according to a second embodiment of the present invention;
fig. 5 is a schematic flowchart of a specific implementation of a dual-battery serial power supply method according to a third embodiment of the present invention;
fig. 6 is a schematic flowchart of a specific implementation of a dual-battery serial power supply method according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a hard-soft combination of a first battery module according to a fifth embodiment of the present invention;
fig. 8 is a schematic diagram of the hardware and structure of a second battery module according to a sixth embodiment of the present invention;
fig. 9 is a schematic structural diagram of a neck-wearing earphone device according to a seventh embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 is a block diagram showing the structure of an earphone device in the embodiment of the present invention. Only the portions related to the present embodiment are shown for convenience of explanation.
Referring to fig. 1, the earphone device 100 in the present embodiment includes an earphone assembly 3 and a dual battery assembly for supplying power to the earphone assembly 3, the dual battery assembly including a first battery module 1 and a second battery module 2; one end of the second battery module 2 is electrically connected with the earphone component 3, and the other end of the second battery module is electrically connected with the first battery module 1 in a pluggable manner.
Further, referring to fig. 2, the first battery module 1 includes a first processor 11, a first battery 12 electrically connected to the first processor 11, and a first USB interface 16, and further includes: a discharge unit 14 having a control terminal connected to the first processor 11, an input terminal connected to the first battery 12, and an output terminal connected to the first USB interface 16; a power compensation unit 13 having a control terminal connected to the first processor 11, an input terminal connected to the first USB interface 16, and an output terminal connected to the first battery 12; and a first detection unit 15 connected between the first processor 11 and the first USB interface 16.
Further, referring to fig. 2, the second battery module 2 includes a second processor 21, a second battery 22 and a second USB interface 25 electrically connected to the second processor 21, a control terminal connected to the second processor 21, a power terminal connected to the second battery, a charging terminal connected to the second USB interface 25, a power supply terminal connected to the headset assembly 3, and a second detecting unit 24 connected between the second processor 21 and the second USB interface 25.
The first battery module 1 is connected with the second USB interface 25 of the second battery module 2 through the first USB interface 16 in a pluggable manner. Preferably, the first USB interface 16 and the second USB interface 25 may be type-c interfaces. The earphone component 3 comprises a left earphone and a right earphone, and the left earphone and the right earphone are electrically connected with a power supply end of a power supply management unit 23 in the second battery module 2.
Based on the structure of the above-described ear speaker device 100, the following embodiments of the present invention are proposed.
Example one
Fig. 3 is a flowchart illustrating an implementation of a dual-battery serial power supply method according to an embodiment of the present invention, where an execution main body of the method is the second processor 21 in the second battery module 2 shown in fig. 2. Referring to fig. 3, the dual-battery serial power supply method provided in this embodiment includes:
step S301, when the earphone device 100 is operated, supplying power to the earphone assembly 3, monitoring the electric quantity of the battery in real time, and when the electric quantity is smaller than a first preset threshold, determining whether the first battery module 1 is online.
In this embodiment, when the earphone device 100 operates, the second processor 21 controls the power management unit 23 to convert the output voltage of the second battery 22 into the working voltage required by the earphone assembly 3, so as to supply power to the earphone assembly 3, and meanwhile, the second processor 21 may monitor the electric quantity of the second battery 22 in real time, and when the electric quantity of the second battery 22 is smaller than a first preset threshold, determine whether the first battery module 1 is online. Wherein the first preset threshold value can be configured or modified by a user.
Preferably, in this embodiment, the determining whether the first battery module 1 is online includes:
monitoring whether an access signal generated when the first battery module 1 is plugged is received in real time in the operation process of the earphone device 100;
if the access signal is received, an online confirmation signal is sent to the first battery module 1, and whether an online signal fed back by the first battery module 1 is received within a preset time is judged;
and if the online signal fed back by the first battery module 1 is received within the preset time and the confirmation times exceed the preset times, judging that the first battery module 1 is online.
In this embodiment, when the first USB interface 16 of the first battery module 1 is inserted into the second USB interface 25 of the second battery module 2, the second detecting unit 24 generates an access signal and sends the access signal to the second processor 21, and when the second processor 21 receives the access signal, the second detecting unit 24 is controlled to send an on-line confirmation signal to the first battery module 1 through the second USB interface 25; when receiving the online confirmation signal, the first battery module 1 detects whether the second battery module 2 is online, and if so, feeds an online signal back to the second battery module 2; if the second battery module 2 receives the on-line signal fed back by the first battery module 1 within the preset time, it indicates that the on-line confirmation is successful, at this time, the second battery module 2 returns to the step of sending the on-line confirmation signal to the first battery module 1, and it is determined that the first battery module 1 is on-line until the confirmation times exceed the preset times. Preferably, in a preferred implementation example, the preset number of times is 3. In the embodiment, as repeated bidirectional confirmation is adopted, the judgment result is more accurate.
Step S302, if the first battery module 1 is on-line, sending an electric quantity request signal to the first battery module 1; the electric quantity request signal is used for triggering the first battery module 1 to supplement the electric quantity to the second battery module 2.
In this embodiment, if the second processor 21 determines that the first battery module 1 is online, the power management chip is controlled to send a power request signal to the first battery module 1 through the second USB interface 25, the first battery module 1 receives the power request signal through the first USB interface 16, and passes the circuit request signal to the first processor 11 via the first detection unit 15, the first processor 11 controls the discharging unit 14 to enter a discharging state after receiving the power amount request signal, the second battery module 2 is charged with the electric quantity through the first USB interface 16, and the second battery module 2 receives the charged electric quantity through the second USB interface 25 and converts the charged electric quantity into the voltage required by charging the second battery 22 through the power management unit 23, so as to charge the second battery 22.
Preferably, in this embodiment, after step S302, the method may further include:
when the situation that the electric quantity of the battery in the second battery module 2 is larger than a second preset electric quantity threshold value is monitored, an electric quantity ending request signal is sent to the first battery module 1; the electric quantity ending request signal is used for triggering the first battery module 1 to stop supplementing the electric quantity to the second battery module 2.
In this embodiment, in the process of charging the second battery module 2 by the first battery module 1, the second processor 21 may monitor the electric quantity of the second battery 22 in the second battery module 2 in real time, and when the electric quantity of the second battery 22 reaches the second preset electric quantity threshold, it indicates that the electric quantity of the second battery 22 is sufficient, and at this time, the second processor 21 controls the power management chip to send an electric quantity ending request signal to the first battery module 1 through the second USB interface 25, and triggers the second battery module 2 to stop charging the first battery module 1, so that quantitative power compensation can be achieved.
As can be seen from the above, in the dual-battery serial power supply method provided in this embodiment, the second battery module 2 is adopted to supply power to the earphone when the earphone normally works, and when the electric quantity of the battery in the second battery module 2 is lower than the first preset electric quantity threshold, the electric quantity request signal is sent to the first battery module 1, so that the first battery module 1 supplements the electric quantity to the second battery module 2, and the duration of the earphone device 100 can be prolonged; in addition, because first battery module 1 and second battery module 2 adopt but plug electric connection, consequently can break away from at first battery module 1 during second battery module 2, adopt external equipment when charging to first battery module 1 to continue to adopt second battery module 2 can continue to provide the power for earphone equipment 100, make earphone equipment 100 normal operating, consequently can realize the function that supplies the user to use while charging, promoted user experience.
Example two
Fig. 4 is a flowchart illustrating an implementation of the dual-battery serial power supply method according to the second embodiment of the present invention, where an execution main body of the method is the second processor 21 in the second battery module 2 shown in fig. 2. Referring to fig. 4, the dual-battery serial power supply method provided in this embodiment includes:
step S401, when the earphone device 100 is operated, supplying power to the earphone assembly 3, monitoring the electric quantity of the battery in real time, and when the electric quantity is smaller than a first preset threshold, determining whether the first battery module 1 is online.
Step S402, if the first battery module 1 is on-line, sending an electric quantity request signal to the first battery module 1; the electric quantity request signal is used for triggering the first battery module 1 to supplement the electric quantity to the second battery module 2.
It should be noted that, since the implementation manners of the step S401 to the step S402 are completely the same as the implementation manners of the step S301 to the step S302 in the previous embodiment, the detailed description thereof is omitted.
Compared with the previous embodiment, in the present embodiment, a bluetooth connection is also established between the first battery module 1 and the second battery module 2. The step S402 is followed by:
step S403, monitoring whether the first battery module 1 is offline.
In this embodiment, the monitoring whether the first battery module 1 is offline specifically includes:
monitoring whether a pulling-out signal generated when the first battery module 1 is pulled out is received;
if the pulling-out signal is received, sending an offline confirmation signal to the first battery module 1, and judging whether an offline signal fed back by the first battery module 1 is received within a preset time;
and if the offline signal fed back by the first battery module 1 is received within the preset time and the confirmation times exceed the preset times, determining that the first battery module 1 is offline.
In this embodiment, when the first USB interface 16 of the first battery module 1 is pulled out from the second USB interface 25 of the second battery module 2, the second detecting unit 24 generates a pull-out signal and sends the pull-out signal to the second processor 21, and when the second processor 21 receives the pull-out signal, the second processor sends an offline confirmation signal to the first battery module 1 through bluetooth; when the first battery module 1 receives the offline confirmation signal through bluetooth, the first processor 11 is triggered to detect whether the second battery module 2 is offline, and if the offline confirmation signal is offline, an offline signal is fed back to the second battery module 2 through bluetooth; if the second battery module 2 receives the offline signal fed back by the first battery module 1 within the preset time, it indicates that the offline is successfully confirmed, at this time, the second battery module 2 returns to the step of sending the offline confirmation signal to the first battery module 1 through bluetooth, and it is determined that the first battery module 1 is offline until the confirmation times exceed the preset times. Preferably, in a preferred implementation example, the preset number of times is 3. In the embodiment, as repeated bidirectional confirmation is adopted, the judgment result is more accurate.
Step S404, if the first battery module 1 is off-line, sending a power ending request signal to the first battery module 1 through Bluetooth connection; the electric quantity ending request signal is used for triggering the first battery module 1 to switch from a discharging state to a charging state.
In this embodiment, when the second processor 21 of the second battery module 2 detects that the first battery module 1 is offline, the power management unit 23 is controlled to send a power request ending signal to the first battery module 1 through bluetooth, so that the first battery module 1 stops discharging to the outside, thereby avoiding unnecessary waste of power in the first battery module 1.
Preferably, in this embodiment, after step S401, the method further includes:
if first battery module 1 off-line, then output low power alarm information.
In this embodiment, the second battery module 2 further includes an alarm device electrically connected to the second processor 21. In the operation process of the earphone device 100, if the electric quantity of the second battery module 2 is smaller than a first preset threshold value, the second processor 21 of the second battery module 2 detects that the first battery module 1 is offline, then the second processor 21 controls the alarm device to output low-electric-quantity alarm information so as to prompt a user to charge the second battery module 2 in time. The alarm devices include, but are not limited to, voice and/or LED light alarm devices.
Preferably, in this embodiment, after the outputting the low power alarm information, the method may further include: if the electric quantity of the second battery 22 in the second battery module 2 is monitored to be smaller than a second preset electric quantity threshold value, controlling the earphone device 100 to shut down. And the second preset electric quantity threshold value is smaller than the first preset electric quantity threshold value.
As can be seen from the above, the dual-battery serial method provided in this embodiment can also prolong the endurance time of the earphone device 100, achieve the function of providing users with the charging function, and improve the user experience; in addition, compared to the previous embodiment, the second battery module 2 in this embodiment monitors whether the first battery module 1 is offline in real time, and after the first battery module 1 is offline, sends the electric quantity ending request signal to the first battery module 1 through bluetooth connection, so that the first battery module 1 is quickly switched from the discharging state to the electricity supplementing state after being offline, thereby avoiding the waste of the electric quantity of the first battery module 1, and further improving the user experience.
EXAMPLE III
Fig. 5 is a schematic flowchart illustrating an implementation procedure of a dual-battery serial power supply method according to a third embodiment of the present invention, where an execution main body of the method is the first processor 11 in the first battery module 1 shown in fig. 2. Referring to fig. 5, the dual-battery serial power supply method provided in this embodiment includes:
step S501, detecting whether the second battery module 2 is online.
In this embodiment, the detecting whether the second battery module 2 is online specifically includes:
after the first battery module 1 is powered on, monitoring whether an access signal generated when the second battery module 2 is plugged is received in real time;
if the access signal is received, an online confirmation signal is sent to the second battery module 2, and whether an online signal fed back by the second battery module 2 is received within a preset time is judged;
and if the online signal fed back by the second battery module 2 is received within the preset time and the confirmation times exceed the preset times, judging that the second battery module 2 is online.
In this embodiment, after the first battery module 1 is powered on, when the second USB interface 25 of the second battery module 2 is connected to the first USB interface 16 of the first battery module 1, the first detecting unit 15 generates an access signal and sends the access signal to the first processor 11, when the first processor 11 receives the access signal, the first detecting unit 15 is controlled to send an online confirmation signal to the second battery module 2 through the first USB interface 16, after receiving the online confirmation signal, the second battery module 2 detects whether the first battery module 1 is online, and if so, feeds an online signal back to the first battery module 1; if the first battery module 1 receives the on-line signal fed back by the second battery module 2 within the preset time, the on-line confirmation is successful, at this time, the first battery module 1 returns to the step of sending the on-line confirmation signal to the first battery module 1, and the second battery module 2 is judged to be on-line until the confirmation times exceed the preset times. Preferably, in a preferred implementation example, the preset number of times is 3. In the embodiment, as repeated bidirectional confirmation is adopted, the judgment result is more accurate.
Step S502, if the second battery module 2 is online, the first battery module 1 is controlled to enter a discharging state when receiving the electric quantity request signal sent by the second battery module 2, and the second battery module 2 is charged.
In this embodiment, the first battery module 1 receives the power request signal sent by the second battery module 2 through the first USB interface 16, after the first processor 11 of the first battery module 1 receives the power request signal sent by the second battery module 2, the first processor 11 controls the discharging unit 14 to enter a discharging state, at this time, the discharging unit 14 outputs the voltage of the first battery 12 to the second battery module through the first USB interface 16, and the second battery module 2 receives the charging voltage output by the first USB interface 16 through the second USB interface 25, converts the charging voltage into the voltage required for charging the second battery 22 through the power management chip, and charges the second battery 22.
Preferably, in this embodiment, after step S502, the method further includes:
and monitoring whether an electric quantity ending request signal sent by the second battery module 2 is received.
And if the electric quantity ending request signal sent by the second battery module 2 is received, controlling the first battery module 1 to stop discharging outwards.
In this embodiment, when the second processor 21 of the second battery module 2 detects that the electric quantity of the second battery 22 reaches the second preset threshold, the power management unit 23 is controlled to send an electric quantity ending request signal to the first battery module 1 through the second USB interface 25, and after receiving the electric quantity ending request signal, the first processor 11 of the first battery module 1 controls the discharging unit 14 to switch from the discharging state to the sleep state.
As can be seen from the above, in the dual-battery serial power supply method provided in this embodiment, the first battery module 1 controls itself to enter the discharging state when receiving the power request signal sent by the second battery module 2, so as to charge the second battery module 2, so that the second battery module 2 continues to supply power to the earphone device 100, thereby prolonging the endurance time of the earphone device 100; because first battery module 1 and second battery module 2 are the plug connection, consequently can break away from at first battery module 1 during second battery module 2, adopt external equipment when charging to first battery module 1 to continue to adopt second battery module 2 to continue to provide the power for earphone equipment 100, make earphone equipment 100 normal operating, consequently can realize the function that supplies the user to use while charging, promoted user experience.
Example four
Fig. 6 is a schematic flowchart illustrating an implementation procedure of a dual-battery serial power supply method according to a fourth embodiment of the present invention, where an execution main body of the method is the first processor 11 in the first battery module 1 shown in fig. 2. Referring to fig. 6, the dual-battery serial power supply method provided in this embodiment includes:
step S601, detecting whether the second battery module 2 is online.
Step S602, if the second battery module 2 is online, the first battery module 1 is controlled to enter a discharging state when receiving the electric quantity request signal sent by the second battery module 2, so as to charge the second battery module 2.
It should be noted that, since the implementation manners of the steps S601 to S602 are completely the same as those of the steps S501 to S502 in the previous embodiment, the detailed description thereof is omitted.
Step S603, monitoring whether the second battery module 2 is offline.
In this embodiment, a bluetooth connection is established between the first battery module 1 and the second battery module 2, and monitoring whether the second battery module 2 is offline includes:
monitoring whether a pulling-out signal generated when the second battery module 2 is pulled out is received;
if the pulling-out signal is received, an off-line confirmation signal is sent to the second battery module 2 through Bluetooth connection, and whether an off-line signal fed back by the second battery module 2 is received within a preset time is judged;
and if the offline signal fed back by the second battery module 2 is received within the preset time and the confirmation times exceed the preset times, determining that the second battery module 2 is offline.
In this embodiment, when the first USB interface 16 of the first battery module 1 is pulled out from the second USB interface 25 of the second battery module 2, the first detecting unit 15 generates a pull-out signal and sends the pull-out signal to the first processor 11, and when the first processor 11 receives the pull-out signal, the first processor sends an offline confirmation signal to the second battery module 2 through bluetooth; when receiving the offline confirmation signal through bluetooth, the second battery module 2 triggers the second processor 21 to detect whether the first battery module 1 is offline, and if the offline confirmation signal is offline, the second battery module feeds an offline signal back to the first battery module 1 through bluetooth; if the first battery module 1 receives the offline signal fed back by the second battery module 2 within the preset time, it indicates that the offline is successfully confirmed, at this time, the first battery module 1 will return to the step of sending the offline confirmation signal to the second battery module 2 through bluetooth, and it is determined that the second battery module 2 is offline until the confirmation times exceed the preset times. Preferably, in a preferred implementation example, the preset number of times is 3. In the embodiment, as repeated bidirectional confirmation is adopted, the judgment result is more accurate.
Step S604, if the second battery module 2 is offline, controlling the first battery module 1 to stop discharging, and controlling the first battery module 1 to enter a power supplement state after a preset time.
In this embodiment, when the first processor 11 of the first battery module 1 determines that the second battery module 2 is offline, the discharging unit 14 is controlled to switch from the discharging state to the sleep state, and the power supplementing unit 13 is controlled to enter the power supplementing state after a preset time, so that the first battery module 1 can rapidly supplement the electric quantity after the first USB interface 16 detects that the external power device is connected. Wherein the preset time can be configured by a user. Preferably, the preset time is 50ms in a specific implementation example.
Compared with the previous embodiment, in the double-battery serial power supply method provided by this embodiment, since the second battery module 2 is monitored to be offline in real time in the process of charging the second battery module 2 by the first battery module 1, when the second battery module 2 is monitored to be offline, the first battery module 1 is controlled to stop discharging externally, and the first battery module 1 is controlled to enter the power supplementing state after the preset time, so that on one hand, the waste of the electric quantity of the first battery module 1 can be avoided, on the other hand, the first battery module 1 can be rapidly supplemented when the external power supply device is detected to be accessed, and the user experience is further improved.
EXAMPLE five
Fig. 7 is a schematic diagram illustrating a structure of a battery module according to a fifth embodiment of the present invention, in which the battery module is the second battery module 2 shown in fig. 1 and 2. Only the portions related to the present embodiment are shown for convenience of explanation.
Referring to fig. 7, the second battery module 2 provided in this embodiment includes a second processor 21, a second battery 22 and a second USB interface 25 electrically connected to the second processor 21, and further includes a power management unit 23 having a control terminal connected to the second processor 21, a power terminal connected to the battery, a charging terminal connected to the second USB interface 25, a power supply terminal connected to the earphone assembly 3, and a second detection unit 24 connected between the second processor 21 and the second USB interface 25; the second battery module 2 further includes:
a second memory 26 and a second computer program 27 stored in the second memory 26 and operable on the second processor 21, wherein the second computer program 27, when executed by the second processor 21, implements the steps of the dual battery serial power supply method as described in the first or second embodiment.
The battery module of the embodiment of the present invention and the dual-battery serial power supply method of the first embodiment or the second embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are correspondingly applicable in this embodiment, and are not described herein again.
EXAMPLE six
Fig. 8 is a schematic structural view of a battery module according to a sixth embodiment of the present invention, in which the battery module is the first battery module 1 shown in fig. 1 and 2. Only the portions related to the present embodiment are shown for convenience of explanation.
Referring to fig. 8, the first battery module 1 provided in this embodiment includes a first processor 11, a first battery 12 electrically connected to the first processor 11, and a first USB interface 16, and further includes: a discharge unit 14 having a control terminal connected to the first processor 11, an input terminal connected to the first battery 12, and an output terminal connected to the first USB interface 16; a power compensation unit 13 having a control terminal connected to the first processor 11, an input terminal connected to the first USB interface 16, and an output terminal connected to the first battery 12; and a first detection unit 15 connected between the first processor 11 and the first USB interface 16; the first battery module 1 further includes:
a first memory 17 and a first computer program 18 stored in the first memory 17 and operable on the first processor 11, wherein when the first computer program 18 is executed by the first processor 11, the steps of the dual-battery serial power supply method according to the third embodiment or the fourth embodiment are implemented.
The battery module of the embodiment of the present invention and the dual-battery serial power supply method of the third embodiment or the fourth embodiment belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments, and technical features in the method embodiments are correspondingly applicable in the present embodiment, and are not described herein again.
EXAMPLE seven
Fig. 9 is a schematic structural diagram of a neck-wearing earphone device according to a seventh embodiment of the present invention, and only the parts related to this embodiment are shown for convenience of description.
The earphone device 100 shown in fig. 1 may be the neck-wearing earphone device shown in fig. 9, referring to fig. 9, the neck-wearing earphone device includes a neck strap 4, a first battery module 1 according to the sixth embodiment, a second battery module 2 according to the fifth embodiment, and an earphone assembly 3, the second battery module 2 is disposed at one end of the neck strap 4 and is fixedly connected to the neck strap 4, the other end of the neck strap 4 is connected to the first USB interface 16 of the first battery module 1 through the second USB interface 25 in a pluggable manner, the neck strap 4 is further provided with two earphone connecting portions, and a left earphone and a right earphone in the earphone assembly 3 respectively extend into the neck strap 4 through the two earphone connecting portions and are electrically connected to a power supply end of the power management unit 23 in the second battery module 2.
It should be noted that the neck-wearing earphone device according to the embodiment of the present invention and the dual-battery serial power supply method according to any one of the first to fourth embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments, and technical features in the method embodiments are applicable to the present embodiment, and are not described herein again.
In addition, the neck-wearing earphone device provided in this embodiment is only a preferred implementation example of the earphone device 100 according to the embodiment of the present invention, and is not limited to the present invention, and in other implementation examples, the earphone device 100 may also be in other forms, and all of them are within the protection scope of the present invention.
Example eight
An eighth embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the dual-battery serial power supply method according to any one of the first embodiment and the second embodiment are implemented; and/or implementing the steps of the dual-battery serial power supply method as described in any of the third embodiment or the fourth embodiment.
It should be noted that the computer-readable storage medium according to the embodiment of the present invention and the dual-battery serial power supply method according to any one of the first to fourth embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiment, and technical features in the method embodiment are applicable to this embodiment, and are not described herein again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and are not to be construed as limiting the scope of the invention. Any modifications, equivalents and improvements which may occur to those skilled in the art without departing from the scope and spirit of the present invention are intended to be within the scope of the claims.