CN111556117A - Earphone upgrading method and device, earphone control method, earphone set and storage medium - Google Patents

Earphone upgrading method and device, earphone control method, earphone set and storage medium Download PDF

Info

Publication number
CN111556117A
CN111556117A CN202010322552.XA CN202010322552A CN111556117A CN 111556117 A CN111556117 A CN 111556117A CN 202010322552 A CN202010322552 A CN 202010322552A CN 111556117 A CN111556117 A CN 111556117A
Authority
CN
China
Prior art keywords
earphone
data packets
upgrading
data packet
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010322552.XA
Other languages
Chinese (zh)
Inventor
李涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202010322552.XA priority Critical patent/CN111556117A/en
Publication of CN111556117A publication Critical patent/CN111556117A/en
Priority to PCT/CN2020/124853 priority patent/WO2021212798A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1025Accumulators or arrangements for charging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083

Landscapes

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

Abstract

The invention discloses an earphone upgrading method, which comprises the following steps: receiving and caching a plurality of data packets corresponding to the upgrade files one by one; in the process of caching a plurality of data packets corresponding to the upgrade file, the cached data packets are synchronously sent to each earphone in the earphone set until all the data packets corresponding to the upgrade file are cached and sent to each earphone, so that each earphone executes upgrade operation based on all the data packets corresponding to the received upgrade file. The invention also discloses an earphone control method, an earphone upgrading device, an earphone set and a readable storage medium. The invention aims to ensure that upgrading devices such as a charging box and the like can synchronously send data required by upgrading to two earphones, realize synchronous upgrading of earphone sets and improve the upgrading efficiency of the earphone sets.

Description

