CN112911559B - Wireless data communication method, system, equipment and storage medium - Google Patents

Wireless data communication method, system, equipment and storage medium Download PDF

Info

Publication number
CN112911559B
CN112911559B CN202110071059.XA CN202110071059A CN112911559B CN 112911559 B CN112911559 B CN 112911559B CN 202110071059 A CN202110071059 A CN 202110071059A CN 112911559 B CN112911559 B CN 112911559B
Authority
CN
China
Prior art keywords
wireless communication
time
communication device
data
layer
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.)
Active
Application number
CN202110071059.XA
Other languages
Chinese (zh)
Other versions
CN112911559A (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.)
Beijing Sabine Technologies Ltd
Original Assignee
Beijing Sabine Technologies 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 Beijing Sabine Technologies Ltd filed Critical Beijing Sabine Technologies Ltd
Priority to CN202110071059.XA priority Critical patent/CN112911559B/en
Publication of CN112911559A publication Critical patent/CN112911559A/en
Application granted granted Critical
Publication of CN112911559B publication Critical patent/CN112911559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/004Synchronisation arrangements compensating for timing error of reception due to propagation delay
    • H04W56/005Synchronisation arrangements compensating for timing error of reception due to propagation delay compensating for timing error by adjustment in the receiver
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/0055Synchronisation arrangements determining timing error of reception due to propagation delay

Abstract

The embodiment of the invention provides a wireless data communication method, a system, equipment and a storage medium, which are used for establishing a communication relation between first wireless communication equipment and second wireless communication equipment based on an SWISS communication protocol. The first wireless communication device and the second wireless communication device are divided into a host computer and a slave computer through whether SWISS communication service is registered or not, and different interaction authorities are respectively given to the host computer and the slave computer based on role division. After the master machine and the slave machine are successfully paired, the SWISS communication protocol connection is established based on the RFCOMM channel, the master machine can provide SWISS communication service through registering SWISS communication service for the slave machine to discover, and receives a request initiated by the slave machine in the connection process; the slave is not registered with the SWISS communication service, finds the host with the SWISS communication service through the SDP, and initiates a connection request to the host in the connection process. Therefore, the communication interaction of data flow, control flow and state flow is realized between the host and the slave.

Description

