WO2022142815A1 - Data transmission method and apparatus, and communication chip and earphone device - Google Patents

Data transmission method and apparatus, and communication chip and earphone device Download PDF

Info

Publication number
WO2022142815A1
WO2022142815A1 PCT/CN2021/131112 CN2021131112W WO2022142815A1 WO 2022142815 A1 WO2022142815 A1 WO 2022142815A1 CN 2021131112 W CN2021131112 W CN 2021131112W WO 2022142815 A1 WO2022142815 A1 WO 2022142815A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio data
data packet
index parameter
current
earphone
Prior art date
Application number
PCT/CN2021/131112
Other languages
French (fr)
Chinese (zh)
Inventor
赵琛
汪艳平
张永恒
Original Assignee
展讯通信(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 展讯通信(上海)有限公司 filed Critical 展讯通信(上海)有限公司
Publication of WO2022142815A1 publication Critical patent/WO2022142815A1/en

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a data transmission method, a device, a communication chip and a headset device.
  • the paired earphone devices receive and play audio data independently of each other.
  • the left-ear headphone device and the right-ear headphone device receive and play audio data independently of each other.
  • the left-ear headphone device and the right-ear headphone device receive and play audio data independently of each other.
  • the left-ear headphone device and the right-ear headphone device receive and play audio data independently of each other.
  • there is a problem of audio data packet loss which will cause the left-ear headphone device and the right-ear headphone device to play the audio data packets.
  • the audio playback of the left headphone device and the right headphone device do not match.
  • the present application provides a data transmission method, device, communication chip and earphone device, the present application also provides a computer-readable storage medium.
  • the present application provides a data transmission method, including:
  • the method further includes:
  • a second index parameter is generated according to the audio data packets received by the current headphone device in the first data reception period, where the second index parameter is used to describe the current headphone device in the first data reception period Audio packet reception status in ;
  • the method further includes:
  • first clock signal is the current clock signal of the first earphone device
  • first data packet sequence identifier is The sequence identifier of the audio data packet currently being played by the first earphone device, the sequence identifiers of the audio data packets corresponding to each other in the audio data packet received by the first earphone device and the current earphone device are consistent;
  • the playback speed of the current audio data packet played by the headphone device is determined, wherein the second clock signal is the current clock signal of the current earphone device, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the current earphone device.
  • the present application also provides a data transmission method, comprising:
  • a first index parameter is generated according to the audio data packet received by the current headphone device in the first data receiving period, wherein the first index parameter is used to describe the current headphone device in the first data receiving period Audio packet receiving status;
  • the first index parameter is sent to a first headset device, where the first headset device is a headset device paired with the current headset device.
  • the method further includes:
  • first clock signal is the current clock signal of the first earphone device
  • first data packet sequence identifier is The sequence identifier of the audio data packet currently being played by the first earphone device, the sequence identifiers of the audio data packets corresponding to each other in the audio data packet received by the first earphone device and the current earphone device are consistent;
  • the playback speed of the current audio data packet played by the headphone device is determined, wherein the second clock signal is the current clock signal of the current earphone device, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the current earphone device.
  • the present application also provides a data transmission device, comprising:
  • a data receiving module configured to receive an index parameter from a first headset device, wherein the first headset device is a headset device paired with the current headset device, and the index parameter is used to describe the first headset device in the first data Audio packet reception status in the receive cycle;
  • a data packet missing determination module which is used for confirming, according to the index parameter, the audio data packets missing from the first earphone device in the first data receiving cycle
  • a data packet sending module which is used to send to the first headphone device, the audio data packets received by the current headphone device in the first data receiving cycle are the same as the ones missing from the first headphone device.
  • the audio data packet corresponding to the audio data packet is the same as the ones missing from the first headphone device.
  • the present application also provides a data transmission device, comprising:
  • An index parameter generation module is used to generate an index parameter according to the audio data packet received by the current headphone device in the first data receiving period, wherein the index parameter is used to describe the current headphone device in the first data Audio packet reception status in the receive cycle;
  • An index parameter sending module configured to send the index parameter to a first earphone device, wherein the first earphone device is an earphone device paired with the current earphone device.
  • the application further provides a communication chip, including:
  • the communication chip when the computer program instruction is executed by the processor, the communication chip is also triggered to perform the following method steps:
  • a second index parameter is generated according to the audio data packets received by the current headphone device in the first data reception period, where the second index parameter is used to describe the current headphone device in the first data reception period Audio packet reception status in ;
  • the communication chip when the computer program instructions are executed by the processor, the communication chip is also triggered to generate corresponding index parameters after each data receiving period ends, and the The index parameter is sent to the first headset device.
  • the present application also provides a communication chip, characterized in that it includes:
  • a processor for executing computer program instructions stored in the memory wherein, when the computer program instructions are executed by the processor, the communication chip is triggered to perform the following method steps:
  • a first index parameter is generated according to the audio data packet received by the current headphone device in the first data receiving period, wherein the first index parameter is used to describe the current headphone device in the first data receiving period Audio packet receiving status;
  • the first index parameter is sent to a first headset device, where the first headset device is a headset device paired with the current headset device.
  • the communication chip when the computer program instructions are executed by the processor, the communication chip is also triggered to generate corresponding index parameters after each data receiving period ends, and the The index parameter is sent to the first headset device.
  • the present application also provides a headset device, the headset device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, The communication chip is triggered to perform the method steps described in the first aspect.
  • the present application also provides a headset device, the headset device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, The communication chip is triggered to perform the method steps described in the second aspect above.
  • the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, causes the computer to execute the method described in the embodiments of the present application.
  • data packets can be reissued between matched earphone devices, thereby greatly improving the matching of audio data packets played by two matched earphone devices and improving user experience.
  • FIG. 1 is a flowchart of a data transmission method according to an embodiment of the present application
  • FIG. 2 is a structural diagram of a headphone data transmission device according to an embodiment of the present application.
  • FIG. 3 is a flowchart of a data transmission method according to an embodiment of the present application.
  • FIG. 4 is a structural diagram of a headphone data transmission device according to an embodiment of the present application.
  • FIG. 5 is a sequence diagram of a data transmission method according to an embodiment of the present application.
  • FIG. 6 shows a flowchart of a data transmission method according to an embodiment of the present application
  • FIG. 7 is a sequence diagram of a data transmission method according to an embodiment of the present application.
  • the audio data played by the left ear headphone device and the right ear headphone device also match each other under the premise of certain differences. For example, suppose the audio data packets to be played by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 ), and the audio data packets to be played by the right ear headphone device are ( YS 21 , YS 22 , YS 23 , YS 24 ). The audio data packets YS 11 and YS 21 , YS 12 and YS 22 , YS 13 and YS 23 , and YS 14 and YS 24 are different but correspond to each other.
  • the left ear headphone device or the right ear headphone device has packet loss when receiving audio data packets
  • the audio data packets received by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 )
  • the audio data packets received by the headphone device are (YS 21 , YS 23 , YS 24 ).
  • the audio data packet YS 22 is missing from the right earphone device; then the audio playback of the left earphone device and the right earphone device cannot be matched.
  • a feasible solution is to send the audio data source device (the sending device of the audio data packet, for example, connect the left-ear headphone device with the The mobile phone of the right ear headphone device) sends a data packet re-send request, requesting the audio data source device to re-send the missing audio data packets.
  • the audio data source device the sending device of the audio data packet, for example, connect the left-ear headphone device with the The mobile phone of the right ear headphone device
  • the left ear headphone device and the right ear headphone device mutually confirm whether the other party has audio data packets missing, and send their own Among the audio data packets received by the device, the audio data packets corresponding to the audio data packets missing from the counterpart device are sent to the counterpart device.
  • the audio data packets received by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 ), and the audio data packets received by the right ear headphone device are ( YS 21 , YS 23 , YS 24 ).
  • the audio data package YS 22 is missing from the right ear headphone device.
  • the left ear headphone device sends the audio data packet YS 12 to the right ear headphone device. Then, the audio data packets played by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 ), and the audio data packets played by the right ear headphone device are (YS 21 , YS 12 , YS 23 , YS 24 ).
  • the left ear headphone device plays the audio data packet YS 12 synchronously with the right ear headphone device, the stereo effect of the left ear headphone device playing the audio data packet YS 12 and the right ear headphone device playing the audio data packet YS 22 cannot be realized.
  • Play audio data packets (YS 11 , YS 12 , YS 13 , YS 14 ) on the left ear headphone device, and play audio data packets (YS 21 , YS 23 , YS 24 ) on the right ear headphone device.
  • the matching degree of left and right ear audio playback is greatly improved, and the user experience is also greatly enhanced.
  • a data receiving period is set according to a preset period (for example, every 2 seconds is divided into a data receiving period; for example, every N voice periods are set as a data receiving period), After a data receiving cycle ends, on one headphone device A1, confirm the audio data packets missing from another headphone device B1 in the just ended data receiving cycle, so that the headphone device A1 sends the headphone device to the headphone device B1. The audio data packet corresponding to the audio data packet missing from device B1.
  • a preset period for example, every 2 seconds is divided into a data receiving period; for example, every N voice periods are set as a data receiving period
  • an embodiment of the present application proposes a data transmission method.
  • the method is executed by one of the two earphone devices that are paired with each other, and thereby determines the missing audio data packet of the other earphone device, so as to perform the audio data packet transfer from one earphone device to the other earphone device.
  • Supplementary delivery For example, among the paired left-ear headphone device and right-ear headphone device, the left-ear headphone device executes the data transmission method proposed in an embodiment of the present application, thereby determining the audio data packets missing from the right-ear headphone device, and performing the data transmission from the left-ear headphone device to the left-ear headphone device.
  • the ear headphone device is sent in addition to the audio data packets of the right ear headphone device.
  • the right-ear headphone device executes the data transmission method proposed in an embodiment of the present application, thereby determining the audio data packets missing from the left-ear headphone device, and performing the data transmission from the right-ear headphone device. Supplementary transmission of audio data packets from the ear headphone device to the left ear headphone device.
  • FIG. 1 shows a flowchart of a data transmission method according to an embodiment of the present application.
  • the earphone device A1 and the earphone device B1 are earphone devices (a left ear earphone device and a right ear earphone device) that are paired with each other.
  • the headphone device A1 performs the following process:
  • Step 110 receive the index parameter S1 from the earphone device B1, wherein the index parameter S1 is used to describe the receiving state of the audio data packet of the earphone device B1 in the data receiving period Q11;
  • Step 111 confirm the audio data packet missing in the data receiving period Q11 of the headphone device B1;
  • Step 112 Send to the earphone device B1, among the audio data packets received by the earphone device A1 in the data receiving period Q11, the audio data packets corresponding to the audio data packets missing from the earphone device B1.
  • FIG. 2 is a structural diagram of a headphone data transmission apparatus according to an embodiment of the present application.
  • the earphone device A1 and the earphone device B1 are paired earphone devices (the left ear earphone device and the right ear earphone device), and the device is built in the earphone device A1, as shown in Figure 2, the device includes:
  • the data receiving module 210 is used for receiving the index parameter S1 from the earphone device B1, wherein the index parameter S1 is used to describe the audio data packet receiving state of the earphone device B1 in the data receiving period Q11;
  • the data packet missing determination module 220 is used for confirming the audio data packets missing from the headphone device B1 in the data receiving period Q11 according to the index parameter S1;
  • the data packet sending module 230 is used for sending to the headphone device B1, among the audio data packets received by the headphone device A1 in the data receiving period Q11, the audio data packets corresponding to the audio data packets missing from the headphone device B1.
  • FIG. 3 is a flowchart of a data transmission method according to an embodiment of the present application.
  • the headset device B1 needs to perform the following process:
  • Step 320 according to the audio data packet received by the headphone device B1 in the data receiving period Q11, generate an index parameter S1;
  • Step 321 Send the index parameter S1 to the earphone device A1.
  • FIG. 4 is a structural diagram of a headphone data transmission apparatus according to an embodiment of the present application.
  • the device is built in the headset device B1, as shown in Figure 4, the device includes:
  • An index parameter generation module 410 which is used to generate an index parameter S1 according to the audio data packet received by the headphone device B1 in the data receiving period Q11;
  • the index parameter sending module 420 is used for sending the index parameter S1 to the earphone device A1.
  • the audio data packets missing from the earphone device B1 can be confirmed on the earphone device A1, and the audio data packets are reissued by the earphone device A1 to the earphone device B1.
  • the data packets can be reissued between the matching headphone devices. , thereby greatly improving the matching of the audio data packets played by the two matching headphone devices, and improving the user experience.
  • those skilled in the art can implement the index parameter for describing the receiving state of the audio data packet in the data receiving period of the headphone device by adopting various solutions.
  • a sequence identifier is configured for an audio data packet.
  • the audio data packets received by the left ear headphone device and the right ear headphone device the audio data packets corresponding to each other have the same sequence identifier.
  • the audio data packet is that YS 11 and YS 21 have the same sequence ID, YS 12 and YS 22 have the same sequence ID, YS 13 and YS 23 have the same sequence ID, and YS 14 and YS 24 have the same sequence ID.
  • the sequence identifiers of each audio data packet received by a single earphone device are different, and the index parameter includes the sequence identifiers of all audio data packets received by a single earphone device in a data receiving cycle. In this way, it is only necessary to compare the sequence identifier of the audio data packet received by the left ear headphone device and the sequence identifier of the audio data packet received by the right ear headphone device, and then it can be confirmed that the left ear headphone device or the right ear headphone device is missing.
  • the sequence identifier of the audio packet is only necessary to compare the sequence identifier of the audio data packet received by the left ear headphone device and the sequence identifier of the audio data packet received by the right ear headphone device, and then it can be confirmed that the left ear headphone device or the right ear headphone device is missing.
  • the audio data packets sent to the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ), and the audio data packets sent to the right ear headphone device are ( YS 21 , YS 22 , YS 23 , YS 24 , YS 25 ).
  • the sequence identifiers of the audio data packets (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ) are A1, A2, A3, A4, and A5, respectively, the audio data packets (YS 21 , YS 22 , YS 23 , The sequence identifiers of YS 24 and YS 25 ) are also A1, A2, A3, A4, and A5, respectively.
  • the current earphone device (left ear earphone device) receives audio data packets (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ) in the data receiving period Q21 .
  • the first earphone device (the right earphone device) receives the audio data packets (YS 21 , YS 23 , YS 24 , YS 25 ) in the data receiving period Q12.
  • the first earphone device sends the first index parameters (A1, A3, A4, A5) to the current earphone device.
  • the current headphone device receives the first index parameters (A1, A3, A4, A5), according to the first index parameters, compare the sequence identifiers (A1, A1, A2, A3, A4, A5), thereby confirming that the first earphone device is missing the audio data packet with the sequence identifier A2 in the first data receiving cycle.
  • the current earphone device sends the audio data packet YS 12 with the sequence identifier A2 received by itself in the data receiving period Q21 to the first earphone device.
  • one data reception period includes multiple data receptions (for example, according to the communication protocol, 20 data reception operations will be implemented in 1 second, and 2 seconds is set as a data reception period, then, A data receiving cycle includes 40 data receiving times), and each time the data receiving is successfully executed, the headset device will receive an audio data packet.
  • the index parameter is a string of binary codes (eg, a data parameter in UINT32 format). Each bit in the index parameter corresponds to one data reception in the data reception cycle, and the value of each bit in the index parameter represents its corresponding data reception status. 0 means that no audio data packets have been received during this data reception.
  • the audio data packets sent to the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ), and the current headphone device (left ear headphone device) is receiving data Cycle Q21 receives audio data packets (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ); the audio data packets sent to the right ear headphone device are ( YS 21 , YS 22 , YS 23 , YS 24 , YS 25 ) ), the first earphone device (the right earphone device) receives the audio data packets (YS 21 , YS 23 , YS 24 , YS 25 ) in the data receiving period Q12 .
  • the first earphone device sends the first index parameter 10111 to the current earphone device, wherein the index parameter 10111 represents that no audio data packet is received during the second data reception in the data receiving period Q21.
  • the current earphone device receives the first index parameter 10111, according to the first index parameter, it is confirmed that the first earphone device is missing the audio data packet of the second data reception in the first data reception cycle.
  • the current earphone device sends the audio data packet YS 12 received by itself in the data receiving period Q21 and received for the second time to the first earphone device.
  • the flow of the data transmission method shown in FIG. 1 and FIG. 2 is performed synchronously by two paired earphone devices, and the two earphone devices mutually determine the audio data packets missing from the other device to perform two Complementary sending of audio packets between headsets.
  • FIG. 5 is a sequence diagram of a data transmission method according to an embodiment of the present application.
  • the left earphone device A2 and the right earphone device B2 are earphone devices that are paired with each other. After the data receiving cycle Q31 ends:
  • Step 510 the left ear headphone device A2 generates an index parameter S21 according to the audio data packet received in the data receiving period Q31;
  • Step 511 the left ear headphone device A2 sends the index parameter S21 to the right ear headphone device B2.
  • Step 520 the right ear headphone device B2 generates an index parameter S22 according to the audio data packet received in the data receiving period Q31;
  • Step 521 the right ear headphone device B2 sends the index parameter S22 to the left ear headphone device A2.
  • Step 512 the left ear headphone device A2 receives the index parameter S22;
  • Step 513 the left ear headphone device A2 confirms the audio data packets missing from the right ear headphone device B2 in the data receiving period Q31;
  • Step 514 the left ear headphone device A2 sends to the right ear headphone device B2, and the audio data packets received by the left ear headphone device A2 in the data receiving period Q31 correspond to the audio data packets missing from the right ear headphone device B2 audio packets.
  • Step 522 the right ear headphone device B2 receives the index parameter S21;
  • Step 523 according to the index parameter S21, the right ear headphone device B2 confirms the audio data packets missing from the left ear headphone device A2 in the data receiving period Q31;
  • step 524 the right-ear headphone device B2 sends to the left-ear headphone device A2, and the audio data packets received by the right-ear headphone device B2 in the data receiving period Q31 correspond to the audio data packets missing from the left-ear headphone device A2. audio packets.
  • FIG. 6 is a flowchart of a data transmission method according to an embodiment of the present application. Two paired headphone devices both perform the following process as shown in Figure 6:
  • Step 610 after one data reception ends, check whether an audio data packet is received
  • Step 611 refresh the index parameter, and determine the value of the corresponding bit in the index parameter according to the check result in step 610;
  • Step 620 judging whether the current round of data reception cycle ends, for example, setting every N data reception as a data reception cycle, and judging whether the data reception just ended is an integer multiple of N data reception;
  • step 620 If the determination in step 620 is no, return to step 610;
  • step 630 If the determination in step 620 is yes, execute step 630;
  • Step 630 sending the index parameter to another headset device
  • Step 640 receiving an index parameter from another headset device
  • Step 650 according to the index parameter from another earphone device, determine the audio data packet missing from another earphone device;
  • Step 660 Send the audio data packet corresponding to the audio data missing from the other earphone device to the other earphone device.
  • the audio data packet will be sent by the communication module of the headphone device to the audio module for decoding and playback.
  • the audio data packets of the data communication period are sent to the audio module for decoding and playback.
  • one headphone device sends its own playback progress to another headphone device, and the headphone device that receives the playback progress of the other device adjusts its own playback speed, to synchronize the playback progress of the two headset devices.
  • a sequence identifier is configured for the audio data packet for the audio data packet, and among the audio data packets received by the left ear headphone device and the right ear headphone device, the audio data packets corresponding to each other have the same sequence identifier. Between two playback progress synchronizations, the sequence identifiers of each audio data packet received by a single headphone device are different.
  • FIG. 7 is a sequence diagram of a data transmission method according to an embodiment of the present application.
  • Two paired headphone devices (headphone device A3 and headphone device B3) execute the following process as shown in Figure 4:
  • Step 710 the earphone device A3 sends the first clock signal and the first data packet sequence identifier to the earphone device B3, wherein the first clock signal is the current clock signal of the earphone device A3, and the first data packet sequence identifier is that the earphone device A3 is currently The sequence identifier of the audio data packet being played;
  • Step 720 the earphone device B3 receives the first clock signal and the first data packet sequence identifier
  • Step 721 the headphone device B3 determines the playback speed of the audio data packet played by the current headphone device according to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, wherein the second clock signal is the headphone.
  • the current clock signal of the device B3, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the headphone device B3.
  • each execution device in the embodiments shown in FIG. 1 , FIG. 3 , FIG. 5 , FIG. 6 , and FIG. 7 can be matched as required.
  • the left-ear headphone device sends index parameters, clock signals and data packet sequence identifiers to the right-ear headphone device, and the right-ear headphone device re-sends audio data packets to the left-ear headphone device and adjusts its own playback speed.
  • the right ear headphone device sends an index parameter, a clock signal, and a data packet sequence identifier to the left ear headphone device, and the left ear headphone device re-sends audio data packets to the right ear headphone device and adjusts its own playback speed.
  • the right ear headphone device sends the index parameter, the clock signal and the data packet sequence identifier to the left ear headphone device
  • the left ear headphone device sends the index parameter to the right ear headphone device
  • the left and right earphone devices complement each other. Audio data packets, the left ear headphone device adjusts its own playback speed.
  • the left ear headphone device sends the index parameter, the clock signal and the data packet sequence identifier to the right ear headphone device
  • the right ear headphone device sends the index parameter to the left ear headphone device
  • the left and right earphone devices complement each other. Audio data packets, the right ear headphone device adjusts its own playback speed.
  • step 721 by adopting various different playback speed adjustment strategies.
  • the first data packet sequence identifier is the sequence identifier before the second data packet sequence identifier
  • the packet sequence identifier is the sequence identifier after the second data packet sequence identifier
  • the first clock signal and the second clock signal are not synchronized, it means that the clock signals of the headphone device A3 and the headphone device B3 are not synchronized, and the difference between the clock signals needs to be referenced when adjusting the playback speed of the headphone device B3.
  • New playback speed current playback speed + speed compensation (formula 1);
  • the speed compensation is a parameter value calculated based on the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier:
  • f( ) is a calculation function determined according to the actual scene.
  • the synchronization of the playback progress is performed periodically.
  • the playback period is divided according to the preset period setting (for example, every 4 seconds is divided into a playback period), and at the end of a playback period, one headphone device sends a clock signal and a data packet to another headphone device Sequence identifier, the headphone device that receives the clock signal and the data packet sequence identifier adjusts its own playback speed to synchronize the playback progress.
  • the index parameter and the playback progress synchronization are implemented based on the data packet sequence identifier. Specifically, a sequence (sequence, seq) field is added to the audio data packet. According to the sequence of audio data packets, the value of seq is incremented.
  • the index parameter (seq_map) is a string of binary codes.
  • the data structure of seq_map is defined as: UINT32 seq_map.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Altera Hardware Description Language
  • HDCal JHDL
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the apparatuses proposed in the embodiments of the present application may be fully or partially integrated into a physical entity during actual implementation, or may be physically separated.
  • these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in hardware.
  • the detection module may be a separately established processing element, or may be integrated in a certain chip of the headphone device.
  • the implementation of other modules is similar.
  • all or part of these modules can be integrated together, and can also be implemented independently.
  • each step of the above-mentioned method or each of the above-mentioned modules can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or, one or more digital signal processors ( Digital Singnal Processor, DSP), or, one or more Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of an on-chip device (System-On-a-Chip, SOC).
  • the method flow of the embodiments shown in FIG. 1 to FIG. 4 may be implemented by a communication chip installed on the headset device. Therefore, an embodiment of the present application proposes a communication chip.
  • the communication chip X1 is installed on one earphone device (the earphone device A4) among the two paired earphone devices (the earphone device A4 and the earphone device B4), and the communication chip X1 includes:
  • a processor for executing computer program instructions stored in the memory wherein, when the computer program instructions are executed by the processor, the communication chip X1 is triggered to perform the following method steps:
  • the first index parameter is used to describe the audio data packet receiving state of the earphone device B4 in the first data receiving period
  • the first index parameter confirm the audio data packets missing in the first data receiving cycle of the headphone device B4;
  • the communication chip X1 is also triggered to execute the following method steps:
  • the second index parameter is sent to the headphone device B4.
  • the communication chip X1 is triggered to generate corresponding index parameters after each data receiving period ends, and send the index parameters to the earphone device B4.
  • an embodiment of the present application also proposes a communication chip.
  • the communication chip X2 is installed on the headset device B4, and the communication chip X2 includes:
  • a processor for executing the computer program instructions stored in the memory wherein, when the computer program instructions are executed by the processor, the communication chip X2 is triggered to perform the following method steps:
  • the first index parameter is sent to the headphone device A4.
  • the communication chip X2 is triggered to generate corresponding index parameters after each data receiving period ends, and send the index parameters to the first earphone device.
  • the method flow of the embodiment shown in FIG. 7 may be implemented by an audio chip installed on a headphone device. Therefore, an embodiment of the present application proposes an audio chip.
  • the audio chip Y1 is installed on one earphone device (the earphone device A5) of the two paired earphone devices (the earphone device A5 and the earphone device B5), and the communication chip Y1 includes:
  • a processor for executing the computer program instructions stored in the memory wherein, when the computer program instructions are executed by the processor, the communication chip Y1 is triggered to perform the following method steps:
  • the first clock signal is the current clock signal of the earphone device B5
  • the first data packet sequence identifier is the audio data packet currently being played by the earphone device B5 the sequence identifier
  • the playback speed of the audio data packet played by the headphone device A5 is determined according to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, wherein the second clock signal is the current clock signal of the headphone device A5 , the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the headphone device A5.
  • An embodiment of the present application provides an audio chip.
  • the audio chip Y2 is installed on the headphone device B5, and the communication chip Y1 includes:
  • a processor for executing the computer program instructions stored in the memory wherein, when the computer program instructions are executed by the processor, the communication chip Y1 is triggered to perform the following method steps:
  • the communication chip Y1 is triggered to send a clock signal and a data packet sequence identifier to the headphone device A5 at the end of each play period.
  • An embodiment of the present application also proposes a headset device, the headset device includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the headset is triggered
  • the device executes the method steps described in the embodiments of the present application.
  • the above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions.
  • the above-mentioned instructions are executed by the above-mentioned device, the above-mentioned device is made to execute the application. The method steps described in the examples.
  • the processor of the headphone device may be an on-chip device SOC, and the processor may include a central processing unit (Central Processing Unit, CPU), and may further include other types of processors.
  • the processor of the earphone device may be a PWM control chip.
  • the involved processor may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded Neural-network Process Units (NPU, NPU) ) and an image signal processor (Image Signal Processing, ISP), the processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of programs in the technical solution of the present application Wait. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in a storage medium.
  • the memory of the headset device may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory) memory, RAM) or other types of dynamic storage devices that can store information and instructions, also can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory, CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or can also be used for portable or Any computer-readable medium that stores desired program code in the form of instructions or data structures and can be accessed by a computer.
  • ROM read-only memory
  • RAM random access memory
  • dynamic storage devices that can store information and instructions
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read-only memory
  • optical disk storage including compact disk, laser disk, optical disk, digital versatile disk
  • a processor may be combined with a memory to form a processing device, which is more commonly an independent component.
  • the processor is used to execute program codes stored in the memory to implement the method described in the embodiment of the present application.
  • the memory can also be integrated in the processor, or be independent of the processor.
  • devices, devices, and modules described in the embodiments of the present application may be specifically implemented by computer chips or entities, or by products with certain functions.
  • the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer executes the method provided by the embodiment of the present application.
  • An embodiment of the present application further provides a computer program product, where the computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided by the embodiment of the present application.
  • These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
  • At least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c may be single, or Can be multiple.
  • the terms “comprising”, “comprising” or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included.
  • an element qualified by the phrase “comprising a" does not preclude the presence of additional identical elements in the process, method, article of manufacture, or device that includes the element.
  • the application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer.
  • program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • the application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Abstract