Earphone upgrading method and device, earphone control method, earphone set and storage medium
Technical Field
The present invention relates to the field of earphone technologies, and in particular, to an earphone upgrading method, an earphone upgrading apparatus, an earphone control method, an earphone set, and a readable storage medium.
Background
With the development of technology, the application of TWS (abbreviation of True Wireless Stereo) headset is becoming more and more popular. Typically, the headset product of the TWS includes a headset and a device (such as a charging box) which is assembled with the headset, and when mass production is performed, especially before the software version is stable, it is necessary to perform an upgrade operation on the headset at the factory.
At present, the general upgrading mode is that the computer sends the upgrading file to the earphone through the charging box. In the process, the charging box is connected with the earphones, and when the charging box receives the upgrading data sent by the computer, the data are instantly forwarded to the earphones connected with the charging box, so that the charging box can only execute upgrading operation on one earphone at a time, different earphones in the earphone set can only execute the upgrading operation in sequence, and the upgrading efficiency of the TWS earphones is low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide an earphone upgrading method, aiming at enabling upgrading devices such as a charging box and the like to synchronously send data required by upgrading to two earphones, realizing synchronous upgrading of earphone sets and improving the upgrading efficiency of the earphone sets.
In order to achieve the above object, the present invention provides an earphone upgrading method, which includes the following steps:
receiving and caching a plurality of data packets corresponding to the upgrade files one by one;
in the process of caching a plurality of data packets corresponding to the upgrade file, the cached data packets are synchronously sent to each earphone in the earphone set until all the data packets corresponding to the upgrade file are cached and sent to each earphone, so that each earphone executes upgrade operation based on all the data packets corresponding to the received upgrade file.
Optionally, the step of synchronously transmitting the buffered data packets to each earphone in the earphone set includes:
when first request information is received, determining a target data packet which needs to be sent to the earphone corresponding to the first request information in the cached data packets; the first request information is sent by each earphone when not receiving all data packets corresponding to the upgrade file;
and sending the target data packet to the earphone corresponding to the first request information.
Optionally, when receiving the first request information, the step of determining, in the cached data packets, a target data packet to be sent to the earphone corresponding to the first request information includes:
when the first request message is received, extracting a first data packet index in the first request message; the first data packet index is information generated by the earphone corresponding to the first request information according to the number of the received data packets;
and taking the data packet corresponding to the first data packet index as the target data packet in the cached data packets.
Optionally, after the extracting the first packet index in the first request information, the method further includes:
when the data packet corresponding to the first data packet index does not exist in the cached data packet, sending a first message to the earphone corresponding to the first request information, so that the earphone corresponding to the first request information resends the first request information after a first duration; and/or the presence of a gas in the atmosphere,
when first request information is received, before the step of extracting the first data packet index in the first request information, the method further includes:
performing cyclic redundancy check on the first request message;
if the check is passed, executing the step of extracting the first data packet index in the first request message;
and if the verification fails, sending a second message to the earphone corresponding to the first request message, so that the earphone corresponding to the first request message resends the first request message.
Optionally, the headset upgrading method further includes the following steps:
in the process of caching a plurality of data packets corresponding to an upgrade file, when received data comprises a set flag bit, judging that all the data packets corresponding to the upgrade file are cached completely;
judging whether the cached data packet has a data packet which is not sent to the earphone;
and if so, executing the step of determining a target data packet which needs to be sent to the earphone corresponding to the first request information in the cached data packets when the first request information is received.
Optionally, after the step of determining that all the data packets corresponding to the upgrade file are cached, the method further includes:
setting the cache size to be 0 to enter a first state, wherein the first state is a state of data real-time interaction between a terminal providing the upgrade file and the earphone;
receiving verification information corresponding to the upgrade file sent by the terminal and sending the verification information to each earphone;
acquiring a verification result returned by each earphone based on the verification information;
and generating a third message according to each verification result, and sending the third message to the terminal so that the terminal determines the receiving state of each earphone relative to the upgrade file according to the third message.
Optionally, the step of receiving and caching a plurality of data packets corresponding to the upgrade file one by one includes:
judging whether a buffer area in an idle state exists or not;
if the cache area in the idle state exists, second request information is sent to the terminal providing the upgrade file;
receiving a data packet returned by the terminal based on the second request information;
buffering the received data packet in a buffer area in an idle state;
returning to the step of judging whether the buffer area in the idle state exists or not;
and if the buffer area in the idle state does not exist, returning to the step of judging whether the buffer area in the idle state exists or not.
Optionally, when the number of the buffer areas for buffering the data packets is smaller than the number of the data packets, after the step of sending the target data packet to the headset corresponding to the first request information, the method further includes:
judging whether the target data packets are all sent to each earphone in the earphone set;
if so, deleting the target data packet to enable the cache region where the target data packet is located to enter an idle state;
if not, the target data packet is reserved.
Optionally, the step of determining whether there is a buffer in an idle state includes:
obtaining a first number of buffered data packets, and obtaining a second number of data packets that have been sent to each of the headsets;
determining a difference between the first number and the second number;
judging whether the difference value is smaller than the number of the cache regions;
when the difference is smaller than the number of the cache regions, judging that the cache region in an idle state exists;
and when the difference value is larger than or equal to the number of the buffer areas, judging that no buffer area in an idle state exists.
Optionally, the step of obtaining the second number of data packets that have been sent to each of the headsets comprises:
acquiring a third number of transmitted data packets corresponding to each earphone in the earphone set;
and taking the third quantity with the smallest numerical value as the second quantity in the acquired third quantities.
Optionally, after the step of sending the second request information to the terminal providing the upgrade file, the method further includes:
when a data packet returned by the terminal based on the second request information is not received within a second time length, returning to the step of judging whether the buffer area in the idle state exists or not, and exiting the upgrading process of the earphone set until the number of times of returning reaches a set value; and/or the presence of a gas in the atmosphere,
before the step of buffering the received data packet in the buffer in the idle state, the method further includes:
performing cyclic redundancy check on the received data packet;
if the verification is passed, the step of caching the received data packet in a cache area in an idle state is executed;
and if the verification is not passed, returning to execute the step of sending the second request information to the terminal providing the upgrade file.
In addition, the invention also provides an earphone control method, based on an earphone upgrading device applying the earphone upgrading method, wherein the earphone control method comprises the following steps:
controlling the earphone to send first request information to an earphone upgrading device, so that when the earphone upgrading device receives the first request information in the process of caching a plurality of data packets corresponding to the upgrading file, in the cached data packets, a target data packet which needs to be sent to the earphone corresponding to the first request information is determined, and the target data packet is sent to the earphone.
And after determining that the earphone receives all the data packets corresponding to the upgrade file, executing upgrade operation based on all the data packets corresponding to the received upgrade file to execute the upgrade operation.
Optionally, after the step of controlling the headset to send the first request information to the headset upgrading apparatus, the method further includes:
judging whether the earphone receives all data packets corresponding to the upgrade file;
if not, returning to the step of executing the step of sending the first request information to the earphone upgrading device by the control earphone;
and if so, executing the upgrading operation based on all the data packets corresponding to the received upgrading file.
Optionally, the step of controlling the headset to send the first request message to the headset upgrading device includes:
acquiring a first data packet index; the first data packet index is information generated according to the number of data packets of the upgrade file currently received by the earphone;
and controlling the earphone to send first request information comprising a first data packet index to the earphone upgrading device.
Optionally, after determining that the earphone receives all the data packets corresponding to the upgrade file, before the step of performing the upgrade operation based on all the data packets corresponding to the received upgrade file, the method further includes:
receiving verification information sent by the earphone upgrading device;
judging whether the characteristic information of all data packets corresponding to the received upgrade file is matched with the verification information or not to obtain a judgment result;
and generating a verification result according to the judgment result and feeding the verification result back to the earphone upgrading device so that the earphone upgrading device generates a third message according to the verification result and sends the third message to a terminal providing the upgrading file, and the terminal determines the receiving state of the earphone about the upgrading file according to the third message.
In addition, in order to achieve the above object, the present application also provides a headset upgrading apparatus, including: a memory, a processor and a headset upgrade program stored on the memory and executable on the processor, the headset upgrade program, when executed by the processor, implementing the steps of the headset upgrade method as claimed in any one of the above.
Furthermore, in order to achieve the above object, the present application also proposes a headset comprising more than one headset, each headset comprising: a memory, a processor and a headset control program stored on the memory and executable on the processor, the headset control program when executed by the processor implementing the steps of the headset upgrade method as claimed in any one of the above.
Furthermore, in order to achieve the above object, the present application also proposes a readable storage medium having stored thereon a computer program which, when being executed by a processor, implements the headset upgrade method according to any of the above and/or the steps of the headset control method according to any of the above.
The invention provides an earphone upgrading method, which comprises the steps of receiving and caching a plurality of data packets corresponding to an upgrading file one by one, synchronously sending the cached data packets to each earphone in an earphone set in the process of caching the plurality of data packets corresponding to the upgrading file until all the data packets corresponding to the upgrading file are cached completely and sent to each earphone, so that each earphone executes upgrading operation based on all the data packets corresponding to the received upgrading file. In the upgrading mode, the upgrading file is not forwarded to the earphones in real time any more, but a plurality of data packets corresponding to the upgrading file are received and cached step by step, the cached data packets are respectively sent to each earphone of the earphone set in the process of caching the data packets step by step, so that each earphone in the earphone set can synchronously receive the upgrading file, each earphone can receive the upgrading data without waiting for other earphones to receive the whole upgrading file, each earphone can execute upgrading operation after receiving the whole upgrading file, and the time spent on upgrading the whole earphone set is effectively shortened. By the mode, when the upgrading device such as the charging box is adopted to execute upgrading operation for the earphone set, the data required by upgrading can be synchronously sent to the two earphones, the synchronous upgrading of the earphone set is realized, and therefore the upgrading efficiency of the earphone set is effectively improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure involved in the operation of an upgrade process of a headset according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an embodiment of an earphone upgrading method according to the present invention;
fig. 3 is a schematic flowchart of an earphone upgrading method according to another embodiment of the present invention;
fig. 4 is a schematic flowchart of an earphone upgrading method according to another embodiment of the present invention;
fig. 5 is a schematic flowchart of an earphone upgrading method according to another embodiment of the present invention;
fig. 6 is a flowchart illustrating an embodiment of a method for controlling an earphone according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: receiving and caching a plurality of data packets corresponding to the upgrade files one by one; in the process of caching a plurality of data packets corresponding to the upgrade file, the cached data packets are synchronously sent to each earphone in the earphone set until all the data packets corresponding to the upgrade file are cached and sent to each earphone, so that each earphone executes upgrade operation based on all the data packets corresponding to the received upgrade file.
In the prior art, when the earphone set is upgraded, the computer generally adopts an upgrading mode that the computer sends an upgrading file to the earphone through the charging box. In the process, the charging box is connected with the earphones, and when the charging box receives the upgrading data sent by the computer, the data are instantly forwarded to the earphones connected with the charging box, so that the charging box can only execute upgrading operation on one earphone at a time, different earphones in the earphone set can only execute the upgrading operation in sequence, and the upgrading efficiency of the TWS earphones is low.
The invention provides the solution, and aims to enable upgrading devices such as a charging box and the like to synchronously send data required by upgrading to two earphones, realize synchronous upgrading of earphone sets and improve the upgrading efficiency of the earphone sets.
The invention provides an earphone upgrading device 1000, which is used for upgrading earphones, in particular earphone sets comprising more than one earphone. Here, the earphone upgrade apparatus 1000 may be any apparatus, and only the earphone may be upgraded. In this embodiment, the headset upgrading device 1000 may be a charging box of a headset, so as to achieve both the upgrading function and the charging function required by the headset.
In an embodiment of the present invention, referring to fig. 1, a headset upgrading apparatus 1000 includes: a processor 1001 (e.g., a CPU), a memory 1002 connected to the processor 1001, and the like. The memory 1002 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 1002 may alternatively be a storage device separate from the processor 1001. The memory 1002 may be provided with a plurality of buffer areas for data buffering.
Wherein the processor 1001 is connected to the terminal 01 providing the upgrade file. Further, the processor 1001 is also connected to each earphone 21 in the earphone set 2.
Those skilled in the art will appreciate that the configuration of the device shown in fig. 1 is not intended to be limiting of the device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a headset upgrade program may be included in the memory 1002, which is a readable storage medium. In the apparatus shown in fig. 1, the processor 1001 may be configured to call a headset upgrading program stored in the memory 1002 and perform operations of the relevant steps of the headset upgrading method in the following embodiments.
Based on the earphone upgrading device, the invention also provides an earphone upgrading method, which is used for upgrading the earphone, in particular to upgrading an earphone set comprising more than one earphone. The earphone upgrading method is applied to the earphone upgrading device and can be used for upgrading each earphone in an earphone set which is in communication connection with the earphone upgrading device.
Referring to fig. 2, an embodiment of the earphone upgrading method of the present invention is provided, where the earphone upgrading method includes:
step S10, receiving and caching a plurality of data packets corresponding to the upgrade files one by one;
when the earphone upgrading device such as a charging box receives a setting instruction, the earphone upgrading device can enter an upgrading mode so as to upgrade the connected earphone set. In the upgrade mode, an earphone upgrade apparatus such as a charging box receives a data packet of an upgrade file step by step from a terminal providing the upgrade file. Because the upgrade file is generally large, the terminal can divide the upgrade file into a plurality of data packets (for example, 1000 data packets), and send the data packets to the earphone upgrading device such as a charging box one by one. Based on this, in the upgrade mode, the charging box sequentially receives the data packets of the upgrade file sent from the terminal providing the upgrade file, and when any one of the data packets is received, the charging box does not immediately forward the data packet to the earphone, but buffers the received data packet, and buffers the data packet in the buffer area of the memory.
The terminal can actively send a data packet to the earphone upgrading devices such as the charging box, and the data packet can also be returned after receiving a request sent by the earphone upgrading devices such as the charging box, so that the earphone upgrading devices such as the charging box can upgrade the earphones in the earphone set based on the received data packet.
Step S20, in the process of caching the plurality of data packets corresponding to the upgrade file, synchronously sending the cached data packets to each earphone in the earphone set until all the data packets corresponding to the upgrade file are cached and sent to each earphone, so that each earphone executes the upgrade operation based on all the data packets corresponding to the received upgrade file.
In the process of receiving and buffering the data packets one by one in step S10, the buffered data packets are synchronously transmitted to each earphone of the earphone group. Specifically, when the data packets of at least one upgrade file are received and cached, and the number of the cached data packets is less than the total number of the data packets corresponding to the upgrade file, the data packets that have not been received by the earphones in the earphone set may be determined in the cached data packets, and the data packets may be sent to each earphone in the earphone set respectively. After completing the transmission of one buffered data packet, the next buffered data packet that is not transmitted to the headset may continue to be transmitted to the headset. That is, all the data packets corresponding to the headset files do not need to be cached completely, and the cached data packets can be sent to each headset of the headset group one by one.
The earphone upgrading device such as the charging box can actively send the cached data packet to each earphone in the earphone set, and can also return the corresponding data packet to the corresponding earphone after receiving the request sent by each earphone in the earphone set.
In the process of receiving and sending the data packets, if all the data packets corresponding to the upgrade file are not cached completely, the process of receiving and caching the data packets corresponding to the upgrade file one by one is maintained, if all the data packets corresponding to the upgrade file are received and cached, whether the cached data packets are all sent to each earphone in the earphone set or not is judged, and if all the data packets are sent to each earphone, each earphone in the earphone set can be considered to have received the complete upgrade file; if the data packets which are not sent to the earphones in the earphone set exist in the cached data packets, the data packets which are not sent can be continuously sent to the corresponding earphones, and after the data packets are sent, whether the cached data packets are all sent to each earphone in the earphone set can be judged.
When the upgrade file is divided into N data packets, if the number of the received and cached data packets is N, all the data packets corresponding to the upgrade file are cached completely, and if the number of the received and cached data packets is less than N, the data packets corresponding to the upgrade file are not cached completely. When the number of the buffered data packets sent to each earphone in the earphone set is N, and the buffered data packets are sent to each earphone in the earphone set; if the number of the buffered data packets sent to any earphone in the earphone set is less than N, the buffered data packets are not sent to the earphones in the earphone set.
It should be noted that, the receiving and caching of the data packet and the sending of the data packet are two processes that are not affected each other, and the earphone upgrading device such as the charging box can synchronously send the data packet while receiving and caching the data packet from the terminal providing the upgrade file.
The method for upgrading the earphones, provided by the embodiment of the invention, comprises the steps of receiving and caching a plurality of data packets corresponding to an upgrade file one by one, and synchronously sending the cached data packets to each earphone in an earphone set in the process of caching the plurality of data packets corresponding to the upgrade file until all the data packets corresponding to the upgrade file are cached and sent to each earphone, so that each earphone executes upgrade operation based on all the data packets corresponding to the received upgrade file. In the upgrading mode, the upgrading file is not forwarded to the earphones in real time any more, but a plurality of data packets corresponding to the upgrading file are received and cached step by step, the cached data packets are respectively sent to each earphone of the earphone set in the process of caching the data packets step by step, so that each earphone in the earphone set can synchronously receive the upgrading file, each earphone can receive the upgrading data without waiting for other earphones to receive the whole upgrading file, each earphone can execute upgrading operation after receiving the whole upgrading file, and the time spent on upgrading the whole earphone set is effectively shortened. By the mode, when the upgrading device such as the charging box is adopted to execute upgrading operation for the earphone set, the data required by upgrading can be synchronously sent to the two earphones, the synchronous upgrading of the earphone set is realized, and therefore the upgrading efficiency of the earphone set is effectively improved.
Further, based on the above embodiment, another embodiment of the method for upgrading the earphone of the present application is provided. In another embodiment, referring to fig. 3, the step of synchronously transmitting the buffered data packets to each earphone in the earphone set in step S20 includes:
step S21, when first request information is received, determining a target data packet which needs to be sent to the earphone corresponding to the first request information in the cached data packets; the first request information is sent by each earphone when not receiving all data packets corresponding to the upgrade file;
in the upgrade mode, when the number of data packets corresponding to the upgrade file received by each earphone in the earphone set is smaller than the total number of data packets of the upgrade file, first request information may be sent to the earphone upgrade device. Each earphone can send corresponding first request information according to the actual receiving condition of the earphone.
When the first request information is received, the earphone requirement corresponding to the first request information can be considered to acquire the data packet of the upgrade file, whether the data packet which is not received by the earphone corresponding to the first request information exists in the currently cached data packet or not can be judged, if yes, the corresponding data packet can be used as a target data packet which needs to be sent to the earphone corresponding to the first request information, and if not, a corresponding message can be sent to inform the earphone so that the earphone can further respond.
Specifically, there may be one or more than one determined target data packet according to the actual situation. In order to ensure the integrity of the data packets received by the headset. Each earphone of the earphone set can continuously send first request information before receiving all data packets corresponding to the upgrade file, and each first request information corresponds to a data packet requesting for one upgrade file. Specifically, after each earphone of the earphone set sends the first request message and receives one data packet returned based on the first request message, the first request message may be continuously sent to receive the next data packet until the earphone receives all data packets corresponding to the upgrade file. Based on this, when the earphone upgrading device receives a first request message, the buffered data comprises a data packet which is determined not to be sent to the earphone corresponding to the first request message as a target data packet.
Step S22, sending the target data packet to the earphone corresponding to the first request information.
When one target data packet exists, the target data packet can be directly sent to the earphone corresponding to the first request information; when the number of the target data packets is more than one, the target data packets can be sequentially sent to the earphones corresponding to the first request information.
In this embodiment, the data packet of the upgrade file is sent to the corresponding earphone after the first request message is received, so that the earphone upgrade device can accurately know the upgrade requirement of the earphone and send corresponding upgrade data to the corresponding earphone, and the synchronous upgrade of more than one earphone sending the first request message can be realized while the accuracy of sending the upgrade file is ensured.
Specifically, step S21 specifically includes:
step S211, when receiving the first request message, extracting a first packet index in the first request message; the first data packet index is information generated by the earphone corresponding to the first request information according to the number of the received data packets.
In the earphone upgrading device, each time a data packet is received and buffered, an index can be established for the data packet. Different packets have different indices. The index of the first data packet of the defined buffer memory is 0, and the indexes of the subsequently received data packets are sequentially increased by 1. I.e., the index of the first packet buffered is 0, the index of the second packet buffered is 1, the index of the third packet buffered is 2, and so on.
In each earphone of the earphone set, each time a data packet sent by one earphone upgrading device is received, an index can be established for the data packet. Different packets have different indices. I.e., the index of the first packet received is 0, the index of the second packet received is 1, the index of the third packet received is 2, and so on.
Based on this, the headset may determine the next packet index that needs to be received as the first packet index herein based on the reception request of its current packet (e.g., the number of packets of the received upgrade file). For example, the total amount of the data packets of the upgrade file received by the earphone can be obtained by obtaining the maximum value of the index of the data packet currently established by the earphone, and the obtained maximum value of the index is increased by 1 to be used as the index of the next data packet to be received, so as to obtain the first data packet index. By sending a first request message containing the first packet index, the headset upgrading device can specify which next packet is required by the headset.
When receiving the first request message, before extracting the data packet index in the request message, performing cyclic redundancy check (CRC check) on the first request message, and performing the step of extracting the first data packet index in the first request message only when the check is passed; if the verification fails, sending a second message to the earphone corresponding to the first request message, so that the earphone corresponding to the first request message resends the first request message containing the same index as the index of the first data packet at the current time, that is, if the current first request message contains the index M, the earphone resends the first request message containing the index M immediately after receiving the second message. Here, the cyclic redundancy check can ensure the accuracy of the first request information, improve the accuracy of the earphone upgrading device in sending a data packet to the corresponding earphone based on the first request information, and ensure that the earphone to be upgraded can accurately and effectively receive the upgrade file required by the earphone.
Step S212, in the cached data packets, taking the data packet corresponding to the first data packet index as the target data packet.
After receiving the first request information sent by any earphone, the earphone upgrading device can extract the first data packet index therein, and match the obtained first data packet index with the index corresponding to the cached data packet. When the index corresponding to the cached data packet includes the first data packet index in the current first request message, the cached data packet corresponding to the first data packet index is regarded as the data packet corresponding to the first data packet index, and the cached data packet corresponding to the first data packet index is used as the target data packet. When the index corresponding to the cached data packet does not have the first data packet index in the current first request information, the data packet corresponding to the first data packet index does not exist in the cached data packet, and it can be considered that the data packet required by the earphone is not cached from the terminal providing the upgrade file, the first message can be sent to the earphone corresponding to the first request information, so that the earphone corresponding to the first request information resends the first request information containing the same index as the current first data packet index after the first time period, that is, the current first request information contains the index M, and the earphone resends the first request information containing the index M immediately after receiving the second message, thereby ensuring that the earphone can receive each required data packet, and ensuring the validity of the earphone for receiving the data packet of the upgrade file and the integrity.
For example, when the earphone set includes a first earphone and a second earphone, if a number of data packets received by the first earphone is a, the index of the first data packet is a +1, the first earphone can send first request information of a +1 to the earphone upgrading device, and the earphone upgrading device can send the data packet with the index of a +1 to the first earphone after receiving the first request information; if the number of the data packets received by the second earphone is B, the index of the first data packet is B +1, the first earphone can send first request information of B +1 to the earphone upgrading device, and the earphone upgrading device can send the data packet with the index of B +1 to the first earphone after receiving the first request information. The communication speed between the earphone A and the earphone upgrading device is higher than that between the earphone B and the earphone upgrading device, and if A is higher than B, the A is possibly larger than B.
Further, the foregoing embodiment provides another embodiment of the method for upgrading an earphone of the present application. In yet another embodiment, referring to fig. 4, the headset upgrading method further includes the steps of:
step S30, in the process of caching a plurality of data packets corresponding to the upgrade file, when the received data includes the set flag bit, it is determined that all the data packets corresponding to the upgrade file are cached completely.
The received data sent by the terminal providing the upgrade file includes a set flag bit, which indicates that the terminal has sent all data packets corresponding to the upgrade file, that is, all data packets corresponding to the upgrade file have been cached before the set flag bit appears. In addition, if the received data does not include the set flag bit during the process of receiving and caching the plurality of data packets corresponding to the upgrade file one by one, the execution of step S10 may be maintained.
For example, the first byte in the received data may be 1, defined as a set flag bit. The first byte of the data packet in the received upgrade file can be 0 or the first bytes of other data packets are 0 except the first byte of the last data packet of the upgrade file is 1. If the first byte in the received data is 1, it can be considered that all the data packets in the upgrade file have been sent.
Step S40, judging whether the cached data packet has a data packet which is not sent to the earphone;
if there is a data packet that is not sent to the earphone, the step S21 is executed, or the data packet may be directly sent to the corresponding earphone; if all the buffered packets have been sent to the headset packets, step S50 may be executed.
Step S50, setting the buffer size to 0 to enter a first state, wherein the first state is a state of data real-time interaction between the terminal providing the upgrade file and the earphone;
in the first state, the earphone upgrading device receives data sent by the terminal providing the upgrading file, does not perform caching, and directly forwards the data to the earphone.
In addition, in other embodiments, step S50 may be performed after step S30 without performing step S40. For example, after a certain time interval after step S30 is ensured to provide enough time for the buffered data packets to be transmitted to the headset, step S50 is performed.
Step S60, receiving the verification information corresponding to the upgrade file sent by the terminal and sending the verification information to each earphone;
the verification information is generated specifically according to the upgrade file. The verification information of the upgrade files is different. The verification information can be set according to actual conditions. For example, the entire data length of the upgrade file may be used as the check information. The verification information can be directly and respectively sent to the two earphones, or the earphone which receives the verification information can forward the verification information to the earphone which does not receive the verification information after the verification information is sent to one earphone.
Step S70, obtaining the verification result returned by each earphone based on the verification information;
after the verification information received by each earphone, corresponding characteristic information can be generated based on the upgrade file formed by the data packets of all the upgrade files received by each earphone. And judging whether the characteristic information is matched with the verification information or not, and feeding back the judgment result serving as a verification result to the earphone upgrading device. The matching of the characteristic information and the verification information can indicate that the earphone successfully receives the same upgrading data as the upgrading file provided by the terminal; the feature information is not matched with the verification information, which can indicate that the earphone does not successfully receive the same upgrading data as the upgrading file provided by the terminal. After the characteristic information is matched with the verification information, the earphone can execute upgrading operation based on an upgrading file formed by the received data packets of all upgrading files; if not, the upgrade operation can not be executed based on the received upgrade data, so that the upgradable accuracy of the earphone is ensured.
Step S80, generating a third message according to each verification result, and sending the third message to the terminal, so that the terminal determines the receiving status of each earphone with respect to the upgrade file according to the third message.
Specifically, the verification results returned by all the earphones in the earphone group can be combined, and a corresponding message is generated and sent to the terminal providing the upgrade file. The terminal analyzes the third message, so that whether each earphone of the earphone set successfully receives the upgrade data or not can be known, whether the received upgrade data is accurate or not can be known, corresponding prompt information can be further output, the upgrade condition of the earphone set can be monitored, the terminal or a user of the terminal can further handle the upgrade condition in time, and the upgrade success of each earphone of the earphone set can be guaranteed.
In this embodiment, whether the data packets corresponding to the upgrade file are all cached is identified based on the set identification bits sent by the terminal providing the upgrade file, and the process of sending the data packets to the earphone is further controlled after caching is completed, so that the accuracy of transmission of the whole upgrade file is ensured, and the accuracy of performing upgrade operation on the earphone in the earphone set through the earphone upgrade device is realized.
After all the data packets corresponding to the upgrade file are judged to be completely cached, corresponding messages (such as the maximum value of the current index of the cached data packets) can be sent to each earphone in the earphone set, so that the earphones can know the total number of the data packets in the upgrade file required to be received and the like, and if the number of the data packets received by the earphones does not reach the total number, the first request information can be continuously sent; if the total number is reached, the first request information is not sent any more, but all the data packets corresponding to the received upgrade file are directly adopted to execute the upgrade operation, or the upgrade operation is executed by adopting all the data packets corresponding to the received upgrade file after the verification is passed based on the verification information, so that the integrity of the upgrade file received by the earphone is further ensured.
Further, based on any of the above embodiments, a further embodiment of the method for upgrading the earphone of the present application is provided. In this embodiment, referring to fig. 5, the step S10 includes:
step S11, judging whether a buffer area in an idle state exists;
if yes, go to step S12; if not, execution returns to execution step S11.
Step S12, sending second request information to the terminal providing the upgrade file;
the second request information may request a data package of one or more upgrade files according to actual circumstances. In this embodiment, a second request message requests a package for upgrading a file in a terminal. Based on this, in order to ensure the accuracy and integrity of the entire upgrade file transmission, the second request information may be generated based on the index of the cached packets (i.e., the number of cached packets). Specifically, the index of the next data packet to be received may be obtained as the index of the second data packet according to the maximum value of the currently generated cached data packet. And sending second request information comprising a second data packet index to the terminal so that the terminal can know which data packet needs to be sent to the earphone upgrading device next, and accurate transmission of the data packet of the upgrading file is realized.
Step S13, receiving a data packet returned by the terminal based on the second request message;
the terminal can send the second request information to the earphone upgrading device to return one or more than one data packet of the upgrading file after receiving the second request information. Specifically, in order to ensure the accuracy and the integrity of the transmission of the whole upgrade file, the terminal returns a data packet of the upgrade file every time the terminal receives a second request message. Specifically, the terminal may extract the second packet index in the second request message, and query the corresponding packet based on the second packet index to return. Here, the terminal may set up an index for each packet in the upgrade file corresponding to a set-up rule of the packet index in the headset upgrade apparatus. The index of the same data packet at the terminal is the same as the index in the headset upgrading device.
And when the data packet returned by the terminal based on the second request information is not received within the second duration, returning to the step of judging whether the buffer area in the idle state exists or not, and exiting the upgrading process of the earphone group until the number of times of returning reaches a set value. Here, when there is no return packet for a plurality of requests, it may be considered that there is an abnormality in the transmission of the upgrade file between the headphone upgrading device and the terminal, and the upgrade operation cannot be performed on the headphone set, so that the upgrade of the headphone set may be stopped.
Step S14, buffering the received packet in a buffer in an idle state; after that, the flow returns to step S11.
The buffer area in the idle state means that the buffer area has a space for buffering, and data is effectively buffered. One buffer area correspondingly buffers one data packet.
In order to ensure the accuracy of the received data packet and further improve the success rate of headset upgrade, before step S14, cyclic redundancy check is performed on the received data packet; if the verification is passed, the step of caching the received data packet in a cache area in an idle state is executed; and if the verification is not passed, returning to the step of sending the second request information to the terminal providing the upgrade file so as to request the same data packet again.
In this embodiment, when it is ensured that the earphone upgrading device has a buffer area in an idle state, the data packet of the upgrade file is requested from the terminal, so that the validity of receiving and buffering the data packet of the upgrade file by the earphone upgrading device is ensured, and the reliability of the earphone set upgrading process is improved.
Furthermore, the number of the buffer areas for buffering the data packets in the earphone upgrading device is not always matched with the number of the data packets, and the number of the buffer areas is enough, so that the receiving of the data packets is not affected, and if the number of the buffer areas is smaller than the weight of the data packets in the upgrading file, the earphone upgrading device cannot continuously receive and buffer the data packets of the upgrading file. Based on this, when the number of the buffer areas for buffering the data packets is smaller than the number of the data packets, after the step of sending the target data packet to the earphone corresponding to the first request message, the method further includes: judging whether the target data packets are all sent to each earphone in the earphone set; if so, deleting the target data packet to enable the cache region where the target data packet is located to enter an idle state; if not, the target data packet is reserved. Here, after the headset upgrading apparatus transmits the data packet to the corresponding headset, the index of the data packet may be recorded. Different headsets in the headset may have different sent records. If the index corresponding to the target data packet is recorded in the sent record of each earphone, the target data packet can be considered to be sent to each earphone in the earphone set, and the data packet can be deleted; if the index corresponding to the target data packet is not recorded in the sent record of any earphone, the data packet can be reserved. After the duration is set after the data packet is reserved, the first request information containing the data packet index sent by the corresponding earphone is not received, and if the earphone is considered to have an abnormal upgrading condition, the data packet can be deleted, so that other earphones which are not abnormal can be upgraded normally.
Based on this, step S11 specifically includes:
step S111, acquiring a first number of buffered data packets, and acquiring a second number of data packets sent to each earphone;
the first number of buffered data packets may be obtained based on an index established by the headset upgrading device based on the buffered data packets, and the maximum value of the index may be taken as the first number here.
The number of data packets sent to each earphone can be obtained through feedback information of the earphones, and can also be obtained through sending records of the earphone upgrading device to the data packets of each earphone.
Step S112, determining the difference value between the first quantity and the second quantity;
step S113, judging whether the difference value is smaller than the number of the cache regions;
when the difference is smaller than the number of the buffer areas, executing step S114; when the difference is greater than or equal to the number of buffers, step S115 is performed.
Step S114, judging that a buffer area in an idle state exists;
in step S115, it is determined that there is no buffer in an idle state.
Because the data packets sent to each earphone are deleted, the difference value between the first quantity and the second quantity can reflect the number of occupied cache regions of the data packets which are not sent to the earphones currently, and the difference value between the first quantity and the second quantity and the number of the cache regions can accurately reflect whether the idle cache regions exist or not, so that the effectiveness of receiving and caching the data packets of the upgrade files is ensured, and the reliability of the upgrade process of the earphone set is improved.
Since each earphone in the earphone set can independently request the transmission of the data packet by sending the corresponding first request information according to the receiving condition of the data packet, and the communication speed between each earphone and the earphone upgrading device, the data processing speed of each earphone, and the like are different, the progress of the data packets requested by different earphones may be different (for example, when the first earphone requests the xth data packet, the second earphone may request x +3 data packets). Based on this, the step of obtaining a second number of data packets that have been sent to each of the headsets may comprise: acquiring a third number of transmitted data packets corresponding to each earphone in the earphone set; and taking the third quantity with the minimum numerical value as the second quantity, and based on the second quantity, ensuring that the obtained second quantity can accurately represent the quantity of the data packets which are all sent to each earphone, and deleting the data packets which are all sent to each earphone in combination, wherein the difference value between the first quantity and the second quantity can accurately reflect the number of the cache regions occupied by the data packets which are not sent to the earphones currently, so that the idle state of the cache regions can be accurately reflected by comparing the difference value between the first quantity and the second quantity with the quantity of the cache regions, the effectiveness of receiving and caching the data packets of the upgrade file is further improved, and the reliability of the upgrade process of the earphone group is improved.
The invention also provides an earphone control device (not shown). In particular, it is possible to connect to a headset, in particular to each headset of a headset group comprising more than one headset, in order to perform an upgrade operation on the headset in combination with the headset upgrade device described above. Specifically, a headphone control device (not shown) may be built into each headphone of the headphone set.
In the embodiment of the present invention, the headphone control device (not shown) includes: a processor (e.g., a CPU), a memory coupled to the processor, etc. The memory may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory may alternatively be a storage device separate from the aforementioned processor.
The memory, which is a readable storage medium, may include a headset control program therein. In the headphone control apparatus, the processor may be configured to call the headphone control program stored in the memory, and perform operations of relevant steps of the headphone control method in the following embodiments.
Further, based on the embodiment of the earphone upgrading method, the earphone upgrading method includes the earphone upgrading process of the step S21 and the step S22, and the invention further provides an earphone control method. In an embodiment of the headphone control method, referring to fig. 6, the headphone control method includes the following steps:
step S100, controlling an earphone to send first request information to an earphone upgrading device, so that when the earphone upgrading device receives the first request information in the process of receiving and caching a plurality of data packets corresponding to an upgrading file one by one, determining a target data packet to be sent to the earphone corresponding to the first request information in the cached data packets, and sending the target data packet to the earphone;
after the earphone upgrading device enters the upgrading mode, enabling information can be sent to the earphone, and after the enabling information is received, the earphone can send first request information to the earphone upgrading device to request for the data packet cached in the earphone upgrading device. Each first request message may request the data packets cached in one or more than one headset upgrading devices according to actual requirements.
After step S100, after determining that the headset receives all the data packets corresponding to the upgrade file, step S200 is performed.
And step S200, executing upgrading operation based on all data packets corresponding to the received upgrading files.
After determining that the earphone receives all the data packets corresponding to the upgrade file, the earphone can directly execute the upgrade operation, or can check the received upgrade file, and execute the upgrade operation after the check is passed.
Specifically, after determining that all data packets corresponding to the upgrade file are received, before step S200, verification information sent by the earphone upgrade device is received;
judging whether the characteristic information of all data packets corresponding to the received upgrade file is matched with the verification information or not to obtain a judgment result; and generating a verification result according to the judgment result and feeding the verification result back to the earphone upgrading device so that the earphone upgrading device generates a third message according to the verification result and sends the third message to a terminal providing the upgrading file, and the terminal determines the receiving state of the earphone about the upgrading file according to the third message.
In order to ensure the integrity of the data packets of the upgrade file, especially when a first request message requests a data packet, after step S100, it may be determined whether the earphone receives all data packets corresponding to the upgrade file; if not, returning to execute the step S100; if yes, go to step S200.
Specifically, when a first request message corresponds to a request for a data packet, the step of controlling the headset to send the first request message to the headset upgrading device includes: acquiring a first data packet index; the first data packet index is information generated according to the number of data packets of the upgrade file currently received by the earphone; and controlling the earphone to send first request information comprising a first data packet index to the earphone upgrading device.
It should be noted that, for specific execution steps and effects brought by the earphone control method in this embodiment, reference may be made to the actions of the earphone in the upgrade process and related descriptions of technical effects brought by the actions in the upgrade process in the earphone upgrade method, which are not described herein again.
Furthermore, an embodiment of the present invention further provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the relevant steps of any embodiment of the above earphone upgrade method and/or any embodiment of the earphone control method.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (18)

