WO2022227615A1 - 数据升级方法、数据升级装置和可读存储介质 - Google Patents

数据升级方法、数据升级装置和可读存储介质 Download PDF

Info

Publication number
WO2022227615A1
WO2022227615A1 PCT/CN2021/138733 CN2021138733W WO2022227615A1 WO 2022227615 A1 WO2022227615 A1 WO 2022227615A1 CN 2021138733 W CN2021138733 W CN 2021138733W WO 2022227615 A1 WO2022227615 A1 WO 2022227615A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
data
upgrade data
earphone
charging box
Prior art date
Application number
PCT/CN2021/138733
Other languages
English (en)
French (fr)
Inventor
薛俊晓
Original Assignee
歌尔股份有限公司
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 歌尔股份有限公司 filed Critical 歌尔股份有限公司
Publication of WO2022227615A1 publication Critical patent/WO2022227615A1/zh

Links

Images

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

Definitions

  • the present invention relates to the technical field of data transmission, and in particular, to a data upgrade method, a data upgrade device and a readable storage medium.
  • TWS Truste Wireless Stereo, true wireless stereo
  • earphones include main earphones and auxiliary earphones.
  • the main earphones and auxiliary earphones can be placed in the charging box for charging, and the main earphones and auxiliary earphones can also be controlled through the charging box.
  • the main earphone, the auxiliary earphone and the charging box are all provided with a software control program.
  • the software program needs to be updated and upgraded from time to time.
  • the main headset receives the upgrade data.
  • the main earphone parses and processes the upgrade data, and then forwards the upgrade data to the auxiliary earphone or charging box. In this way, the steps of parsing and then forwarding the main earphone take a long time, which leads to a reduction in the efficiency of software upgrade of the charging box.
  • a data upgrade method proposed by the present invention is applied to earphones, and the earphones are charged by a charging box, and the data upgrade method includes:
  • the upgrade data package includes the upgrade data of the charging box, and the upgrade data of the charging box is transmitted to the charging box based on the earphone.
  • the upgrade data package includes the headset firmware type and the charging box firmware type;
  • the steps include:
  • the upgrade data package includes the charging box firmware type, it is determined that the upgrade data package includes charging box upgrade data.
  • the headset includes a main headset and an auxiliary headset that are wirelessly connected, and after the step of determining that the upgrade data package includes the headset upgrade data, it includes:
  • the earphone upgrade data is stored in the main earphone, and the earphone upgrade data is transmitted to the auxiliary earphone based on the main earphone, so as to upgrade the main earphone and the auxiliary earphone.
  • the present invention also provides a data upgrade method, which is applied to a communication terminal, the communication terminal is connected to an earphone, and the earphone is charged by a charging box, and the data upgrade method includes:
  • the headset upgrade data and/or the charging box upgrade data marked with the firmware type are respectively packaged and sent to the headset.
  • the step of marking the firmware type of the parsed earphone upgrade data and/or the charging box upgrade data includes:
  • the earphone firmware type is marked in the earphone upgrade data
  • 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.
  • the steps include:
  • the step of parsing the earphone upgrade data and/or the charging box upgrade data in the upgrade data it includes:
  • Extracting the earphone upgrade data and/or the charging box upgrade data in the parsed upgrade data Extracting the earphone upgrade data and/or the charging box upgrade data in the parsed upgrade data.
  • the step of sending the headset upgrade data and/or the charging box upgrade data marked with the firmware type to the headset in a package including:
  • the present invention also provides a data upgrade device, which is applied to earphones, and the data upgrade device includes:
  • the receiving module is used to receive the parsed upgrade data package
  • the determining module is configured to determine that the upgrade data package includes charging box upgrade data, and then transmit the charging box upgrade data to the charging box based on the earphone.
  • the present invention also provides a readable storage medium, on which a data transmission program is stored, and when the data transmission program is executed by a processor, the data upgrade method as described above is implemented. step.
  • the earphone after receiving the parsed upgrade data package, determines the upgrade data type included in the upgrade data package, and when it is determined that the upgrade data type is the charging box upgrade data, it means that the upgrade target is the charging box, The upgrade data of the charging box in the upgrade data package is directly transmitted to the charging box through the headset, thereby completing the upgrade of the charging box.
  • the analysis of the upgrade data package received by the earphone has been completed. After the upgrade data received by the earphone, it is judged whether the upgrade object is the charging box or not. If it is determined that the upgrade object is the charging box, the earphone will update the data package. Transparent transmission to the charging box.
  • the earphone does not need to parse and process the upgrade data package, and the earphone only needs to determine the upgrade object of the upgrade data package. Then, in the case of reducing the parsing data of the earphone, the data transmission of the charging box can be completed by one forwarding, which improves the upgrading efficiency of the charging of the charging box.
  • FIG. 1 is a schematic flowchart of a first embodiment of a data upgrade method according to the present invention
  • FIG. 2 is a schematic flowchart of a second embodiment of a data upgrade method according to the present invention.
  • FIG. 3 is a schematic flowchart of a third embodiment of a data upgrade method according to the present invention.
  • FIG. 4 is a schematic flowchart of a fourth embodiment of a data upgrade method according to the present invention.
  • FIG. 5 is a schematic flowchart of a fifth embodiment of a data upgrade method according to the present invention.
  • FIG. 6 is a schematic flowchart of a sixth embodiment of a data upgrade method according to the present invention.
  • FIG. 7 is a schematic flowchart of a seventh embodiment of a data upgrade method according to the present invention.
  • FIG. 8 is a schematic flowchart of an eighth embodiment of a data upgrade method according to the present invention.
  • FIG. 9 is a schematic flowchart of a ninth embodiment of a data upgrade method according to the present invention.
  • FIG. 10 is a schematic structural diagram of a data upgrade apparatus of the present invention.
  • TWS earphones When using TWS earphones, users wear one earphone in each ear. One of the two earphones is the main earphone and the other is the auxiliary earphone. The main earphone and the auxiliary earphone can be placed in the charging box for charging. It can realize the control of the main earphone and auxiliary earphone. Headphones and charging boxes often need to be upgraded. In the current upgrade scheme, the main earphone stores and parses the upgraded data, and the data type after analysis is sent to the auxiliary earphones or charging box. Such a process takes a long time, which reduces the efficiency of software upgrade of the charging box.
  • the present invention provides a data upgrade method.
  • the data upgrade method is applied to earphones.
  • the earphones are charged by the charging box.
  • the earphones can be stored in the charging case, and the earphones can also be charged.
  • Data upgrade methods include:
  • Step S110 receiving the parsed upgrade data package; the earphone is wirelessly connected to the audio device, and the audio device includes a communication terminal, such as a smart phone.
  • the sound is played through an audio device and the user can listen to it through headphones.
  • the way in which the headset is connected to the audio device includes a Bluetooth connection.
  • the byte size of the parsed upgrade data packet is fixed, for example, 512 bytes. At 512 bytes, the data transmission speed can be improved, and the transmission speed can be reduced due to the excessively large data packet. Of course, the byte size of the upgrade data packet is not limited to 512 bytes.
  • the headset does not need to parse the upgrade data package, and the analysis of the upgrade data package is done by other devices.
  • communication terminals namely smart phones, tablet computers, etc.
  • Headphones include primary and secondary headphones, any of which can receive upgrade data packages.
  • the main headset receives an upgrade data packet
  • the upgrade data packet does not perform any data processing when passing through the main headset, and the main headset is a transit node for data transmission.
  • the main headset determines the data type of the upgrade data, that is, the firmware type, which can also be understood as the upgrade target, and the main headset forwards or stores data according to the upgrade target.
  • the upgrade data package received by the auxiliary headset does not perform any data processing when the upgrade data package passes through the auxiliary headset, and the auxiliary headset is a transit node for data transmission.
  • the auxiliary headset determines the data type of the upgrade data, and the auxiliary headset forwards or stores the data according to the upgrade target.
  • step S120 it is determined that the upgrade data package includes the upgrade data of the charging box, and the upgrade data of the charging box is transmitted to the charging box based on the earphone.
  • the upgrade data package can be charging box upgrade data or earphone upgrade data.
  • the earphone includes a main earphone and an auxiliary earphone that are wirelessly connected.
  • the main earphone and the auxiliary earphone can be wirelessly connected to the communication terminal at the same time, or the auxiliary earphone can be wirelessly connected to the communication terminal through the main earphone.
  • the auxiliary earphone is connected to the communication terminal through the main earphone
  • the terminal is wirelessly connected, the data of the upgraded charging box passes through the main earphone and the charging box in sequence, and the data of the upgraded earphone passes through the main earphone and the auxiliary earphone in sequence.
  • the data for upgrading the charging box can pass through the main earphone to the charging box in turn, or can be sent by the communication terminal to the main earphone and the auxiliary earphone, and the main earphone and the auxiliary earphone can be sent to the charging box at the same time.
  • the data of the upgraded earphones is directly sent by the communication terminal to the main earphone and the auxiliary earphone respectively.
  • the main earphone and the auxiliary earphone recognize the data of the upgraded earphone, the main earphone and the auxiliary earphone save the corresponding data and upgrade.
  • the earphone after receiving the parsed upgrade data package, determines the upgrade data type included in the upgrade data package, and when it is determined that the upgrade data type is the charging box upgrade data, it means that the upgrade target is the charging box , and directly transmit the charging box upgrade data in the upgrade data package to the charging box through the headset, thereby completing the upgrade of the charging box.
  • the analysis of the upgrade data package received by the earphone has been completed. After the upgrade data received by the earphone, it is judged whether the upgrade object is the charging box or not. If it is determined that the upgrade object is the charging box, the earphone will update the data package. Transparent transmission to the charging box.
  • the earphone does not need to parse and process the upgrade data package, and the earphone only needs to determine the upgrade object of the upgrade data package. Then, in the case of reducing the parsing data of the earphone, the data transmission of the charging box can be completed by one forwarding, which improves the upgrading efficiency of the charging of the charging box.
  • the upgrade package includes the headset firmware type and charging case firmware type.
  • the firmware type represents the upgrade target of the upgrade package.
  • the upgrade data package includes start bit, data length, firmware type, check bit and firmware data.
  • the start bit is the start position of the upgrade data package. In a long string of data, the start bit can be used to determine where the data starts and ends, and then the entire upgrade data package can be distinguished.
  • the data length represents the byte size of the entire upgrade packet.
  • the firmware type represents the upgrade target.
  • the firmware type includes the headset firmware type and the charging box firmware type. The headset firmware type indicates that the upgrade target is the headset, and the charging box firmware type indicates that the upgrade target is the charging box.
  • a check digit is set in the check digit, and the data is prone to errors during transmission.
  • the check digit in the check digit can check whether the data in the upgrade data packet is accurate.
  • the firmware data is the valid upgrade data in the upgrade data package. When upgrading the headset or the charging box, the firmware data is mainly used to complete the upgrade of the corresponding firmware.
  • Step S130 determine the firmware type included in the upgrade data package; set the character representing the firmware type in the upgrade data package, after extracting the character information representing the firmware type, determine the upgrade target of the upgrade data package according to the rules.
  • 0 represents the headset firmware type
  • 1 represents the charging case firmware type.
  • it can also be 1 to represent the headset firmware type, and 0 to represent the charging box firmware type.
  • Other numbers or letters may also represent the headset firmware type or the charging box firmware type.
  • Step S131 if the upgrade data package includes the headset firmware type, it is determined that the upgrade data package includes headset upgrade data.
  • Step S132 if the upgrade data package includes the charging box firmware type, it is determined that the upgrade data package includes charging box upgrade data.
  • the firmware types included in the upgrade data package can be determined through steps S131 and S132, and different firmware types represent different upgrade targets.
  • the headset firmware type means that the upgrade target is the headset
  • the charging box firmware type means that the upgrade target is the charging box.
  • the firmware type in the upgrade data package is the headset firmware type
  • the firmware data is the headset upgrade data.
  • the firmware type in the upgrade data package is the charging box firmware type
  • the firmware data is the charging box upgrade data.
  • a third embodiment of the present invention is proposed.
  • the charging box When the charging box is upgraded, it will be accompanied by an upgrade of the earphones.
  • After determining the steps to include the headset upgrade data in the upgrade package include:
  • step S140 the earphone upgrade data is stored in the main earphone, and the earphone upgrade data is transmitted to the auxiliary earphone based on the main earphone, so as to upgrade the main earphone and the auxiliary earphone.
  • the upgrade data packet is received through the main earphone, and the upgrade data packet is directly forwarded to the charging box or the auxiliary earphone through the main earphone.
  • the earphone upgrade data needs to be sent to the main earphone respectively, and then sent from the main earphone to the auxiliary earphone.
  • a storage unit such as a temporary storage, is provided in the main earphone.
  • the main headset saves a copy of the headset upgrade data in the temporary storage, and copies a copy of the headset upgrade data and forwards it to the auxiliary headset.
  • the earphone upgrade data is stored in both the main earphone and the auxiliary earphone, and when the charging box is upgraded, the main earphone and the auxiliary earphone can be upgraded respectively.
  • the present invention also provides a data upgrade method.
  • the data upgrade method is applied to a communication terminal.
  • the communication terminal is wirelessly connected to the earphone, and the earphone is charged by a charging box.
  • the data upgrade method includes:
  • Step S210 parsing the earphone upgrade data and/or the charging box upgrade data in the upgrade data; it can be seen that the upgrade data may include three situations.
  • the first situation is that the earphone upgrade data and the charging box upgrade data exist at the same time, and the upgrade of the charging box is accompanied by a software upgrade of the earphone.
  • the upgrade data comes from the background server.
  • the maintenance personnel When it is necessary to upgrade the software of the earphone and charging box, the maintenance personnel will compress the upgrade data and upload it to the background server.
  • the background server is connected to the network. After the communication terminal is connected to the network, the communication terminal will download the upgrade data. , which is saved locally on the communication terminal.
  • the upgrade data is first decompressed, and the decompressed upgrade data is analyzed to obtain the earphone upgrade data and the charging box upgrade data in the upgrade data.
  • the upgrade data includes the headset upgrade data, or the upgrade data includes the charging box upgrade data.
  • the earphone upgrade data and the charging box upgrade data are obtained respectively. Then, the earphone is upgraded according to the obtained earphone upgrade data, or the charging box is upgraded according to the charging box upgrade data.
  • Step S220 marking the firmware type for the parsed earphone upgrade data and/or charging box upgrade data; in this way, the upgrade targets of the upgrade data are distinguished.
  • the upgrade data may be used to upgrade the headset, or it may be used to upgrade the charging case, in order to determine the upgrade target.
  • mark the headset firmware type in the headset upgrade data and mark the charging box firmware type in the charging box upgrade data.
  • Different firmware types represent different upgrade targets.
  • the headset firmware type indicates that the upgrade target is the earphone
  • the charging box firmware type indicates that the upgrade target is the charging box.
  • step S230 the earphone upgrade data and/or the charging box upgrade data marked with the firmware type are respectively packaged and sent to the earphone.
  • the corresponding upgrade data is packaged to facilitate data transmission.
  • the upgrade data of the headset and the upgrade data of the charging box are packaged separately to generate the upgrade data package; after the firmware type is marked, the upgrade data needs to be transmitted to the headset.
  • the headset upgrade data and the charging box upgrade data are packaged separately to generate upgrade data packages.
  • the number of bytes of each upgrade data package can be limited to 512 bytes. Since the headset upgrade data and charging box upgrade data may have a large amount of data, there may be multiple upgrade data packages in the upgrade data package.
  • the byte size of the upgrade data package is not limited to 512 bytes. As long as the data transmission channel can accommodate enough data to pass through, the number of bytes in each upgrade data packet can be increased, and the upgrade data per packet can also be reduced according to needs. The number of bytes in the packet.
  • the communication terminal sends the upgrade data packets to the earphones one by one through Bluetooth. After the earphones receive the upgrade data packets, they send the upgrade data packets to the charging box.
  • the purpose of parsing the upgrade data is to obtain earphone upgrade data for upgrading the earphone and/or charging box upgrade data for upgrading the charging box.
  • the upgrade target can be either the earphone or the charging box, and the earphone and the charging box can also be upgraded at the same time.
  • the upgrade target refers to the target of the upgrade data.
  • upgrade targets include headphones and charging cases. Therefore, it is necessary to determine whether there is corresponding data information in the upgrade data.
  • the specific content of the upgrade data can be obtained.
  • These upgrade data are divided into earphone upgrade data and charging box upgrade data, so that the earphone firmware type is added to the earphone upgrade data, and the charging box firmware type is added to the charging box upgrade data.
  • the earphone upgrade data and the charging box upgrade data, or one of the earphone upgrade data and the charging box upgrade data are acquired.
  • the communication terminal completes the distinction between the upgrade data of the earphone and the upgrade data of the charging box, and will do a good job of distinguishing the upgrade data of the earphone and the upgrade data of the charging box.
  • the upgrade data package can be sent to the charging box in order to upgrade the charging box.
  • only the firmware type marking of the headset upgrade data is carried out, only the headset upgrade data is packaged and sent.
  • only the firmware type marking of the upgrade data of the charging box is carried out, only the upgrade data of the charging box is sent in a package.
  • the earphone includes a main earphone and an auxiliary earphone that are wirelessly connected.
  • the main earphone and the auxiliary earphone can be wirelessly connected to the communication terminal at the same time, or the auxiliary earphone can be wirelessly connected to the communication terminal through the main earphone.
  • the parsed upgrade data is sent to the main earphone, the data of the upgraded charging box goes through the main earphone and the charging box in turn, and the data of the upgraded earphone goes through the main earphone and the auxiliary earphone in turn.
  • the parsed upgrade data is sent to the main earphone and the auxiliary earphone at the same time.
  • the data for upgrading the charging box can pass through the main earphone to the charging box in turn, or can be sent by the terminal to the main earphone.
  • auxiliary earphone, the main earphone and auxiliary earphone are sent to the charging box at the same time, and the data of the upgraded earphone is directly sent to the main earphone and auxiliary earphone respectively by the communication terminal.
  • Headphones and auxiliary headphones save the corresponding data and update.
  • Step S221 if the earphone upgrade data is parsed, the earphone firmware type is marked in the earphone upgrade data. That is to say, only the headset is upgraded at this time. In order to ensure that the data can be transmitted to the headset, the headset firmware type is marked in the headset upgrade data.
  • 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 to say, only the charging box is upgraded at this time. In order to ensure that the data can be transmitted to the charging box, the firmware type of the charging box is marked in the charging box upgrade data.
  • Step S223 if the earphone upgrade data and the charging box upgrade data are parsed, 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.
  • both the headset and the charging box need to be upgraded.
  • only one of the upgrade data can be marked with a firmware type, and the other data without a firmware type mark can be directly sent to the corresponding firmware.
  • the headset firmware type is marked in the headset upgrade data, and the firmware type is not marked in the charging box upgrade data. Send the data with the firmware type of the headset to the headset, and send the data without the firmware type tag to the charging case.
  • the charging box firmware type is marked in the charging box upgrade data, and the firmware type is not marked in the headset upgrade data. Send data with the firmware type of the charging case to the charging case, and data without the firmware type tag to the headset. In this way, the operation of marking the firmware type can be reduced, and the data transmission speed can be improved.
  • a sixth embodiment of the present invention is proposed.
  • the headset upgrade data and charging box upgrade data in the upgrade data include:
  • Step S240 accept the download instruction, and download the upgrade data according to the download instruction.
  • the download instruction may be generated from the data version number in the active comparison headset. For example, after the comparison data version number is not the latest version, the download instruction is generated.
  • the communication terminal downloads the upgrade data according to the download instruction.
  • the communication terminal can also receive the download instruction sent by the user, and download according to the user's choice. After the communication terminal downloads the upgrade data, it analyzes and processes the upgrade data to complete the distinction of upgrade targets.
  • a seventh embodiment of the present invention is proposed. After parsing the headphone upgrade data and/or charging box upgrade data in the upgrade data, the steps include:
  • Step S250 extracting the earphone upgrade data and/or the charging box upgrade data in the parsed upgrade data.
  • the analysis and processing of the upgrade data is to distinguish the upgrade data of the headset from the upgrade data of the charging box, or to obtain one of the upgrade data. It is further necessary to continue with the step of marking the firmware type. Therefore, after the parsing process is completed, an extraction command is generated, and according to the extraction command, the earphone upgrade data and the charging box upgrade data in the upgrade data are extracted, so as to complete the distinguishing identification of the earphone upgrade data and the charging box upgrade data. Ensure the smooth transmission of data.
  • the number of upgrade data packages can be multiple. After the steps of sending the upgrade data package marked with the firmware type to the headset, include:
  • Step S260 it is judged whether the transmission of the upgrade data is completed; the upgrade data is sent in the form of a package, and to complete the normal upgrade of the charging box, it is necessary to ensure that all the upgrade data is sent. To determine whether the upgrade data has been sent, it can be detected whether there is still upgrade data information in the communication terminal.
  • the step of judging whether the transmission is completed may be intermittent, and the detection may be performed once every period of time, or the detection and judgment may be performed continuously.
  • Step S261 if the sending is completed, the earphone is notified that the data transmission has been completed; after the sending is completed, the earphone sends a completion instruction, and after the earphone receives the completion instruction, the system can be restarted and the software can be upgraded at the same time.
  • Software upgrades have a version number. After the upgrade is complete, the new version number will overwrite the original version number.
  • Step S262 if the sending is not completed, continue to perform the steps of acquiring the earphone upgrade data and the charging box upgrade data in the upgrade data. After judging that the upgrade data has not been sent, step S250 is repeatedly executed, and both the earphone upgrade data and the charging box upgrade data for which the upgrade data has not been sent are packaged to form an upgrade data package, and sent to the earphones one by one.
  • a ninth embodiment of the present invention is proposed.
  • the headset After notifying the headset that the data transmission has been completed, it also includes:
  • Step S270 waiting for the earphone to be reconnected with the communication terminal; when the earphone and the charging box are upgraded, the earphone and the charging box need to be restarted, and the connection between the earphone and the communication terminal is disconnected at this time.
  • the firmware upgrade of the earphone and the charging box it is determined by the communication terminal whether the software version numbers in the earphone and the charging box are the same as the version number downloaded by the communication terminal. For this reason, it is necessary to wait for the headset to be reconnected with the communication terminal.
  • Step S280 after the headset is reconnected to the communication terminal, determine whether the software version number in the headset is the latest version; after the headset and the charging box are restarted, the software upgrade is complete, and the headset is connected to the communication terminal again through Bluetooth.
  • the headset sends its own version number and the version number in the charging box to the communication terminal.
  • the sent version number received by the communication terminal is compared with the downloaded software version number. If the two are consistent, the software upgrade is successful; if the two are inconsistent, the software upgrade fails.
  • Step S281 if the software version number in the headset 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 headset is also V2, the software upgrade is successful.
  • the software version number in the headset includes the version number reported by the charging box. That is to say, while judging the version number in the headset, the version number judgment of the charging box is also completed.
  • 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, if the latest version number is V2, if the version number reported by the headset is V1, it means that the software upgrade failed. For this reason, it is necessary to update the software of the headset or charging box again after re-acquiring the upgrade data.
  • the present invention also provides a data upgrade device, the data upgrade device is applied to an earphone, and the earphone is charged by a charging box, and the data upgrade device includes: a receiving module 110 and a determining module 120 .
  • the receiving module 110 is used for receiving the parsed upgrade data package; the main earphone and the auxiliary earphone are wirelessly connected to an audio device, and the audio device includes a communication terminal, such as a smart phone. The sound is played through the audio device, and the user can listen to it through the primary and secondary headphones.
  • the manner in which the main earphone and the auxiliary earphone are connected to the audio device includes a Bluetooth connection.
  • the parsed upgrade data package the upgrade data for the earphones for upgrading and the upgrade data for upgrading the charging box have been distinguished.
  • the byte size of the parsed upgrade data packet is fixed, for example, 512 bytes. At 512 bytes, the data transmission speed can be improved, and the transmission speed can be reduced due to the excessively large data packet.
  • the byte size of the upgrade data packet is not limited to 512 bytes. As long as the data transmission channel can accommodate enough data to pass through, the number of bytes of each upgrade data packet can be increased, and at the same time, the number of bytes per packet can be reduced as required. The number of bytes in the upgrade package.
  • the determining module 120 is configured to determine that the upgrade data package includes the charging box upgrade data, and then transmit the charging box upgrade data to the charging box based on the earphone, so as to upgrade the charging box.
  • the upgrade data package can be charging box upgrade data or earphone upgrade data. Before transferring to the charging box, it is first necessary to determine whether the data in the upgrade data package is the earphone upgrade data or the charging box upgrade data. After it is determined that the upgrade data package includes the upgrade data of the charging box, the upgrade data of the charging box is directly transmitted to the charging box through the main headset, thereby completing the software upgrade of the charging box.
  • the receiving module 110 and the determining module 120 may be arranged in the main earphone or in the auxiliary earphone.
  • the main headset receives the upgrade data package, and the upgrade data package does not process the data when it passes through the main headset, and the main headset is the transfer node for data transmission.
  • the main earphone determines the data type of the upgrade data, and the main earphone forwards the data according to the data type.
  • the upgrade data package received by the auxiliary headset does not perform any data processing when the upgrade data package passes through the auxiliary headset, and the auxiliary headset is a transit node for data transmission.
  • the auxiliary headset determines the data type of the upgrade data, and the auxiliary headset performs data forwarding according to the data type.
  • the parsed upgrade data packet is received by the receiving module 110 .
  • the determination module 120 determines that the upgrade data package includes the charging box upgrade data, and the determination module 120 directly controls the earphone to send the charging box upgrade data to the charging box, thereby completing the software upgrade of the charging box.
  • the present invention further provides a readable storage medium on which a data transmission program is stored, and when the data transmission program is executed by a processor, implements the steps of the data upgrading method described above.
  • a software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other in the technical field. in any other known form of storage medium.

