Data sending method, apparatus, device, and storage medium

CN117676935BActive Publication Date: 2026-09-22LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311618980.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2026-09-22
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

但由于竞争窗口(ContentionWindow,CW)大小有限,仍有一定概率两个终端随机到同一个竞争窗口,从而发生两个终端在接入媒介时产生碰撞

Benefits of technology

[0010]本申请实施例中,确定为当前数据帧的上一数据帧的第一数据帧组的重传信息统计值与为第一数据帧组的在先数据帧的第二数据帧组的重传信息统计值之间的变化趋势,然后在变化趋势表征第一数据帧组的重传信息统计值大于第二数据帧组的重传信息统计值的情况下,对第一数据帧组所对应的历史门限阈值进行减小处理,得到当前门限阈值;在变化趋势表征第一数据帧组的重传信息统计值小于第二数据帧组的重传信息统计值的情况下,对第一数据帧组所对应的历史门限阈值进行增大处理,得到当前门限阈值。这样,根据第一数据帧组的重传信息统计值与第二数据帧组的重传信息之间的大小关系,可以动态地对当前数据帧的上一数据帧的第一数据帧组所对应的历史门限阈值进行调整,从而实现动态地确定当前门限阈值,进而可以采用与当前数据帧对应的碰撞检测策略进行碰撞检测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117676935B_ABST
    Figure CN117676935B_ABST
Patent Text Reader

Abstract

The application provides a data sending method and device, equipment and storage medium, the method comprises: obtaining a current data frame; determining 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 the retransmission information of the previous data frame of the current data frame; the data sending strategy is used to represent the collision detection strategy adopted when sending the current data frame; the collision detection strategy includes a first strategy and a second strategy, 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication, and more particularly to a data transmission method, apparatus, device, and storage medium. Background Technology

[0002] Because wireless channels have a collision domain, to avoid collisions caused by multiple nodes accessing the network simultaneously, related technologies employ Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) mechanisms. 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 the two terminals access the medium. Summary of the Invention

[0003] In view of the above, embodiments of this application provide at least one data transmission method, apparatus, device, and storage medium.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] On one hand, embodiments of this application provide a data transmission method, the method comprising:

[0006] Obtain the current data frame; determine a data transmission strategy based on the size of the current data frame and a current threshold; wherein the current threshold is determined based on the retransmission information of the previous data frames of the current data frame; the data transmission strategy is used to characterize the collision detection strategy adopted when transmitting the current data frame; the collision detection strategy includes a first strategy and a second strategy, wherein the number of handshakes between the receiver and the sender corresponding to the first strategy is greater than the number of handshakes between the receiver and the sender corresponding to the second strategy; transmit the current data frame based on the data transmission strategy.

[0007] In this embodiment, the collision detection strategy used when sending the current data frame is determined by the size of the current data frame and a current threshold dynamically determined based on the retransmission information of previous data frames. Because the current threshold is dynamically determined in real-time using the retransmission information of previous data frames, it matches the current data frame, and therefore the determined collision detection strategy also matches the current data frame. In this way, based on the retransmission information of previous data frames, collision detection strategies for different handshake counts can be flexibly determined, thus adopting the collision detection strategy corresponding to the current data frame when sending it, thereby improving the accuracy of collision detection.

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

[0009] In some embodiments, the at least two sets of data frames include a first data frame group and a second data frame group; the second data frame group is a preceding 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 changing trend of retransmission information corresponding to the at least two sets of data frames includes: determining the changing 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 based on the changing trend includes: when the changing trend indicates that the retransmission information statistics of the first data frame group is greater than the retransmission information statistics of the second data frame group, decreasing the historical threshold corresponding to the first data frame group to obtain the current threshold; when the changing trend indicates that the retransmission information statistics of the first data frame group is less than the retransmission information statistics of the second data frame group, increasing the historical threshold corresponding to the first data frame group to obtain the current threshold.

