Data transmission method and related apparatus

By dynamically determining the current threshold and selecting an appropriate collision detection strategy, the collision problem caused by the limited competition window size in wireless communication is solved, and the accuracy and efficiency of collision detection are improved.

WO2025112763A1PCT designated stage expired Publication Date: 2025-06-05LENOVO (BEIJING) LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/117102
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-29
Filing Date
2024-09-05
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

In wireless communication, due to the limited size of the competition window, there is still a certain probability that two terminals will randomly go to the same competition window, resulting in a collision. It is difficult for the prior art to effectively solve this problem.

Method used

The current threshold value is dynamically determined by obtaining the size of the current data frame and the retransmission information of the previous data frame, and then the collision detection strategy used when sending the current data frame is determined. The strategy includes two strategies, the first strategy has a greater handshake number than the second strategy, and the appropriate strategy is selected based on the current threshold and data frame size.

Benefits of technology

The accuracy and efficiency of collision detection are improved. By dynamically adjusting the threshold threshold and selecting appropriate collision detection strategies, the collision probability during data frame transmission is reduced, and the reliability and efficiency of data transmission are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024117102_05062025_PF_FP_ABST
    Figure CN2024117102_05062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a data transmission method, apparatus, and device, and a storage medium. The method comprises: acquiring a current data frame; determining a data transmission strategy on the basis of the size of the current data frame and a current threshold value, wherein the current threshold value is determined on the basis of retransmission information of a previous data frame of the current data frame, the data transmission strategy is used for representing a collision detection strategy used when transmitting the current data frame, the collision detection strategy comprises a first strategy and a second strategy, and the number of handshakes between a receiving end and a transmitting end corresponding to the first strategy is greater than the number of handshakes between a receiving end and a transmitting end corresponding to the second strategy; and transmitting the current data frame on the basis of the data transmission strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Data sending method and related device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 29, 2023, with application number 202311618980.7 and invention name “Data sending method, device, equipment and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of wireless communications, and in particular to a data transmission method and related devices. Background Art

[0003] Because wireless channels have a collision domain, related technologies use the Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) mechanism to avoid conflicts caused by multiple nodes accessing the network simultaneously. However, due to the limited size of the Contention Window (CW), there is still a certain probability that two terminals will randomly enter the same contention window, resulting in a collision when accessing the medium.

[0004] Summary of the Invention

[0005] In view of this, embodiments of the present application at least provide a data sending method and related devices.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] In one aspect, an embodiment of the present application provides a data sending method, the method comprising:

[0008] Obtain a current data frame; determine a data sending strategy based on the size of the current data frame and a current threshold value; wherein the current threshold value is determined based on retransmission information of a previous data frame of the current data frame; the data sending strategy is used to characterize a collision detection strategy adopted when sending the current data frame; the collision detection strategy includes a first strategy and a second strategy, and the number of handshakes between the receiving end and the sending end corresponding to the first strategy is greater than the number of handshakes between the receiving end and the sending end corresponding to the second strategy; based on the data sending strategy, send the current data frame.

[0009] In an embodiment of the present application, the collision detection strategy adopted when sending the current data frame is determined by the size of the current data frame and the current threshold value dynamically determined based on the retransmission information of the previous data frame of the current data frame. Because the current threshold value is dynamically determined in real time based on the retransmission information of the previous data frame of the current data frame, the current threshold value matches the current data frame, and the collision detection strategy determined thereby also matches the current data frame. In this way, based on the retransmission information of the previous data frame of the current data frame, the collision detection strategy for different handshake times can be flexibly determined, so that the collision detection strategy corresponding to the current data frame is adopted when sending the current data frame, thereby improving the accuracy of collision detection.

[0010] In some embodiments, the previous data frame includes at least two groups of data frames; the method further includes: determining the change trend of the retransmission information corresponding to the at least two groups of data frames; based on the change trend, determining the current threshold value; the current threshold value is negatively correlated with the change trend.

[0011] In some embodiments, the at least two groups of data frames include a first data frame group and a second data frame group; the second data frame group is the previous data frame of the first data frame group; the current data frame is the next data frame of the first data frame group; determining the change trend of the retransmission information corresponding to the at least two groups of data frames respectively includes: determining the change trend between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group; determining the current threshold value based on the change trend includes: when the change trend indicates that the retransmission information statistics of the first data frame group are greater than the retransmission information statistics of the second data frame group, reducing the historical threshold value corresponding to the first data frame group to obtain the current threshold value; when the change trend indicates that the retransmission information statistics of the first data frame group are less than the retransmission information statistics of the second data frame group, increasing the historical threshold value corresponding to the first data frame group to obtain the current threshold value.

[0012] In an embodiment of the present application, a change trend between the retransmission information statistics of a first data frame group, which is the previous data frame of the current data frame, and the retransmission information statistics of a second data frame group, which is the previous data frame of the first data frame group, is determined. Then, if the change trend indicates that the retransmission information statistics of the first data frame group are greater than the retransmission information statistics of the second data frame group, the historical threshold corresponding to the first data frame group is reduced to obtain the current threshold; if the change trend indicates that the retransmission information statistics of the first data frame group are less than the retransmission information statistics of the second data frame group, the historical threshold corresponding to the first data frame group is increased to obtain the current threshold. In this way, based on the size relationship between the retransmission information statistics of the first data frame group and the retransmission information of the second data frame group, the historical threshold corresponding to the first data frame group, which is the previous data frame of the current data frame, can be dynamically adjusted, thereby dynamically determining the current threshold, and then using the collision detection strategy corresponding to the current data frame for collision detection.

