CN110769445A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN110769445A
CN110769445A CN201911032141.0A CN201911032141A CN110769445A CN 110769445 A CN110769445 A CN 110769445A CN 201911032141 A CN201911032141 A CN 201911032141A CN 110769445 A CN110769445 A CN 110769445A
Authority
CN
China
Prior art keywords
data
equipment
slave
data source
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911032141.0A
Other languages
Chinese (zh)
Other versions
CN110769445B (en
Inventor
周子铨
徐彦超
余琰知
赵育仁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201911032141.0A priority Critical patent/CN110769445B/en
Publication of CN110769445A publication Critical patent/CN110769445A/en
Application granted granted Critical
Publication of CN110769445B publication Critical patent/CN110769445B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0205Traffic management, e.g. flow control or congestion control at the air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a data transmission method and a device, which are applied to data source equipment in a data transmission system, wherein the data transmission system also comprises an equipment group, the equipment group comprises at least two pieces of equipment, and the at least two pieces of equipment are in wireless link in pairs, and the method comprises the following steps: the data source device determines a first device in the device group, and the first device is wirelessly linked with the data source device; the data source equipment sends first data to first equipment so as to send the first data to slave equipment when the first equipment is main equipment, wherein the main equipment is main equipment in an equipment group, and the slave equipment is equipment except the main equipment in the equipment group; the data source equipment receives a first reply sent by the master equipment, and the first reply indicates that the master equipment receives the first data. The method and the device are used for saving air interface resources of the data source device and further guaranteeing the transmission reliability of data between the data source device and at least two devices.

Description

Data transmission method and device
Technical Field
The embodiment of the invention relates to the field of wireless communication, in particular to a data transmission method and device.
Background
A data source device (e.g., cell phone, computer), etc. may link a True Wireless Stereo (TWS) headset, wherein the TWS headset includes a first headset and a second headset.
In practical applications, when the data source device links the first earphone and the second earphone, if the user wears the first earphone and the second earphone, the data source device may unicast audio data to the first earphone and the second earphone, or broadcast/multicast audio data to the first earphone and the second earphone. In the above process, when the audio data is unicast to the first earphone and the second earphone, the audio data needs to occupy a larger bandwidth, which results in waste of air interface resources. Broadcasting, multicasting the audio data to the first and second earpieces is not a guarantee that the first and second earpieces receive the audio data correctly.
Disclosure of Invention
Embodiments of the present invention provide a data transmission method and apparatus, which are used to save air interface resources of a data source device, thereby ensuring transmission reliability of data between the data source device and at least two devices.
In a first aspect, an embodiment of the present invention provides a data transmission method, which is applied to a data source device in a data transmission system, where the data transmission system further includes a device group, where the device group includes at least two devices, and the at least two devices are wirelessly linked in pairs, and the method includes:
the data source device determines a first device in the device group, and the first device and the data source device are in wireless link;
the data source device sends first data to a first device, so that the first device forwards the first data to a slave device when the first device is a master device, wherein the master device is a master device in the device group, and the slave device is a device in the device group except the master device;
the data source device receives a first reply sent by a master device, wherein the first reply indicates that the master device receives the first data.
In a second aspect, an embodiment of the present invention provides a data transmission method, which is applied to a first device in a device group in a data transmission system, where the device group includes at least two devices, and the at least two devices are wirelessly linked in pairs, the data transmission system further includes a data source device, and the method includes:
the first equipment receives first data sent by data source equipment, and the first equipment and the data source equipment are in wireless link;
when the first device is a master device, sending a first reply to the data source device, wherein the first reply indicates that the first device receives the first data;
the first device sends the first data to slave devices in the device group, wherein the slave devices are devices in the device group except the first device;
the first device receives a second reply sent by the slave device, the second reply indicating that the slave device received the first data.
In a third aspect, an embodiment of the present invention provides a data transmission apparatus, which is applied to a data source device in a data transmission system, where the data transmission system further includes a device group, the device group includes at least two devices, and each two of the at least two devices are wirelessly linked, and the apparatus includes: a determining module, a sending module and a receiving module, wherein,
the determining module is used for determining a first device in the device group, and the first device is wirelessly linked with the data source device;
the sending module is configured to send first data to a first device, so that the first device sends the first data to a slave device when the first device is a master device, where the master device is a master device in the device group, and the slave device is a device in the device group other than the master device;
the receiving module is configured to receive a first reply sent by a master device, where the first reply indicates that the master device receives the first data.
In a fourth aspect, an embodiment of the present invention provides a data transmission apparatus, which is applied to a first device in a device group in a data transmission system, where the device group includes at least two devices, and the at least two devices are wirelessly linked in pairs, the data transmission system further includes a data source device, and the apparatus includes: a receiving module and a sending module, wherein,
the receiving module is used for receiving first data sent by data source equipment;
the sending module is configured to send a first reply to the data source device when the first device is a master device, where the first reply indicates that the first device receives the first data;
the sending module is further configured to send the first data to a slave device, where the slave device is a device of the device group other than the first device;
the receiving module is further configured to receive a second reply sent by the slave device, where the second reply indicates that the slave device receives the first data.
In a fifth aspect, an embodiment of the present invention provides a data transmission apparatus, including a memory and a processor,
the processor executes program instructions in the memory for implementing the data transmission method of any of the first methods above.
In a sixth aspect, an embodiment of the present invention provides a data transmission apparatus, including a memory and a processor,
the processor executes program instructions in the memory for the data transfer method of any of the second methods above.
The data transmission method and device provided by the embodiment of the invention comprise the following steps: the data source device determines a first device in the device group, and the first device is wirelessly linked with the data source device; the data source equipment sends first data to first equipment; when the first device is the master device, the first device sends a first reply to the data source device, and the first reply indicates that the first device receives the first data; the data source equipment receives a first reply sent by the first equipment; the method comprises the steps that first data are sent to slave equipment by first equipment, and the slave equipment is equipment except the first equipment in an equipment group; receiving first data sent by a first device from a device; after receiving the first data, the slave device sends a second reply to the first device, wherein the second reply indicates that the first device receives the first data; the first device receives a second reply sent from the device. In the above process, the data source device only needs to send the first data to the master device, so that the air interface resource of the data source device is saved. Furthermore, the master device sends a first reply to the data source device, and the slave device sends a second reply to the master device, so that the reliability of the first data transmission is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a data transmission method according to an embodiment of the present invention;
fig. 2 is a first flowchart illustrating a data transmission method according to an embodiment of the present invention;
fig. 3 is a second flowchart illustrating a data transmission method according to an embodiment of the present invention;
fig. 4 is a third schematic flowchart of a data transmission method according to an embodiment of the present invention;
fig. 5 is a fourth schematic flowchart of a data transmission method according to an embodiment of the present invention;
fig. 6 is a fifth flowchart illustrating a data transmission method according to an embodiment of the present invention;
fig. 7 is a first frame transmission diagram of a data transmission method according to an embodiment of the present invention;
fig. 8 is a frame transmission diagram illustrating a data transmission method according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 10 is a first schematic structural diagram of another data transmission apparatus according to an embodiment of the present invention;
fig. 11 is a second schematic structural diagram of another data transmission device according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of another data transmission apparatus according to another embodiment of the present invention;
fig. 13 is a fourth schematic structural diagram of another data transmission apparatus according to an embodiment of the present invention;
fig. 14 is a schematic hardware structure diagram of a data transmission device provided in the present application;
fig. 15 is a schematic diagram of a hardware structure of another data transmission device provided in the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic view of an application scenario of a data transmission method according to an embodiment of the present invention. As shown in fig. 1, includes: a data source device 101, and a device group 102, wherein the device group 102 includes a plurality of devices 103.
The data source device 101 is wirelessly linked with at least one device 103 through a wireless network, and the devices 103 are also wirelessly linked with each other through the wireless network. Specifically, the Wireless network is a Wireless Fidelity (WIFI) network.
In practical applications, if the data source device 101 can have a wireless link with both the devices 103 in the device group 102, the data source device 101 can determine a master device among the devices 103 in the device group 102; if the data source device 101 has a wireless connection with only one of the devices 103, the master device is determined internally by the device group 102. After determining the master device, the data source device 101 sends the first data to the master device, and forwards the first data to the slave device by the master device, where the slave device is a device other than the master device in the device group 102.
In this application, if the first data is audio data and the device 103 is an earphone, the data source device only needs to send the audio data to the main earphone, so that the problems of the prior art that the data source device needs to unicast the audio data to each earphone, which causes waste of air interface resources of the data source device, and the like are avoided, and the air interface resources of the data source device are saved.
The technical means shown in the present application will be described in detail below with reference to specific examples. It should be noted that the following embodiments may be combined with each other, and the description of the same or similar contents in different embodiments is not repeated.
Fig. 2 is a first flowchart of a data transmission method according to an embodiment of the present invention. As shown in fig. 2, the data transmission method includes:
s201: the data source device determines a first device in the device group, the first device and the data source device being wirelessly linked.
Optionally, the device group comprises at least two devices, wherein the at least two devices are wirelessly linked to each other.
In this application, the data source device and the at least two devices are wireless transceiving devices.
For example, the data source device may be a smartphone, a tablet computer, or the like.
For example, the at least two devices may be True Wireless Stereo (TWS) headsets, speakers, or the like.
Optionally, the first device may be a master device or a slave device.
Alternatively, when the first device is a master device, the first device may be a device with the largest residual amount in the device group or a device with the largest received power. The slave device is a device in the device group other than the master device.
In one possible design, the wireless link is a WIFI link.
S202: the data source device transmits first data to the first device.
In one possible design, the data source device sends the first data to the first device in a unicast manner, a multicast manner, or a broadcast manner.
Alternatively, the first data may be audio data, audio-visual data, or the like.
In this application, the first data includes at least one frame of data, each frame of data has a corresponding frame identifier, and the frame identifiers of the at least one frame of data are consecutive.
For example, the frame identifications of at least one frame of data may number consecutive maths 1, 2, 3, etc.
Specifically, the first data includes first frame data, second frame data, and third frame data, where the frame identifier of the first frame data may be "1", the frame identifier of the second frame data may be "2", and the frame identifier of the third frame data may be "3".
It should be noted that, in the data transmission mode based on the WIFI protocol, the frame identifier is a frame serial number of the WIFI protocol.
S203: when the first device is the master device, the first device sends a first reply to the data source device, and the first reply indicates that the first device receives the first data.
Optionally, after receiving the reply request message sent by the data source device, the first device sends a first reply to the data source device.
It should be noted that, after receiving the first data, the first device may Buffer at least one frame of data included in the first data into a Buffer (Buffer).
S204: the data source device receives a first reply sent by the first device.
Optionally, if the data source device does not receive the first reply, the data source device sends the first data to the first device again, where the first reply is an acknowledgement frame (e.g., ACK/BA, etc.).
Further, after receiving the first reply, the data source device continues to send the second data to the first device. Wherein the second data and the first data are consecutive.
Alternatively, the second data may be data of the same type as the first data, and may be, for example, audio data, or audio-video data.
S205: the first device sends first data to a slave device, and the slave device is a device except the first device in the device group.
S206: the slave device receives first data transmitted by the first device.
S207: the slave device sends a second reply to the first device after receiving the first data, the second reply indicating that the slave device received the first data.
S208: the first device receives a second reply sent from the device.
Optionally, if the first device does not receive the second reply, the first device sends the first data to the slave device again. Wherein the second reply is an acknowledgement frame (e.g., ACK/BA, etc.).
The data transmission method provided by the embodiment of the invention comprises the following steps: the data source device determines a first device in the device group, and the first device is wirelessly linked with the data source device; the data source equipment sends first data to first equipment; when the first device is the master device, the first device sends a first reply to the data source device, and the first reply indicates that the first device receives the first data; the data source equipment receives a first reply sent by the first equipment; the method comprises the steps that first data are sent to slave equipment by first equipment, and the slave equipment is equipment except the first equipment in an equipment group; receiving first data sent by a first device from a device; after receiving the first data, the slave device sends a second reply to the first device, wherein the second reply indicates that the first device receives the first data; the first device receives a second reply sent from the device. In the process, the data source equipment only needs the main equipment to send the first data, so that the air interface resource of the data source equipment is saved. Furthermore, the master device sends a first reply to the data device, and the slave device sends a second reply to the master device, so that the reliability of the first data transmission is ensured.
On the basis of the above embodiments, the data transmission method of the present application is further described below by taking an example in which two devices in a device group are included, and the two devices are a first headset and a second headset. Specifically, please refer to fig. 3.
Fig. 3 is a flowchart illustrating a second data transmission method according to an embodiment of the present invention. As shown in fig. 3, when the first earphone and the second earphone are wirelessly linked with the data source device, respectively, the data transmission method includes:
s301: the first earphone sends the state information of the first earphone to the data source equipment.
Optionally, before the first headset sends the status information of the first headset to the data source device, the method may further include: the data source device sends a first state request to the first earphone, wherein the first state request is used for requesting the first earphone to send the state information of the first earphone to the data source device.
S302: the second headset sends status information of the second headset to the data source device.
Optionally, before the second headset sends the status information of the second headset to the data source device, the method may further include: and the data source equipment sends a second state request to the second earphone, wherein the second state request is used for requesting the second earphone to send the state information of the second earphone to the data source equipment.
Optionally, the status information includes an identification of the device, a remaining power, a received power, and the like.
Alternatively, the status information has a frame format as shown below.
Figure BDA0002250464960000071
Specifically, the identifier of the status information is used to indicate that the frame data is the status information, and the identifier of the device is used to indicate the device corresponding to the status information.
Alternatively, the identification of the device may be N1, N2, N3, the device's, etc. number.
S303: and the data source equipment receives the state information of the first earphone and the state information of the second earphone, and determines the master equipment and the slave equipment in the equipment group according to the state information of the first earphone and the state information of the second earphone.
In one possible design, determining a master device and a slave device in a device group according to status information sent by at least two devices includes:
if the device with the largest residual amount in the state information sent by the at least two devices is determined to be the first device, determining the first device as a master device, and determining the devices except the first device in the device group as slave devices; alternatively, the first and second electrodes may be,
if the device with the largest receiving power in the state information sent by the at least two devices is determined to be the first device, the first device is determined to be the master device, and the devices in the device group except the master device are determined to be the slave devices.
Specifically, if the device group includes two devices, the two devices are earphones, and if the remaining power in the state information of the first earphone is greater than the remaining power in the state information of the second earphone, the determination of the first earphone is made as the master device; alternatively, the first and second electrodes may be,
and if the receiving power in the state information of the first earphone is greater than that in the state information of the second earphone, determining the first earphone as the main equipment.
S304: after the data source device determines that the master device in the device group is the first earphone, the data source device sends the designation information to the first earphone, and the designation information is used for designating the first earphone as the master device.
Alternatively, the specification information has a frame format as shown below.
Figure BDA0002250464960000081
And the switching identifier is used for indicating the equipment to execute switching operation. The designation identifier is used to indicate whether the data source device designates a device as a slave device or a master device. The master-slave identity indicates that a device is determined to be a slave or that a device is determined to be a master.
Alternatively, the specific identifier may be Request-0 or Request-1.
For example, Request of 0 indicates whether the data source device designates a device as a slave device or a master device; and the Request 1 indicates that the master device actively requests the data source device to perform master-slave switching.
Alternatively, the Master slave identity may be Master Role 0 or Master Role 1.
For example, Master roll-0 indicates that one device is determined as a slave device, and Master roll-1 indicates that one device is determined as a Master device.
Specifically, when the identifier Identification of the device in the designation information is 5, the designation identifier Request is 0, and the Master slave identifier Master roll is 1, the data source device is instructed to designate that the fifth device is determined as the Master device.
Specifically, when the identifier Identification of the device in the specification information is 5, the specification identifier Request is 1, and the Master slave identifier Master roll is 0, the fifth device (Master device) may be instructed to Request the data source device to determine the fifth device as a slave device.
S305: the first earphone receives the designated information and switches to the master device according to the designated information.
S306: the data source device sends first data to the first headset.
S307: the first headset sends a first reply to the data source device.
S308: the data source device receives a first reply sent by the first earphone.
S309: the first earphone forwards the first data to the second earphone, and the second earphone is a slave device.
Alternatively, the data source device may transmit designation information for designating the second headphone as the slave device to the slave device.
S310: the second earphone receives the first data sent by the first earphone.
S311: the second headset sends a second reply to the first headset after receiving the first data.
S312: the first earpiece receives a second reply sent from the device.
It should be noted that the execution processes of S306 to S312 are the same as the execution processes of S202 to S208, and are not described again here.
S313: the first earphone sends first switching request information to the data source equipment, and the first switching request information is used for requesting master-slave switching.
Alternatively, the first switching request information is the same as the frame format of the specified information in S303.
Specifically, when the identifier Identification of the device in the first switching Request information is 1, the identifier Request is 1, and the Master slave identifier Master roll is 0, the first headset (Master device) may be instructed to Request the data source device to determine the first headset as a slave device.
S314: and the data source equipment acquires the state information of at least two equipment in the equipment group again according to the first switching request information, and re-determines the master equipment and the slave equipment according to the state information of the at least two equipment.
It should be noted that the state information of the at least two devices obtained again is the current state information of the at least two devices.
Specifically, the re-determination of the master method at S314 may refer to the execution procedures of S301 to S305.
S315: and when the data source equipment determines that the second earphone is the master equipment, the data source equipment sends second switching information to the second earphone, and the second switching information is used for enabling the second earphone to carry out master-slave switching.
The identifier Identification of the device in the second handover information is 2, the specified identifier Request is 0, and the Master-slave identifier Master roll is 1.
In one possible design, the data source device actively sends first switching information to the master device, where the first switching information is used for the master device to perform master-slave switching.
Alternatively, the data source device may intermittently (e.g., periodically) obtain the status information of the first earphone and the status information of the second earphone. And if the data source equipment determines that the residual capacity or the receiving power of the second earphone is the maximum according to the state information of the first earphone and the state information of the second earphone, determining the second earphone as the current master equipment and determining the first earphone as the slave equipment. And then the data source equipment actively sends first switching information to the first earphone and actively sends second switching information to the second earphone.
S316: and the second earphone receives the second switching information and is switched to the master equipment by the slave equipment according to the second switching information.
S317: and the data source equipment sends first switching information to the first earphone, wherein the first switching information is used for enabling the first earphone to carry out master-slave switching.
The identifier Identification of the device in the first switching information is 1, the specified identifier Request is 0, and the Master-slave identifier Master roll is 0.
S318: the first earphone receives the first switching information and is switched to the slave equipment by the master equipment according to the first switching information.
The data transmission method provided by the embodiment of the invention comprises the following steps: the first earphone sends the state information of the first earphone to the data source equipment; the second earphone sends the state information of the second earphone to the data source equipment; the data source equipment receives the state information of the first earphone and the state information of the second earphone, and determines main equipment and slave equipment in the equipment group according to the state information of the first earphone and the state information of the second earphone; after the data source equipment determines that the main equipment in the equipment group is the first earphone, the data source equipment sends specified information to the first earphone, and the specified information is used for specifying the first earphone as the main equipment; the first earphone receives the specified information and switches to the main equipment according to the specified information; the data source equipment sends first data to the first earphone; the first earphone sends a first reply to the data source equipment; the data source equipment receives a first reply sent by the first earphone; the first earphone sends first data to a second earphone in the equipment group, and the second earphone is slave equipment; the second earphone receives first data sent by the first earphone; after receiving the first data, the second earphone sends a second reply to the first earphone; the first earphone receives a second reply sent by the slave equipment; the method comprises the steps that a first earphone sends first switching request information to data source equipment, wherein the first switching request information is used for requesting master-slave switching; the data source equipment acquires the state information of at least two pieces of equipment in the equipment group again according to the first switching request information, and re-determines the master equipment and the slave equipment according to the state information of the at least two pieces of equipment; when the data source equipment determines that the second earphone is the master equipment, the data source equipment sends second switching information to the second earphone, and the second switching information is used for enabling the second earphone to carry out master-slave switching; the second earphone receives the second switching information and switches the slave equipment into the master equipment according to the second switching information; the data source equipment sends first switching information to the first earphone, and the first switching information is used for enabling the first earphone to carry out master-slave switching; the first earphone receives the first switching information and is switched to the slave equipment by the master equipment according to the first switching information. In the process, the data source equipment sends the second switching information to the second earphone and sends the first switching information to the first earphone, so that the reliability of the first data transmission is effectively guaranteed.
On the basis of the above embodiment, taking an example that a slave device in a device group includes two devices, the two devices are a first earphone and a second earphone, and the first earphone and the second earphone listen to first data, the data transmission method described in this application is further described with reference to the embodiment of fig. 4, and specifically, please refer to fig. 4.
Fig. 4 is a third flowchart of a data transmission method according to an embodiment of the present invention. As shown in fig. 4, when the first earphone and the second earphone are wirelessly linked with the data source device, respectively, the data transmission method includes:
s401: a first headset in the device group sends state information of the first headset to the data source device.
S402: and the second earphone in the equipment group sends the state information of the second earphone to the data source equipment.
S403: and the data source equipment receives the state information corresponding to the first earphone and the second earphone respectively, and determines the master equipment and the slave equipment in the equipment group according to the state information corresponding to the first earphone and the second earphone respectively.
S404: after the data source device determines that the master device in the device group is the first earphone, the data source device sends the designation information to the first earphone, and the designation information is used for designating the first earphone as the master device.
S405: the first earphone receives the designated information and switches to the master device according to the designated information.
Specifically, the execution method of S401 to S405 corresponds to the execution process of S301 to S305. Here, the execution process of S401 to S405 is not described again.
S406: the data source device sends link information between the first headset and the data source device to the second headset.
Optionally, the link information includes a master device identifier, a MAC address, an IP address, key information, and the like.
Alternatively, the link information has a frame format as shown below.
Figure BDA0002250464960000111
S407: the second headset receives link information between the first headset and the data source device.
S408: the data source device sends first data to the first headset.
S409: the first headset sends a first reply to the data source device.
S410: the data source device receives a first reply sent by the first earphone.
S411: the second earphone listens for the first data according to the link information and then obtains the listening data.
Specifically, if the parsed frame in the listening data identifies a hole (e.g., only 1,3,5 is received), meaning that a data frame is not listened to, then a data request is sent to the first headset.
Specifically, the frame identifier here needs to be added by the upper layer application device, and is different from the frame sequence number of WiFi.
S412: and the second earphone sends a data request to the first earphone according to the interception data, wherein the data request carries a frame identifier, and the frame identifier exists in the first data and does not exist in the interception data.
It should be noted that, the frame identifier in the data request adds the frame identifier to the frame data for the upper-layer application of the data source device.
Optionally, the data request has a frame format as shown below.
Figure BDA0002250464960000121
The data request identifier is used for indicating that the frame data is a data request, the frame identifier is a frame identifier existing in the first data and not existing in the interception data, and the frame identifier table includes all the frame identifiers in the first data.
In practical applications, after combining the frame identifier with the frame identifier table, it can be determined that the frame identifier that is not received by the second earphone.
S413: the first earpiece receives the data request and determines a frame identification from the data request.
S414: and the first earphone sends frame data corresponding to the frame identification to the second earphone.
S415: the second headset sends a second reply to the first headset according to the frame data.
The data transmission method provided by the application comprises the following steps: a first earphone in the equipment group is arranged to send state information of the first earphone to data source equipment; a second earphone in the equipment group sends state information of the second earphone to the data source equipment; the data source equipment receives the state information corresponding to the first earphone and the second earphone respectively, and determines master equipment and slave equipment in the equipment group according to the state information corresponding to the first earphone and the second earphone respectively; after the data source equipment determines that the main equipment in the equipment group is the first earphone, the data source equipment sends specified information to the first earphone, and the specified information is used for specifying the first earphone as the main equipment; the first earphone receives the specified information and switches to the main equipment according to the specified information; the data source equipment sends the link information of the first earphone to the second earphone; the second earphone receives the link information of the first earphone; the data source equipment sends first data to the first earphone; the first earphone sends a first reply to the data source equipment; the data source equipment receives a first reply sent by the first earphone; the second earphone acquires interception data after intercepting the first data according to the link information; the second earphone sends a data request to the first earphone according to the interception data, wherein the data request carries a frame identifier, and the frame identifier exists in the first data and does not exist in the interception data; the first earphone receives the data request and determines a frame identifier according to the data request; the first earphone sends frame data corresponding to the frame identification to the second earphone; the second headset sends a second reply to the first headset according to the frame data. In the above process, the data source device sends the first data to the first earphone (master earphone), and the second earphone (slave earphone) listens to the first data, thereby reducing the bandwidth of the air interface of the first earphone.
Based on the above embodiment of fig. 2, the following takes two devices in a device group as an example, where the two devices are a first headset and a second headset, and the data transmission method in the present application is further described in detail. Specifically, please refer to fig. 5.
Fig. 5 is a fourth flowchart illustrating a data transmission method according to an embodiment of the present invention. As shown in fig. 5, when the first earphone is wirelessly linked with the data source device, the second earphone is not wirelessly linked with the data source device, and the first earphone and the second earphone are wirelessly linked, the data transmission method includes:
s501: the first headset sends the state information of the first headset and link information between the first headset and the data source device to the second headset.
Wherein the link information is link information between the first earphone and the data source device. The content is the same as the information mentioned in S406, and is not described here again.
S502: and the second earphone receives the state information of the first earphone and the link information between the first earphone and the data source equipment, and determines that the second earphone is the slave equipment according to the state information of the first earphone and the state information of the second earphone.
Optionally, when the remaining capacity of the state information of the second headset is less than the remaining capacity of the first headset, or the receiving power of the state information of the second headset is less than the receiving power of the first headset, the second headset is determined as the slave device.
Optionally, if the remaining power of the state information of the second headset is less than the preset remaining power, or the receiving power of the state information of the second headset is less than the preset receiving power, the second headset is determined as the slave device.
S503: the second headset sends the state information of the second headset to the first headset.
S504: and the first earphone receives the state information of the second earphone, and determines the first earphone as the main equipment according to the state information of the first earphone and the state information of the second earphone.
Optionally, when the remaining capacity of the state information of the second headset is less than the remaining capacity of the first headset, or the receiving power of the state information of the second headset is less than the receiving power of the first headset, the first headset is determined as the master device.
Optionally, if the remaining power of the state information of the first headset is greater than the preset remaining power, or the receiving power of the state information of the first headset is greater than the preset receiving power, the first headset is determined as the master device.
S505: the data source device sends first data to the first headset.
S506: the first headset sends a first reply to the data source device.
S507: the data source device receives a first reply sent by the first earphone.
S508: the first headset transmits first data to the second headset.
S509: the second earphone receives the first data sent by the first earphone.
S510: the second headset sends a second reply to the first headset after receiving the first data.
S511: and the first earphone receives a second reply sent by the second earphone.
The execution methods of S505 to S511 are the same as those of S202 to S208. Here, the execution process of S505 to S511 will not be described again.
S512: and the first earphone performs master-slave switching according to the state information of the first earphone and the state information of the second earphone.
Specifically, in S512, if the first earphone determines that the remaining power of the state information of the first earphone is less than the remaining power of the state information of the second earphone, the first earphone is switched from the master device to the slave device. Or, if the first earphone determines that the receiving power of the state information of the first earphone is smaller than that of the state information of the second earphone, the first earphone is switched from the master device to the slave device.
S513: and the first earphone sends third switching information to the second earphone, and the third switching information is used for indicating the second earphone to carry out master-slave switching.
Specifically, the third switching information is used to instruct the second headset to be switched from the slave device to the master device.
Optionally, the second earphone may obtain the state information of the first earphone, and automatically perform master-slave switching according to the state information of the first earphone and the state information of the second earphone. For example, when the second headset determines that the remaining capacity of the state information of the first headset is less than the remaining capacity of the state information of the second headset, the second headset may be automatically switched from the slave device to the master device. Or if the second earphone determines that the receiving power of the state information of the first earphone is smaller than that of the state information of the second earphone, the second earphone is automatically switched from the slave equipment to the master equipment.
Optionally, in the negotiation process of the master device and the slave device in S501-S504, a master-slave automatic switching cycle (for example, 100ms) may be negotiated, each cycle automatically switches the master-slave identity, the master device is switched into the slave device, and the slave device is switched into the master device, without going through the switching process of the master device and the slave device.
S514: the data source device sends the second data to the first headset.
Specifically, since the first earphone is not the master device, the first earphone does not need to send a reply to the data source device, and at this time, the data source device cannot confirm whether the first earphone correctly receives the data, so that the data received by the first earphone is forwarded to the first earphone by the second earphone (master device).
S515: the second headset listens for second data according to the link information.
S516: the second headset sends a third reply to the data source device.
The third reply is an acknowledgement frame (which may be an ACK, BA, etc. frame).
S517: the second headset transmits the sensed second data to the first headset.
S518: the first headset sends a fourth reply to the second headset after receiving the second data.
S519: the second headset receives the fourth reply sent by the first headset.
In the data transmission method provided by the embodiment of the present invention, when the first earphone is wirelessly linked with the data source device, the second earphone is not wirelessly linked with the data source device, and the first earphone and the second earphone are wirelessly linked, the data source device sends the first data to the first earphone, and if the first earphone is a master device, the first earphone receives the first data and sends the first data to the second earphone. The first earphone sends a first reply to the data source equipment after receiving the first data, so that the first earphone is guaranteed to correctly receive the first data. And after receiving the first data, the second earphone sends a second reply to the first earphone, so that the second earphone is guaranteed to correctly receive the first data. Further, after the first earphone is switched to the slave device and the second earphone is switched to the master device, the data source device sends second data to the first earphone, and the second earphone listens for the second data and forwards the second data to the first earphone. And after the second earphone listens to the second data, the second earphone sends a third reply to the data source equipment, so that the second earphone is guaranteed to correctly receive the second data. And after receiving the second data sent by the second earphone, the first earphone sends a fourth reply to the second earphone, so that the first earphone is guaranteed to correctly receive the second data. In addition, in the above process, the data source device sends data to the first earphone, which reduces the air interface resource for sending data by the data source device.
On the basis of the above embodiment, taking an example that two devices in a device group are used, the two devices are a first earphone and a second earphone, and a slave device in the first earphone and the second earphone listens for first data, the data transmission method described in this application is further described with reference to the embodiment of fig. 6, specifically, please refer to fig. 6.
Fig. 6 is a fifth flowchart illustrating a data transmission method according to an embodiment of the present invention. As shown in fig. 6, the first earphone and the data source device have a wireless link, and the second earphone and the data source device do not have a wireless link, the data transmission method includes:
s601: the first headset sends the state information of the first headset and link information between the first headset and the data source device to the second headset.
S602: and the second earphone receives the state information of the first earphone and the link information between the first earphone and the data source equipment, and determines that the second earphone is the slave equipment according to the state information of the first earphone and the state information of the second earphone.
S603: the second headset sends the state information of the second headset to the first headset.
S604: and the first earphone receives the state information of the second earphone, and determines the first earphone as the main equipment according to the state information of the first earphone and the state information of the second earphone.
Specifically, the execution method of S601-S604 corresponds to the execution process of S501-S504. Here, the execution process of S501-S504 is not described again.
S605: the data source device sends first data to the first headset.
S606: the first headset sends a first reply to the data source device.
S607: the data source device receives a first reply sent by the first earphone.
S608: the second earphone listens for the first data according to the link information and then obtains the listening data.
S609: and the second earphone sends a data request to the first earphone according to the interception data, wherein the data request carries a frame identifier, and the frame identifier exists in the first data and does not exist in the interception data.
S610: the first earpiece receives the data request and determines a frame identification from the data request.
S611: and the first earphone sends frame data corresponding to the frame identification to the second earphone.
S612: the second headset sends a second reply to the first headset according to the frame data.
Specifically, the execution method of S608-S612 corresponds to the same execution process of S411-S415. Here, the execution process of S608 to S612 will not be described in detail.
In the data transmission method provided by the embodiment of the invention, when the first earphone is wirelessly linked with the data source device, the second earphone is not wirelessly linked with the data source device, and the first earphone and the second earphone are wirelessly linked, the first earphone sends link information between the first earphone and the data source device to the second earphone. The data source equipment sends first data to the first earphone, and if the first earphone is the master equipment, the first earphone receives the first data and sends a first reply to the data source equipment, so that the first earphone is guaranteed to correctly receive the first data. The second earphone acquires interception data after intercepting the first data according to the link information; the second earphone sends a data request to the first earphone according to the interception data, wherein the data request carries a frame identifier, and the frame identifier exists in the first data and does not exist in the interception data; the first earphone receives the data request and determines a frame identifier according to the data request; the first earphone sends frame data corresponding to the frame identification to the second earphone; and the second earphone sends a second reply to the first earphone according to the frame data, so that the second earphone is ensured to correctly receive the first data. In the process, the data source equipment sends the first data to the first earphone (the master earphone), and the second earphone (the slave earphone) listens to the first data, so that the air interface bandwidth when the first earphone forwards the data is reduced.
Based on the embodiment of fig. 4, a data transmission method among the data source device, the first earphone and the second earphone is described below with reference to fig. 7 by taking an example that the first data includes 2 frames of data.
Fig. 7 is a frame transmission diagram of a data transmission method according to an embodiment of the present invention. As shown in fig. 7, for example, the first headset is a master device, the second headset is a slave device, and the first data sent by the data source device to the first headset includes first frame data and second frame data. The first earphone receives the first frame data and the second frame data. The second headphone listens to the first frame data and the second frame data, and listens to only the first frame data. The second earphone sends a data request to the first earphone, wherein the data request carries a frame identifier of second frame data; and after the first earphone receives the data request, forwarding the second frame data to the second earphone according to the frame identifier of the second frame data so that the second earphone receives the second frame data.
Based on the embodiment of fig. 4, a data transmission method among the data source device, the first earphone and the second earphone is described below with reference to fig. 8 by taking an example that the first data includes 4 frames of data.
Fig. 8 is a frame transmission diagram illustrating a data transmission method according to an embodiment of the present invention. As shown in fig. 8, for example, the first earphone is a master device, the second earphone is a slave device, and the first data transmitted by the data source device to the first earphone includes first frame data, second frame data, third frame data, and fourth frame data. The first earphone receives first frame data, second frame data, third frame data, and fourth frame data. The second headphone listens to the first frame data, the second frame data, the third frame data, and the fourth frame data, and listens to only the first frame data and the fourth frame data. And the second earphone sends a data request to the first earphone, wherein the data request carries the frame identifier of the second frame data and the frame identifier of the third frame data. And after receiving the data request, the first earphone forwards the second frame data and the third frame data to the second earphone according to the frame identifier of the second frame data and the frame identifier of the third frame data, so that the second earphone receives the second frame data and the third frame data.
Specifically, in fig. 7-8, the solid line boxes indicate transmitted data, the dashed line boxes indicate received or intercepted data, and the X flag indicates that no data was intercepted.
It should be noted that the frame transmission shown in fig. 7 and 8 can be applied to a process in which the slave listens to data and requests the master to forward the first data that the slave does not listen to.
In this application, the frame transmission manner between the data source device and at least two devices in the device group in the embodiments of fig. 2 to 8 is based on any one of WIFI protocols (for example, through an ACTION frame transmission manner). Specifically, the application adds a vendor specific Action frame (vendor specific Action frame), and the vendor specific Action frame is applied to the data transmission system in the application, and has the following format:
Figure BDA0002250464960000181
fig. 9 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention. The data transmission apparatus 10 may be applied to a data source device in a data transmission system, the data transmission system further includes a device group, the device group includes at least two devices, and the at least two devices are wirelessly linked in pairs, the data transmission apparatus 10 includes: a determination module 11, a sending module 12 and a receiving module 13, wherein,
the determining module 11 is configured to determine a first device in the device group, where the first device is wirelessly linked with the data source device;
the sending module 12 is configured to send first data to a first device, so that the first device sends the first data to a slave device when the first device is a master device, where the master device is a master device in the device group, and the slave device is a device in the device group other than the master device;
the receiving module 13 is configured to receive a first reply sent by a master device, where the first reply indicates that the master device receives the first data.
The apparatus provided in this embodiment may be configured to execute the technical solution that may be executed by the data source device in the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
In one possible design, the sending module 12 is specifically configured to:
and sending the first data to the first equipment in a unicast mode, a multicast mode or a broadcast mode.
In another possible design, the receiving module 13 is further configured to receive status information sent by at least two devices in the device group before the sending module 12 sends the first data to the first device, where the data source device is wirelessly linked with the at least two devices;
the determining module 11 is further configured to determine a master device and a slave device in the device group according to the status information sent by the at least two devices.
In another possible design, the determining module 11 is specifically configured to:
if the device with the largest residual electric quantity in the state information of the at least two devices is determined to be the first device, determining the first device to be the master device, and determining the devices except the first device in the device group to be the slave devices; alternatively, the first and second electrodes may be,
if the device with the largest receiving power in the state information of the at least two devices is determined to be the first device, determining the first device to be the master device, and determining the devices except the first device in the device group to be the slave devices.
In another possible design, the illustrated sending module 12 is further configured to:
and according to the self-corresponding state information of the at least two devices, after the master device and the slave device are determined in the device group, sending link information of the master device to the slave device so that the slave device listens to the first data according to the link information.
In another possible design, the receiving module 13 is further configured to receive first handover request information sent by a master device, where the first handover request information is used to request for performing master-slave handover;
the sending module 12 is further configured to passively send first switching information to the master device according to the first switching request information, where the first switching information is used to enable the master device to perform master-slave switching.
In another possible design, the sending module 12 is further configured to actively send first switching information to the master device, where the first switching information is used to enable the master device to perform master-slave switching.
In another possible design, the wireless link is a WIFI link.
In another possible design, the data source device and the at least two devices are wireless transceiver devices.
Fig. 10 is a first schematic structural diagram of another data transmission device according to an embodiment of the present invention. As shown in fig. 10, the data transmission apparatus 20 is applied to a first device in a device group in a data transmission system, where the device group includes at least two devices, and the at least two devices are wirelessly linked two by two, the data transmission system further includes a data source device, and the data transmission apparatus 20 includes: a receiving module 21, a sending module 22, wherein,
the receiving module 21 is configured to receive first data sent by a data source device, where the first device is wirelessly linked with the data source device;
the sending module 22 is configured to send a first reply to the data source device when the first device is a master device, where the first reply indicates that the first device receives the first data;
the sending module 22 is further configured to send the first data to a slave device in the device group, where the slave device is a device in the device group other than the first device;
the receiving module 21 is further configured to receive a second reply sent by the slave device, where the second reply indicates that the slave device receives the first data.
The apparatus provided in this embodiment may be configured to execute the technical solution that may be executed by the first device in the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
In one possible design, the sending module 22 is further configured to, before the sending module 22 sends the first data to the slave devices in the device group,
sending state information of first equipment to the data source equipment, so that the data source equipment determines the first equipment as master equipment according to the state information of the first equipment and the state information of slave equipment;
wherein the at least two devices are wirelessly linked with the data source device, respectively.
In one possible design, the sending module 22 is further configured to send link information between the first device and the data source device to devices in the device group other than the first device, where the devices in the device group other than the first device and the data source device have no wireless connection.
In a possible design, the sending module 22 is further configured to send first handover request information to the data source device, where the first handover request information is used to request a master-slave handover;
the receiving module 22 is further configured to receive first switching information sent by the data source device according to the first switching request information, where the first switching information is used to instruct the first device to perform master-slave switching.
In a possible design, the receiving module 21 is further configured to receive the first data sent by a master device when the first device is a slave device;
the sending module 22 is further configured to send the second reply to the master device according to the received first data.
In one possible design, the receiving module 21 is further configured to:
and receiving link information between the main equipment and the data source equipment, which is sent by the data source equipment, wherein the at least two equipment are respectively in wireless link with the data source equipment.
In one possible design, the sending module 22 is further configured to:
and sending link information between the first device and the data source device to devices in the device group except the first device, wherein the devices in the device group except the first device and the data source device have no wireless link.
In one possible design, the sending module 22 is further configured to:
and sending the state information of the first device to the data source device, so that the data source device determines the first device as a slave device according to the state information of the first device and the state information of the devices in the device group except the first device, wherein the devices in the device group except the first device are in wireless connection with the data source device.
In one possible design, the receiving module 21 is further configured to:
and receiving second switching information sent by data source equipment, wherein the second switching information is used for enabling the first equipment to carry out master-slave switching.
In one possible design, the receiving module 21 is further configured to:
and receiving third switching information sent by the master device, wherein the third switching information is used for indicating the first device to perform master-slave switching.
In one possible design, the wireless link is a WIFI link.
In one possible design, the data source device and the at least two devices are wireless transceiver devices.
Fig. 11 is a schematic structural diagram of another data transmission device according to an embodiment of the present invention. On the basis of fig. 10, as shown in fig. 11, the data transmission device 20 further includes: a determination module 23 determines, among other things,
the sending module 22 is further configured to send, to the slave device, state information of the first device before the receiving module 21 receives the first data sent by the data source device;
the receiving module 21 is further configured to receive status information of the slave device sent by the slave device;
the determining module 23 is configured to determine, according to the state information of the first device and the state information of the slave device, that the first device is a master device, the first device is wirelessly linked with the data source device, and the slave device is wirelessly linked with the data source device.
The apparatus provided in this embodiment may be configured to implement the technical solution that may be executed by the first device in the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
In a possible design, the receiving module 21 is further configured to receive status information of the master device sent by the master device;
the determining module 23 is further configured to determine, according to the state information of the master device and the state information of the first device, a slave device from the first device, where devices in the device group other than the first device are wirelessly connected to the data source device.
Fig. 12 is a schematic structural diagram of another data transmission apparatus according to an embodiment of the present invention. On the basis of fig. 11, the data transmission device 20 shown in fig. 12 further includes: a switching module 24 for, among other things,
the switching module 24 is configured to perform master-slave switching according to the state information of the first device and the state information of the slave device;
the sending module is configured to send third switching information to the slave device, where the third switching information is used to instruct the slave device to perform master-slave switching.
The apparatus provided in this embodiment may be configured to execute the technical solution that may be executed by the first device in the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 13 is a fourth schematic structural diagram of another data transmission apparatus according to an embodiment of the present invention. On the basis of fig. 12, as shown in fig. 13, the data transmission device 20 further includes: the interception module 25, wherein,
the interception module 25 is configured to, when the first device is a slave device, intercept the first data sent by the data source device to the master device to obtain intercepted data;
the sending module 22 is further configured to send a data request to a master device according to the intercepted data, where the data request carries a frame identifier, and the frame identifier exists in the first data and does not exist in the intercepted data;
the receiving module 21 is further configured to receive frame data corresponding to the frame identifier sent by the master device according to the frame identifier;
the sending module 22 is further configured to send a second reply to the master device according to the frame data corresponding to the frame identifier.
The apparatus provided in this embodiment may be configured to execute the technical solution that may be executed by the first device in the foregoing method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 14 is a schematic hardware structure diagram of a data transmission device according to the present application. Referring to fig. 14, the communication device 30 includes: a memory 31, a processor 32, a receiver 33, and a transmitter 34, wherein the memory 31 and the processor 32 are in communication; illustratively, the memory 31, the processor 32, the transceiver 33 and the transmitter 34 may communicate via a communication bus 35, the memory 31 being used for storing a computer program, the processor 32 executing the computer program to implement the above-mentioned data transmission method. For example, processor 32 performs the relevant steps performed by the data source device in the above-described method embodiments.
Fig. 15 is a schematic diagram of a hardware structure of another data transmission device provided in the present application. Referring to fig. 14, the data transmission device 40 includes: a memory 41, a processor 42, a receiver 43, a transmitter 44 and a listener 45, wherein the memory 41 and the processor 42 are in communication; illustratively, the memory 41, the processor 42, the receiver 43, the transmitter 44 and the listener 45 may communicate via a communication bus 46, the memory 41 being configured to store a computer program, the processor 42 executing the computer program to implement the above-mentioned data transmission method. For example, the processor 42 performs the relevant steps performed by the first device in the above-described method embodiments.
All or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (magnetic tape), floppy disk (floppy disk), optical disk (optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.
In the present application, the terms "include" and variations thereof may refer to non-limiting inclusions; the term "or" and variations thereof may mean "and/or". The terms "first," "second," and the like in this application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. In the present application, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "three types" generally indicates that the former and latter associated objects are in an "or" relationship.

Claims (31)

1. A data transmission method is applied to data source equipment in a data transmission system, the data transmission system further comprises an equipment group, the equipment group comprises at least two pieces of equipment, and the at least two pieces of equipment are in wireless link with each other, and the method comprises the following steps:
the data source device determines a first device in the device group, and the first device and the data source device are in wireless link;
the data source device sends first data to a first device, so that the first device forwards the first data to a slave device when the first device is a master device, wherein the master device is a master device in the device group, and the slave device is a device in the device group except the master device;
the data source device receives a first reply sent by a master device, wherein the first reply indicates that the master device receives the first data.
2. The method of claim 1, wherein the data source device sends the first data to the master device, comprising:
and sending the first data to the first equipment in a unicast mode, a multicast mode or a broadcast mode.
3. The method of claim 1, wherein before the data source device sends the first data to the first device when the data source device is wirelessly linked with the at least two devices, further comprising:
receiving state information sent by at least two devices in the device group;
and determining the master equipment and the slave equipment in the equipment group according to the state information sent by the at least two pieces of equipment.
4. The method of claim 3, wherein the determining the master device and the slave device in the device group according to the status information sent by the at least two devices comprises:
if the device with the largest residual electric quantity in the state information of the at least two devices is determined to be the first device, determining the first device to be the master device, and determining the devices except the first device in the device group to be the slave devices; alternatively, the first and second electrodes may be,
if the device with the largest receiving power in the state information of the at least two devices is determined to be the first device, determining the first device to be the master device, and determining the devices except the first device in the device group to be the slave devices.
5. The method according to claim 3, wherein after determining the master device and the slave device in the device group according to the status information corresponding to each of the at least two devices, the method further comprises:
and sending link information between the master device and the data source device to the slave device so that the slave device listens to the first data according to the link information.
6. The method of claim 1, when the data source device has a wireless link with the at least two devices, further comprising:
receiving first switching request information sent by a master device, wherein the first switching request information is used for requesting master-slave switching;
and sending first switching information to the main equipment according to the first switching request information, wherein the first switching information is used for enabling the main equipment to carry out master-slave switching.
7. The method of claim 1, further comprising:
and actively sending first switching information to the main equipment, wherein the first switching information is used for enabling the main equipment to carry out master-slave switching.
8. The method of claim 6 or 7, further comprising:
and sending second switching information to the slave equipment, wherein the second switching information is used for enabling the slave equipment to carry out master-slave switching.
9. The method of any one of claims 1 to 8, wherein the wireless link is a WIFI link.
10. The method of claim 9, wherein the data source device, the at least two devices are wireless transceiver devices.
11. A data transmission method, applied to a first device in a device group in a data transmission system, where the device group includes at least two devices, and the at least two devices are wirelessly linked in pairs, the data transmission system further includes a data source device, and the method includes:
when the first device is a master device, the first device receives first data sent by a data source device, and the first device is wirelessly linked with the data source device;
the first device sends a first reply to the data source device, wherein the first reply indicates that the first device receives the first data;
the first device forwards the first data to slave devices in the device group, wherein the slave devices are devices in the device group except the first device;
the first device receives a second reply sent by the slave device, the second reply indicating that the slave device received the first data.
12. The method of claim 11, wherein before the first device sends the first data to the slave devices in the device group when the at least two devices are wirelessly linked with the data source device respectively, further comprising:
and sending the state information of the first equipment to the data source equipment, so that the data source equipment determines the first equipment as the master equipment according to the state information of the first equipment and the state information of the slave equipment.
13. The method of claim 11, wherein when the devices in the device group other than the first device are not wirelessly linked with the data source device, before the first device receives the first data sent by the data source device, the method further comprises:
transmitting status information of the first device to the slave device;
receiving state information of the slave device sent by the slave device;
and determining the first equipment as a master equipment according to the state information of the first equipment and the state information of the slave equipment.
14. The method of claim 13, further comprising:
and sending link information between the first device and the data source device to devices in the device group except the first device.
15. The method of claim 12, further comprising:
sending first switching request information to the data source equipment, wherein the first switching request information is used for requesting master-slave switching;
and receiving first switching information sent by the data source equipment according to the first switching request information, wherein the first switching information is used for indicating the first equipment to carry out master-slave switching.
16. The method of claim 12, further comprising:
and receiving first switching information actively sent by the data source equipment, wherein the first switching information is used for indicating the first equipment to carry out master-slave switching.
17. The method of claim 13, further comprising:
performing master-slave switching according to the state information of the first equipment and the state information of the slave equipment;
and sending third switching information to the slave equipment, wherein the third switching information is used for indicating the slave equipment to carry out master-slave switching.
18. The method of claim 11, further comprising:
when the first equipment is slave equipment, receiving the first data sent by master equipment;
and sending the second reply to the main equipment according to the received first data.
19. The method of claim 18, wherein when the at least two devices are wirelessly linked to the data source device, further comprising:
and sending the state information of the first device to the data source device, so that the data source device determines the first device as a slave device according to the state information of the first device and the state information of devices in the device group except the first device.
20. The method of claim 19, further comprising:
and receiving link information between the main equipment and the data source equipment, which is sent by the data source equipment.
21. The method of claim 18, wherein when the devices in the device group other than the first device are not wirelessly linked to the data source device, further comprising:
receiving state information of the main equipment sent by the main equipment;
and determining the first equipment as the slave equipment according to the state information of the main equipment and the state information of the first equipment.
22. The method of claim 21, further comprising:
and sending link information between the first equipment and the data source equipment to the equipment except the first equipment in the equipment group.
23. The method of claim 19, further comprising:
and receiving second switching information sent by data source equipment, wherein the second switching information is used for enabling the first equipment to carry out master-slave switching.
24. The method of claim 21, further comprising:
and receiving third switching information sent by the master device, wherein the third switching information is used for indicating the first device to perform master-slave switching.
25. The method of claim 11, further comprising:
when the first device is a slave device, the first device acquires interception data after intercepting the first data sent to a master device by the data source device;
the first device sends a data request to a main device according to the interception data, wherein the data request carries a frame identifier, and the frame identifier exists in the first data and does not exist in the interception data;
receiving frame data corresponding to the frame identifier sent by the main equipment according to the frame identifier;
and sending a second reply to the master device according to the frame data corresponding to the frame identifier.
26. The method of any one of claims 10 to 25, wherein the wireless link is a WIFI link.
27. The method of claim 26, wherein the data source device and the at least two devices are wireless transceiver devices.
28. A data transmission device is applied to data source equipment in a data transmission system, the data transmission system further comprises an equipment group, the equipment group comprises at least two pieces of equipment, and every two pieces of equipment are in wireless link, the device comprises: a determining module, a sending module and a receiving module, wherein,
the determining module is used for determining a first device in the device group, and the first device is wirelessly linked with the data source device;
the sending module is configured to send first data to a first device, so that the first device forwards the first data to a slave device when the first device is a master device, where the master device is a master device in the device group, and the slave device is a device in the device group other than the master device;
the receiving module is configured to receive a first reply sent by a master device, where the first reply indicates that the master device receives the first data.
29. A data transmission apparatus, applied to a first device in a device group in a data transmission system, where the device group includes at least two devices, and each two of the at least two devices are wirelessly linked, the data transmission system further includes a data source device, and the apparatus includes: a receiving module and a sending module, wherein,
the receiving module is used for receiving first data sent by data source equipment;
the sending module is configured to send a first reply to the data source device when the first device is a master device, where the first reply indicates that the first device receives the first data;
the sending module is further configured to send the first data to a slave device, where the slave device is a device of the device group other than the first device;
the receiving module is further configured to receive a second reply sent by the slave device, where the second reply indicates that the slave device receives the first data.
30. A data transmission device, comprising a memory and a processor,
the processor executes program instructions in the memory for implementing the data transmission method of any one of claims 1-10.
31. A data transmission device, comprising a memory and a processor,
the processor executes program instructions in the memory for implementing the data transmission method of any one of claims 11-27.
CN201911032141.0A 2019-10-28 2019-10-28 Data transmission method and device Active CN110769445B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911032141.0A CN110769445B (en) 2019-10-28 2019-10-28 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911032141.0A CN110769445B (en) 2019-10-28 2019-10-28 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN110769445A true CN110769445A (en) 2020-02-07
CN110769445B CN110769445B (en) 2023-05-26

Family

ID=69332958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911032141.0A Active CN110769445B (en) 2019-10-28 2019-10-28 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN110769445B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447603A (en) * 2020-06-18 2020-07-24 展讯通信(上海)有限公司 Data transmission method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107894881A (en) * 2017-10-18 2018-04-10 恒玄科技(上海)有限公司 The method that principal and subordinate link switching, conversation monitoring and the Mike of bluetooth earphone switch
CN108323246A (en) * 2018-01-25 2018-07-24 深圳市为通博科技有限责任公司 Network-building method, chip and Radio Network System
CN109314813A (en) * 2018-04-28 2019-02-05 万魔声学科技有限公司 Earphone wireless communications method, main earphone, from earphone and earphone system
CN109922540A (en) * 2019-03-01 2019-06-21 展讯通信(上海)有限公司 Wireless transmitting-receiving equipments group communication method, equipment group, system and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107894881A (en) * 2017-10-18 2018-04-10 恒玄科技(上海)有限公司 The method that principal and subordinate link switching, conversation monitoring and the Mike of bluetooth earphone switch
CN108323246A (en) * 2018-01-25 2018-07-24 深圳市为通博科技有限责任公司 Network-building method, chip and Radio Network System
CN109314813A (en) * 2018-04-28 2019-02-05 万魔声学科技有限公司 Earphone wireless communications method, main earphone, from earphone and earphone system
CN109922540A (en) * 2019-03-01 2019-06-21 展讯通信(上海)有限公司 Wireless transmitting-receiving equipments group communication method, equipment group, system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447603A (en) * 2020-06-18 2020-07-24 展讯通信(上海)有限公司 Data transmission method and device

Also Published As

Publication number Publication date
CN110769445B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
CN110831246B (en) Data transmission method and device
US11246022B2 (en) Bluetooth headset device and communication method for the same
CN109391926B (en) Data processing method of wireless audio equipment and wireless audio equipment
WO2017000373A1 (en) Resource scheduling method, terminal, base station and system
CN111464993B (en) Bluetooth headset pairing method and wireless headset for Bluetooth headset
US20170325076A1 (en) Base station, user terminal and apparatus
WO2016202227A1 (en) Selection and notification method and device for layer 2 link identifier
AU2015401354A1 (en) Enhanced multimedia broadcast and multicast service eMBMS system and management method therefor
CN112994854A (en) Data receiving method, device and equipment of Bluetooth headset and storage medium
EP4030846A1 (en) Method and device for multicasting network slice
EP3294035B1 (en) Method and device for establishing a bearer
JP2023536000A (en) Method and apparatus for multicast and broadcast services
WO2021212593A1 (en) Qos control method and apparatus, and readable storage medium
CN110769445B (en) Data transmission method and device
KR102333306B1 (en) Data communication method and system, electronic device, chip and storage medium
CN110798861B (en) Method for sending system information, CU entity and DU entity
CN114845280A (en) Data transmission method and device, electronic equipment and storage medium
WO2018040977A1 (en) Data transmission method and network device
CN112533154B (en) Data processing method, device and storage medium
CN111586666B (en) Device discovery method, device and system
WO2020238684A1 (en) Communication method, apparatus and device, and computer-readable storage medium
CN114786095A (en) Audio sharing control method and device, earphone equipment and storage medium
EP3843495B1 (en) Communication method and apparatus, and device
CN110858965B (en) Data transmission method and device, terminal and storage medium
CN107006065A (en) A kind of method and device for transmitting data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant