Wireless transmission method and device, electronic equipment and computer readable storage medium
By acquiring wireless transmission quality and target connection interval, determining the number of data packets, and adjusting the data packet fields, the problem of unstable data packet quantity in wireless transmission is solved, achieving more efficient data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN TCL NEW-TECH CO LTD
- Filing Date
- 2024-10-28
- Publication Date
- 2026-05-12
AI Technical Summary
In wireless transmission, it is difficult to guarantee the number of data packets transmitted in each connection interval, which limits data transmission efficiency.
By acquiring the current wireless transmission quality and the target connection interval, the number of data packets to be transmitted in the target connection interval is determined, and the data packet fields are adjusted according to this number to control the sending and receiving of data packets, including omitting return packets and continuous reception, thereby optimizing the data packet transmission process.
This effectively ensures that enough data packets are transmitted during the target connection interval, improves data transmission efficiency, and enhances the overall performance of wireless transmission.
Smart Images

Figure CN119402913B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless transmission technology, specifically to a wireless transmission method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Wireless transmission eliminates the constraints of wired connections, significantly enhancing the user experience. Wireless transmission involves data exchange between each connection interval, and the number of data packets transmitted in each interval is determined by multiple factors, including device design and application requirements; therefore, the exact number of data packets transmitted within each connection interval is difficult to guarantee. Figure 1 As shown, sometimes a connection interval may only transmit one data packet, which greatly limits the data transmission efficiency. Summary of the Invention
[0003] This application provides a wireless transmission method, apparatus, electronic device, and computer-readable storage medium that can ensure sufficient data packets are transmitted during connection intervals.
[0004] In a first aspect, embodiments of this application provide a wireless transmission method applied to a first device, comprising:
[0005] At the target connection interval, obtain the current wireless transmission quality;
[0006] Based on the current wireless transmission quality and the target connection interval, determine the target number of data packets to be transmitted in the target connection interval;
[0007] The target number of data packets are transmitted during the target connection interval.
[0008] In one embodiment, after determining the target number of data packets to be transmitted in the target connection interval, the method further includes:
[0009] Based on the target quantity, the data packet field of the first data packet is adjusted to obtain the first field; the first field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target quantity.
[0010] In one embodiment, the method further includes:
[0011] Based on the target quantity, determine the number of return packets to be omitted;
[0012] Based on the number of omitted return packets, the data packet field of the first data packet is adjusted to obtain the second field; the second field is used to: notify the second device to reduce the number of test data packets sent according to the number of omitted return packets;
[0013] The transmission of the target number of data packets during the target connection interval includes:
[0014] During the target connection interval, the data packets with the omitted number of return packets are sent to the second device;
[0015] After sending the data packet with the number of returned packets omitted, the test data packet sent by the second device according to the second field is received.
[0016] In one embodiment, the method further includes:
[0017] Based on the target quantity, determine the predetermined quantity to be received;
[0018] Based on the predetermined number of data packets to be received, the data packet field of the first data packet is adjusted to obtain the third field; the third field is used to: notify the second device that the number of data packets to be received continuously is the predetermined number of data packets to be received;
[0019] The transmission of the target number of data packets during the target connection interval includes:
[0020] During the target connection interval, a number of data packets equal to the predetermined number of received packets are continuously sent to the second device;
[0021] After continuously sending the predetermined number of data packets, the test data packets sent by the second device according to the third field are received.
[0022] In one embodiment, the method further includes:
[0023] The connection interval adjustment amount is determined based on the predetermined number of receptions corresponding to the target connection interval;
[0024] The next connection interval is determined based on the target connection interval and the connection interval adjustment amount.
[0025] In one embodiment, determining the target number of data packets to be transmitted in the target connection interval based on the current wireless transmission quality and the target connection interval includes:
[0026] Determine the time required to transmit the target data packet under the current wireless transmission quality;
[0027] Based on the target connection interval and the duration, determine the target number of data packets to be transmitted within the target connection interval.
[0028] Secondly, embodiments of this application provide a wireless transmission method applied to a second device, comprising:
[0029] Receive the first data packet sent by the first device during the target connection interval;
[0030] Parse the target field in the first data packet to determine the target quantity; the target quantity is: the number of data packets to be transmitted in the target connection interval, determined based on the current wireless transmission quality and the target connection interval;
[0031] During the target connection interval, data packets transmitted by the first device are received in accordance with the target number.
[0032] In one embodiment, the target field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target number; the method further includes:
[0033] Test data packets are sent at the target connection interval according to the target number.
[0034] In one embodiment, the target field is used to: notify the second device to reduce the number of test data packets sent by omitting a certain number of return packets; the number of omitting return packets is determined based on the target number;
[0035] The method further includes:
[0036] Based on the target field, the number of test data packets to be reduced is determined to be the number of omitted return packets;
[0037] During the target connection interval, after receiving the data packet with the omitted number of return packets sent by the first device, a test data packet is sent to the first device.
[0038] In one embodiment, the target field is used to: notify the second device that the number of data packets continuously received is a predetermined number; the predetermined number is determined based on the target number;
[0039] The method further includes:
[0040] Based on the target field, the number of continuously received data packets is determined to be the predetermined number of packets to be received;
[0041] During the target connection interval, after receiving the predetermined number of data packets continuously sent by the first device, a test data packet is sent to the first device.
[0042] Thirdly, embodiments of this application provide a wireless transmission device applied to a first device, comprising:
[0043] The acquisition module is used to acquire the current wireless transmission quality within the target connection interval;
[0044] The determining module is used to determine the target number of data packets to be transmitted in the target connection interval based on the current wireless transmission quality and the target connection interval;
[0045] A transmission module is used to transmit the target number of data packets within the target connection interval.
[0046] In one embodiment, after determining the target number of data packets to be transmitted in the target connection interval, the apparatus further includes:
[0047] The first adjustment module is used to adjust the data packet field of the first data packet according to the target quantity to obtain the first field; the first field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target quantity.
[0048] In one embodiment, the device further includes:
[0049] The omission determination module is used to determine the number of omitted return packets based on the target quantity;
[0050] The second adjustment module is used to adjust the data packet field of the first data packet according to the number of omitted return packets to obtain the second field; the second field is used to: notify the second device to reduce the number of test data packets sent according to the number of omitted return packets;
[0051] The transmission module includes:
[0052] The first sending unit is configured to send the data packet with the omitted number of return packets to the second device during the target connection interval;
[0053] The first receiving unit is configured to receive the test data packet sent by the second device according to the second field after sending the data packet with the number of omitted return packets.
[0054] In one embodiment, the device further includes:
[0055] The predetermined determination module is used to determine the predetermined number of items to be received based on the target number.
[0056] The third adjustment module is used to adjust the data packet field of the first data packet according to the predetermined number of received packets to obtain a third field; the third field is used to notify the second device that the number of data packets received continuously is the predetermined number of received packets;
[0057] The transmission module includes:
[0058] The second sending unit is configured to continuously send data packets to the second device in a number equal to the predetermined number of received packets during the target connection interval.
[0059] The second receiving unit is configured to receive test data packets sent by the second device according to the third field after continuously sending the predetermined number of data packets.
[0060] In one embodiment, the device further includes:
[0061] The adjustment amount determination module is used to determine the connection interval adjustment amount based on the predetermined number of receptions corresponding to the target connection interval;
[0062] An interval determination module is used to determine the next target connection interval based on the target connection interval and the connection interval adjustment amount.
[0063] In one embodiment, the determining module includes:
[0064] The duration determination unit is used to determine the duration required to transmit the target data packet under the current wireless transmission quality.
[0065] The quantity determination unit is used to determine the target number of data packets to be transmitted in the target connection interval based on the target connection interval and the duration.
[0066] Fourthly, embodiments of this application provide a wireless transmission device applied to a second device, comprising:
[0067] The first receiving module is used to receive the first data packet sent by the first device in the target connection interval;
[0068] The parsing module is used to parse the first data packet and determine the target quantity; the target quantity is the number of data packets to be transmitted in the target connection interval, determined based on the current wireless transmission quality and the target connection interval.
[0069] The second receiving module is used to receive data packets transmitted by the first device in the target connection interval according to the target number.
[0070] In one embodiment, the target field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target number; the apparatus further includes:
[0071] The test sending module is used to send test data packets at the target connection interval according to the target number.
[0072] In one embodiment, the target field is used to: notify the second device to reduce the number of test data packets sent by omitting a certain number of return packets; the number of omitting return packets is determined based on the target number;
[0073] The device further includes:
[0074] The module for determining the number of omitted return packets is used to determine, based on the target field, the number of test data packets to be reduced as the number of omitted return packets;
[0075] The test data packet first sending module is used to send a test data packet to the first device after receiving the data packet with the omitted number of return packets sent by the first device during the target connection interval.
[0076] In one embodiment, the target field is used to: notify the second device that the number of data packets continuously received is a predetermined number; the predetermined number is determined based on the target number;
[0077] The device further includes:
[0078] The predetermined reception quantity determination module is used to determine the number of continuously received data packets as the predetermined reception quantity based on the target field;
[0079] The second test data packet sending module is used to send a test data packet to the first device after receiving the predetermined number of data packets continuously sent by the first device during the target connection interval.
[0080] Fifthly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the wireless transmission method described above.
[0081] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the wireless transmission method described above.
[0082] In a seventh aspect, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.
[0083] In summary, in this embodiment of the application, the target number of data packets to be transmitted in the target connection interval can be determined based on the current wireless transmission quality and the target connection interval, and then the target number of data packets can be transmitted in the target connection interval, effectively ensuring that enough data packets can be transmitted in the target connection interval and improving data transmission efficiency. Attached Figure Description
[0084] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0085] Figure 1 This is a schematic diagram illustrating the interaction of wireless transmission in related technologies;
[0086] Figure 2 This is a schematic diagram of a scenario for a wireless transmission method provided in an embodiment of this application;
[0087] Figure 3 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0088] Figure 4 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0089] Figure 5 This is a schematic flowchart of a wireless transmission method provided in an embodiment of this application;
[0090] Figure 6 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0091] Figure 7 This is a schematic flowchart of a wireless transmission method provided in an embodiment of this application;
[0092] Figure 8 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0093] Figure 9 This is a schematic flowchart of a wireless transmission method provided in an embodiment of this application;
[0094] Figure 10 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0095] Figure 11 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0096] Figure 12 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0097] Figure 13 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application;
[0098] Figure 14 This is a schematic diagram of the structure of a wireless transmission device provided in an embodiment of this application;
[0099] Figure 15 This is a schematic diagram of the structure of a wireless transmission device provided in an embodiment of this application;
[0100] Figure 16 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0101] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0102] Please see Figure 2 , Figure 2 This is a schematic diagram illustrating a scenario of a wireless transmission method provided in an embodiment of this application. The first device and the second device are devices performing wireless transmission, and there can be multiple first devices. The wireless transmission between the first device and the second device can be implemented based on wireless transmission technologies such as Starlink or Bluetooth.
[0103] In one embodiment, the first device is a slave device, and the second device is a master device. The master device has initiative and control, and can proactively initiate requests and control the slave device to complete tasks. The master device is responsible for initiating communication requests, managing the communication process, and can proactively control the slave device to execute corresponding tasks. A slave device is a device that accepts requests from the master device and completes corresponding tasks according to the requests. The slave device responds to the master device's requests and performs corresponding operations. In the computer field, the master device can be a computer, and the corresponding slave device can be a printer or scanner managed by that computer; in the mobile phone field, the master device can be a mobile phone, and the corresponding slave device can be a headset or smartwatch.
[0104] In one embodiment, the identities of the first device and the second device can be interchanged, and bidirectional data interaction can be performed between the first device and the second device.
[0105] In one embodiment, such as in Bluetooth communication, each radio frequency transceiver is assigned a unique address. After a wireless connection is established, one Bluetooth device is selected as the master device, and the others are called slave devices.
[0106] The protocol requires, or to confirm reliable data transmission, that the first device sends a data packet to the second device, and the second device sends a test data packet to the first device. In one embodiment, the second device first sends a test data packet to the first device each time. Upon receiving the test data packet, the first device confirms the reliability of the wireless transmission link and then sends a data packet to the second device. In another embodiment, the first device sends a data packet to the second device, and after receiving the data packet, the second device sends a test data packet to the first device to inform it that it has received the data packet.
[0107] Test packets are packets used to ensure the reliability of the transmission link. Test packets may differ depending on the circumstances. A test packet can be an empty packet, a 1-bit packet, a packet informing the first device that it has received the packet, or a packet informing the first device that it can send the packet, etc.
[0108] Figure 3 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application. The wireless transmission method is applied to a first device. Although the logical order is shown in the schematic diagram, in some cases, the steps shown or described may be performed in a different order than that shown in the figures.
[0109] according to Figure 3 The wireless transmission method shown includes at least steps S110 to S130, which are described in detail below:
[0110] In step S110, the current wireless transmission quality is obtained during the target connection interval.
[0111] The target connection interval is any one of multiple connection intervals during wireless transmission. A connection interval is the time interval between the establishment of two connections in wireless transmission; multiple data exchanges can occur within a single connection interval. The connection interval affects data transmission efficiency and device power consumption. Shorter connection intervals can provide faster interaction speeds but may increase power consumption, while longer connection intervals can reduce power consumption but may delay interaction responses. The connection interval can be determined when the first device establishes a connection with the second device. For example, the connection interval can be configured by the second device.
[0112] In one embodiment, certain wireless protocols allow for dynamic adjustment of the connection interval to adapt to network conditions or device requirements. For example, the connection interval can be shortened when data transmission is frequent and lengthened when idle.
[0113] In another embodiment, some wireless transmission protocols define a fixed connection interval, or certain applications are designed with a fixed connection interval to ensure performance in specific environments or conditions. In both cases, the connection interval cannot be dynamically adjusted once configured.
[0114] Wireless transmission quality refers to the quality of data transmission from the sender to the receiver in wireless communication. It reflects the reliability, stability, and effectiveness of wireless transmission. Parameters that can be used to evaluate wireless transmission quality include, but are not limited to: signal strength, signal-to-noise ratio, packet loss rate, latency, bandwidth, connection stability, and data transmission rate.
[0115] Wireless transmission quality is affected by various factors, and the quality may vary at different times. Different connection intervals occur at different times, therefore the wireless transmission quality for each connection interval may also differ. The number of data packets that can be transmitted within each connection interval is affected by the current wireless transmission quality corresponding to that connection interval. Therefore, at the target connection interval, the current wireless transmission quality corresponding to that target connection interval should be obtained.
[0116] After the first device and the second device establish a wireless connection, they can first negotiate whether both devices support the wireless transmission method of this application embodiment. If both devices support it, the first device can start a dynamic discrimination queue thread when data transmission begins. The dynamic discrimination thread can obtain the current wireless transmission quality based on command-line tools or network monitoring tools.
[0117] In step S120, the target number of data packets to be transmitted in the target connection interval is determined based on the current wireless transmission quality and the target connection interval.
[0118] Based on the current wireless transmission quality, the number of data packets that can be transmitted per unit time can be determined. Combined with the target connection interval, the number of data packets that can be transmitted within that target connection interval under the current wireless transmission quality can be determined, and this number is defined as the target number.
[0119] Based on the above technical solution, as an example, such as Figure 4 As shown, step S120 may include steps S121 to S122.
[0120] In step S121, the time required to transmit the target data packet under the current wireless transmission quality is determined.
[0121] Because different data packets have different data sizes, the time required to transmit different data packets under the same wireless transmission quality also varies.
[0122] In one embodiment, the target data packet can be the largest data packet among all the data packets to be transmitted. This ensures that, under the current wireless transmission quality, the target number of data packets can be transmitted within the target connection interval.
[0123] In another embodiment, the target data packet can be a virtual data packet determined based on the data size of each data packet to be transmitted. The data size of the virtual data packet can be the mean, median, or mode of the data size of each data packet to be transmitted, etc., to meet the needs of different users in different situations.
[0124] When the data volume of the target data packet is known, the time required to transmit the target data packet under the current wireless transmission quality can be calculated. When the wireless transmission quality is the data transmission rate, the time required to transmit the target data packet under the current wireless transmission quality is the quotient of the data volume of the target data packet and the data transmission rate. When the wireless transmission quality is the bandwidth, the time required to transmit the target data packet under the current wireless transmission quality is the quotient of the data volume of the target data packet and the bandwidth. It is understood that in some embodiments, the units of data volume and wireless transmission quality need to be converted when calculating the time.
[0125] In step S122, the target number of data packets to be transmitted in the target connection interval is determined based on the target connection interval and the duration.
[0126] Optionally, since the first device sends data packets to the second device, the second device needs to send test data packets to the first device, and each data packet transmission involves two data transmissions. Therefore, when determining the target number of data packets to be transmitted in the target connection interval, the target number of data packets to be transmitted in the target connection interval is determined by half the quotient of the target connection interval and the time required to transmit the target data packets under the current wireless transmission quality.
[0127] As an example, assuming the connection interval is 10ms and the time required to transmit the target data packet under the current wireless transmission quality is 1ms, then the target number of data packets to be transmitted in this connection interval = 10ms / 1ms / 2 = 5.
[0128] The technical solution adopted in this application determines the target number of data packets to be transmitted within the target connection interval based on the current wireless transmission quality and the target connection interval, ensuring the rationality of the determined target number. Furthermore, different target numbers can be determined based on the data volume of different target data packets to meet the needs of different users.
[0129] In step S130, the target number of data packets are transmitted during the target connection interval.
[0130] After determining the target number of data packets to be transmitted in the target connection interval, the first device can transmit data packets to the second device in the target connection interval according to the target number.
[0131] By adopting the technical solution of this application embodiment, the target number of data packets to be transmitted in the target connection interval can be determined according to the current wireless transmission quality and the target connection interval, and then the target number of data packets can be transmitted in the target connection interval, effectively ensuring that enough data packets can be transmitted in the target connection interval and improving data transmission efficiency.
[0132] Based on the above technical solution, as an embodiment, after determining the target number of data packets to be transmitted in the target connection interval, the method may further include: adjusting the data packet field of the first data packet according to the target number to obtain a first field; the first field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target number.
[0133] After determining the target number corresponding to the target connection interval, the first device can inform the second device so that the second device knows the number of data packets the first device will transmit within that target connection interval. The number of test data packets sent by the second device is equal to the number of data packets sent by the first device; therefore, the second device can determine that the number of test data packets sent within the target connection interval is the target number.
[0134] The first data packet refers to the first data packet sent by the first device to the second device in each connection interval. The first device can obtain the first field by adjusting the data packet fields of the first data packet. After receiving the first data packet sent by the first device, the second device parses the first data packet to obtain the first field, and then determines the target number of test data packets to be sent in the target connection interval based on the first field. The second device then sends test data packets based on the first field.
[0135] In one embodiment, such as Figure 5 As shown, the target quantity for both connection intervals is 4. In each connection interval, the second device first sends a test data packet, and then the first device sends a data packet. In this case, the second device sends one test data packet first, and then the first device sends the first data packet. The second device parses the first field of the first data packet to determine that the number of test data packets sent in this connection interval is 4. The second device sends a total of 4 test data packets in the current connection interval. TX represents sent data, and RX represents received data.
[0136] By adopting the technical solution of the embodiments of this application, the number of test data packets sent by the second device can be notified based on the first field, without the second device needing to calculate the number of test data packets sent, and ensuring the consistency of the number of data packets sent by the first device and the number of test data packets sent by the second device.
[0137] Based on the above technical solution, as an example, such as Figure 6 As shown, the wireless transmission method may further include steps S140 to S150, and step S130 may include steps S131 to S132.
[0138] In step S140, the number of omitted return packets is determined based on the target number.
[0139] The "omitted response count" refers to the number of test packets that the second device can omit in response to data packets sent by the first device.
[0140] When the usage scenario does not require high data accuracy, such as when losing a data packet does not affect the function, the second device can reduce the number of test data packets sent in order to improve wireless transmission efficiency.
[0141] Because the first and last data packets in each connection interval provide information about the establishment and release of the connection interval, the first and last data packets need to be reliably transmitted. Therefore, the corresponding test data packets for the first and last data packets are not omitted.
[0142] In one embodiment, when data accuracy requirements are not high, the adverse effects of losing non-leading or non-tailing data packets in the connection interval are relatively minor. Therefore, test data packets corresponding to non-leading or non-tailing data packets in the connection interval can be omitted. The maximum number of omitted return packets corresponding to the connection interval can be the number of non-leading or non-tailing data packets in that connection interval; in this case, the maximum number of omitted return packets = target number - 2. The minimum number of omitted return packets can be 0. Therefore, the value of the number of omitted return packets ranges from 0 to any integer from the maximum number of omitted return packets, including 0 or the maximum number of omitted return packets.
[0143] In step S150, the data packet field of the first data packet is adjusted according to the number of omitted return packets to obtain a second field; the second field is used to: notify the second device to reduce the number of test data packets sent according to the number of omitted return packets.
[0144] After determining the number of omitted return packets, the first device can adjust the data packet fields of the first data packet according to the omitted return packet number to obtain a second field. The second field is used to: notify the second device to reduce the number of test data packets sent according to the omitted return packet number. The second device maintains a first state according to the second field, and in the first state, reduces the number of test data packets sent, with the number of reduced test data packets equal to the omitted return packet number. The first state can be a low-power state.
[0145] In one embodiment, the first data packet contains not only the second field but also the first field.
[0146] In step S131, during the target connection interval, the data packet with the omitted return packet number is sent to the second device.
[0147] After receiving the first data packet sent by the first device, the second device parses the first data packet to obtain the second field. Based on the second field, the second device adjusts its own state to the first state. In the first state, upon receiving data packets from the first device, it does not need to reply with test data packets. This continues until the number of data packets received from the first device is equal to the number of packets to be omitted for reply. Then, the second device adjusts its first state to the normal state and sends test data packets to the first device for data packets that require a reply.
[0148] After the first device sends the first data packet, it informs the second device that no test data packets need to be sent for subsequent data packets whose number of return packets is omitted. Therefore, when the first device sends subsequent data packets, it does not need to wait for the second device to send test data packets and can directly send data packets to the second device.
[0149] In step S132, after sending the data packet with the number of omitted return packets, the test data packet sent by the second device according to the second field is received.
[0150] The first device sends a first data packet containing the second field. The second device needs to send a test data packet in response to the first data packet. Then, the first device sends a second data packet with the number of return packets omitted. The second device does not need to send a test data packet in response to the second data packet. After that, the first device sends a third data packet, and the second device needs to send a test data packet in response to the third data packet. It can be understood that the second device sending the test data packet in response to the data packet can either be before receiving the data packet and after receiving the data packet.
[0151] In one embodiment, such as Figure 7 As shown, the maximum number of omitted return packets is 2. The second device sends a test data packet first, followed by the first device sending a data packet. At this point, the second device sends the test data packet first, and the first device then sends the first data packet. The second device parses the second field of the first data packet and learns that subsequent data packets with the omitted return packets do not require sending test data packets. Therefore, the first device does not need to receive the test data packet from the second device at this time and directly sends two data packets to the second device. Only when the last data packet is about to be sent, after receiving the test data packet from the second device, does the first device need to send the last data packet.
[0152] In another embodiment, the maximum number of omitted return packets is set to 2. The first device sends a data packet first, and then the second device sends a test data packet. In this case, the first device sends a first data packet, and the second device sends a test data packet in response to the first data packet. The second device parses the second field of the first data packet and determines that subsequent data packets with the omitted return packet count do not require sending test data packets. Subsequently, the first device directly sends two data packets to the second device without receiving test data packets, until the first device sends the last data packet to the second device, at which point it needs to receive the test data packet sent by the second device for the last data packet.
[0153] It should be understood that omitting the number of return packets can also be configured by the second device to the first device.
[0154] By adopting the technical solution of this application embodiment, the second field can inform the second device to reduce the number of test data packets sent. In this way, the first device does not need to receive test data packets with the number of return packets omitted, but can directly send data packets, which can greatly improve the transmission efficiency.
[0155] Based on the above technical solution, as an example, such as Figure 8 As shown, the wireless transmission method may further include steps S160 to S170, and step S130 may include steps S133 to S134.
[0156] In step S160, a predetermined number of items to be received is determined based on the target number.
[0157] The predetermined number of data packets to be received refers to the number of data packets that the first device will continuously send to the second device. When the first device continuously sends data packets to the second device, the second device does not need to reply with test data packets for these continuously sent data packets.
[0158] When the chip capability of the first device exceeds a threshold and the application scenario does not have high requirements for data accuracy, in order to significantly improve wireless transmission efficiency, the first device can continuously send data packets to the second device without waiting for the second device to reply with test data packets. The chip capability of the first device can be determined by factors such as the number of cores, clock frequency, and / or thread scheduling efficiency of the chip.
[0159] The first and last data packets need to be reliably transmitted; therefore, corresponding test data packets for the first and last data packets need to be sent. The first device can determine non-first and non-last data packets as continuously transmitted data packets. Therefore, the predetermined number of packets to be received ranges from 0 to any integer from 0 to the maximum predetermined number of packets to be received, including 0 or the maximum predetermined number of packets to be received. The maximum predetermined number of packets to be received is the target number - 2.
[0160] In step S170, the data packet field of the first data packet is adjusted according to the predetermined number of data packets to obtain a third field; the third field is used to notify the second device that the number of data packets continuously received is the predetermined number of data packets to be received.
[0161] After determining the predetermined number of data packets to be received, the first device can adjust the data packet fields of the first data packet according to the predetermined number of data packets to obtain a third field. The third field is used to notify the second device that the number of data packets to be continuously received is the predetermined number of data packets. The second device maintains a second state according to the third field, and in this second state, continuously receives the predetermined number of data packets continuously sent by the first device, without needing to reply with test data packets for the predetermined number of data packets continuously sent by the first device. The second state can be a relatively active state.
[0162] In one embodiment, the first data packet contains not only the third field but also the first field.
[0163] In step S133, during the target connection interval, a number of data packets equal to the predetermined number of received packets are continuously sent to the second device.
[0164] After receiving the first data packet from the first device, the second device parses the first data packet to obtain the third field. Based on the second field, the second device adjusts its own state to the second state. In the second state, it continuously receives data packets from the first device without replying with test data packets until the number of continuously received data packets from the first device reaches a predetermined number. Then, the second device adjusts its second state to the normal state and sends test data packets to the first device for data packets that require a reply.
[0165] After the first device sends the first data packet, it informs the second device that it needs to continuously receive a predetermined number of data packets. No test data packets need to be sent for the predetermined number of data packets. Therefore, when the first device continuously sends data packets, it does not need to wait for the second device to send test data packets and can directly send data packets to the second device.
[0166] In step S134, after continuously sending the predetermined number of data packets, a test data packet sent by the second device according to the third field is received.
[0167] The first device sends a fourth data packet containing the third field. The second device needs to send a test data packet in response to the fourth data packet. Then, the first device continuously sends a predetermined number of fifth data packets. The second device does not need to send a test data packet in response to the fifth data packet. After that, the first device sends a sixth data packet. The second device needs to send a test data packet in response to the sixth data packet. It can be understood that the second device can send the test data packet to the first device before receiving the data packets, or it can send the test data packet to the first device after receiving the data packets.
[0168] In one embodiment, such as Figure 9 As shown, the predetermined number of received data packets is the maximum predetermined number of received data packets, which is 3. The second device sends a test data packet first, and then the first device sends a data packet. At this time, the second device sends a test data packet first, and then the first device sends the first data packet. The second device parses the third field of the first data packet to know the predetermined number of data packets to be received continuously. For the subsequent continuously received data packets, no test data packets need to be sent. The first device does not need to receive the test data packets sent by the second device at this time, and directly sends 3 data packets to the second device continuously. Only when the last data packet is to be sent does the first device need to send the last data packet after receiving the test data packet sent by the second device.
[0169] In another embodiment, the predetermined number of received data packets is a maximum predetermined number of received data packets, which is 3. The first device sends data packets first, and then the second device sends test data packets. In this case, the first device sends a first data packet, and the second device sends a test data packet in response to the first data packet. The second device parses the third field of the first data packet to determine the predetermined number of data packets to be received consecutively. For the subsequent consecutively received data packets, no test data packets need to be sent. The first device directly sends 3 data packets consecutively to the second device without needing to receive test data packets until the first device sends the last data packet to the second device, at which point it needs to receive the test data packet sent by the second device for the last data packet.
[0170] Compared to the case where the first data packet contains the second field, when the first data packet contains the third field, the first device usually sends data packets at a faster rate, thus achieving higher transmission efficiency.
[0171] By adopting the technical solution of this application embodiment, the third field can inform the second device that the first device will continuously send a predetermined number of data packets to be received, and the second device does not need to reply with test data packets for the predetermined number of data packets to be received continuously sent; in this way, the first device can continuously send data packets without receiving a predetermined number of test data packets to be received, which can greatly improve the transmission efficiency.
[0172] Based on the above technical solution, as an example, such as Figure 10 As shown, the wireless transmission method may further include steps S180 to S190.
[0173] In step S180, the connection interval adjustment amount is determined according to the predetermined number of receptions corresponding to the target connection interval;
[0174] In step S190, the next connection interval is determined based on the target connection interval and the connection interval adjustment amount.
[0175] When the connection interval supports dynamic adjustment, the next connection interval can be adjusted based on a predetermined number of receptions within the previous connection interval. When the predetermined number of receptions is determined, it indicates that the first device's chip capability is strong and data transmission between the first and second devices is frequent. In this case, the connection interval can be shortened, making the interaction between the first and second devices more efficient.
[0176] In one embodiment, the duration required to transmit a predetermined number of data packets can be determined based on the current wireless transmission quality, and this duration can be defined as a connection interval adjustment amount. When determining this duration, the amount of data contained in the data packets can be the mean, median, or mode of the data amounts of the various data packets to be transmitted, etc.
[0177] In another embodiment, the average duration required to transmit a data packet can be determined based on experience or big data, and then the product of the predetermined number of received packets and the average duration can be directly determined as the connection interval adjustment amount.
[0178] The difference between the current connection interval and the corresponding connection interval adjustment amount is determined as the next connection interval.
[0179] In one embodiment, if the current connection interval is 10ms, the predetermined number of receptions is 2, and the average time required to transmit one number is 1ms, then the next connection interval = 10ms - 2 * 1ms = 8ms.
[0180] By adopting the technical solution of the embodiments of this application, the next connection interval can be adjusted based on the predetermined number of receptions in the connection interval, thereby shortening the connection interval. The shorter connection interval allows for more frequent sending and receiving of data, reducing idle time, thereby improving the overall data throughput and optimizing the use of wireless transmission resources.
[0181] In one embodiment, the first device can be a TV remote control that supports voice functionality, the second device can be a smart TV that is wirelessly connected to the TV remote control, and the data packets sent by the first device can be voice data packets.
[0182] The above technical solution can be applied to scenarios where one first device and one second device are wirelessly connected, or to scenarios where multiple first devices and two second devices are wirelessly connected. In scenarios where multiple first devices and two second devices are wirelessly connected, the anti-interference capability of wireless transmission methods that improve transmission efficiency by omitting the number of return packets or pre-determining the number of received packets may be affected.
[0183] To improve the anti-interference capabilities of wireless transmission methods that improve transmission efficiency by omitting the number of return packets or pre-determining the number of received packets, multi-link scheduling optimization can be performed. Multi-link scheduling optimization can include: identifying a target first device from among the multiple first devices; and reducing the link resources corresponding to each first device that is not the target first device.
[0184] The target primary device can be the primary device corresponding to the user's current core operation scenario. The current core operation scenario can be selected by the user or determined intelligently by the system. The target primary device can also be the device with the highest priority among multiple primary devices, and the priority of the primary device can be preset.
[0185] The methods for reducing the corresponding link resources can differ depending on the first device. In one embodiment, if the data packets transmitted by the first device are audio data packets, the link resources corresponding to the first device can be reduced by lowering the bitpool of the audio data packets and / or reducing the Maximum Transmission Unit (MTU). In another embodiment, if the first device is a Bluetooth game controller and the second device is a game console, the link resources corresponding to the first device can be reduced by adjusting the connection interval between the Bluetooth game controller and the game console, thereby reducing the frequency of their interaction.
[0186] In one embodiment, there are two first devices wirelessly connected to a second device: one is a Bluetooth speaker, and the other is a Bluetooth game controller. The second device is a smart TV. When the user's primary operation is playing games with the Bluetooth game controller, the sound quality of the Bluetooth speaker can be reduced or the audio packet size can be decreased to optimize multi-link scheduling. When the user's primary operation is listening to music with the Bluetooth speaker, the interaction frequency between the Bluetooth game controller and the smart TV can be reduced to optimize multi-link scheduling.
[0187] When multi-link scheduling optimization is implemented, a wireless transmission method based on omitting the number of return packets or pre-determining the number of received packets can improve the anti-interference capability of wireless transmission between the first and second target devices.
[0188] Figure 11 This is a schematic diagram of the steps of a wireless transmission method provided in an embodiment of this application. The wireless transmission method is applied to a second device. Although the logical order is shown in the schematic diagram, in some cases, the steps shown or described may be performed in a different order than that shown in the figures.
[0189] according to Figure 11 The wireless transmission method shown includes at least steps S210 to S230, which are described in detail below:
[0190] In step S210, the first data packet sent by the first device in the target connection interval is received.
[0191] In step S220, the target field in the first packet of data is parsed to determine the target quantity; the target quantity is the number of data packets to be transmitted in the target connection interval, determined based on the current wireless transmission quality and the target connection interval.
[0192] In step S230, at the target connection interval, data packets transmitted by the first device are received according to the target number.
[0193] The first data packet sent by the first device during the target connection interval includes a target field, which can be the first field, second field, and / or third field described above. The target field in the first data packet is determined based on the target quantity. The method for determining the target quantity can be found above.
[0194] After parsing the target field from the first data packet, the second device can determine the target number of data packets sent by the first device within the target connection interval based on the target field. The second device then receives the target number of data packets sent by the first device within the target connection interval.
[0195] By adopting the technical solution of the embodiments of this application, the second device can determine the target number of data packets to be transmitted in the target connection interval based on the first data packet sent by the first device in the target connection interval, and then receive the target number of data packets in the target connection interval, which effectively ensures that enough data packets can be transmitted in the target connection interval and improves data transmission efficiency.
[0196] Based on the above technical solution, as an embodiment, the target field is the first field mentioned above. In this case, the target field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target number. The wireless transmission method further includes: sending test data packets in the target connection interval according to the target number.
[0197] When the second device parses the first field, it can determine the target number of data packets that the first device will send within the target connection interval based on the first field. Because the second device needs to send a test data packet for each data packet, the second device can send test data packets within the target connection interval according to the target number.
[0198] By adopting the technical solution of the embodiments of this application, the number of test data packets sent by the second device can be notified based on the first field, without the second device needing to calculate the number of test data packets sent, and ensuring the consistency of the number of data packets sent by the first device and the number of test data packets sent by the second device.
[0199] Based on the above technical solution, as an embodiment, the target field is the second field mentioned above. In this case, the target field is used to: notify the second device to reduce the number of test data packets sent according to the number of omitted return packets; the number of omitted return packets is determined according to the target number.
[0200] like Figure 12 As shown, the wireless transmission method may further include steps S240 to S250.
[0201] In step S240, based on the target field, the number of test data packets to be reduced is determined to be the number of omitted return packets.
[0202] In step S250, during the target connection interval, after receiving the data packet with the omitted return packet number sent by the first device, a test data packet is sent to the first device.
[0203] The "omitted response packet count" refers to the number of test packets that the second device can choose not to send in response to data packets sent by the first device. The method for determining the omitted response packet count can be found above. When the accuracy of the data is not critical in the usage scenario, such as when losing a data packet does not affect functionality, the second device can reduce the number of test data packets sent to improve wireless transmission efficiency.
[0204] After receiving the first data packet sent by the first device, the second device parses the first data packet to obtain the second field. Based on the second field, the second device adjusts its own state to the first state. In the first state, upon receiving data packets from the first device, it does not need to reply with test data packets. This continues until the number of data packets received from the first device is equal to the number of packets to be omitted for reply. Then, the second device adjusts its first state to the normal state and sends test data packets to the first device for data packets that require a reply.
[0205] After the first device sends the first data packet, it informs the second device that no test data packets need to be sent for subsequent data packets whose number of return packets is omitted. Therefore, when the first device sends subsequent data packets, it does not need to wait for the second device to send test data packets and can directly send data packets to the second device.
[0206] The first device sends a first data packet containing the second field. The second device needs to send a test data packet in response to the first data packet. Then, the first device sends a second data packet with the number of return packets omitted. The second device does not need to send a test data packet in response to the second data packet. After that, the first device sends a third data packet, and the second device needs to send a test data packet in response to the third data packet. It can be understood that the second device sending the test data packet in response to the data packet can either be before receiving the data packet and after receiving the data packet.
[0207] By adopting the technical solution of this application embodiment, the second device can reduce the number of test data packets sent through the second field. In this way, the first device does not need to receive test data packets with the number of return packets omitted, but can directly send data packets, which can greatly improve the transmission efficiency.
[0208] Based on the above technical solution, as an embodiment, the target field is the third field mentioned above. In this case, the target field is used to: notify the second device that the number of data packets received continuously is a predetermined number of receptions; the predetermined number of receptions is determined according to the target number.
[0209] like Figure 13 As shown, the wireless transmission method may further include steps S260 to S270.
[0210] In step S260, the number of continuously received data packets is determined as the predetermined number of received packets based on the target field.
[0211] In step S270, after receiving the predetermined number of data packets continuously sent by the first device during the target connection interval, a test data packet is sent to the first device.
[0212] The predetermined number of data packets to be received refers to the number of data packets that the first device will continuously send to the second device. When the first device continuously sends data packets to the second device, the second device does not need to reply with test data packets for these continuously sent data packets. The method for determining the predetermined number of data packets to be received can be found in the previous text.
[0213] When the chip capability of the first device exceeds a threshold and the application scenario does not have high requirements for data accuracy, in order to significantly improve wireless transmission efficiency, the first device can continuously send data packets to the second device without waiting for the second device to reply with test data packets. The chip capability of the first device can be determined by factors such as the number of cores, clock frequency, and / or thread scheduling efficiency of the chip.
[0214] After determining the predetermined number of data packets to be received, the first device can adjust the data packet fields of the first data packet according to the predetermined number of data packets to obtain a third field. The third field is used to notify the second device that the number of data packets to be continuously received is the predetermined number of data packets. The second device maintains a second state according to the third field, and in this second state, continuously receives the predetermined number of data packets continuously sent by the first device, without needing to reply with test data packets for the predetermined number of data packets continuously sent by the first device. The second state can be a relatively active state.
[0215] After receiving the first data packet from the first device, the second device parses the first data packet to obtain the third field. Based on the second field, the second device adjusts its own state to the second state. In the second state, it continuously receives data packets from the first device without replying with test data packets until the number of continuously received data packets from the first device reaches a predetermined number. Then, the second device adjusts its second state to the normal state and sends test data packets to the first device for data packets that require a reply.
[0216] After the first device sends the first data packet, it informs the second device that it needs to continuously receive a predetermined number of data packets. No test data packets need to be sent for the predetermined number of data packets. Therefore, when the first device continuously sends data packets, it does not need to wait for the second device to send test data packets and can directly send data packets to the second device.
[0217] The first device sends a fourth data packet containing the third field. The second device needs to send a test data packet in response to the fourth data packet. Then, the first device continuously sends a predetermined number of fifth data packets. The second device does not need to send a test data packet in response to the fifth data packet. After that, the first device sends a sixth data packet. The second device needs to send a test data packet in response to the sixth data packet. It can be understood that the second device can send the test data packet to the first device before receiving the data packets, or it can send the test data packet to the first device after receiving the data packets.
[0218] Compared to the case where the first data packet contains the second field, when the first data packet contains the third field, the first device usually sends data packets at a faster rate, thus achieving higher transmission efficiency.
[0219] By adopting the technical solution of this application embodiment, the second device can know from the third field that the first device will continuously send a predetermined number of data packets to be received, and the second device does not need to reply with test data packets for the predetermined number of data packets to be received continuously sent; in this way, the first device can continuously send data packets without receiving a predetermined number of test data packets to be received, which can greatly improve the transmission efficiency.
[0220] Based on the above technical solution, as an embodiment, the wireless transmission method may further include: determining a connection interval adjustment amount according to a predetermined number of receptions corresponding to the target connection interval; and determining a next connection interval according to the target connection interval and the connection interval adjustment amount.
[0221] When the connection interval supports dynamic adjustment, the next connection interval can be adjusted based on a predetermined number of receptions within the previous connection interval. When the predetermined number of receptions is determined, it indicates that the first device's chip capability is strong and data transmission between the first and second devices is frequent. In this case, the connection interval can be shortened, making the interaction between the first and second devices more efficient.
[0222] By adopting the technical solution of the embodiments of this application, the next connection interval can be adjusted based on the predetermined number of receptions in the connection interval, thereby shortening the connection interval. The shorter connection interval allows for more frequent sending and receiving of data, reducing idle time, thereby improving the overall data throughput and optimizing the use of wireless transmission resources.
[0223] To improve the anti-interference capabilities of wireless transmission methods that improve transmission efficiency by omitting the number of return packets or pre-determining the number of received packets, multi-link scheduling optimization can be performed. Multi-link scheduling optimization can include: identifying a target first device from among the multiple first devices; and reducing the link resources corresponding to each first device that is not the target first device.
[0224] The target primary device can be the primary device corresponding to the user's current core operation scenario. The current core operation scenario can be selected by the user or determined intelligently by the system. The target primary device can also be the device with the highest priority among multiple primary devices, and the priority of the primary device can be preset.
[0225] The methods for reducing the corresponding link resources can differ depending on the first device. In one embodiment, if the data packets transmitted by the first device are audio data packets, then the link resources corresponding to the first device can be reduced by lowering the encoding quality of the audio data packets and / or reducing the maximum transmission unit (MPU). In another embodiment, if the first device is a Bluetooth game controller and the second device is a game console, then the link resources corresponding to the first device can be reduced by adjusting the connection interval between the Bluetooth game controller and the game console, thereby reducing the frequency of their interaction.
[0226] To facilitate better implementation of the wireless transmission method of this application, this application also provides a wireless transmission device based on the above-described wireless transmission method. The meanings of the terms used are the same as in the wireless transmission method described above, and specific implementation details can be found in the descriptions of the method embodiments.
[0227] Please see Figure 14 , Figure 14 This is a schematic diagram of the structure of a wireless transmission device provided in an embodiment of this application, wherein the wireless transmission device is applied to a first device, and the wireless transmission device includes:
[0228] The acquisition module 101 is used to acquire the current wireless transmission quality during the target connection interval;
[0229] The determining module 102 is used to determine the target number of data packets to be transmitted in the target connection interval based on the current wireless transmission quality and the target connection interval;
[0230] The transmission module 103 is used to transmit the target number of data packets in the target connection interval.
[0231] In one embodiment, after determining the target number of data packets to be transmitted in the target connection interval, the apparatus further includes:
[0232] The first adjustment module is used to adjust the data packet field of the first data packet according to the target quantity to obtain the first field; the first field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target quantity.
[0233] In one embodiment, the device further includes:
[0234] The omission determination module is used to determine the number of omitted return packets based on the target quantity;
[0235] The second adjustment module is used to adjust the data packet field of the first data packet according to the number of omitted return packets to obtain the second field; the second field is used to: notify the second device to reduce the number of test data packets sent according to the number of omitted return packets;
[0236] The transmission module 103 includes:
[0237] The first sending unit is configured to send the data packet with the omitted number of return packets to the second device during the target connection interval;
[0238] The first receiving unit is configured to receive the test data packet sent by the second device according to the second field after sending the data packet with the number of omitted return packets.
[0239] In one embodiment, the device further includes:
[0240] The predetermined determination module is used to determine the predetermined number of items to be received based on the target number.
[0241] The third adjustment module is used to adjust the data packet field of the first data packet according to the predetermined number of received packets to obtain a third field; the third field is used to notify the second device that the number of data packets received continuously is the predetermined number of received packets;
[0242] The transmission module 103 includes:
[0243] The second sending unit is configured to continuously send data packets to the second device in a number equal to the predetermined number of received packets during the target connection interval.
[0244] The second receiving unit is configured to receive test data packets sent by the second device according to the third field after continuously sending the predetermined number of data packets.
[0245] In one embodiment, the device further includes:
[0246] The adjustment amount determination module is used to determine the connection interval adjustment amount based on the predetermined number of receptions corresponding to the target connection interval;
[0247] An interval determination module is used to determine the next connection interval based on the target connection interval and the connection interval adjustment amount.
[0248] In one embodiment, the determining module 102 includes:
[0249] The duration determination unit is used to determine the duration required to transmit the target data packet under the current wireless transmission quality.
[0250] The quantity determination unit is used to determine the target number of data packets to be transmitted in the target connection interval based on the target connection interval and the duration.
[0251] By adopting the technical solution of the embodiments of this application, the target number of data packets to be transmitted in the target connection interval can be determined according to the current wireless transmission quality and the target connection interval, and then the target number of data packets can be transmitted in the target connection interval, which effectively ensures that enough data packets can be transmitted in the target connection interval and improves data transmission efficiency.
[0252] Please see Figure 15 , Figure 15 This is a schematic diagram of the structure of a wireless transmission device provided in an embodiment of this application, wherein the wireless transmission device is applied to a second device, and the wireless transmission device includes:
[0253] The first receiving module 201 is used to receive the first data packet sent by the first device in the target connection interval;
[0254] The parsing module 202 is used to parse the first data packet and determine the target quantity; the target quantity is the number of data packets to be transmitted in the target connection interval, determined based on the current wireless transmission quality and the target connection interval.
[0255] The second receiving module 203 is used to receive data packets transmitted by the first device in the target connection interval according to the target number.
[0256] In one embodiment, the target field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target number; the apparatus further includes:
[0257] The test sending module is used to send test data packets at the target connection interval according to the target number.
[0258] In one embodiment, the target field is used to: notify the second device to reduce the number of test data packets sent by omitting a certain number of return packets; the number of omitting return packets is determined based on the target number;
[0259] The device further includes:
[0260] The module for determining the number of omitted return packets is used to determine, based on the target field, the number of test data packets to be reduced as the number of omitted return packets;
[0261] The test data packet first sending module is used to send a test data packet to the first device after receiving the data packet with the omitted number of return packets sent by the first device during the target connection interval.
[0262] In one embodiment, the target field is used to: notify the second device that the number of data packets continuously received is a predetermined number; the predetermined number is determined based on the target number;
[0263] The device further includes:
[0264] The predetermined reception quantity determination module is used to determine the number of continuously received data packets as the predetermined reception quantity based on the target field;
[0265] The second test data packet sending module is used to send a test data packet to the first device after receiving the predetermined number of data packets continuously sent by the first device during the target connection interval.
[0266] By adopting the technical solution of the embodiments of this application, the second device can determine the target number of data packets to be transmitted in the target connection interval based on the first data packet sent by the first device in the target connection interval, and then receive the target number of data packets in the target connection interval, which effectively ensures that enough data packets can be transmitted in the target connection interval and improves data transmission efficiency.
[0267] Specific limitations regarding the wireless transmission device can be found in the limitations regarding the wireless transmission method above, and will not be repeated here. Each module in the aforementioned wireless transmission device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in the computer device, or stored in software in the memory of the computer device, so that the processor can call and execute the operations corresponding to each module.
[0268] In addition, this application also provides an electronic device, such as Figure 16 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically:
[0269] The electronic device may include components such as a processor 601 with one or more processing cores and a memory 602 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 16 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0270] The processor 601 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602, thereby providing overall monitoring of the electronic device. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.
[0271] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0272] In one embodiment, the electronic device further includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0273] In one embodiment, the electronic device may further include an input unit 604, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0274] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 runs the applications stored in the memory 602, thereby implementing the steps in any of the wireless transmission methods provided in the embodiments of this application.
[0275] Those skilled in the art will understand that Figure 16 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0276] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.
[0277] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of this application.
[0278] In one embodiment, a computer program product is also provided, comprising a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.
[0279] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0280] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0281] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the wireless transmission methods provided in this application.
[0282] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0283] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0284] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the wireless transmission methods provided in this application, the beneficial effects that any of the wireless transmission methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0285] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0286] The foregoing has provided a detailed description of a wireless transmission method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A wireless transmission method, characterized in that, Applied to the first device, including: After the first device and the second device establish a wireless connection, the current wireless transmission quality is obtained during the target connection interval. Based on the current wireless transmission quality and the target connection interval, the target number of data packets to be transmitted in the target connection interval is determined; the data size of different data packets is different. During the target connection interval, the target number of data packets are transmitted to the second device; The step of determining the target number of data packets to be transmitted in the target connection interval based on the current wireless transmission quality and the target connection interval includes: Based on the data size of the target data packet, determine the time required to transmit the target data packet under the current wireless transmission quality; the target data packet is the data packet with the largest data size among the data packets to be transmitted, or a virtual data packet determined based on the data size of the data packets to be transmitted. The target quantity is determined by half the quotient of the target connection interval and the time required to transmit the target data packet under the current wireless transmission quality.
2. The method according to claim 1, characterized in that, After determining the target number of data packets to be transmitted within the target connection interval, the method further includes: Based on the target quantity, the data packet field of the first data packet is adjusted to obtain the first field; the first field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target quantity.
3. The method according to claim 1, characterized in that, The method further includes: Based on the target quantity, determine the number of return packets to be omitted; Based on the number of omitted return packets, the data packet field of the first data packet is adjusted to obtain the second field; the second field is used to: notify the second device to reduce the number of test data packets sent according to the number of omitted return packets; The transmission of the target number of data packets during the target connection interval includes: During the target connection interval, the data packets with the omitted number of return packets are sent to the second device; After sending the data packet with the number of returned packets omitted, the test data packet sent by the second device according to the second field is received.
4. The method according to claim 1, characterized in that, The method further includes: Based on the target quantity, determine the predetermined quantity to be received; Based on the predetermined number of data packets to be received, the data packet field of the first data packet is adjusted to obtain the third field; the third field is used to: notify the second device that the number of data packets to be received continuously is the predetermined number of data packets to be received; The transmission of the target number of data packets during the target connection interval includes: During the target connection interval, a number of data packets equal to the predetermined number of received packets are continuously sent to the second device; After continuously sending the predetermined number of data packets, the test data packets sent by the second device according to the third field are received.
5. The method according to claim 4, characterized in that, The method further includes: The connection interval adjustment amount is determined based on the predetermined number of receptions corresponding to the target connection interval; The next connection interval is determined based on the target connection interval and the connection interval adjustment amount.
6. The method according to any one of claims 1 to 5, characterized in that, The step of determining the target number of data packets to be transmitted in the target connection interval based on the current wireless transmission quality and the target connection interval includes: Determine the time required to transmit the target data packet under the current wireless transmission quality; Based on the target connection interval and the duration, determine the target number of data packets to be transmitted within the target connection interval.
7. A wireless transmission method, characterized in that, Applied to a second device, including: After the first device and the second device establish a wireless connection, the first data packet sent by the first device at the target connection interval is received; Parse the target field in the first data packet to determine the target quantity; the target quantity is the number of data packets to be transmitted in the target connection interval, determined based on the current wireless transmission quality and the target connection interval; different data packets have different data sizes; During the target connection interval, data packets transmitted by the first device are received in accordance with the target number. Determining the number of data packets to be transmitted in the target connection interval includes: Based on the data size of the target data packet, determine the time required to transmit the target data packet under the current wireless transmission quality; the target data packet is the data packet with the largest data size among all the data packets to be transmitted, or a virtual data packet determined based on the data size of all the data packets to be transmitted. The target quantity is determined by half the quotient of the target connection interval and the time required to transmit the target data packet under the current wireless transmission quality.
8. The method according to claim 7, characterized in that, The target field is used to: notify the second device that the number of test data packets sent in the target connection interval is the target number; the method further includes: Test data packets are sent at the target connection interval according to the target number.
9. The method according to claim 7, characterized in that, The target field is used to: notify the second device to reduce the number of test data packets sent by omitting a certain number of return packets; the number of omitting return packets is determined based on the target number; The method further includes: Based on the target field, the number of test data packets to be reduced is determined to be the number of omitted return packets; During the target connection interval, after receiving the data packet with the omitted number of return packets sent by the first device, a test data packet is sent to the first device.
10. The method according to claim 7, characterized in that, The target field is used to: notify the second device that the number of data packets continuously received is a predetermined number; the predetermined number of data packets is determined based on the target number; The method further includes: Based on the target field, the number of continuously received data packets is determined to be the predetermined number of packets to be received; During the target connection interval, after receiving the predetermined number of data packets continuously sent by the first device, a test data packet is sent to the first device.
11. A wireless transmission device, characterized in that, Applied to the first device, including: The acquisition module is used to acquire the current wireless transmission quality during the target connection interval after the first device and the second device establish a wireless connection. The determining module is used to determine the target number of data packets to be transmitted in the target connection interval based on the current wireless transmission quality and the target connection interval; the data size of different data packets is different; The transmission module is configured to transmit the target number of data packets to the second device at the target connection interval; The determining module is specifically used for: Based on the data size of the target data packet, determine the time required to transmit the target data packet under the current wireless transmission quality; the target data packet is the data packet with the largest data size among all the data packets to be transmitted, or a virtual data packet determined based on the data size of all the data packets to be transmitted. The target quantity is determined by half the quotient of the target connection interval and the time required to transmit the target data packet under the current wireless transmission quality.
12. A wireless transmission device, characterized in that, Applied to a second device, including: The first receiving module is configured to receive a first data packet sent by the first device during the target connection interval after the first device and the second device establish a wireless connection. The parsing module is used to parse the first data packet and determine the target quantity; the target quantity is the number of data packets to be transmitted in the target connection interval, determined based on the current wireless transmission quality and the target connection interval; different data packets have different data sizes; The second receiving module is configured to receive data packets transmitted by the first device in the target number according to the target connection interval; Determining the number of data packets to be transmitted in the target connection interval includes: Based on the data size of the target data packet, determine the time required to transmit the target data packet under the current wireless transmission quality; the target data packet is the data packet with the largest data size among all the data packets to be transmitted, or a virtual data packet determined based on the data size of all the data packets to be transmitted. The target quantity is determined by half the quotient of the target connection interval and the time required to transmit the target data packet under the current wireless transmission quality.
13. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the wireless transmission method as described in any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the wireless transmission method as described in any one of claims 1 to 10.