Data transmission method and device, electronic equipment, chip and medium
In the multi-device interconnection scenario, the dual-link transmission technology of wireless connection and Bluetooth connection is used to perform redundant transmission and deduplication of data packets, which solves the problem of network delay jitter in link aggregation technology and improves the delay performance of data packets.
Patent Information
- Application Number
- CN202311429191.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2025-05-02
AI Technical Summary
Existing link aggregation technology cannot effectively avoid network delay jitter, resulting in increased information transmission delay.
In the multi-device interconnection scenario, network data packets sent through wireless connections are then redundantly sent through Bluetooth connections, and the packets are deduplicated at the receiving end, thereby taking advantage of the low delay jitter of Bluetooth connections to improve the packet delay performance with time-efficiency requirements.
Redundant transmission through Bluetooth connection reduces the jitter of transmission delay of wireless connections and improves the delay performance of data packets.
Smart Images

Figure CN119922758A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communications, and in particular to a data transmission method, device, electronic device, chip and medium. Background Art
[0002] Link Aggregation (LA) technology is a technology that combines multiple network links into a single logical link to provide greater bandwidth and redundant network data transmission. Related technologies can support concurrent wireless and cellular networks or support multi-band wireless connections, but cannot avoid network delay jitter and the resulting information transmission delay. Summary of the invention
[0003] The present disclosure provides a data transmission method, apparatus, electronic device, chip and medium. In a multi-device interconnection scenario, network data packets sent via a wireless connection are redundantly sent via a Bluetooth connection, and the data packets are deduplicated at the receiving end, thereby utilizing the low delay jitter of the Bluetooth connection to improve the delay performance of data packets with time requirements.
[0004] A first aspect embodiment of the present disclosure proposes a data transmission method, which is executed by a first device and includes: adding a label in a sent data packet, the label being used to identify that the sent data packet is sent via a dual link, the dual link including a wireless connection and a Bluetooth connection between the first device and the second device; and sending the sent data packet via the dual link.
[0005] In some embodiments of the present disclosure, the data transmission method further includes: establishing a wireless connection and obtaining a quadruple corresponding to the wireless connection; establishing a Bluetooth connection and obtaining a Bluetooth address and a Bluetooth connection identifier of the second device.
[0006] In some embodiments of the present disclosure, the data transmission method also includes: registering a first filtering function of a sending direction through a first interface of a first device; obtaining one or more data packets; and determining, from the one or more data packets, through the first filtering function, a data packet that meets a preset condition as a sending data packet, wherein the preset condition is: the length of the sending data packet corresponds to a four-tuple, and the length of the sending data packet is less than or equal to a first threshold.
[0007] In some embodiments of the present disclosure, adding a label to a transmitted data packet includes: adding a first label and a second label to the end of the transmitted data packet, wherein the first label is used to identify the sequence number of the transmitted data packet, and the second label is used to identify that the transmitted data packet is sent via a dual link.
[0008] In some embodiments of the present disclosure, sending a data packet via a dual link includes: copying the data packet to obtain a first data packet and a second data packet; sending the first data packet via a wireless connection; adding a Bluetooth message header to the second data packet, and sending the second data packet via a Bluetooth connection by driving a Bluetooth chip of the first device.
[0009] In some embodiments of the present disclosure, sending a data packet via a dual link includes: copying the data packet to obtain a first data packet and a second data packet; sending the first data packet via a wireless connection; adding a Bluetooth message header to the second data packet, forwarding the second data packet to the virtual network card driver of the first device through the Bluetooth protocol stack of the Android system of the first device, and sending the second data packet via the Bluetooth connection and the second interface of the first device.
[0010] A second aspect of the present disclosure provides a data transmission method, which is performed by a second device. The method includes: receiving a sending data packet sent by a first device via a dual link, wherein a label is added to the sending data packet, and the label is used to identify that the sending data packet is sent via the dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device.
[0011] In some embodiments of the present disclosure, the data transmission method also includes: registering a second filtering function for the receiving direction through the first interface of the second device; determining through the second filtering function whether the sent data packet meets a preset condition, wherein the preset condition is: the length of the sent data packet corresponds to a four-tuple, and the length of the sent data packet is less than or equal to a first threshold.
[0012] In some embodiments of the present disclosure, the data transmission method also includes: determining whether a sent data packet meets a first arrival condition based on a label, wherein the label includes a first label and a second label, the first label is used to identify a serial number of the sent data packet, and the second label is used to identify that the sent data packet is sent via a dual link; when the sent data packet does not meet the first arrival condition, the sent data packet is discarded.
[0013] In some embodiments of the present disclosure, the data transmission method further includes: when the sent data packet meets the first arrival condition, determining the arrival timestamp of the sent data packet according to the tag; when the arrival timestamp exceeds a preset time threshold, deleting the tag.
[0014] In some embodiments of the present disclosure, receiving a transmission data packet sent by a first device through a dual link includes: receiving a first transmission data packet through a wireless connection; and receiving a second transmission data packet through a Bluetooth chip of a second device via a Bluetooth connection.
[0015] In some embodiments of the present disclosure, the data transmission method also includes: when it is detected that the operation code carried in the second sending data packet meets the preset receiving conditions, removing the message header of the second sending data packet; using the kernel interface of the second device, sending the second sending data packet to the network protocol stack for processing.
[0016] In some embodiments of the present disclosure, receiving a transmission data packet sent by a first device via a dual link includes: receiving a first transmission data packet via a wireless connection; and receiving a second transmission data packet through a Bluetooth chip of a second device, via a Bluetooth connection and a second interface of the second device.
[0017] In some embodiments of the present disclosure, the data transmission method also includes: when it is detected that the operation code carried in the second sending data packet meets the preset receiving conditions, removing the message header of the second sending data packet; using the interface of the virtual network card driver of the second device, sending the second sending data packet to the virtual network card driver; and sending the second sending data packet to the network protocol stack for processing through the virtual network card driver.
[0018] The third aspect embodiment of the present disclosure proposes a first device, including: a processing module, used to add a label in a sent data packet, the label is used to identify that the sent data packet is sent via a dual link, the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device; a transceiver module, used to send the data packet via the dual link.
[0019] The fourth aspect embodiment of the present disclosure proposes a second device, including: a transceiver module, used to receive a sending data packet sent by a first device through a dual link, wherein a label is added to the sending data packet, and the label is used to identify that the sending data packet is sent via the dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device.
[0020] The fifth aspect embodiment of the present disclosure proposes an electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein when the processor is used to run the computer program, it executes the method described in any one of the embodiments of the first aspect or the second aspect of the present disclosure.
[0021] The sixth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to enable a computer to execute the method described in any one of the embodiments of the first aspect or the second aspect of the present disclosure.
[0022] The seventh aspect embodiment of the present disclosure proposes a chip, including at least one processor and a communication interface, the communication interface is used to receive signals input into the chip or signals output from the above chip, the processor communicates with the communication interface and implements the method described in any one of the embodiments of the first aspect or the second aspect of the present disclosure through logic circuits or execution code instructions.
[0023] In summary, the data transmission method proposed in the present disclosure is performed by the first device: adding a tag to the sending data packet, the tag is used to identify that the sending data packet is sent via a dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device; sending the sending data packet through the dual link. Performed by the second device: receiving the sending data packet sent by the first device through the dual link, wherein a tag is added to the sending data packet, the tag is used to identify that the sending data packet is sent via a dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device. This method can redundantly send data packets that were originally transmitted only through a wireless connection through a Bluetooth connection, thereby reducing the delay jitter of the wireless transmission.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0026] Figure 1 A flowchart of a data transmission method provided by an embodiment of the present disclosure;
[0027] Figure 2 A flow chart of a method for determining to send a data packet provided by an embodiment of the present disclosure;
[0028] Figure 3 A flow chart of a method for sending a data packet via a dual link provided by an embodiment of the present disclosure;
[0029] Figure 4 A flow chart of a method for sending a data packet via a dual link provided by an embodiment of the present disclosure;
[0030] Figure 5 A flowchart of a data transmission method provided by an embodiment of the present disclosure;
[0031] Figure 6 A flow chart of a method for receiving a data packet sent by a first device through a dual link provided in an embodiment of the present disclosure;
[0032] Figure 7A flow chart of a method for receiving a data packet sent by a first device through a dual link provided in an embodiment of the present disclosure;
[0033] Figure 8 A flow chart of a method for receiving a data packet sent by a first device through a dual link provided in an embodiment of the present disclosure;
[0034] Fig.9A A schematic diagram of a flow chart of a data transmission method in a sending direction provided by an embodiment of the present disclosure;
[0035] Fig. 9B A schematic diagram of a flow chart of a receiving direction of a data transmission method provided by an embodiment of the present disclosure;
[0036] Fig.10 A comparison diagram of two technical solutions provided in the embodiments of the present disclosure;
[0037] Fig.11 A schematic diagram of the structure of a first device provided in an embodiment of the present disclosure;
[0038] Fig.12 A schematic diagram of the structure of a second device provided in an embodiment of the present disclosure;
[0039] Fig.13 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure;
[0040] Fig.14 A schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0042] In the field of multi-device interconnection, there is a delay problem when using WLAN or WIFI for data transmission. In the Smart Link Aggregation (SLA) technology, the peak rate of the device is increased or the stability of the network is enhanced through the concurrent mode of 5GHz / 2.4GHz WLAN or WLAN / cellular network. This technology monitors the number of data packets sent via WLAN. When the amount of data sent via WLAN per unit time is not greater than the threshold, a new socket link is opened on the alternative WLAN or cellular network to supplement the bandwidth, thereby optimizing the user's browsing experience.
[0043] The Multi-Link Operation link aggregation technology in WIFI7, referred to as MLO, allows devices that support this technology to establish two-band WIFI connections, such as 2.4GHZ+5GHz / 6GHz, 5GHz+5GHz / 6GHz. After the link is established, one or both links can be used for transmission according to the actual usage scenario. During transmission, you can also switch between the two modes of copy transmission and joint transmission, and choose to improve transmission stability or data throughput according to the actual scenario. Compared with traditional dual WIFI technology: 1. In traditional dual WIFI technology, only one link is in working state at the same time, while the two links of MLO can be in working state at the same time. 2. Traditional dual WIFI is regarded as two network cards at the operating system level, with two IP addresses, and link data aggregation needs to be performed at the upper layer. MLO provides aggregation of dual links at the MAC layer, which is completely transparent to the upper layer. Both of the above technical solutions cannot avoid data delay, thereby reducing the user experience.
[0044] In summary, in order to solve the technical problems in the related art, the embodiment of the present disclosure provides a data transmission method, which is executed by the first device: adding a tag to the sending data packet, the tag is used to identify that the sending data packet is sent via a dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device; sending the sending data packet through the dual link. Executed by the second device: receiving the sending data packet sent by the first device through the dual link, wherein a tag is added to the sending data packet, and the tag is used to identify that the sending data packet is sent via a dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device. When transmitting data in an interconnection scenario between two devices, while transmitting images, sounds, and control data through a wireless connection, the control data is redundantly sent through a Bluetooth connection to reduce the jitter of the wireless connection transmission delay. This technical solution aims to redundantly send network data packets originally sent through a wireless connection through a Bluetooth connection, and deduplicate the data packets at the receiving end, thereby utilizing the low delay jitter of the Bluetooth connection to improve the delay performance of data packets with time requirements.
[0045] The data transmission method provided by the present application will be described in detail below with reference to the accompanying drawings.
[0046] Figure 1 The following is a flow chart of a data transmission method provided by an embodiment of the present disclosure. Figure 1 As shown, the method can be performed by the first device. The method can include the following steps.
[0047] Step 101: Add a label to a sent data packet.
[0048] Before sending a packet, confirm that the packet is sent.
[0049] In some embodiments, determining to send a data packet is to determine a data packet for transmission from data packets obtained from a network protocol stack.
[0050] In some embodiments, data packets can be filtered by setting preset conditions, and data packets that meet the preset conditions can be determined as sent data packets. The preset conditions can be a certain length or need to be sent via dual links, etc., which is not limited by the present disclosure.
[0051] In the above embodiment, determining a data packet that meets a preset condition as a transmission data packet can prevent other data packets from occupying a transmission channel.
[0052] In some embodiments, the tag in the data packet is used to identify that the data packet is sent via the dual link.
[0053] In some embodiments, the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device.
[0054] In some embodiments, the first device may establish a wireless connection with the second device and obtain a quadruple corresponding to the wireless connection.
[0055] In some embodiments, the quadruple corresponding to the wireless connection includes source IP, destination IP, source port, and destination port.
[0056] In some embodiments, the first device may establish a Bluetooth connection with the second device and obtain a Bluetooth address and a Bluetooth connection identifier of the second device. Optionally, the Bluetooth connection may refer to Bluetooth in a broad sense or Bluetooth Low Energy (BLE), which is not limited in the present disclosure.
[0057] For example, the first device establishes a BLE connection with the second device, and obtains a BLE Connection Handle according to the BLE address of the opposite device.
[0058] In some embodiments, adding a label includes adding a first label and a second label to a transmitted data packet, wherein the first label is used to identify a sequence number of the transmitted data packet, and the second label is used to identify that the transmitted data packet is transmitted via a dual link. The location where the label is added to the transmitted data packet may be the header, the tail, etc. of the data packet, which is not limited by the present disclosure.
[0059] In some embodiments, the tag added by the first device may be a tag TAG added at the end, wherein the tag includes a sequence number sequencenumber (sn for short) and a special identifier magnic number (mn for short). The sequencenumber represents the sequence number of the transmitted data packet, and each transmitted data packet increases by 1. The magnic number represents the transmitted data packet processed by the method.
[0060] In the above embodiment, the purpose of adding a label to the sent data packet is to mark the data packet so as to facilitate deduplication processing when the second device receives the data packet.
[0061] Step 102: Send a data packet via a dual link.
[0062] In some embodiments, the first device sends a transmission data packet to the second device via a wireless connection, and sends a transmission data packet to the second device via a Bluetooth connection. For example, the first device may copy the transmission data packet before sending the transmission data packet, and send the data packet via the wireless connection and the Bluetooth connection respectively.
[0063] In some embodiments, the first device's function of sending and receiving data packets via a Bluetooth connection may be implemented through a Bluetooth chip driver, that is, through the Linux kernel. For example, the first device sends data packets through the Bluetooth chip driver, and the second device receives data packets through the Bluetooth chip. Optionally, the first device's function of sending and receiving data packets via a Bluetooth connection may also be implemented through the Bluetooth protocol stack of the Android system of the first device. For example, the first device sends data packets through a virtual network card (such as a TUN driver).
[0064] In summary, in the above embodiments of the present application, the first device adds a tag to the sent data packet, sends the sent data packet through a dual link, sends the network data packet through a wireless connection, and performs redundant transmission through a Bluetooth connection at the same time, thereby reducing the jitter of the wireless connection transmission delay.
[0065] The advantages of the disclosed embodiment are: the wireless connection uses CSMA / CA technology to avoid data transmission failure caused by multiple devices occupying the channel at the same time. This solution will compete for the channel when there are multiple wireless connection devices in use at the same time in the channel, resulting in increased delays for some data packets. The Bluetooth connection uses time division multiple access technology, and devices use fixed time slices for communication, which has the characteristic of stable delay. The Bluetooth connection technology is used to redundantly send data packets that were originally transmitted only through the wireless connection, thereby reducing the delay jitter of the wireless connection.
[0066] Figure 2 A flow chart of a method for determining to send a data packet provided by an embodiment of the present disclosure. Figure 1 The embodiment shown, Figure 2 Yes Figure 1 Further description of . Figure 2 The illustrated embodiment may include the following steps.
[0067] Step 201: register a first filter function in a sending direction through a first interface of a first device.
[0068] In some embodiments, the first interface of the first device may be a netfilter interface.
[0069] In some embodiments, the first device may register a first filter function in a sending direction through a netfilter interface.
[0070] In some embodiments, the first device registers a first filter function in a sending direction in order to filter data packets obtained from a network protocol stack.
[0071] Step 202: Obtain one or more data packets.
[0072] In some embodiments, the first device may obtain one or more data packets from a network protocol stack, or may obtain data packets in other ways, which is not limited by the present disclosure.
[0073] In some embodiments, the network protocol stack may be TCP / UDP. For example, the first device obtains one or more data packets via TCP / UDP.
[0074] In some embodiments, one or more data packets are obtained for screening by the first device, so that the first device can select a qualified data packet as a sending data packet.
[0075] Step 203: From one or more data packets, a data packet that meets a preset condition is determined as a sending data packet through a first filtering function.
[0076] In some embodiments, the preset condition may be that the length of the sent data packet corresponds to the four-tuple, and the length of the sent data packet is less than or equal to the first threshold.
[0077] In some embodiments, the first threshold may be specified when establishing the dual-link connection.
[0078] For example, the first device registers a filtering function in the sending direction through the netfilter interface of the Android system Linux kernel (hereinafter referred to as the kernel), and obtains a network data packet (skb) in the sending direction that is consistent with the aforementioned WLAN quadruple and has a length less than the specified maximum length.
[0079] Optionally, the first device may register a second filter function for the receiving direction while registering the first filter function, so that the first device can filter data packets when acting as a receiver, which is not elaborated in the present disclosure.
[0080] In an embodiment of the present disclosure, a first filter function of a sending direction is registered through a first interface of a first device; one or more data packets are obtained; and from the one or more data packets, a data packet that meets a preset condition is determined as a sending data packet through the first filter function. The data packets can be screened and only the data packets that meet the condition are transmitted, thereby improving communication efficiency and preventing other data packets from occupying the channel.
[0081] Figure 3 A flow chart of a method for sending a data packet via a dual link provided by an embodiment of the present disclosure. Figure 1 or Figure 2 The embodiment shown, Figure 3 right Figure 1 Step 102 in the embodiment is further described. Figure 3 The embodiment shown shows that the sending and receiving of data packets is realized by driving the Bluetooth chip, including the following steps:
[0082] Step 301, copy a transmission data packet to obtain a first transmission data packet and a second transmission data packet.
[0083] In some embodiments, the purpose of duplicating the transmit data packet is to enable the transmit data packet to be transmitted on a dual link.
[0084] In some embodiments, the first transmitted data packet and the second transmitted data packet are the same transmitted data packet, and dual-link transmission of the same data packet can be achieved.
[0085] Step 302: Send a first data packet via a wireless connection.
[0086] In some embodiments, the first transmitted data packet is transmitted via a wireless connection.
[0087] Step 303: Add a Bluetooth message header to the second transmission data packet, and send the second transmission data packet via the Bluetooth connection through the driver of the Bluetooth chip of the first device.
[0088] In some embodiments, the Bluetooth message header may be an Asynchronous Connection-oriented Link (ACL) and a Host Controller Interface (HCI) message header.
[0089] In some embodiments, the Bluetooth message header may include the message length of the HCI, the length of the ACL data, and the assembly operation code (operation code, op_code) of the ACL data. For example, the op_code may be 0xff which is not defined in the Bluetooth protocol.
[0090] In some embodiments, the Bluetooth connection may be established as a kernel thread, which may avoid the problem that the netfilter function is an atomic operation and cannot operate the Bluetooth driver.
[0091] In this embodiment, after the first device adds a tag to the sending data packet, it can copy the sending data packet. The original sending data packet is continued to be processed by the Linux kernel and sent via WLAN (sent through a wireless connection). The copied new sending data packet is added to the BLE sending queue and sent by the BLE channel (sent through a Bluetooth connection).
[0092] Optionally, the BLE channel is a software module in a Bluetooth driver (BTDriver for short) in the kernel, which is responsible for sending and receiving Bluetooth messages.
[0093] Optionally, the BLE channel adds a Bluetooth ACL and an HCI message header to the aforementioned data packet to be sent to form an HCI message. The BLE channel module sends the HCI message to be sent to the Bluetooth chip, and the Bluetooth chip sends the data packet to the Bluetooth chip of the second device.
[0094] In the embodiments of the present disclosure, designing the Bluetooth connection channel in the kernel driver can minimize the delay of Bluetooth connection channel transmission.
[0095] Figure 4 A flow chart of a method for sending a data packet via a dual link provided by an embodiment of the present disclosure. Figure 1 or Figure 2 The embodiment shown, Figure 4 right Figure 1 Step 102 in the embodiment is further described. Figure 4 The embodiment shown shows that the sending and receiving of data packets is implemented through the Bluetooth protocol stack of the Android system, including the following steps:
[0096] Step 401, copy a transmission data packet to obtain a first transmission data packet and a second transmission data packet.
[0097] In some embodiments, the purpose of duplicating the transmit data packet is to enable the transmit data packet to be transmitted on a dual link.
[0098] In some embodiments, the first transmitted data packet and the second transmitted data packet are the same transmitted data packet, and dual-link transmission of the same data packet can be achieved.
[0099] Step 402: Send a first data packet via a wireless connection.
[0100] In some embodiments, the first transmitted data packet is sent via a wireless connection.
[0101] Step 403, add a Bluetooth message header to the second sending data packet, forward the second sending data packet to the virtual network card driver of the first device through the Bluetooth protocol stack of the Android system of the first device, and send the second sending data packet via the Bluetooth connection and the second interface of the first device.
[0102] In some embodiments, the Bluetooth message header may add an assembly operation code (operation code, op_code) of the ACL data. For example, the operation code may be an op_code of 0xff which is not defined by the Bluetooth protocol.
[0103] In some embodiments, the Bluetooth protocol stack may be a virtual network device implemented based on a standard linuxtun device.
[0104] In this embodiment, after the first device adds a tag to the sending data packet, it can copy the sending data packet. The original sending data packet is continued to be processed by the Linux kernel and sent via WLAN (sent through a wireless connection). The copied new sending data packet is added to the BLE sending queue and sent by the BLE channel (sent through a Bluetooth connection).
[0105] For example, a BLE channel may be a software module in a Bluetooth protocol stack, which is responsible for sending and receiving Bluetooth messages.
[0106] Optionally, the BLE channel adds a Bluetooth ACL message header to the aforementioned data packet to be sent to become an HCI message. After the BLE channel module copies and forwards the HCI message to be sent to the virtual network device, the TUN driver forwards the data packet to the Bluetooth protocol stack of the second device.
[0107] In an embodiment of the present disclosure, the Bluetooth connection channel is designed in the Android Bluetooth protocol stack, which is easier to implement than designing the Bluetooth connection channel in the kernel driver. Figure 5 The following is a flow chart of a data transmission method provided by an embodiment of the present disclosure. Figure 5 As shown, the method can be performed by a second device. The method can include the following steps:
[0108] Step 501: receiving a transmission data packet sent by a first device via a dual link.
[0109] In some embodiments, a tag is added to the transmitted data packet.
[0110] In some embodiments, the label in the transmitted data packet includes a first label and a second label, wherein the first label is used to identify the sequence number of the transmitted data packet, and the second label is used to identify that the transmitted data packet is transmitted via a dual link.
[0111] In some embodiments, the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device.
[0112] In some embodiments, the second device receives, via a wireless connection, a first transmitted data packet sent by the first device via a wireless connection.
[0113] In some embodiments, the second device may receive the second transmitted data packet sent by the first device through a BLE channel, or may receive the second transmitted data packet sent by the first device through other Bluetooth connections, which is not elaborated in the present disclosure.
[0114] For example, the BLE channel may be a software module in a Bluetooth driver in the kernel, which is responsible for receiving Bluetooth messages.
[0115] For example, the BLE channel may be a software module in the Bluetooth protocol stack, which is responsible for receiving Bluetooth messages.
[0116] Figure 6 A flow chart of a method for receiving a data packet sent by a first device via a dual link provided in an embodiment of the present disclosure. Figure 5 The embodiment shown, Figure 6 right Figure 5 Step 501 in the embodiment is further described. Figure 6 The illustrated embodiment includes the following steps:
[0117] Step 601: register a second filter function in a receiving direction through a first interface of a second device.
[0118] In some embodiments, the second filtering function is to filter the data packets received by the second device.
[0119] In some embodiments, the first interface of the second device may be a netfilter interface, used to register a second filter function in a receiving direction.
[0120] For example, the second device registers a filter function for the receiving direction through the netfilter interface of the Android system Linux kernel (hereinafter referred to as the kernel), and obtains a network data packet (skb) for the receiving direction that is consistent with the aforementioned WLAN four-tuple and has a length less than the specified maximum length.
[0121] Optionally, the second device may register the first filtering function of the sending direction while registering the second filtering function, so that the first device can filter the data packet when it is the receiver, which is not described in detail in this disclosure. Step 602, determine whether the sending data packet meets the preset condition through the second filtering function.
[0122] In some embodiments, the preset condition may be that the length of the sent data packet corresponds to the quadruple, and the length of the sent data packet is less than or equal to a first threshold.
[0123] In some embodiments, the first threshold may be specified when establishing the dual-link connection.
[0124] Step 603: Determine whether the sent data packet meets the first arrival condition according to the label.
[0125] In some embodiments, whether the transmitted data packet arrives for the first time is determined based on a first tag in the tags, wherein the first tag identifies a sequence number of the transmitted data packet.
[0126] Step 604: When the sent data packet does not meet the first arrival condition, the sent data packet is discarded.
[0127] In some embodiments, when the first label of the sent data packet does not appear for the first time, it is determined that the first arrival condition is not met, that is, the data packet has been transmitted once, and the sent data packet is discarded.
[0128] For example, for the skb in the receiving direction, check whether there is a tag carrying the correct mn at the tail. If so, determine whether the skb is the first arrival based on sn. If not, discard the skb. If it is the first arrival, delete the tag mark and continue processing by the Linux network protocol stack.
[0129] Step 605: When the sent data packet meets the first arrival condition, the arrival timestamp of the sent data packet is determined according to the label.
[0130] In some embodiments, when the first tag of a sent data packet appears for the first time, it is determined that the first arrival condition is met, and the arrival timestamp of the sent data packet is determined according to the tag.
[0131] In some embodiments, the arrival timestamp is used to mark the time when the transmitted data packet arrives at the second device, that is, the time when the second device receives the transmitted data packet.
[0132] In some embodiments, the arrival timestamp of the transmitted data packet is determined in order to determine whether the transmitted data packet exceeds a set time threshold, that is, exceeds a maximum time range for transmitting the data packet.
[0133] Step 606: When the arrival timestamp exceeds a preset time threshold, the tag is deleted.
[0134] In some embodiments, the preset time threshold is configured by the second device.
[0135] In some embodiments, the preset time threshold is used to define a time range for sending a data packet, so as to avoid that both the data packet sent via the wireless connection and the data packet sent via the Bluetooth connection are determined by the second device as arriving for the first time and thus are received repeatedly.
[0136] For example, for each data packet arriving for the first time, its arrival timestamp is recorded according to the sn, and a timeout period with a configurable length is specified. When a data packet with the same sn arrives within the timeout period, it is considered as a non-first arrival data packet and is discarded. When a data packet with the same sn arrives outside the timeout period, it is considered as the first arrival.
[0137] In an embodiment of the present disclosure, the second device simultaneously receives the sending data packets sent by the first device through the wireless connection and the Bluetooth connection, and then screens and filters the received sending data packets through the second filtering function registered by the second device to retain the sending data packets that meet the preset conditions to avoid repeated reception of data packets.
[0138] Figure 7 A flow chart of a method for receiving a data packet sent by a first device via a dual link provided in an embodiment of the present disclosure. Figure 5 , Figure 6 The embodiment shown, Figure 7 right Figure 5 Step 501 in the embodiment is further described. Figure 7 The illustrated embodiment includes the following steps:
[0139] Step 701: Receive a first transmission data packet via a wireless connection.
[0140] In some embodiments, the second device receives, via a wireless connection, a first transmitted data packet sent by the first device via a wireless connection.
[0141] Step 702: Receive a second transmission data packet via a Bluetooth connection through a Bluetooth chip of a second device.
[0142] In some embodiments, the second device receives, via a Bluetooth chip, a second transmission data packet sent by the first device via a Bluetooth connection.
[0143] In some embodiments, the Bluetooth chip is configured in a kernel driver.
[0144] For example, the Bluetooth channel may be a software module in a Bluetooth driver in the kernel, which is responsible for receiving Bluetooth messages.
[0145] Step 703: when it is detected that the operation code carried in the second transmitted data packet meets the preset receiving condition, the message header of the second transmitted data packet is removed.
[0146] In some embodiments, the header of the second transmitted data packet may be an ACL header and an HCI header.
[0147] In some embodiments, the preset receiving condition may be a message with an op_code of 0xff. Step 704: using the kernel interface of the second device, send the second transmission data packet to the network protocol stack for processing.
[0148] For example, when the Bluetooth chip receives an HCI message, the BLE channel parses the ACL message header and the HCI message header, processes the message with op_code 0xff, removes the message header, and hands it over to the network protocol stack for processing through the kernel's netfilter interface.
[0149] In the embodiments of the present disclosure, designing the Bluetooth connection channel in the kernel driver can minimize the delay of Bluetooth connection channel transmission.
[0150] Figure 8 A flow chart of a method for receiving a data packet sent by a first device via a dual link provided in an embodiment of the present disclosure. Figure 5 The embodiment shown, Figure 8 right Figure 5 Step 501 in the embodiment is further described. Figure 8 The illustrated embodiment includes the following steps:
[0151] Step 801: Receive a first transmission data packet via a wireless connection.
[0152] In some embodiments, the second device receives, via a wireless connection, a first transmitted data packet sent by the first device via a wireless connection.
[0153] Step 802: Receive a second transmission data packet through the Bluetooth chip of the second device via the Bluetooth connection and the second interface of the second device.
[0154] In some embodiments, the second interface of the second device may be a netfilter interface.
[0155] In some embodiments, the Bluetooth connection of the second device may be a virtual network device implemented in the Bluetooth protocol stack based on a standard Linux TUN device.
[0156] Step 803: when it is detected that the operation code carried in the second transmitted data packet meets the preset receiving condition, the message header of the second transmitted data packet is removed.
[0157] In some embodiments, the preset receiving condition may be that the operation code op_code for sending the data packet is 0xff.
[0158] Step 804: Use the interface of the virtual network card driver of the second device to send the second sending data packet to the virtual network card driver.
[0159] Step 805: Send the second transmission data packet to the network protocol stack for processing through the virtual network card driver.
[0160] For example, when the Bluetooth chip receives an HCI message, it sends the message to the BLE channel in the Bluetooth protocol stack for detection. When a message with op_code 0xff is detected, the message header is removed and sent to the TUNDriver (TUN driver) using the interface of the TUN device, and further sent to the network protocol stack by the TUNDriver for processing.
[0161] In an embodiment of the present disclosure, the Bluetooth connection channel is designed in the Android Bluetooth protocol stack, which is easier to implement than designing the Bluetooth connection channel in the kernel driver.
[0162] Fig.9A and Fig. 9B The following is a flow chart of an embodiment of the present disclosure. Fig.9A Schematic diagram of the process in the receiving direction Fig. 9B .
[0163] 1. Establish a 5GHz WLAN link between two Android devices, in P2P or hotspot mode, and obtain the target socket's quaternary group, i.e., the source IP, destination IP, source port, and destination port of the TCP / UDP connection, hereinafter referred to as the WLAN quaternary group. Taking the screen mirroring function of the Xiaomi interconnection scenario as an example, the screen mirroring application establishes a 5GHz WLAN link and obtains the WLAN quaternary group.
[0164] 2. Establish a BLE link between the two devices and obtain the BLE address of the target device. Taking the screen mirroring function as an example, the screen mirroring application establishes a BLE link and obtains the BLE address of the peer device.
[0165] The BLE link established in step 2 is a Bluetooth connection, and may also be other types of Bluetooth connections.
[0166] 3. Get the BLE Connection Handle (hereinafter referred to as conn_id) according to the BLE address of the peer device.
[0167] 4. Specify a configurable maximum length, use the netfilter interface of the linux kernel (hereinafter referred to as kernel) of the Android device, register the filter functions in the sending and receiving directions, and obtain the sending and receiving direction network data packets (hereinafter referred to as skb) that are consistent with the aforementioned WLAN four-tuple and have a length less than the specified maximum length.
[0168] Step 4 shows Figure 2 The method flow includes registering a first filtering function of a sending direction through a first interface of a first device; obtaining one or more data packets; and determining, from the one or more data packets, through the first filtering function, a data packet that meets a preset condition as a sending data packet.
[0169] 5. For the skb in the sending direction, add a tag TAG to the end of the skb for the receiving end to identify. TAG contains sequence_number (hereinafter referred to as sn), magnic_number (hereinafter referred to as mn), where sn is an unsigned int type, indicating the sequence number of the data packet sent by this method, and each sent skb is incremented by 1. mn is a special identifier used to identify the skb as a special skb processed by this method.
[0170] Step 5 is to add a label to the sent data packet, wherein sequence_number (hereinafter referred to as sn) is the first label and magnic_number (hereinafter referred to as mn) is the second label.
[0171] 6. For the data packet in the sending direction, after the tag is added, the skb is copied, the original skb is processed by the Linux kernel and sent via WLAN. The new skb is added to the BLE send queue and sent by the BLE channel.
[0172] Step 6 shows Figure 3 , Figure 4 The method flow chart of the embodiment shown. It includes copying a transmission data packet to obtain a first transmission data packet and a second transmission data packet; sending the first transmission data packet through a wireless connection; adding a Bluetooth message header to the second transmission data packet, and sending the second transmission data packet through a Bluetooth connection through a driver of a Bluetooth chip of a first device. Alternatively, a Bluetooth message header is added to the second transmission data packet, and the second transmission data packet is forwarded to the virtual network card driver of the first device through the Bluetooth protocol stack of the Android system of the first device, and the second transmission data packet is sent through a Bluetooth connection and a second interface of the first device.
[0173] 7. For the skb in the receiving direction, check whether there is a tag carrying the correct mn at the end of the skb. If so, determine whether the skb is the first arrival based on sn. If not, discard the skb. If it is the first arrival, delete the tag and continue processing by the Linux network protocol stack.
[0174] Step 7 shows Figure 6 The method flow chart of the embodiment shown in step 603 and step 604 in FIG. includes: determining whether the sent data packet meets the first arrival condition according to the label; and discarding the sent data packet when the sent data packet does not meet the first arrival condition.
[0175] 8. For each data packet that arrives for the first time, its arrival timestamp is recorded according to the sn, and a configurable timeout is specified. When a data packet with the same sn arrives within the timeout, it is considered as a non-first arrival and is discarded. When a data packet with the same sn arrives outside the timeout, it is considered as the first arrival.
[0176] Step 8 shows Figure 6 The method flow chart of the embodiment shown in step 605 and step 606 includes: when the sent data packet meets the first arrival condition, determining the arrival timestamp of the sent data packet according to the tag; when the arrival timestamp exceeds the preset time threshold, deleting the tag.
[0177] 9a. The BLE sending queue is a kernel thread established by this method, which avoids the problem that the netfiler function is an atomic operation and cannot operate the Bluetooth driver.
[0178] 10a. The BLE channel is a software module in the Bluetooth driver (hereinafter referred to as BTDriver) in the kernel, which is responsible for sending and receiving Bluetooth messages.
[0179] 11a. The BLE channel adds the Bluetooth ACL and HCI message header to the aforementioned data packet to be sent to become an HCI message, including the aforementioned HCI message type, HCI message length, the aforementioned conn_id, ACL data length and op_code of the ACL data, where op_code uses 0xff which is not defined in the Bluetooth protocol.
[0180] 12a. The BLE channel module sends the HCI message to be sent to the Bluetooth chip.
[0181] 13a. When the Bluetooth chip receives the HCI message, the BLE channel parses the ACL message header and the HCI message header, processes the message with op_code 0xff, removes the message header and hands it over to the network protocol stack through the kernel's netif_rx_ni interface for processing.
[0182] Steps 9a-13a show Figure 7 The method flow chart includes: receiving a first transmission data packet through a wireless connection; receiving a second transmission data packet through a Bluetooth connection through a Bluetooth chip of a second device; removing a message header of the second transmission data packet when it is detected that the operation code carried in the second transmission data packet meets a preset receiving condition; and sending the second transmission data packet to a network protocol stack for processing using a kernel interface of the second device.
[0183] 9b. The BLE sending queue is a virtual network device implemented by the Bluetooth protocol stack (hereinafter referred to as BTStack) based on the standard linuxtun device. After netfilter copies and forwards the target skb to the virtual network device, the tun driver (virtual network card, no chip) forwards the skb to the BTStack in the user space.
[0184] 10b. The BLE channel is a software module within BTStack that is responsible for sending and receiving Bluetooth messages.
[0185] 11b. The BLE channel adds the op_code of the ACL data to the aforementioned data packet to be sent, wherein the op_code uses 0xff (256, a number identified in hexadecimal) which is not defined in the Bluetooth protocol.
[0186] 12b. The BLE channel uses the BTStack interface (used to send and receive Bluetooth data) to send ordinary Bluetooth data packets.
[0187] 13b. When the Bluetooth chip receives an HCI message, it sends the message to the BLE channel in BTStack for detection. When a message with op_code 0xff is detected, the message header is removed and sent to TUNDriver (tun driver) using the interface of the tun device, which is then sent to the network protocol stack for processing.
[0188] Steps 9b-13b show Figure 8 The method flow chart includes: receiving a first transmission data packet through a wireless connection; receiving a second transmission data packet through a Bluetooth chip of a second device via a Bluetooth connection and a second interface of the second device; removing a message header of the second transmission data packet when it is detected that the operation code carried in the second transmission data packet meets a preset receiving condition; sending the second transmission data packet to a virtual network card driver using an interface of a virtual network card driver of the second device; and sending the second transmission data packet to a network protocol stack for processing through the virtual network card driver.
[0189] Fig.10A comparison diagram of two technical solutions provided in the embodiment of the present disclosure is shown in FIG. Figure 3 and Figure 4 The embodiment shown and Figure 7 and Figure 8 A comparison of the schemes of the illustrated embodiments.
[0190] Among them, (1) shows Figure 4 and Figure 8 The data transmission scheme of the embodiment shown includes forwarding the second data packet to the virtual network card driver of the first device through the Bluetooth protocol stack of the Android system of the first device, sending the second data packet via the Bluetooth connection and the second interface of the first device, and receiving the second data packet through the Bluetooth chip of the second device via the Bluetooth connection and the second interface of the second device.
[0191] Among them, (2) shows that Figure 3 and Figure 7 The data transmission scheme of the embodiment shown includes sending a second transmission data packet via a Bluetooth connection through the driver of the Bluetooth chip of the first device, and receiving the second transmission data packet via a Bluetooth connection through the Bluetooth chip of the second device.
[0192] For the design of Bluetooth channel, designing it in the kernel driver can minimize the delay of Bluetooth channel transmission, that is, Fig.10 The solution shown in (2) in the figure is difficult to implement in the kernel, so the Bluetooth channel is designed in the Bluetooth protocol stack of the Android system, that is, Fig.10 The solution shown in (1) can be easily implemented and can also realize dual-link data transmission.
[0193] Fig.11 FIG. 1 is a schematic diagram of the structure of a first device 1100 according to an embodiment of the present disclosure. Fig.11 As shown, the first device includes:
[0194] A processing module 1101 is used to add a tag to the sent data packet, where the tag is used to identify that the sent data packet is sent via a dual link, where the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device;
[0195] The transceiver module 1102 is configured to send the data packet via the dual link.
[0196] In some embodiments, the first device 1100 also includes a determination module, which is used to: register a first filtering function of the sending direction through the first interface of the first device; obtain one or more data packets; and from the one or more data packets, through the first filtering function, determine a data packet that meets a preset condition as a sending data packet, wherein the preset condition is: the length of the sending data packet corresponds to a four-tuple, and the length of the sending data packet is less than or equal to a first threshold.
[0197] In some embodiments, the processing module is used to: establish a wireless connection and obtain a quadruple corresponding to the wireless connection; establish a Bluetooth connection and obtain a Bluetooth address and a Bluetooth connection identifier of the second device.
[0198] In some embodiments, the processing module is further used to: add a first label and a second label to the end of the transmitted data packet, wherein the first label is used to identify the sequence number of the transmitted data packet, and the second label is used to identify that the transmitted data packet is transmitted via a dual link.
[0199] In some embodiments, the transceiver module is used to: copy the send data packet to obtain a first send data packet and a second send data packet; send the first send data packet via a wireless connection; add a Bluetooth message header to the second send data packet, and send the second send data packet via a Bluetooth connection through the driver of the Bluetooth chip of the first device.
[0200] In some embodiments, the transceiver module is also used to: copy the send data packet to obtain a first send data packet and a second send data packet; send the first send data packet through a wireless connection; add a Bluetooth message header to the second send data packet, forward the second data packet to the virtual network card driver of the first device through the Bluetooth protocol stack of the Android system of the first device, and send the second send data packet via the Bluetooth connection and the second interface of the first device.
[0201] Fig.12 FIG. 1 is a schematic diagram of the structure of a second device 1200 according to an embodiment of the present disclosure. Fig.12 As shown, the second device includes:
[0202] The transceiver module 1201 is used to receive a transmission data packet sent by the first device through a dual link, wherein a tag is added to the transmission data packet, and the tag is used to identify that the transmission data packet is sent via the dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device.
[0203] In some embodiments, the second device also includes a processing module for: registering a second filtering function of the receiving direction through the first interface of the second device; and determining whether the sent data packet meets a preset condition through the second filtering function, wherein the preset condition is: the length of the sent data packet corresponds to a four-tuple, and the length of the sent data packet is less than or equal to a first threshold.
[0204] In some embodiments, the processing module is also used to: determine whether the sent data packet meets the first arrival condition based on the label, wherein the label includes a first label and a second label, the first label is used to identify the sequence number of the sent data packet, and the second label is used to identify that the sent data packet is sent via a dual link; when the sent data packet does not meet the first arrival condition, the sent data packet is discarded.
[0205] In some embodiments, the processing module is further used to: when the sent data packet meets the first arrival condition, determine the arrival timestamp of the sent data packet according to the label; when the arrival timestamp exceeds a preset time threshold, delete the label.
[0206] In some embodiments, the transceiver module is further used to: receive a first transmission data packet through a wireless connection; receive a second transmission data packet through a Bluetooth connection through a Bluetooth chip of a second device. When it is detected that the operation code carried in the second transmission data packet meets the preset receiving condition, remove the message header of the second transmission data packet; and send the second transmission data packet to the network protocol stack for processing using the kernel interface of the second device.
[0207] In some embodiments, the processing module is further used to: receive a first transmission data packet through a wireless connection; receive a second transmission data packet through a Bluetooth chip of a second device, via a Bluetooth connection and a second interface of the second device. When it is detected that the operation code carried in the second transmission data packet meets the preset receiving condition, remove the message header of the second transmission data packet; use the interface of the virtual network card driver of the second device to send the second transmission data packet to the virtual network card driver; send the second transmission data packet to the network protocol stack for processing through the virtual network card driver.
[0208] In summary, the data transmission method proposed in the present disclosure is executed by the first device: adding a tag to the sending data packet, the tag is used to identify that the sending data packet is sent via a dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device; sending the sending data packet through the dual link. Executed by the second device: receiving the sending data packet sent by the first device through the dual link, wherein a tag is added to the sending data packet, the tag is used to identify that the sending data packet is sent via a dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device. When transmitting data in an interconnection scenario between two devices, the network data packets originally sent through the wireless connection are redundantly sent through the Bluetooth connection, and the data packets are deduplicated at the receiving end, thereby utilizing the low delay jitter of the Bluetooth connection to improve the delay performance of data packets with time requirements.
[0209] Fig.13is a structural diagram of an electronic device 1300 for implementing the above data transmission method according to an exemplary embodiment.
[0210] For example, the electronic device 1300 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0211] Reference Fig.13 , the electronic device 1300 may include one or more of the following components: a processing component 1302 , a memory 1304 , a power component 1306 , a multimedia component 1308 , an audio component 1310 , an input / output (I / O) interface 1312 , a sensor component 1314 , and a communication component 1316 .
[0212] The processing component 1302 generally controls the overall operation of the electronic device 1300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1302 may include one or more modules to facilitate the interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate the interaction between the multimedia component 1308 and the processing component 1302.
[0213] The memory 1304 is configured to store various types of data to support operations on the electronic device 1300. Examples of such data include instructions for any application or method operating on the electronic device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0214] The power supply component 1306 provides power to the various components of the electronic device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1300.
[0215] The multimedia component 1308 includes a screen that provides an output interface between the electronic device 1300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the electronic device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0216] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (MIC), and when the electronic device 1300 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1304 or sent via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
[0217] I / O interface 1312 provides an interface between processing component 1302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0218] The sensor assembly 1314 includes one or more sensors for providing various aspects of status assessment for the electronic device 1300. For example, the sensor assembly 1314 can detect the open / closed state of the electronic device 1300, the relative positioning of components, such as the display and keypad of the electronic device 1300, and the sensor assembly 1314 can also detect the position change of the electronic device 1300 or a component of the electronic device 1300, the presence or absence of user contact with the electronic device 1300, the orientation or acceleration / deceleration of the electronic device 1300, and the temperature change of the electronic device 1300. The sensor assembly 1314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0219] The communication component 1316 is configured to facilitate wired or wireless communication between the electronic device 1300 and other devices. The electronic device 1300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0220] In an exemplary embodiment, the electronic device 1300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0221] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by a processor 1320 of the electronic device 1300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0222] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the data transmission method described in the above embodiments of the present disclosure.
[0223] The embodiments of the present disclosure further provide a computer program product, including a computer program, and the computer program is executed by a processor to execute the data transmission method described in the above embodiments of the present disclosure.
[0224] Fig.14 FIG. 1 is a schematic diagram of a structure of a chip 1400 for implementing the above-mentioned data transmission method according to an exemplary embodiment. Fig.14The chip 1400 includes at least one communication interface 1401 and a processor 1402. The communication interface 1401 is used to receive signals input into the chip 1400 or signals output from the above chip 1400. The processor 1402 communicates with the communication interface 1401 and implements the data transmission method described in the above embodiments of the present disclosure through logic circuits or executing code instructions.
[0225] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0226] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0227] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.
[0228] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (control method), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0229] It should be understood that the various parts of the embodiments of the present disclosure can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0230] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0231] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0232] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, substitute and vary the above embodiments within the scope of the present disclosure.
Claims
1. A data transmission method, characterized in that: The method is performed by a first device, and includes: Adding a tag in a sent data packet, the tag being used to identify that the sent data packet is sent via a dual link, the dual link comprising a wireless connection and a Bluetooth connection between the first device and the second device; The transmit data packet is transmitted via the dual link.
2. The method according to claim 1, characterized in that The method further comprises: Establishing the wireless connection and obtaining a quadruple corresponding to the wireless connection; Establish the Bluetooth connection, and obtain the Bluetooth address and Bluetooth connection identifier of the second device.
3. The method according to claim 2, characterized in that The method further comprises: registering a first filter function in a sending direction through a first interface of the first device; Get one or more data packets; From the one or more data packets, a data packet that meets a preset condition is determined as the sending data packet through the first filtering function, wherein the preset condition is: the length of the sending data packet corresponds to the quadruple, and the length of the sending data packet is less than or equal to a first threshold.
4. The method according to any one of claims 1 to 3, characterized in that Adding a label to the sent data packet includes: Adding a first label and a second label to the tail of the sent data packet, The first label is used to identify the sequence number of the sent data packet, and the second label is used to identify that the sent data packet is sent via the dual link.
5. The method according to any one of claims 1 to 3, characterized in that The sending of the data packet through the dual link comprises: Copying the sending data packet to obtain a first sending data packet and a second sending data packet; Sending the first transmission data packet via the wireless connection; A Bluetooth message header is added to the second transmission data packet, and the second transmission data packet is sent via the Bluetooth connection through the driver of the Bluetooth chip of the first device.
6. The method according to any one of claims 1 to 3, characterized in that The sending of the data packet through the dual link comprises: Copying the sending data packet to obtain a first sending data packet and a second sending data packet; Sending the first transmission data packet via the wireless connection; A Bluetooth message header is added to the second sending data packet, the second sending data packet is forwarded to the virtual network card driver of the first device through the Bluetooth protocol stack of the first device, and the second sending data packet is sent via the Bluetooth connection and the second interface of the first device.
7. A data transmission method, characterized in that: The method is performed by a second device, and includes: receiving a transmission data packet sent by the first device via the dual link, A tag is added to the sending data packet, and the tag is used to identify that the sending data packet is sent via the dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device.
8. The method according to claim 7, characterized in that The method further comprises: registering a second filter function in a receiving direction through the first interface of the second device; Through the second filtering function, it is determined whether the sent data packet meets a preset condition, wherein the preset condition is: the length of the sent data packet corresponds to the four-tuple, and the length of the sent data packet is less than or equal to a first threshold.
9. The method according to claim 7, characterized in that: The method further comprises: Determining, according to the label, whether the sent data packet meets the first arrival condition, wherein the label includes a first label and a second label, the first label is used to identify the sequence number of the sent data packet, and the second label is used to identify that the sent data packet is sent via the dual link; When the sending data packet does not meet the first arrival condition, the sending data packet is discarded.
10. The method according to claim 9, characterized in that The method further comprises: When the sent data packet meets the first arrival condition, determining the arrival timestamp of the sent data packet according to the label; When the arrival timestamp exceeds a preset time threshold, the tag is deleted.
11. The method according to any one of claims 7 to 10, characterized in that The receiving a transmission data packet sent by the first device through the dual link includes: Receiving a first transmission data packet via the wireless connection; A second transmitted data packet is received via the Bluetooth connection by the Bluetooth chip of the second device.
12. The method according to claim 11, characterized in that The method further comprises: When it is detected that the operation code carried in the second sent data packet meets the preset receiving condition, removing the message header of the second sent data packet; The second transmission data packet is sent to a network protocol stack for processing by utilizing a kernel interface of the second device.
13. The method according to any one of claims 7 to 10, characterized in that The receiving a transmission data packet sent by the first device through the dual link includes: Receiving a first transmission data packet via the wireless connection; A second transmission data packet is received by the Bluetooth chip of the second device via the Bluetooth connection and the second interface of the second device.
14. The method according to claim 13, characterized in that The method further comprises: When it is detected that the operation code carried in the second sent data packet meets the preset receiving condition, removing the message header of the second sent data packet; Using an interface of a virtual network card driver of the second device, sending the second sending data packet to the virtual network card driver; The second transmission data packet is sent to the network protocol stack for processing through the virtual network card driver.
15. A first device, characterized in that: include: A processing module, configured to add a tag to the sent data packet, wherein the tag is used to identify that the sent data packet is sent via a dual link, wherein the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device; The transceiver module is used to send the data packet through the dual link.
16. A second device, characterized in that: include: a transceiver module, configured to receive a transmission data packet sent by the first device via a dual link, A tag is added to the sending data packet, and the tag is used to identify that the sending data packet is sent via the dual link, and the dual link includes a wireless connection and a Bluetooth connection between the first device and the second device.
17. An electronic device, characterized in that: include: a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the method described in any one of claims 1-6 or 7-14.
18. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6 or 7-14.
19. A chip, characterized in that: It includes at least one processor and a communication interface; the communication interface is used to receive a signal input to the chip or a signal output from the chip, and the processor communicates with the communication interface and implements the method as described in any one of claims 1-6 or 7-14 through a logic circuit or executing code instructions.