Provided are a data transmission method and apparatus, and a chip and an earphone device. The method comprises: receiving a first index parameter from a first earphone device, wherein the first earphone device is an earphone device that is paired with the current earphone device, and the first index parameter is used for describing an audio data packet receiving state of the first earphone device within a first data receiving period; according to the first index parameter, confirming a missing audio data packet from the first earphone device within the first data receiving period; and sending, to the first earphone device, an audio data packet, which corresponds to the missing audio data packet from the first earphone device, in the audio data packets received by the current earphone device within the first data receiving period. By means of the method according to an embodiment of the present application, data packets can be re-transmitted between paired earphone devices, thereby greatly improving the matching performance of playing audio data packets by the two paired earphone devices, and thus improving the user experience.

Description

一种数据传输方法、装置、通信芯片和耳机设备A data transmission method, device, communication chip and earphone device 技术领域technical field
本申请涉及通信技术领域,特别涉及一种数据传输方法、装置、通信芯片和耳机设备。The present application relates to the field of communication technologies, and in particular, to a data transmission method, a device, a communication chip and a headset device.
背景技术Background technique
在真无线立体声(True Wireless Stereo,TWS)的应用场景中,相互配对的耳机设备(左耳耳机设备以及右耳耳机设备)相互独立的进行音频数据的接收以及播放。在左耳耳机设备以及右耳耳机设备接收需要播放的音频数据包的过程中,存在音频数据包丢失的问题,这样,就会导致左耳耳机设备以及右耳耳机设备在播放音频数据包时,左耳耳机设备以及右耳耳机设备的音频播放不匹配。In the application scenario of True Wireless Stereo (TWS), the paired earphone devices (the left ear earphone device and the right ear earphone device) receive and play audio data independently of each other. In the process of receiving the audio data packets to be played by the left-ear headphone device and the right-ear headphone device, there is a problem of audio data packet loss, which will cause the left-ear headphone device and the right-ear headphone device to play the audio data packets. The audio playback of the left headphone device and the right headphone device do not match.
发明内容SUMMARY OF THE INVENTION
针对现有技术下左耳耳机设备以及右耳耳机设备接收需要播放的音频数据包的过程中,存在的音频数据包丢失的问题,本申请提供了一种数据传输方法、装置、通信芯片和耳机设备,本申请还提供一种计算机可读存储介质。Aiming at the problem of loss of audio data packets in the process of receiving audio data packets to be played by the left ear headphone device and the right ear headphone device in the prior art, the present application provides a data transmission method, device, communication chip and earphone device, the present application also provides a computer-readable storage medium.
本申请实施例采用下述技术方案:The embodiment of the present application adopts the following technical solutions:
第一方面,本申请提供数据传输方法,包括:In the first aspect, the present application provides a data transmission method, including:
接收来自第一耳机设备的第一索引参数,其中,所述第一耳机设备为与当前耳机设备配对的耳机设备,所述第一索引参数用于描述第一耳机设备在第一数据接收周期中的音频数据包接收状态;Receive a first index parameter from a first headset device, where the first headset device is a headset device paired with the current headset device, and the first index parameter is used to describe the first headset device in the first data receiving cycle The receiving status of audio packets;
根据所述第一索引参数,确认所述第一耳机设备在所述第一数据接收周期中缺失的音频数据包;confirming, according to the first index parameter, audio data packets missing from the first earphone device in the first data receiving cycle;
向所述第一耳机设备发送,所述当前耳机设备在所述第一数据接收周期中所接收到的音频数据包中,与所述第一耳机设备所缺失的音频数据包相对应的音频数据包。Send to the first headphone device, in the audio data packets received by the current headphone device in the first data receiving period, the audio data corresponding to the audio data packets missing from the first headphone device Bag.
在上述第一方面的一种可行的实现方式中,所述方法还包括:In a feasible implementation manner of the above-mentioned first aspect, the method further includes:
根据所述当前耳机设备在第一数据接收周期中接收到的音频数据包,生成第二索引参数,其中,所述第二索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;A second index parameter is generated according to the audio data packets received by the current headphone device in the first data reception period, where the second index parameter is used to describe the current headphone device in the first data reception period Audio packet reception status in ;
将所述第二索引参数发送到所述第一耳机设备。Sending the second index parameter to the first headset device.
在上述第一方面的一种可行的实现方式中,在每个数据接收周期结束后,生成对应的索引参数,并且,将所述索引参数发送到所述第一耳机设备。In a feasible implementation manner of the above-mentioned first aspect, after each data receiving period ends, a corresponding index parameter is generated, and the index parameter is sent to the first earphone device.
在上述第一方面的一种可行的实现方式中,所述方法还包括:In a feasible implementation manner of the above-mentioned first aspect, the method further includes:
接收来自所述第一耳机设备的第一时钟信号以及第一数据包序列标识,其中,所述第一时钟信号为所述第一耳机设备当前的时钟信号,所述第一数据包序列标识为所述第一耳机设备当前正在播放的音频数据包的序列标识,所述第一耳机设备与所述当前耳机设备所 接收到的音频数据包中,相互对应的音频数据包的序列标识一致;Receive a first clock signal and a first data packet sequence identifier from the first earphone device, wherein the first clock signal is the current clock signal of the first earphone device, and the first data packet sequence identifier is The sequence identifier of the audio data packet currently being played by the first earphone device, the sequence identifiers of the audio data packets corresponding to each other in the audio data packet received by the first earphone device and the current earphone device are consistent;
根据所述第一时钟信号、第二时钟信号、所述第一数据包序列标识以及第二数据包序列标识确定所述当前耳机设备播放音频数据包的播放速度,其中,所述第二时钟信号为所述当前耳机设备当前的时钟信号,所述第二数据包序列标识为所述当前耳机设备当前正在播放的音频数据包的序列标识。According to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, the playback speed of the current audio data packet played by the headphone device is determined, wherein the second clock signal is the current clock signal of the current earphone device, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the current earphone device.
第二方面,本申请还提供一种数据传输方法,包括:In a second aspect, the present application also provides a data transmission method, comprising:
根据当前耳机设备在第一数据接收周期中接收到的音频数据包,生成第一索引参数,其中,所述第一索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;A first index parameter is generated according to the audio data packet received by the current headphone device in the first data receiving period, wherein the first index parameter is used to describe the current headphone device in the first data receiving period Audio packet receiving status;
将所述第一索引参数发送到第一耳机设备,其中,所述第一耳机设备为与所述当前耳机设备配对的耳机设备。The first index parameter is sent to a first headset device, where the first headset device is a headset device paired with the current headset device.
在上述第二方面的一种可行的实现方式中,在每个数据接收周期结束后,生成对应的索引参数,并且,将所述索引参数发送到所述第一耳机设备。In a feasible implementation manner of the above second aspect, after each data receiving period ends, a corresponding index parameter is generated, and the index parameter is sent to the first earphone device.
在上述第二方面的一种可行的实现方式中,所述方法还包括:In a feasible implementation manner of the above second aspect, the method further includes:
接收来自所述第一耳机设备的第一时钟信号以及第一数据包序列标识,其中,所述第一时钟信号为所述第一耳机设备当前的时钟信号,所述第一数据包序列标识为所述第一耳机设备当前正在播放的音频数据包的序列标识,所述第一耳机设备与所述当前耳机设备所接收到的音频数据包中,相互对应的音频数据包的序列标识一致;Receive a first clock signal and a first data packet sequence identifier from the first earphone device, wherein the first clock signal is the current clock signal of the first earphone device, and the first data packet sequence identifier is The sequence identifier of the audio data packet currently being played by the first earphone device, the sequence identifiers of the audio data packets corresponding to each other in the audio data packet received by the first earphone device and the current earphone device are consistent;
根据所述第一时钟信号、第二时钟信号、所述第一数据包序列标识以及第二数据包序列标识确定所述当前耳机设备播放音频数据包的播放速度,其中,所述第二时钟信号为所述当前耳机设备当前的时钟信号,所述第二数据包序列标识为所述当前耳机设备当前正在播放的音频数据包的序列标识。According to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, the playback speed of the current audio data packet played by the headphone device is determined, wherein the second clock signal is the current clock signal of the current earphone device, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the current earphone device.
第三方面,本申请还提供一种数据传输装置,包括:In a third aspect, the present application also provides a data transmission device, comprising:
数据接收模块,其用于接收来自第一耳机设备的索引参数,其中,所述第一耳机设备为与当前耳机设备配对的耳机设备,所述索引参数用于描述第一耳机设备在第一数据接收周期中的音频数据包接收状态;A data receiving module, configured to receive an index parameter from a first headset device, wherein the first headset device is a headset device paired with the current headset device, and the index parameter is used to describe the first headset device in the first data Audio packet reception status in the receive cycle;
数据包缺失判定模块,其用于根据所述索引参数,确认所述第一耳机设备在所述第一数据接收周期中缺失的音频数据包;a data packet missing determination module, which is used for confirming, according to the index parameter, the audio data packets missing from the first earphone device in the first data receiving cycle;
数据包发送模块,其用于向所述第一耳机设备发送,所述当前耳机设备在所述第一数据接收周期中所接收到的音频数据包中,与所述第一耳机设备所缺失的音频数据包相对应的音频数据包。A data packet sending module, which is used to send to the first headphone device, the audio data packets received by the current headphone device in the first data receiving cycle are the same as the ones missing from the first headphone device. The audio data packet corresponding to the audio data packet.
第四方面,本申请还提供一种数据传输装置,包括:In a fourth aspect, the present application also provides a data transmission device, comprising:
索引参数生成模块,其用于根据当前耳机设备在第一数据接收周期中接收到的音频数据包,生成索引参数,其中,所述索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;An index parameter generation module is used to generate an index parameter according to the audio data packet received by the current headphone device in the first data receiving period, wherein the index parameter is used to describe the current headphone device in the first data Audio packet reception status in the receive cycle;
索引参数发送模块,其用于将所述索引参数发送到第一耳机设备,其中,所述第一耳机设备为与所述当前耳机设备配对的耳机设备。An index parameter sending module, configured to send the index parameter to a first earphone device, wherein the first earphone device is an earphone device paired with the current earphone device.
第五方面,本申请还提供一种通信芯片,包括:In a fifth aspect, the application further provides a communication chip, including:
处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令 被该处理器执行时,触发所述通信芯片执行下述方法步骤:A processor for executing the computer program instructions stored on the memory, wherein, when the computer program instructions are executed by the processor, the communication chip is triggered to perform the following method steps:
接收来自第一耳机设备的第一索引参数,其中,所述第一耳机设备为与当前耳机设备配对的耳机设备,所述第一索引参数用于描述第一耳机设备在第一数据接收周期中的音频数据包接收状态;Receive a first index parameter from a first headset device, where the first headset device is a headset device paired with the current headset device, and the first index parameter is used to describe the first headset device in the first data receiving cycle The receiving status of audio packets;
根据所述第一索引参数,确认所述第一耳机设备在所述第一数据接收周期中缺失的音频数据包;confirming, according to the first index parameter, audio data packets missing from the first earphone device in the first data receiving cycle;
向所述第一耳机设备发送,所述当前耳机设备在所述第一数据接收周期中所接收到的音频数据包中,与所述第一耳机设备所缺失的音频数据包相对应的音频数据包。Send to the first headphone device, in the audio data packets received by the current headphone device in the first data receiving period, the audio data corresponding to the audio data packets missing from the first headphone device Bag.
在上述第五方面的一种可行的实现方式中,当该计算机程序指令被该处理器执行时,还触发所述通信芯片执行下述方法步骤:In a feasible implementation manner of the fifth aspect, when the computer program instruction is executed by the processor, the communication chip is also triggered to perform the following method steps:
根据所述当前耳机设备在第一数据接收周期中接收到的音频数据包,生成第二索引参数,其中,所述第二索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;A second index parameter is generated according to the audio data packets received by the current headphone device in the first data reception period, where the second index parameter is used to describe the current headphone device in the first data reception period Audio packet reception status in ;
将所述第二索引参数发送到所述第一耳机设备。Sending the second index parameter to the first headset device.
在上述第五方面的一种可行的实现方式中,当该计算机程序指令被该处理器执行时,还触发所述通信芯片在每个数据接收周期结束后,生成对应的索引参数,并且,将所述索引参数发送到所述第一耳机设备。In a feasible implementation manner of the above fifth aspect, when the computer program instructions are executed by the processor, the communication chip is also triggered to generate corresponding index parameters after each data receiving period ends, and the The index parameter is sent to the first headset device.
第六方面,本申请还提供一种通信芯片,其特征在于,包括:In a sixth aspect, the present application also provides a communication chip, characterized in that it includes:
处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令被该处理器执行时,触发所述通信芯片执行下述方法步骤:A processor for executing computer program instructions stored in the memory, wherein, when the computer program instructions are executed by the processor, the communication chip is triggered to perform the following method steps:
根据当前耳机设备在第一数据接收周期中接收到的音频数据包,生成第一索引参数,其中,所述第一索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;A first index parameter is generated according to the audio data packet received by the current headphone device in the first data receiving period, wherein the first index parameter is used to describe the current headphone device in the first data receiving period Audio packet receiving status;
将所述第一索引参数发送到第一耳机设备,其中,所述第一耳机设备为与所述当前耳机设备配对的耳机设备。The first index parameter is sent to a first headset device, where the first headset device is a headset device paired with the current headset device.
在上述第六方面的一种可行的实现方式中,当该计算机程序指令被该处理器执行时,还触发所述通信芯片在每个数据接收周期结束后,生成对应的索引参数,并且,将所述索引参数发送到所述第一耳机设备。In a feasible implementation manner of the above sixth aspect, when the computer program instructions are executed by the processor, the communication chip is also triggered to generate corresponding index parameters after each data receiving period ends, and the The index parameter is sent to the first headset device.
第七方面,本申请还提供一种耳机设备,所述耳机设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述通信芯片执行如上述第一方面所述的方法步骤。In a seventh aspect, the present application also provides a headset device, the headset device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, The communication chip is triggered to perform the method steps described in the first aspect.
第八方面,本申请还提供一种耳机设备,所述耳机设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述通信芯片执行如上述第二方面所述的方法步骤。In an eighth aspect, the present application also provides a headset device, the headset device comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, The communication chip is triggered to perform the method steps described in the second aspect above.
第九方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如本申请实施例所述的方法。In a ninth aspect, the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, causes the computer to execute the method described in the embodiments of the present application.
根据本申请实施例所提出的上述技术方案,至少可以实现下述技术效果:According to the above-mentioned technical solutions proposed in the embodiments of the present application, at least the following technical effects can be achieved:
根据本申请一实施例的方法,可以在相互匹配的耳机设备间进行数据包的补发,从而大大提高了相互匹配的两台耳机设备播放音频数据包的匹配性,提高了用户体验。According to the method of an embodiment of the present application, data packets can be reissued between matched earphone devices, thereby greatly improving the matching of audio data packets played by two matched earphone devices and improving user experience.
附图说明Description of drawings
图1所示为根据本申请一实施例的数据传输方法流程图;FIG. 1 is a flowchart of a data transmission method according to an embodiment of the present application;
图2所示为根据本申请一实施例的耳机数据传输装置结构图;FIG. 2 is a structural diagram of a headphone data transmission device according to an embodiment of the present application;
图3所示为根据本申请一实施例的数据传输方法流程图;FIG. 3 is a flowchart of a data transmission method according to an embodiment of the present application;
图4所示为根据本申请一实施例的耳机数据传输装置结构图;FIG. 4 is a structural diagram of a headphone data transmission device according to an embodiment of the present application;
图5所示为根据本申请一实施例的数据传输方法时序图;FIG. 5 is a sequence diagram of a data transmission method according to an embodiment of the present application;
图6所示为根据本申请一实施例的数据传输方法流程图;FIG. 6 shows a flowchart of a data transmission method according to an embodiment of the present application;
图7所示为根据本申请一实施例的数据传输方法时序图。FIG. 7 is a sequence diagram of a data transmission method according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the embodiments of the present application are only used to explain specific embodiments of the present application, and are not intended to limit the present application.
一般的,在TWS的应用场景,为实现立体声效果,左耳耳机设备与右耳耳机设备所播放的音频数据,在存在一定差异的前提下也相互匹配。例如,假设左耳耳机设备需要播放的音频数据包为(YS 11、YS 12、YS 13、YS 14),右耳耳机设备需要播放的音频数据包为(YS 21、YS 22、YS 23、YS 24)。音频数据包YS 11与YS 21、YS 12与YS 22、YS 13与YS 23、YS 14与YS 24之间存在差异性而又相互对应。 Generally, in the application scenario of TWS, in order to achieve the stereo effect, the audio data played by the left ear headphone device and the right ear headphone device also match each other under the premise of certain differences. For example, suppose the audio data packets to be played by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 ), and the audio data packets to be played by the right ear headphone device are ( YS 21 , YS 22 , YS 23 , YS 24 ). The audio data packets YS 11 and YS 21 , YS 12 and YS 22 , YS 13 and YS 23 , and YS 14 and YS 24 are different but correspond to each other.
如果左耳耳机设备或右耳耳机设备在接收音频数据包时存在数据包丢失,例如,左耳耳机设备接收到的音频数据包为(YS 11、YS 12、YS 13、YS 14),右耳耳机设备接收到的音频数据包为(YS 21、YS 23、YS 24)。右耳耳机设备缺失了音频数据包YS 22;那么左耳耳机设备与右耳耳机设备的音频播放就无法匹配。 If the left ear headphone device or the right ear headphone device has packet loss when receiving audio data packets, for example, the audio data packets received by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 ), The audio data packets received by the headphone device are (YS 21 , YS 23 , YS 24 ). The audio data packet YS 22 is missing from the right earphone device; then the audio playback of the left earphone device and the right earphone device cannot be matched.
针对左耳耳机设备或右耳耳机设备在接收音频数据包时存在数据包丢失的问题,一种可行的方案是向音频数据源设备(音频数据包的发送设备,例如,连接左耳耳机设备与右耳耳机设备的手机)发送数据包补发请求,请求音频数据源设备补发缺失的音频数据包。In view of the problem of packet loss when the left-ear headphone device or the right-ear headphone device receives audio data packets, a feasible solution is to send the audio data source device (the sending device of the audio data packet, for example, connect the left-ear headphone device with the The mobile phone of the right ear headphone device) sends a data packet re-send request, requesting the audio data source device to re-send the missing audio data packets.
但是,发送补发请求到音频数据源设备,然后接收来自音频数据源设备补发的音频数据包,这一过程不仅会影响音频数据源设备正常发送音频数据包到左耳耳机设备或右耳耳机设备的数据交互流程,而且补发请求的发送以及补发音频数据包的接收所造成的时延,很可能会导致补发的音频数据包赶不上正常的音频数据包播放流程。However, sending a reissue request to the audio data source device, and then receiving the reissued audio data packets from the audio data source device, this process will not only affect the audio data source device to send audio data packets to the left ear headphone device or the right ear headphone normally. The data interaction process of the device, and the delay caused by the sending of the reissue request and the reception of the reissued audio data packets, may cause the reissued audio data packets to fail to catch up with the normal audio data packet playback process.
针对上述问题,在本申请一实施例中,不从音频数据源设备请求补发音频数据包,而是由左耳耳机设备与右耳耳机设备相互间确认对方是否存在音频数据包缺失,将自身设备所接收到的音频数据包中,与对方设备所缺失的的音频数据包相对应的音频数据包,发送到对方设备。例如,左耳耳机设备接收到的音频数据包为(YS 11、YS 12、YS 13、YS 14),右耳耳机设备接收到的音频数据包为(YS 21、YS 23、YS 24)。右耳耳机设备缺失了音频数据包YS 22。左耳耳机设备将音频数据包YS 12发送到右耳耳机设备。那么,左耳耳机设备 播放的音频数据包为(YS 11、YS 12、YS 13、YS 14),右耳耳机设备播放的音频数据包为(YS 21、YS 12、YS 23、YS 24)。虽然左耳耳机设备与右耳耳机设备同步播放音频数据包YS 12,无法实现左耳耳机设备播放音频数据包YS 12、右耳耳机设备播放音频数据包为YS 22的立体声效果,但是,相较于左耳耳机设备播放音频数据包(YS 11、YS 12、YS 13、YS 14)、右耳耳机设备播放音频数据包(YS 21、YS 23、YS 24)。左右耳音频播放的匹配度大大提高,用户体验也大大增强。 In response to the above problem, in an embodiment of the present application, instead of requesting reissue of audio data packets from the audio data source device, the left ear headphone device and the right ear headphone device mutually confirm whether the other party has audio data packets missing, and send their own Among the audio data packets received by the device, the audio data packets corresponding to the audio data packets missing from the counterpart device are sent to the counterpart device. For example, the audio data packets received by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 ), and the audio data packets received by the right ear headphone device are ( YS 21 , YS 23 , YS 24 ). The audio data package YS 22 is missing from the right ear headphone device. The left ear headphone device sends the audio data packet YS 12 to the right ear headphone device. Then, the audio data packets played by the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 ), and the audio data packets played by the right ear headphone device are (YS 21 , YS 12 , YS 23 , YS 24 ). Although the left ear headphone device plays the audio data packet YS 12 synchronously with the right ear headphone device, the stereo effect of the left ear headphone device playing the audio data packet YS 12 and the right ear headphone device playing the audio data packet YS 22 cannot be realized. Play audio data packets (YS 11 , YS 12 , YS 13 , YS 14 ) on the left ear headphone device, and play audio data packets (YS 21 , YS 23 , YS 24 ) on the right ear headphone device. The matching degree of left and right ear audio playback is greatly improved, and the user experience is also greatly enhanced.
进一步,在本申请实施例中,根据预设的周期设定划分数据接收周期(例如,划分每2秒为一个数据接收周期;又例如,设定每N次语音周期为一个数据接收周期),在一个数据接收周期结束后,在一台耳机设备A1上,确认在刚结束的数据接收周期中,另一台耳机设备B1所缺失的音频数据包,从而由耳机设备A1向耳机设备B1发送耳机设备B1所缺失的音频数据包所对应的音频数据包。Further, in the embodiment of the present application, a data receiving period is set according to a preset period (for example, every 2 seconds is divided into a data receiving period; for example, every N voice periods are set as a data receiving period), After a data receiving cycle ends, on one headphone device A1, confirm the audio data packets missing from another headphone device B1 in the just ended data receiving cycle, so that the headphone device A1 sends the headphone device to the headphone device B1. The audio data packet corresponding to the audio data packet missing from device B1.
具体的,本申请一实施例提出了一种数据传输方法。方法由相互配对的两台耳机设备中的一台耳机设备执行,并由此确定另一台耳机设备缺失的音频数据包,从而进行由一台耳机设备向另一台耳机设备的音频数据包的补充发送。例如,由相互配对的左耳耳机设备以及右耳耳机设备中的,左耳耳机设备执行本申请一实施例提出的数据传输方法,由此确定右耳耳机设备缺失的音频数据包从而进行由左耳耳机设备向右耳耳机设备的音频数据包的补充发送。或者,由相互配对的左耳耳机设备以及右耳耳机设备中的,右耳耳机设备执行本申请一实施例提出的数据传输方法,由此确定左耳耳机设备缺失的音频数据包从而进行由右耳耳机设备向左耳耳机设备的音频数据包的补充发送。Specifically, an embodiment of the present application proposes a data transmission method. The method is executed by one of the two earphone devices that are paired with each other, and thereby determines the missing audio data packet of the other earphone device, so as to perform the audio data packet transfer from one earphone device to the other earphone device. Supplementary delivery. For example, among the paired left-ear headphone device and right-ear headphone device, the left-ear headphone device executes the data transmission method proposed in an embodiment of the present application, thereby determining the audio data packets missing from the right-ear headphone device, and performing the data transmission from the left-ear headphone device to the left-ear headphone device. The ear headphone device is sent in addition to the audio data packets of the right ear headphone device. Alternatively, among the paired left-ear headphone device and right-ear headphone device, the right-ear headphone device executes the data transmission method proposed in an embodiment of the present application, thereby determining the audio data packets missing from the left-ear headphone device, and performing the data transmission from the right-ear headphone device. Supplementary transmission of audio data packets from the ear headphone device to the left ear headphone device.
具体的,图1所示为根据本申请一实施例的数据传输方法流程图。耳机设备A1与耳机设备B1为相互配对的耳机设备(左耳耳机设备以及右耳耳机设备)。如图1所示,在数据接收周期Q11结束后,耳机设备A1执行下述流程:Specifically, FIG. 1 shows a flowchart of a data transmission method according to an embodiment of the present application. The earphone device A1 and the earphone device B1 are earphone devices (a left ear earphone device and a right ear earphone device) that are paired with each other. As shown in Figure 1, after the data receiving period Q11 ends, the headphone device A1 performs the following process:
步骤110,接收来自耳机设备B1的索引参数S1,其中,索引参数S1用于描述耳机设备B1在数据接收周期Q11中音频数据包的接收状态; Step 110, receive the index parameter S1 from the earphone device B1, wherein the index parameter S1 is used to describe the receiving state of the audio data packet of the earphone device B1 in the data receiving period Q11;
步骤111,根据索引参数S1,确认耳机设备B1在数据接收周期Q11中缺失的音频数据包; Step 111, according to the index parameter S1, confirm the audio data packet missing in the data receiving period Q11 of the headphone device B1;
步骤112,向耳机设备B1发送,耳机设备A1在数据接收周期Q11中所接收到的音频数据包中,与耳机设备B1所缺失的音频数据包相对应的音频数据包。Step 112: Send to the earphone device B1, among the audio data packets received by the earphone device A1 in the data receiving period Q11, the audio data packets corresponding to the audio data packets missing from the earphone device B1.
基于图1所示流程,本申请一实施例还提出了一种数据传输装置。该装置构建在相互配对的两台耳机设备中的一台耳机设备中。图2所示为根据本申请一实施例的耳机数据传输装置结构图。耳机设备A1与耳机设备B1为相互配对的耳机设备(左耳耳机设备以及右耳耳机设备),装置构建在耳机设备A1中,如图2所示,装置包括:Based on the process shown in FIG. 1 , an embodiment of the present application further proposes a data transmission apparatus. The device is built into one of two headphone devices paired with each other. FIG. 2 is a structural diagram of a headphone data transmission apparatus according to an embodiment of the present application. The earphone device A1 and the earphone device B1 are paired earphone devices (the left ear earphone device and the right ear earphone device), and the device is built in the earphone device A1, as shown in Figure 2, the device includes:
数据接收模块210,其用于接收来自耳机设备B1的索引参数S1,其中,索引参数S1用于描述耳机设备B1在数据接收周期Q11中的音频数据包接收状态;The data receiving module 210 is used for receiving the index parameter S1 from the earphone device B1, wherein the index parameter S1 is used to describe the audio data packet receiving state of the earphone device B1 in the data receiving period Q11;
数据包缺失判定模块220,其用于根据索引参数S1,确认耳机设备B1在数据接收周期Q11中缺失的音频数据包;The data packet missing determination module 220 is used for confirming the audio data packets missing from the headphone device B1 in the data receiving period Q11 according to the index parameter S1;
数据包发送模块230,其用于向耳机设备B1发送,耳机设备A1在数据接收周期Q11中所接收到的音频数据包中,与耳机设备B1所缺失的音频数据包相对应的音频数据包。The data packet sending module 230 is used for sending to the headphone device B1, among the audio data packets received by the headphone device A1 in the data receiving period Q11, the audio data packets corresponding to the audio data packets missing from the headphone device B1.
进一步的,为了实现图1所示实施例的步骤110,本申请一实施例还提出了一种数据 传输方法。具体的,图3所示为根据本申请一实施例的数据传输方法流程图。如图3所示,耳机设备B1需要执行下述流程:Further, in order to realize step 110 in the embodiment shown in FIG. 1 , an embodiment of the present application further proposes a data transmission method. Specifically, FIG. 3 is a flowchart of a data transmission method according to an embodiment of the present application. As shown in Figure 3, the headset device B1 needs to perform the following process:
步骤320,根据耳机设备B1在数据接收周期Q11中接收到的音频数据包,生成索引参数S1; Step 320, according to the audio data packet received by the headphone device B1 in the data receiving period Q11, generate an index parameter S1;
步骤321,将索引参数S1发送到耳机设备A1。Step 321: Send the index parameter S1 to the earphone device A1.
基于图3所示流程,本申请一实施例还提出了一种数据传输装置。图4所示为根据本申请一实施例的耳机数据传输装置结构图。装置构建在耳机设备B1中,如图4所示,装置包括:Based on the process shown in FIG. 3 , an embodiment of the present application further proposes a data transmission apparatus. FIG. 4 is a structural diagram of a headphone data transmission apparatus according to an embodiment of the present application. The device is built in the headset device B1, as shown in Figure 4, the device includes:
索引参数生成模块410,其用于根据耳机设备B1在数据接收周期Q11中接收到的音频数据包,生成索引参数S1;An index parameter generation module 410, which is used to generate an index parameter S1 according to the audio data packet received by the headphone device B1 in the data receiving period Q11;
索引参数发送模块420,其用于将索引参数S1发送到耳机设备A1。The index parameter sending module 420 is used for sending the index parameter S1 to the earphone device A1.
根据图1以及图2所示实施例,可以在耳机设备A1上确认耳机设备B1缺失的音频数据包,并由耳机设备A1向耳机设备B1补发音频数据包。根据本申请一实施例的方法,不仅可以有效确认耳机设备在接收音频数据包时存在的数据包缺失,并且,针对缺失的音频数据包,可以在相互匹配的耳机设备间进行数据包的补发,从而大大提高了相互匹配的两台耳机设备播放音频数据包的匹配性,提高了用户体验。According to the embodiments shown in FIG. 1 and FIG. 2 , the audio data packets missing from the earphone device B1 can be confirmed on the earphone device A1, and the audio data packets are reissued by the earphone device A1 to the earphone device B1. According to the method of an embodiment of the present application, it is not only possible to effectively confirm that the data packets that exist when the headphone device receives the audio data packets is missing, but also, for the missing audio data packets, the data packets can be reissued between the matching headphone devices. , thereby greatly improving the matching of the audio data packets played by the two matching headphone devices, and improving the user experience.
进一步的,在实际应用场景中,本领域的技术人员可以采用多种不同的方案实现用于描述耳机设备在数据接收周期中音频数据包的接收状态的索引参数。Further, in practical application scenarios, those skilled in the art can implement the index parameter for describing the receiving state of the audio data packet in the data receiving period of the headphone device by adopting various solutions.
例如,在本申请一实施例中,为音频数据包配置序列标识,左耳耳机设备以及右耳耳机设备所接收到的音频数据包中,相互匹配对应的音频数据包具有相同的序列标识。例如,音频数据包为YS 11与YS 21具有相同的序列标识、YS 12与YS 22具有相同的序列标识、YS 13与YS 23具有相同的序列标识、YS 14与YS 24具有相同的序列标识。 For example, in an embodiment of the present application, a sequence identifier is configured for an audio data packet. In the audio data packets received by the left ear headphone device and the right ear headphone device, the audio data packets corresponding to each other have the same sequence identifier. For example, the audio data packet is that YS 11 and YS 21 have the same sequence ID, YS 12 and YS 22 have the same sequence ID, YS 13 and YS 23 have the same sequence ID, and YS 14 and YS 24 have the same sequence ID.
在同一数据接收周期中,单台耳机设备所接收到的各个音频数据包的序列标识不同,索引参数包含一个数据接收周期中,单台耳机设备所接收到的所有音频数据包的序列标识。这样,只需要对比左耳耳机设备所接收到的音频数据包的序列标识以及右耳耳机设备所接收到的音频数据包的序列标识,就可以确认左耳耳机设备或右耳耳机设备所缺失的音频数据包的序列标识。In the same data receiving cycle, the sequence identifiers of each audio data packet received by a single earphone device are different, and the index parameter includes the sequence identifiers of all audio data packets received by a single earphone device in a data receiving cycle. In this way, it is only necessary to compare the sequence identifier of the audio data packet received by the left ear headphone device and the sequence identifier of the audio data packet received by the right ear headphone device, and then it can be confirmed that the left ear headphone device or the right ear headphone device is missing. The sequence identifier of the audio packet.
例如,假设在数据接收周期Q21中,发送到左耳耳机设备的音频数据包为(YS 11、YS 12、YS 13、YS 14、YS 15),发送到右耳耳机设备的音频数据包为(YS 21、YS 22、YS 23、YS 24、YS 25)。那么,如果音频数据包(YS 11、YS 12、YS 13、YS 14、YS 15)的序列标识分别为A1、A2、A3、A4、A5,音频数据包(YS 21、YS 22、YS 23、YS 24、YS 25)的序列标识也分别为A1、A2、A3、A4、A5。 For example, suppose that in the data receiving period Q21, the audio data packets sent to the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ), and the audio data packets sent to the right ear headphone device are ( YS 21 , YS 22 , YS 23 , YS 24 , YS 25 ). Then, if the sequence identifiers of the audio data packets (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ) are A1, A2, A3, A4, and A5, respectively, the audio data packets (YS 21 , YS 22 , YS 23 , The sequence identifiers of YS 24 and YS 25 ) are also A1, A2, A3, A4, and A5, respectively.
假设,当前耳机设备(左耳耳机设备)在数据接收周期Q21接收到音频数据包(YS 11、YS 12、YS 13、YS 14、YS 15)。第一耳机设备(右耳耳机设备)在数据接收周期Q12接收到音频数据包(YS 21、YS 23、YS 24、YS 25)。 It is assumed that the current earphone device (left ear earphone device) receives audio data packets (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ) in the data receiving period Q21 . The first earphone device (the right earphone device) receives the audio data packets (YS 21 , YS 23 , YS 24 , YS 25 ) in the data receiving period Q12.
在数据接收周期Q21结束后,第一耳机设备向当前耳机设备发送第一索引参数(A1、A3、A4、A5)。当前耳机设备接收到第一索引参数(A1、A3、A4、A5)后,根据第一索引参数,对比当前耳机设备在第一数据接收周期中所接收到的音频数据包的序列标识(A1、A2、A3、A4、A5),从而确认第一耳机设备在第一数据接收周期中缺失序列标识为A2的 音频数据包。当前耳机设备将自身在数据接收周期Q21接收到的、序列标识为A2的音频数据包YS 12发送到第一耳机设备。 After the data receiving period Q21 ends, the first earphone device sends the first index parameters (A1, A3, A4, A5) to the current earphone device. After the current headphone device receives the first index parameters (A1, A3, A4, A5), according to the first index parameters, compare the sequence identifiers (A1, A1, A2, A3, A4, A5), thereby confirming that the first earphone device is missing the audio data packet with the sequence identifier A2 in the first data receiving cycle. The current earphone device sends the audio data packet YS 12 with the sequence identifier A2 received by itself in the data receiving period Q21 to the first earphone device.
又例如,在一实施例中,一个数据接收周期包含多次的数据接收(例如,按照通信协议,1秒钟内会实现20次数据接收操作,设定2秒为一个数据接收周期,那么,一个数据接收周期包含40次数据接收),每次数据接收成功执行时,耳机设备会接收一个音频数据包。For another example, in one embodiment, one data reception period includes multiple data receptions (for example, according to the communication protocol, 20 data reception operations will be implemented in 1 second, and 2 seconds is set as a data reception period, then, A data receiving cycle includes 40 data receiving times), and each time the data receiving is successfully executed, the headset device will receive an audio data packet.
索引参数为一串二进制代码(例如,UINT32格式的数据参量)。索引参数中的每一位对应数据接收周期中的一次数据接收,索引参数中的每一位的值代表其对应的数据接收状态,例如,值1代表该次数据接收接收到了音频数据包,值0代表该次数据接收未接收到音频数据包。The index parameter is a string of binary codes (eg, a data parameter in UINT32 format). Each bit in the index parameter corresponds to one data reception in the data reception cycle, and the value of each bit in the index parameter represents its corresponding data reception status. 0 means that no audio data packets have been received during this data reception.
例如,假设在数据接收周期Q21中,发送到左耳耳机设备的音频数据包为(YS 11、YS 12、YS 13、YS 14、YS 15),当前耳机设备(左耳耳机设备)在数据接收周期Q21接收到音频数据包(YS 11、YS 12、YS 13、YS 14、YS 15);发送到右耳耳机设备的音频数据包为(YS 21、YS 22、YS 23、YS 24、YS 25),第一耳机设备(右耳耳机设备)在数据接收周期Q12接收到音频数据包(YS 21、YS 23、YS 24、YS 25)。 For example, assuming that in the data receiving period Q21, the audio data packets sent to the left ear headphone device are (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ), and the current headphone device (left ear headphone device) is receiving data Cycle Q21 receives audio data packets (YS 11 , YS 12 , YS 13 , YS 14 , YS 15 ); the audio data packets sent to the right ear headphone device are ( YS 21 , YS 22 , YS 23 , YS 24 , YS 25 ) ), the first earphone device (the right earphone device) receives the audio data packets (YS 21 , YS 23 , YS 24 , YS 25 ) in the data receiving period Q12 .
在数据接收周期Q21结束后,第一耳机设备向当前耳机设备发送第一索引参数10111,其中,索引参数10111代表数据接收周期Q21中的第2次数据接收时没有接收到音频数据包。当前耳机设备接收到第一索引参数10111后,根据第一索引参数,确认第一耳机设备在第一数据接收周期中缺失第2次数据接收的音频数据包。当前耳机设备将自身在数据接收周期Q21接收到的、第2次数据接收的音频数据包YS 12发送到第一耳机设备。 After the data receiving period Q21 ends, the first earphone device sends the first index parameter 10111 to the current earphone device, wherein the index parameter 10111 represents that no audio data packet is received during the second data reception in the data receiving period Q21. After the current earphone device receives the first index parameter 10111, according to the first index parameter, it is confirmed that the first earphone device is missing the audio data packet of the second data reception in the first data reception cycle. The current earphone device sends the audio data packet YS 12 received by itself in the data receiving period Q21 and received for the second time to the first earphone device.
进一步的,在本申请一实施例中,图1以及图2所示数据传输方法流程由相互配对的两台耳机设备同步执行,两台耳机设备相互间确定对方设备缺失的音频数据包从而进行两台耳机设备间的音频数据包的补充发送。Further, in an embodiment of the present application, the flow of the data transmission method shown in FIG. 1 and FIG. 2 is performed synchronously by two paired earphone devices, and the two earphone devices mutually determine the audio data packets missing from the other device to perform two Complementary sending of audio packets between headsets.
图5所示为根据本申请一实施例的数据传输方法时序图。FIG. 5 is a sequence diagram of a data transmission method according to an embodiment of the present application.
如图5所示,左耳耳机设备A2以及右耳耳机设备B2为相互配对的耳机设备。在数据接收周期Q31结束后:As shown in FIG. 5 , the left earphone device A2 and the right earphone device B2 are earphone devices that are paired with each other. After the data receiving cycle Q31 ends:
步骤510,左耳耳机设备A2根据在数据接收周期Q31中接收到的音频数据包,生成索引参数S21; Step 510, the left ear headphone device A2 generates an index parameter S21 according to the audio data packet received in the data receiving period Q31;
步骤511,左耳耳机设备A2将索引参数S21发送到右耳耳机设备B2。 Step 511, the left ear headphone device A2 sends the index parameter S21 to the right ear headphone device B2.
同时,在数据接收周期Q31结束后:At the same time, after the data receiving cycle Q31 ends:
步骤520,右耳耳机设备B2根据在数据接收周期Q31中接收到的音频数据包,生成索引参数S22; Step 520, the right ear headphone device B2 generates an index parameter S22 according to the audio data packet received in the data receiving period Q31;
步骤521,右耳耳机设备B2将索引参数S22发送到左耳耳机设备A2。 Step 521, the right ear headphone device B2 sends the index parameter S22 to the left ear headphone device A2.
进一步的:further:
步骤512,左耳耳机设备A2接收索引参数S22; Step 512, the left ear headphone device A2 receives the index parameter S22;
步骤513,左耳耳机设备A2根据索引参数S22,确认右耳耳机设备B2在数据接收周期Q31中缺失的音频数据包; Step 513, according to the index parameter S22, the left ear headphone device A2 confirms the audio data packets missing from the right ear headphone device B2 in the data receiving period Q31;
步骤514,左耳耳机设备A2向右耳耳机设备B2发送,左耳耳机设备A2在数据接收周期Q31中所接收到的音频数据包中,与右耳耳机设备B2所缺失的音频数据包相对应的 音频数据包。 Step 514, the left ear headphone device A2 sends to the right ear headphone device B2, and the audio data packets received by the left ear headphone device A2 in the data receiving period Q31 correspond to the audio data packets missing from the right ear headphone device B2 audio packets.
同时:at the same time:
步骤522,右耳耳机设备B2接收索引参数S21; Step 522, the right ear headphone device B2 receives the index parameter S21;
步骤523,右耳耳机设备B2根据索引参数S21,确认左耳耳机设备A2在数据接收周期Q31中缺失的音频数据包; Step 523, according to the index parameter S21, the right ear headphone device B2 confirms the audio data packets missing from the left ear headphone device A2 in the data receiving period Q31;
步骤524,右耳耳机设备B2向左耳耳机设备A2发送,右耳耳机设备B2在数据接收周期Q31中所接收到的音频数据包中,与左耳耳机设备A2所缺失的音频数据包相对应的音频数据包。In step 524, the right-ear headphone device B2 sends to the left-ear headphone device A2, and the audio data packets received by the right-ear headphone device B2 in the data receiving period Q31 correspond to the audio data packets missing from the left-ear headphone device A2. audio packets.
图6所示为根据本申请一实施例的数据传输方法流程图。两台相互配对的耳机设备均执行如图6所示的下述流程:FIG. 6 is a flowchart of a data transmission method according to an embodiment of the present application. Two paired headphone devices both perform the following process as shown in Figure 6:
步骤610,在一次数据接收结束后,检查是否接收到音频数据包; Step 610, after one data reception ends, check whether an audio data packet is received;
步骤611,刷新索引参数,根据步骤610的检查结果确定索引参数中对应比特位的值; Step 611, refresh the index parameter, and determine the value of the corresponding bit in the index parameter according to the check result in step 610;
步骤620,判断本轮数据接收周期是否结束,例如,设定每N次数据接收为一个数据接收周期,判断刚结束的数据接收是否为N的整数倍次的数据接收; Step 620, judging whether the current round of data reception cycle ends, for example, setting every N data reception as a data reception cycle, and judging whether the data reception just ended is an integer multiple of N data reception;
如果步骤620判定为否,返回步骤610;If the determination in step 620 is no, return to step 610;
如果步骤620判定为是,执行步骤630;If the determination in step 620 is yes, execute step 630;
步骤630,发送索引参数到另一台耳机设备; Step 630, sending the index parameter to another headset device;
步骤640,接收来自另一台耳机设备的索引参数; Step 640, receiving an index parameter from another headset device;
步骤650,根据来自另一台耳机设备的索引参数,确定另一台耳机设备缺失的音频数据包; Step 650, according to the index parameter from another earphone device, determine the audio data packet missing from another earphone device;
步骤660,将另一台耳机设备缺失的音频数据所对应的音频数据包,发送到另一台耳机设备。Step 660: Send the audio data packet corresponding to the audio data missing from the other earphone device to the other earphone device.
进一步的,在TWS的应用场景中,在耳机设备接收到音频数据包后,音频数据包会由耳机设备的通信模块发送到音频模块进行解码播放。在本申请一实施例中,在一个数据接收周期结束后,当两台耳机设备完成相互间的音频数据包的补发后,该数据通信周期的音频数据包被发送到音频模块进行解码播放。Further, in the application scenario of TWS, after the headphone device receives the audio data packet, the audio data packet will be sent by the communication module of the headphone device to the audio module for decoding and playback. In an embodiment of the present application, after a data receiving period ends, when the two earphone devices complete the retransmission of audio data packets between each other, the audio data packets of the data communication period are sent to the audio module for decoding and playback.
进一步的,在TWS的应用场景中,由于数据传输延迟、音频数据包解码卡顿等问题的存在,左右耳耳机设备在播放各自的音频数据包时,会出现左右耳耳机设备播放进度、不一致的情况,针对这一情况,在本申请一实施例中,由一台耳机设备发送自身的播放进度到另一台耳机设备,接收到对方设备的播放进度的耳机设备对自身的播放速度进行调整,以同步两台耳机设备的播放进度。Further, in the application scenario of TWS, due to the existence of problems such as data transmission delay and audio data packet decoding stuck, when the left and right earphone devices play their respective audio data packets, the playback progress of the left and right earphone devices will appear inconsistent. In view of this situation, in an embodiment of the present application, one headphone device sends its own playback progress to another headphone device, and the headphone device that receives the playback progress of the other device adjusts its own playback speed, to synchronize the playback progress of the two headset devices.
具体的,在本申请一实施例中,为音频数据包为音频数据包配置序列标识,左耳耳机设备以及右耳耳机设备所接收到的音频数据包中,相互匹配对应的音频数据包具有相同的序列标识。在两次播放进度同步之间,单台耳机设备所接收到的各个音频数据包的序列标识不同。Specifically, in an embodiment of the present application, a sequence identifier is configured for the audio data packet for the audio data packet, and among the audio data packets received by the left ear headphone device and the right ear headphone device, the audio data packets corresponding to each other have the same sequence identifier. Between two playback progress synchronizations, the sequence identifiers of each audio data packet received by a single headphone device are different.
图7所示为根据本申请一实施例的数据传输方法时序图。两台相互配对的耳机设备(耳机设备A3以及耳机设备B3)执行如图4所示的下述流程:FIG. 7 is a sequence diagram of a data transmission method according to an embodiment of the present application. Two paired headphone devices (headphone device A3 and headphone device B3) execute the following process as shown in Figure 4:
步骤710,耳机设备A3发送第一时钟信号以及第一数据包序列标识到耳机设备B3,其中,第一时钟信号为耳机设备A3当前的时钟信号,第一数据包序列标识为耳机设备A3 当前正在播放的音频数据包的序列标识; Step 710, the earphone device A3 sends the first clock signal and the first data packet sequence identifier to the earphone device B3, wherein the first clock signal is the current clock signal of the earphone device A3, and the first data packet sequence identifier is that the earphone device A3 is currently The sequence identifier of the audio data packet being played;
步骤720,耳机设备B3接收第一时钟信号以及第一数据包序列标识; Step 720, the earphone device B3 receives the first clock signal and the first data packet sequence identifier;
步骤721,耳机设备B3根据第一时钟信号、第二时钟信号、第一数据包序列标识以及第二数据包序列标识确定当前耳机设备播放音频数据包的播放速度,其中,第二时钟信号为耳机设备B3当前的时钟信号,第二数据包序列标识为耳机设备B3当前正在播放的音频数据包的序列标识。 Step 721, the headphone device B3 determines the playback speed of the audio data packet played by the current headphone device according to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, wherein the second clock signal is the headphone. The current clock signal of the device B3, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the headphone device B3.
具体的,在实际应用场景中,图1、图3、图5、图6以及图7所示实施例中的各执行设备,可以按照需求进行搭配。Specifically, in an actual application scenario, each execution device in the embodiments shown in FIG. 1 , FIG. 3 , FIG. 5 , FIG. 6 , and FIG. 7 can be matched as required.
例如,在一应用场景中,左耳耳机设备发送索引参数、时钟信号以及数据包序列标识到右耳耳机设备,右耳耳机设备补发音频数据包到左耳耳机设备并调节自身的播放速度。For example, in an application scenario, the left-ear headphone device sends index parameters, clock signals and data packet sequence identifiers to the right-ear headphone device, and the right-ear headphone device re-sends audio data packets to the left-ear headphone device and adjusts its own playback speed.
又例如,在一应用场景中,右耳耳机设备发送索引参数、时钟信号以及数据包序列标识到左耳耳机设备,左耳耳机设备补发音频数据包到右耳耳机设备并调节自身的播放速度。For another example, in an application scenario, the right ear headphone device sends an index parameter, a clock signal, and a data packet sequence identifier to the left ear headphone device, and the left ear headphone device re-sends audio data packets to the right ear headphone device and adjusts its own playback speed. .
又例如,在一应用场景中,右耳耳机设备发送索引参数、时钟信号以及数据包序列标识到左耳耳机设备,左耳耳机设备发送索引参数到右耳耳机设备,左右耳耳机设备互相补发音频数据包,左耳耳机设备调节自身的播放速度。For another example, in an application scenario, the right ear headphone device sends the index parameter, the clock signal and the data packet sequence identifier to the left ear headphone device, the left ear headphone device sends the index parameter to the right ear headphone device, and the left and right earphone devices complement each other. Audio data packets, the left ear headphone device adjusts its own playback speed.
又例如,在一应用场景中,左耳耳机设备发送索引参数、时钟信号以及数据包序列标识到右耳耳机设备,右耳耳机设备发送索引参数到左耳耳机设备,左右耳耳机设备互相补发音频数据包,右耳耳机设备调节自身的播放速度。For another example, in an application scenario, the left ear headphone device sends the index parameter, the clock signal and the data packet sequence identifier to the right ear headphone device, the right ear headphone device sends the index parameter to the left ear headphone device, and the left and right earphone devices complement each other. Audio data packets, the right ear headphone device adjusts its own playback speed.
进一步的,在实际应用场景中,本领域的技术人员可以采用多种不同的播放速度调整策略实现步骤721。例如,当第一数据包序列标识为第二数据包序列标识之前的序列标识时,说明耳机设备A3目前的播放进度慢于耳机设备B3,耳机设备B3需要减缓自身的播放速度;当第一数据包序列标识为第二数据包序列标识之后的序列标识时,说明耳机设备A3目前的播放进度快于耳机设备B3,耳机设备B3需要加快自身的播放速度。又例如,当第一时钟信号与第二时钟信号不同步时,说明耳机设备A3与耳机设备B3的时钟信号不同步,在调整耳机设备B3的播放速度时需要参考时钟信号之间的差异。Further, in practical application scenarios, those skilled in the art can implement step 721 by adopting various different playback speed adjustment strategies. For example, when the first data packet sequence identifier is the sequence identifier before the second data packet sequence identifier, it means that the current playback progress of the headphone device A3 is slower than that of the headphone device B3, and the headphone device B3 needs to slow down its own playback speed; When the packet sequence identifier is the sequence identifier after the second data packet sequence identifier, it means that the current playback progress of the headphone device A3 is faster than that of the headphone device B3, and the headphone device B3 needs to speed up its own playback speed. For another example, when the first clock signal and the second clock signal are not synchronized, it means that the clock signals of the headphone device A3 and the headphone device B3 are not synchronized, and the difference between the clock signals needs to be referenced when adjusting the playback speed of the headphone device B3.
又例如,在一实施例中:For another example, in one embodiment:
新播放速度=当前播放速度+速度补偿(公式1);New playback speed = current playback speed + speed compensation (formula 1);
式1中,速度补偿为基于第一时钟信号、第二时钟信号、第一数据包序列标识以及第二数据包序列标识计算出的参数值:In formula 1, the speed compensation is a parameter value calculated based on the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier:
速度补偿=Speed Compensation =
f(第一时钟信号值,第二时钟信号值,第一数据包序列标识值,第二数据包序列标识值)(公式2)。f(first clock signal value, second clock signal value, first data packet sequence identification value, second data packet sequence identification value) (Equation 2).
公式2中,f()为根据实际场景确定的计算函数。In formula 2, f( ) is a calculation function determined according to the actual scene.
进一步的,在本申请实施例中,周期性的进行播放进度的同步。具体的,根据预设的周期设定划分播放周期(例如,划分每4秒为一个播放周期),在一个播放周期结束时,由一台耳机设备向另一台耳机设备发送时钟信号以及数据包序列标识,由接收到时钟信号以及数据包序列标识的耳机设备调整自身的播放速度以实现播放进度同步。Further, in the embodiment of the present application, the synchronization of the playback progress is performed periodically. Specifically, the playback period is divided according to the preset period setting (for example, every 4 seconds is divided into a playback period), and at the end of a playback period, one headphone device sends a clock signal and a data packet to another headphone device Sequence identifier, the headphone device that receives the clock signal and the data packet sequence identifier adjusts its own playback speed to synchronize the playback progress.
进一步的,为降低实施难度,在本申请一实施例中,基于数据包序列标识实现索引参 数以及播放进度同步。具体的,在音频数据包中增加序列(sequence,seq)字段。按照音频数据包的先后顺序,seq的值递增。索引参数(seq_map)为一串二进制代码。seq_map的数据结构定义为:UINT32 seq_map。在seq_map中,比特位(bit)i表示数据接收周期中第i次数据接收是否接收到音频数据包(i=0,1,2…)。例如,bit i的值为1代表第i次数据接收接收到了音频数据包,bit i的值为1代表第i次数据接收未接收到音频数据包。Further, in order to reduce the difficulty of implementation, in an embodiment of the present application, the index parameter and the playback progress synchronization are implemented based on the data packet sequence identifier. Specifically, a sequence (sequence, seq) field is added to the audio data packet. According to the sequence of audio data packets, the value of seq is incremented. The index parameter (seq_map) is a string of binary codes. The data structure of seq_map is defined as: UINT32 seq_map. In seq_map, bit (bit) i indicates whether an audio data packet (i=0, 1, 2 . . . ) is received at the i-th data reception in the data reception cycle. For example, a value of bit i of 1 means that the ith data reception receives an audio data packet, and a value of bit i of 1 means that the ith data reception does not receive an audio data packet.
设定每N次数据接收为一个数据接收周期:Set every N data reception as a data reception cycle:
i=seq%N。   (3)i=seq%N. (3)
进一步的,在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由访问方对器件编程来确定。由设计人员自行编程来把一个数字装置“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。Further, in the 1990s, an improvement in a technology can be clearly differentiated between improvements in hardware (for example, improvements to circuit structures such as diodes, transistors, switches, etc.) or improvements in software (improvements in method procedures). ). However, with the development of technology, the improvement of many methods and processes today can be regarded as a direct improvement of the hardware circuit structure. Designers almost get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by hardware entity modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logical function is determined by an accessor programming the device. It is programmed by the designer to "integrate" a digital device on a PLD, without the need for a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, today, instead of making integrated circuit chips by hand, this kind of programming is also mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing, and needs to be compiled before compiling. The original code also has to be written in a specific programming language, which is called Hardware Description Language (HDL), and there is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language) , AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., currently the most commonly used The ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be clear to those skilled in the art that a hardware circuit for implementing the logic method process can be easily obtained by simply programming the method process in the above-mentioned several hardware description languages and programming it into the integrated circuit.
具体的,本申请实施例所提出的装置在实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,检测模块可以为单独设立的处理元件,也可以集成在耳机设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。Specifically, the apparatuses proposed in the embodiments of the present application may be fully or partially integrated into a physical entity during actual implementation, or may be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in hardware. For example, the detection module may be a separately established processing element, or may be integrated in a certain chip of the headphone device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, and can also be implemented independently. In the implementation process, each step of the above-mentioned method or each of the above-mentioned modules can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个数字信号处理器(Digital Singnal Processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。再如,这些模块可以集成在一起,以片上装置(System-On-a-Chip,SOC)的形式实现。For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or, one or more digital signal processors ( Digital Singnal Processor, DSP), or, one or more Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc. For another example, these modules can be integrated together and implemented in the form of an on-chip device (System-On-a-Chip, SOC).
在实际应用场景中,图1~图4所示实施例的方法流程可以由安装在耳机设备上的通 信芯片所实现。因此,本申请一实施例提出了一种通信芯片。例如,通信芯片X1安装在相互配对的两台耳机设备(耳机设备A4以及耳机设备B4)中的一台耳机设备(耳机设备A4)上,通信芯片X1包括:In a practical application scenario, the method flow of the embodiments shown in FIG. 1 to FIG. 4 may be implemented by a communication chip installed on the headset device. Therefore, an embodiment of the present application proposes a communication chip. For example, the communication chip X1 is installed on one earphone device (the earphone device A4) among the two paired earphone devices (the earphone device A4 and the earphone device B4), and the communication chip X1 includes:
处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令被该处理器执行时,触发通信芯片X1执行下述方法步骤:A processor for executing computer program instructions stored in the memory, wherein, when the computer program instructions are executed by the processor, the communication chip X1 is triggered to perform the following method steps:
接收来自耳机设备B4的第一索引参数,其中,第一索引参数用于描述耳机设备B4在第一数据接收周期中的音频数据包接收状态;Receive the first index parameter from the earphone device B4, wherein the first index parameter is used to describe the audio data packet receiving state of the earphone device B4 in the first data receiving period;
根据第一索引参数,确认耳机设备B4在第一数据接收周期中缺失的音频数据包;According to the first index parameter, confirm the audio data packets missing in the first data receiving cycle of the headphone device B4;
向耳机设备B4发送,耳机设备A4在第一数据接收周期中所接收到的音频数据包中,与耳机设备B4所缺失的音频数据包相对应的音频数据包。Send to the earphone device B4, among the audio data packets received by the earphone device A4 in the first data receiving cycle, the audio data packets corresponding to the audio data packets missing from the earphone device B4.
进一步的,当该计算机程序指令被该处理器执行时,还触发通信芯片X1执行下述方法步骤:Further, when the computer program instruction is executed by the processor, the communication chip X1 is also triggered to execute the following method steps:
根据耳机设备A4在第一数据接收周期中接收到的音频数据包,生成第二索引参数,其中,第二索引参数用于描述耳机设备A4在第一数据接收周期中的音频数据包接收状态;Generate a second index parameter according to the audio data packet received by the earphone device A4 in the first data receiving cycle, wherein the second index parameter is used to describe the audio data packet receiving state of the earphone device A4 in the first data receiving cycle;
将第二索引参数发送到耳机设备B4。The second index parameter is sent to the headphone device B4.
进一步的,当该计算机程序指令被该处理器执行时,触发通信芯片X1在每个数据接收周期结束后,生成对应的索引参数,并且,将索引参数发送到耳机设备B4。Further, when the computer program instructions are executed by the processor, the communication chip X1 is triggered to generate corresponding index parameters after each data receiving period ends, and send the index parameters to the earphone device B4.
进一步的,本申请一实施例还提出了一种通信芯片。例如,通信芯片X2安装在耳机设备B4上,通信芯片X2包括:Further, an embodiment of the present application also proposes a communication chip. For example, the communication chip X2 is installed on the headset device B4, and the communication chip X2 includes:
处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令被该处理器执行时,触发通信芯片X2执行下述方法步骤:A processor for executing the computer program instructions stored in the memory, wherein, when the computer program instructions are executed by the processor, the communication chip X2 is triggered to perform the following method steps:
根据耳机设备B4在第一数据接收周期中接收到的音频数据包,生成第一索引参数,其中,第一索引参数用于描述耳机设备B4在第一数据接收周期中的音频数据包接收状态;Generate a first index parameter according to the audio data packet received by the earphone device B4 in the first data receiving cycle, wherein the first index parameter is used to describe the audio data packet receiving state of the earphone device B4 in the first data receiving cycle;
将第一索引参数发送到耳机设备A4。The first index parameter is sent to the headphone device A4.
进一步的,当该计算机程序指令被该处理器执行时,触发通信芯片X2在每个数据接收周期结束后,生成对应的索引参数,并且,将索引参数发送到第一耳机设备。Further, when the computer program instructions are executed by the processor, the communication chip X2 is triggered to generate corresponding index parameters after each data receiving period ends, and send the index parameters to the first earphone device.
在实际应用场景中,图7所示实施例的方法流程可以由安装在耳机设备上的音频芯片所实现。因此,本申请一实施例提出了一种音频芯片。例如,音频芯片Y1安装在相互配对的两台耳机设备(耳机设备A5以及耳机设备B5)中的一台耳机设备(耳机设备A5)上,通信芯片Y1包括:In a practical application scenario, the method flow of the embodiment shown in FIG. 7 may be implemented by an audio chip installed on a headphone device. Therefore, an embodiment of the present application proposes an audio chip. For example, the audio chip Y1 is installed on one earphone device (the earphone device A5) of the two paired earphone devices (the earphone device A5 and the earphone device B5), and the communication chip Y1 includes:
处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令被该处理器执行时,触发通信芯片Y1执行下述方法步骤:A processor for executing the computer program instructions stored in the memory, wherein, when the computer program instructions are executed by the processor, the communication chip Y1 is triggered to perform the following method steps:
接收来自耳机设备B5的第一时钟信号以及第一数据包序列标识,其中,第一时钟信号为耳机设备B5当前的时钟信号,第一数据包序列标识为耳机设备B5当前正在播放的音频数据包的序列标识;Receive the first clock signal and the first data packet sequence identifier from the earphone device B5, wherein the first clock signal is the current clock signal of the earphone device B5, and the first data packet sequence identifier is the audio data packet currently being played by the earphone device B5 the sequence identifier;
根据第一时钟信号、第二时钟信号、第一数据包序列标识以及第二数据包序列标识确定耳机设备A5播放音频数据包的播放速度,其中,第二时钟信号为耳机设备A5当前的时钟信号,第二数据包序列标识为耳机设备A5当前正在播放的音频数据包的序列标识。The playback speed of the audio data packet played by the headphone device A5 is determined according to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, wherein the second clock signal is the current clock signal of the headphone device A5 , the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the headphone device A5.
本申请一实施例提出了一种音频芯片。例如,音频芯片Y2安装在耳机设备B5上, 通信芯片Y1包括:An embodiment of the present application provides an audio chip. For example, the audio chip Y2 is installed on the headphone device B5, and the communication chip Y1 includes:
处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令被该处理器执行时,触发通信芯片Y1执行下述方法步骤:A processor for executing the computer program instructions stored in the memory, wherein, when the computer program instructions are executed by the processor, the communication chip Y1 is triggered to perform the following method steps:
向耳机设备A5发送第一时钟信号以及第一数据包序列标识,其中,第一时钟信号为耳机设备B5当前的时钟信号,第一数据包序列标识为耳机设备B5当前正在播放的音频数据包的序列标识。Send the first clock signal and the first data packet sequence identifier to the earphone device A5, wherein the first clock signal is the current clock signal of the earphone device B5, and the first data packet sequence identifier is the audio data packet currently being played by the earphone device B5. Sequence ID.
进一步的,当该计算机程序指令被该处理器执行时,触发通信芯片Y1在每个播放周期结束时,向耳机设备A5发送时钟信号以及数据包序列标识。Further, when the computer program instructions are executed by the processor, the communication chip Y1 is triggered to send a clock signal and a data packet sequence identifier to the headphone device A5 at the end of each play period.
本申请一实施例还提出了一种耳机设备,耳机设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发耳机设备执行如本申请实施例所述的方法步骤。An embodiment of the present application also proposes a headset device, the headset device includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the headset is triggered The device executes the method steps described in the embodiments of the present application.
具体的,在本申请一实施例中,上述一个或多个计算机程序被存储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被上述设备执行时,使得上述设备执行本申请实施例所述的方法步骤。Specifically, in an embodiment of the present application, the above-mentioned one or more computer programs are stored in the above-mentioned memory, and the above-mentioned one or more computer programs include instructions. When the above-mentioned instructions are executed by the above-mentioned device, the above-mentioned device is made to execute the application. The method steps described in the examples.
具体的,在本申请一实施例中,耳机设备的处理器可以是片上装置SOC,该处理器中可以包括中央处理器(Central Processing Unit,CPU),还可以进一步包括其他类型的处理器。具体的,在本申请一实施例中,耳机设备的处理器可以是PWM控制芯片。Specifically, in an embodiment of the present application, the processor of the headphone device may be an on-chip device SOC, and the processor may include a central processing unit (Central Processing Unit, CPU), and may further include other types of processors. Specifically, in an embodiment of the present application, the processor of the earphone device may be a PWM control chip.
具体的,在本申请一实施例中,涉及的处理器可以例如包括CPU、DSP、微控制器或数字信号处理器,还可包括GPU、嵌入式神经网络处理器(Neural-network Process Units,NPU)和图像信号处理器(Image Signal Processing,ISP),该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如ASIC,或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储介质中。Specifically, in an embodiment of the present application, the involved processor may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded Neural-network Process Units (NPU, NPU) ) and an image signal processor (Image Signal Processing, ISP), the processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASICs, or one or more integrated circuits for controlling the execution of programs in the technical solution of the present application Wait. Furthermore, the processor may have the function of operating one or more software programs, which may be stored in a storage medium.
具体的,在本申请一实施例中,耳机设备的存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何计算机可读介质。Specifically, in an embodiment of the present application, the memory of the headset device may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory) memory, RAM) or other types of dynamic storage devices that can store information and instructions, also can be electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory, CD-ROM) or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or can also be used for portable or Any computer-readable medium that stores desired program code in the form of instructions or data structures and can be accessed by a computer.
具体的,在本申请一实施例中,处理器可以和存储器可以合成一个处理装置,更常见的是彼此独立的部件,处理器用于执行存储器中存储的程序代码来实现本申请实施例所述方法。具体实现时,该存储器也可以集成在处理器中,或者,独立于处理器。Specifically, in an embodiment of the present application, a processor may be combined with a memory to form a processing device, which is more commonly an independent component. The processor is used to execute program codes stored in the memory to implement the method described in the embodiment of the present application. . During specific implementation, the memory can also be integrated in the processor, or be independent of the processor.
进一步的,本申请实施例阐明的设备、装置、模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。Further, the devices, devices, and modules described in the embodiments of the present application may be specifically implemented by computer chips or entities, or by products with certain functions.
本领域内的技术人员应明白,本申请实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计 算机可用存储介质上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
具体的,本申请一实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。Specifically, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer executes the method provided by the embodiment of the present application.
本申请一实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。An embodiment of the present application further provides a computer program product, where the computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided by the embodiment of the present application.
本申请中的实施例描述是参照根据本申请实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The descriptions of the embodiments in the present application are described with reference to flowcharts and/or block diagrams of methods, apparatuses (apparatuses), and computer program products according to the embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.
还需要说明的是,本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。It should also be noted that, in the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can indicate the existence of A alone, the existence of A and B at the same time, and the existence of B alone. where A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c may be single, or Can be multiple.
本申请实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。In the embodiments of the present application, the terms "comprising", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes Other elements not expressly listed, or which are inherent to such a process, method, article of manufacture, or apparatus are also included. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article of manufacture, or device that includes the element.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this application is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for related parts.
本领域普通技术人员可以意识到,本申请实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that each unit and algorithm steps described in the embodiments of the present application can be implemented by a combination of electronic hardware, computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described devices, devices and units, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

  1. 一种数据传输方法,其特征在于,包括:A data transmission method, comprising:
    接收来自第一耳机设备的第一索引参数,其中,所述第一耳机设备为与当前耳机设备配对的耳机设备,所述第一索引参数用于描述第一耳机设备在第一数据接收周期中的音频数据包接收状态;Receive a first index parameter from a first headset device, where the first headset device is a headset device paired with the current headset device, and the first index parameter is used to describe the first headset device in the first data receiving cycle The receiving status of audio packets;
    根据所述第一索引参数,确认所述第一耳机设备在所述第一数据接收周期中缺失的音频数据包;confirming, according to the first index parameter, audio data packets missing from the first earphone device in the first data receiving cycle;
    向所述第一耳机设备发送,所述当前耳机设备在所述第一数据接收周期中所接收到的音频数据包中,与所述第一耳机设备所缺失的音频数据包相对应的音频数据包。Send to the first headphone device, in the audio data packets received by the current headphone device in the first data receiving period, the audio data corresponding to the audio data packets missing from the first headphone device Bag.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    根据所述当前耳机设备在第一数据接收周期中接收到的音频数据包,生成第二索引参数,其中,所述第二索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;A second index parameter is generated according to the audio data packets received by the current headphone device in the first data reception period, where the second index parameter is used to describe the current headphone device in the first data reception period Audio packet reception status in ;
    将所述第二索引参数发送到所述第一耳机设备。Sending the second index parameter to the first headset device.
  3. 根据权利要求2所述的方法,其特征在于,在每个数据接收周期结束后,生成对应的索引参数,并且,将所述索引参数发送到所述第一耳机设备。The method according to claim 2, wherein after each data receiving period ends, a corresponding index parameter is generated, and the index parameter is sent to the first earphone device.
  4. 根据权利要求1~3中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    接收来自所述第一耳机设备的第一时钟信号以及第一数据包序列标识,其中,所述第一时钟信号为所述第一耳机设备当前的时钟信号,所述第一数据包序列标识为所述第一耳机设备当前正在播放的音频数据包的序列标识,所述第一耳机设备与所述当前耳机设备所接收到的音频数据包中,相互对应的音频数据包的序列标识一致;Receive a first clock signal and a first data packet sequence identifier from the first earphone device, wherein the first clock signal is the current clock signal of the first earphone device, and the first data packet sequence identifier is The sequence identifier of the audio data packet currently being played by the first earphone device, the sequence identifiers of the audio data packets corresponding to each other in the audio data packet received by the first earphone device and the current earphone device are consistent;
    根据所述第一时钟信号、第二时钟信号、所述第一数据包序列标识以及第二数据包序列标识确定所述当前耳机设备播放音频数据包的播放速度,其中,所述第二时钟信号为所述当前耳机设备当前的时钟信号,所述第二数据包序列标识为所述当前耳机设备当前正在播放的音频数据包的序列标识。According to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, the playback speed of the current audio data packet played by the headphone device is determined, wherein the second clock signal is the current clock signal of the current earphone device, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the current earphone device.
  5. 一种数据传输方法,其特征在于,包括:A data transmission method, comprising:
    根据当前耳机设备在第一数据接收周期中接收到的音频数据包,生成第一索引参数,其中,所述第一索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;A first index parameter is generated according to the audio data packet received by the current headphone device in the first data receiving period, wherein the first index parameter is used to describe the current headphone device in the first data receiving period Audio packet receiving status;
    将所述第一索引参数发送到第一耳机设备,其中,所述第一耳机设备为与所述当前耳机设备配对的耳机设备。The first index parameter is sent to a first headset device, where the first headset device is a headset device paired with the current headset device.
  6. 根据权利要求5所述的方法,其特征在于,在每个数据接收周期结束后,生成对应的索引参数,并且,将所述索引参数发送到所述第一耳机设备。The method according to claim 5, wherein after each data receiving period ends, a corresponding index parameter is generated, and the index parameter is sent to the first earphone device.
  7. 根据权利要求5或6所述的方法,其特征在于,所述方法还包括:The method according to claim 5 or 6, wherein the method further comprises:
    接收来自所述第一耳机设备的第一时钟信号以及第一数据包序列标识,其中,所述第一时钟信号为所述第一耳机设备当前的时钟信号,所述第一数据包序列标识为所述第一耳机设备当前正在播放的音频数据包的序列标识,所述第一耳机设备与所述当前耳机设备所接收到的音频数据包中,相互对应的音频数据包的序列标识一致;Receive a first clock signal and a first data packet sequence identifier from the first earphone device, wherein the first clock signal is the current clock signal of the first earphone device, and the first data packet sequence identifier is The sequence identifier of the audio data packet currently being played by the first earphone device, the sequence identifiers of the audio data packets corresponding to each other in the audio data packet received by the first earphone device and the current earphone device are consistent;
    根据所述第一时钟信号、第二时钟信号、所述第一数据包序列标识以及第二数据包序 列标识确定所述当前耳机设备播放音频数据包的播放速度,其中,所述第二时钟信号为所述当前耳机设备当前的时钟信号,所述第二数据包序列标识为所述当前耳机设备当前正在播放的音频数据包的序列标识。According to the first clock signal, the second clock signal, the first data packet sequence identifier and the second data packet sequence identifier, the playback speed of the current audio data packet played by the headphone device is determined, wherein the second clock signal is the current clock signal of the current earphone device, and the second data packet sequence identifier is the sequence identifier of the audio data packet currently being played by the current earphone device.
  8. 一种数据传输装置,其特征在于,包括:A data transmission device, comprising:
    数据接收模块,其用于接收来自第一耳机设备的索引参数,其中,所述第一耳机设备为与当前耳机设备配对的耳机设备,所述索引参数用于描述第一耳机设备在第一数据接收周期中的音频数据包接收状态;A data receiving module, configured to receive an index parameter from a first headset device, wherein the first headset device is a headset device paired with the current headset device, and the index parameter is used to describe the first headset device in the first data Audio packet reception status in the receive cycle;
    数据包缺失判定模块,其用于根据所述索引参数,确认所述第一耳机设备在所述第一数据接收周期中缺失的音频数据包;a data packet missing determination module, which is used for confirming, according to the index parameter, the audio data packets missing from the first earphone device in the first data receiving cycle;
    数据包发送模块,其用于向所述第一耳机设备发送,所述当前耳机设备在所述第一数据接收周期中所接收到的音频数据包中,与所述第一耳机设备所缺失的音频数据包相对应的音频数据包。A data packet sending module, which is used to send to the first headphone device, the audio data packets received by the current headphone device in the first data receiving cycle are the same as the ones missing from the first headphone device. The audio data packet corresponding to the audio data packet.
  9. 一种数据传输装置,其特征在于,包括:A data transmission device, comprising:
    索引参数生成模块,其用于根据当前耳机设备在第一数据接收周期中接收到的音频数据包,生成索引参数,其中,所述索引参数用于描述所述当前耳机设备在所述第一数据接收周期中的音频数据包接收状态;An index parameter generation module is used to generate an index parameter according to the audio data packet received by the current headphone device in the first data receiving period, wherein the index parameter is used to describe the current headphone device in the first data Audio packet reception status in the receive cycle;
    索引参数发送模块,其用于将所述索引参数发送到第一耳机设备,其中,所述第一耳机设备为与所述当前耳机设备配对的耳机设备。An index parameter sending module, configured to send the index parameter to a first earphone device, wherein the first earphone device is an earphone device paired with the current earphone device.
  10. 一种通信芯片,其特征在于,包括:A communication chip, characterized in that it includes:
    处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令被该处理器执行时,触发所述通信芯片执行权利要求1-3中任一项所述的方法步骤。A processor for executing computer program instructions stored in a memory, wherein, when the computer program instructions are executed by the processor, the communication chip is triggered to perform the method steps of any one of claims 1-3 .
  11. 一种通信芯片,其特征在于,包括:A communication chip, characterized in that it includes:
    处理器,其用于执行存储在存储器上的计算机程序指令,其中,当该计算机程序指令被该处理器执行时,触发所述通信芯片执行权利要求5或6所述的方法步骤。a processor for executing computer program instructions stored in the memory, wherein when the computer program instructions are executed by the processor, the communication chip is triggered to perform the method steps of claim 5 or 6 .
  12. 一种耳机设备,其特征在于,所述耳机设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述通信芯片执行如权利要求1-4中任一项所述的方法步骤。A headset device, characterized in that the headset device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the communication is triggered The chip performs the method steps of any of claims 1-4.
  13. 一种耳机设备,其特征在于,所述耳机设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述通信芯片执行如权利要求5-7中任一项所述的方法步骤。A headset device, characterized in that the headset device comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the communication is triggered The chip performs the method steps of any of claims 5-7.
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-7中任一项所述的方法。A computer-readable storage medium, characterized in that, a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer executes the method according to any one of claims 1-7 .
PCT/CN2021/131112 2020-12-31 2021-11-17 Data transmission method and apparatus, and communication chip and earphone device WO2022142815A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011617962.3 2020-12-31
CN202011617962.3A CN112822588B (en) 2020-12-31 2020-12-31 Data transmission method and device, communication chip and earphone equipment

