Firmware sending method, firmware receiving method and firmware upgrading system
By dividing the wireless headset firmware into multiple data blocks and exorbitant operations, the problem of low upgrade efficiency of existing wireless headset firmware is solved, and a faster and more efficient firmware transmission and upgrade process is achieved.
Patent Information
- Application Number
- CN202111597974.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2041-12-24
AI Technical Summary
The existing wireless headphone firmware upgrade methods are inefficient, especially the broadcast upgrade method may not guarantee successful transmission, resulting in multiple confirmations and extended upgrade time.
By dividing the upgrade firmware into multiple target data blocks and performing XOR operations in the terminal device, generating XOR data packets are gradually sent to the headset device to ensure that each headset device receives the complete upgrade firmware.
It reduces the number of broadcasts and sends to the upgraded firmware in the terminal device, reduces transmission time and bandwidth consumption, and improves the efficiency of firmware upgrade in the headphone device.
Smart Images

Figure CN114296758B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wireless headsets, and in particular to a firmware sending method, a firmware receiving method and a firmware upgrading system. Background Art
[0002] As the use of wearable electronic devices increases, wireless headphones such as TWS (True Wireless Stereo) headphones have entered people's lives. Due to the rise of wireless headphones and the increasing complexity of their functions, the Bluetooth headphones in users' hands, like mobile phones or other wearable electronic devices, require OTA (Over-the-Air Technology) to upgrade the firmware.
[0003] In the prior art, there are many methods for upgrading wireless headsets, many of which utilize the current BT (Bluetooth) monitoring function to simultaneously receive the upgrade firmware sent from the mobile phone to which the headset is connected, or BT / BLE (Bluetooth Low Energy) first unicasts the upgrade firmware to one headset, and the other headset receives and forwards it, or broadcasts it using BLE or BLE audio. For example, the main headset in the wireless headset is connected to the mobile phone, the upgrade file is transferred to the main headset and the upgrade file is verified, and then the main headset transmits the upgrade file to the slave headset wirelessly and verifies the upgrade file. After confirming that there is no problem, the headset is restarted and the upgrade begins. The upgrade mainly consumes the upgrade file transmission process. However, the broadcast upgrade method may not guarantee successful transmission, and multiple confirmations are required, which affects the completion time of the upgrade, resulting in low efficiency of firmware upgrades in wireless headsets. Summary of the invention
[0004] In view of this, the purpose of the embodiments of the present application is to provide a firmware sending method, a firmware receiving method and a firmware upgrade system to improve the problem of low upgrade efficiency when performing firmware upgrade of wireless headphones in the prior art.
[0005] In order to solve the above problems, in a first aspect, the present application provides a firmware sending method, which is applied to a terminal device, and the method includes:
[0006] Dividing the upgrade firmware corresponding to the headphone device into multiple target data blocks;
[0007] Sending a plurality of the target data blocks to a first earphone and a second earphone in the earphone device;
[0008] Performing an XOR operation on the first reception information fed back by the first earphone and the second reception information fed back by the second earphone to obtain an XOR data packet;
[0009] The XOR data packet is sent to the first headset and the second headset.
[0010] In the above implementation, since the upgrade firmware of the headset is relatively large when being upgraded, in order to reduce the volume of the transmission data and increase the efficiency of data transmission during transmission, the upgrade firmware can be divided into multiple target data blocks in the terminal device, and sent to multiple headsets in the form of multiple data blocks to transmit the upgrade firmware, thereby performing firmware upgrade on the headset device. By performing an XOR operation on the first receiving information and the second receiving information fed back from the two headsets representing the reception status in the headset, an XOR data packet of the data blocks missing in the two headsets can be generated. By continuing to send the XOR data packet to multiple headsets, multiple headsets can respectively obtain the data blocks they have not received and are missing, thereby completing the multiple data blocks in the headset, and transmitting the upgrade firmware completely to the headset device, reducing the number of times the upgrade firmware is broadcasted in the terminal device, thereby reducing the transmission time, saving bandwidth, and improving the transmission efficiency of the upgrade firmware in the terminal device.
[0011] Optionally, sending the plurality of target data blocks to a first earphone and a second earphone in the earphone device comprises:
[0012] Sending the plurality of target data blocks to the first headset and the second headset in sequence;
[0013] acquiring third reception information sent when the first earphone receives the plurality of target data blocks and fourth reception information sent when the second earphone receives the plurality of target data blocks;
[0014] Screening the plurality of target data blocks according to the third reception information and the fourth reception information to determine unreceived data blocks that are not received by the first headset and the second headset;
[0015] The unreceived data blocks are sent to the first headset and the second headset respectively.
[0016] In the above implementation, in order to ensure that the data blocks received in the two earphones before the terminal device performs an XOR operation can be combined to form a complete upgrade firmware, multiple data blocks can be sent twice. Through the first sending, multiple target data blocks are sent to the first earphone and the second earphone, and the third receiving information and the fourth receiving information of the reception status of the first earphone and the second earphone receiving the multiple target data blocks are obtained. According to the third receiving information and the fourth receiving information, the multiple target data blocks are screened to determine the unreceived data blocks that are not received by the two earphones, and the unreceived data blocks are sent again for the second time to ensure that the data blocks received by the two earphones after the second sending can be combined to form a complete upgrade firmware, so that the XOR operation can be performed on this basis.
[0017] Optionally, performing an XOR operation on the first reception information fed back by the first earphone and the second reception information fed back by the second earphone to obtain an XOR data packet includes:
[0018] receiving the first reception information fed back by the first earphone and the second reception information fed back by the second earphone;
[0019] Determine, based on the first reception information and the second reception information, a first data block that is not received by the first earphone and a second data block that is not received by the second earphone;
[0020] An XOR operation is performed based on the first data block and the second data block to generate the XOR data packet.
[0021] In the above implementation, although the data blocks received in the two earphones can be combined to form a complete upgrade firmware, due to the instability of broadcast transmission, the two earphones may not receive the complete upgrade firmware. After sending the unreceived data blocks, by continuing to receive the first reception information and the second reception information of the reception status of the data blocks in the two earphones, an XOR operation can be performed according to the first reception information and the second reception information to determine the first data block that is not received and missing in the first earphone and the second data block that is not received and missing in the second earphone, and a corresponding XOR data packet is generated according to the first data block and the second data block, so as to supplement the missing data blocks in the two earphones through the XOR data packet.
[0022] Optionally, after sending the XOR data packet to the first headset and the second headset, the method further includes:
[0023] receiving fifth reception information sent by the first earphone and sixth reception information sent by the second earphone;
[0024] The upgrade status of the first headset and the second headset is detected based on the fifth received information and the sixth received information.
[0025] In the above implementation, when sending an XOR data packet to the earphone, due to the instability of broadcast transmission, the upgrade status of the first earphone and the second earphone can be detected by continuing to receive the fifth reception information and the sixth reception information generated by the first earphone and the second earphone according to the reception status of their own data blocks, and whether the upgrade of the two earphones is completed can be detected, so that subsequent data block sending processing can be continued according to the detection result to ensure that the two earphones can receive the complete upgrade firmware, so that the earphone device can be upgraded normally.
[0026] Optionally, the method further comprises:
[0027] When the first headset detects that the upgrade is completed and the second headset detects that the upgrade is not completed, determining a first missing data block in the second headset based on the sixth received information; and sending the first missing data block to the second headset;
[0028] When the second headset detects that the upgrade is completed and the first headset detects that the upgrade is not completed, determine a second missing data block in the first headset based on the fifth received information; and send the second missing data block to the first headset.
[0029] In the above implementation, when one of the two earphones obtains the complete upgrade firmware, that is, when the upgrade is completed, the first missing data block or the second missing data block that is missing can be determined according to the reception information of the earphone that has not obtained the complete upgrade firmware, that is, the upgrade is not completed, and the missing data blocks are transmitted separately to the earphone where the upgrade is not completed, thereby reducing the situation of repeated data block transmission to the earphone where the upgrade is completed, and can perform targeted data block transmission according to the reception situation of the earphone where the upgrade is not completed, thereby improving the transmission efficiency of the missing data blocks.
[0030] In a second aspect, the present application further provides a firmware receiving method, which is applied to a headphone device, wherein the headphone device includes a first headphone and a second headphone, and the method includes:
[0031] The first earphone and the second earphone respectively receive a plurality of target data blocks sent by the terminal device;
[0032] The first earphone sends first reception information to the terminal device according to the reception status of the plurality of target data blocks; the second earphone sends second reception information to the terminal device according to the reception status of the plurality of target data blocks;
[0033] The first earphone performs XOR analysis based on the XOR data packet received from the terminal device to obtain a first data block not received in the first earphone; the second earphone performs XOR analysis based on the XOR data packet received from the terminal device to obtain a second data block not received in the second earphone.
[0034] In the above implementation, the two earphones respectively receive multiple target data blocks sent from the terminal device, and can respectively send the first receiving information and the second receiving information to the terminal device according to their own receiving conditions, and respectively receive the XOR data packets generated by the terminal device according to the first receiving information and the second receiving information. By parsing the XOR data packets in combination with the data blocks received in the earphones, the first data block that has not been received by the first earphone can be obtained, and the second data block that has not been received by the second earphone can be obtained, and the missing data blocks of each earphone can be obtained respectively to supplement the target data blocks received in the earphone device, so as to receive the complete upgrade firmware for upgrading, reduce the number of reception times and transmission time when the earphone device receives the data blocks, and improve the reception efficiency of the upgrade firmware in the earphone device.
[0035] Optionally, the first earphone and the second earphone respectively receive a plurality of target data blocks sent by a terminal device, including:
[0036] The first earphone and the second earphone respectively receive a plurality of the target data blocks;
[0037] The first earphone generates third reception information according to the target header information of the received target data block; the second earphone generates fourth reception information according to the target header information of the received target data block;
[0038] The first earphone sends the third reception information to the terminal device; the second earphone sends the fourth reception information to the terminal device;
[0039] The first earphone and the second earphone receive unreceived data blocks sent by the terminal device based on the third reception information and the fourth reception information.
[0040] In the above implementation, before receiving the XOR data packet, in order to ensure that the data blocks received in the two earphones can be combined to form a complete upgrade firmware for the terminal device to perform an XOR operation, the two earphones can receive the data blocks twice respectively. During the first reception, the two earphones respectively receive multiple target data blocks sent in sequence from the terminal device, and can generate third reception information and fourth reception information respectively according to the target header information of the received target data blocks, and send the third reception information and fourth reception information to the terminal device. During the second reception, the two earphones respectively receive the unreceived data blocks that are not received by the two earphones determined by the terminal device according to the third reception information and the fourth reception information, so as to ensure that after the second reception, the received data blocks of the two earphones can be combined to form a complete upgrade firmware.
[0041] Optionally, the first earphone sends first reception information to the terminal device according to reception conditions of the plurality of target data blocks; and the second earphone sends second reception information to the terminal device according to reception conditions of the plurality of target data blocks, including:
[0042] The first earphone determines, according to the target header information in the received target data block, the first header information of the first data block that has not been received; the first earphone generates the first reception information based on the target header information and the first header information;
[0043] The second earphone determines, according to the target header information in the received target data block, the second header information of the second data block that has not been received; and the second earphone generates the second reception information based on the target header information and the second header information;
[0044] The first earphone sends the first received information to the terminal device; the second earphone sends the second received information to the terminal device.
[0045] In the above implementation, although the data blocks received in the two earphones can be combined to form a complete upgrade firmware, due to the instability of broadcast transmission, the two earphones may not receive the complete upgrade firmware. After the two earphones receive the unreceived data blocks respectively, the two earphones can determine the first header information of the unreceived first data block and the second header information of the second data block according to the target header information of the target data block received by themselves, and determine the first reception information and the second reception information of the two earphones indicating their reception status after the second reception according to the target header information and the first header information and the second header information. By sending the first reception information and the second reception information to the terminal device, the terminal device can perform an XOR operation to determine the XOR data packet of the first data block and the second data block that were not received in the two earphones.
[0046] Optionally, the method further comprises:
[0047] The first headset generates fifth reception information according to the acquired first data block; and sends the fifth reception information to the terminal device;
[0048] The second headset generates sixth reception information according to the acquired second data block; and sends the sixth reception information to the terminal device.
[0049] In the above implementation, after receiving the XOR data packet, the two earphones can continue to send to the terminal device respectively the fifth reception information and the sixth reception information generated according to their own reception conditions after obtaining the first data block and the second data block due to the instability when transmitting the first data block and the second data block, so as to provide feedback on the upgrade conditions in the two earphones respectively, thereby continuing the subsequent reception work according to the upgrade conditions.
[0050] In a third aspect, the present application further provides a firmware upgrade system, the system comprising a terminal device and a headphone device as described in any one of the above firmware sending method and firmware receiving method, the terminal device and the headphone device being communicatively connected;
[0051] The terminal device is used to divide the upgrade firmware corresponding to the headphone device into multiple target data blocks; send the multiple target data blocks to a first headphone and a second headphone in the headphone device; perform an XOR operation according to first reception information fed back by the first headphone and second reception information fed back by the second headphone to obtain an XOR data packet; and send the XOR data packet to the first headphone and the second headphone;
[0052] The earphone device includes a first earphone and a second earphone, which are used to respectively receive multiple target data blocks sent by a terminal device; send first reception information and second reception information to the terminal device according to the reception status of the multiple target data blocks; perform XOR analysis on the XOR data packet sent by the terminal device, and obtain a first data block not received in the first earphone and a second data block not received in the second earphone.
[0053] In a fourth aspect, the present application also provides an electronic device, comprising a memory and a processor, wherein the memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any implementation of the above-mentioned firmware sending method and firmware receiving method.
[0054] In a fifth aspect, the present application also provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the steps in any implementation of the above-mentioned firmware sending method and firmware receiving method are executed.
[0055] In summary, the present application provides a firmware sending method, a firmware receiving method and a firmware upgrade system, which transmits the complete upgrade firmware to upgrade the firmware of the headphone device, reduces the transmission frequency and transmission time of the upgrade firmware, saves bandwidth, and effectively improves the upgrade efficiency of the upgrade firmware in the headphone device. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 A schematic diagram of the operation of a firmware upgrade system provided in an embodiment of the present application;
[0058] Figure 2 A flowchart of a firmware sending method provided in an embodiment of the present application;
[0059] Figure 3 A detailed flowchart of step S210 provided in an embodiment of the present application;
[0060] Figure 4 A detailed flow chart of step S220 provided in an embodiment of the present application;
[0061] Figure 5 A detailed flowchart of another firmware sending method provided in an embodiment of the present application;
[0062] Figure 6 A flowchart of a firmware receiving method provided in an embodiment of the present application;
[0063] Figure 7 A detailed flowchart of step S300 provided in an embodiment of the present application;
[0064] Figure 8 A detailed flowchart of step S310 is provided for an embodiment of the present application.
[0065] Icon: 100-terminal device; 200-headphone device; 210-first earphone; 220-second earphone. DETAILED DESCRIPTION
[0066] The technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the embodiments of the present application.
[0067] In the prior art, when upgrading the firmware of wireless headphones, the current BT (Bluetooth) monitoring function can be used to simultaneously receive the upgrade firmware sent from the mobile phone to which the headphones are connected, or BT / BLE (Bluetooth Low Energy) can be used to unicast the upgrade firmware to one headphone first, and the other headphone receives and forwards it, or BLE or BLE audio can be used for broadcasting. For example, the main headphone in the wireless headphones is connected to the mobile phone, the upgrade file is transferred to the main headphone and the upgrade file is verified, and then the main headphone transmits the upgrade file to the slave headphone wirelessly and verifies the upgrade file. After confirming that there is no problem, the headphone is restarted and the upgrade is started. The upgrade mainly consumes the upgrade file transmission process. However, the broadcast upgrade method may not guarantee the success of the transmission, and multiple confirmations are required, which affects the completion time of the upgrade, resulting in low efficiency of firmware upgrades in wireless headphones.
[0068] In order to solve the above problems, an embodiment of the present application provides a firmware upgrade system, which can completely transmit the upgraded firmware in the system, reduce the number of transmissions and the transmission time, and effectively improve the efficiency of firmware upgrades in the headphone device.
[0069] See also Figure 1 , Figure 1 The operating diagram of a firmware upgrade system provided in an embodiment of the present application includes the following interactive devices: a terminal device 100 and an earphone device 200. The earphone device 200 includes a first earphone 210 and a second earphone 220. The terminal device 100 wirelessly communicates with one or more earphone devices 200 through a network or Bluetooth function, and performs data transmission and interaction based on OTA (Over-the-Air Technology).
[0070] Optionally, the terminal device 100 can be an electronic device with logical computing functions such as a server, a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), etc., which is used to divide the upgrade firmware of the headphone device 200 into multiple target data blocks when upgrading, and send the multiple target data blocks to the first earphone 210 and the second earphone 220 in the headphone device 200 respectively by broadcasting, and can send multiple target data blocks to the first earphone 210 and the second earphone 220 respectively at the same time.
[0071] Optionally, the headphone device 200 can be a wireless headphone of various models, such as a TWS (True Wireless Stereo) headphone or other headphone device wirelessly connected to the terminal device 100. For example, the headphone device 200 may include one headphone, or two headphones, namely a first headphone 210 and a second headphone 220, or n (n>2) headphones, which are set according to the actual needs and application scenarios of the user. Taking two headphones as an example, the headphone device 200 is used to receive multiple target data blocks sent by the terminal device 100, and sends first reception information and second reception information to the terminal device according to the reception status of the multiple target data blocks in the two headphones.
[0072] It is worth noting that the terminal device 100 can also perform an XOR operation based on the first reception information fed back by the first earphone 210 and the second reception information fed back by the second earphone 220, obtain a corresponding XOR data packet, and send the XOR data packet to the first earphone 210 and the second earphone 220 in the earphone device 200 respectively by broadcasting, and can send the XOR data packet to the first earphone 210 and the second earphone 220 respectively at the same time. The first earphone 210 and the second earphone 220 can perform XOR analysis based on the XOR data packet sent by the terminal device 100, obtain the first data block not received in the first earphone 210 and the second data block not received in the second earphone 220, so as to transmit the complete upgrade firmware, so that the earphone device 200 can receive the complete upgrade firmware for upgrading.
[0073] See also Figure 2 , Figure 2 A flowchart of a firmware sending method provided in an embodiment of the present application, the method comprising the following steps:
[0074] Step S200: dividing the upgrade firmware corresponding to the headphone device into a plurality of target data blocks.
[0075] Among them, since the upgrade firmware of the headset is large, when transmitting, the large data will affect the quality and efficiency of communication transmission. In order to reduce the volume of transmitted data and increase the efficiency of data transmission, the upgrade firmware can be divided into multiple target data blocks in the terminal device.
[0076] Optionally, when performing the division, the upgrade firmware can be divided into multiple data blocks of the same size, and the number of data blocks can be selected and adjusted according to user needs and actual conditions. For example, the general upgrade firmware is between hundreds of KB and several MB, so the upgrade firmware can be divided into target data blocks of 512B-1024B in size. The size of the bitmap information of the target data block is smaller than the title information of the upgrade firmware, and the target data block can be directly sent without compressing the bitmap information of the target data block. Each data block can include header information that identifies the data block, and the header information can include information such as coding, label, ID (identification number), etc., which can identify the position of the data block in the upgrade firmware, such as which data block it is located in.
[0077] Step S210: sending the plurality of target data blocks to a first earphone and a second earphone in the earphone device.
[0078] Among them, multiple target data blocks are sent to the first earphone and the second earphone in the earphone device. The sending method can be a broadcast sending method, which can simultaneously broadcast data to multiple earphone devices or earphones in the earphone device, respectively, and can effectively reduce the number of broadcasts and transmission time, and save bandwidth occupied during sending.
[0079] Step S220: Perform an XOR operation on the first reception information fed back by the first earphone and the second reception information fed back by the second earphone to obtain an XOR data packet.
[0080] Among them, the first receiving information and the second receiving information received as feedback can be the corresponding bitmap information generated by the headset according to its own target header information of the target data block, which can enable the terminal device to understand the reception status of multiple target data blocks currently received in the headset, and perform an XOR operation on the target data blocks not received in the first headset and the second headset on the basis of the first receiving information and the second receiving information, so as to obtain the corresponding XOR data packet, thereby performing targeted data transmission.
[0081] Step S230: Send the XOR data packet to the first headset and the second headset.
[0082] Among them, continuing to send the XOR data packet to the corresponding multiple earphones can enable the multiple earphones to respectively obtain the unreceived and missing data blocks, thereby completing the multiple data blocks in the earphones and completely transmitting the upgraded firmware to the earphone device in the terminal device.
[0083] exist Figure 2 In the illustrated embodiment, the number of times the upgraded firmware is broadcasted in the terminal device can be reduced, thereby reducing the transmission time and improving the efficiency of sending the upgraded firmware in the terminal device.
[0084] Optionally, see Figure 3 , Figure 3 A detailed flowchart diagram of step S210 is provided for an embodiment of the present application. Step S210 may also include steps S211-S214.
[0085] Step S211: Send the plurality of target data blocks to the first headset and the second headset in sequence.
[0086] Among them, since there is a sequential relationship among the multiple target data blocks, the multiple target data blocks can be sent sequentially according to the sequential relationship. For example, when there are six data blocks, the six data blocks are broadcast sequentially from the 0th block to the fifth block to realize the first sending of the multiple target data blocks.
[0087] Step S212: Acquire third reception information sent when the first earphone receives the plurality of target data blocks and fourth reception information sent when the second earphone receives the plurality of target data blocks.
[0088] After sending the target data block for the first time, the terminal device can receive the third reception information and the fourth reception information reflecting the reception status of the target data block, which are generated by the first earphone and the second earphone and which the terminal device can only receive after the first transmission.
[0089] For example, in the case of six target data blocks, the first earphone receives the 0th data block, the 2nd data block and the 4th data block, then the bitmap string in the third reception information sent by the first earphone may be: 101010, and the second earphone receives the 1st data block, the 2nd data block and the 5th data block, then the bitmap string in the fourth reception information may be: 011001, wherein 1 represents that the data block at that position is received, and 0 represents that the data block at that position is not received.
[0090] Step S213: Screening the plurality of target data blocks according to the third reception information and the fourth reception information to determine unreceived data blocks that are not received by the first earphone and the second earphone.
[0091] The terminal device can determine the unreceived data blocks that are not received by the first earphone and the second earphone according to the bitmap strings in the received third reception information and the fourth reception information. For example, when the third reception information includes 101010 and the fourth reception information includes 011001, the terminal device can detect that the first earphone has received the 0th data block, the 2nd data block and the 4th data block, and the first earphone has not received the 1st data block, the 3rd data block and the 5th data block; the second earphone has received the 1st data block, the 2nd data block and the 5th data block, and the second earphone has not received the 0th data block, the 3rd data block and the 4th data block, then the data block that is not received by the first earphone and the second earphone obtained by screening is the 3rd data block, and according to the screening result, the 3rd data block is used as the unreceived data block.
[0092] Step S214: Send the unreceived data blocks to the first headset and the second headset respectively.
[0093] The unreceived data blocks are sent to the first earphone and the second earphone in sequence, respectively, so that the data blocks that are not received by the two earphones are sent for the second time, so that after the second sending, the received target data blocks of the two earphones can be combined to form a complete upgrade firmware, thereby ensuring the normal progress of subsequent XOR operations.
[0094] Optionally, when it is detected that the first earphone and the second earphone do not contain unreceived data blocks, the terminal device may directly obtain the first reception information and the second reception information to perform an XOR operation.
[0095] exist Figure 3 In the illustrated embodiment, after the second transmission, the received target data blocks of the first earphone and the second earphone can be combined to form a complete upgrade firmware, so that the complete upgrade firmware can be sent.
[0096] Optionally, see Figure 4 , Figure 4 A detailed flow chart of step S220 is provided for an embodiment of the present application. Step S220 may also include steps S221-S223.
[0097] Step S221: receiving the first reception information fed back by the first earphone and the second reception information fed back by the second earphone.
[0098] Among them, although the data blocks received in the two earphones can be combined to form a complete upgrade firmware, due to the instability of broadcast transmission, the two earphones may not have a complete upgrade firmware. If the unreceived data block is sent to the first earphone or the second earphone separately, it will cause the waste of the time slot of the other earphone, affecting the upgrade time when the earphone device is upgraded. Therefore, after sending the unreceived data block, the terminal device can continue to receive the first reception information and the second reception information indicating the reception status of the target data block received by the two earphones during the second transmission.
[0099] Optionally, the first reception information and the second reception information may be set to the same data format as the third reception information and the fourth reception information, or may be a data format including target header information of target data blocks that have not been received in the first earphone and the second earphone after the second transmission. For example, after the second transmission, the first earphone receives the 0th data block, the 2nd data block and the 4th data block, and the first earphone does not receive the 1st data block, the 3rd data block and the 5th data block; the second earphone receives the 1st data block, the 3rd data block and the 5th data block, and the second earphone does not receive the 0th data block, the 2nd data block and the 4th data block. Then, the generated first reception information may be 101010 or 135, i.e., data such as number information in the header information representing the target data block that has not been received, and the generated second reception information may be 010101 or 024, etc.
[0100] Step S222: Determine a first data block that is not received by the first earphone and a second data block that is not received by the second earphone based on the first reception information and the second reception information.
[0101] The terminal device may parse the received first reception information and the second reception information to determine the first data block not received by the first earphone and the second data block not received by the second earphone. For example, when the first reception information is 101010 or 135, it is determined that the first data block includes the first data block, the third data block and the fifth data block, and when the received second reception information is 010101 or 024, it is determined that the second data block includes the 0th data block, the second data block and the fourth data block.
[0102] Step S223: Perform an XOR operation on the first data block and the second data block to generate the XOR data packet.
[0103] Among them, an XOR operation is performed on the first data block and the second data block obtained by parsing to generate a corresponding XOR data packet. The XOR data packet may include multiple XOR data blocks, for example, the first XOR data block of the 0th data block ^ the 1st data block is recorded as 0^1, the second XOR data block of the 2nd data block ^ the 3rd data block is recorded as 2^3, the third XOR data block of the 4th data block ^ the 5th data block is recorded as 4^5, etc. Each XOR data block also has corresponding XOR header information for recording which two data blocks are used to generate the XOR data block by the XOR operation.
[0104] Optionally, multiple XOR data blocks in the XOR data packet may be combined in sequence and sent in turn.
[0105] exist Figure 4 In the illustrated embodiment, a corresponding XOR data packet can be generated according to the first data block and the second data block, so as to supplement the missing data blocks in the two earphones through the XOR data packet.
[0106] Optionally, see Figure 5 , Figure 5 A detailed flowchart of another firmware sending method provided in an embodiment of the present application, after step S230, the method may further include steps S240-S250.
[0107] Step S240: receiving fifth reception information sent by the first earphone and sixth reception information sent by the second earphone.
[0108] Among them, after the terminal device sends the XOR data packet to the first earphone and the second earphone respectively, the terminal device can continue to receive the fifth reception information and the sixth reception information generated by the first earphone and the second earphone after receiving the XOR data packet according to the reception status of its own data block.
[0109] Optionally, the fifth received information and the sixth received information may be in the same data format as the first received information and the second received information.
[0110] Step S250: Detect the upgrade status of the first headset and the second headset based on the fifth received information and the sixth received information.
[0111] After receiving the fifth reception information and the sixth reception information, the terminal device may parse the fifth reception information and the sixth reception information to detect the upgrade status of the first headset and the second headset.
[0112] Optionally, the detection method can be: when the bitmap strings in the fifth received information or the sixth received information are all 1, for example, 111111, or when there is no data such as the numbering information of the header information of the unreceived data block in the fifth received information or the sixth received information, the corresponding headset receives all the target data blocks, obtains the complete upgrade firmware, and the upgrade is completed; when the bitmap strings in the fifth received information or the sixth received information are not all 1, for example, 110111, or when there is data such as the numbering information of the header information of the unreceived data block in the fifth received information or the sixth received information, for example, 3, the corresponding headset does not receive all the data blocks, does not obtain the complete upgrade firmware, and the upgrade is not completed.
[0113] It is worth noting that when both the first earphone and the second earphone are detected as incomplete upgrade, the terminal device can continue to repeat the XOR operation according to the fifth received information and the sixth received information, generate and send the corresponding XOR data packet, until at least one of the first earphone and the second earphone is detected as complete upgrade.
[0114] Optionally, when one earphone is detected as upgraded, for example, when the first earphone is detected as upgraded and the second earphone is detected as upgraded but not upgraded, the first missing data block in the second earphone is determined based on the sixth received information; the first missing data block is sent to the second earphone; when the second earphone is detected as upgraded and the first earphone is detected as upgraded but not upgraded, the second missing data block in the first earphone is determined based on the fifth received information; the second missing data block is sent to the first earphone. The first missing data block or the second missing data block missing can be determined and sent based on the received information of the earphone that has not obtained the complete upgraded firmware, that is, the upgraded is not completed, and the missing data blocks are transmitted separately to the earphone that has not completed the upgraded, thereby reducing the situation of repeatedly transmitting data blocks to the earphone that has completed the upgraded, and can send data blocks in a targeted manner based on the receiving situation of the earphone that has not completed the upgraded, thereby improving the transmission efficiency of the missing data blocks.
[0115] Optionally, after sending the first missing data block or the second missing data block, the terminal device can continue to obtain and parse the received information in the headset until the headset is detected as upgraded. Then, all headsets in the headset device are upgraded, and the headset device completes the upgrade of the upgrade firmware.
[0116] exist Figure 5 In the illustrated embodiment, it is possible to detect whether the upgrade of the two earphones is complete, and then continue to perform subsequent data block sending processing according to the detection result to ensure that both earphones can receive the complete upgrade firmware, so that the earphone devices can be upgraded normally.
[0117] See also Figure 6 , Figure 6A flowchart of a firmware receiving method provided in an embodiment of the present application, the method may include the following steps:
[0118] Step S300: the first earphone and the second earphone respectively receive a plurality of target data blocks sent by a terminal device.
[0119] In order to improve the reception efficiency of the upgraded firmware, the two earphones of the earphone device may respectively receive multiple target data blocks sent by the terminal device to ensure that the target data blocks received by the two earphones can be combined to form a complete upgraded firmware.
[0120] Optionally, the number of headphones in the headphone device can be selected and adjusted according to user needs and actual conditions, and other numbers of headphones will not be described further.
[0121] Step S310: the first earphone sends first reception information to the terminal device according to the reception status of the multiple target data blocks; the second earphone sends second reception information to the terminal device according to the reception status of the multiple target data blocks.
[0122] Among them, when the target data blocks received by the two earphones can be combined to form a complete upgrade firmware, the two earphones can respectively send corresponding first reception information and second reception information to the terminal device according to their own reception of multiple target data blocks, so that the terminal device can perform an XOR operation.
[0123] Step S320: the first earphone performs XOR analysis based on the XOR data packet received and sent by the terminal device, and obtains a first data block that is not received in the first earphone; the second earphone performs XOR analysis based on the XOR data packet received and sent by the terminal device, and obtains a second data block that is not received in the second earphone.
[0124] When two earphones respectively receive XOR data packets sent by the terminal device, in order to obtain the data blocks not received in each earphone, the XOR data packets are XOR-parsed to parse the first data block not obtained by the first earphone in the first earphone, and to parse the second data block not obtained by the second earphone in the second earphone, so that each earphone can recover the unreceived data blocks, thereby obtaining the unreceived data blocks.
[0125] For example, when performing XOR parsing, the XOR data packet may include multiple XOR data blocks and XOR header information for recording which two data blocks perform the XOR operation on the XOR data block, for example, the first XOR data block of the 0th data block ^ the 1st data block, recorded as 0^1, the first XOR header information is 01, the second XOR data block of the 2nd data block ^ the second XOR data block of the 3rd data block, recorded as 2^3, the second XOR header information is 23, the third XOR data block of the 4th data block ^ the 5th data block, recorded as 4^5, the third XOR header information is 45, etc. When performing XOR analysis, the two earphones can perform XOR analysis on the received data blocks according to the XOR header information. For example, when the first earphone receives the 0th data block, the 2nd data block and the 4th data block, and the second earphone receives the 1st data block, the 3rd data block and the 5th data block, the first earphone performs three XOR analyses of (0^1)^1, (2^3)^2, (4^5)^4, and the obtained first data blocks are the 1st data block, the 3rd data block and the 5th data block; and the second earphone performs three XOR analyses of (0^1)^0, (2^3)^3, (4^5)^5, and the obtained second data blocks are the 0th data block, the 2nd data block and the 4th data block.
[0126] Optionally, after the first earphone obtains the first data block and the second earphone obtains the second data block, the method may further include: the first earphone generates fifth reception information according to the obtained first data block; and sends the fifth reception information to the terminal device; the second earphone generates sixth reception information according to the obtained second data block; and sends the sixth reception information to the terminal device. After the two earphones receive the XOR data packet, due to the instability when transmitting the first data block and the second data block, the fifth reception information and the sixth reception information generated according to their own reception conditions after obtaining the first data block and the second data block may continue to be sent to the terminal device respectively, so as to provide feedback on the upgrade conditions of the two earphones respectively, so that the terminal device can detect the upgrade conditions of the two earphones.
[0127] Optionally, since the XOR data packet may include multiple XOR data blocks, the corresponding first data block and second data block may also include multiple data blocks. When the first earphone and the second earphone generate and send the fifth reception information and the sixth reception information, the fifth reception information and the sixth reception information may be generated after each data block in the first data block or the second data block is obtained, and sent to the terminal device, so as to provide real-time feedback on the reception situation; or the fifth reception information and the sixth reception information may be generated after all data blocks of the first data block or the second data block are obtained, so as to effectively save the bandwidth when sending in the earphone device.
[0128] It is worth noting that when the terminal device detects that the upgrade of the first earphone and the second earphone is not completed, the first earphone and the second earphone can continue to receive the terminal device to repeat the XOR operation according to the fifth received information and the sixth received information to generate and send the corresponding XOR data packet until at least one of the first earphone and the second earphone is detected as the upgrade is completed.
[0129] Optionally, when the terminal device detects that the first headset has been upgraded but the second headset has not been upgraded, the second headset can continue to receive the first missing data block sent by the terminal device based on the sixth reception information; when the terminal device detects that the second headset has been upgraded but the first headset has not been upgraded, the first headset continues to receive the second missing data block sent by the terminal device based on the fifth reception information. Thus, when at least one of the first headset and the second headset is detected as upgraded, the missing data block is transmitted separately to the other headset that has not been upgraded, thereby reducing the situation where the headset that has been upgraded repeatedly receives data blocks, and can receive data blocks in a targeted manner according to the reception situation of the headset that has not been upgraded, thereby improving the reception efficiency of missing data blocks.
[0130] It is worth noting that when the terminal device detects that one earphone has been upgraded and the other earphone has not been upgraded, when the communication quality between the earphone device and the terminal device is poor, the earphone that has been upgraded can send the first missing data block or the second missing data block to the earphone that has not been upgraded.
[0131] exist Figure 6 In the illustrated embodiment, the target data block received in the headphone device can be supplemented, thereby receiving the complete upgrade firmware for upgrading, reducing the number of reception times and transmission time when the headphone device receives the data block, and improving the reception efficiency of the upgrade firmware in the headphone device.
[0132] Optionally, see Figure 7 , Figure 7 A detailed flowchart diagram of step S300 is provided for an embodiment of the present application. Step S300 may also include steps S301-S304.
[0133] Step S301: the first earphone and the second earphone respectively receive a plurality of target data blocks.
[0134] Among them, since there is a sequence relationship among the multiple target data blocks, the multiple target data blocks are sent in sequence in the first sending, so the two earphones can receive the multiple target data blocks respectively when receiving.
[0135] Step S302: the first earphone generates third reception information according to the target header information of the received target data block; the second earphone generates fourth reception information according to the target header information of the received target data block.
[0136] After receiving the multiple target data blocks sent for the first time, the two earphones generate third reception information and fourth reception information reflecting the reception status of the target data blocks when receiving the target data blocks according to the target header information of the target data blocks received by themselves during the first reception.
[0137] For example, in the case where there are six target data blocks, the first earphone receives the 0th data block, the 2nd data block, and the 4th data block. The first earphone determines that the 0th data block, the 2nd data block, and the 4th data block have been received, but the 1st data block, the 3rd data block, and the 5th data block have not been received, based on the numbering information 0, 2, and 4 in the target header information of the received 0th data block, the 2nd data block, and the 4th data block. The bitmap string in the third reception information generated in the first earphone can be: 101010. The second earphone receives the 1st data block, the 2nd data block and the 5th data block. The second earphone determines that the 1st data block, the 2nd data block and the 5th data block are received, but the 0th data block, the 3rd data block and the 4th data block are not received, based on the label information 1, 2, 5 in the target header information of the received 1st data block, the 2nd data block and the 5th data block. The bitmap string in the fourth reception information generated in the second earphone can be: 011001, where 1 represents that the data block at this position is received, and 0 represents that the data block at this position is not received.
[0138] Step S303: the first earphone sends the third reception information to the terminal device; the second earphone sends the fourth reception information to the terminal device.
[0139] Among them, after generating the third reception information and the fourth reception information, the first earphone and the second earphone can set the third reception information and the fourth reception information into the payload of the message replied to the terminal device, so as to send the third reception information and the fourth reception information to the terminal device, so that the terminal device can obtain the reception status of the target data block in the earphone.
[0140] Step S304: the first earphone and the second earphone receive unreceived data blocks sent by the terminal device based on the third reception information and the fourth reception information.
[0141] The first earphone and the second earphone respectively receive the unreceived data blocks sent by the terminal device and not received by the two earphones, so as to realize the second reception of the earphones, so that after the second reception, the received target data blocks of the two earphones can be combined to form a complete upgrade firmware.
[0142] exist Figure 7 In the illustrated embodiment, the earphone device can perform two receptions so that the data blocks received in the two earphones can be combined to form a complete upgraded firmware.
[0143] Optionally, see Figure 8 , Figure 8 A detailed flowchart diagram of step S310 is provided for an embodiment of the present application. Step S310 may also include steps S311-S313.
[0144] Step S311: The first earphone determines first header information of the first data block that has not been received according to the target header information in the received target data block; and the first earphone generates the first reception information based on the target header information and the first header information.
[0145] Among them, although the data blocks received in the two earphones can be combined to form a complete upgrade firmware, due to the instability of broadcast transmission, the two earphones may not have a complete upgrade firmware. If the unreceived data blocks are received by the first earphone or the second earphone alone, it will cause a waste of time slots for the other earphone, affecting the upgrade time when the earphone device is upgraded. Therefore, after the first earphone receives the unreceived data blocks, the first header information of the unreceived first data block is determined according to the target header information in the currently received target data block, and the first reception information can be generated according to the first header information and the target header information. The first reception information can be set to the same data format as the third reception information and the fourth reception information, or it can be a data format including the target header information of the target data block that has not been received in the first earphone after the second reception.
[0146] For example, after the second reception, the first earphone receives the 0th data block, the 2nd data block, and the 4th data block, then the data such as the numbering information in the target header information of the target data block received in the first earphone can be 0, 2, 4, then the unreceived first data block includes the 1st data block, the 3rd data block, and the 5th data block, and the data such as the numbering information in the first header information can be 1, 3, 5, then the first reception information generated by the first earphone according to the target header information and the first header information can be 101010, or 135, etc.
[0147] Step S312: The second earphone determines second header information of the second data block that has not been received according to the target header information in the received target data block; and the second earphone generates the second reception information based on the target header information and the second header information.
[0148] Among them, after the second earphone receives the unreceived data block, the second header information of the unreceived second data block is determined according to the target header information in the currently received target data block, and the second reception information can be generated according to the second header information and the target header information. The second reception information can be set to the same data format as the third reception information and the fourth reception information, or can be a data format including the target header information of the target data block that has not been received in the second earphone after the second reception.
[0149] For example, after the second reception, the second earphone receives the 1st data block, the 3rd data block and the 5th data block, then the data such as the numbering information in the target header information of the target data block received in the second earphone may be 1, 3, 5, then the unreceived second data blocks include the 0th data block, the 2nd data block and the 4th data block, and the data such as the numbering information in the second header information may be 0, 2, 4, then the second reception information generated by the second earphone according to the target header information and the second header information may be 010101, or 024, etc.
[0150] Step S313: the first earphone sends the first received information to the terminal device; the second earphone sends the second received information to the terminal device.
[0151] Among them, the first receiving information and the second receiving information can be set in the payload of the message replied to the terminal device to send the first receiving information and the second receiving information to the terminal device, so that the terminal device can obtain the reception status of the target data block in the headset and perform the corresponding XOR operation.
[0152] exist Figure 8 In the illustrated embodiment, by sending the first reception information and the second reception information to the terminal device, the terminal device can perform an XOR operation to determine the XOR data packet of the first data block and the second data block that are not received by the two earphones.
[0153] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps of any one of the firmware sending method and firmware receiving method provided in this embodiment.
[0154] It should be understood that the electronic device may be a server, a personal computer, a tablet computer, a smart phone, a personal digital assistant, or other electronic device with logic computing capabilities.
[0155] An embodiment of the present application further provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the steps of any one of the firmware sending method and the firmware receiving method provided in the present embodiment are executed.
[0156] In summary, the embodiments of the present application provide a firmware sending method, a firmware receiving method and a firmware upgrade system, which send and receive the upgrade firmware in blocks, perform XOR operations and XOR parsing on the basis of multiple incomplete data blocks, and send and receive multiple data blocks that have not been received. The complete upgrade firmware can be transmitted to upgrade the firmware of the headphone device, reduce the transmission frequency and transmission time of the upgrade firmware, save bandwidth, and effectively improve the upgrade efficiency of the upgrade firmware in the headphone device.
[0157] In several embodiments provided in the present application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely schematic, for example, the block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices according to the multiple embodiments of the present application. In this regard, each box in the block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram, and the combination of the block diagrams, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0158] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0159] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Therefore, this embodiment also provides a computer program instruction stored in a readable storage medium, and when the computer program instruction is read and executed by a processor, the steps in any method described in the block data storage method are executed. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0160] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0161] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
[0162] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
Claims
1. A firmware sending method, characterized in that: Applied to a terminal device, the method comprises: Dividing the upgrade firmware corresponding to the headphone device into multiple target data blocks; Sending a plurality of the target data blocks to a first earphone and a second earphone in the earphone device; Performing an XOR operation on the first reception information fed back by the first earphone and the second reception information fed back by the second earphone to obtain an XOR data packet; Sending the XOR data packet to the first headset and the second headset; The performing an XOR operation on the first reception information fed back by the first earphone and the second reception information fed back by the second earphone to obtain an XOR data packet includes: receiving the first reception information fed back by the first earphone and the second reception information fed back by the second earphone; determining a first data block not received by the first earphone and a second data block not received by the second earphone based on the first reception information and the second reception information; performing an XOR operation on the first data block and the second data block to generate the XOR data packet; wherein the XOR data packet includes a plurality of XOR data blocks, each of the XOR data blocks having corresponding XOR header information, and the XOR header information is used to record which block of the first data block and the second data block is used to generate the XOR data block by performing the XOR operation.
2. The method according to claim 1, characterized in that The sending of the plurality of target data blocks to the first earphone and the second earphone in the earphone device comprises: Sending the plurality of target data blocks to the first headset and the second headset in sequence; acquiring third reception information sent when the first earphone receives the plurality of target data blocks and fourth reception information sent when the second earphone receives the plurality of target data blocks; Screening the plurality of target data blocks according to the third reception information and the fourth reception information to determine unreceived data blocks that are not received by the first headset and the second headset; The unreceived data blocks are sent to the first headset and the second headset respectively.
3. The method according to claim 1, characterized in that After sending the XOR data packet to the first headset and the second headset, the method further includes: receiving fifth reception information sent by the first earphone and sixth reception information sent by the second earphone; The upgrade status of the first headset and the second headset is detected based on the fifth received information and the sixth received information.
4. The method according to claim 3, characterized in that The method further comprises: When the first headset detects that the upgrade is completed and the second headset detects that the upgrade is not completed, determining a first missing data block in the second headset based on the sixth received information; and sending the first missing data block to the second headset; When the second headset detects that the upgrade is completed and the first headset detects that the upgrade is not completed, determine a second missing data block in the first headset based on the fifth received information; and send the second missing data block to the first headset.
5. A firmware receiving method, characterized in that: Applied to an earphone device, the earphone device includes a first earphone and a second earphone, and the method includes: The first earphone and the second earphone respectively receive a plurality of target data blocks sent by the terminal device; The first earphone sends first reception information to the terminal device according to the reception status of the plurality of target data blocks; the second earphone sends second reception information to the terminal device according to the reception status of the plurality of target data blocks; The first earphone performs XOR analysis according to the XOR data packet sent by the terminal device, and obtains a first data block not received by the first earphone; the second earphone performs XOR analysis according to the XOR data packet sent by the terminal device, and obtains a second data block not received by the second earphone; Among them, the XOR data packet is a data packet generated by the XOR operation of the first data block and the second data block determined by the terminal device based on the first received information and the second received information; the XOR data packet includes multiple XOR data blocks, each of the XOR data blocks has corresponding XOR header information, and the XOR header information is used to record which block of the first data block and the second data block the XOR data block is generated by the XOR operation.
6. The method according to claim 5, characterized in that The first earphone and the second earphone respectively receive a plurality of target data blocks sent by the terminal device, including: The first earphone and the second earphone respectively receive a plurality of the target data blocks; The first earphone generates third reception information according to the target header information of the received target data block; the second earphone generates fourth reception information according to the target header information of the received target data block; The first earphone sends the third reception information to the terminal device; the second earphone sends the fourth reception information to the terminal device; The first earphone and the second earphone receive unreceived data blocks sent by the terminal device based on the third reception information and the fourth reception information.
7. The method according to claim 6, characterized in that The first headset sends first reception information to the terminal device according to reception status of the plurality of target data blocks; The second headset sends second reception information to the terminal device according to reception conditions of the plurality of target data blocks, including: The first earphone determines, according to the target header information in the received target data block, the first header information of the first data block that has not been received; the first earphone generates the first reception information based on the target header information and the first header information; The second earphone determines, according to the target header information in the received target data block, the second header information of the second data block that has not been received; and the second earphone generates the second reception information based on the target header information and the second header information; The first earphone sends the first received information to the terminal device; the second earphone sends the second received information to the terminal device.
8. The method according to claim 5, characterized in that The method further comprises: The first headset generates fifth reception information according to the acquired first data block; and sends the fifth reception information to the terminal device; The second headset generates sixth reception information according to the acquired second data block; and sends the sixth reception information to the terminal device.
9. A firmware upgrade system, characterized in that: The system comprises a terminal device and a headphone device as described in any one of claims 1 to 8, wherein the terminal device and the headphone device are communicatively connected; The terminal device is used to divide the upgrade firmware corresponding to the headphone device into a plurality of target data blocks; Sending the plurality of target data blocks to a first earphone and a second earphone in the earphone device; performing an XOR operation according to first reception information fed back by the first earphone and second reception information fed back by the second earphone to obtain an XOR data packet; and sending the XOR data packet to the first earphone and the second earphone; The earphone device comprises a first earphone and a second earphone, which are used to respectively receive a plurality of target data blocks sent by the terminal device; Sending first reception information and second reception information to the terminal device according to the reception status of the plurality of target data blocks; performing XOR analysis on the XOR data packet sent by the terminal device to obtain a first data block not received by the first headset and a second data block not received by the second headset; The terminal device is specifically used to: receive the first reception information fed back by the first earphone and the second reception information fed back by the second earphone; determine the first data block not received in the first earphone and the second data block not received in the second earphone based on the first reception information and the second reception information; perform an XOR operation based on the first data block and the second data block to generate the XOR data packet; wherein the XOR data packet includes multiple XOR data blocks, each of the XOR data blocks has corresponding XOR header information, and the XOR header information is used to record which block of the first data block and the second data block is used to generate the XOR data block by performing an XOR operation.
10. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores program instructions, and when the processor runs the program instructions, the steps in the method according to any one of claims 1 to 8 are executed.
11. A computer-readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps in the method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Method and device for sending and receiving audio signals
CN104700837A
Earphone upgrading method and device, earphone control method, earphone group and storage medium
CN111556117A