[0013] In some embodiments, determining the current threshold value based on the change trend includes: when the change trend indicates that the retransmission information of the subsequent data frames in the at least two groups of data frames becomes larger, determining the product of the threshold value before adjustment and a first preset multiple less than 1 as the current threshold value; when the change trend indicates that the retransmission information of the subsequent data frames in the at least two groups of data frames becomes smaller, determining the product of the threshold value before adjustment and a second preset multiple greater than 1 as the current threshold value.

[0014] In an embodiment of the present application, it is possible to determine whether the retransmission information of the subsequent data frame in the at least two groups of data frames has increased relative to the retransmission information of the preceding data frame in the at least two groups of data frames by analyzing the changing trends of the retransmission information corresponding to the respective data frames. If the retransmission information of the subsequent data frame has increased, the product of the pre-adjustment threshold value and a first preset multiple smaller than 1 can be determined as the current threshold value to reduce the pre-adjustment threshold value. If the retransmission information of the subsequent data frame has decreased, the product of the pre-adjustment threshold value and a second preset multiple larger than 1 can be determined as the current threshold value to increase the pre-adjustment threshold value. In this way, the current threshold value can be adjusted in real time based on the changes in the retransmission information of the subsequent data frame in the at least two groups of data frames to dynamically determine the collision detection strategy corresponding to the current data frame.

[0015] In some embodiments, the data sending strategy is determined based on the size of the current data frame and the current threshold value, including: when the size of the current data frame is smaller than the current threshold value, determining to adopt the second strategy when sending the current data frame; when the size of the current data frame is larger than the current threshold value, determining to adopt the first strategy when sending the current data frame.

[0016] In the embodiment of the present application, the size of the current data frame can be compared with the current threshold value. If the size of the current data frame is less than the current threshold value, the second strategy is used for collision detection; if the size of the current data frame is greater than the current threshold value, the first strategy is used for collision detection. In this way, the collision detection strategy can be determined in real time based on the size relationship between the current data frame and the current threshold value, thereby improving the adaptability of the collision detection strategy to the current data frame.

[0017] In some embodiments, the current threshold value and the historical threshold value are both less than or equal to a preset threshold value; the preset threshold value is used to determine a data sending strategy when sending the first frame of data.

[0018] On the other hand, an embodiment of the present application provides a data sending device, the device comprising:

[0019] An acquisition unit, used to acquire the current data frame;

[0020] a strategy determination unit, configured to determine a data transmission strategy based on the size of the current data frame and a current threshold; the current threshold being determined based on retransmission information of a data frame preceding the current data frame; the data transmission strategy being configured to characterize a collision detection strategy adopted when transmitting the current data frame; the collision detection strategy comprising a first strategy and a second strategy, the number of handshakes between the receiving end and the transmitting end corresponding to the first strategy being greater than the number of handshakes between the receiving end and the transmitting end corresponding to the second strategy;

[0021] A sending unit is configured to send the current data frame based on the data sending strategy.

[0022] On the other hand, an embodiment of the present application provides a data sending device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, it implements some or all of the steps in the above method.

[0023] On the other hand, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements some or all of the steps in the above method when executed by a processor.

[0024] On the other hand, an embodiment of the present application provides a computer program product, including a non-transitory computer-readable storage medium storing a computer program, which implements some or all of the steps in the above method when the computer program is read and executed by a computer.

[0025] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to illustrate the technical solutions of the present application.

[0027] FIG1 is a schematic diagram of an implementation of the CSMA / CA mechanism provided in an embodiment of the present application;

[0028] FIG2 is a schematic diagram of an implementation of the RTS / CTS protocol provided in an embodiment of the present application;

[0029] FIG3 is a schematic diagram of an implementation flow of a data sending method provided in an embodiment of the present application;

[0030] FIG4 is a schematic diagram of an implementation flow of a data sending method provided in an embodiment of the present application;

[0031] FIG5 is a schematic diagram of an application scenario of a data transmission method provided in an embodiment of the present application;

[0032] FIG6 is a schematic diagram of an implementation flow of a data sending method provided in an embodiment of the present application;

[0033] FIG7 is a schematic diagram of an implementation flow of a data sending method provided in an embodiment of the present application;

[0034] FIG8 is a schematic diagram of the structure of a data sending device provided in an embodiment of the present application;

[0035] FIG9 is a schematic diagram of a hardware entity of a data sending device in an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions of this application are further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0037] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0038] The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged with a specific order or sequence where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing this application only and are not intended to limit this application.

