CN113010202B - Data upgrading method, data upgrading device and readable storage medium - Google Patents

Data upgrading method, data upgrading device and readable storage medium Download PDF

Info

Publication number
CN113010202B
CN113010202B CN202110463060.7A CN202110463060A CN113010202B CN 113010202 B CN113010202 B CN 113010202B CN 202110463060 A CN202110463060 A CN 202110463060A CN 113010202 B CN113010202 B CN 113010202B
Authority
CN
China
Prior art keywords
data
earphone
upgrade
charging box
upgrading
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
CN202110463060.7A
Other languages
Chinese (zh)
Other versions
CN113010202A (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.)
Goertek Inc
Original Assignee
Goertek Inc
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 Goertek Inc filed Critical Goertek Inc
Priority to CN202110463060.7A priority Critical patent/CN113010202B/en
Publication of CN113010202A publication Critical patent/CN113010202A/en
Priority to PCT/CN2021/138733 priority patent/WO2022227615A1/en
Application granted granted Critical
Publication of CN113010202B publication Critical patent/CN113010202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a data upgrading method, a data upgrading device and a readable storage medium, wherein the data upgrading method is applied to a headset, the headset is charged by a charging box, and the data upgrading method comprises the following steps: receiving the parsed upgrade data packet; and if the upgrade data packet comprises the charging box upgrade data, transmitting the charging box upgrade data to a charging box based on the earphone. The technical scheme of the invention can improve the upgrading efficiency of the charging box.

Description