Landscapes

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

Abstract

一种数据升级方法、数据升级装置和可读存储介质,数据升级方法应用于耳机,耳机运用充电盒充电,数据升级方法包括:接收解析后的升级数据包(S110);确定升级数据包中包括充电盒升级数据,则基于耳机将充电盒升级数据传输给充电盒(S120)。该技术方案不需要耳机对升级数据包进行解析处理,能够提高充电盒的升级效率。

Description

数据升级方法、数据升级装置和可读存储介质
本申请要求于2021年4月27日提交中国专利局、申请号为202110463060.7、发明名称为“数据升级方法、数据升级装置和可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及数据传输技术领域,尤其涉及一种数据升级方法、数据升级装置和可读存储介质。
背景技术
TWS(True Wireless Stereo,真无线立体声)耳机,包括有主耳机和辅耳机,主耳机和辅耳机可以放置在充电盒内进行充电,通过充电盒还可以实现对主耳机和辅耳机的控制。主耳机、辅耳机以及充电盒内均设置有软件控制程序。软件程序不定期的需要更新升级,目前的升级方案中,是主耳机接收升级数据。主耳机对升级数据进行解析处理,再将升级数据转发给辅耳机或者充电盒。如此经过主耳机的解析再转发的步骤,耗费时间较长,导致充电盒软件升级的效率降低。
发明内容
基于此,针对目前在对耳机进行软件升级时,升级数据经过主耳机的解析再转发,导致软件升级的效率降低的问题,有必要提供一种数据升级方法、数据升级装置和可读存储介质,旨在能够提高充电盒软件升级的效率。
为实现上述目的,本发明提出的一种数据升级方法,应用于耳机,所述耳机运用充电盒充电,所述数据升级方法包括:
接收解析后的升级数据包;
确定所述升级数据包中包括充电盒升级数据,则基于所述耳机将所述充电盒升级数据传输给充电盒。
可选地,所述升级数据包中包括耳机固件类型和充电盒固件类型;
所述确定所述升级数据包中包括充电盒升级数据的步骤之前,包括:
判断所述升级数据包中包括的固件类型;
若所述升级数据包中包括耳机固件类型,则确定所述升级数据包中包括耳机升级数据;
若所述升级数据包中包括充电盒固件类型,则确定所述升级数据包中包括充电盒升级数据。
可选地,所述耳机包括无线连接的主耳机和辅耳机,所述确定所述升级数据包中包括耳机升级数据的步骤之后,包括:
将所述耳机升级数据存储在所述主耳机中,并基于所述主耳机将所述耳机升级数据传输给所述辅耳机,以升级所述主耳机和所述辅耳机。
此外,为了实现上述目的,本发明还提供一种数据升级方法,应用于通讯终端,所述通讯终端连接于耳机,所述耳机运用充电盒充电,所述数据升级方法包括:
解析升级数据中的耳机升级数据和/或充电盒升级数据;
对解析出的所述耳机升级数据和/或所述充电盒升级数据标记固件类型;
将标记有固件类型的所述耳机升级数据和/或所述充电盒升级数据分别组包发送给耳机。
可选地,所述对解析出的所述耳机升级数据和/或所述充电盒升级数据标注固件类型的步骤,包括:
若解析出耳机升级数据,则在所述耳机升级数据中标记耳机固件类型;
若解析出充电盒升级数据,则在所述充电盒升级数据中标记充电盒固件类型;
若解析出耳机升级数据和充电盒升级数据,则在所述耳机升级数据中标记耳机固件类型和/或在所述充电盒升级数据中标记充电盒固件类型。
可选地,所述解析升级数据中的耳机升级数据和/或充电盒升级数据的步骤之前,包括:
接受下载指令,依据所述下载指令下载所述升级数据。
可选地,所述解析升级数据中的耳机升级数据和/或充电盒升级数据的步 骤之后,包括:
提取解析后的所述升级数据中的耳机升级数据和/或充电盒升级数据。
可选地,所述将标记有固件类型的所述耳机升级数据和/或所述充电盒升级数据分别组包发送给耳机的步骤之后,包括:
判断所述升级数据是否发送完成;
若发送完成,则通知耳机已完成数据发送;
若发送未完成,则继续执行提取解析后的所述升级数据中的耳机升级数据和/或充电盒升级数据的步骤。
此外,为了实现上述目的,本发明还提供一种数据升级装置,应用于耳机,所述数据升级装置包括:
接收模块,用于接收解析后的升级数据包;
确定模块,用于确定所述升级数据包中包括充电盒升级数据,则基于所述耳机将所述充电盒升级数据传输给充电盒。
此外,为了实现上述目的,本发明还提供一种可读存储介质,所述可读存储介质上存储有数据传输程序,所述数据传输程序被处理器执行时实现如上文所述数据升级方法的步骤。
本发明提出的技术方案中,耳机在接收解析后的升级数据包后,确定升级数据包中包括的升级数据类型,在确定升级数据类型为充电盒升级数据时,则说明升级目标是充电盒,通过耳机直接将升级数据包中的充电盒升级数据传输给充电盒,从而完成对充电盒的升级。本发明的技术方案,耳机收到的升级数据包已经完成解析,耳机收到的升级数据后,判断升级对象是不是充电盒,在确定升级对象是充电盒的情况下,耳机则将升级数据包透传给充电盒。如此,在升级过程中,不需要耳机对升级数据包进行解析处理,耳机只需判断升级数据包的升级对象。继而在减少了耳机解析数据的情况下,通过一次转发就可以完成充电盒的数据的传输,提高了充电盒充的升级效率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一部分附图,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本发明数据升级方法第一实施例的流程示意图;
图2为本发明数据升级方法第二实施例的流程示意图;
图3为本发明数据升级方法第三实施例的流程示意图;
图4为本发明数据升级方法第四实施例的流程示意图;
图5为本发明数据升级方法第五实施例的流程示意图;
图6为本发明数据升级方法第六实施例的流程示意图;
图7为本发明数据升级方法第七实施例的流程示意图;
图8为本发明数据升级方法第八实施例的流程示意图;
图9为本发明数据升级方法第九实施例的流程示意图
图10为本发明数据升级装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
用户在使用TWS耳机时,在两耳中分别佩戴有一个耳机,两个耳机中一个是主耳机,另一个是辅耳机,主耳机和辅耳机可以放置在充电盒内进行充电,通过充电盒还可以实现对主耳机和辅耳机的控制。耳机和充电盒经常需要升级,目前的升级方案中,是主耳机对升级数据储存并进行解析,解析后数据类型发送给辅耳机或充电盒。如此流程,耗费时间较长,导致充电盒软件升级的效率降低。
为了解决上述问题,参阅图1所示,提出本发明的第一实施例,本发明提供一种数据升级方法,数据升级方法应用于耳机,耳机运用充电盒充电,用户在不使用耳机时,可以将耳机放置于充电盒保存,还能够对耳机进行充电。数据升级方法包括:
步骤S110,接收解析后的升级数据包;耳机无线连接于音频设备,音频设备包括通讯终端,例如,智能手机。通过音频设备播放声音,用户可以通过耳机进行收听。耳机连接于音频设备的方式包括蓝牙连接。解析后的升级数据包中,用于升级的耳机的升级数据和用于升级充电盒的升级数据已经完成了区分。解析后的升级数据包的字节大小固定,例如512个字节,在512个字节能够提高数据传输的速度,避免数据包过大导致传输速度降低。当然,升级数据包的字节大小也不限于512个字节,只要数据传输通道能够容纳足够的数据通过,可以提高每包升级数据包的字节数量,同时也还可以根据需要,降低每包升级包的字节数量。需要指出的是,耳机不需要解析升级数据包,对升级数据包的解析作业通过其他设备完成。例如通讯终端,即智能手机、平板电脑等。耳机包括主耳机和辅耳机,其中任何一个耳机都可以接收升级数据包。比如说,主耳机接收到升级数据包,升级数据包在经过主耳机时,不对数据进行任何处理,主耳机是数据传输的中转节点。主耳机判断升级数据的数据类型,即固件类型,也可以理解为升级目标,主耳机在依据升级目标进行数据转发或储存。再比如说,辅耳机接收到的升级数据包,升级数据包在经过辅耳机时,不对数据进行任何处理,辅耳机是数据传输的中转节点。辅耳机判断升级数据的数据类型,辅耳机在依据升级目标进行数据转发或储存。
步骤S120,确定升级数据包中包括充电盒升级数据,则基于耳机将充电盒升级数据传输给充电盒。升级数据包中可以是充电盒升级数据,也可以是耳机升级数据,在传输给充电盒之前,首先要确定升级数据包中的数据是耳机升级数据还是充电盒升级数据。在确定了升级数据包中包括充电盒升级数据后,直接通过耳机将充电盒升级数据传输给充电盒,从而完成充电盒的软件升级。
本实施例中,耳机包括无线连接的主耳机和辅耳机,主耳机和辅耳机可以同时和通讯终端无线连接,也可以辅耳机通过主耳机与通讯终端无线连接,当辅耳机通过主耳机与通讯终端无线连接时,升级充电盒的数据依次经过主耳机和充电盒,升级耳机的数据依次经过主耳机和辅耳机。当主耳机和辅耳机同时与通讯终端连接时,如此,升级充电盒的数据可以依次经过主耳机至充电盒,也可以由通讯终端发送给主耳机和辅耳机,由主耳机和辅耳机同时 发送至充电盒,升级耳机的数据则直接由通讯终端分别发送给主耳机和辅耳机,主耳机和辅耳机识别到为升级耳机的数据时,则主耳机和辅耳机保存相应数据并升级。通过通讯终端同时连接主耳机和辅耳机的方式,可以提高数据转发的速度。
本实施例提出的技术方案中,耳机在接收解析后的升级数据包后,确定升级数据包中包括的升级数据类型,在确定升级数据类型为充电盒升级数据时,则说明升级目标是充电盒,通过耳机直接将升级数据包中的充电盒升级数据传输给充电盒,从而完成对充电盒的升级。本发明的技术方案,耳机收到的升级数据包已经完成解析,耳机收到的升级数据后,判断升级对象是不是充电盒,在确定升级对象是充电盒的情况下,耳机则将升级数据包透传给充电盒。如此,在升级过程中,不需要耳机对升级数据包进行解析处理,耳机只需判断升级数据包的升级对象。继而在减少了耳机解析数据的情况下,通过一次转发就可以完成充电盒的数据的传输,提高了充电盒充的升级效率。
参阅图2所示,在本发明的第一实施例的基础上,提出本发明的第二实施例。升级数据包中包括耳机固件类型和充电盒固件类型。固件类型代表了升级数据包的升级目标。升级数据包中包括开始位、数据长度、固件类型、校验位和固件数据。其中,开始位是升级数据包的开始位置,在较长的一串数据中,通过开始位可以判断出数据从哪里开始,在哪里结束,进而分辨出整个升级数据包。数据长度代表了整个升级数据包的字节大小。固件类型代表了升级目标,固件类型包括耳机固件类型和充电盒固件类型,耳机固件类型就代表升级目标是耳机,充电盒固件类型代表升级目标是充电盒。校验位内设置有校验码,数据在传输过程中容易出错,通过校验位内的校验码可以校验升级数据包中的数据是否准确。固件数据是升级数据包中的有效升级数据,在对耳机或者充电盒进行升级时,主要采用固件数据完成对相应固件的升级。
确定升级数据包中包括充电盒升级数据的步骤之前,包括:
步骤S130,判断升级数据包中包括的固件类型;在升级数据包中设置有代表固件类型的字符,提取出代表固件类型的字符信息后,依据规则判断升级数据包的升级目标。例如,0代表耳机固件类型,1代表充电盒固件类型。在提取出固件类型的字符信息后,可以通过该字符是0还是1来判断是耳机固件类型还是充电盒固件类型。当然,也可以是1代表耳机固件类型,0代表充 电盒固件类型。还可以是其它数字或者字母代表耳机固件类型或者是充电盒固件类型。
步骤S131,若升级数据包中包括耳机固件类型,则确定升级数据包中包括耳机升级数据。
步骤S132,若升级数据包中包括充电盒固件类型,则确定升级数据包中包括充电盒升级数据。
通过步骤S131和步骤S132可以判断得出升级数据包中包括的固件类型,不同的固件类型代表不同的升级目标。耳机固件类型就代表升级目标是耳机,充电盒固件类型就代表升级目标是充电盒。相应的,升级数据包中的固件类型是耳机固件类型,则固件数据就是耳机升级数据。升级数据包中的固件类型是充电盒固件类型,则固件数据就是充电盒升级数据。分辨出升级数据包的升级目标后,便于将升级数据包有针对性的发送。
参阅图3所示,在本发明的第二实施例的基础上,提出本发明的第三实施例。在对充电盒进行升级时,会伴随有对耳机的升级。确定升级数据包中包括耳机升级数据的步骤之后,包括:
步骤S140,将耳机升级数据存储在主耳机中,并基于主耳机将耳机升级数据传输给辅耳机,以升级主耳机和辅耳机。本实施例中,通过主耳机接收升级数据包,再通过主耳机直接将升级数据包转发给充电盒或者辅耳机。对耳机进行软件升级时,通常是主耳机和辅耳机均需要升级,因此在确定存在耳机升级数据后,需要将耳机升级数据分别发送给主耳机,在由主耳机发送给辅耳机。具体地,主耳机中设置有存储单元,例如,暂存器。主耳机将耳机升级数据保存在暂存器中一份,并且复制一份耳机升级数据转发给辅耳机。如此,主耳机和辅耳机中均保存有耳机升级数据,在对充电盒进行升级时,还可以分别完成主耳机和辅耳机的升级。
参阅图4所示,本发明的第四实施例。本发明还提供一种数据升级方法,数据升级方法应用于通讯终端,通讯终端无线连接于耳机,耳机运用充电盒充电,数据升级方法包括:
步骤S210,解析升级数据中的耳机升级数据和/或充电盒升级数据;如此可知升级数据中可以包括三种情况。第一种情况是,耳机升级数据和充电盒升级数据同时存在,在对充电盒进行升级时,伴随有对耳机的软件升级。升 级数据来源于后台服务器,在需要对耳机和充电盒进行软件升级时,维护人员将升级数据压缩后上传到后台服务器,后台服务器连接网络,通讯终端在连接网络后,通讯终端将升级数据下载下来,保存在通讯终端本地。先对升级数据进行解压处理,并且对解压的升级数据进行解析,获取到升级数据中的耳机升级数据和充电盒升级数据。此外,还有两种情况是,升级数据中包括耳机升级数据,或者是升级数据中包括充电盒升级数据。在这两种情况下,解析数据后,分别获得耳机升级数据和充电盒升级数据。再依据获得的耳机升级数据对耳机进行升级,或依据充电盒升级数据对充电盒进行升级。
步骤S220,对解析出的耳机升级数据和/或充电盒升级数据标记固件类型;如此,区分升级数据的升级目标。升级数据可能用来升级耳机,也可能用来升级充电盒,为了便于确定升级目标。在耳机升级数据中标记耳机固件类型,在充电盒升级数据中标记充电盒固件类型;为了便于在耳机中能够识别出升级数据是用来给耳机升级还是给充电盒升级,在获取到耳机升级数据和充电盒升级数据后,在耳机升级数据中标记耳机固件类型,在充电盒升级数据中标记充电盒固件类型。不同的固件类型代表不同的升级目标,耳机固件类型代表升级目标是耳机,充电盒固件类型代表升级目标是充电盒。
步骤S230,将标记有固件类型的耳机升级数据和/或充电盒升级数据分别组包发送给耳机。将相应的升级数据进行组包,从而便于数据的发送。具体地,耳机升级数据和充电盒升级数据分别组包生成升级数据包;标记了固件类型后,需要将升级数据传输给耳机,为了提高传输效率,避免一次性传输数据过多,造成数据通道堵塞,耳机升级数据和充电盒升级数据分别组包生成升级数据包。每包升级数据包的字节数可以限定在512个字节,由于耳机升级数据和充电盒升级数据可能数据量较多,因此升级数据包可能存在多个升级数据包。当然,升级数据包的字节大小也不限于512个字节,只要数据传输通道能够容纳足够的数据通过,可以提高每包升级数据包的字节数量,同时也可以根据需要,降低每包升级包的字节数量。通讯终端和耳机之间是无线连接,例如蓝牙连接。通讯终端将升级数据包逐个通过蓝牙发送给耳机,耳机在接收到升级数据包后,再将升级数据包发送给充电盒。
其中,对升级数据进行解析处理,目的在于获得用于升级耳机的耳机升级数据和/或用于升级充电盒的充电盒升级数据。如此可知,升级目标可以是 耳机或者是充电盒其中一个,还可以同时对耳机和充电盒进行升级。升级目标是指升级数据的作用对象。例如,升级目标包括耳机和充电盒。因此需要判断出升级数据中是否有对应的数据信息。通过对升级数据进行解析处理,从而可以得到升级数据的具体内容。将这些升级数据区分为耳机升级数据和充电盒升级数据,以便在耳机升级数据中添加耳机固件类型,在充电盒升级数据中添加充电盒固件类型。
本实施例提出的技术方案中,获取到耳机升级数据和充电盒升级数据,或者是耳机升级数据和充电盒升级数据中的一个。在耳机升级数据中增加耳机固件类型标记,在充电盒升级数据中增加充电盒固件类型标记。通讯终端完成对耳机升级数据和充电盒升级数据的区分,将做好区分耳机升级数据和充电盒升级数据分别组包生成升级数据包,在将这些升级数据包发送给耳机,耳机和充电盒无线连接,通过耳机可以将升级数据包发送给充电盒,以便升级充电盒。其中,在只进行了耳机升级数据的固件类型标记,则只对耳机升级数据进行组包发送。或者是,只进行了充电盒升级数据的固件类型标记,则只对充电盒升级数据进行组包发送。
本实施例中,耳机包括无线连接的主耳机和辅耳机,主耳机和辅耳机可以同时和通讯终端无线连接,也可以辅耳机通过主耳机与通讯终端无线连接,当辅耳机通过主耳机与通讯终端无线连接时,解析出的升级数据发送给主耳机,升级充电盒的数据依次经过主耳机和充电盒,升级耳机的数据依次经过主耳机和辅耳机。当主耳机和辅耳机同时与通讯终端连接时,解析出的升级数据同时发送给主耳机和辅耳机,如此,升级充电盒的数据可以依次经过主耳机至充电盒,也可以由终端发送给主耳机和辅耳机,由主耳机和辅耳机同时发送至充电盒,升级耳机的数据则直接由通讯终端分别发送给主耳机和辅耳机,主耳机和辅耳机识别到为升级耳机的数据时,则主耳机和辅耳机保存相应数据并升级。通过通讯终端同时连接主耳机和辅耳机的方式,可以提高数据转发的速度。
参阅图5所示,在本发明的第四实施例的基础上,提出本发明的第五实施例。
步骤S221,若解析出耳机升级数据,则在耳机升级数据中标记耳机固件类型。也就是此时只对耳机进行升级,为了保证数据能够传输给耳机,在耳 机升级数据中标记耳机固件类型。
步骤S222,若解析出充电盒升级数据,则在充电盒升级数据中标记充电盒固件类型。也就是此时只对充电盒进行升级,为了保证数据能够传输给充电盒,在充电盒升级数据中标记充电盒固件类型。
步骤S223,若解析出耳机升级数据和充电盒升级数据,则在耳机升级数据中标记耳机固件类型和/或在充电盒升级数据中标记充电盒固件类型。此时,需要对耳机和充电盒都进行数据升级。本实施例中,同时存在耳机升级数据和充电盒升级数据的情况下,可以只对其中的一个升级数据进行固件类型标记,将另一个没有固件类型标记的数据直接发送给对应的固件。具体地,在耳机升级数据中标记耳机固件类型,在充电盒升级数据中不做固件类型标记。将带有耳机固件类型的数据发送给耳机,将没有固件类型标记的数据发送给充电盒。还可以是,充电盒升级数据中标记充电盒固件类型,在耳机升级数据中不做固件类型标记。将带有充电盒固件类型的数据发送给充电盒,将没有固件类型标记的数据发送给耳机。如此,可以减少标记固件类型的运算,提高数据传输速度。
参阅图6所示,在本发明的第四实施例的基础上,提出本发明的第六实施例。为了顺利区分出升级数据的升级目标。解析升级数据中的耳机升级数据和充电盒升级数据的步骤之前,包括:
步骤S240,接受下载指令,依据下载指令下载升级数据。下载指令可以是来自主动对比耳机中的数据版本号来生成,例如,在对比数据版本号不是最新版本后,生成下载指令。通讯终端依据下载指令进行升级数据的下载。还可以通讯终端接收用户发出的下载指令,依据用户的选择而进行下载。通讯终端下载升级数据后,通过升级数据进行解析处理,完成对升级目标的区分。
参阅图7所示,在本发明的第四实施例的基础上,提出本发明的第七实施例。解析升级数据中的耳机升级数据和/或充电盒升级数据的步骤之后,包括:
步骤S250,提取解析后的升级数据中的耳机升级数据和/或充电盒升级数据。对升级数据解析处理,是将耳机升级数据和充电盒升级数据区分开,或者是获得其中一个升级数据。进一步的还需要继续执行标记固件类型的步骤。因此在完成解析处理后,生成一个提取命令,依据该提取命令,去提取升级 数据中的耳机升级数据和充电盒升级数据,以便完成对耳机升级数据和充电盒升级数据的区分标识。保证数据的顺利传输。
参阅图8所示,在本发明的第七实施例的基础上,提出本发明的第八实施例。升级数据包的数量可以有多个,将标记了固件类型的升级数据组包发送给耳机的步骤之后,包括:
步骤S260,判断升级数据是否发送完成;升级数据是以组包的形式发送的,要完成充电盒的正常升级,需要保证升级数据全部发送完毕。判断升级数据是否发送完毕,可以检测通讯终端内是否还存在升级数据的信息。判断是否发送完成的步骤可以是间断的,每个一段时间检测一次,也可以是持续的进行检测判断。
步骤S261,若发送完成,则通知耳机已完成数据发送;发送完成后,将耳机发送完成指令,耳机在接收到完成指令后,可以进行系统重新启动,同时进行软件升级。软件升级具有版本号,升级完毕后,新的版本号会覆盖原本的版本号。
步骤S262,若发送未完成,则继续执行获取升级数据中的耳机升级数据和充电盒升级数据的步骤。在判断升级数据还没有完成发送后,则重复执行步骤S250,将升级数据没有完成发送的耳机升级数据和充电盒升级数据均都组包形成升级数据包,逐包发送给耳机。
参阅图9所示,在本发明的第八实施例的基础上,提出本发明的第九实施例。为了保证相应的固件已经完成升级。通知耳机已完成数据发送的步骤之后,还包括:
步骤S270,等待耳机与通讯终端重新连接;耳机和充电盒进行升级时,耳机和充电盒需要重新启动,此时耳机与通讯终端的连接断开。为了确定耳机和充电盒已经完成固件升级,通过通讯终端来判断耳机和充电盒中的软件版本号与通讯终端下载的版本号是否相同。为此,需要等待耳机与通讯终端重新连接。
步骤S280,在耳机重新连接通讯终端后,判断耳机中的软件版本号是否为最新版本;耳机和充电盒完成重启后,软件升级完毕,此时耳机通过蓝牙再次与通讯终端完成连接。耳机将自身的版本号,以及充电盒中的版本号发送给通讯终端。通讯终端接收到的发送版本号,再将已经下载的软件版本号 进行对比,如果两者一致,则说明软件升级成功,如果两者不一致,则说明软件升级失败。
步骤S281,若耳机中的软件版本号是最新版本,则软件升级成功;例如,最新版本号是V2,若耳机反馈的版本号也是V2,则说明软件升级成功。耳机中的软件版本号包括了充电盒反馈的版本号。也就是说,在判断耳机中版本号的同时,也完成了对充电盒的版本号判断。
步骤S282,若耳机中的软件版本号不是最新版本,则软件升级失败,重新执行获取升级数据中的耳机升级数据和充电盒升级数据的步骤。例如,最新版本号是V2,若耳机反馈的版本号是V1,则说明软件升级失败。为此,需要重新获取升级数据后,再次对耳机或者充电盒进行软件升级。
参阅图10所示,本发明还提供一种数据升级装置,数据升级装置应用于耳机,耳机运用充电盒充电,数据升级装置包括:接收模块110和确定模块120。
接收模块110,用于接收解析后的升级数据包;主耳机和辅耳机无线连接于音频设备,音频设备包括通讯终端,例如,智能手机。通过音频设备播放声音,用户可以通过主耳机和辅耳机进行收听。主耳机和辅耳机连接于音频设备的方式包括蓝牙连接。解析后的升级数据包中,用于升级的耳机的升级数据和用于升级充电盒的升级数据已经完成了区分。解析后的升级数据包的字节大小固定,例如512个字节,在512个字节能够提高数据传输的速度,避免数据包过大导致传输速度降低。当然,升级数据包的字节大小也不限于512个字节,只要数据传输通道能够容纳足够的数据通过,可以提高每包升级数据包的字节数量,同时也还可以根据需要,降低每包升级包的字节数量。
确定模块120,用于确定升级数据包中包括充电盒升级数据,则基于耳机将充电盒升级数据传输给充电盒,以升级充电盒。升级数据包中可以是充电盒升级数据,也可以是耳机升级数据,在传输给充电盒之前,首先要确定升级数据包中的数据是耳机升级数据还是充电盒升级数据。在确定了升级数据包中包括充电盒升级数据后,接直接通过主耳机将充电盒升级数据传输给充电盒,从而完成充电盒的软件升级。接收模块110和确定模块120可以设置在主耳机内,也可以设置在辅耳机内。也就是说,主耳机接收到升级数据包,升级数据包在经过主耳机时,不对数据进行任何处理,主耳机是数据传输的 中转节点。主耳机再判断升级数据的数据类型,主耳机在依据数据类型进行数据转发。还可以是,辅耳机接收到的升级数据包,升级数据包在经过辅耳机时,不对数据进行任何处理,辅耳机是数据传输的中转节点。辅耳机判断升级数据的数据类型,辅耳机在依据数据类型进行数据转发。
本实施例中,通过接收模块110接收解析后的升级数据包。并且通过确定模块120确定升级数据包中包括充电盒升级数据,确定模块120直接控制耳机将充电盒升级数据发送给充电盒,从而完成对充电盒的软件升级。本实施例中,不需要通过耳机解析数据,耳机接收到的数据已经是解析完毕的,从而省略了耳机解析的步骤,减少了耳机处理数据的时间,继而提高了传输效率,使充电盒充升级效率得以提升。
本发明还提供一种可读存储介质,所述可读存储介质上存储有数据传输程序,所述数据传输程序被处理器执行时实现如上文所述数据升级方法的步骤。
本发明可读存储介质具体实施方式可以参照上述数据升级方法各实施例,在此不再赘述。
本说明书中各个实施例采用并列或者递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处可参见方法部分说明。
本领域普通技术人员还可以理解,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可 编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (10)

  1. 一种数据升级方法,应用于耳机,所述耳机运用充电盒充电,其特征在于,包括:
    接收解析后的升级数据包;
    确定所述升级数据包中包括充电盒升级数据,则基于所述耳机将所述充电盒升级数据传输给充电盒。
  2. 如权利要求1所述的数据升级方法,其特征在于,所述升级数据包中包括耳机固件类型或充电盒固件类型;
    所述确定所述升级数据包中包括充电盒升级数据的步骤之前,包括:
    判断所述升级数据包中包括的固件类型;
    若所述升级数据包中包括耳机固件类型,则确定所述升级数据包中包括耳机升级数据;
    若所述升级数据包中包括充电盒固件类型,则确定所述升级数据包中包括充电盒升级数据。
  3. 如权利要求2所述的数据升级方法,其特征在于,所述耳机包括无线连接的主耳机和辅耳机,所述确定所述升级数据包中包括耳机升级数据的步骤之后,包括:
    将所述耳机升级数据存储在所述主耳机中,并基于所述主耳机将所述耳机升级数据传输给所述辅耳机,以升级所述主耳机和所述辅耳机。
  4. 一种数据升级方法,应用于通讯终端,所述通讯终端连接于耳机,所述耳机运用充电盒充电,其特征在于,包括:
    解析升级数据中的耳机升级数据和/或充电盒升级数据;
    对解析出的所述耳机升级数据和/或所述充电盒升级数据标记固件类型;
    将标记有固件类型的所述耳机升级数据和/或所述充电盒升级数据分别组包发送给耳机。
  5. 根据权利要求4所述的数据升级方法,其特征在于,所述对解析出的 所述耳机升级数据和/或所述充电盒升级数据标注固件类型的步骤,包括:
    若解析出耳机升级数据,则在所述耳机升级数据中标记耳机固件类型;
    若解析出充电盒升级数据,则在所述充电盒升级数据中标记充电盒固件类型;
    若解析出耳机升级数据和充电盒升级数据,则在所述耳机升级数据中标记耳机固件类型和/或在所述充电盒升级数据中标记充电盒固件类型。
  6. 如权利要求4所述的数据升级方法,其特征在于,所述解析升级数据中的耳机升级数据和/或充电盒升级数据的步骤之前,包括:
    接受下载指令,依据所述下载指令下载所述升级数据。
  7. 如权利要求4所述的数据升级方法,其特征在于,所述解析升级数据中的耳机升级数据和/或充电盒升级数据的步骤之后,包括:
    提取解析后的所述升级数据中的耳机升级数据和/或充电盒升级数据。
  8. 如权利要求4至7中任一项所述的数据升级方法,其特征在于,所述将标记有固件类型的所述耳机升级数据和/或所述充电盒升级数据分别组包发送给耳机的步骤之后,包括:
    判断所述升级数据是否发送完成;
    若发送完成,则通知耳机已完成数据发送;
    若发送未完成,则继续执行提取解析后的所述升级数据中的耳机升级数据和/或充电盒升级数据的步骤。
  9. 一种数据升级装置,应用于耳机,所述耳机运用充电盒充电,其特征在于,包括:
    接收模块,用于接收解析后的升级数据包;
    确定模块,用于确定所述升级数据包中包括充电盒升级数据,则基于所述耳机将所述充电盒升级数据传输给充电盒。
  10. 一种可读存储介质,其特征在于,所述可读存储介质上存储有数据 传输程序,所述数据传输程序被处理器执行时实现如权利要求1至8中任一项所述数据升级方法的步骤。