Publications (1)

Publication Number Publication Date
WO2022142815A1 true WO2022142815A1 (en) 2022-07-07

Family

ID=75855819

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/131112 WO2022142815A1 (en) 2020-12-31 2021-11-17 Data transmission method and apparatus, and communication chip and earphone device

Country Status (2)

Country Link
CN (1) CN112822588B (en)
WO (1) WO2022142815A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112822588B (en) * 2020-12-31 2022-10-21 展讯通信(上海)有限公司 Data transmission method and device, communication chip and earphone equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110753284A (en) * 2019-10-24 2020-02-04 珠海慧联科技有限公司 Wireless earphone communication method and system and wireless earphone
CN110944311A (en) * 2019-11-06 2020-03-31 泰凌微电子(上海)有限公司 Method for allocating time slot of wireless earphone and wireless earphone adopting same
CN111698672A (en) * 2020-05-26 2020-09-22 展讯通信(上海)有限公司 Audio synchronization method of wireless earphone and wireless earphone
CN112039637A (en) * 2019-06-03 2020-12-04 南京中感微电子有限公司 Audio data communication method and system and audio communication equipment
US20200396028A1 (en) * 2017-12-28 2020-12-17 Dopple Ip B.V. Wireless Stereo Headset with Diversity
CN112822588A (en) * 2020-12-31 2021-05-18 展讯通信(上海)有限公司 Data transmission method and device, communication chip and earphone equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109215669A (en) * 2017-07-06 2019-01-15 中国电影科学技术研究所 Wireless sound box multi-channel synchronous system and method
CN108738006B (en) * 2018-05-31 2021-06-25 出门问问信息科技有限公司 Data transmission method and device based on Bluetooth
KR102063342B1 (en) * 2018-09-13 2020-01-07 네이버 주식회사 Method and system for controlling earset
CN111294779B (en) * 2019-06-21 2021-07-06 展讯通信(上海)有限公司 Audio playing method, device and storage medium
CN110324742B (en) * 2019-07-01 2021-10-22 Oppo广东移动通信有限公司 Control method, earphone and storage medium
CN110602338B (en) * 2019-07-30 2021-04-13 广州视源电子科技股份有限公司 Audio processing method, device, system, storage medium and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200396028A1 (en) * 2017-12-28 2020-12-17 Dopple Ip B.V. Wireless Stereo Headset with Diversity
CN112039637A (en) * 2019-06-03 2020-12-04 南京中感微电子有限公司 Audio data communication method and system and audio communication equipment
CN110753284A (en) * 2019-10-24 2020-02-04 珠海慧联科技有限公司 Wireless earphone communication method and system and wireless earphone
CN110944311A (en) * 2019-11-06 2020-03-31 泰凌微电子(上海)有限公司 Method for allocating time slot of wireless earphone and wireless earphone adopting same
CN111698672A (en) * 2020-05-26 2020-09-22 展讯通信(上海)有限公司 Audio synchronization method of wireless earphone and wireless earphone
CN112822588A (en) * 2020-12-31 2021-05-18 展讯通信(上海)有限公司 Data transmission method and device, communication chip and earphone equipment