[0010] In this embodiment, the changing trend between the retransmission information statistics of the first data frame group (the previous data frame of the current data frame) and the retransmission information statistics of the second data frame group (the preceding data frame of the first data frame group) is determined. Then, if the changing trend indicates that the retransmission information statistics of the first data frame group are greater than those of the second data frame group, the historical threshold corresponding to the first data frame group is decreased to obtain the current threshold. If the changing trend indicates that the retransmission information statistics of the first data frame group are less than those of the second data frame group, the historical threshold corresponding to the first data frame group is increased to obtain the current threshold. Thus, based on the relationship between the retransmission information statistics of the first and second data frame groups, the historical threshold corresponding to the first data frame group of the previous data frame of the current data frame can be dynamically adjusted, thereby dynamically determining the current threshold. This allows for the application of a collision detection strategy corresponding to the current data frame for collision detection.

[0011] In some embodiments, determining the current threshold based on the changing trend includes: when the changing trend indicates that the retransmission information in the later data frame increases in the at least two sets of data frames, determining the product of the unadjusted threshold and a first preset multiple less than 1 as the current threshold; and when the changing trend indicates that the retransmission information in the later data frame decreases in the at least two sets of data frames, determining the product of the unadjusted threshold and a second preset multiple greater than 1 as the current threshold.

[0012] In this embodiment, the retransmission information of a later data frame in at least two sets of data frames can be used to determine whether the retransmission information of that later data frame has increased relative to the retransmission information of an earlier data frame in at least two sets of data frames, based on the changing trends of the retransmission information. If the retransmission information of the later data frame has increased, the product of the original threshold and a first preset multiple less than 1 can be used as the current threshold to reduce the original threshold. If the retransmission information of the later data frame has decreased, the product of the original threshold and a second preset multiple greater than 1 can be used as the current threshold to increase the original threshold. In this way, the current threshold can be adjusted in real time based on the changes in the retransmission information of the later data frames in at least two sets of data frames, thereby dynamically determining the collision detection strategy corresponding to the current data frame.

[0013] In some embodiments, determining the data transmission strategy based on the size of the current data frame and the current threshold includes: determining to use the second strategy when transmitting the current data frame if the size of the current data frame is less than the current threshold; and determining to use the first strategy when transmitting the current data frame if the size of the current data frame is greater than the current threshold.

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

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

[0016] On the other hand, embodiments of this application provide a data transmission apparatus, the apparatus comprising:

[0017] The acquisition unit is used to acquire the current data frame;

[0018] A strategy determination unit is used to determine a data transmission strategy based on the size of the current data frame and a current threshold; the current threshold is determined based on the retransmission information of the previous data frames of the current data frame; the data transmission strategy is used to characterize the collision detection strategy adopted when transmitting the current data frame; the collision detection strategy includes a first strategy and a second strategy, wherein the number of handshakes between the receiver and the sender corresponding to the first strategy is greater than the number of handshakes between the receiver and the sender corresponding to the second strategy;

[0019] The sending unit is used to send the current data frame based on the data sending strategy.

[0020] In another aspect, embodiments of this application provide a data transmission device, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement some or all of the steps in the above-described method.

[0021] In another aspect, embodiments of this application provide 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-described method.

[0022] 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 this disclosure. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0024] Figure 1 A schematic diagram illustrating the implementation of the CSMA / CA mechanism provided in this application embodiment;

[0025] Figure 2 A schematic diagram illustrating the implementation of the RTS / CTS protocol provided in this application embodiment;

[0026] Figure 3 A schematic diagram illustrating the implementation flow of a data transmission method provided in an embodiment of this application;

[0027] Figure 4 A schematic diagram illustrating the implementation flow of a data transmission method provided in an embodiment of this application;

[0028] Figure 5 This is a schematic diagram illustrating an application scenario of a data transmission method provided in an embodiment of this application.

[0029] Figure 6 A schematic diagram illustrating the implementation flow of a data transmission method provided in an embodiment of this application;

[0030] Figure 7 A schematic diagram illustrating the implementation flow of a data transmission method provided in an embodiment of this application;

[0031] Figure 8 This is a schematic diagram of the composition structure of a data transmission device provided in an embodiment of this application;

[0032] Figure 9 This is a schematic diagram of a hardware entity of a data transmission device in an embodiment of this application. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application are further described in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is 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.

[0035] The terms “first / second / third” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first / second / third” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for descriptive purposes only and is not intended to limit the scope of this application.