PCT/CN2021/138733 2021-04-27 2021-12-16 数据升级方法、数据升级装置和可读存储介质 WO2022227615A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110463060.7 2021-04-27
CN202110463060.7A CN113010202A (zh) 2021-04-27 2021-04-27 数据升级方法、数据升级装置和可读存储介质

Publications (1)

Publication Number Publication Date
WO2022227615A1 true WO2022227615A1 (zh) 2022-11-03

Family

ID=76380846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/138733 WO2022227615A1 (zh) 2021-04-27 2021-12-16 数据升级方法、数据升级装置和可读存储介质

Country Status (2)

Country Link
CN (1) CN113010202A (zh)
WO (1) WO2022227615A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010202A (zh) * 2021-04-27 2021-06-22 歌尔股份有限公司 数据升级方法、数据升级装置和可读存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104080027A (zh) * 2013-03-26 2014-10-01 Gn奈康有限公司 从耳机基座单元更新耳机固件
WO2019087428A1 (ja) * 2017-10-30 2019-05-09 イアフレド株式会社 音響再生装置
CN110659046A (zh) * 2019-09-12 2020-01-07 湖南国声智能科技有限公司 固件升级方法、终端、充电盒、耳机及存储介质
CN111615030A (zh) * 2020-05-27 2020-09-01 歌尔科技有限公司 一种新型tws耳机的升级方法、装置及介质
CN111813425A (zh) * 2019-04-12 2020-10-23 顺丰科技有限公司 设备升级方法、装置、设备及存储介质
CN113010202A (zh) * 2021-04-27 2021-06-22 歌尔股份有限公司 数据升级方法、数据升级装置和可读存储介质