[0040] In the related art, in order to avoid the conflict problem caused by multiple nodes accessing the network at the same time, the related art adopts the CSMA / CA mechanism to achieve conflict avoidance. As shown in Figure 1, when the source station 101 sends a data frame (PSDU, Physical Layer Service Data Unit), it first needs to monitor whether the destination station is idle within the range of a frame interval 104. If the destination station 102 is idle within the time range of a frame interval 104, the source station 101 sends the first frame of data to the destination station 102. After the destination station 102 receives the first frame of data sent by the source station 101 and a short frame interval 105 passes, it will send an acknowledgment character 106 (Acknowledge character, ACK) to the source station to indicate that the data has been successfully received. At this time, from the time the source station sends the first frame of data to the time the destination station sends the acknowledgment character 106, the destination station is in a "media busy" state, and other stations 103 cannot send data to the destination station 102. Other stations 103 need to monitor whether the destination station 102 is idle. After the destination station 102 sends an ACK, and after a frame interval 104 + a contention window 107 (Contention Window, CW) has passed, the other stations 103 can send data. However, due to the limited size of the contention window, there is still a certain probability that two other stations will randomly enter the same contention window, resulting in a collision when the two other stations access the medium, that is, sending data to the destination station at the same time. In addition, due to the characteristics of wireless communication, the sender of the data cannot perform collision detection on the data it sends and can only rely on the ACK from the receiving end to confirm whether the data has been sent successfully. When the data frame is long, the collision detection period also becomes longer.

[0041] To address this issue, the 802.11 protocol defines a threshold (dot11RTSThreshold). When the length of a PSDU exceeds this threshold, the sender and receiver must perform a Request To Send / Clear To Send (RTS / CTS) handshake before actually starting data transmission. As shown in Figure 2, when the data frame sent by source station 101 is longer than the threshold, it must send a Require To Send (RTS) signal 201 to destination station 102 after one interframe interval 104. If it receives a Clear To Send (CTS) signal 202 from destination station 102 after one short interframe interval 105, it can then send data frames to destination station 102 after one short interframe interval 105. As shown in Figure 2, between the time source station 101 sends Request To Send signal 201 and the time destination station 102 sends an ACK, destination station 102 is in the "medium busy" state, and other stations 103 cannot send data to it during this period.

[0042] Because RTS and CTS are control frames and don't carry any data, their collision detection period is very short. Furthermore, the duration field in the RTS and CTS control frames reserves channel resources for subsequent data transmission, preventing future collisions. However, the thresholds in the 802.11 protocol are statically configured. This means that once the thresholds are statically configured, any changes in the data frame to be sent are compared against the same threshold to determine whether to initiate an RTS / CTS handshake. Consequently, the data transmission strategy determined each time may not match the current data frame to be sent.

[0043] To address the technical issues of the related art, embodiments of the present application provide a data transmission method, which is applied to a data transmission device. The data transmission device can be provided in an electronic device with processing capabilities, such as a personal computer, mobile terminal, or server, or implemented by a processor executing a computer program. The following description uses an electronic device as an example of the execution subject.

[0044] FIG3 is a schematic diagram of an implementation flow of a data sending method provided in an embodiment of the present application. As shown in FIG3 , the method includes the following steps S301 to S303:

[0045] Step S301: Acquire the current data frame.

[0046] Here, the current data frame is used to represent the data frame to be sent.

[0047] In some embodiments, a sending order of multiple data frames may be obtained, and a data frame to be sent currently may be obtained based on the sending order.

[0048] Step S302: Determine a data sending strategy based on the size of the current data frame and the current threshold.

[0049] Here, the current threshold is determined based on retransmission information of a data frame preceding the current data frame. In other words, the current threshold is a dynamic threshold that changes as the retransmission information of the previous data frame changes. In some embodiments, the previous data frame represents at least one group of data frames that were transmitted before the current data frame and are adjacent to the current data frame, each group of data frames including at least one frame of data.

[0050] Here, the retransmission information of the previous data frame is used to characterize the data collision situation of the previous data frame. In the embodiment of the present application, the retransmission information of the previous data frame may include at least one of the following: the number of retransmissions of the previous data frame, the retransmission response time of the previous data frame, and the packet loss rate of the previous data frame.

[0051] Exemplarily, the number of retransmissions of a previous data frame may be the sum of the number of retransmissions of part of the data in the data frame. For example, if the 8th, 9th, and 200th data packets in a frame are retransmitted, the number of retransmissions of the previous data frame is 3. Exemplarily, the number of retransmissions of a previous data frame may include the sum of the number of retransmissions of data packets in a group (or multiple) of data frames. Exemplarily, the number of retransmissions of a previous data frame may be the number of times the previous data frame was sent when the previous data frame was successfully sent. Exemplarily, if a data frame was not successfully sent until the fourth time, the number of retransmissions of the data frame is 4. In some embodiments, whether a data frame or a data packet in the data frame was successfully sent can be determined by whether an ACK is received. That is, the number of transmissions of the data frame or data packet is determined when an ACK corresponding to the previous data frame is received. When the number of retransmissions of the previous data frame is large, it indicates that the previous data frame had a high number of data collisions and a poor data collision situation. When the number of retransmissions of the previous data frame is small, it indicates that the previous data frame had a low number of data collisions and a good data collision situation.

[0052] Exemplarily, the retransmission response time of the previous data frame may be the time from the first transmission of the previous data frame to the successful transmission of the previous data frame. In some embodiments, the time between the first transmission of the previous data frame and the receipt of the ACK corresponding to the previous data frame may be determined when the ACK corresponding to the previous data frame is received. Exemplarily, the retransmission response time of the previous data frame may be the sum of the response times of each data packet or each group of data packets that are retransmitted in the previous frame or frames. When the retransmission response time of the previous data frame is long, it means that the previous data frame has more data collisions and the data collision situation is worse; when the retransmission response time of the previous data frame is short, it means that the previous data frame has less data collisions and the data collision situation is better.