[0037] In related technologies, to avoid conflicts caused by multiple nodes accessing the network simultaneously, CSMA / CA mechanisms are used for conflict avoidance. For example... Figure 1As shown, when source station 101 sends a data frame (PSDU, Physical Layer Service Data Unit), it first needs to listen for a frame interval 104 to see if the destination station is idle. If the destination station 102 is idle within the frame interval 104, source station 101 sends the first data frame to the destination station 102. After the destination station 102 receives the first data frame sent by source station 101 and a short frame interval 105 has elapsed, it sends an acknowledgment character 106 (ACK) to the source station to indicate that the data has been successfully received. During this period, from the time the source station sends the first data frame 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 destination station 102 is idle. Only after destination station 102 sends an ACK, and after a frame interval of 104 + a contention window (CW) of 107 has been detected that destination station 102 is idle, can other stations 103 send data. However, due to the limited size of the contention window, there is still a certain probability that two other stations will randomly fall into the same contention window, resulting in a collision when the two other stations access the medium, i.e., simultaneously sending data to the destination station. Furthermore, due to the characteristics of wireless communication, the data sender cannot perform collision detection on its own data and can only rely on the receiver's ACK to confirm whether the data has been successfully sent. When the data frame is long, the collision detection period also becomes longer.

[0038] To address the aforementioned issues, the 802.11 protocol defines a threshold (dot11RTSThreshold). When the length of the PSDU exceeds this threshold, the sender and receiver must perform a Request To Send / Clear To Send (RTS / CTS) handshake before commencing actual data transmission. Figure 2 As shown, when the data frame sent by source station 101 exceeds the threshold, a Require ToSend (RTS) signal 201 needs to be sent to destination station 102 after a frame interval 104. If a Clear ToSend (CTS) signal 202 is received from destination station 102 after a short frame interval 105, a data frame can be sent to destination station 102 after another short frame interval 105. Figure 2 As shown, between the time the source station 101 sends the send request signal 201 and the destination station 102 sends the ACK, the destination station 102 is in a "media busy" state, and other stations 103 cannot send data to the destination station during this period.

[0039] Because RTS and CTS are control frames and do not carry any data, their collision detection period is very short. Simultaneously, 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 after the thresholds are statically configured, regardless of changes in the data frame to be transmitted, it is always compared with the same threshold to determine whether to initiate an RTS / CTS handshake. Therefore, the data transmission strategy determined each time cannot match the currently pending data frame.

[0040] To address the technical problems existing in related technologies, embodiments of this application provide a data transmission method, which is applied in a data transmission device. The data transmission device can be installed in electronic devices with processing capabilities, such as personal computers, mobile terminals, and servers, or implemented by a processor executing a computer program. The following description uses an electronic device as the execution subject as an example.

[0041] Figure 3 This is a schematic diagram illustrating the implementation flow of a data transmission method provided in an embodiment of this application, as shown below. Figure 3 As shown, the method includes the following steps S301 to S303:

[0042] Step S301: Obtain the current data frame.

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

[0044] In some embodiments, the transmission order of multiple data frames can be obtained, and the data frame to be transmitted can be obtained based on the transmission order.

[0045] Step S302: Determine the data transmission strategy based on the size of the current data frame and the current threshold.

[0046] Here, the current threshold is determined based on the retransmission information of previous data frames of the current data frame. That is, the current threshold is a dynamic threshold that changes as the retransmission information of previous data frames changes. In some embodiments, previous data frames are used to characterize at least one group of data frames that were sent before the current data frame and are adjacent to the current data frame, and each group of data frames includes at least one data frame.

[0047] Here, the retransmission information of previous data frames is used to characterize the data collision situation of previous data frames. In this embodiment, the retransmission information of previous data frames 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. Wherein:

[0048] For example, the retransmission count of a previous data frame can be the sum of the retransmission counts of some data within the data frame. For instance, if the 8th, 9th, and 200th data packets in the frame are retransmitted, the retransmission count of the previous data frame is 3. Alternatively, the retransmission count can include the sum of the retransmission counts of data packets in a group (or multiple) data frames. For example, the retransmission count can be the number of times the previous data frame was successfully transmitted. For example, if a data frame is successfully transmitted on its 4th transmission, the retransmission count is 4. In some embodiments, whether a data frame or data packets within a data frame have been successfully transmitted can be determined by whether an ACK is received; that is, if an ACK corresponding to the previous data frame is received, the number of transmissions of the data frame or data packets is determined. A higher retransmission count indicates more data collisions and a poorer data collision situation; a lower retransmission count indicates fewer data collisions and a better data collision situation.