Data upgrading method, data upgrading device and readable storage medium
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data upgrading method, a data upgrading device, and a readable storage medium.
Background
TWS (True Wireless Stereo, true wireless stereophonic) earphone, including main earphone and auxiliary earphone, main earphone and auxiliary earphone can place in the box that charges, can also realize the control to main earphone and auxiliary earphone through the box that charges. The main earphone, the auxiliary earphone and the charging box are provided with software control programs. The software program needs updating and upgrading at irregular intervals, and in the current upgrading scheme, the main earphone receives upgrading data. The main earphone analyzes and processes the upgrade data and forwards the upgrade data to the auxiliary earphone or the charging box. The step of analyzing and retransmitting through the main earphone consumes longer time, so that the efficiency of upgrading the charging box software is reduced.
Disclosure of Invention
Based on this, aiming at the problem that the efficiency of the software upgrade is reduced because the upgrade data is analyzed and forwarded through the main earphone when the software upgrade is performed on the earphone at present, it is necessary to provide a data upgrade method, a data upgrade device and a readable storage medium, which aim to improve the efficiency of the software upgrade of the charging box.
In order to achieve the above object, the present invention provides a data upgrading method applied to an earphone, wherein the earphone is charged by a charging box, and the data upgrading method includes:
Receiving the parsed upgrade data packet;
and if the upgrade data packet comprises the charging box upgrade data, transmitting the charging box upgrade data to a charging box based on the earphone.
Optionally, the upgrade data packet includes an earphone firmware type and a charging box firmware type;
before the step of determining that the upgrade data packet includes the charging box upgrade data, the method includes:
judging the type of firmware included in the upgrade data packet;
if the upgrading data packet comprises the earphone firmware type, determining that the upgrading data packet comprises earphone upgrading data;
And if the upgrade data packet comprises the charging box firmware type, determining that the upgrade data packet comprises charging box upgrade data.
Optionally, the headset includes a main headset and an auxiliary headset that are connected wirelessly, and after the step of determining that the upgrade data packet includes headset upgrade data, the method includes:
and storing the earphone upgrading data in the main earphone, and transmitting the earphone upgrading data to the auxiliary earphone based on the main earphone so as to upgrade the main earphone and the auxiliary earphone.
In addition, in order to achieve the above object, the present invention further provides a data upgrading method applied to a communication terminal, the communication terminal is connected to an earphone, the earphone is charged by using a charging box, the data upgrading method includes:
Analyzing earphone upgrading data and/or charging box upgrading data in the upgrading data;
marking the analyzed earphone upgrading data and/or the charging box upgrading data with a firmware type;
And respectively packaging the earphone upgrading data marked with the firmware type and/or the charging box upgrading data to send to the earphone.
Optionally, the step of labeling the analyzed earphone upgrade data and/or the charging box upgrade data with a firmware type includes:
if the earphone upgrading data are analyzed, marking the earphone firmware type in the earphone upgrading data;
If the charging box upgrading data are analyzed, marking the type of the charging box firmware in the charging box upgrading data;
If the earphone upgrading data and the charging box upgrading data are analyzed, marking the earphone firmware type in the earphone upgrading data and/or marking the charging box firmware type in the charging box upgrading data.
Optionally, before the step of parsing the earphone upgrade data and/or the charging box upgrade data in the upgrade data, the method includes:
And receiving a downloading instruction, and downloading the upgrading data according to the downloading instruction.
Optionally, after the step of parsing the earphone upgrade data and/or the charging box upgrade data in the upgrade data, the method includes:
and extracting earphone upgrading data and/or charging box upgrading data in the parsed upgrading data.
Optionally, after the step of sending the earphone upgrade data marked with the firmware type and/or the charging box upgrade data to the earphone in a packet, the method includes:
judging whether the upgrade data is sent completely or not;
if the sending is completed, notifying the earphone that the data sending is completed;
if the sending is not finished, continuing to execute the step of extracting the earphone upgrading data and/or the charging box upgrading data in the parsed upgrading data.
In addition, in order to achieve the above object, the present invention also provides a data upgrading device applied to an earphone, the data upgrading device comprising:
the receiving module is used for receiving the parsed upgrade data packet;
And the determining module is used for determining that the upgrading data packet comprises charging box upgrading data, and transmitting the charging box upgrading data to a charging box based on the earphone.
In addition, in order to achieve the above object, the present invention also provides a readable storage medium having stored thereon a data transmission program which, when executed by a processor, implements the steps of the data upgrade method as described above.
According to the technical scheme provided by the invention, after the earphone receives the analyzed upgrade data packet, the upgrade data type contained in the upgrade data packet is determined, when the upgrade data type is determined to be the charging box upgrade data, the upgrade target is the charging box, and the charging box upgrade data in the upgrade data packet is directly transmitted to the charging box through the earphone, so that the charging box is upgraded. According to the technical scheme, after the upgrading data packet received by the earphone is analyzed, whether the upgrading object is a charging box or not is judged, and under the condition that the upgrading object is the charging box is determined, the earphone transmits the upgrading data packet to the charging box. In this way, in the upgrading process, the earphone is not required to analyze and process the upgrading data packet, and the earphone only needs to judge the upgrading object of the upgrading data packet. And then under the condition that the earphone analysis data is reduced, the data transmission of the charging box can be completed through one-time forwarding, and the charging upgrading efficiency of the charging box is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a first embodiment of a data upgrade method according to the present invention;
FIG. 2 is a flowchart of a second embodiment of a data upgrade method according to the present invention;
FIG. 3 is a flowchart illustrating a third embodiment of a data upgrade method according to the present invention;
FIG. 4 is a flowchart of a fourth embodiment of a data upgrade method according to the present invention;
FIG. 5 is a flowchart of a fifth embodiment of a data upgrade method according to the present invention;
FIG. 6 is a flowchart of a sixth embodiment of a data upgrade method according to the present invention;
FIG. 7 is a flowchart of a seventh embodiment of a data upgrade method according to the present invention;
FIG. 8 is a flowchart illustrating a data upgrade method according to an eighth embodiment of the present invention;
FIG. 9 is a flowchart of a data upgrade method according to a ninth embodiment of the present invention;
Fig. 10 is a schematic structural diagram of a data upgrading device according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
When the TWS earphone is used by a user, one earphone is worn in each ear, one of the two earphones is a main earphone, the other earphone is an auxiliary earphone, the main earphone and the auxiliary earphone can be placed in the charging box to be charged, and the control of the main earphone and the auxiliary earphone can be realized through the charging box. The earphone and the charging box often need to be upgraded, in the current upgrading scheme, the main earphone stores and analyzes upgrading data, and the analyzed data type is sent to the auxiliary earphone or the charging box. Such a process takes a long time, resulting in a reduced efficiency of the charging box software upgrade.
In order to solve the above problems, referring to fig. 1, a first embodiment of the present invention is provided, and the data upgrading method is applied to a headset, the headset is charged by using a charging box, and a user can store the headset in the charging box and can also charge the headset when not using the headset.
The data upgrading method comprises the following steps:
Step S110, receiving the parsed upgrade data packet; the earphone is wirelessly connected to an audio device, which includes a communication terminal, such as a smart phone. The sound is played through the audio device and the user can listen through the headphones. The manner in which the headset is connected to the audio device includes a bluetooth connection. In the parsed upgrade data packet, the upgrade data for the upgraded earphone and the upgrade data for the upgraded charging box are already distinguished. The byte size of the parsed upgrade data packet is fixed, for example 512 bytes, and the data transmission speed can be improved in 512 bytes, so that the reduction of the transmission speed caused by the overlarge data packet is avoided. Of course, the byte size of the upgrade data packet is not limited to 512 bytes, so long as the data transmission channel can accommodate enough data, the byte number of the upgrade data packet per packet can be increased, and the byte number of the upgrade packet per packet can be reduced as required. It should be noted that the earphone does not need to parse the upgrade data packet, and the parsing operation of the upgrade data packet is completed through other devices. Such as communication terminals, i.e. smartphones, tablet computers, etc. The earphone comprises a main earphone and an auxiliary earphone, wherein any earphone can receive the upgrade data packet. For example, the main earphone receives the upgrade data packet, the upgrade data packet does not perform any processing on the data when passing through the main earphone, and the main earphone is a transit node for data transmission. The main earphone judges the data type of the upgrade data, namely the firmware type, and can be also understood as an upgrade target, and the main earphone forwards or stores the data according to the upgrade target. For another example, the auxiliary earphone receives an upgrade data packet, and the upgrade data packet does not perform any processing on the data when passing through the auxiliary earphone, and the auxiliary earphone is a transit node for data transmission. The auxiliary earphone judges the data type of the upgrade data, and the auxiliary earphone forwards or stores the data according to the upgrade target.
Step S120, determining that the upgrade data packet includes the charging box upgrade data, transmitting the charging box upgrade data to the charging box based on the earphone. The upgrade data packet may be charging box upgrade data or earphone upgrade data, and before transmitting to the charging box, it is first determined whether the data in the upgrade data packet is earphone upgrade data or charging box upgrade data. After the fact that the charging box upgrading data are included in the upgrading data packet is determined, the charging box upgrading data are directly transmitted to the charging box through the earphone, and therefore software upgrading of the charging box is completed.
In this embodiment, the earphone includes wireless connection's main earphone and auxiliary earphone, and main earphone and auxiliary earphone can be simultaneously with communication terminal wireless connection, also can assist earphone and communication terminal wireless connection through main earphone, and when auxiliary earphone passes through main earphone and communication terminal wireless connection, the data of upgrading charging box pass through main earphone and charging box in proper order, and the data of upgrading earphone passes through main earphone and auxiliary earphone in proper order. When the main earphone and the auxiliary earphone are connected with the communication terminal at the same time, the data of the upgrading charging box can sequentially pass through the main earphone to the charging box, and can also be sent to the main earphone and the auxiliary earphone by the communication terminal, and simultaneously sent to the charging box by the main earphone and the auxiliary earphone, the data of the upgrading earphone is directly sent to the main earphone and the auxiliary earphone by the communication terminal respectively, and when the main earphone and the auxiliary earphone recognize the data of the upgrading earphone, the corresponding data are saved by the main earphone and the auxiliary earphone and are upgraded. The data forwarding speed can be improved by the mode that the communication terminal is connected with the main earphone and the auxiliary earphone at the same time.
In the technical scheme provided by the embodiment, after the earphone receives the parsed upgrade data packet, the upgrade data type included in the upgrade data packet is determined, when the upgrade data type is determined to be the charging box upgrade data, the upgrade target is the charging box, and the charging box upgrade data in the upgrade data packet is directly transmitted to the charging box through the earphone, so that the charging box is upgraded. According to the technical scheme, after the upgrading data packet received by the earphone is analyzed, whether the upgrading object is a charging box or not is judged, and under the condition that the upgrading object is the charging box is determined, the earphone transmits the upgrading data packet to the charging box. In this way, in the upgrading process, the earphone is not required to analyze and process the upgrading data packet, and the earphone only needs to judge the upgrading object of the upgrading data packet. And then under the condition that the earphone analysis data is reduced, the data transmission of the charging box can be completed through one-time forwarding, and the charging upgrading efficiency of the charging box is improved.
Referring to fig. 2, a second embodiment of the present invention is presented on the basis of the first embodiment of the present invention. The upgrade data packet includes a headset firmware type and a charging box firmware type. The firmware type represents an upgrade target of the upgrade data package. The upgrade data packet includes a start bit, a data length, a firmware type, a check bit, and firmware data. The start bit is the start position of the upgrade data packet, and in a longer string of data, the start bit can determine where the data starts and where the data ends, so that the whole upgrade data packet can be distinguished. The data length represents the byte size of the entire upgrade data packet. The firmware type represents an upgrade target, the firmware type includes a headset firmware type that represents the upgrade target as a headset and a charging box firmware type that represents the upgrade target as a charging box. Check codes are arranged in the check bits, data are easy to make mistakes in the transmission process, and whether the data in the upgrading data packet are accurate or not can be checked through the check codes in the check bits. The firmware data is effective upgrade data in the upgrade data packet, and when the earphone or the charging box is upgraded, the corresponding firmware is upgraded mainly by adopting the firmware data.
Before the step of determining that the upgrade data packet includes the charging box upgrade data, the method includes:
Step S130, judging the type of firmware included in the upgrade data packet; characters representing the firmware type are arranged in the upgrade data packet, and after character information representing the firmware type is extracted, the upgrade target of the upgrade data packet is judged according to rules. For example, 0 represents a headset firmware type, and 1 represents a charging box firmware type. After extracting the character information of the firmware type, whether the earphone firmware type or the charging box firmware type can be judged by whether the character is 0 or 1. Of course, 1 may represent the earphone firmware type, and 0 may represent the charging box firmware type. Other numbers or letters may also represent headset firmware types or charging cartridge firmware types.
In step S131, if the upgrade data packet includes the earphone firmware type, it is determined that the upgrade data packet includes earphone upgrade data.
Step S132, if the upgrade data packet includes the type of the firmware of the charging box, determining that the upgrade data packet includes the upgrade data of the charging box.
The firmware types included in the upgrade data packet may be determined through step S131 and step S132, and different firmware types represent different upgrade targets. The headset firmware type represents that the upgrade target is a headset and the charging cartridge firmware type represents that the upgrade target is a charging cartridge. Correspondingly, if the firmware type in the upgrade data packet is the earphone firmware type, the firmware data is earphone upgrade data. The firmware type in the upgrade data packet is the charging box firmware type, and the firmware data is the charging box upgrade data. After the upgrading target of the upgrading data packet is distinguished, the upgrading data packet can be sent in a targeted mode conveniently.
Referring to fig. 3, a third embodiment of the present invention is presented on the basis of the second embodiment of the present invention. When upgrading the charging box, an upgrade to the headset is accompanied. After the step of determining that the upgrade data packet includes the earphone upgrade data, the method includes:
step S140, storing the earphone upgrade data in the main earphone, and transmitting the earphone upgrade data to the auxiliary earphone based on the main earphone to upgrade the main earphone and the auxiliary earphone. In this embodiment, the main earphone receives the upgrade data packet, and then directly forwards the upgrade data packet to the charging box or the auxiliary earphone. When software upgrading is performed on the earphone, the main earphone and the auxiliary earphone are usually required to be upgraded, so after the existence of the earphone upgrading data is determined, the earphone upgrading data is required to be respectively sent to the main earphone, and then the main earphone is sent to the auxiliary earphone. Specifically, a storage unit, for example, a temporary storage, is provided in the main earphone. The master earphone stores the earphone upgrade data in a temporary storage, and copies one earphone upgrade data to forward to the auxiliary earphone. Therefore, the main earphone and the auxiliary earphone are respectively stored with earphone upgrading data, and when the charging box is upgraded, the upgrading of the main earphone and the auxiliary earphone can be completed respectively.
Referring to fig. 4, a fourth embodiment of the present invention is shown. The invention also provides a data upgrading method, which is applied to the communication terminal, the communication terminal is connected with the earphone in a wireless way, the earphone is charged by using the charging box, and the data upgrading method comprises the following steps:
Step S210, analyzing earphone upgrade data and/or charging box upgrade data in the upgrade data; thus, three cases can be included in the upgrade data. In the first case, the earphone upgrade data and the charging box upgrade data exist simultaneously, and when the charging box is upgraded, software upgrade of the earphone is accompanied. The upgrade data originates from a background server, when software upgrade is needed to be carried out on the earphone and the charging box, maintainers compress the upgrade data and upload the compressed upgrade data to the background server, the background server is connected with a network, and the communication terminal downloads the upgrade data and saves the upgrade data locally. Firstly, decompressing the upgrade data, and analyzing the decompressed upgrade data to obtain earphone upgrade data and charging box upgrade data in the upgrade data. In addition, there are two cases that the earphone upgrade data is included in the upgrade data or the charging box upgrade data is included in the upgrade data. In both cases, after analyzing the data, the earphone upgrade data and the charging box upgrade data are obtained respectively. And upgrading the earphone according to the obtained earphone upgrading data or upgrading the charging box according to the charging box upgrading data.
Step S220, marking the firmware type of the analyzed earphone upgrading data and/or charging box upgrading data; in this way, the upgrade targets of the upgrade data are distinguished. The upgrade data may be used to upgrade the headset or to upgrade the charging cartridge in order to facilitate determination of the upgrade target. Marking the earphone firmware type in the earphone upgrading data and marking the charging box firmware type in the charging box upgrading data; in order to be able to identify whether the upgrade data is used for upgrading the headset or for upgrading the charging box in the headset, after the headset upgrade data and the charging box upgrade data are obtained, the headset firmware type is marked in the headset upgrade data, and the charging box firmware type is marked in the charging box upgrade data. Different firmware types represent different upgrade targets, earphone firmware types represent the upgrade target being an earphone, and charging box firmware types represent the upgrade target being a charging box.
Step S230, the earphone upgrade data marked with the firmware type and/or the charging box upgrade data are respectively packaged and sent to the earphone. And packaging the corresponding upgrade data, thereby facilitating the data transmission. Specifically, the earphone upgrade data and the charging box upgrade data are respectively packaged to generate an upgrade data package; after the firmware type is marked, the upgrade data is required to be transmitted to the earphone, so that the situation that data channels are blocked due to excessive data transmission at one time is avoided, and the upgrade data of the earphone and the upgrade data of the charging box are respectively packaged to generate an upgrade data packet. The number of bytes of the upgrade data packet per packet may be limited to 512 bytes, and since the earphone upgrade data and the charging box upgrade data may have a large data amount, there may be a plurality of upgrade data packets in the upgrade data packet. Of course, the byte size of the upgrade data packet is not limited to 512 bytes, so long as the data transmission channel can accommodate enough data, the byte number of the upgrade data packet per packet can be increased, and the byte number of the upgrade packet per packet can be reduced as required. A wireless connection, such as a bluetooth connection, is provided between the communication terminal and the headset. The communication terminal sends the upgrade data packets to the earphone one by one through Bluetooth, and the earphone sends the upgrade data packets to the charging box after receiving the upgrade data packets.
The upgrade data is analyzed, and the purpose of the upgrade data is to obtain earphone upgrade data for upgrading the earphone and/or charging box upgrade data for upgrading the charging box. It is known that the upgrading target can be either the earphone or the charging box, and the earphone and the charging box can be upgraded at the same time. The upgrade target refers to an object of action of upgrade data. For example, upgrade targets include headphones and a charging cartridge. It is therefore necessary to determine whether the upgrade data has corresponding data information. The specific content of the upgrade data can be obtained by analyzing the upgrade data. The upgrade data are divided into earphone upgrade data and charging box upgrade data so as to add earphone firmware types in the earphone upgrade data and add charging box firmware types in the charging box upgrade data.
In the technical scheme provided by the embodiment, the earphone upgrade data and the charging box upgrade data are acquired, or one of the earphone upgrade data and the charging box upgrade data is acquired. And adding an earphone firmware type mark in the earphone upgrading data, and adding a charging box firmware type mark in the charging box upgrading data. The communication terminal is used for distinguishing the earphone upgrading data from the charging box upgrading data, respectively packaging the distinguished earphone upgrading data and the charging box upgrading data to generate upgrading data packages, transmitting the upgrading data packages to the earphone, and wirelessly connecting the earphone with the charging box, wherein the upgrading data packages can be transmitted to the charging box through the earphone so as to upgrade the charging box. And when the firmware type mark of the earphone upgrading data is only performed, the earphone upgrading data is only subjected to packet transmission. Or, only the firmware type of the charging box upgrading data is marked, and only the charging box upgrading data is packaged and sent.
In this embodiment, the earphone includes wireless connection's main earphone and auxiliary earphone, and main earphone and auxiliary earphone can be simultaneously with communication terminal wireless connection, also can assist earphone and communication terminal wireless connection through main earphone, and when auxiliary earphone passes through main earphone and communication terminal wireless connection, the upgrade data of resolving sends for main earphone, and the data of upgrading charging box is through main earphone and charging box in proper order, and the data of upgrading earphone is through main earphone and auxiliary earphone in proper order. When the main earphone and the auxiliary earphone are connected with the communication terminal at the same time, the analyzed upgrade data are simultaneously sent to the main earphone and the auxiliary earphone, so that the data of the upgrade charging box can sequentially pass through the main earphone to the charging box, the data can also be sent to the main earphone and the auxiliary earphone by the terminal, the data of the upgrade earphone are simultaneously sent to the charging box by the main earphone and the auxiliary earphone, the data of the upgrade earphone are directly sent to the main earphone and the auxiliary earphone by the communication terminal respectively, and when the main earphone and the auxiliary earphone recognize the data of the upgrade earphone, the main earphone and the auxiliary earphone store corresponding data and upgrade. The data forwarding speed can be improved by the mode that the communication terminal is connected with the main earphone and the auxiliary earphone at the same time.
Referring to fig. 5, a fifth embodiment of the present invention is proposed on the basis of the fourth embodiment of the present invention.
In step S221, if the earphone upgrade data is parsed, the earphone firmware type is marked in the earphone upgrade data. That is, only the earphone is updated at this time, and in order to ensure that the data can be transmitted to the earphone, the earphone firmware type is marked in the earphone update data.
In step S222, if the charging box upgrade data is parsed, the charging box firmware type is marked in the charging box upgrade data. That is, only the charging box is updated at this time, and the charging box firmware type is marked in the charging box update data in order to ensure that the data can be transmitted to the charging box.
In step S223, if the earphone upgrade data and the charging box upgrade data are analyzed, the earphone firmware type is marked in the earphone upgrade data and/or the charging box firmware type is marked in the charging box upgrade data. At this time, data upgrade is required for both the earphone and the charging box. In this embodiment, when both the earphone upgrade data and the charging box upgrade data exist, only one of the upgrade data may be marked with a firmware type, and the other data without the firmware type mark may be directly sent to the corresponding firmware. Specifically, the earphone firmware type is marked in the earphone upgrade data, and the firmware type is not marked in the charging box upgrade data. Data with the firmware type of the headset is sent to the headset, and data without the firmware type flag is sent to the charging box. It is also possible to mark the charging box firmware type in the charging box upgrade data, and do no firmware type mark in the earphone upgrade data. And sending the data with the firmware type of the charging box to the charging box, and sending the data without the firmware type mark to the earphone. Therefore, the operation of marking the firmware type can be reduced, and the data transmission speed can be improved.
Referring to fig. 6, a sixth embodiment of the present invention is proposed on the basis of the fourth embodiment of the present invention. In order to successfully distinguish the upgrade targets of the upgrade data. Before the step of analyzing the earphone upgrade data and the charging box upgrade data in the upgrade data, the method comprises the following steps:
step S240, receiving a downloading instruction, and downloading the upgrade data according to the downloading instruction. The download instructions may be generated from actively contrasting the version number of the data in the headset, e.g., after contrasting the version number of the data to be the most recent version. And the communication terminal downloads the upgrade data according to the download instruction. The communication terminal can also receive a downloading instruction sent by a user and download according to the selection of the user. After the communication terminal downloads the upgrade data, the upgrade data is analyzed and processed to finish the distinction of the upgrade targets.
Referring to fig. 7, a seventh embodiment of the present invention is presented on the basis of the fourth embodiment of the present invention. After the step of parsing the earphone upgrade data and/or the charging box upgrade data in the upgrade data, the method comprises the following steps:
Step S250, extracting earphone upgrade data and/or charging box upgrade data in the parsed upgrade data. And analyzing the upgrade data, namely distinguishing the earphone upgrade data from the charging box upgrade data or obtaining one of the upgrade data. It is further necessary to continue the step of marking the firmware type. Therefore, after the analysis processing is completed, an extraction command is generated, and earphone upgrade data and charging box upgrade data in the upgrade data are extracted according to the extraction command so as to complete distinguishing identification of the earphone upgrade data and the charging box upgrade data. Ensuring smooth transmission of data.
Referring to fig. 8, an eighth embodiment of the present invention is presented on the basis of the seventh embodiment of the present invention. The number of the upgrade data packets may be plural, and after the step of transmitting the upgrade data packet with the firmware type marked to the earphone, the method includes:
Step S260, judging whether the transmission of the upgrade data is completed; the upgrade data is sent in the form of a group package, and to complete the normal upgrade of the charging box, it is necessary to ensure that the upgrade data is completely sent. Whether the upgrade data is sent is judged, and whether the information of the upgrade data exists in the communication terminal can be detected. The step of determining whether to complete transmission may be intermittent, and may be performed once every time period, or may be performed continuously.
Step S261, if the transmission is completed, notifying the earphone that the data transmission is completed; after the sending is completed, sending a completion instruction to the earphone, and after the earphone receives the completion instruction, restarting the system and upgrading the software. The software upgrade has a version number, and after the upgrade is finished, the new version number can cover the original version number.
Step S262, if the transmission is not completed, the step of obtaining the earphone upgrade data and the charging box upgrade data in the upgrade data is continuously executed. After judging that the upgrade data is not sent, repeatedly executing step S250, and packaging both the earphone upgrade data and the charging box upgrade data which are not sent by the upgrade data into an upgrade data packet, and sending the upgrade data packet to the earphone packet by packet.
Referring to fig. 9, a ninth embodiment of the present invention is proposed on the basis of the eighth embodiment of the present invention. To ensure that the corresponding firmware has completed the upgrade. After the step of informing the earphone that the data transmission is completed, the method further comprises:
Step S270, waiting for reconnection of the earphone and the communication terminal; when the earphone and the charging box are updated, the earphone and the charging box need to be restarted, and at the moment, the connection between the earphone and the communication terminal is disconnected. In order to determine that the earphone and the charging box have completed firmware upgrade, the communication terminal is used for judging whether the software version numbers in the earphone and the charging box are the same as the version numbers downloaded by the communication terminal. For this reason, it is necessary to wait for the earphone to be reconnected with the communication terminal.
Step S280, judging whether the software version number in the earphone is the latest version after the earphone is reconnected with the communication terminal; after the earphone and the charging box are restarted, the software is upgraded, and the earphone is connected with the communication terminal again through Bluetooth. The earphone sends the version number of the earphone and the version number in the charging box to the communication terminal. And comparing the downloaded software version numbers after the communication terminal receives the transmitted version numbers, if the downloaded software version numbers are consistent, the software upgrading is successful, and if the downloaded software version numbers are inconsistent, the software upgrading is failed.
Step S281, if the software version number in the earphone is the latest version, the software upgrade is successful; for example, the latest version number is V2, and if the version number fed back by the earphone is also V2, the software upgrade is successful. The software version number in the headset includes the version number of the charging box feedback. That is, the version number judgment of the charging box is completed at the same time as the version number judgment of the earphone.
In step S282, if the software version number in the earphone is not the latest version, the software upgrade fails, and the steps of acquiring the earphone upgrade data and the charging box upgrade data in the upgrade data are re-executed. For example, the latest version number is V2, and if the version number fed back by the earphone is V1, the software upgrade fails. For this reason, after the upgrade data is re-acquired, the earphone or the charging box is again upgraded with software.
Referring to fig. 10, the present invention further provides a data upgrading device, the data upgrading device is applied to an earphone, the earphone is charged by a charging box, and the data upgrading device includes: a receiving module 110 and a determining module 120.
A receiving module 110, configured to receive the parsed upgrade data packet; the main earphone and the auxiliary earphone are wirelessly connected to an audio device, which includes a communication terminal, such as a smart phone. The voice is played through the audio device, and the user can listen through the main earphone and the auxiliary earphone. The manner in which the primary and secondary headphones are connected to the audio device includes a bluetooth connection. In the parsed upgrade data packet, the upgrade data for the upgraded earphone and the upgrade data for the upgraded charging box are already distinguished. The byte size of the parsed upgrade data packet is fixed, for example 512 bytes, and the data transmission speed can be improved in 512 bytes, so that the reduction of the transmission speed caused by the overlarge data packet is avoided. Of course, the byte size of the upgrade data packet is not limited to 512 bytes, so long as the data transmission channel can accommodate enough data, the byte number of the upgrade data packet per packet can be increased, and the byte number of the upgrade packet per packet can be reduced as required.
The determining module 120 is configured to determine that the upgrade data packet includes the charging box upgrade data, and then transmit the charging box upgrade data to the charging box based on the headset, so as to upgrade the charging box. The upgrade data packet may be charging box upgrade data or earphone upgrade data, and before transmitting to the charging box, it is first determined whether the data in the upgrade data packet is earphone upgrade data or charging box upgrade data. After the fact that the charging box upgrading data are included in the upgrading data packet is determined, the charging box upgrading data are directly transmitted to the charging box through the main earphone, and therefore software upgrading of the charging box is completed. The receiving module 110 and the determining module 120 may be disposed in the main earphone or in the auxiliary earphone. That is, the main earphone receives the upgrade data packet, and the upgrade data packet does not perform any processing on the data when passing through the main earphone, and the main earphone is a transit node for data transmission. And the main earphone judges the data type of the upgrade data, and the main earphone forwards the data according to the data type. The data transmission method comprises the steps that a data transmission node is connected with a data transmission node, and the data transmission node is connected with a data transmission node. The auxiliary earphone judges the data type of the upgrade data, and the auxiliary earphone forwards the data according to the data type.
In this embodiment, the receiving module 110 receives the parsed upgrade data packet. And the determining module 120 determines that the upgrade data packet includes the charging box upgrade data, and the determining module 120 directly controls the earphone to transmit the charging box upgrade data to the charging box, thereby completing the software upgrade of the charging box. In this embodiment, the data is not required to be parsed by the earphone, and the data received by the earphone is already parsed, so that the step of earphone parsing is omitted, the time for processing the data by the earphone is reduced, and then the transmission efficiency is improved, so that the charging efficiency of the charging box is improved.
The present invention also provides a readable storage medium having stored thereon a data transmission program which, when executed by a processor, implements the steps of the data upgrade method as described above.
The specific embodiments of the readable storage medium of the present invention may refer to the embodiments of the data upgrading method, and are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description of the preferred embodiments of the present invention should not be construed as limiting the scope of the invention, but rather should be understood to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the following description and drawings or any application directly or indirectly to other relevant art(s).