[0053] For example, the packet loss rate of a previous data frame may be the ratio of the total number of data packets that failed to be transmitted in one or more previous frames to the total number of data packets in the previous data frame. When the packet loss rate of a previous data frame is high, it indicates that the previous data frame had many data collisions and the data collision situation was poor. When the packet loss rate of a previous data frame is low, it indicates that the previous data frame had few data collisions and the data collision situation was good.

[0054] In an embodiment of the present application, the above-mentioned data sending strategy is used to characterize the collision detection strategy adopted when sending the current data frame. Among them, the collision detection strategy includes a first strategy and a second strategy, and the number of handshakes between the receiving end and the sending end corresponding to the first strategy is greater than the number of handshakes between the receiving end and the sending end corresponding to the second strategy. Because the number of handshakes corresponding to the first strategy is greater than the number of handshakes corresponding to the second strategy, the accuracy of the collision detection of the first strategy is also greater than the accuracy of the collision detection of the second strategy. Exemplarily, the first strategy may refer to a strategy that adopts RTS / CTS handshake in the CSMA / CA mechanism (i.e., the strategy in FIG2 ), and the second strategy may refer to a strategy that does not adopt RTS / CTS handshake in the CSMA / CA mechanism (i.e., the strategy in FIG1 ).

[0055] In an embodiment of the present application, the strategy to be adopted for collision detection when sending the current data frame is determined by the size of the current data frame and the current threshold value dynamically determined based on the retransmission information of the previous data frame of the current data frame. In this way, the determined collision detection strategy can be made more consistent with the situation of the current data frame. Thus, when the data collision situation of the previous data frame is good, the data collision situation of the current data frame is likely to be good as well, so a collision detection strategy with lower collision detection accuracy can be used. Since the number of handshakes corresponding to the collision detection strategy with lower accuracy is smaller, the efficiency of collision detection can also be improved. When the data collision situation of the previous data frame is poor, the data collision situation of the current data frame is likely to be poor as well, so a collision detection strategy with higher collision detection accuracy can be used. In this way, when the data collision situation is poor, a collision detection strategy with higher collision detection accuracy can be adopted, thereby improving the efficiency of collision detection.

[0056] Step S303: Send the current data frame based on the data sending strategy.

[0057] In an embodiment of the present application, when sending the current data frame, a collision detection strategy corresponding to the current data frame may be used to perform collision detection, and then the current data frame may be sent.

[0058] In an embodiment of the present application, the collision detection strategy adopted when sending the current data frame is determined by the size of the current data frame and the current threshold value dynamically determined based on the retransmission information of the previous data frame of the current data frame. Because the current threshold value is dynamically determined in real time based on the retransmission information of the previous data frame of the current data frame, the current threshold value matches the current data frame, and the collision detection strategy determined thereby also matches the current data frame. In this way, based on the retransmission information of the previous data frame of the current data frame, collision detection strategies for different handshake times can be flexibly determined, so that the collision detection strategy corresponding to the current data frame is adopted when sending the current data frame, thereby improving the accuracy of collision detection.

[0059] In some embodiments, the previous data frame includes at least two groups of data frames. As shown in FIG4 , the data sending method may further include steps S401 and S402:

[0060] Step S401: Determine the change trend of retransmission information corresponding to the at least two groups of data frames.

[0061] Here, the at least two groups of data frames may be data frame groups that are adjacent to and prior to the current data frame in terms of transmission time, wherein each of the at least two groups of data frames may include at least one frame of data.

[0062] In an embodiment of the present application, the retransmission information corresponding to at least one frame of data in each group of data frames can be first obtained, and then the retransmission information corresponding to each group of data frames can be determined based on the retransmission information corresponding to at least one frame of data in each group of data frames. Finally, based on the retransmission information corresponding to each group of data frames, the change trend of the retransmission information corresponding to at least two groups of data frames can be determined.

[0063] In some embodiments, the at least two groups of data frames include a first data frame group and a second data frame group; the second data frame group is a previous data frame of the first data frame group; the current data frame is a next data frame of the first data frame group; and the above step S401 can be implemented by step S4011:

[0064] Step S4011: Determine a change trend between a statistical value of retransmission information of the first data frame group and a statistical value of retransmission information of the second data frame group.

[0065] In the embodiment of the present application, the statistical value of the retransmission information of the first data frame group and the statistical value of the retransmission information of the second data frame group may be determined first, and then the change trend may be determined.

[0066] In some embodiments, determining the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group may include: determining the retransmission information statistics of the first data frame group based on the retransmission information corresponding to at least one frame data in the first data frame group; determining the retransmission information statistics of the second data frame group based on the retransmission information corresponding to at least one frame data in the second data frame group.

[0067] In an embodiment of the present application, determining the statistical value of the retransmission information of the first data frame group may include one of the following: the average value of the retransmission information corresponding to at least one frame data in the first data frame group, the weighted average value of the retransmission information corresponding to at least one frame data in the first data frame group, the square average of the retransmission information corresponding to at least one frame data in the first data frame group, and the median value of the retransmission information corresponding to at least one frame data in the first data frame group.