[0049] For example, the retransmission response time of a previous data frame can be the time between the first transmission of the previous data frame and 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 can be determined upon receiving the ACK corresponding to the previous data frame. For example, the retransmission response time of a previous data frame can be the sum of the response times of each data packet or group of data packets that were retransmitted in the previous frame or multiple frames. When the retransmission response time of a previous data frame is long, it indicates that there are many data collisions in the previous data frame, and the data collision situation is poor; when the retransmission response time of a previous data frame is short, it indicates that there are few data collisions in the previous data frame, and the data collision situation is good.

[0050] For example, the packet loss rate of a previous data frame can be the ratio of the total number of data packets that failed to be sent 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 there are more data collisions in the previous data frame and the data collision situation is poor; when the packet loss rate of a previous data frame is low, it indicates that there are fewer data collisions in the previous data frame and the data collision situation is good.

[0051] In this embodiment, the data transmission strategy described above is used to characterize the collision detection strategy employed when transmitting the current data frame. The collision detection strategy includes a first strategy and a second strategy. The number of handshakes between the receiver and transmitter corresponding to the first strategy is greater than the number of handshakes between the receiver and transmitter 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 collision detection using the first strategy is also greater than the accuracy of collision detection using the second strategy. For example, the first strategy can refer to the strategy using RTS / CTS handshake in the CSMA / CA mechanism (i.e.,... Figure 2 The second strategy can refer to the strategy in the CSMA / CA mechanism that does not use RTS / CTS handshake (i.e., the strategy in the CSMA / CA mechanism). Figure 1 (Strategies in the middle).

[0052] In this embodiment, the collision detection strategy is determined by dynamically setting a current threshold based on the size of the current data frame and the retransmission information of previous data frames. This ensures that the determined collision detection strategy is more suitable for the current data frame. Therefore, if the collision situation of previous data frames is relatively good, the current data frame is likely to also have a relatively good collision situation, allowing a collision detection strategy with lower accuracy to be used. Since this strategy requires fewer handshakes, it also improves collision detection efficiency. Conversely, if the collision situation of previous data frames is relatively poor, the current data frame is likely to also have a relatively poor collision situation, allowing a collision detection strategy with higher accuracy to be used even in cases of poor collision conditions, thus improving collision detection efficiency.

[0053] Step S303: Based on the data transmission strategy, send the current data frame.

[0054] In this embodiment of the application, when sending the current data frame, a collision detection strategy corresponding to the current data frame can be used to perform collision detection, and then the current data frame can be sent.

[0055] In this embodiment, the collision detection strategy used when sending the current data frame is determined by the size of the current data frame and a current threshold dynamically determined based on the retransmission information of previous data frames. Because the current threshold is dynamically determined in real-time using the retransmission information of previous data frames, it matches the current data frame, and therefore the determined collision detection strategy also matches the current data frame. In this way, based on the retransmission information of previous data frames, collision detection strategies for different handshake counts can be flexibly determined, thus adopting a collision detection strategy corresponding to the current data frame when sending it, thereby improving the accuracy of collision detection.

[0056] In some embodiments, the preceding data frame includes at least two sets of data frames, such as Figure 4 As shown, the above data transmission method may further include steps S401 and S402:

[0057] Step S401: Determine the changing trend of the retransmission information corresponding to the at least two sets of data frames.

[0058] Here, the at least two sets of data frames can be data frame groups that are adjacent to and precede the current data frame in terms of transmission time, and each of the at least two sets of data frames can include at least one data frame.

[0059] In this embodiment of the application, the retransmission information corresponding to at least one data frame in each group of data frames can be obtained first. Then, based on the retransmission information corresponding to at least one data frame in each group of data frames, the retransmission information corresponding to each group of data frames can be determined. Finally, based on the retransmission information corresponding to each group of data frames, the changing trend of the retransmission information corresponding to at least two groups of data frames can be determined.

[0060] In some embodiments, the above-mentioned 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 preceding data frame of the first data frame group; the current data frame is a following data frame of the first data frame group; the above-mentioned step S401 can be implemented by step S4011:

[0061] Step S4011: Determine the trend of change between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group.

[0062] In this embodiment of the application, the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group can be determined first, and then the trend of change can be determined.

[0063] 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 of data in the first data frame group; and determining the retransmission information statistics of the second data frame group based on the retransmission information corresponding to at least one frame of data in the second data frame group.

[0064] In this embodiment of the application, determining the statistical value of 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 of data in the first data frame group, the weighted average value of the retransmission information corresponding to at least one frame of data in the first data frame group, the square average of the retransmission information corresponding to at least one frame of data in the first data frame group, and the median value among the retransmission information corresponding to at least one frame of data in the first data frame group.

[0065] In some embodiments, the method for determining the retransmission information statistics of the second data frame group may be the same as or different from the method for determining the retransmission information statistics of the first data frame group.

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

[0067] Step S402: Based on the changing trend, determine the current threshold value; the current threshold value is negatively correlated with the changing trend.

[0068] In this embodiment, a mapping table between change trends and threshold values ​​can be obtained. This mapping table includes the 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.

[0069] In some embodiments, such as Figure 4 As shown, step S402 can be achieved through steps S4021 and S4022:

[0070] Step S4021: If the retransmission information statistics of the first data frame group, which indicates the trend of change, 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.

[0071] Step S4022: If the retransmission information statistics of the first data frame group, which indicates the trend of change, 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.

[0072] In this embodiment, when the trend is positive, it indicates that the retransmission statistics of the first data frame group are greater than those of the second data frame group. Therefore, it is necessary to reduce the historical threshold corresponding to the first data frame group adjacent to the current data frame. This is because when the retransmission statistics of the first data frame group adjacent to the current data frame increase, it indicates that data collisions may become more severe, meaning the data collision situation is poor. In this case, a more accurate collision detection strategy (i.e., the first strategy) is needed. After reducing the historical threshold corresponding to the first data frame group, the first strategy can be used with a higher probability when sending the current data frame, thus achieving more accurate collision detection.

[0073] Similarly, when the trend is negative, it indicates that the retransmission statistics of the first data frame group are less than those of the second data frame group. Therefore, the historical threshold corresponding to the first data frame group adjacent to the current data frame needs to be increased. This is because when the retransmission statistics of the first data frame group adjacent to the current data frame decrease, it suggests that data collisions may be less frequent, meaning the data collision situation is relatively good. In this case, a more accurate collision detection strategy (i.e., the second strategy) can be used. 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, thus employing the second strategy with fewer handshakes when the data collision situation in previous data frames is relatively good.

[0074] In this embodiment, the changing trend between the retransmission information statistics of the first data frame group (the previous data frame of the current data frame) and the retransmission information statistics of the second data frame group (the preceding data frame of the first data frame group) is determined. Then, if the changing trend indicates that the retransmission information statistics of the first data frame group are greater than those of the second data frame group, the historical threshold corresponding to the first data frame group is decreased to obtain the current threshold. If the changing trend indicates that the retransmission information statistics of the first data frame group are less than those of the second data frame group, the historical threshold corresponding to the first data frame group is increased to obtain the current threshold. Thus, based on the relationship between the retransmission information statistics of the first and second data frame groups, the historical threshold corresponding to the first data frame group of the previous data frame of the current data frame can be dynamically adjusted, thereby dynamically determining the current threshold. This allows for the application of a collision detection strategy corresponding to the current data frame for collision detection.

[0075] 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 has no previous data frames, so it is impossible to dynamically determine the current threshold value corresponding to the first frame of data. In some embodiments, both the current threshold value and the historical threshold value are less than the preset threshold value. That is, no matter what kind of increase processing method is applied to the historical threshold value, it cannot exceed the preset threshold value.

[0076] In some embodiments, such as Figure 5 As shown, step S402 can be achieved through steps S501 and S502:

[0077] Step S501: When the trend of change indicates that the retransmission information of the later data frame increases in the at least two sets of data frames, the product of the threshold before adjustment and a first preset multiple less than 1 is determined as the current threshold.

[0078] Step S502: When the trend of change indicates that the retransmission information of the later data frame is smaller in the at least two sets of data frames, the product of the threshold before adjustment and a second preset multiple greater than 1 is determined as the current threshold.

[0079] Here, the threshold before adjustment is the threshold corresponding to the later data frame in at least two sets of data frames.

[0080] In this embodiment, when the trend indicates that the retransmission information of the later data frame in at least two sets of data frames increases, it means that compared to the earlier data frame in at least two sets of data frames, the later data frame was retransmitted multiple times before being successfully transmitted. This indicates that data collisions in the current channel are relatively frequent. Therefore, a first strategy requiring more handshakes is needed. Thus, the threshold threshold can be determined by the product of the original threshold and a first preset multiple less than 1. For example, this first preset multiple can be 1 / 2. Because the first preset multiple is less than 1, it effectively reduces the original threshold threshold. Since the current threshold threshold is smaller than the original threshold threshold, the electronic device is more inclined to use the first strategy, thereby enabling accurate collision detection.

[0081] Similarly, if the trend indicates that the retransmission information of the later data frame in at least two sets of data frames is smaller, it means that fewer retransmissions were needed to successfully transmit the later data frame compared to the earlier data frame in the at least two sets of data frames. This means that data collisions in the current channel are not frequent, and the second strategy with fewer handshakes can be used. Therefore, the threshold can be determined by the product of the original threshold and a second preset multiple greater than 1. For example, this second preset multiple can be 2. Because the second preset multiple is greater than 1, it is equivalent to decreasing the original threshold. Since the current threshold is larger than the original threshold, the electronic device is more inclined to use the second strategy.

[0082] In this embodiment, the retransmission information of a later data frame in at least two sets of data frames can be used to determine whether the retransmission information of that later data frame has increased relative to the retransmission information of an earlier data frame in at least two sets of data frames, based on the changing trends of the retransmission information. If the retransmission information of the later data frame has increased, the product of the original threshold and a first preset multiple less than 1 can be used as the current threshold to reduce the original threshold. If the retransmission information of the later data frame has decreased, the product of the original threshold and a second preset multiple greater than 1 can be used as the current threshold to increase the original threshold. In this way, the current threshold can be adjusted in real time based on the changes in the retransmission information of the later data frames in at least two sets of data frames, thereby dynamically determining the collision detection strategy corresponding to the current data frame.

[0083] In some embodiments, such as Figure 6 As shown, step S302 can be achieved through steps S601 and S602:

[0084] Step S601: If the size of the current data frame is less than the current threshold, determine that the second strategy should be adopted when sending the current data frame.

[0085] Step S602: If the size of the current data frame is greater than the current threshold, determine that the first strategy should be used when sending the current data frame.

[0086] In this embodiment, after dynamically determining the current threshold based on the retransmission information of the previous data frames of the current data frame, the size relationship between the current data frame size and the current threshold can be determined. If the current data frame size is less than the current threshold, it means that the current data frame size is small. Even if a data collision occurs when sending the current data frame, a second transmission can be performed. Therefore, a second strategy with fewer handshakes can be adopted.

[0087] If the size of the current data frame exceeds the current threshold, it indicates that the current data frame is too large. If a data collision occurs and the current data frame is retransmitted, the cost will be high, resulting in efficiency loss. Therefore, a first strategy with higher collision detection accuracy is required.

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

[0089] Figure 7 This is a schematic diagram illustrating the implementation flow of a data transmission method provided in an embodiment of this application, as shown below. Figure 7 As shown, the method includes the following steps S701 to S710:

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

[0091] Step S702: Determine the relationship between the number of retransmissions of the current frame data and the preset number and 0.

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

[0093] Here, the preset number represents the maximum number of retransmissions. If the current frame fails to be transmitted because the number of retransmissions exceeds the maximum number, the number of retransmissions for the current frame can be set to the preset number. A retransmission count of 0 indicates that the current data frame was successfully transmitted once and no retransmissions were performed.

[0094] Step S703: 1 / 2 of the threshold value corresponding to the current frame data is determined as the threshold value of the next frame.

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

[0096] If the threshold value in the next frame is less than 1, proceed to step S705; if the threshold value in the next frame is not less than 1, proceed to step S710.

[0097] Step S705: Set the threshold value for the next frame to 1.

[0098] Step S706: Determine twice the threshold value corresponding to the current frame data as the threshold value for the next frame.

[0099] Step S707: Determine whether the threshold value of the next frame is greater than the preset threshold value.

[0100] If the threshold value in the next frame is greater than the preset threshold value, proceed to step S708; if the threshold value in the next frame is not greater than the preset threshold value, proceed to step S710.

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

[0102] Step S709: Determine the relationship between the number of retransmissions of the current frame data and the number of retransmissions of the previous data frame.

[0103] In this embodiment of the application, if 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; if 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; and if 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.

[0104] Step S710, End.

[0105] In this embodiment, the threshold value corresponding to the data frame can be gradually reduced as the number of retransmissions of the data frame increases. The more retransmissions, the more frequent the collisions. Reducing the threshold value will make the terminal more inclined to use the RTS / CTS handshake mechanism, thereby shortening the collision detection cycle and improving the data transmission efficiency in user-intensive scenarios.

[0106] Figure 8 This is a schematic diagram of the composition structure of a data transmission device provided in an embodiment of this application, as shown below. Figure 8 As shown, the data transmission device 800 includes: an acquisition unit 810, a strategy determination unit 820, and a transmission unit 830, wherein:

[0107] Acquisition unit 810 is used to acquire the current data frame;

[0108] The strategy determination unit 820 is used to determine a data transmission strategy based on the size of the current data frame and a current threshold; the current threshold is determined based on the retransmission information of the previous data frames of the current data frame; the data transmission strategy is used to characterize the collision detection strategy adopted when transmitting the current data frame; the collision detection strategy includes a first strategy and a second strategy, wherein the number of handshakes between the receiver and the sender corresponding to the first strategy is greater than the number of handshakes between the receiver and the sender corresponding to the second strategy;

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

[0110] In some embodiments, the previous data frame includes at least two sets of data frames; the data transmission device further includes a threshold determination unit; the threshold determination unit is configured to determine the changing trend of retransmission information corresponding to the at least two sets of data frames respectively; and determine the current threshold based on the changing trend; the current threshold is negatively correlated with the changing trend.

[0111] In some embodiments, the at least two sets of data frames include a first data frame group and a second data frame group; the second data frame group is a preceding 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 further configured to determine the changing 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 changing trend indicates that the retransmission information statistics of the first data frame group is greater than the retransmission information statistics of the second data frame group, the historical threshold corresponding to the first data frame group is decreased to obtain the current threshold; when the changing trend indicates that the retransmission information statistics of the first data frame group is 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.

[0112] 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.

[0113] In some embodiments, the threshold determination unit is further configured to: determine the product of the pre-adjustment threshold and a first preset multiple less than 1 as the current threshold when the trend indicates that the retransmission information in the later data frame increases in the at least two sets of data frames; and determine the product of the pre-adjustment threshold and a second preset multiple greater than 1 as the current threshold when the trend indicates that the retransmission information in the later data frame decreases in the at least two sets of data frames.

[0114] In some embodiments, the strategy determination unit 820 is further configured to determine, when sending the current data frame, to adopt the second strategy if the size of the current data frame is less than the current threshold; and to determine, when sending the current data frame, to adopt the first strategy if the size of the current data frame is greater than the current threshold.

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

[0116] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided in this disclosure can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the apparatus embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0117] It should be noted that, in the embodiments of this application, if the above-described data processing method is implemented as a software functional 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 embodiments of this application, or the part that contributes to the related technology, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.