Claims (10)

1. The data upgrading method is applied to the earphone, and the earphone is charged by using a charging box, and is characterized by comprising the following steps:
receiving the parsed upgrade data packet; the upgrade data packet comprises earphone upgrade data and/or charging box upgrade data marked with a firmware type;
Extracting character information representing the firmware type from the upgrade data packet, and determining whether the upgrade data packet comprises charging box upgrade data according to the character information;
and if the upgrading data packet comprises charging box upgrading data according to the character information, transmitting the charging box upgrading data to a charging box based on the earphone.
2. The data upgrade method of claim 1, wherein the step of determining whether the upgrade data packet includes the charging box upgrade data according to the character information comprises:
If the character information represents the earphone firmware type, determining that the upgrading data packet comprises earphone upgrading data;
and if the character information represents the type of the firmware of the charging box, determining that the upgrading data packet comprises the upgrading data of the charging box.
3. The data upgrade method of claim 2, wherein the headset comprises a main headset and a sub headset that are wirelessly connected, and after the step of determining that the upgrade data packet includes headset upgrade data, the method comprises:
and storing the earphone upgrading data in the main earphone, and transmitting the earphone upgrading data to the auxiliary earphone based on the main earphone so as to upgrade the main earphone and the auxiliary earphone.
4. The utility model provides a data upgrading method, is applied to communication terminal, communication terminal connects in the earphone, earphone application charging box charges, its characterized in that includes:
Analyzing earphone upgrading data and/or charging box upgrading data in the upgrading data;
setting character information representing a firmware type for the parsed earphone upgrading data and/or the parsed charging box upgrading data;
And respectively packaging and sending the earphone upgrading data and/or the charging box upgrading data which are provided with character information representing the firmware type to the earphone.
5. The data upgrade method according to claim 4, wherein the step of setting character information representing a firmware type to the parsed earphone upgrade data and/or the charging box upgrade data comprises:
If the earphone upgrading data are analyzed, character information representing the type of earphone firmware is set in the earphone upgrading data;
if the charging box upgrading data are analyzed, character information representing the type of the charging box firmware is set in the charging box upgrading data;
if the earphone upgrading data and the charging box upgrading data are analyzed, character information representing the earphone firmware type is set in the earphone upgrading data and/or character information representing the charging box firmware type is set in the charging box upgrading data.
6. The method for upgrading data according to claim 4, wherein before the step of parsing the earphone upgrade data and/or the charging box upgrade data in the upgrade data, the method comprises:
And receiving a downloading instruction, and downloading the upgrading data according to the downloading instruction.
7. The data upgrade method according to claim 4, wherein after the step of parsing the earphone upgrade data and/or the charging box upgrade data in the upgrade data, the method comprises:
and extracting earphone upgrading data and/or charging box upgrading data in the parsed upgrading data.
8. The data upgrade method according to any one of claims 4 to 7, wherein after the step of respectively packetizing the earphone upgrade data and/or the charging box upgrade data provided with character information representing a firmware type to an earphone, comprising:
judging whether the upgrade data is sent completely or not;
if the sending is completed, notifying the earphone that the data sending is completed;
if the sending is not finished, continuing to execute the step of extracting the earphone upgrading data and/or the charging box upgrading data in the parsed upgrading data.
9. The utility model provides a data upgrading device is applied to the earphone, the earphone utilizes the box that charges to charge, its characterized in that includes:
the receiving module is used for receiving the parsed upgrade data packet; the upgrade data packet comprises earphone upgrade data and/or charging box upgrade data marked with a firmware type;
The determining module is used for extracting character information representing the firmware type from the upgrading data packet and determining whether the upgrading data packet comprises charging box upgrading data according to the character information; and if the upgrading data packet comprises charging box upgrading data according to the character information, transmitting the charging box upgrading data to a charging box based on the earphone.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a data transmission program, which when executed by a processor, implements the steps of the data upgrade method according to any one of claims 1 to 8.
CN202110463060.7A 2021-04-27 2021-04-27 Data upgrading method, data upgrading device and readable storage medium Active CN113010202B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110463060.7A CN113010202B (en) 2021-04-27 2021-04-27 Data upgrading method, data upgrading device and readable storage medium
PCT/CN2021/138733 WO2022227615A1 (en) 2021-04-27 2021-12-16 Data upgrade method, data upgrade device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110463060.7A CN113010202B (en) 2021-04-27 2021-04-27 Data upgrading method, data upgrading device and readable storage medium