[0068] In some embodiments, the manner of determining the statistical value of the retransmission information of the second data frame group may be the same as or different from the manner of determining the statistical value of the retransmission information of the first data frame group.

[0069] In some embodiments, after determining the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group, a change trend can be determined by calculating the difference between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group. If the difference between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group is a positive number, it can be indicated that the change trend is an increasing trend; if the difference between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group is a negative number, it can be indicated that the change trend is a decreasing trend.

[0070] Step S402: determining the current threshold value based on the change trend; the current threshold value is negatively correlated with the change trend.

[0071] In the embodiment of the present application, a mapping relationship table between change trends and threshold values ​​can be obtained. The mapping relationship table includes mapping relationships between different change trends and threshold values, and all mapping relationships indicate that the threshold value is negatively correlated with the change trend. That is, if the change trend indicates an increase in retransmission information, the threshold value is decreased; if the change trend indicates a decrease in retransmission information, the threshold value is increased.

[0072] In some embodiments, as shown in FIG4 , step S402 may be implemented through steps S4021 and S4022:

[0073] Step S4021: When the change trend indicates that the retransmission information statistic of the first data frame group is greater than the retransmission information statistic of the second data frame group, the historical threshold corresponding to the first data frame group is reduced to obtain the current threshold.

[0074] Step S4022: When the change trend indicates that the statistical value of the retransmission information of the first data frame group is less than the statistical value of the retransmission information of the second data frame group, the historical threshold corresponding to the first data frame group is increased to obtain the current threshold.

[0075] In the embodiment of the present application, when the change trend is a positive number, it means that the retransmission information statistics of the first data frame group are greater than the retransmission information statistics of the second data frame group, and the historical threshold value corresponding to the first data frame group adjacent to the current data frame needs to be reduced. Because when the retransmission information statistics corresponding to the first data frame group adjacent to the current data frame increase, it means that the data collision may become more intense, that is, the data collision situation is worse, and a more accurate collision detection strategy (i.e., the first strategy) needs to be adopted at this time. After reducing the historical threshold value corresponding to the first data frame group, the first strategy can be used with a higher probability when sending the current data frame, thereby performing more accurate collision detection.

[0076] Similarly, when the change trend is negative, it means that the retransmission information statistics of the first data frame group are less than the retransmission information statistics of the second data frame group, and the historical threshold corresponding to the first data frame group adjacent to the current data frame needs to be increased. Because when the retransmission information statistics corresponding to the first data frame group adjacent to the current data frame decreases, it means that the data collision may become smoother, that is, the data collision situation is better. In this case, a relatively accurate collision detection strategy (i.e., the second strategy) can be adopted. After increasing the historical threshold corresponding to the first data frame group, the second strategy can be used with a higher probability when sending the current data frame, thereby adopting the second strategy with fewer handshakes when the data collision situation of the previous data frame is better.

[0077] In an embodiment of the present application, a change trend between the retransmission information statistics of a first data frame group, which is the previous data frame of the current data frame, and the retransmission information statistics of a second data frame group, which is the previous data frame of the first data frame group, is determined. Then, if the change trend indicates that the retransmission information statistics of the first data frame group are greater than the retransmission information statistics of the second data frame group, the historical threshold corresponding to the first data frame group is reduced to obtain the current threshold; if the change trend indicates that the retransmission information statistics of the first data frame group are less than the retransmission information statistics of the second data frame group, the historical threshold corresponding to the first data frame group is increased to obtain the current threshold. In this way, based on the size relationship between the retransmission information statistics of the first data frame group and the retransmission information of the second data frame group, the historical threshold corresponding to the first data frame group, which is the previous data frame of the current data frame, can be dynamically adjusted, thereby dynamically determining the current threshold, and then using the collision detection strategy corresponding to the current data frame for collision detection.

[0078] In some embodiments, a preset threshold value can be pre-set before sending the first frame of data. This preset threshold value is used to determine the data transmission strategy when sending the first frame of data. This is because the first frame of data does not have a previous data frame, so the current threshold value corresponding to the first frame of data cannot be dynamically determined. In some embodiments, the current threshold value and the historical threshold value are both less than the preset threshold value. In other words, no matter how the historical threshold value is increased, it cannot exceed the preset threshold value.

[0079] In some embodiments, as shown in FIG5 , the above step S402 can be implemented by steps S501 and S502:

[0080] Step S501 : when the change trend indicates that the retransmission information of the subsequent data frame in the at least two groups of data frames becomes larger, determine the product of the threshold value before adjustment and a first preset multiple smaller than 1 as the current threshold value.

[0081] Step S502 : when the change trend indicates that the retransmission information of the subsequent data frame in the at least two groups of data frames becomes smaller, determine the product of the threshold value before adjustment and a second preset multiple greater than 1 as the current threshold value.

[0082] Here, the threshold value before adjustment is the threshold value corresponding to the subsequent data frame in the at least two groups of data frames.