1. An earphone upgrading method is characterized by comprising the following steps:
receiving and caching a plurality of data packets corresponding to the upgrade files one by one;
in the process of caching a plurality of data packets corresponding to the upgrade file, the cached data packets are synchronously sent to each earphone in the earphone set until all the data packets corresponding to the upgrade file are cached and sent to each earphone, so that each earphone executes upgrade operation based on all the data packets corresponding to the received upgrade file.
2. The headset upgrade method according to claim 1, wherein the step of synchronously transmitting the buffered data packets to each headset in the set of headsets comprises:
when first request information is received, determining a target data packet which needs to be sent to the earphone corresponding to the first request information in the cached data packets; the first request information is sent by each earphone when not receiving all data packets corresponding to the upgrade file;
and sending the target data packet to the earphone corresponding to the first request information.
3. The method for upgrading an earphone according to claim 2, wherein the step of determining a target data packet to be sent to the earphone corresponding to the first request information in the buffered data packets when the first request information is received comprises:
when the first request message is received, extracting a first data packet index in the first request message; the first data packet index is information generated by the earphone corresponding to the first request information according to the number of the received data packets;
and taking the data packet corresponding to the first data packet index as the target data packet in the cached data packets.
4. The method for upgrading a headset of claim 3, wherein after extracting the first packet index from the first request message, the method further comprises:
when the data packet corresponding to the first data packet index does not exist in the cached data packet, sending a first message to the earphone corresponding to the first request information, so that the earphone corresponding to the first request information resends the first request information after a first duration; and/or the presence of a gas in the atmosphere,
when first request information is received, before the step of extracting the first data packet index in the first request information, the method further includes:
performing cyclic redundancy check on the first request message;
if the check is passed, executing the step of extracting the first data packet index in the first request message;
and if the verification fails, sending a second message to the earphone corresponding to the first request message, so that the earphone corresponding to the first request message resends the first request message.
5. The headset upgrading method according to any of claims 1 to 4, further comprising the steps of:
in the process of caching a plurality of data packets corresponding to an upgrade file, when received data comprises a set flag bit, judging that all the data packets corresponding to the upgrade file are cached completely;
judging whether the cached data packet has a data packet which is not sent to the earphone;
and if so, executing the step of determining a target data packet which needs to be sent to the earphone corresponding to the first request information in the cached data packets when the first request information is received.
6. The method for upgrading an earphone according to claim 5, wherein after the step of determining that all data packets corresponding to the upgrade file are completely cached, the method further comprises:
setting the cache size to be 0 to enter a first state, wherein the first state is a state of data real-time interaction between a terminal providing the upgrade file and the earphone;
receiving verification information corresponding to the upgrade file sent by the terminal and sending the verification information to each earphone;
acquiring a verification result returned by each earphone based on the verification information;
and generating a third message according to each verification result, and sending the third message to the terminal so that the terminal determines the receiving state of each earphone relative to the upgrade file according to the third message.
7. The earphone upgrade method according to any one of claims 2 to 4, wherein the step of receiving and caching a plurality of data packets corresponding to the upgrade file one by one comprises:
judging whether a buffer area in an idle state exists or not;
if the cache area in the idle state exists, second request information is sent to the terminal providing the upgrade file;
receiving a data packet returned by the terminal based on the second request information;
buffering the received data packet in a buffer area in an idle state;
returning to the step of judging whether the buffer area in the idle state exists or not;
and if the buffer area in the idle state does not exist, returning to the step of judging whether the buffer area in the idle state exists or not.
8. The method for upgrading a headset according to claim 7, wherein when the number of the buffer areas for buffering the data packets is smaller than the number of the data packets, after the step of sending the target data packet to the headset corresponding to the first request message, the method further includes:
judging whether the target data packets are all sent to each earphone in the earphone set;
if so, deleting the target data packet to enable the cache region where the target data packet is located to enter an idle state;
if not, the target data packet is reserved.
9. The headset upgrade method of claim 8, wherein the determining whether a buffer in an idle state exists comprises:
obtaining a first number of buffered data packets, and obtaining a second number of data packets that have been sent to each of the headsets;
determining a difference between the first number and the second number;
judging whether the difference value is smaller than the number of the cache regions;
when the difference is smaller than the number of the cache regions, judging that the cache region in an idle state exists;
and when the difference value is larger than or equal to the number of the buffer areas, judging that no buffer area in an idle state exists.
10. The headset upgrade method according to claim 9, wherein the step of obtaining the second number of data packets that have been sent to each of the headsets comprises:
acquiring a third number of transmitted data packets corresponding to each earphone in the earphone set;
and taking the third quantity with the smallest numerical value as the second quantity in the acquired third quantities.
11. The headset upgrading method of claim 7, wherein after the step of transmitting the second request information to the terminal providing the upgrade file, further comprising:
when a data packet returned by the terminal based on the second request information is not received within a second time length, returning to the step of judging whether the buffer area in the idle state exists or not, and exiting the upgrading process of the earphone set until the number of times of returning reaches a set value; and/or the presence of a gas in the atmosphere,
before the step of buffering the received data packet in the buffer in the idle state, the method further includes:
performing cyclic redundancy check on the received data packet;
if the verification is passed, the step of caching the received data packet in a cache area in an idle state is executed;
and if the verification is not passed, returning to execute the step of sending the second request information to the terminal providing the upgrade file.
12. A headphone control method based on a headphone upgrading apparatus to which the headphone upgrading method according to any one of claims 2 to 11 is applied, the headphone control method comprising:
controlling the earphone to send first request information to an earphone upgrading device, so that when the earphone upgrading device receives the first request information in the process of caching a plurality of data packets corresponding to the upgrading file, in the cached data packets, a target data packet which needs to be sent to the earphone corresponding to the first request information is determined, and the target data packet is sent to the earphone.
And after determining that the earphone receives all the data packets corresponding to the upgrade file, executing upgrade operation based on all the data packets corresponding to the received upgrade file to execute the upgrade operation.
13. The headset controlling method of claim 12, wherein after the step of controlling the headset to transmit the first request message to the headset upgrading apparatus, further comprising:
judging whether the earphone receives all data packets corresponding to the upgrade file;
if not, returning to the step of executing the step of sending the first request information to the earphone upgrading device by the control earphone;
and if so, executing the upgrading operation based on all the data packets corresponding to the received upgrading file.
14. The headset controlling method of claim 13, wherein the controlling of the headset to transmit the first request information to the headset upgrading apparatus comprises:
acquiring a first data packet index; the first data packet index is information generated according to the number of data packets of the upgrade file currently received by the earphone;
and controlling the earphone to send first request information comprising a first data packet index to the earphone upgrading device.
15. The method for controlling an earphone according to claim 12, wherein after determining that the earphone receives all the data packets corresponding to the upgrade file, before the step of performing the upgrade operation based on all the data packets corresponding to the received upgrade file, the method further comprises:
receiving verification information sent by the earphone upgrading device;
judging whether the characteristic information of all data packets corresponding to the received upgrade file is matched with the verification information or not to obtain a judgment result;
and generating a verification result according to the judgment result and feeding the verification result back to the earphone upgrading device so that the earphone upgrading device generates a third message according to the verification result and sends the third message to a terminal providing the upgrading file, and the terminal determines the receiving state of the earphone about the upgrading file according to the third message.
16. An earphone upgrade apparatus, comprising: memory, a processor and a headset upgrade program stored on the memory and executable on the processor, the headset upgrade program, when executed by the processor, implementing the steps of the headset upgrade method according to any one of claims 1 to 11.
17. A headset, characterized in that the headset comprises more than one earphone, each earphone comprising: memory, a processor and a headset control program stored on the memory and executable on the processor, the headset control program, when executed by the processor, implementing the steps of the headset upgrade method according to any one of claims 12 to 15.
18. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the headset upgrade method according to any one of claims 1 to 11 and/or the headset control method according to any one of claims 12 to 15.
CN202010322552.XA 2020-04-22 2020-04-22 Earphone upgrading method and device, earphone control method, earphone set and storage medium Pending CN111556117A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010322552.XA CN111556117A (en) 2020-04-22 2020-04-22 Earphone upgrading method and device, earphone control method, earphone set and storage medium
PCT/CN2020/124853 WO2021212798A1 (en) 2020-04-22 2020-10-29 Earphone upgrade method, device, earphone control method, earphone set, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010322552.XA CN111556117A (en) 2020-04-22 2020-04-22 Earphone upgrading method and device, earphone control method, earphone set and storage medium