[0118] This application provides a computer device including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements some or all of the steps in the above-described method.

[0119] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the above-described method. The computer-readable storage medium can be transient or non-transient.

[0120] This application provides a computer program including computer-readable code. When the computer-readable code is run in a computer device, the processor in the computer device performs some or all of the steps in the above-described method.

[0121] This 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, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0122] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects. 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 descriptions of the method embodiments of this application for understanding.

[0123] Figure 9 This is a schematic diagram of a hardware entity of the data transmission device in an embodiment of this application, such as... Figure 9 As shown, the hardware entity of the data transmission device 900 includes: a processor 901, a communication interface 902, and a memory 903, wherein:

[0124] The processor 901 typically controls the overall operation of the computer device 900, which may include implementing the data transmission method provided in the embodiments of this application, for example, such as... Figures 3 to 7 The method shown.

[0125] Communication interface 902 enables computer devices to communicate with other terminals or servers over a network.

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

[0127] This application provides a computer storage medium storing one or more programs that can be executed by one or more processors to implement the steps of the touch position determination method as described in any of the above embodiments.

[0128] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0129] The aforementioned processor can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.

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

[0131] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; 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 this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0132] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0133] 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 illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0134] The units described above as separate components may or may not be physically separate. The components shown 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 to achieve the purpose of this embodiment according to actual needs.