[0083] In an embodiment of the present application, when the change trend indicates that the retransmission information of the subsequent data frame in at least two groups of data frames becomes larger, it means that compared with the previous data frame in at least two groups of data frames, the subsequent data frame was retransmitted multiple times before it was successfully sent, that is, data collisions in the current channel are relatively frequent, and it is necessary to adopt the first strategy with a large number of handshakes at this time, so the product of the threshold value before adjustment and the first preset multiple that is less than 1 can be determined as the threshold value. Exemplarily, the first preset multiple can be 1 / 2. Because the first preset multiple is less than 1, it is equivalent to reducing the threshold value before adjustment. Because the current threshold value becomes smaller than the threshold value before adjustment, the electronic device will be more inclined to use the first strategy, so that collision detection can be accurately performed.

[0084] Similarly, when the change trend indicates that the retransmission information of the subsequent data frame in at least two groups of data frames is decreasing, it means that compared with the previous data frame in the at least two groups of data frames, the subsequent data frame was successfully sent after a relatively small number of retransmissions. In other words, data collisions in the current channel are not very frequent. In this case, the second strategy with a smaller number of handshakes can be adopted. Therefore, the product of the threshold value before adjustment and a second preset multiple greater than 1 can be determined as the threshold value. Exemplarily, the second preset multiple can be 2. Because the second preset multiple is greater than 1, it is equivalent to reducing the threshold value before adjustment. Because the current threshold value is larger than the threshold value before adjustment, the electronic device will be more inclined to use the second strategy.

[0085] In an embodiment of the present application, it is possible to determine whether the retransmission information of the subsequent data frame in the at least two groups of data frames has increased relative to the retransmission information of the preceding data frame in the at least two groups of data frames by analyzing the changing trends of the retransmission information corresponding to the respective data frames. If the retransmission information of the subsequent data frame has increased, the product of the pre-adjustment threshold value and a first preset multiple smaller than 1 can be determined as the current threshold value to reduce the pre-adjustment threshold value. If the retransmission information of the subsequent data frame has decreased, the product of the pre-adjustment threshold value and a second preset multiple larger than 1 can be determined as the current threshold value to increase the pre-adjustment threshold value. In this way, the current threshold value can be adjusted in real time based on the changes in the retransmission information of the subsequent data frame in the at least two groups of data frames to dynamically determine the collision detection strategy corresponding to the current data frame.

[0086] In some embodiments, as shown in FIG6 , the above step S302 may be implemented through steps S601 and S602:

[0087] Step S601: When the size of the current data frame is smaller than the current threshold, determine to adopt the second strategy when sending the current data frame.

[0088] Step S602: When the size of the current data frame is greater than the current threshold, determine to adopt the first strategy when sending the current data frame.

[0089] In an embodiment of the present application, after dynamically determining the current threshold value based on the retransmission information of the previous data frame of the current data frame, the size relationship between the size of the current data frame and the current threshold value can be determined. When the size of the current data frame is smaller than the current threshold value, it means that the size of the current data frame is small. Even if a data collision occurs when sending the current data frame, it can be sent a second time, so the second strategy with fewer handshakes can be adopted.

[0090] If the size of the current data frame is larger than the current threshold, it means that the size of the current data frame is large. If a data collision occurs, the cost of sending the current data frame again is high, which will cause efficiency loss. Therefore, the first strategy with higher collision detection accuracy needs to be adopted.

[0091] In the embodiment of the present application, the size of the current data frame can be compared with the current threshold value. If the size of the current data frame is less than the current threshold value, the second strategy is used for collision detection; if the size of the current data frame is greater than the current threshold value, the first strategy is used for collision detection. In this way, the collision detection strategy can be determined in real time based on the size relationship between the current data frame and the current threshold value, thereby improving the adaptability of the collision detection strategy to the current data frame.

[0092] FIG7 is a schematic diagram of an implementation flow of a data sending method provided in an embodiment of the present application. As shown in FIG7 , the method includes the following steps S701 to S710:

[0093] Step S701: Obtain the number of retransmissions of the current frame data.

[0094] Step S702 , determining the relationship between the number of retransmissions of the current frame data, a preset number of retransmissions, and 0.

[0095] In the embodiment of the present application, when the number of retransmissions is the preset number, step S703 is executed; when the number of retransmissions is 0, step S706 is executed; when the number of retransmissions is between the preset number and 0, step S709 is executed.

[0096] Here, the preset number represents the maximum number of retransmissions. If the current frame fails to be sent because the number of retransmissions exceeds the maximum number, the retransmission count for the current frame can be set to the preset number. A retransmission count of 0 indicates that the current data frame was successfully sent once without retransmission.

[0097] Step S703: determine 1 / 2 of the threshold corresponding to the current frame data as the threshold of the next frame.

[0098] Step S704: determine whether the threshold value of the next frame is less than 1.

[0099] When the threshold value of the next frame is less than 1, step S705 is executed; when the threshold value of the next frame is not less than 1, step S710 is executed.

[0100] Step S705: Set the threshold of the next frame to 1.

[0101] Step S706: determine twice the threshold corresponding to the current frame data as the threshold for the next frame.

[0102] Step S707: determine whether the threshold of the next frame is greater than the preset threshold.

[0103] If the threshold value of the next frame is greater than the preset threshold value, step S708 is executed; if the threshold value of the next frame is not greater than the preset threshold value, step S710 is executed.

[0104] Step S708: Set the threshold of the next frame to the preset threshold.