Publications (1)

Publication Number Publication Date
CN111556117A true CN111556117A (en) 2020-08-18

Family

ID=72003887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010322552.XA Pending CN111556117A (en) 2020-04-22 2020-04-22 Earphone upgrading method and device, earphone control method, earphone set and storage medium

Country Status (2)

Country Link
CN (1) CN111556117A (en)
WO (1) WO2021212798A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021212798A1 (en) * 2020-04-22 2021-10-28 歌尔股份有限公司 Earphone upgrade method, device, earphone control method, earphone set, and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115083136A (en) * 2022-06-22 2022-09-20 珠海格力电器股份有限公司 Remote control signal processing method and device, storage medium and controller

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051689A (en) * 2012-12-11 2013-04-17 北京奇虎科技有限公司 Program updating downloading method and device
US20150172832A1 (en) * 2013-12-17 2015-06-18 United Sciences, Llc Iidentity confirmation using wearable computerized earpieces and related methods
CN105511903A (en) * 2015-11-23 2016-04-20 广东欧珀移动通信有限公司 Audio device updating method and apparatus
GB2534662A (en) * 2014-12-01 2016-08-03 Soundchip Sa Earphone system
CN107608711A (en) * 2017-10-19 2018-01-19 歌尔科技有限公司 Upgrade method, device, system and electronic equipment
CN108600892A (en) * 2018-06-15 2018-09-28 歌尔科技有限公司 A kind of upgrade method, device, wireless headset, TWS earphones and charging box
CN109068211A (en) * 2018-08-01 2018-12-21 广东思派康电子科技有限公司 A kind of TWS earphone and its computer readable storage medium
CN109842523A (en) * 2019-02-14 2019-06-04 上海华测导航技术股份有限公司 A kind of firmware upgrade method, device, equipment and storage medium
CN110366063A (en) * 2019-07-26 2019-10-22 歌尔科技有限公司 A kind of upgrade method of wireless headset, device and charging box
CN110659046A (en) * 2019-09-12 2020-01-07 湖南国声智能科技有限公司 Firmware upgrading method, terminal, charging box, earphone and storage medium
CN110764806A (en) * 2019-10-29 2020-02-07 歌尔科技有限公司 TWS earphone and upgrading method and device thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2327015B1 (en) * 2008-09-26 2018-09-19 Sonova AG Wireless updating of hearing devices
CN108874421B (en) * 2018-06-15 2020-08-28 歌尔科技有限公司 TWS earphone, upgrading method and device thereof, and storage medium
CN111556117A (en) * 2020-04-22 2020-08-18 歌尔科技有限公司 Earphone upgrading method and device, earphone control method, earphone set and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051689A (en) * 2012-12-11 2013-04-17 北京奇虎科技有限公司 Program updating downloading method and device
US20150172832A1 (en) * 2013-12-17 2015-06-18 United Sciences, Llc Iidentity confirmation using wearable computerized earpieces and related methods
GB2534662A (en) * 2014-12-01 2016-08-03 Soundchip Sa Earphone system
CN105511903A (en) * 2015-11-23 2016-04-20 广东欧珀移动通信有限公司 Audio device updating method and apparatus
CN107608711A (en) * 2017-10-19 2018-01-19 歌尔科技有限公司 Upgrade method, device, system and electronic equipment
CN108600892A (en) * 2018-06-15 2018-09-28 歌尔科技有限公司 A kind of upgrade method, device, wireless headset, TWS earphones and charging box
CN109068211A (en) * 2018-08-01 2018-12-21 广东思派康电子科技有限公司 A kind of TWS earphone and its computer readable storage medium
CN109842523A (en) * 2019-02-14 2019-06-04 上海华测导航技术股份有限公司 A kind of firmware upgrade method, device, equipment and storage medium
CN110366063A (en) * 2019-07-26 2019-10-22 歌尔科技有限公司 A kind of upgrade method of wireless headset, device and charging box
CN110659046A (en) * 2019-09-12 2020-01-07 湖南国声智能科技有限公司 Firmware upgrading method, terminal, charging box, earphone and storage medium
CN110764806A (en) * 2019-10-29 2020-02-07 歌尔科技有限公司 TWS earphone and upgrading method and device thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021212798A1 (en) * 2020-04-22 2021-10-28 歌尔股份有限公司 Earphone upgrade method, device, earphone control method, earphone set, and storage medium

