Data transmission method, system and electronic device for routing device
Patent Information
- Application Number
- CN202610830187.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-06-10
AI Technical Summary
[0003]由于终端设备与路由设备之间的报文交互是异步处理的,因此在终端设备(如手机)处于节能状态时,终端设备无法及时回复路由设备发送的报文,导致路由设备处于循环发送报文的状态,造成路由设备的误报率增加
[0016]本发明的其他特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点在说明书以及附图中所特别指出的结构来实现和获得。
Smart Images

Figure CN122372522B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission control for routing devices, and in particular to a data transmission method, system, and electronic device for routing devices. Background Technology
[0002] The packet sending rate of a routing device is mainly set based on historical statistics. If the packet sending success rate is low in the past, the routing device will improve the packet sending success rate by reducing the sending rate; if the packet sending success rate is high in the period after the speed reduction, the routing device will increase the sending rate to improve throughput.
[0003] Because message exchange between terminal devices and routing devices is processed asynchronously, when a terminal device (such as a mobile phone) is in power-saving mode, it cannot promptly reply to messages sent by the routing device. This causes the routing device to continuously send messages, increasing its false alarm rate. Due to the increased false alarm rate, the routing device will reduce its transmission speed to improve the success rate of message delivery. Consequently, when the terminal device exits power-saving mode, it will send messages at a lower rate, causing data transmission rate fluctuations during data transmission. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a data transmission method, system and electronic device for a routing device. After the terminal device enters the energy-saving state, the method uses the time difference between the energy-saving message sent by the terminal device and the data frame sent by the routing device as a time buffer for asynchronous processing. Finally, the data transmission of the routing device is realized under the action of the time buffer, thereby solving the problem of transmission rate fluctuation caused by the false alarm rate of the message in the time buffer during asynchronous processing.
[0005] In a first aspect, embodiments of the present invention provide a data transmission method for a routing device, the method comprising: Receive the energy-saving entry message sent by the terminal device and record the first timestamp when the energy-saving entry message is transmitted to the routing device; The first data frame is sent to the terminal device in a loop at the first rate, and the second timestamp when the first data frame is sent is recorded in the routing device. If the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then after receiving the exit energy-saving message sent by the terminal device, a second data frame is sent to the terminal device at the first rate.
[0006] Optionally, the method further includes: If the time difference between the first timestamp and the second timestamp is not greater than the time threshold, then after receiving the exit energy-saving message sent by the terminal device, a second data frame is sent to the terminal device at the second rate; wherein the second rate is lower than the first rate.
[0007] Optionally, the steps of receiving the energy-saving entry message sent by the terminal device and recording the first timestamp when the energy-saving entry message is transmitted to the routing device include: Once the routing device detects that a long connection has been established between the routing device and the terminal device, the long connection is used to obtain the data request packets sent by the terminal device. Obtain the first data frame corresponding to the data request message, and send the first data frame to the terminal device at a first rate; When the first data frame is detected to be sent to the terminal device, the power-saving message sent by the terminal device is obtained using the long connection; The current timestamp when the energy-saving message is received is recorded as the first timestamp in the routing device.
[0008] Optionally, the step of cyclically sending the first data frame to the terminal device at a first rate and recording the second timestamp of the completion of sending the first data frame in the routing device includes: The energy-saving cycle of the terminal device is obtained based on the energy-saving message received. Obtain the timeout threshold of the terminal device under the energy-saving cycle, and use the timeout threshold to determine the number of retransmissions of the first data frame; The first data frame is cyclically sent to the terminal device using a long connection and at a first rate; When the number of retransmissions reaches the limit, the current timestamp when the first data frame is completed is recorded as the second timestamp in the routing device.
[0009] Optionally, if the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then the step of sending a second data frame to the terminal device at the first rate after receiving the exit energy-saving message from the terminal device includes: If the time difference between the first timestamp and the second timestamp is greater than the preset first time threshold, the number of transmission failures of the first data frame is obtained based on the number of loop transmissions, and the historical statistics of the first data frame are updated using the number of transmission failures, so that the number of transmission failures in the historical statistics is updated to zero; wherein, the first time threshold is determined by the transmission duration, transmission duration and processing duration when the energy-saving message is sent from the terminal device to the routing device; After obtaining the exit energy-saving message sent by the terminal device using a long connection, the second data frame corresponding to the exit energy-saving message of the routing device during the non-energy-saving period of the terminal device is obtained based on historical statistical data. The second data frame is sent to the terminal device at the first rate using a long connection.
[0010] Optionally, the steps of receiving the energy-saving entry message sent by the terminal device and recording the first timestamp when the energy-saving entry message is transmitted to the routing device include: Once a long connection is detected between the routing device and the terminal device, the long connection is used to obtain the data request packets sent by the terminal device during the service period. Obtain the first data frame corresponding to the data request message, and send the first data frame to the terminal device at a first rate; When the first data frame is detected to be sent to the terminal device, the long connection is used to obtain the power-saving message sent by the terminal device during the sleep cycle. The current timestamp when the energy-saving message is received is recorded as the first timestamp in the routing device.
[0011] Optionally, the step of cyclically sending the first data frame to the terminal device at a first rate and recording the second timestamp of the completion of sending the first data frame in the routing device includes: Obtain the timeout threshold of the terminal device during the sleep cycle, and use the timeout threshold to determine the number of retransmissions of the first data frame; The first data frame is cyclically sent to the terminal device using a long connection and at a first rate; When the number of retransmissions reaches the limit, the current timestamp when the first data frame is completed is recorded as the second timestamp in the routing device.
[0012] Optionally, if the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then the step of sending a second data frame to the terminal device at the first rate after receiving the exit energy-saving message from the terminal device includes: If the time difference between the first timestamp and the second timestamp is greater than the preset second time threshold, the number of transmission failures of the first data frame is obtained based on the number of loop transmissions, and the historical statistics of the first data frame are updated using the number of transmission failures, so that the number of transmission failures in the historical statistics is updated to zero; wherein, the second time threshold is determined by the timing synchronization error value between the routing device and the terminal device and the message backoff time fluctuation value of the routing device; After obtaining the exit energy-saving message sent by the terminal device using a long connection, the second data frame corresponding to the exit energy-saving message of the routing device in the next service cycle is obtained based on historical statistical data. The second data frame is sent to the terminal device at the first rate using a long connection.
[0013] In a second aspect, the present invention provides a data transmission system for a routing device, the system comprising: First timestamp acquisition module: used to receive the energy-saving entry message sent by the terminal device and record the first timestamp when the energy-saving entry message is transmitted to the routing device; Second timestamp acquisition module: used to cyclically send the first data frame to the terminal device at the first rate, and record the second timestamp of the first data frame in the routing device when it is completed; Data frame transmission control module: If the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, after receiving the exit energy-saving message sent by the terminal device, the module sends a second data frame to the terminal device at a first rate.
[0014] Thirdly, embodiments of the present invention also provide an electronic device, which includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the steps of the data transmission method for routing devices provided in the first aspect.
[0015] This invention provides a data transmission method, system, and electronic device for a routing device. During the process of controlling the routing device to transmit data frames to terminal devices before and after entering energy-saving mode, the method first receives an entry energy-saving message from the terminal device and records a first timestamp when the entry energy-saving message is transmitted to the routing device. Then, it cyclically sends a first data frame to the terminal device at a first rate and records a second timestamp when the first data frame is completed in the routing device. If the time difference between the first and second timestamps is greater than a preset time threshold, after receiving an exit energy-saving message from the terminal device, it still sends a second data frame to the terminal device at the first rate. This method utilizes the time difference between the energy-saving message sent by the terminal device and the data frame sent by the routing device as a time buffer for asynchronous processing after the terminal device enters energy-saving mode. Ultimately, data transmission by the routing device is achieved under the action of this time buffer, thereby solving the problem of transmission rate fluctuations caused by the false alarm rate of messages in the time buffer during asynchronous processing.
[0016] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 A flowchart of a data transmission method for a routing device provided in an embodiment of the present invention; Figure 2 A flowchart of another data transmission method for a routing device provided in an embodiment of the present invention; Figure 3 A signaling diagram for a data transmission method for a routing device provided in an embodiment of the present invention; Figure 4 Signaling diagram for another data transmission method for a routing device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a data transmission system for a routing device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0020] icon: 100 - First timestamp acquisition module; 200 - Second timestamp acquisition module; 300 - Data frame transmission control module; 101 - Processor; 102 - Memory; 103 - Bus; 104 - Communication interface. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] To facilitate understanding of this embodiment, a data transmission method for a routing device disclosed in this embodiment of the invention will first be described, as follows: Figure 1 As shown, it includes: Step S101: Receive the energy-saving entry message sent by the terminal device and record the first timestamp when the energy-saving entry message is transmitted to the routing device.
[0023] During normal network communication between a routing device (such as a Wi-Fi router) and a terminal device (such as a mobile phone), the power saving judgment module receives a message from the terminal device indicating that the device has entered the power saving state. It accurately records the time point when the power saving message is transmitted to the power saving judgment module inside the routing device and defines it as the first timestamp (timestamp1). This marks the starting associated time node when the terminal enters the power saving state.
[0024] Step S102: Send the first data frame to the terminal device cyclically at the first rate, and record the second timestamp of the first data frame being sent in the routing device.
[0025] The routing device determines the first rate V1 as the transmission rate through the relevant rate control module, and then sends the first data frame to the terminal device in power-saving mode through the MAC transceiver control module of the routing device. Since the terminal device has entered power-saving mode at this time, it cannot receive and respond to this data frame, causing the routing device to continuously retransmit the data frame in a loop until the data frame transmission process ends or the maximum number of retransmissions / timeout conditions are reached. At the same time, the routing device records the time point when the first data frame is finally sent and defines it as the second timestamp (timestamp2) to mark the end time node of this data transmission.
[0026] Step S103: If the time difference between the first timestamp and the second timestamp is greater than the preset time threshold, then after receiving the exit energy-saving message sent by the terminal device, send the second data frame to the terminal device at the first rate.
[0027] The routing device calculates the time difference between the first timestamp (timestamp1) and the second timestamp (timestamp2), and compares this difference with a preset first time threshold (THRESHOLD1) (reference value is 3 milliseconds; the threshold needs to comprehensively consider the air interface transmission time of energy-saving messages, the transmission time of messages from the MAC transceiver control module to the energy-saving judgment module, and the processing time of messages by the energy-saving judgment module). If the time difference is greater than the preset threshold, it is determined that the failure to send this data frame is an abnormal situation caused by terminal power saving. The statistical information of this failure will not be included in the historical statistical data of the rate control algorithm and will not affect the rate decision. After the subsequent routing device receives the exit energy-saving message sent by the terminal device, the rate control module is not affected by the previous abnormal failure statistics, and still maintains the initial first rate V1 to send the second data frame to the terminal device, avoiding the speed reduction problem caused by misstatistics and eliminating rate fluctuations during data transmission.
[0028] Specifically, this method distinguishes between false failures caused by energy-saving status and true failures caused by link quality issues by using the difference between the timestamp of the energy-saving message and the timestamp of the data frame transmission. This enables precise decision-making for routing rate control and avoids erroneous rate reduction and fluctuations in energy-saving scenarios. For example, Figure 2 Another data transmission method for a routing device, as shown, includes the following steps: Step S201: Receive the energy-saving entry message sent by the terminal device and record the first timestamp when the energy-saving entry message is transmitted to the routing device.
[0029] The routing device receives the energy-saving message sent by the terminal device and records the first timestamp when the message is transmitted to the routing device.
[0030] Step S202: Send the first data frame to the terminal device cyclically at the first rate, and record the second timestamp of the first data frame being sent in the routing device.
[0031] The routing device cyclically sends the first data frame to the terminal device at a preset first rate, and records the second timestamp when the first data frame (including the retransmission process) is completed.
[0032] Step S203: Determine whether the time difference between the first timestamp and the second timestamp is greater than a preset time threshold.
[0033] The routing device calculates the time difference between the first timestamp and the second timestamp, and determines whether the time difference is greater than a preset time threshold; if yes, then step S204 is executed; if no, then step S205 is executed.
[0034] Step S204: After receiving the exit energy-saving message sent by the terminal device, send a second data frame to the terminal device at the first rate.
[0035] Upon receiving the power-saving exit message from the terminal device, the routing device maintains the first rate V1 and sends a second data frame to the terminal device. The routing device determines that the failure to send the first data frame is an abnormal situation caused by the terminal's power saving, and therefore does not include this failure in the historical statistics of the rate control algorithm, and does not trigger the speed reduction logic; when it subsequently receives the power-saving exit notification message from the terminal device, the routing device maintains the original first rate V1 and sends a second data frame to the terminal device (i.e., the first data frame after the terminal exits power saving).
[0036] Step S205: After receiving the power-saving exit message sent by the terminal device, send a second data frame to the terminal device at a second rate; wherein the second rate is lower than the first rate.
[0037] The routing device determines that the current transmission failure of the first data frame is a normal situation caused by poor link quality, therefore, it counts the current failure into the historical statistical data of the rate control algorithm, and triggers the conventional rate reduction logic; when subsequently receiving the exit energy-saving mode notification message sent by the terminal device, the routing device uses the second rate V2 (V2<V1, that is, a lower transmission rate than the original first rate, corresponding to a more conservative modulation and coding scheme) to send a second data frame to the terminal device.
[0038] When the routing device is in the traditional energy-saving mode, the signaling diagram of the data transmission method for the routing device is shown in Figure 3, Figure 3 the routing device in is configured with an energy-saving judgment module, a rate control module and a MAC transceiving control module, and the interaction process with the terminal device is as follows: Initial link and data transmission: after the terminal device and the routing device complete connection, the rate control module of the route issues the current data transmission rate V1 to the MAC transceiving control module, and the MAC transceiving control module sends data frames to the terminal at the rate V1.
[0039] Terminal energy-saving notification and timestamp recording: after the terminal enters the energy-saving state, it sends an energy-saving entry message to the route; the MAC transceiving control module of the routing device receives the message and forwards it to the energy-saving judgment module, and the energy-saving judgment module records the message receiving time and generates a first timestamp timestamp1.
[0040] Data frame retransmission and end timestamp recording: the terminal cannot reply ACK (Acknowledgment) confirmation frames when in the energy-saving state, the MAC transceiving control module of the routing device circularly retransmits data frames at the rate V1 according to the protocol until the retransmission process ends; then the MAC transceiving control module reports the current transmission statistics of V1 to the rate control module, and the energy-saving judgment module synchronously records the end time of the transmission process and generates a second timestamp timestamp2.
[0041] Failure cause judgment and statistical isolation: the rate control module calculates the time difference ΔT=timestamp2 -timestamp1, and compares it with the preset threshold THRESHOLD1; if ΔT>THRESHOLD1, it is determined that the current transmission failure is an abnormal situation caused by terminal energy saving, the current transmission statistics of V1 are not counted into the historical statistical data of rate control, and the rate reduction logic is not triggered.
[0042] Terminal exit energy saving and rate maintenance: after the terminal exits the energy saving state, it sends an energy saving exit message to the route; the energy saving judgment module of the route confirms that the terminal resumes the normal communication state, the rate control module maintains the original rate V1, and the MAC transceiving control module sends subsequent data frames to the terminal at V1, which avoids incorrect rate reduction and rate fluctuation in energy saving scenarios.
[0043] Optionally, step S101, which receives the energy-saving message sent by the terminal device and records the first timestamp when the energy-saving message is transmitted to the routing device, includes the following steps: Step S301: After detecting that the routing device and the terminal device have completed a long connection, use the long connection to obtain the data request message sent by the terminal device.
[0044] The routing device first checks whether a long-lived connection has been successfully established with the terminal device. After confirming that the long-lived connection is in a stable state, it receives and acquires data request messages sent by the terminal device through this long-lived connection, thereby triggering the subsequent data frame transmission process. The existence of the long-lived connection ensures reliable and orderly message exchange between the terminal and the routing device, providing a stable communication foundation for the subsequent capture of energy-saving messages.
[0045] Step S302: Obtain the first data frame corresponding to the data request message, and send the first data frame to the terminal device at the first rate.
[0046] The routing device parses the data request message from the terminal device and generates or obtains the first data frame corresponding to the request. Subsequently, the MAC transceiver control module of the routing device sends the first data frame to the terminal device through the wireless air interface according to the first rate pre-configured by the rate control module (i.e., the initial optimal transmission rate under the current link, corresponding to a specific modulation and coding scheme), thus completing the initial response to the terminal's data request.
[0047] Step S303: When the first data frame is detected to be sent to the terminal device, the power-saving message sent by the terminal device is obtained using the long connection.
[0048] After detecting that the first data frame has been successfully sent to the terminal device, the MAC transceiver control module of the routing device continues to receive the power-saving message sent by the terminal device in response to data transmission through the long connection channel. The timing of this step (after the data frame is sent) is adapted to the typical behavior logic of the terminal device entering power-saving mode after receiving data, ensuring that the routing device can promptly capture the power-saving notification from the terminal.
[0049] Step S304: Record the current timestamp when the energy-saving message is received as the first timestamp in the routing device.
[0050] After completing the reception verification and parsing of incoming energy-saving messages, the energy-saving judgment module of the routing device marks the current system timestamp at the moment the message reception is completed as the first timestamp and stores it in the local storage or register of the routing device. This timestamp will serve as the benchmark for the starting node of the subsequent terminal energy-saving status, providing an accurate basis for the calculation of the time difference in step S103.
[0051] Optionally, step S102, which involves cyclically sending the first data frame to the terminal device at a first rate and recording the second timestamp of the completion of sending the first data frame in the routing device, includes the following steps: Step S305: Obtain the energy-saving cycle of the terminal device based on the incoming energy-saving message.
[0052] After receiving the power-saving message from the terminal device, the routing device parses the power-saving mode parameters carried in the message and extracts the power-saving cycle of the terminal device (such as the "Listen Interval" in the 802.11 protocol, which is the time interval at which the terminal periodically wakes up the radio frequency in power-saving mode). This power-saving cycle reflects the sleep-wake pattern of the terminal device and provides a basis for configuring a reasonable retransmission strategy.
[0053] Step S306: Obtain the timeout threshold of the terminal device under the energy-saving cycle, and use the timeout threshold to determine the number of retransmissions of the first data frame.
[0054] The routing device combines the energy-saving cycle of the terminal device and configures the corresponding timeout threshold (i.e., the longest time of no response that the routing device can accept under the terminal's energy-saving state, usually set to no more than 1 to 2 energy-saving cycles to avoid continuous invalid retransmissions during the terminal's sleep period); then, based on the timeout threshold and the theoretical transmission time of a single data frame (including air interface transmission and ACK waiting time), it calculates and determines the maximum number of retransmissions for the first data frame to ensure that the total duration of the retransmission process does not exceed the timeout threshold, taking into account both the effectiveness of the transmission attempt and the utilization rate of air interface resources.
[0055] Step S307: Use a long connection and send the first data frame to the terminal device cyclically at a first rate.
[0056] The routing device, through a stable long-term connection channel established with the terminal device, cyclically sends the first data frame to the terminal device at the first rate configured by the rate control module (the initial optimal transmission rate of the current link, corresponding to a specific modulation and coding scheme). Since the terminal device is in a power-saving sleep state, it cannot receive data frames and reply with ACK confirmation frames. The routing device continues to attempt to send data frames up to the configured maximum number of retransmissions.
[0057] Step S308: When the number of cyclic transmissions reaches the number of retransmissions, the current timestamp when the first data frame is completed is recorded as the second timestamp in the routing device.
[0058] When the MAC transceiver control module of the routing device completes all configured retransmission attempts (i.e., the number of loop transmissions reaches the preset retransmission limit), it immediately captures the system timestamp at the end of the current data frame transmission process (including all retransmissions), defines it as the second timestamp, and stores it in the local storage of the routing device. This timestamp, together with the first timestamp recorded in step S101, is used to calculate the time difference value under the terminal energy-saving scenario, providing a key basis for distinguishing between false failures caused by energy saving and true failures caused by link quality.
[0059] Optionally, if the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then step S103, which involves sending a second data frame to the terminal device at the first rate after receiving the exit energy-saving message from the terminal device, includes the following steps: Step S309: If the time difference between the first timestamp and the second timestamp is greater than the preset first time threshold, the number of transmission failures of the first data frame is obtained based on the number of loop transmissions, and the historical statistics of the first data frame are updated using the number of transmission failures, so that the number of transmission failures in the historical statistics is updated to zero; wherein, the first time threshold is determined by the transmission duration, transmission duration and processing duration when the energy-saving message is sent from the terminal device to the routing device.
[0060] If the difference between the first timestamp and the second timestamp is greater than the preset first time threshold THRESHOLD1, the routing device counts the number of transmission failures in this transmission based on the number of times the first data frame is sent in cycles, and clears the number of failures in the historical statistics of the rate control module to zero, so that transmission failures caused by terminal energy saving are not included in the rate algorithm decision; the first time threshold THRESHOLD1 is configured with reference to relevant materials and is determined by the duration of the terminal sending energy-saving messages, the air interface transmission duration and the internal processing time of the routing.
[0061] Step S310: After obtaining the exit energy-saving message sent by the terminal device using the long connection, obtain the second data frame corresponding to the exit energy-saving message of the routing device during the non-energy-saving period of the terminal device based on historical statistical data.
[0062] After receiving the exit energy-saving message sent by the terminal device through a long connection, the routing device generates and obtains the corresponding second data frame to be sent within the non-energy-saving period after the terminal device exits energy saving, based on the historical statistics of the number of failures that have been cleared.
[0063] Step S311: Use the long connection to send the second data frame to the terminal device at the first rate.
[0064] The routing device continues to send the second data frame to the terminal device that has exited the energy-saving state through a long connection at the initial first rate V1, so as to avoid the speed reduction caused by misjudgment of energy saving, eliminate rate jitter, and ensure transmission stability.
[0065] In the traditional energy-saving mode, the success rate of the routing device sending packets is not counted in the rate control module for a period of time before and after the terminal device enters the energy-saving state (because the timestamps of the terminal device and the routing device cannot be completely consistent, the timing of the routing device sending packets may be before the terminal device enters the energy-saving state or just after it enters the energy-saving state); THRESHOLD1 can be dynamically configured, with a reference value of 3 milliseconds.
[0066] When the routing device is in TWT power-saving mode, the flowchart of the data transmission method used by the routing device is shown in Figure 4. Figure 4 Designed for energy-saving scenarios based on the Target Wake Time (TWT) of Wi-Fi terminals, the router device distinguishes between false transmission failures caused by terminal TWT sleep and true failures caused by poor link quality by using the timestamp difference of the TWT period nodes. This avoids erroneous speed reduction and ensures stable data transmission rates after the terminal wakes up. The interaction process with the terminal device is as follows: Initial Connection and TWT Service Cycle Transmission: After the terminal and the routing device complete the Wi-Fi connection, the TWT service cycle (TWT SP) begins. The routing device's rate control module sends an initial transmission rate V1 to the MAC transceiver control module. The MAC transceiver control module then sends data frames to the terminal at rate V1. At this time, the terminal's radio frequency is in a wake-up state and can receive data normally.
[0067] The terminal enters TWT sleep mode and records the energy-saving start timestamp: At the end of the terminal's TWT SP cycle, it enters the TWT Doze energy-saving state according to the TWT plan, shutting down the RF receiving link. The routing device's energy-saving judgment module records the first timestamp (timestamp1) at the TWT SP end node, marking the start time of the terminal entering the energy-saving state.
[0068] Data frame retransmission and transmission end timestamp recording: When the terminal is in sleep mode and cannot reply with an ACK confirmation frame, the MAC transceiver control module of the routing device retransmits the data frame in a loop at rate V1 according to the protocol configuration until the retransmission process ends; then the MAC transceiver control module reports the transmission statistics of this V1 to the rate control module, and the energy saving judgment module records the end time of the retransmission process and generates a second timestamp timestamp2.
[0069] Time difference judgment and abnormal failure statistics isolation: The rate control module calculates the time difference ΔT =timestamp2-timestamp1, and compare with the preset threshold THRESHOLD2; if ΔT> If THRESHOLD2 is selected, the transmission failure is determined to be a false failure caused by the terminal TWT sleep. The transmission statistics of V1 will not be included in the historical statistics of rate control and the rate reduction logic will not be triggered.
[0070] Terminal TWT wake-up, maintaining original transmission rate: When the next TWT SP cycle arrives, the terminal exits sleep mode and wakes up the radio frequency. The routing device's rate control module maintains the original rate V1, and the MAC transceiver control module sends subsequent data frames to the terminal at V1, avoiding erroneous speed reduction and rate fluctuations in TWT energy-saving scenarios.
[0071] Optionally, step S101, which receives the energy-saving message sent by the terminal device and records the first timestamp when the energy-saving message is transmitted to the routing device, includes the following steps: Step S401: After detecting that the routing device and the terminal device have completed a long connection, use the long connection to obtain the data request packets sent by the routing device and the terminal device during the service period.
[0072] After the routing device detects that a stable long connection has been successfully established with the terminal device, it obtains the data request packets sent by the terminal device to the routing device through the long connection channel within the TWT service period (SP) corresponding to the terminal. The TWT service period is the normal wake-up communication period of the terminal, ensuring reliable and orderly packet exchange.
[0073] Step S402: Obtain the first data frame corresponding to the data request message, and send the first data frame to the terminal device at the first rate.
[0074] The routing device parses the data request message and obtains the corresponding first data frame; the rate control module determines the initial optimal first rate V1 (the rate algorithm is based on the initial transmission rate set by historical statistics), and the Wi-Fi MAC transceiver module sends the first data frame to the terminal device at this rate.
[0075] Step S403: When the first data frame is detected to be sent to the terminal device, the power-saving message sent by the terminal device during the sleep cycle is obtained by using the long connection.
[0076] After the MAC transceiver module of the routing device detects that the first data frame has been sent, it receives the power-saving message sent by the terminal device through a long connection during the TWT sleep period (Doze state) of the terminal device. This message is a notification from the terminal to the routing device that it is about to enter the power-saving sleep state, which corresponds to the power-saving phase after the TWT service period ends.
[0077] Step S404: Record the current timestamp when the energy-saving message is received as the first timestamp in the routing device.
[0078] The power saving judgment module of the routing device captures the current system timestamp when the power saving message is received and verified, marks it as the first timestamp and stores it; this timestamp serves as the reference node for the terminal to enter the power saving state, providing an accurate basis for subsequent time difference calculation.
[0079] Optionally, step S102, which involves cyclically sending the first data frame to the terminal device at a first rate and recording the second timestamp of the completion of sending the first data frame in the routing device, includes the following steps: Step S405: Obtain the timeout threshold of the terminal device during the sleep cycle, and use the timeout threshold to determine the number of retransmissions of the first data frame.
[0080] The routing device obtains the timeout threshold corresponding to the terminal device's TWT sleep cycle (Doze state). This threshold is set by taking into account the terminal's sleep response delay and air interface transmission time. Based on the timeout threshold and the theoretical transmission time of a single data frame, the maximum number of retransmissions for the first data frame is calculated to avoid invalid retransmissions during the terminal's sleep period.
[0081] Step S406: Use a long connection and send the first data frame to the terminal device cyclically at a first rate.
[0082] The routing device uses the stable long-term connection established with the terminal device to send the first data frame to the terminal device in a dormant state in a loop according to the first rate V1 set by the rate control module; since the terminal is in a dormant state and cannot reply with an ACK confirmation frame, the routing device continues to perform retransmission operations.
[0083] Step S407: When the number of cyclic transmissions reaches the number of retransmissions, the current timestamp when the first data frame is completed is recorded as the second timestamp in the routing device.
[0084] When the number of cyclic transmissions reaches the preset maximum number of retransmissions, the routing device records the current timestamp of the end of the current data frame (including all retransmissions) transmission process and stores it as the second timestamp. This timestamp is then used to calculate the difference with the first timestamp to distinguish between false failures caused by sleep and true link failures.
[0085] Optionally, if the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then step S103, which involves sending a second data frame to the terminal device at the first rate after receiving the exit energy-saving message from the terminal device, includes the following steps: Step S408: If the time difference between the first timestamp and the second timestamp is greater than the preset second time threshold, the number of transmission failures of the first data frame is obtained based on the number of loop transmissions, and the historical statistics of the first data frame are updated using the number of transmission failures, so that the number of transmission failures in the historical statistics is updated to zero; wherein, the second time threshold is determined by the timing synchronization error value between the routing device and the terminal device and the message backoff time fluctuation value of the routing device.
[0086] If the difference between the first timestamp and the second timestamp is greater than the preset second time threshold THRESHOLD2, the routing device counts the number of transmission failures in this transmission based on the number of times the first data frame is sent in a loop, and clears the number of failures in the historical statistics of the rate control module to zero, so that the transmission failure caused by the terminal TWT sleep does not affect the rate algorithm decision; the second time threshold THRESHOLD2 is configured with reference to relevant materials and is determined by the timing synchronization error between the routing device and the terminal device and the fluctuation value of the routing device's message backoff time.
[0087] Step S409: After obtaining the exit energy-saving message sent by the terminal device using the long connection, obtain the second data frame corresponding to the exit energy-saving message of the routing device in the next service cycle based on historical statistical data.
[0088] After receiving the exit energy-saving message sent by the terminal device through a long connection, the routing device generates and obtains the second data frame to be sent in the next TWT service cycle (SP) corresponding to the terminal device, based on the historical statistics of the number of failed attempts that have been cleared.
[0089] Step S410: Use the long connection to send the second data frame to the terminal device at the first rate.
[0090] The routing device continues to send the second data frame to the terminal device that has exited the TWT sleep state through a stable long connection, using the initial first rate V1. This avoids the speed reduction caused by misjudgment of TWT sleep, eliminates rate jitter, and ensures stable transmission rate.
[0091] In TWT power saving mode, the success rate of the routing device sending packets is not counted in the rate control module for a period of time before and after the terminal device exits the TWT SP phase (i.e., enters the power saving state). (Because the timestamps of the terminal device and the routing device cannot be completely consistent, the timing of the routing device sending packets may be before the terminal device exits the TWT SP phase or just after exiting the TWT SP phase.) THRESHOLD2 can be dynamically configured, with a reference value of 3 milliseconds.
[0092] In the data transmission method for the routing device described in the above embodiments, when the mobile phone (or other terminal device) enters or exits the power-saving state or TWT power-saving state, the transmission rate of the routing device does not fluctuate (high->low->high), the throughput of the user's Internet access does not fluctuate, and the user's experience will be better.
[0093] As can be seen from the above data transmission method for routing devices, after the terminal device enters the energy-saving state, the method uses the time difference between the energy-saving message sent by the terminal device and the data frame sent by the routing device as a time buffer for asynchronous processing. Finally, under the action of this time buffer, the data transmission of the routing device is realized, thereby solving the problem of transmission rate fluctuation caused by the false alarm rate of the message in the time buffer during asynchronous processing.
[0094] Corresponding to the above embodiments of the data transmission method for routing devices, this embodiment of the invention also provides a data transmission system for routing devices, such as... Figure 5 As shown, the system includes: First timestamp acquisition module 100: used to receive the energy-saving entry message sent by the terminal device and record the first timestamp when the energy-saving entry message is transmitted to the routing device; Second timestamp acquisition module 200: used to cyclically send the first data frame to the terminal device at the first rate, and record the second timestamp of the first data frame in the routing device when it is completed; Data frame transmission control module 300: If the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then after receiving the exit energy-saving message sent by the terminal device, it sends a second data frame to the terminal device at a first rate.
[0095] As can be seen from the above data transmission system for routing devices, after the terminal device enters the energy-saving state, the system uses the time difference between the energy-saving message sent by the terminal device and the data frame sent by the routing device as a time buffer for asynchronous processing. Finally, under the action of this time buffer, the data transmission of the routing device is realized, thereby solving the problem of transmission rate fluctuation caused by the false alarm rate of the message in the time buffer during asynchronous processing.
[0096] The data transmission system for routing devices provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned data transmission method for routing devices. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned data transmission method for routing devices.
[0097] This embodiment also provides an electronic device, the structural schematic diagram of which is shown below. Figure 6As shown, the device includes a processor 101 and a memory 102; wherein the memory 102 is used to store one or more computer instructions, which are executed by the processor to implement the steps of the data transmission method for the routing device described above.
[0098] Figure 6 The electronic device shown also includes a bus 103 and a communication interface 104, with the processor 101, communication interface 104 and memory 102 connected via the bus 103.
[0099] The memory 102 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. The bus 103 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0100] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and to send encapsulated IPv4 packets or IPv4 packets to the user terminal through the network interface.
[0101] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. The processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 102. The processor 101 reads the information in memory 102 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0102] This invention also provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of the data transmission method for routing devices described in the foregoing embodiments.
[0103] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, devices, and methods can be implemented in other ways. The system 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. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0104] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0105] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0106] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, 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, electronic device, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0107] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data transmission method for a routing device, characterized in that, The method includes: Receive the energy-saving entry message sent by the terminal device and record the first timestamp when the energy-saving entry message is transmitted to the routing device; The first data frame is cyclically sent to the terminal device at a first rate. When the first data frame reaches the maximum number of retransmissions, the second timestamp of when the first data frame is completed in the routing device is recorded. The first data frame is a data frame that has not received an acknowledgment frame from the terminal device. If the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then after receiving the exit energy-saving message sent by the terminal device, a second data frame is sent to the terminal device at the first rate. The method further includes: If the time difference between the first timestamp and the second timestamp is not greater than the time threshold, then after receiving the exit energy-saving message sent by the terminal device, a second data frame is sent to the terminal device at a second rate; wherein the second rate is lower than the first rate.
2. The data transmission method for a routing device according to claim 1, characterized in that, The steps of receiving an energy-saving entry message sent by a terminal device and recording the first timestamp when the energy-saving entry message is transmitted to the routing device include: Once a long connection is detected between the routing device and the terminal device, the long connection is used to obtain the data request message sent by the terminal device. Obtain the first data frame corresponding to the data request message, and send the first data frame to the terminal device at the first rate; When the first data frame is detected to be sent to the terminal device, the power-saving message sent by the terminal device is obtained using the long connection; The current timestamp when the energy-saving message is received is recorded in the routing device as the first timestamp.
3. The data transmission method for a routing device according to claim 2, characterized in that, The steps of cyclically sending first data frames to the terminal device at a first rate and recording a second timestamp in the routing device when the first data frame is completed include: The energy-saving cycle of the terminal device is obtained based on the energy-saving message received. Obtain the timeout threshold of the terminal device under the energy-saving cycle, and use the timeout threshold to determine the number of retransmissions of the first data frame; The first data frame is cyclically sent to the terminal device using the long connection and at the first rate; When the number of cyclic transmissions reaches the retransmission count, the current timestamp when the first data frame is completed is recorded in the routing device as the second timestamp.
4. The data transmission method for a routing device according to claim 3, characterized in that, If the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then the step of sending a second data frame to the terminal device at the first rate after receiving the power-saving exit message from the terminal device includes: If the time difference between the first timestamp and the second timestamp is greater than a preset first time threshold, then the number of transmission failures of the first data frame is obtained based on the number of loop transmissions, and the historical statistics of the first data frame are updated using the number of transmission failures, so that the number of transmission failures in the historical statistics is updated to zero; wherein, the first time threshold is determined by the transmission duration, transmission duration and processing duration when the energy-saving message is sent from the terminal device to the routing device; After obtaining the exit energy-saving message sent by the terminal device using the long connection, the routing device obtains the second data frame corresponding to the exit energy-saving message in the non-energy-saving period of the terminal device based on the historical statistical data. The second data frame is sent to the terminal device using the long connection at the first rate.
5. The data transmission method for a routing device according to claim 1, characterized in that, The steps of receiving an energy-saving entry message sent by a terminal device and recording the first timestamp when the energy-saving entry message is transmitted to the routing device include: When it is detected that the routing device and the terminal device have completed a long connection, the long connection is used to obtain the data request packets sent by the terminal device during the service period by the routing device. Obtain the first data frame corresponding to the data request message, and send the first data frame to the terminal device at the first rate; When the first data frame is detected to be sent to the terminal device, the long connection is used to obtain the power-saving message sent by the terminal device during the sleep cycle of the routing device; The current timestamp when the energy-saving message is received is recorded in the routing device as the first timestamp.
6. The data transmission method for a routing device according to claim 5, characterized in that, The steps of cyclically sending first data frames to the terminal device at a first rate and recording a second timestamp in the routing device when the first data frame is completed include: Obtain the timeout threshold of the terminal device during the sleep cycle, and use the timeout threshold to determine the number of retransmissions of the first data frame; The first data frame is cyclically sent to the terminal device using the long connection and at the first rate; When the number of cyclic transmissions reaches the retransmission count, the current timestamp when the first data frame is completed is recorded in the routing device as the second timestamp.
7. The data transmission method for a routing device according to claim 6, characterized in that, If the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, then the step of sending a second data frame to the terminal device at the first rate after receiving the power-saving exit message from the terminal device includes: If the time difference between the first timestamp and the second timestamp is greater than a preset second time threshold, then the number of transmission failures of the first data frame is obtained based on the number of loop transmissions, and the historical statistics of the first data frame are updated using the number of transmission failures, so that the number of transmission failures in the historical statistics is updated to zero; wherein, the second time threshold is determined by the timing synchronization error between the routing device and the terminal device and the packet backoff time fluctuation value of the routing device; After obtaining the exit energy-saving message sent by the terminal device using the long connection, the second data frame corresponding to the exit energy-saving message of the routing device in the next service cycle is obtained based on the historical statistical data. The second data frame is sent to the terminal device using the long connection at the first rate.
8. A data transmission system for a routing device, characterized in that, The system includes: First timestamp acquisition module: used to receive the energy-saving entry message sent by the terminal device and record the first timestamp when the energy-saving entry message is transmitted to the routing device; The second timestamp acquisition module is used to cyclically send the first data frame to the terminal device at a first rate, and record the second timestamp of the first data frame when it is sent in the routing device when the first data frame reaches the maximum number of retransmissions; wherein the first data frame is a data frame that has not received an acknowledgment frame from the terminal device. Data frame transmission control module: If the time difference between the first timestamp and the second timestamp is greater than a preset time threshold, after receiving the exit energy-saving message sent by the terminal device, it sends a second data frame to the terminal device at the first rate. The data frame transmission control module is further configured to: if the time difference between the first timestamp and the second timestamp is not greater than the time threshold, then after receiving the exit energy-saving message sent by the terminal device, send a second data frame to the terminal device at a second rate; wherein the second rate is lower than the first rate.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the steps of the data transmission method for a routing device according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for preserving a data transmission rate of a terminal in a communications network
CN112789833A
Wireless communication method, wireless terminal, wireless access device and wireless system
CN115915363A
Data transmission method and system, electronic equipment and storage medium
CN119728024A
Data transmission method and electronic equipment
CN121923778A