Publications (2)

Publication Number Publication Date
CN113010202A CN113010202A (en) 2021-06-22
CN113010202B true CN113010202B (en) 2024-07-02

Family

ID=76380846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110463060.7A Active CN113010202B (en) 2021-04-27 2021-04-27 Data upgrading method, data upgrading device and readable storage medium

Country Status (2)

Country Link
CN (1) CN113010202B (en)
WO (1) WO2022227615A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010202B (en) * 2021-04-27 2024-07-02 歌尔股份有限公司 Data upgrading method, data upgrading device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111615030A (en) * 2020-05-27 2020-09-01 歌尔科技有限公司 Upgrading method, device and medium for novel TWS earphone
CN111813425A (en) * 2019-04-12 2020-10-23 顺丰科技有限公司 Equipment upgrading method, device, equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2366709A (en) * 2000-06-30 2002-03-13 Graeme Roy Smith Modular software definable pre-amplifier
EP2784668B1 (en) * 2013-03-26 2020-02-19 GN Audio A/S Headset firmware update from headset base unit
WO2019087428A1 (en) * 2017-10-30 2019-05-09 イアフレド株式会社 Sound reproduction device
CN108882211B (en) * 2018-06-15 2020-09-11 歌尔科技有限公司 Method and system for upgrading TWS earphone program and TWS earphone
CN108804124B (en) * 2018-06-15 2020-08-28 歌尔科技有限公司 TWS earphone, charging box, upgrading method of charging box and storage medium
CN110366063A (en) * 2019-07-26 2019-10-22 歌尔科技有限公司 A kind of upgrade method of wireless headset, device and charging box
CN110659046B (en) * 2019-09-12 2023-09-01 深圳市沃奈斯实业发展有限公司 Firmware upgrading method, terminal, charging box, earphone and storage medium
CN110719542B (en) * 2019-10-31 2021-06-04 歌尔科技有限公司 TWS earphone, upgrading method and device thereof, and computer storage medium
CN111200811B (en) * 2019-12-29 2022-03-18 歌尔科技有限公司 TWS earphone, upgrading method and device thereof and readable storage medium
CN111787098B (en) * 2020-06-30 2022-10-04 歌尔科技有限公司 Earphone upgrading method and device, earphone and storage medium
CN113010202B (en) * 2021-04-27 2024-07-02 歌尔股份有限公司 Data upgrading method, data upgrading device and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813425A (en) * 2019-04-12 2020-10-23 顺丰科技有限公司 Equipment upgrading method, device, equipment and storage medium
CN111615030A (en) * 2020-05-27 2020-09-01 歌尔科技有限公司 Upgrading method, device and medium for novel TWS earphone