Also Published As

Publication number Publication date
WO2021212798A1 (en) 2021-10-28

Similar Documents

Publication Publication Date Title
CN109951546B (en) Transaction request processing method, device, equipment and medium based on intelligent contract
CN111556117A (en) Earphone upgrading method and device, earphone control method, earphone set and storage medium
US20100274834A1 (en) Method and system for content categorization
TW201526586A (en) Method and device for transmitting data in a network system
WO2022042140A1 (en) Data processing method and apparatus, electronic device, and storage medium
US20230224654A1 (en) Earphone debugging method and device, and storage medium
US9026582B2 (en) Device management methods and related apparatus for enhancing applicability of status messages in response to commands
CN111787098B (en) Earphone upgrading method and device, earphone and storage medium
CN108600378B (en) File downloading method, device, terminal and storage medium
KR101650829B1 (en) Method, apparatus, and system for acquiring object
CN113282310A (en) Application management method and system, vehicle-mounted device, server and readable storage medium
JP2011510572A (en) Method, apparatus and system for realizing fingerprint technology
CN108021459B (en) Method and device for sending dotting logs across processes
US20130174217A1 (en) Access control information generating system
KR20040008189A (en) Requests in a communication system
CN109688204B (en) File downloading method, node and terminal based on NDN (named data networking)
CN111629367B (en) Data transmission method of terminal equipment and earphone, terminal equipment and storage medium
CN111092916B (en) File uploading method and device, electronic equipment and medium
CN111918257A (en) Head-mounted display device, data transmission method thereof and readable storage medium
KR20220053386A (en) Data communication method and apparatus for efficient file transmission
JP5618217B2 (en) Broadcast distribution system, distribution server, broadcast distribution method and program
CN110784518A (en) Static resource acquisition method and device
CN106874030B (en) Method and device for analyzing and optimizing instructions in application under robot operating system environment
CN113254203B (en) Service degradation processing method and device
WO2011141344A1 (en) Method and apparatus for inserting location data into messages at a communication gateway

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200818

RJ01 Rejection of invention patent application after publication