Also Published As

Publication number Publication date
CN112822588A (en) 2021-05-18
CN112822588B (en) 2022-10-21

Similar Documents

Publication Publication Date Title
US11546682B2 (en) Method and system for synchronous audio playback of TWS earphones
CN111200769B (en) Communication method for Bluetooth headset device and Bluetooth headset device
US20200137699A1 (en) Synchronization method for synchronizing clocks of a bluetooth device
US9154185B2 (en) Managing audio output through an intermediary
TWI524796B (en) Smart battery wear leveling for audio devices
WO2018032455A1 (en) Bluetooth communication method and terminal
WO2022142815A1 (en) Data transmission method and apparatus, and communication chip and earphone device
US20220150632A1 (en) Controlling Dual-Mode Bluetooth Low Energy Multimedia Devices
US11240586B1 (en) Method, apparatus and device for synchronously playing audio
WO2022142813A1 (en) Bluetooth data transmission method and apparatus, communication chip, and electronic device
JP2020042799A (en) Ear set control method and system
WO2022142825A1 (en) Device networking method and apparatus and electronic device
CN111405336A (en) Multi-device synchronous playing method and system, electronic device and storage medium
EP3281317A1 (en) Multi-layer timing synchronization framework
CN114760275A (en) Method, device and system for transmitting distributed data
CN105518774A (en) Apparatus and method for acquiring configuration data
TW200901717A (en) Techniques for unidirectional disabling of audio-video synchronization
WO2019210614A1 (en) Method and apparatus for implementing page function reuse
JP2022536822A (en) Seamless role switching for true wireless earbuds
TWI764458B (en) Bluetooth-based data transmission method and data reception method, communicating apparatus and computer storage medium
CN113645283B (en) Multilink communication method, device, storage medium and electronic equipment
US10623872B1 (en) Systems and methods for audio rendering control in a hearing system
TWI715175B (en) Bluetooth device, method of operating bluetooth device, and non-transitory computer readable medium
WO2021134238A1 (en) Data sending method and device applied to bluetooth communication
TW202135495A (en) Media access controller with a codec error model

Legal Events

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

Ref document number: 21913558

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21913558

Country of ref document: EP

Kind code of ref document: A1