[0135] In addition, each functional unit in the various embodiments of this 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 integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0136] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0137] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, magnetic disks, or optical disks.

[0138] The above are merely embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A data transmission method, the method comprising: Get the current data frame; A data transmission strategy is determined based on the size of the current data frame and the current threshold. The current threshold is determined based on retransmission information of previous data frames of the current data frame. The previous data frames include at least two groups of data frames. 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 preceding data frame of the first data frame group. The current data frame is the next data frame of the first data frame group. The data transmission strategy characterizes the collision detection strategy used when transmitting the current data frame. The collision detection strategy includes a first strategy and a second strategy, where the number of handshakes between the receiver and transmitter corresponding to the first strategy is greater than the number of handshakes between the receiver and transmitter corresponding to the second strategy. Based on the data transmission strategy, the current data frame is transmitted; The method further includes: Determine the trend of change between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group; Based on the changing trend, the current threshold value is determined; the current threshold value is negatively correlated with the changing trend; wherein... Determining the current threshold based on the changing trend includes: If the retransmission information statistics of the first data frame group, which indicates the trend of change, 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 retransmission information statistics of the first data frame group, which indicates the trend of change, 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.

2. The method according to claim 1, wherein 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; The packet loss rate of the previous data frames.

3. The method according to claim 1, wherein determining the current threshold based on the changing trend further includes: When the trend of change indicates that the retransmission information of the later data frame increases in the at least two sets of data frames, the product of the threshold before adjustment and a first preset multiple less than 1 is determined as the current threshold. When the trend of change indicates that the retransmission information of the later data frame is smaller in the at least two sets of data frames, the product of the threshold before adjustment and a second preset multiple greater than 1 is determined as the current threshold.

