Disclosure of Invention
Accordingly, an objective of the embodiments of the present application is to provide a firmware upgrade method, a terminal, a charging box, an earphone and a storage medium, so as to solve the problem that the firmware upgrade method of the earphone and the charging box in the existing TWS bluetooth earphone system needs manual operation by a user, and when the user is unfamiliar with a dedicated upgrade APP or has misoperation, upgrade failure may be caused.
The technical scheme adopted by the application for solving the technical problems is as follows:
according to a first aspect of an embodiment of the present application, there is provided a firmware upgrade method, applied to a terminal, including:
after the communication connection between the terminal and the earphone is established, acquiring an earphone firmware version number stored in the earphone and/or a charging box firmware version number stored in the earphone; accessing a server according to a preset frequency, and acquiring the latest version of earphone firmware and/or the version number of charging box firmware released by the server;
comparing the version number of the earphone firmware obtained from the earphone with the version number of the latest version of the earphone firmware obtained from the server, and judging whether the server issues new earphone firmware or not; and/or comparing the version number of the charging box firmware obtained from the earphone with the version number of the charging box firmware of the latest version obtained from the server, and judging whether the server issues a new charging box firmware or not;
if the server issues new earphone firmware and/or charging box firmware, downloading the new earphone firmware and/or charging box firmware from the server, and updating the earphone firmware and/or charging box firmware stored in the earphone internal firmware backup area according to the new earphone firmware and/or charging box firmware.
According to a second aspect of the embodiment of the present application, there is provided a firmware upgrade method applied to a charging box, the method including:
when detecting that two earphones are placed in the charging box, inquiring whether the earphone firmware and/or the charging box firmware in the firmware backup area of the two earphones are updated or not;
if the firmware of the earphone in the firmware backup areas of the two earphones is updated and the version numbers are consistent, simultaneously sending firmware upgrading instructions to the two earphones, so that the two earphones can simultaneously utilize the updated firmware of the earphone backup to carry out firmware upgrading; and/or the number of the groups of groups,
if the firmware of the charging box in the firmware backup area of any one of the two earphones is updated, acquiring updated charging box firmware from the earphones, and updating the firmware of the charging box by using the updated charging box firmware.
When detecting that two earphones are placed in the charging box, inquiring whether the backup firmware of the earphones and/or the backup firmware of the charging box in the backup areas of the two earphones is updated or not includes:
when detecting that both the two earphones are put into the charging box, sending an inquiry request to the two earphones at the same time; the inquiry request is used for triggering the earphone to compare the version numbers of the earphone firmware stored in the current running area with the version numbers of the earphone firmware stored in the firmware backup area, and returning the comparison result to the charging box; and/or, the earphone is used for triggering the earphone to return the version number of the charging box firmware stored in the firmware backup area to the charging box;
receiving comparison results of headset firmware updating returned by the two headsets, and judging whether the headset firmware in the two headset firmware backup areas is updated or not according to the comparison results; and/or receiving the version numbers of the firmware of the charging box returned by the two earphones, comparing the version numbers of the firmware of the charging box with the version number of the firmware currently running in the charging box, and judging whether the firmware of the charging box is updated or not.
When detecting that two earphones are placed in the charging box, inquiring whether the earphone firmware and/or the charging box firmware in the firmware backup area of the two earphones are updated or not further comprises:
if only the earphone firmware and/or the charging box firmware in the firmware backup area of one earphone is updated and the earphone firmware and/or the charging box firmware in the firmware backup area of the other earphone is not updated, controlling the earphone firmware and/or the charging box firmware stored in the earphone firmware backup area without updating the firmware.
Wherein, the controlling the earphone firmware and/or the charging box firmware stored in the earphone updating firmware backup area without updating firmware includes:
sending an instruction for acquiring the latest version of earphone firmware and/or charging box firmware to the earphone without updating the firmware; and the instruction is used for triggering the earphone which does not update the firmware to acquire the latest version of earphone firmware and/or charging box firmware from the terminal or the earphone which has updated the firmware through Bluetooth connection, and updating the firmware backup area according to the acquired latest version of earphone firmware and/or charging box firmware.
According to a third aspect of the embodiment of the present application, there is provided a firmware upgrade method, applied to a headset, the method including:
acquiring new earphone firmware and/or charging box firmware issued by a terminal through communication connection, and updating the new earphone firmware and/or charging box firmware to a firmware backup area;
when receiving an earphone firmware upgrading instruction issued by the charging box, switching the firmware backup area into an operation area, switching the current operation area into the firmware backup area, and restarting the earphone; and/or the number of the groups of groups,
when a charging box firmware upgrading instruction issued by a charging box is received, new charging box firmware in a firmware backup area is sent to the charging box, so that the charging box can utilize the new charging box firmware to carry out firmware upgrading.
According to a fourth aspect of embodiments of the present application, there is provided a terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the firmware upgrade method as described in the first aspect above.
According to a fifth aspect of embodiments of the present application, there is provided a charging cartridge comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the firmware upgrade method as in any of the second aspects above.
According to a sixth aspect of embodiments of the present application, there is provided a headset comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the firmware upgrade method as described in the third aspect above.
According to a seventh aspect of embodiments of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the firmware upgrade method as described in the first aspect above; alternatively, a step of implementing a firmware upgrade method as described in any one of the second aspects above; alternatively, the steps of the firmware upgrade method described in the third aspect above are implemented.
Compared with the existing TWS Bluetooth headset system in which manual operation is required by a user in a firmware upgrading mode of the headset and the charging box, when the user is unfamiliar with a special upgrading APP or misoperation occurs, the problem that firmware upgrading is likely to be failed is solved.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear and obvious, the application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the particular embodiments described herein are illustrative only and are not limiting upon the application.
Fig. 1 is a schematic diagram of a firmware upgrade system according to an embodiment of the present application. Only the portions relevant to the present embodiment are shown for convenience of explanation.
Referring to fig. 1, the firmware upgrade system provided in the embodiment of the present application includes a terminal 100, an earphone 20, a charging box 300, and a server 400, where the terminal 100 is in communication connection with the earphone 200, two charging interfaces of the earphone 200 are disposed in the charging box 300, and the earphone 200 is electrically connected with the charging box 300 through the earphone charging interfaces. The communication connection between the terminal 100 and the headset 200 includes a wireless communication connection including, but not limited to, a bluetooth connection, a wifi connection, etc., or a wired connection including, but not limited to, a USB wired connection, etc. The terminal 100 also establishes a wireless communication connection with the headset manufacturer's server 400, including but not limited to wi-fi, 3G/4G/5G, etc. Preferably, when the communication connection between the terminal 100 and the headset 200 is a bluetooth connection, the terminal 100 includes, but is not limited to, a smart device having a bluetooth communication function, such as a mobile phone, a tablet, and the like, and the headset 200 includes, but is not limited to, a TWS headset having a bluetooth communication function.
Based on the above-described structural schematic diagram of the firmware upgrade system, the following embodiments of the present application are presented.
Example 1
Fig. 2 is a flowchart of a specific implementation of a firmware upgrade method according to an embodiment of the present application. The execution main body of the method is a terminal in the firmware upgrading system shown in fig. 1, and referring to fig. 2, the firmware upgrading method provided in this embodiment includes the following steps:
step S201, after the communication connection between the terminal and the earphone is established, the version number of earphone firmware stored in the earphone and/or the version number of charging box firmware stored in the earphone are obtained; and accessing the server according to the preset frequency, and acquiring the latest version of earphone firmware and/or the version number of the charging box firmware released by the server.
The storage area of the earphone comprises an operation area and a firmware backup area, and the firmware backup area comprises an earphone firmware backup area and a charging box firmware backup area. The operation area stores earphone firmware which is operated currently, the earphone firmware backup area stores backup earphone firmware, and the charging box firmware stores backup charging box firmware.
After the communication connection between the terminal and the earphone is established, the terminal can obtain the earphone firmware version numbers stored in the earphone running area and the earphone firmware backup area and the version numbers of the charging box firmware stored in the charging box backup area through the communication connection, and can obtain the latest version of the earphone firmware and/or the version numbers of the charging box firmware released by the server through the wireless communication network access server according to the preset frequency.
Step S202, comparing the version number of the earphone firmware obtained from the earphone with the version number of the earphone firmware of the latest version obtained from the server, and judging whether the server issues new earphone firmware or not; and/or comparing the version number of the charging box firmware obtained from the earphone with the version number of the charging box firmware of the latest version obtained from the server, and judging whether the server issues the new charging box firmware.
Comparing the version number of the earphone firmware acquired from the earphone with the version number of the latest version of the earphone firmware acquired from the server, judging whether the server issues new earphone firmware specifically comprises:
and comparing the version numbers of the earphone firmware obtained from the earphone running area and the earphone firmware obtained from the earphone firmware backup area with the version numbers of the earphone firmware of the latest version obtained from the server, and if the version numbers of the earphone firmware of the latest version obtained from the server are higher than the version numbers of the earphone firmware obtained from the earphone running area and the earphone firmware backup area, indicating that the server side issues new earphone firmware.
Similarly, if the version number of the charging box firmware obtained from the server is higher than the version number of the charging box firmware obtained from the charging box firmware backup area of the earphone, it is indicated that the server side issues a new charging box firmware.
In step S203, if the server issues a new earphone firmware and/or charging box firmware, the new earphone firmware and/or charging box firmware is downloaded from the server, and the earphone firmware and/or charging box firmware stored in the backup area of the earphone internal firmware is updated according to the new earphone firmware and/or charging box firmware.
In this embodiment, if the server issues a new earphone firmware charging box firmware, the terminal downloads the new earphone firmware from the server through the wireless communication network, and sends the new earphone firmware to the two earphones simultaneously through the bluetooth connection, when the earphones receive the new earphone firmware, the old earphone firmware stored in the earphone firmware backup area is updated, so that when the subsequent earphones receive the earphone upgrading instruction issued by the charging box, the firmware of the earphones can be upgraded by using the new earphone firmware.
In this embodiment, if the server issues a new charging box firmware, the terminal downloads the new charging box firmware from the server through the wireless communication network, and sends the new charging box firmware to the two headphones simultaneously through the bluetooth connection, and when the headphones receive the new charging box firmware, the old version of the charging box firmware stored in the backup area of the charging box firmware is updated, so that when the subsequent headphones receive a charging box upgrading instruction issued by the charging box, the new charging box firmware is sent to the charging box through the electrical connection, and the charging box uses the new charging box firmware to upgrade the firmware.
As can be seen from the foregoing, in the firmware upgrading method provided in this embodiment, since the terminal is used to monitor whether the server has the earphone firmware and/or the charging box firmware updated, and then when it is monitored that the server has the updated earphone firmware and/or the charging box firmware, the updated earphone firmware and/or the charging box firmware of the server are downloaded and sent to the two earphones, so that when the earphone receives the earphone firmware upgrading instruction and/or the charging box upgrading instruction issued by the charging box, the updated earphone firmware and/or the charging box firmware is utilized to complete the upgrade of the earphone firmware and/or the charging box firmware, so that user operation is not required, and the problem of firmware upgrading failure caused by misoperation or unfamiliar with the upgrade software of the user can be avoided, and user experience is improved.
Example two
Fig. 3 is a flowchart of a specific implementation of a firmware upgrade method according to a second embodiment of the present application. The implementation main body of the method is a charging box in the system shown in fig. 1, and referring to fig. 3, the firmware upgrading method provided in this embodiment may include the following steps:
step S301, when it is detected that both the two headphones are placed in the charging box, inquiring whether the firmware of the headphones and/or the firmware of the charging box in the firmware backup area of the two headphones are updated.
In this embodiment, step S301 specifically includes:
when detecting that two earphones are placed in the charging box, sending inquiry requests to the two earphones at the same time; the inquiry request is used for triggering the earphone to compare the version numbers of the earphone firmware stored in the current running area with the version numbers of the earphone firmware stored in the firmware backup area, and returning the comparison result to the charging box; and/or, the earphone is used for triggering the earphone to return the version number of the charging box firmware stored in the firmware backup area to the charging box;
receiving comparison results of headset firmware updating returned by the two headsets, and judging whether the headset firmware in the two headset firmware backup areas is updated or not according to the comparison results; and/or receiving the version numbers of the firmware of the charging box returned by the two earphones, comparing the version numbers of the firmware of the charging box with the version number of the firmware currently running in the charging box, and judging whether the firmware of the charging box is updated or not.
If the version number of the earphone firmware stored in the earphone firmware backup area is higher than the version number of the earphone firmware stored in the current running area, the earphone firmware is updated; otherwise, the name earphone firmware is not updated. Similarly, if the version number of the firmware of the charging box stored in the backup area of the charging box is higher than the version number of the firmware currently operated by the charging box, the firmware of the charging box is updated; otherwise, it indicates that the charging box firmware is not updated.
Step S302, if the firmware of the earphone in the firmware backup areas of the two earphones is updated and the version numbers are consistent, a firmware upgrading instruction is sent to the two earphones at the same time, so that the two earphones can utilize the updated firmware of the earphone to upgrade the firmware at the same time; and/or the number of the groups of groups,
step S303, if the firmware of the charging box in the firmware backup area of any one of the two earphones is updated, the updated firmware of the charging box is obtained from the earphone, and the updated firmware of the charging box is used for updating the firmware of the charging box.
In this embodiment, if only one of the two headphones has an update of the charging box firmware in the firmware backup area of the headphone, the charging box acquires the updated charging box firmware from the headphone having the updated charging box firmware; if the firmware of the charging box in the firmware backup area in the two earphones is updated and the version numbers are consistent, the charging box acquires the updated firmware of the charging box from any earphone.
Preferably, in this embodiment, after step S303, it may further include:
if only the earphone firmware and/or the charging box firmware in the firmware backup area of one earphone is updated and the earphone firmware and/or the charging box firmware in the firmware backup area of the other earphone is not updated, controlling the earphone firmware and/or the charging box firmware stored in the earphone firmware backup area without updating the firmware.
Wherein, the controlling the earphone firmware and/or the charging box firmware stored in the earphone updating firmware backup area without updating firmware includes:
sending an instruction for acquiring the latest version of earphone firmware and/or charging box firmware to the earphone without updating the firmware; and the instruction is used for triggering the earphone which does not update the firmware to acquire the latest version of earphone firmware and/or charging box firmware from the terminal or the earphone which has updated the firmware through Bluetooth connection, and updating the firmware backup area according to the acquired latest version of earphone firmware and/or charging box firmware.
In this embodiment, when only one earphone firmware or charging firmware in the earphone is detected to be updated and the other earphone is not updated, the earphone which is not updated is triggered to acquire the latest version of the earphone firmware or the charging firmware from the earphone or the terminal which is updated with the firmware, so that the version numbers of the earphone firmware and the charging firmware in the two earphones can be kept consistent all the time and are the firmware with the highest version, guarantee is provided for upgrading the earphone firmware and upgrading the charging firmware, and reliability of upgrading the earphone firmware and upgrading the charging firmware is improved.
As can be seen from the foregoing, in the firmware upgrading method provided in this embodiment, since the terminal is used to update the latest version of the headset firmware and/or the charging box firmware into the headset in real time according to the firmware updating condition of the server, and then when the charging box detects that both the two headsets are in the box, it inquires whether the headset firmware and/or the charging box firmware in the firmware backup areas of the two headsets are updated, if both the headset firmware and/or the charging box firmware in the two headsets are updated, then the headset firmware upgrading instruction and/or the charging box firmware upgrading instruction is sent to the two headsets at the same time, so that the two headsets utilize the updated headset firmware and/or the charging box firmware to perform firmware upgrading on the headset and/or the charging box, which can implement silent upgrading of the headset firmware and/or the charging box firmware, and the upgrading process does not need user operation, so that the problem of firmware upgrading failure caused by misoperation of the user or unfamiliar with the upgrading software can be avoided, and the user experience is improved.
Example III
Fig. 4 is a flowchart of a specific implementation of a firmware upgrade method according to a third embodiment of the present application. The implementation main body of the method is an earphone in the system shown in fig. 1, and referring to fig. 4, the firmware upgrading method provided in this embodiment may include the following steps:
step S401, acquiring new earphone firmware and/or charging box firmware issued by the terminal through communication connection, and updating the new earphone firmware and/or charging box firmware to the firmware backup area.
In this embodiment, the headset includes an operation area and a firmware backup area, where the firmware backup area includes a headset firmware backup area and a charging box firmware backup area. The operation area stores earphone firmware which is operated currently, the earphone firmware backup area stores backup earphone firmware, and the charging box firmware stores backup charging box firmware. After receiving new earphone firmware sent by a terminal, the earphone stores the new earphone firmware into an earphone firmware backup area, and deletes the earphone firmware of the old version in the earphone backup area; and after receiving the new charging box firmware sent by the terminal, the earphone stores the new charging box firmware into the charging box firmware backup area, and simultaneously deletes the old version of the charging box firmware stored in the charging box firmware backup area.
Step S402, when receiving an earphone firmware upgrading instruction issued by a charging box, switching the firmware backup area into an operation area, switching the current operation area into the firmware backup area, and restarting the earphone; and/or the number of the groups of groups,
step S403, when receiving the firmware upgrade instruction of the charging box issued by the charging box, sends the new firmware of the charging box in the firmware backup area to the charging box, so that the charging box uses the new firmware of the charging box to upgrade the firmware.
In this embodiment, when the earphone receives an earphone firmware upgrade instruction issued by the charging box, the current running software of the earphone sets the next starting address as a firmware backup area stored by new earphone firmware, and simultaneously converts the current running area into the firmware backup area, then the earphone is restarted, the new earphone firmware can be executed by the earphone after restarting, and the original running area is changed into the firmware backup area, so that the firmware backup area and the running area are continuously and circularly switched.
In this embodiment, when the charging box firmware in both the two headphones is updated and the version numbers are consistent, the charging box sends a charging box firmware upgrade instruction to any one of the headphones, so as to obtain a new version of the charging box firmware from any one of the headphones for charging box firmware upgrade. Preferably, in a specific implementation example, the charging box sends a charging box firmware upgrade instruction to a headset that is first electrically connected to the charging box, and obtains new charging box firmware from the headset.
As can be seen from the above, in the firmware upgrading method provided in this embodiment, the new earphone firmware and/or charging box firmware issued by the terminal through the bluetooth connection is obtained first, and updated to the firmware backup area; when receiving an earphone firmware upgrading instruction issued by the charging box, switching the firmware backup area into an operation area, switching the current operation area into the firmware backup area, and restarting the earphone; and/or when receiving a charging box firmware upgrading instruction issued by the charging box, sending new charging box firmware in the firmware backup area to the charging box, so that the charging box can utilize the new charging box firmware to carry out firmware upgrading, thereby also realizing silent upgrading of earphone firmware and/or charging box firmware, avoiding the problem of firmware upgrading failure caused by misoperation of a user or unfamiliar with upgrading software without manual operation of the user, and improving user experience.
Example IV
Fig. 5 is a schematic structural diagram of a terminal according to a fourth embodiment of the present application. For the convenience of explanation of the present application, only the portions related to the present embodiment are shown.
Referring to fig. 5, the terminal 100 provided in this embodiment includes a memory 101, a processor 102, and a computer program 103 stored in the memory 101 and capable of running on the processor 102, where the computer program 103 implements the steps of the firmware upgrading method described in the first embodiment when executed by the processor 102.
The terminal of the embodiment of the present application belongs to the same concept as the firmware upgrading method of the first embodiment, the specific implementation process of the terminal of the embodiment of the present application is detailed in the first method embodiment, and the technical features of the first method embodiment are correspondingly applicable in the first embodiment, which is not repeated herein.
Example five
Fig. 6 is a schematic structural diagram of a charging box according to a fifth embodiment of the present application. For the convenience of explanation of the present application, only the portions related to the present embodiment are shown.
Referring to fig. 6, the charging box 300 provided in this embodiment includes a memory 301, a processor 302, and a computer program 303 stored in the memory 301 and capable of running on the processor 302, where the steps of the firmware upgrading method described in the second embodiment are implemented when the computer program 303 is executed by the processor 302.
The charging box of the embodiment of the present application belongs to the same concept as the firmware upgrading method of the second embodiment, the specific implementation process is detailed in the second method embodiment, and the technical features of the second method embodiment are correspondingly applicable in the present embodiment, and are not repeated here.
Example six
Fig. 7 is a schematic structural diagram of an earphone according to a sixth embodiment of the present application. For the convenience of explanation of the present application, only the portions related to the present embodiment are shown.
Referring to fig. 7, the earphone 200 provided in this embodiment includes a memory 201, a processor 202, and a computer program 203 stored in the memory 201 and capable of running on the processor 202, where the computer program 203 implements the steps of the firmware upgrade method described in the third embodiment.
The earphone of the embodiment of the present application belongs to the same concept as the firmware upgrading method of the third embodiment, the specific implementation process is detailed in the third method embodiment, and the technical features of the third method embodiment are correspondingly applicable in the present embodiment, and are not repeated here.
Example seven
An embodiment seven of the present application provides a computer readable storage medium, where a computer program is stored, where the steps of the firmware upgrading method according to any one of the above-mentioned embodiments one to three are implemented when the computer program is executed by a processor.
The storage medium of the embodiment of the present application belongs to the same concept as the firmware upgrading method of any one of the first to third embodiments, and the specific implementation process is detailed in the method embodiment, and the technical features of the method embodiment are correspondingly applicable in the present embodiment, and are not repeated herein.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, functional modules/units in the apparatus, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In a hardware implementation, the division between the 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 cooperatively by several physical components. 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 both 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 known to those skilled 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 be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, 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.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and thus do not limit the scope of the claims of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the present application shall fall within the scope of the appended claims.