Also Published As

Publication number Publication date
WO2022227615A1 (en) 2022-11-03
CN113010202A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN109413134B (en) Vehicle-mounted application upgrading method, device, system and storage medium
CN111200811B (en) TWS earphone, upgrading method and device thereof and readable storage medium
US10338911B2 (en) Method and device for downloading software version, and storage medium
CN111158738B (en) Headset firmware upgrading method and device and readable storage medium
KR20170066579A (en) Method for updating terminal system, terminal and system
KR20080037450A (en) System and method for processing update software run on mobile terminal platform
CN110784846B (en) Vehicle-mounted Bluetooth equipment identification method and device, electronic equipment and storage medium
CN110719542B (en) TWS earphone, upgrading method and device thereof, and computer storage medium
CN106330408B (en) Data transmission system and method
CN108449198A (en) A kind of method, system and the storage device of OTA upgradings
CN105389183A (en) Method and apparatus for making application version and intelligent sound box software version correspond
CN110795127B (en) Wireless earphone and upgrading method and device thereof
US20230224654A1 (en) Earphone debugging method and device, and storage medium
CN113010202B (en) Data upgrading method, data upgrading device and readable storage medium
CN111787098B (en) Earphone upgrading method and device, earphone and storage medium
CN109358867B (en) Automatic upgrading method, device and system for unmanned vehicle application and storage medium
US9723480B2 (en) Information processing device, server device, data communication system, data communication method, and computer-readable storage medium storing data communication program
US20240086175A1 (en) Update control system, update control method, non-transitory storage medium, and in-vehicle control device
CN113872840A (en) CAN data acquisition and transmission method, device and vehicle-mounted terminal
CN111556117A (en) Earphone upgrading method and device, earphone control method, earphone set and storage medium
CN105549995B (en) A kind of audio frequency apparatus upgrade method and device
CN106814751A (en) A kind of flight control protocol automatic adaptation method, apparatus and system
CN110704080B (en) Method for upgrading Bluetooth module through Wi-Fi module
CN110764806A (en) TWS earphone and upgrading method and device thereof
CN111176693B (en) Upgrading method of digital television system

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