4. The method according to any one of claims 1 to 3, wherein determining the data transmission strategy based on the size of the current data frame and the current threshold includes: If the size of the current data frame is less than the current threshold, it is determined that the second strategy should be adopted when sending the current data frame; If the size of the current data frame is greater than the current threshold, the first strategy is determined to be used when sending the current data frame.

5. The method according to claim 1, wherein both the current threshold and the historical threshold are less than or equal to a preset threshold; the preset threshold is used to determine the data transmission strategy when sending the first frame of data.

6. A data transmission apparatus, the apparatus comprising: The acquisition unit is used to acquire the current data frame; The strategy determination unit is used to determine a data transmission strategy based on the size of the current data frame and the current threshold. The current threshold is determined based on the retransmission information of the previous data frames of the current data frame; the previous data frames include at least two groups of data frames; 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 preceding data frame of the first data frame group; the current data frame is the next data frame of the first data frame group. The data transmission strategy is used to characterize the collision detection strategy adopted when transmitting the current data frame; the collision detection strategy includes a first strategy and a second strategy, wherein the number of handshakes between the receiver and the transmitter corresponding to the first strategy is greater than the number of handshakes between the receiver and the transmitter corresponding to the second strategy. A sending unit is configured to send the current data frame based on the data sending strategy; A threshold determination unit is used to determine the changing trend between the retransmission information statistics of the first data frame group and the retransmission information statistics of the second data frame group. If the retransmission information statistics of the first data frame group, which indicates the trend of change, 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 retransmission information statistics of the first data frame group, which indicates the trend of change, 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.

7. A data transmission device, the data transmission device comprising a processor and a memory storing processor-executable instructions; wherein, when the instructions are executed by the processor, the method as described in any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • 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