[0105] Step S709 , determining the magnitude relationship between the number of retransmissions of the current frame data and the number of retransmissions of the previous data frame of the current data frame.

[0106] In an embodiment of the present application, when the number of retransmissions of the current frame data is greater than the number of retransmissions of the previous data frame, step S703 is executed; when the number of retransmissions of the current frame data is less than the number of retransmissions of the previous data frame, step S706 is executed; when the number of retransmissions of the current frame data is equal to the number of retransmissions of the previous data frame, step S710 is executed.

[0107] Step S710, end.

[0108] In this embodiment of the present application, the threshold corresponding to a data frame can be gradually reduced as the number of retransmissions of the data frame increases. A higher number of retransmissions indicates more frequent collisions. Reducing the threshold will make the terminal more likely to use the RTS / CTS handshake mechanism, thereby shortening the collision detection cycle and improving data transmission efficiency in densely populated scenarios.

[0109] FIG8 is a schematic diagram of the structure of a data sending device provided in an embodiment of the present application. As shown in FIG8 , the data sending device 800 includes: an acquisition unit 810, a policy determination unit 820, and a sending unit 830, wherein:

[0110] An acquisition unit 810 is configured to acquire a current data frame;

[0111] A strategy determination unit 820 is configured to determine a data transmission strategy based on the size of the current data frame and a current threshold value; the current threshold value is determined based on retransmission information of a data frame previous to the current data frame; the data transmission strategy is used to represent a collision detection strategy adopted when transmitting the current data frame; the collision detection strategy includes a first strategy and a second strategy, and the number of handshakes between the receiving end and the transmitting end corresponding to the first strategy is greater than the number of handshakes between the receiving end and the transmitting end corresponding to the second strategy;

[0112] The sending unit 830 is configured to send the current data frame based on the data sending strategy.

[0113] In some embodiments, the previous data frame includes at least two groups of data frames; the data sending device also includes a threshold determination unit; the threshold determination unit is used to determine the change trend of the retransmission information corresponding to the at least two groups of data frames respectively; based on the change trend, the current threshold value is determined; the current threshold value is negatively correlated with the change trend.

[0114] In some embodiments, the at least two groups of data frames include a first data frame group and a second data frame group; the second data frame group is the previous data frame of the first data frame group; the current data frame is the next data frame of the first data frame group; the threshold determination unit is also used to determine the change trend between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group; when the change trend indicates that the retransmission information statistics of the first data frame group are greater than the retransmission information statistics of the second data frame group, the historical threshold corresponding to the first data frame group is reduced to obtain the current threshold; when the change trend indicates that the retransmission information statistics of the first data frame group are less than the retransmission information statistics of the second data frame group, the historical threshold corresponding to the first data frame group is increased to obtain the current threshold.

[0115] In some embodiments, the retransmission information of the previous data frame includes at least one of the following: the number of retransmissions of the previous data frame; the retransmission response time of the previous data frame; and the packet loss rate of the previous data frame.

[0116] In some embodiments, the threshold determination unit is further used to determine the product of the threshold value before adjustment and a first preset multiple less than 1 as the current threshold value when the change trend indicates that the retransmission information of the subsequent data frames in the at least two groups of data frames becomes larger; and to determine the product of the threshold value before adjustment and a second preset multiple greater than 1 as the current threshold value when the change trend indicates that the retransmission information of the subsequent data frames in the at least two groups of data frames becomes smaller.

[0117] In some embodiments, the strategy determination unit 820 is also used to determine whether to adopt the second strategy when sending the current data frame when the size of the current data frame is smaller than the current threshold value; and to determine whether to adopt the first strategy when sending the current data frame when the size of the current data frame is larger than the current threshold value.

[0118] In some embodiments, the current threshold value and the historical threshold value are both less than or equal to a preset threshold value; the preset threshold value is used to determine a data sending strategy when sending the first frame of data.

[0119] The description of the above device embodiment is similar to the description of the above method embodiment and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to perform the methods described in the above method embodiments. For technical details not disclosed in the device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0120] It should be noted that, in the embodiment of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software and firmware.

[0121] An embodiment of the present application provides a computer device including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0122] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements some or all of the steps in the above method. The computer-readable storage medium may be transient or non-transient.

[0123] An embodiment of the present application provides a computer program, including computer-readable code. When the computer-readable code runs in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0124] The present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented in hardware, software, or a combination thereof. In some embodiments, the computer program product is embodied as a computer storage medium. In other embodiments, the computer program product is embodied as a software product, such as a software development kit (SDK).

[0125] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between the various embodiments, and their similarities or similarities can be referenced to each other. The descriptions of the above device, storage medium, computer program, and computer program product embodiments are similar to the descriptions of the above method embodiments and have similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of this application, please refer to the description of the method embodiments of this application for understanding.

[0126] FIG9 is a schematic diagram of a hardware entity of a data sending device according to an embodiment of the present application. As shown in FIG9 , the hardware entity of the data sending device 900 includes: a processor 901, a communication interface 902, and a memory 903, wherein:

[0127] The processor 901 generally controls the overall operation of the computer device 900 , and the overall operation may be to implement the data sending method provided in the embodiment of the present application, for example, the method shown in FIG. 3 to FIG. 7 .