Wireless data communication method, system, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a wireless data communication method, a wireless data communication system, wireless data communication equipment and a storage medium.
Background
The Bluetooth technology belongs to a short-distance and low-cost wireless connection technology, adopts a low-energy-consumption radio communication technology to realize voice, data and video transmission, and can effectively simplify the communication between mobile communication devices which are easy to carry.
At present, the types of mobile communication devices supporting the bluetooth technology are diversified, and the mobile communication devices are not limited to palm computers, notebook computers, mobile smart phones and the like, but also can be applied to earphones, handles, watches and the like. And the need for bluetooth communication between master and slave arises. However, the existing bluetooth communication protocol cannot realize role distinction between the master and the slave in bluetooth communication, and cannot realize corresponding interaction permission given based on the role distinction between the master and the slave.
Disclosure of Invention
Therefore, embodiments of the present invention provide a wireless data communication method, system, device, and storage medium, which solve the technical problems that the existing bluetooth communication protocol cannot implement role differentiation between a master and a slave in bluetooth communication, cannot implement assignment of corresponding interaction rights based on different role differentiations, and the like.
In order to achieve the above object, the embodiments of the present invention provide the following technical solutions:
in a first aspect, an embodiment of the present invention provides a wireless data communication method, where the communication method includes: establishing a communication relationship between the first wireless communication device and the second wireless communication device based on the SWISS communication protocol; registering the SWISS communication service as a master in the first wireless communication equipment, and not registering the SWISS communication service as a slave in the second wireless communication equipment; discovering, at the first wireless communication device, the second wireless communication device in proximity based on SDP and completing pairing; receiving, at the first wireless communication device, an SWISS communication service request of the second wireless communication device that is successfully paired, and establishing a SWISS communication protocol connection based on an RFCOMM channel; and realizing communication interaction of data flow, control flow and state flow between the first wireless communication equipment and the second wireless communication equipment.
Preferably, the communication method further includes: and actively initiating a disconnection request by the first wireless communication device or the second wireless communication device to disconnect the RFCOMM connection.
Further, the SWISS communication protocol is formed based on a bluetooth protocol, and the SWISS communication protocol architecture includes: the base layer, the HCI layer, the L2CAP layer, the SDP layer, the RFCOMM layer, the SPP layer and the SWISS Profile layer are used for defining the base band controller; the bottom layer, the HCI layer, the L2CAP layer, the RFCOMM layer and the SPP layer are sequentially arranged from bottom to top; the SDP layer is arranged above the L2CAP layer and is arranged in parallel with the RFCOMM layer and the SPP layer; the SWISS Profile layer is arranged on the SPP layer, and a set application layer wireless interaction module constructed based on the SPP layer transmits high-quality audio/video signals of the first wireless communication device and the second wireless communication device.
Further, the SWISS communication protocol architecture further includes: LMP layer, AVDTP layer, A2DP layer, HFP layer; the LMP layer is arranged above the HCI layer and is arranged in parallel with the L2CAP layer; the AVDTP layer is arranged above the LMP layer and the L2CAP layer and is arranged in parallel with the RFCOMM layer; the A2DP layer is arranged on the AVDTP layer and is arranged in parallel with the SPP layer and the SWISS Profile layer; the HFP layer is arranged on the SDP layer and the SPP layer and is arranged in parallel with the SWISS Profile layer.
Preferably, the communication method further comprises: establishing a precise synchronization mechanism between the first wireless communication device and a second wireless communication device using the NTP protocol, comprising: obtaining a time offset value t at the second wireless communication device through signaling interaction Deviation of (ii) a Sending data to the second wireless communication equipment through the first wireless communication equipment, and recording the data sending time t of the first wireless communication equipment Sending And a data reception time t of the second wireless communication device Receiving (ii) a According to the data transmission time t Sending And the data receiving time t Receiving Obtaining data transmission time delay t Time delay Wherein, t Time delay =t Receiving -t Sending (ii) a According to the time deviation value t Deviation of And said data transmission delay t Time delay Obtaining a synchronization time adjustment value t Regulating Wherein, t Regulating =t Deviation from +t Time delay (ii) a Using said synchronized time adjustment value t Regulating Time synchronizing data of the second wireless communication device to be the same as the data time of the first wireless communication device.
Further, the obtaining of the time offset value t at the second wireless communication device by signaling interaction is performed Deviation of The method comprises the following steps: sending a first signaling to the second wireless communication device by the first wireless communication device, and recording a first sending time t of the first signaling 1 And a first reception time t 2 (ii) a Sending a second signaling to the first wireless communication device by the second wireless communication device, and recording a second sending time t of the second signaling 3 And a second reception time t 4 (ii) a According to the first sending time t 1 The first receiving time t 2 The second transmission time t 3 The second receiving time t 4 Is calculated toTo the time offset value t Deviation of (ii) a Wherein the time deviation value t Deviation of The algorithm formula of (1) is as follows:
Figure BDA0002905784680000031
preferably, the NTP protocol is used to establish a precise synchronization mechanism between the first wireless communication device and the second wireless communication device, further comprising: and comparing the synchronized data time of the second wireless communication device with the data time of the first wireless communication device, and if the synchronized data time of the second wireless communication device is consistent with the data time of the first wireless communication device, executing data at the second wireless communication device according to the synchronized time.
Preferably, the communication method further includes: detecting a buffer level value of data transmission of the first wireless communication device; judging whether the cache level value meets a preset first threshold condition, and if so, reducing the input quantity of a cache queue by changing parameters; and judging whether the cache level value meets a preset second threshold condition, and if so, increasing the input quantity of the cache queue by changing parameters.
Preferably, the first threshold condition is that the size of the cache data of the first wireless communication device is greater than or equal to 3/4 of the total cache data size, and the cache data remaining space of the first wireless communication device is less than or equal to 1/4 of the total cache data space; the second threshold condition is that the size of the cache data of the first wireless communication device is less than or equal to 1/2 of the total cache data size, and the cache data remaining space of the first wireless communication device is greater than or equal to 1/2 of the total cache data space.
Preferably, the communication method further includes: acquiring real-time communication state information of current data transmission, wherein the real-time communication state information comprises: at least one of a real-time communication delay value, a real-time packet loss rate, and a real-time rate; according to the real-time communication state information, calibrating the real-time quality level of the current channel data transmission; and adjusting the communication code rate of the current channel according to the real-time quality grade, and realizing the switching of the working bandwidth and/or the channel number.
In a second aspect, an embodiment of the present invention provides a wireless data communication system, where the communication system includes: the communication establishing module is used for establishing a communication relation between the first wireless communication equipment and the second wireless communication equipment based on the SWISS communication protocol; the communication establishment module comprises: the host communication establishing sub-module loaded in the first wireless communication equipment is used for registering SWISS communication service as a host in the first wireless communication equipment; and a slave communication establishment sub-module, loaded on the second wireless communication device, for unregistering SWISS communication service with the second wireless communication device as a slave; based on the interaction between the master communication establishing submodule and the slave communication establishing submodule, discovering the second wireless communication equipment nearby on the first wireless communication equipment based on SDP and completing pairing; receiving, at the first wireless communication device, an SWISS communication service request of the successfully paired second wireless communication device, and establishing a SWISS communication protocol connection based on an RFCOMM channel; and realizing communication interaction of data flow, control flow and state flow between the first wireless communication equipment and the second wireless communication equipment.
Preferably, the communication establishing module is further configured to: based on the interaction between the master communication establishing submodule and the slave communication establishing submodule, the first wireless communication device or the second wireless communication device actively initiates a disconnection request to disconnect the RFCOMM connection.
Further, the SWISS communication protocol is formed based on a bluetooth protocol, and the SWISS communication protocol architecture includes: the base layer, the HCI layer, the L2CAP layer, the SDP layer, the RFCOMM layer, the SPP layer and the SWISS Profile layer are used for defining the base band controller; the bottom layer, the HCI layer, the L2CAP layer, the RFCOMM layer and the SPP layer are sequentially arranged from bottom to top; the SDP layer is arranged above the L2CAP layer and is arranged in parallel with the RFCOMM layer and the SPP layer; the SWISS Profile layer is arranged on the SPP layer, and a set application layer wireless interaction module constructed based on the SPP layer transmits high-quality audio/video signals of the first wireless communication device and the second wireless communication device.
Further, the SWISS communication protocol architecture further includes: LMP layer, AVDTP layer, A2DP layer, HFP layer; the LMP layer is arranged above the HCI layer and is arranged in parallel with the L2CAP layer; the AVDTP layer is arranged above the LMP layer and the L2CAP layer and is arranged in parallel with the RFCOMM layer; the A2DP layer is arranged on the AVDTP layer and is arranged in parallel with the SPP layer and the SWISS Profile layer; the HFP layer is arranged above the SDP layer and the SPP layer and is arranged in parallel with the SWISS Profile layer.
Preferably, the communication system further comprises: a synchronization communication module configured to establish a precise synchronization mechanism between the first wireless communication device and the second wireless communication device using the NTP protocol, comprising: obtaining a time offset value t at the second wireless communication device by signaling interaction Deviation of (ii) a Sending data to the second wireless communication equipment through the first wireless communication equipment, and recording the data sending time t of the first wireless communication equipment Sending And a data reception time t of the second wireless communication device Receiving (ii) a According to the data transmission time t Sending And the data receiving time t Receiving Obtaining a data transmission delay t Time delay Wherein, t Time delay =t Receiving -t Sending (ii) a According to the time deviation value t Deviation of And said data transmission delay t Time delay Obtaining a synchronization time adjustment value t Regulating Wherein, t Regulating =t Deviation from +t Time delay (ii) a Using said synchronized time adjustment value t Regulating Time synchronizing data of the second wireless communication device to be the same as the data time of the first wireless communication device.
Further, the obtaining of the time offset value t at the second wireless communication device by signaling interaction is performed Deviation from The method comprises the following steps: sending a first signaling to the second wireless communication device by the first wireless communication device, and recording a first sending time t of the first signaling 1 And a first reception time t 2 (ii) a Sending a second signaling to the first wireless communication device by the second wireless communication device, and recording a second sending time t of the second signaling 3 And a second reception time t 4 (ii) a According to the first sending time t 1 The first receiving time t 2 The second transmission time t 3 The second receiving time t 4 Calculating to obtain the time deviation value t Deviation of (ii) a Wherein the time deviation value t Deviation from The algorithm formula of (1) is as follows:
Figure BDA0002905784680000051
preferably, the synchronous communication module is further configured to compare the synchronized data time of the second wireless communication device with the data time of the first wireless communication device, and if the synchronized data time of the second wireless communication device is consistent with the data time of the first wireless communication device, perform data execution at the second wireless communication device according to the synchronized time.
Preferably, the communication system further comprises: the real-time communication monitoring module is used for detecting a cache level value of data transmission of the first wireless communication equipment; judging whether the cache level value meets a preset first threshold condition, and if so, reducing the input quantity of a cache queue by changing parameters; and judging whether the cache level value meets a preset second threshold condition, and if so, increasing the input quantity of the cache queue by changing parameters.
Preferably, the first threshold condition is that the size of the cache data of the first wireless communication device is greater than or equal to 3/4 of the total cache data size, and the cache data remaining space of the first wireless communication device is less than or equal to 1/4 of the total cache data space; the second threshold condition is that the size of the cache data of the first wireless communication device is less than or equal to 1/2 of the total cache data size, and the cache data remaining space of the first wireless communication device is greater than or equal to 1/2 of the total cache data space.
Preferably, the real-time communication monitoring module is further configured to: acquiring real-time communication state information of current data transmission, wherein the real-time communication state information comprises: at least one of a real-time communication delay value, a real-time packet loss rate, and a real-time rate; according to the real-time communication state information, calibrating the real-time quality level of the current channel data transmission; and adjusting the communication code rate of the current channel according to the real-time quality grade to realize the switching of the working bandwidth and/or the channel number.
In a third aspect, an embodiment of the present invention provides a synchronization apparatus for a wireless communication apparatus, including: a memory for storing a computer program; a processor adapted to perform the steps of a method of wireless data communication according to any of the above first aspects when said computer program is executed.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of a wireless data communication method as described in any one of the above first aspects.
The embodiment of the invention provides a wireless data communication method, a system, equipment and a storage medium, which are used for establishing a communication relation between first wireless communication equipment and second wireless communication equipment based on an SWISS communication protocol. The first wireless communication device and the second wireless communication device are divided into a host and a slave by judging whether the SWISS communication service is registered or not, and different interaction authorities are respectively given to the host and the slave based on role division. After the master machine and the slave machine are successfully paired, the SWISS communication protocol connection is established based on the RFCOMM channel, the master machine can provide SWISS communication service through registering SWISS communication service for the slave machine to discover, and receives a request initiated by the slave machine in the connection process; the slave is not registered with the SWISS communication service, finds the host with the SWISS communication service through the SDP, and initiates a connection request to the host in the connection process. Therefore, the communication interaction of data flow, control flow and state flow is realized between the host and the slave.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
The structures, ratios, sizes, and the like shown in the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used to limit the conditions that the present invention can be implemented, so that the present invention has no technical significance, and any structural modifications, changes in the ratio relationship, or adjustments of the sizes, without affecting the effects and the achievable by the present invention, should still fall within the range that the technical contents disclosed in the present invention can cover.
Fig. 1 is a schematic diagram of a logical structure of a wireless data communication system according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating a method of wireless data communication according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an SWISS communication protocol architecture provided by an embodiment of the present invention;
fig. 4 is a schematic diagram of a SWISS communication protocol architecture according to another embodiment of the present invention;
fig. 5 is an interaction diagram of establishing a communication relationship between a first wireless communication device and a second wireless communication device based on the SWISS communication protocol according to an embodiment of the present invention, where the first wireless communication device and the second wireless communication device are IOS system devices;
fig. 6 is an interaction diagram illustrating establishment of a communication relationship between a first wireless communication device and a second wireless communication device based on a SWISS communication protocol according to another embodiment of the present invention, where the first wireless communication device and the second wireless communication device are Android system devices;
figure 7 is a schematic flow chart illustrating a mechanism for establishing precise synchronization between the first wireless communication device and the second wireless communication device using the NTP protocol according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an embodiment of obtaining a time offset value t at the second wireless communication device through signaling interaction Deviation from A schematic flow diagram of (a);
fig. 9 is a flow chart illustrating real-time communication monitoring in wireless data communication between a first wireless communication device and a second wireless communication device according to an embodiment of the present invention;
fig. 10 is a flow chart illustrating real-time communication monitoring in wireless data communication between a first wireless communication device and a second wireless communication device according to another embodiment of the present invention;
fig. 11 is a schematic diagram of switching communication operating bandwidths after real-time communication monitoring is performed in wireless data communication between a first wireless communication device and a second wireless communication device, which is shown in fig. 10, due to the influence of a network environment according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a wireless data communication device according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
The present invention is described in terms of specific embodiments, and other advantages and benefits of the present invention will become apparent to those skilled in the art from the following disclosure. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a wireless data communication system, which includes: the communication establishing module 1 establishes a communication relationship between the first Wireless communication device and the second Wireless communication device based on a SWISS (Sabine Wireless Internet Stereo System) communication protocol.
The communication establishing module 1 comprises a host communication establishing sub-module 11 and a slave communication establishing sub-module 12, wherein the host communication establishing sub-module 11 is loaded in the first wireless communication equipment and is used for registering SWISS communication service in the first wireless communication equipment to enable the first wireless communication equipment to be used as a host; the slave communication establishing sub-module 12 is loaded in the second wireless communication device, and is configured to make the second wireless communication device act as a slave when the second wireless communication device is not registered with the SWISS communication service.
Based on the interaction between the master communication establishing submodule 11 and the slave communication establishing submodule 12, discovering a nearby second wireless communication device and completing pairing based on SDP at the first wireless communication device; receiving an SWISS communication service request of a second wireless communication device which is successfully paired at a first wireless communication device, and establishing SWISS communication protocol connection based on an RFCOMM channel; and realizing communication interaction of data flow, control flow and state flow between the first wireless communication equipment and the second wireless communication equipment.
The embodiment of the invention establishes a communication relation between the first wireless communication equipment and the second wireless communication equipment based on the SWISS communication protocol. The first wireless communication device and the second wireless communication device are divided into a host computer and a slave computer through whether SWISS communication service is registered or not, and different interaction authorities are respectively given to the host computer and the slave computer based on role division. After the master machine and the slave machine are successfully paired, the SWISS communication protocol connection is established based on the RFCOMM channel, the master machine can provide SWISS communication service through registering SWISS communication service for the slave machine to discover, and receives a request initiated by the slave machine in the connection process; the slave is not registered with the SWISS communication service, finds the host with the SWISS communication service through the SDP, and initiates a connection request to the host in the connection process. Therefore, the communication interaction of data flow, control flow and state flow is realized between the host and the slave.
Preferably, a wireless data communication system provided in an embodiment of the present invention further includes: and the synchronous communication module 2 is used for establishing a precise synchronization mechanism between the first wireless communication device and the second wireless communication device by using the NTP protocol. The synchronous communication module 2 includes a master synchronous communication submodule 21 and a slave synchronous communication submodule 22, the master synchronous communication submodule 21 and the slave synchronous communication submodule 22 are respectively disposed on the first wireless communication device and the second wireless communication device, and data of the first wireless communication device and data of the second wireless communication device are synchronized to be the same in time through interaction between the master synchronous communication submodule 21 and the slave synchronous communication submodule 22.
The embodiment of the invention acquires the time deviation value t through signaling interaction Deviation from And real-time detected data transmission delay t Time delay Obtaining a synchronous time adjustment value t Regulating The data time of the second wireless communication equipment is synchronized to be the same as that of the first wireless communication equipment, so that the problem of synchronization of audio and video data transmission can be solved, data time synchronization among multiple equipment is realized, and user experience is improved.
Preferably, the wireless data communication system provided in the embodiment of the present invention further includes a real-time communication monitoring module 3, configured to detect a buffer level value of data transmission of the first wireless communication device; judging whether the cache level value meets a preset first threshold condition, and if so, reducing the input quantity of the cache queue by changing parameters; and judging whether the cache level value meets a preset second threshold condition, and if so, increasing the input quantity of the cache queue by changing the parameters.
In the embodiment of the invention, the buffer level value of the data transmission of the first wireless communication equipment is detected, and the parameter is adjusted according to the preset first threshold condition and the preset second threshold condition, so that the input quantity of the buffer queue is adaptive to the speed which can be borne by the channel. When the data transmission process is influenced by the surrounding network environment, the input quantity of the cache queue is reduced, the stability of data transmission is ensured, the packet loss is prevented, and the audio-visual experience of a user is improved as much as possible.
Preferably, the real-time communication monitoring module 3 is further configured to: acquiring real-time communication state information of current data transmission, wherein the real-time communication state information comprises: at least one of a real-time communication delay value, a real-time packet loss rate, and a real-time rate; according to the real-time communication state information, calibrating the real-time quality level of the current channel data transmission; and adjusting the communication code rate of the current channel according to the real-time quality grade to realize the switching of the working bandwidth and/or the channel number.
Further, in the data transmission process, the embodiment of the present invention further calibrates the real-time quality level of data transmission of the current channel according to the real-time communication delay value, the real-time packet loss rate, the real-time rate, and the like, and switches the working bandwidth and/or the channel number by adjusting the communication code rate of the current channel. Therefore, by switching the working bandwidth and/or the channel number, the influence of the surrounding network environment on data transmission is reduced, the actual speed of communication transmission is ensured to be adapted to the speed which can be borne by the channel, the stability of data transmission is ensured, the data transmission communication delay and even packet loss are prevented, and the audio-visual experience of a user is improved.
Corresponding to the wireless data communication system, the embodiment of the invention also discloses a wireless data communication method. A wireless data communication method disclosed in the embodiments of the present invention will be described in detail below with reference to a wireless data communication system described above.
Referring to fig. 2, a method for wireless data communication according to an embodiment of the present invention includes: establishing a communication relation between the first wireless communication device and the second wireless communication device through interaction between the master communication establishing sub-module 11 and the slave communication establishing sub-module 12 based on an SWISS communication protocol; the method comprises the steps that SWISS communication service is registered in first wireless communication equipment and serves as a master, and SWISS communication service is not registered in second wireless communication equipment and serves as a slave; discovering, at the first wireless communication device, a second wireless communication device in proximity based on the SDP and completing the pairing; receiving an SWISS communication service request of successfully paired second wireless communication equipment at first wireless communication equipment, and establishing SWISS communication protocol connection based on an RFCOMM channel; and realizing communication interaction of data flow, control flow and state flow between the first wireless communication equipment and the second wireless communication equipment.
The SWISS communication protocol is a communication protocol manufactured by beijing saint technologies ltd based on a bluetooth device protocol, and here, bluetooth defines a communication mode of a bottom layer radio frequency, a definition and discovery mode of a service, a packaging format of a data packet, a connection establishment mode (pairing mode), and the like. The SWISS communication protocol may be extended to other wireless or wired connection protocols. The related packet format definition, application scenario, audio encoding and decoding mode, interaction mode, signal processing method, data transmission method, etc. are not limited to the bluetooth basic protocol.
Referring to fig. 3, the SWISS communication protocol disclosed in the embodiment of the present invention is formed based on a bluetooth protocol, wherein the SWISS communication protocol architecture includes: the base layer, the HCI layer, the L2CAP layer, the SDP layer, the RFCOMM layer, the SPP layer and the SWISS Profile layer are used for defining the base band controller; the bottom layer, the HCI layer, the L2CAP layer, the RFCOMM layer and the SPP layer are sequentially arranged from bottom to top; the SDP layer is arranged above the L2CAP layer and is arranged in parallel with the RFCOMM layer and the SPP layer; the SWISS Profile layer is arranged on the SPP layer, and a set application layer wireless interaction module constructed based on the SPP layer transmits high-quality audio/video signals of the first wireless communication device and the second wireless communication device.
The SWISS communication protocol can be created separately, not relying on the standard bluetooth protocol (such as A2DP, HFP, etc.) that is typically provided with devices. Referring to fig. 4, the swiss communication protocol architecture further includes: LMP layer, AVDTP layer, A2DP layer, HFP layer; the LMP layer is arranged on the HCI layer and is arranged in parallel with the L2CAP layer; the AVDTP layer is arranged above the LMP layer and the L2CAP layer and is arranged in parallel with the RFCOMM layer; the A2DP layer is arranged on the AVDTP layer and is arranged in parallel with the SPP layer and the SWISS Profile layer; the HFP layer is disposed above the SDP layer and the SPP layer, and is juxtaposed with the SWISS Profile layer.
The existing bluetooth headset products support the protocols of A2DP and HFP, and respectively provide the capabilities of listening to music and making a call. The SWISS communication protocol can be perfectly coexistent with the existing A2DP and HFP protocols, providing various scenarios, and interoperability of various data streams. The registration of the SWISS communication protocol and other operations are all in accordance with the service framework of the Bluetooth protocol. What services a device has are registered in SDP as needed, and a device can provide a variety of services such as A2DP, HFP, SWISS, GAP, PBAP, and the like.
In the prior art, the SPP belongs to control stream data, the transmitted real-time audio is low-quality, for example, when the SPP is operated by HFP to realize a telephone function, 64Kb information can be transmitted, the transmission code rate is limited, 48K stereo (1.4 Mb) cannot be transmitted, the transmission is unstable, and audio and video cannot be transmitted. In the prior art, packet loss compensation is performed at a receiving end to solve the problems of unstable data transmission and interference resistance.
In the solution proposed in the embodiment of the present application, the Swiss Profile layer is set to the upper layer of the SPP channel. Because the application layer can only be controlled at most through the APP under the condition of not refreshing the mobile phone, the SWISS profile is set in the application layer, and the high-quality audio and video signal transmission from the first wireless communication equipment to the first wireless communication equipment is carried out on the basis of the set application layer wireless interaction module constructed by the SPP. Thus, high quality stereo, e.g., 48K stereo or 44.1K stereo, can be transmitted over the SPP channel via the SWISS Profile.
The embodiment of the invention divides the first wireless communication equipment and the second wireless communication equipment into the host and the slave by judging whether the SWISS communication service is registered or not based on the SWISS communication protocol, and respectively endows different interaction authorities to the host and the slave based on role division.
The SWISS communication protocol role definition is described in detail as follows:
host (SWISS Master): the SWISS communication service is registered, and other equipment can discover the SWISS communication service through the SDP; in the connection process, receiving a request initiated by a slave;
slave (SWISS Slave): the method comprises the steps that the SWISS communication service is not registered, equipment which is registered with the SWISS communication service is found through an SDP, and a connection request is sent to a host;
the definition of the host and the slave is only used in a connection stage, the host provides SWISS communication service, and the slave requests the SWISS communication service; namely, in the connection establishment phase, the connection request is initiated by the master machine, and the slave machine receives the connection request.
Preferably, the wireless data communication method disclosed in the embodiment of the present invention further includes: and actively initiating a disconnection request by the first wireless communication device or the second wireless communication device to disconnect the RFCOMM connection. That is, in the disconnection phase, either the master or the slave may actively initiate a disconnection request.
In the embodiment of the invention, after the host and the slave are successfully paired, an SWISS communication protocol connection is established based on an RFCOMM channel, the host can provide SWISS communication service by registering SWISS communication service for the slave to find, and receives a request initiated by the slave in the connection process; the slave is not registered with the SWISS communication service, finds the host with the SWISS communication service through the SDP, and initiates a connection request to the host in the connection process. Therefore, communication interaction of data flow, control flow and state flow is realized between the host and the slave.
Specifically, referring to fig. 5 and fig. 6, fig. 5 is an interaction diagram illustrating that a communication relationship is established between a first wireless communication device and a second wireless communication device based on a SWISS communication protocol according to an embodiment of the present invention, where the first wireless communication device and the second wireless communication device are IOS system devices; fig. 6 is an interaction diagram illustrating establishment of a communication relationship between a first wireless communication device and a second wireless communication device based on a SWISS communication protocol according to another embodiment of the present invention, where the first wireless communication device and the second wireless communication device are Android system devices.
In one embodiment, the interaction between the communication devices of the SWISS communication protocol is as follows:
1. pairing procedure
The pairing process is a basic process of bluetooth, and is a process of connecting a bluetooth host (a mobile phone, a tablet computer, a portable notebook computer, a PC and the like) and a bluetooth device (an intelligent sound box, an intelligent earphone, an intelligent handle, an intelligent watch and the like). The pairing process mainly comprises the following steps:
a. the master searches for slave devices (SDP service) which can be found nearby;
b. the master machine selects a certain slave machine and starts a pairing process;
c. exchanging PIN codes and the like to complete secure connection and pairing;
after the above process is completed, a safe Bluetooth connection channel is established between the host and the slave equipment. All data is encrypted, only the paired device can correctly decode the data, and other devices cannot decrypt the transmitted data.
2. Service discovery procedure
a. The service discovery process relies on SDP services;
b. all services registered in the SDP can be searched by nearby equipment;
c. this process is often referred to on the device as a search process;
d. by inquiring the SDP service, the service capability of the equipment can be obtained;
e. the searched service request includes various information such as UUID, channel number, service alias, and the like of the service.
3. Connection establishment procedure
a. Constructing and initiating a connection request according to the information obtained in the service request;
b. the request is established on the previous Bluetooth pairing process, namely, the operation of the step can be carried out only after the pairing is completed;
c. this connection is the connection that makes the RFCOMM channel.
4. Data transmission process
after the connection is established in the RFCOMM channel, data flow and control flow can be sent at any time;
b. the system is divided into data flow, control flow and state flow, and all data are transmitted according to a uniform format;
c. the transmission may be initiated by a Master or a Slave;
5. disconnection process
a. The disconnection process may be initiated by a Master or a Slave;
b. will disconnect the RFCOMM connection;
c. after disconnection, the connection process can be started at any time in a starting state;
difference between IOS and Android systems
In the IOS system, as the system is internally provided with RFCOMM related services, in the IOS system, a mobile phone, a tablet computer, a portable notebook computer, a PC and the like are masters, and an intelligent sound box, an intelligent earphone, an intelligent handle, an intelligent watch and the like are Slave;
in the Android system, the system does not have built-in services related to the RFCOMM, so in the Android system, a mobile phone, a tablet computer, a portable notebook computer, a PC and the like are Slave, and an intelligent sound box, an intelligent earphone, an intelligent handle, an intelligent watch and the like are Master.
At present, in the process of wireless data transmission through Bluetooth, due to the influence of network environment and the influence of data processing in the transmission process, data time asynchronization exists between a data receiving end and a data sending end, and the uniformity and the accuracy of data transmission time are influenced. For example, in the audiovisual field, the requirement for time synchronization of transmission data is high, and if the picture and voice of the video screen cannot be synchronized, the user cannot obtain a good audiovisual experience.
Therefore, how to provide a synchronization scheme for a wireless communication device, which can solve the problem of audio and video synchronization, implement time synchronization among multiple devices, and improve the audiovisual experience of a user is a technical problem to be solved urgently by those skilled in the art.
In order to further solve the above problem, preferably, with reference to fig. 7, a wireless data communication method disclosed in the embodiment of the present invention further includes: establishing a precise synchronization mechanism between the first wireless communication device and a second wireless communication device using the NTP protocol, comprising: obtaining a time offset value t at the second wireless communication device via a signaling interaction Deviation of (ii) a The data transmission time t of the first wireless communication device is recorded by the first wireless communication device transmitting data to the second wireless communication device Sending And a data reception time t of the second wireless communication device Receiving (ii) a According to the data transmission time t Sending And a data reception time t Receiving Obtaining a data transmission delay t Time delay Wherein, t Time delay =t Receiving -t Sending (ii) a According to the time deviation value t Deviation of And a data transmission delay t Time delay Obtaining a synchronization time adjustment value t Regulating Wherein, t Regulating =t Deviation of +t Time delay (ii) a Using the synchronisation time adjustment value t Regulating Time synchronizing data of a second wireless communication device to be the same as a data time of the first wireless communication device.
In the embodiment of the present invention, to synchronize data between the first wireless communication device and the second wireless communication device, it is necessary to synchronize time, after the first wireless communication device and the second wireless communication device are respectively set as a master device and a slave device (i.e., a master device and a slave device), the second wireless communication device may search for a communication connection broadcast of the first wireless communication device, so as to establish wireless communication between the two devices, and after the wireless communication is established, the two devices may acquire a network delay in a mutual PING manner.
In the embodiment of the invention, a one-to-many communication relationship is established between the first wireless communication device and the second wireless communication device, namely, one first wireless communication device corresponds to a plurality of second wireless communication devices. Taking the time of the first wireless communication device as the standard time, the time of the second wireless communication devices is synchronized to be the same as the time of the first wireless communication device no matter how many second wireless communication devices exist, thereby facilitating the data time between the devices to be kept synchronous.
Referring to fig. 8, further, a time offset value t is obtained at the second wireless communication device through signaling interaction Deviation from The method comprises the following steps: sending a first signaling to a second wireless communication device by a first wireless communication device, and recording a first sending time t of the first signaling 1 And a first reception time t 2 (ii) a Sending a second signaling to the first wireless communication device by the second wireless communication device, and recording a second sending time t of the second signaling 3 And a second reception time t 4 (ii) a According to the first transmission time t 1 First receiving time t 2 A second transmission time t 3 A second receiving time t 4 Calculating to obtain a time deviation value t Deviation of (ii) a Wherein the time deviation value t Deviation of The algorithm formula of (1) is as follows:
Figure BDA0002905784680000161
preferably, a wireless data communication method provided in an embodiment of the present invention further includes: the synchronized data time with the second wireless communication apparatus is compared with the data time of the first wireless communication apparatus, and if they coincide, the data is executed at the second wireless communication apparatus at the synchronized time.
In the embodiment of the invention, the communication relation between the host and the slave is established between the first wireless communication equipment and the second wireless communication equipment, and the time deviation value t is acquired through signaling interaction Deviation of And real-time detected data transmission delay t Time delay Obtaining a synchronization time adjustment value t Regulating And the data time of the second wireless communication equipment is synchronized to be the same as that of the first wireless communication equipment, so that the problem of synchronization of audio and video data transmission can be solved, the data time synchronization among a plurality of equipment is realized, and the user experience is improved.
Further, in order to reduce the audiovisual impact of the network delay on the user, in an embodiment of the present invention, the following steps may be performed for data interaction between the first wireless communication device and the second wireless communication device: the second wireless communication device receives the wirelessly transmitted real-time audio-visual data packets; the second wireless communication equipment stores the real-time audio-visual data packets within the preset time length in a preset memory according to the time sequence; and the second wireless communication equipment sends the real-time audio-visual data packet in the last preset time length to the audio-visual processor for processing every preset time length, and the data time of the second wireless communication equipment is synchronized to be the same as the data time of the first wireless communication equipment according to the method.
Specifically, a shared data storage area may be established in the second wireless communication device without a default memory, and audio-visual data packets may be collected, stored and transmitted to the audio-visual processor at regular intervals in this data area. Variations in the arrival time of the data packets, known as jitter, will occur due to network congestion, timing drift or route changes, and when the second wireless communication device receives the data packets, it intentionally time-synchronizes the data to the same data time as the first wireless communication device, so that the end user will experience a clear connection with little sound distortion.
Specifically, when the real-time audio-visual data packet is transmitted, the real-time audio-visual data packet may be set as an RTP data packet to which a real-time timestamp is added. The Real-time Transport Protocol RTP (Real-time Transport Protocol) is a network Transport Protocol, which specifies a standard packet format for transmitting audio and video over the internet. It was originally designed as a multicast protocol but was later used in many unicast applications. The RTP protocol is commonly used in streaming media systems (in conjunction with the RTSP protocol), video conferencing and Push to Talk (Push to Talk) systems (in conjunction with h.323 or SIP), making it the technological base for the IP telephony industry. The RTP protocol is used together with the RTP control protocol RTCP and is built on the user datagram protocol. RTP is widely used for streaming media related communication and entertainment including telephony, video conferencing, television, and network-based push-to-talk services (walkie-talkie-like telephony). The RTP standard defines two sub-protocols, RTP and RTCP. And the data transmission protocol RTP is used for transmitting data in real time. The protocol provides information including time stamps (for synchronization), sequence numbers (for packet loss and reordering detection), and payload formats (for specifying the coding format of the data). Control protocol RTCP, used for QoS feedback and for synchronizing media streams. The bandwidth occupied by RTCP is very small, typically only 5%, relative to RTP.
In addition, in the prior art, data between the audio or video devices needs to maintain real-time performance, and a wireless or limited transmission mode is generally adopted, however, the data transmission may be affected by the surrounding network environment in the data transmission process, which causes data transmission communication delay, even packet loss, and affects the user experience.
In order to ensure that the actual speed of communication transmission is adaptive to the speed which can be borne by the channel, the audio-visual experience of a user is improved as much as possible on the premise of ensuring the stability of data transmission in the data transmission process. Referring to fig. 9, preferably, the method for wireless data communication according to an embodiment of the present invention further includes: the following steps are executed by the real-time communication monitoring module 3: detecting a buffer level value of data transmission of a first wireless communication device; judging whether the cache level value meets a preset first threshold condition, and if so, reducing the input quantity of the cache queue by changing parameters; and judging whether the cache level value meets a preset second threshold condition, and if so, increasing the input quantity of the cache queue by changing the parameters.
In the embodiment of the present invention, first, a cache level value for data transmission of a first wireless communication device needs to be obtained. Preferably, the first threshold condition is that the size of the buffered data of the first wireless communication device is greater than or equal to 3/4 of the total buffered data size, and the remaining space of the buffered data of the first wireless communication device is less than or equal to 1/4 of the total buffered data space; the second threshold condition is that the size of the buffered data of the first wireless communication device is less than or equal to 1/2 of the total buffered data size, and the buffered data headroom of the first wireless communication device is greater than or equal to 1/2 of the total buffered data headroom.
In the embodiment of the invention, the buffer level value of the data transmission of the first wireless communication equipment is detected, and the parameter is adjusted according to the preset first threshold condition and the preset second threshold condition, so that the input quantity of the buffer queue is adaptive to the speed which can be borne by the channel. When the data transmission process is influenced by the surrounding network environment, the input quantity of the cache queue is reduced, the stability of data transmission is ensured, the packet loss is prevented, and the audio-visual experience of a user is improved as much as possible.
Preferably, referring to fig. 10 and fig. 11, a wireless data communication method according to an embodiment of the present invention further includes: the following steps are executed by the real-time communication monitoring module 3: acquiring real-time communication state information of current data transmission, wherein the real-time communication state information comprises: at least one of a real-time communication delay value, a real-time packet loss rate, and a real-time rate; according to the real-time communication state information, calibrating the real-time quality level of the current channel data transmission; and adjusting the communication code rate of the current channel according to the real-time quality grade, and realizing the switching of the working bandwidth and/or the channel number.
Further, in the data transmission process, the embodiment of the present invention further calibrates the real-time quality level of data transmission of the current channel according to the real-time communication delay value, the real-time packet loss rate, the real-time rate, and the like, and switches the working bandwidth and/or the channel number by adjusting the communication code rate of the current channel. Therefore, by switching the working bandwidth and/or the channel number, the influence of the surrounding network environment on data transmission is reduced, the actual speed of communication transmission is ensured to be adaptive to the speed which can be borne by the channel, the stability of data transmission is ensured, the data transmission communication delay is prevented, even packet loss occurs, and the audio-visual experience of a user is improved.
Referring to fig. 12, an embodiment of the present invention further provides a wireless data communication device 4, including:
a memory 41 for storing a computer program;
a processor 42 for implementing the steps of any of the wireless data communication methods as described in the first aspect above when executing said computer program. The computer program is stored in a space in the memory 41 for storage of program code, which when executed by the processor 42 implements a wireless data communication method according to any of the embodiments of the present invention.
With reference to fig. 13, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any of the wireless data communication methods according to any of the above-mentioned embodiments.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is only a logical division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, or portions or all or portions of the technical solutions that substantially contribute to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a function calling device, or a network device) to execute all or part of the steps of the methods according to the embodiments of the present application. Although the invention has been described in detail above with reference to a general description and specific examples, it will be apparent to one skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, it is intended that all such modifications and alterations be included within the scope of this invention as defined in the appended claims.