Family Cites Families (7)

* 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
CN108804124B (zh) * 2018-06-15 2020-08-28 歌尔科技有限公司 一种tws耳机、充电盒及其升级方法、存储介质
CN108882211B (zh) * 2018-06-15 2020-09-11 歌尔科技有限公司 一种tws耳机程序升级的方法、系统及tws耳机
CN110366063A (zh) * 2019-07-26 2019-10-22 歌尔科技有限公司 一种无线耳机的升级方法、装置及充电盒
CN110719542B (zh) * 2019-10-31 2021-06-04 歌尔科技有限公司 一种tws耳机及其升级方法、装置及计算机存储介质
CN111200811B (zh) * 2019-12-29 2022-03-18 歌尔科技有限公司 一种tws耳机及其升级方法、装置及可读存储介质
CN111787098B (zh) * 2020-06-30 2022-10-04 歌尔科技有限公司 一种耳机升级方法、装置及一种耳机和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104080027A (zh) * 2013-03-26 2014-10-01 Gn奈康有限公司 从耳机基座单元更新耳机固件
WO2019087428A1 (ja) * 2017-10-30 2019-05-09 イアフレド株式会社 音響再生装置
CN111813425A (zh) * 2019-04-12 2020-10-23 顺丰科技有限公司 设备升级方法、装置、设备及存储介质
CN110659046A (zh) * 2019-09-12 2020-01-07 湖南国声智能科技有限公司 固件升级方法、终端、充电盒、耳机及存储介质
CN111615030A (zh) * 2020-05-27 2020-09-01 歌尔科技有限公司 一种新型tws耳机的升级方法、装置及介质
CN113010202A (zh) * 2021-04-27 2021-06-22 歌尔股份有限公司 数据升级方法、数据升级装置和可读存储介质