[0128] The communication interface 902 enables the computer device to communicate with other terminals or servers through a network.

[0129] The memory 903 is configured to store instructions and applications executable by the processor 901. It can also cache data to be processed or processed by the processor 901 and various modules in the computer device 900 (e.g., image data, audio data, voice communication data, and video communication data). This can be implemented using flash memory (FLASH) or random access memory (RAM). Data can be transmitted between the processor 901, the communication interface 902, and the memory 903 via a bus 904.

[0130] An embodiment of the present application provides a computer storage medium storing one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the touch position determination method of any of the above embodiments.

[0131] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0132] The processor may be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It is understood that the electronic device that implements the functions of the processor may also be other electronic devices, which are not specifically limited in the embodiments of the present application.

[0133] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0134] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned steps / processes does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments.

[0135] It should be noted that, in this document, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0136] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0137] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0138] In addition, all functional units in the embodiments of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the above-mentioned integrated units can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0139] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, and other media that can store program codes.

[0140] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words be embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0141] The above are only implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the protection scope of the present application.

Claims

1. A data transmission method, the method comprising: Get the current data frame; Based on the size of the current data frame and the current threshold value, a data sending strategy is determined; wherein the current threshold value is determined based on the retransmission information of the previous data frame of the current data frame; the data sending strategy is used to characterize the collision detection strategy adopted when sending the current data frame; the collision detection strategy includes a first strategy and a second strategy, and the number of handshakes between the receiving end and the sending end corresponding to the first strategy is greater than the number of handshakes between the receiving end and the sending end corresponding to the second strategy; Based on the data sending strategy, the current data frame is sent.

2. The method according to claim 1, wherein the previous data frame comprises at least two groups of data frames; the method further comprises: Determine a change trend of retransmission information respectively corresponding to the at least two groups of data frames; Based on the change trend, determining the current threshold value; The current threshold value is negatively correlated with the change trend.

3. The method according to claim 2, wherein the at least two groups of data frames include a first data frame group and a second data frame group; the second data frame group is a previous data frame of the first data frame group; The current data frame is the next data frame of the first data frame group; The determining the change trend of the retransmission information respectively corresponding to the at least two groups of data frames includes: Determine a change trend between a statistical value of retransmission information of the first data frame group and a statistical value of retransmission information of the second data frame group; The determining the current threshold value based on the change trend includes: When the change trend indicates that the statistical value of the retransmission information of the first data frame group is greater than the statistical value of the retransmission information of the second data frame group, reducing the historical threshold corresponding to the first data frame group to obtain the current threshold; When the change trend indicates that the statistical value of the retransmission information of the first data frame group is less than the statistical value of the retransmission information of the second data frame group, the historical threshold corresponding to the first data frame group is increased to obtain the current threshold.

4. The method according to claim 1, wherein the retransmission information of the previous data frame comprises at least one of the following: The number of retransmissions of the previous data frame; a retransmission response time of the previous data frame; The packet loss rate of the previous data frame.

5. The method according to claim 2, wherein determining the current threshold value based on the change trend comprises: In a case where the change trend indicates that the retransmission information of the subsequent data frame in the at least two groups of data frames becomes larger, the product of the threshold value before adjustment and a first preset multiple less than 1 is determined as the current threshold value; When the change trend indicates that the retransmission information of the subsequent data frames in the at least two groups of data frames becomes smaller, the product of the threshold value before adjustment and a second preset multiple greater than 1 is determined as the current threshold value.

6. The method according to any one of claims 1 to 5, wherein determining the data sending strategy based on the size of the current data frame and the current threshold value comprises: When the size of the current data frame is smaller than the current threshold, determining to adopt the second strategy when sending the current data frame; When the size of the current data frame is greater than the current threshold, it is determined to adopt the first strategy when sending the current data frame.

7. According to the method of claim 3, the current threshold value and the historical threshold value are both less than or equal to a preset threshold value; the preset threshold value is used to determine the data sending strategy when sending the first frame of data.

8. A data sending device, comprising: An acquisition unit, used for acquiring a current data frame; A strategy determination unit, configured to determine a data transmission strategy based on the size of the current data frame and a current threshold value; The current threshold is determined based on retransmission information of a previous data frame of the current data frame; the data sending strategy is used to characterize the collision detection strategy adopted when sending the current data frame; the collision detection strategy includes a first strategy and a second strategy, and the number of handshakes between the receiving end and the sending end corresponding to the first strategy is greater than the number of handshakes between the receiving end and the sending end corresponding to the second strategy; A sending unit is used to send the current data frame based on the data sending strategy.

9. A data sending device, comprising a processor and a memory storing instructions executable by the processor; when the instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a non-transitory computer-readable storage medium storing a computer program, wherein when the computer program is read and executed by a computer, the data transmission method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data transmission method and device and sending end equipment

    CN113747503A

  • Data sending method and device, equipment and storage medium

    CN117676935A

  • Method for dynamic control of RTS threshold to improve throughput of MAC in wireless LAN system, and computer-readable medium thereof

    US20050141476A1

  • Control frame feature on demand in a wireless communication system

    US20080144500A1

  • Method of performing RTS / CTS procedure in wireless LAN system and apparatus thereof

    US20170164371A1