Claims (12)

1. A method of wireless data communication, the method comprising:
establishing a communication relationship between the first wireless communication device and the second wireless communication device based on the SWISS communication protocol;
registering the SWISS communication service as a master in the first wireless communication equipment, and not registering the SWISS communication service as a slave in the second wireless communication equipment;
discovering, at the first wireless communication device, the second wireless communication device in proximity based on SDP and completing pairing;
receiving, at the first wireless communication device, an SWISS communication service request of the second wireless communication device that is successfully paired, and establishing a SWISS communication protocol connection based on an RFCOMM channel;
implementing a communication interaction of data flow, control flow, state flow between the first wireless communication device and the second wireless communication device;
detecting a buffer level value of data transmission of the first wireless communication device;
judging whether the cache level value meets a preset first threshold condition, and if so, reducing the input quantity of a cache queue by changing parameters;
judging whether the cache level value meets a preset second threshold condition, and if so, increasing the input quantity of the cache queue by changing parameters;
the first threshold condition is that the size of the cache data of the first wireless communication device is larger than or equal to 3/4 of the size of the total cache data, and the cache data remaining space of the first wireless communication device is smaller than or equal to 1/4 of the total cache data space; the second threshold condition is that the size of the cache data of the first wireless communication device is less than or equal to 1/2 of the total cache data size, and the cache data remaining space of the first wireless communication device is greater than or equal to 1/2 of the total cache data space;
acquiring real-time communication state information of current data transmission, wherein the real-time communication state information comprises: at least one of a real-time communication delay value, a real-time packet loss rate, and a real-time rate;
according to the real-time communication state information, calibrating the real-time quality level of the current channel data transmission;
and adjusting the communication code rate of the current channel according to the real-time quality grade to realize the switching of the working bandwidth and/or the channel number.
2. The method of claim 1, wherein the method further comprises: and actively initiating a disconnection request by the first wireless communication device or the second wireless communication device to disconnect the RFCOMM connection.
3. The method of claim 1, wherein the SWISS communication protocol is formed based on a bluetooth protocol, and wherein the SWISS communication protocol architecture comprises: the base layer, the HCI layer, the L2CAP layer, the SDP layer, the RFCOMM layer, the SPP layer and the SWISS Profile layer are used for defining the base band controller; the bottom layer, the HCI layer, the L2CAP layer, the RFCOMM layer and the SPP layer are sequentially arranged from bottom to top; the SDP layer is arranged above the L2CAP layer and is arranged in parallel with the RFCOMM layer and the SPP layer; the SWISS Profile layer is arranged on the SPP layer, and a set application layer wireless interaction module constructed based on the SPP layer transmits high-quality audio/video signals of the first wireless communication device and the second wireless communication device.
4. The method of claim 3, wherein the SWISS communication protocol architecture further comprises: LMP layer, AVDTP layer, A2DP layer, HFP layer; the LMP layer is arranged above the HCI layer and is arranged in parallel with the L2CAP layer; the AVDTP layer is arranged above the LMP layer and the L2CAP layer and is arranged in parallel with the RFCOMM layer; the A2DP layer is arranged on the AVDTP layer and is arranged in parallel with the SPP layer and the SWISS Profile layer; the HFP layer is arranged on the SDP layer and the SPP layer and is arranged in parallel with the SWISS Profile layer.
5. A method of wireless data communication according to any of claims 1 to 4, wherein the method of communication further comprises: establishing a precise synchronization mechanism between the first wireless communication device and a second wireless communication device using the NTP protocol, comprising:
obtaining a time offset value t at the second wireless communication device through signaling interaction Deviation of
Sending data to the second wireless communication device through the first wireless communication device, and recording the data sending time t of the first wireless communication device Sending And a data reception time t of the second wireless communication device Receiving
According to the data transmission time t Sending And the data receiving time t Receiving Obtaining a data transmission delay t Time delay Wherein, t Time delay =t Receiving -t Sending
According to the time deviation value t Deviation from And said data transmission delay t Time delay Obtaining a synchronization time adjustment value t Regulating Wherein, t Regulating =t Deviation of +t Time delay
Using said synchronized time adjustment value t Regulating Time synchronizing data of the second wireless communication device to be the same as the data time of the first wireless communication device.
6. The method of claim 5, wherein the time offset value t is obtained at the second wireless communication device through signaling interaction Deviation of The method comprises the following steps:
sending a first signaling to the second wireless communication device by the first wireless communication device, and recording a first sending time t of the first signaling 1 And a first reception time t 2
By the second wireless communication device toThe first wireless communication equipment sends a second signaling and records a second sending time t of the second signaling 3 And a second reception time t 4
According to the first sending time t 1 The first receiving time t 2 The second transmission time t 3 The second receiving time t 4 Calculating to obtain the time deviation value t Deviation of
Wherein the time deviation value t Deviation from The algorithm formula of (1) is as follows:
Figure FDA0003805156460000031
7. the method of claim 5, wherein the precise synchronization mechanism between the first wireless communication device and the second wireless communication device is established using the NTP protocol, further comprising: and comparing the synchronized data time of the second wireless communication device with the data time of the first wireless communication device, and if the synchronized data time of the second wireless communication device is consistent with the synchronized data time of the first wireless communication device, executing data in the second wireless communication device according to the synchronized data time.
8. A wireless data communication system, the communication system comprising:
the communication establishing module is used for establishing a communication relation between the first wireless communication equipment and the second wireless communication equipment based on the SWISS communication protocol;
the communication establishment module comprises: a host communication establishing sub-module loaded in the first wireless communication device, for registering SWISS communication service as a host in the first wireless communication device; and a slave communication establishing sub-module loaded on the second wireless communication device, configured to unregister SWISS communication service as a slave in the second wireless communication device;
based on the interaction between the master communication establishing submodule and the slave communication establishing submodule, discovering the second wireless communication equipment nearby on the first wireless communication equipment based on SDP and completing pairing; receiving, at the first wireless communication device, an SWISS communication service request of the successfully paired second wireless communication device, and establishing a SWISS communication protocol connection based on an RFCOMM channel; implementing a communication interaction of data flow, control flow, state flow between the first wireless communication device and the second wireless communication device;
the real-time communication monitoring module is used for detecting a cache level value sent by the data of the first wireless communication equipment; judging whether the cache level value meets a preset first threshold condition, and if so, reducing the input quantity of a cache queue by changing parameters; judging whether the cache level value meets a preset second threshold condition, and if so, increasing the input quantity of a cache queue by changing parameters, wherein the first threshold condition is that the size of cache data of the first wireless communication equipment is more than or equal to 3/4 of the size of total cache data, and the cache data residual space of the first wireless communication equipment is less than or equal to 1/4 of the total cache data space; the second threshold condition is that the size of the cache data of the first wireless communication device is smaller than or equal to 1/2 of the total cache data size, and the cache data remaining space of the first wireless communication device is larger than or equal to 1/2 of the total cache data space;
the real-time communication monitoring module is further configured to:
acquiring real-time communication state information of current data transmission, wherein the real-time communication state information comprises: at least one of a real-time communication delay value, a real-time packet loss rate, and a real-time rate;
according to the real-time communication state information, calibrating the real-time quality level of the current channel data transmission;
and adjusting the communication code rate of the current channel according to the real-time quality grade, and realizing the switching of the working bandwidth and/or the channel number.
9. The wireless data communication system of claim 8, wherein the communication system further comprises:
and the synchronous communication module is used for establishing a precise synchronous mechanism between the first wireless communication equipment and the second wireless communication equipment by using the NTP protocol.
10. The wireless data communication system according to claim 9, wherein the synchronization communication module is further configured to compare the synchronized data time of the second wireless communication device with the data time of the first wireless communication device, and if the synchronized data time of the second wireless communication device is consistent with the data time of the first wireless communication device, perform data execution at the second wireless communication device according to the synchronized time.
11. A wireless data communication device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of a method of wireless data communication according to any of claims 1 to 7 when executing said computer program.
12. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of a method for wireless data communication according to any one of claims 1 to 7.
CN202110071059.XA 2021-01-19 2021-01-19 Wireless data communication method, system, equipment and storage medium Active CN112911559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110071059.XA CN112911559B (en) 2021-01-19 2021-01-19 Wireless data communication method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110071059.XA CN112911559B (en) 2021-01-19 2021-01-19 Wireless data communication method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112911559A CN112911559A (en) 2021-06-04
CN112911559B true CN112911559B (en) 2023-01-17