Also Published As

Publication number Publication date
CN113010202A (zh) 2021-06-22

Similar Documents

Publication Publication Date Title
US10574793B2 (en) Method, apparatus and terminal device for communication protocol compatibility
KR101092112B1 (ko) 향상된 무선 usb 프로토콜 및 허브
EP3720019B1 (en) Internet of things data transmission method, device and system
EP4027238A1 (en) Card rendering method and electronic device
CN108429979B (zh) 一种充电盒升级方法、充电盒、无线耳机及tws耳机
CN111200811B (zh) 一种tws耳机及其升级方法、装置及可读存储介质
WO2022095199A1 (zh) 一种嵌入式设备的差分升级方法及相关组件
CN103577202A (zh) 软件升级方法与系统
US20060187849A1 (en) Interpreter engine
US10338911B2 (en) Method and device for downloading software version, and storage medium
KR20200106742A (ko) 블루투스 네트워크 환경에서 응답 메시지를 전송하기 위한 전자 장치 및 그에 관한 방법
WO2018036026A1 (zh) 一种数据传输的方法、基站、目标终端、系统及存储介质
CN102904959A (zh) 网络加速方法和网关
US20230224654A1 (en) Earphone debugging method and device, and storage medium
CN111787098B (zh) 一种耳机升级方法、装置及一种耳机和存储介质
WO2022227615A1 (zh) 数据升级方法、数据升级装置和可读存储介质
WO2022042140A1 (zh) 数据处理方法、装置、电子设备及存储介质
US9723480B2 (en) Information processing device, server device, data communication system, data communication method, and computer-readable storage medium storing data communication program
CN106997302A (zh) 固件升级方法、装置及音频播放设备
US7953822B2 (en) Method of and apparatus for downloading data
CN110795127A (zh) 一种无线耳机及其升级方法及装置
CN110719651B (zh) 数据传输方法及装置
CN112422485B (zh) 一种传输控制协议的通信方法及装置
CN101325533A (zh) 一种基于移动设备的数据下载方法
CN110764806A (zh) 一种tws耳机及其升级方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21939074

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21939074

Country of ref document: EP

Kind code of ref document: A1