Family

ID=76115946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110071059.XA Active CN112911559B (en) 2021-01-19 2021-01-19 Wireless data communication method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112911559B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827681B (en) * 2022-04-24 2024-03-22 咪咕视讯科技有限公司 Video synchronization method, device, electronic equipment, terminal equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763317A (en) * 2014-01-17 2014-04-30 天地融科技股份有限公司 Bluetooth-based data transmission method and system and intelligent secret key device
CN106851531A (en) * 2016-12-15 2017-06-13 北京塞宾科技有限公司 A kind of Bluetooth audio frequency transmission method
CN111787538A (en) * 2020-04-17 2020-10-16 深圳传音控股股份有限公司 Host resource allocation device, method and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8818276B2 (en) * 2012-05-16 2014-08-26 Nokia Corporation Method, apparatus, and computer program product for controlling network access to guest apparatus based on presence of hosting apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763317A (en) * 2014-01-17 2014-04-30 天地融科技股份有限公司 Bluetooth-based data transmission method and system and intelligent secret key device
CN106851531A (en) * 2016-12-15 2017-06-13 北京塞宾科技有限公司 A kind of Bluetooth audio frequency transmission method
CN111787538A (en) * 2020-04-17 2020-10-16 深圳传音控股股份有限公司 Host resource allocation device, method and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于HCI层蓝牙主机-主机控制器通信的设计与实现;李鹏等;《桂林电子工业学院学报》;20041225(第06期);全文 *

Also Published As

Publication number Publication date
CN112911559A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN109906613B (en) Multi-mode synchronized rendering of audio and video
US9648073B2 (en) Streaming control for real-time transport protocol
US8655280B2 (en) Method and system for role management for complex bluetooth® devices
US9300713B2 (en) Clock synchronization for multi-processor/multi-chipset solution
EP3005755B1 (en) Method and system for using wi-fi display transport mechanisms to accomplish voice and data communications
CA2913181C (en) Method and apparatus for transferring active communication session streams between devices
WO2016204468A1 (en) Method and apparatus for multipath media delivery
WO2013183970A1 (en) Multiple channel communication using multiple cameras
US11330041B2 (en) Providing communication services using sets of I/O user devices
US10200108B2 (en) Wireless docking system for audio-video relay
EP3281317B1 (en) Multi-layer timing synchronization framework
CN112911559B (en) Wireless data communication method, system, equipment and storage medium
US10129892B2 (en) Techniques to manage reverse channel audio sessions
EP3963844B1 (en) Providing communication services using sets of i/o user devices
WO2024046071A1 (en) Data transmission method and apparatus

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