Data transmission method and system, electronic equipment and storage medium
By selecting appropriate modulation and coding strategies based on data packet data volume and network conditions, the problem of poor network performance of wireless routers during data transmission is solved, and accurate adjustment of data transmission rate and improvement of network performance is achieved.
Patent Information
- Application Number
- CN202411975005.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-28
AI Technical Summary
Existing wireless routers need to adjust the modulation and coding strategy multiple times during data transmission, resulting in poor network performance and difficulty in accurately adjusting the data transmission rate.
By receiving the data transmission request, the data amount of the target data packet is determined, and the corresponding modulation and coding strategies are selected based on the data amount, network congestion situation and signal strength of the counter-end device, including the first modulation and coding strategy and the second modulation and coding strategy, ensuring the reliability and efficiency of data transmission.
It realizes accurate adjustment of data transmission rate and improves the network performance of wireless routers, especially when network conditions are complex or signal strength is weak.
Smart Images

Figure CN119728024A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a data transmission method, system, electronic device and storage medium. Background Art
[0002] Modulation and Coding Scheme (MCS) determines the data transmission rate between wireless devices. Wireless routers usually automatically adjust the data transmission rate by changing the modulation and coding scheme. After multiple data packet transmission failures, wireless routers in related technologies will adjust the modulation and coding scheme according to preset rules; however, the above method often requires multiple adjustments to the modulation and coding scheme to enable normal data transmission between the wireless router and the peer device, resulting in poor network performance of the wireless router.
[0003] Therefore, how to accurately adjust the data transmission rate and improve the network performance of the wireless router is a technical problem that those skilled in the art currently need to solve. Summary of the invention
[0004] The purpose of the present application is to provide a data transmission method, system, electronic device and storage medium, which can accurately adjust the data transmission rate and improve the network performance of the wireless router.
[0005] In order to solve the above technical problems, the present application provides a data transmission method, which is applied to a wireless router, comprising:
[0006] receiving a data transmission request, and determining a data volume of a target data packet corresponding to the data transmission request;
[0007] If the data volume of the target data packet is greater than the preset data volume, determining a first modulation and coding strategy according to the network congestion situation and the signal strength of the opposite device, and transmitting the target data packet to the opposite device according to the first modulation and coding strategy;
[0008] If the data volume of the target data packet is less than or equal to the preset data volume, the target data packet is transmitted to the opposite device according to the second modulation and coding strategy; wherein the second modulation and coding strategy is a modulation and coding strategy that makes the data transmission rate lower than the preset rate.
[0009] Optionally, after transmitting the target data packet to the opposite device according to the first modulation and coding strategy, the method further includes:
[0010] Recording the number of transmissions of the target data packet;
[0011] If the opposite device does not return confirmation information within the preset time period, determining whether the number of transmissions is greater than a critical value;
[0012] If not, retransmit the target data packet to the opposite device according to the first modulation and coding strategy.
[0013] Optionally, after determining whether the number of transmissions is greater than a critical value, the method further includes:
[0014] If the number of transmissions is greater than the critical value, the target data packet is transmitted to the opposite device according to the third modulation and coding strategy; wherein the data transmission rate corresponding to the third modulation and coding strategy is lower than the data transmission rate corresponding to the first modulation and coding strategy.
[0015] Optionally, also include:
[0016] The signal-to-noise ratio of the current scene is obtained, and the preset duration is set according to the signal-to-noise ratio.
[0017] Optionally, after transmitting the target data packet to the opposite device according to the first modulation and coding strategy, the method further includes:
[0018] If the opposite device returns a confirmation message within the preset time length, other data packets with a data volume greater than the preset data volume are transmitted to the opposite device according to the fourth modulation and coding strategy; wherein the data transmission rate corresponding to the fourth modulation and coding strategy is higher than the data transmission rate corresponding to the first modulation and coding strategy.
[0019] Optionally, also include:
[0020] Detect the signal strength of all devices in the environment;
[0021] If the signal strength of the opposite device is lower than the signal strength threshold, and the signal strength of the candidate device is higher than or equal to the signal strength threshold, the candidate device is set as a new opposite device, and a communication connection is established with the new opposite device.
[0022] Optionally, also include:
[0023] The request sending threshold and the clear sending threshold of the wireless router are set according to the network throughput and the data packet retransmission rate.
[0024] The present application also provides a data transmission system, which is applied to a wireless router, comprising:
[0025] A data volume determination module, configured to receive a data transmission request and determine the data volume of a target data packet corresponding to the data transmission request;
[0026] A large packet transmission control module, configured to determine a first modulation and coding strategy according to network congestion and a signal strength of a peer device if the data volume of the target data packet is greater than a preset data volume, and transmit the target data packet to the peer device according to the first modulation and coding strategy;
[0027] A packet transmission control module is used to transmit the target data packet to the opposite device according to the second modulation and coding strategy if the data volume of the target data packet is less than or equal to the preset data volume; wherein the second modulation and coding strategy is a modulation and coding strategy that makes the data transmission rate lower than the preset rate.
[0028] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned data transmission method are implemented.
[0029] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned data transmission method when calling the computer program in the memory.
[0030] The present application provides a data transmission method. After receiving a data transmission request, the method determines the data volume of a target data packet to be transmitted to a peer device, and selects a corresponding modulation and coding strategy according to the data volume of the target data packet. Specifically, if the data volume of the target data packet is greater than the preset data volume, the first modulation and coding strategy is selected for transmission according to the current network congestion and the signal strength of the peer device; the above method can improve the reliability and efficiency of transmission, and can ensure the network performance of the wireless router under complex network conditions or weak signal strength. If the data volume of the target data packet is less than or equal to the preset data volume, the second modulation and coding strategy is directly adopted for transmission; the above method can use a lower data transmission rate to transmit a target data packet with a smaller data volume, although a certain speed is sacrificed, it helps to reduce network congestion and bit error rate. It can be seen that the present application can accurately adjust the data transmission rate and improve the network performance of the wireless router. The present application also provides a data transmission system, a storage medium and an electronic device, which have the above beneficial effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0032] Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application;
[0033] Figure 2 A curve diagram of channel quality and signal-to-noise ratio changes over time provided in an embodiment of the present application;
[0034] Figure 3 A schematic diagram of the structure of a data transmission system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0036] See below Figure 1 , Figure 1 A flowchart of a data transmission method provided in an embodiment of the present application.
[0037] Specific steps may include:
[0038] S101: receiving a data transmission request, and determining the data volume of a target data packet corresponding to the data transmission request;
[0039] This embodiment may be applied to a wireless router, and the wireless router may transmit a target data packet corresponding to a data transmission request to a peer device, which may be an AP (Wireless Access Point) device.
[0040] The data transmission request may be a data transmission request from a client device (such as a mobile phone, a laptop, etc.). The wireless router may parse the data transmission request, identify the target data packet to be transmitted, and determine the amount of data contained in the target data packet by calculation or query.
[0041] In this embodiment, the target data packet can be divided into large packets and small packets based on the data volume. The large packet is a data packet with a data volume greater than a preset data volume (eg, 1000 bytes), and the small packet is a data packet with a data volume less than or equal to the preset data volume.
[0042] S102: If the data volume of the target data packet is greater than the preset data volume, determining a first modulation and coding strategy according to the network congestion situation and the signal strength of the opposite device, and transmitting the target data packet to the opposite device according to the first modulation and coding strategy;
[0043] This step is based on the assumption that the data volume of the target data packet is greater than the preset data volume. At this time, the network congestion situation and the signal strength of the peer device can be obtained. The wireless router can determine the network congestion situation based on the data packet retransmission rate, data packet transmission delay and jitter; the signal strength of the peer device refers to the signal strength of the peer device received by the wireless router.
[0044] This embodiment can pre-set the correspondence between network congestion, signal strength and modulation and coding strategy, determine the first modulation and coding strategy based on the correspondence, and then transmit the target data packet to the opposite device according to the first modulation and coding strategy. Specifically, if the network is severely congested, this embodiment can select a modulation and coding strategy corresponding to a lower transmission rate as the first modulation and coding strategy to reduce data packet loss and retransmission; if the signal strength is weak, this embodiment can select a low-order (such as quadrature phase shift keying QPSK) modulation and coding strategy as the first modulation and coding strategy to improve transmission reliability.
[0045] Through the above operations, when the target data packet has a large data volume, the wireless router can select the most appropriate modulation and coding strategy according to the network congestion situation and the signal strength of the opposite device to ensure efficient and reliable data transmission.
[0046] S103: If the data amount of the target data packet is less than or equal to the preset data amount, transmitting the target data packet to the opposite device according to the second modulation and coding strategy;
[0047] Among them, this step is based on the premise that the data volume of the target data packet is less than or equal to the preset data volume. At this time, the target data packet can be directly transmitted to the opposite device according to the second modulation and coding strategy. The above-mentioned second modulation and coding strategy (such as QPSK) is a modulation and coding strategy that makes the data transmission rate lower than the preset rate.
[0048] Through the above operations, the wireless router can adopt a low-speed transmission strategy when the target data packet has a small data volume, thereby ensuring the reliability and anti-interference capability of data transmission.
[0049] After receiving the data transmission request, this embodiment determines the data volume of the target data packet that needs to be transmitted to the opposite device, and selects the corresponding modulation and coding strategy according to the data volume of the target data packet. Specifically, if the data volume of the target data packet is greater than the preset data volume, the first modulation and coding strategy is selected for transmission according to the current network congestion and the signal strength of the opposite device; the above method can improve the reliability and efficiency of transmission, and can ensure the network performance of the wireless router under complex network conditions or weak signal strength. If the data volume of the target data packet is less than or equal to the preset data volume, the second modulation and coding strategy is directly used for transmission; the above method can use a lower data transmission rate to transmit a target data packet with a smaller data volume. Although a certain speed is sacrificed, it helps to reduce network congestion and bit error rate. It can be seen that this embodiment can accurately adjust the data transmission rate and improve the network performance of the wireless router.
[0050] As for Figure 1 Further introduction to the corresponding embodiment, after transmitting the target data packet to the opposite device according to the first modulation and coding strategy, the following operations can also be performed: recording the number of transmissions of the target data packet; if the opposite device does not return confirmation information within a preset time period, determining whether the number of transmissions is greater than a critical value; if not, retransmitting the target data packet to the opposite device according to the first modulation and coding strategy.
[0051] As a feasible implementation, this embodiment can obtain the signal-to-noise ratio of the current scene and set the preset duration according to the signal-to-noise ratio. This embodiment can dynamically adjust the preset duration according to the signal-to-noise ratio; for example, a shorter preset duration is set when the signal-to-noise ratio is high, and a longer preset duration is set when the signal-to-noise ratio is low, so as to optimize the reliability and efficiency of data transmission.
[0052] After the wireless router transmits the target data packet to the peer device according to the first modulation and coding strategy, the number of transmissions of the data packet will be recorded. If the peer device does not return the confirmation information ACK within the preset time length (for example, 1 second), the wireless router will check whether the current number of transmissions exceeds the critical value (for example, 3 times). If the number of transmissions does not exceed the critical value, the wireless router will retransmit the data packet according to the same modulation and coding strategy and increase the number of transmissions. This mechanism ensures that when the data packet is not successfully transmitted, it can be retransmitted multiple times to improve the reliability and success rate of the transmission. If the number of transmissions reaches or exceeds the critical value, the wireless router can take other measures, such as adjusting the modulation and coding strategy or giving up retransmission, to avoid wasting resources. Through the above operations, the wireless router can ensure the reliable transmission of data packets when the network environment is not good.
[0053] Further, after determining whether the number of transmissions is greater than a critical value, if the number of transmissions is greater than the critical value (e.g., 5 times), the wireless router can transmit the target data packet to the peer device according to the third modulation and coding strategy; wherein the data transmission rate corresponding to the third modulation and coding strategy is lower than the data transmission rate corresponding to the first modulation and coding strategy, so as to improve the reliability and anti-interference capability of the transmission. The above operation improves the probability of successful transmission of the data packet by reducing the transmission rate after multiple retransmission failures.
[0054] As for Figure 1 Further introduction to the corresponding embodiment: after transmitting the target data packet to the opposite device according to the first modulation and coding strategy, if the opposite device returns confirmation information within the preset time length, other data packets with a data volume greater than the preset data volume are transmitted to the opposite device according to the fourth modulation and coding strategy; wherein the data transmission rate corresponding to the fourth modulation and coding strategy is higher than the data transmission rate corresponding to the first modulation and coding strategy. The above mechanism enables the wireless router to transmit data packets with a large data volume at a higher transmission rate when the data transmission is successful, thereby optimizing the overall network performance and transmission efficiency.
[0055] As for Figure 1 As further described in the corresponding embodiment, the wireless router can also detect the signal strength of all devices in the environment; if the signal strength of the peer device is lower than the signal strength threshold, and the signal strength of the candidate device is higher than or equal to the signal strength threshold, the candidate device is set as a new peer device, and a communication connection is established with the new peer device. Through the above operation, the wireless router can automatically switch to a peer device with a stronger signal when the signal quality is poor, thereby optimizing network performance. The new peer device is the same type of device as the original peer device.
[0056] As for Figure 1 According to the further introduction of the corresponding embodiment, the request sending threshold and clear sending threshold of the wireless router can also be set according to the network throughput and the packet retransmission rate. In this embodiment, the network throughput and the packet retransmission rate can be weighted to calculate the request sending threshold and the clear sending threshold; if the network throughput is low or the packet retransmission rate is high, the request sending threshold and the clear sending threshold are lowered to reduce collisions and improve reliability; if the network throughput is high and the packet retransmission rate is low, the request sending threshold and the clear sending threshold are increased to reduce handshake overhead and improve transmission efficiency.
[0057] The process described in the above embodiment is explained below through an embodiment in actual application.
[0058] WiFi adaptive link enhancement is a technology that improves the performance of WiFi networks by improving physical links and data links. It includes multiple functions and strategies, such as automatic rate selection, automatic retransmission, dynamic channel selection, and automatic power control, to optimize the reliability, capacity, and coverage of WiFi networks. In adaptive link enhancement, the improvement of the physical link mainly involves improving the modulation and coding scheme to improve the reliability and transmission rate of the signal. Common physical link enhancement technologies include MIMO (multiple input multiple output), Beamforming, and space-time coding. The improvement of the data link is mainly concentrated in the MAC layer to improve the reliability and efficiency of frame transmission. Adaptive link enhancement technology can automatically adjust parameters such as transmission rate, data frame retransmission mechanism, and channel selection according to the real-time conditions and needs of the network to provide better network performance and user experience.
[0059] However, the current link adaptation enhancement cannot meet the actual business needs in practical applications. The main reasons are as follows: (1) The industry support for standard link adaptation is poor, and it is difficult to use link adaptation based on CQI (Channel Quality Indicator) feedback; (2) The WiFi interference environment is complex (burst interference), and the business requirements are different. The algorithm needs to meet the requirements of supporting low latency and high throughput; (3) WiFi is mostly a slow-moving scenario, and the link quality changes slowly.
[0060] Based on the technical problems existing in the above-mentioned related technologies, this embodiment provides a solution for improving the performance of a WiFi network by adjusting the transmission rate. This solution improves the performance of a WiFi network by adjusting the transmission rate based on different service forms.
[0061] In a WiFi network, the wireless router automatically adjusts the transmission rate based on the signal quality and network congestion. This is achieved by adjusting the MCS (Modulation and Coding Scheme) index. The MCS index determines the data transmission rate between wireless devices. When a device is connected to a WiFi network, the wireless router selects the appropriate MCS index based on the current signal quality and network conditions to provide the best transmission rate and stability.
[0062] The MCS index is a number that represents a specific modulation and coding scheme. Different MCS indexes correspond to different data transmission rates and reliability. A higher MCS index usually means a higher transmission rate, but may also result in a decrease in signal quality. Conversely, a lower MCS index may reduce the transmission rate but improve signal quality and stability.
[0063] The wireless router will select the appropriate MCS index based on the current signal strength. If the signal strength is weak, the wireless router may select a lower MCS index to improve signal quality and stability. When the signal strength is strong and the network is not congested, the wireless router will select a higher MCS index to increase the transmission rate. The WiFi network can automatically adjust the transmission rate by automatically adjusting the MCS index to provide the best network performance and user experience.
[0064] The basic mechanisms of rate negotiation are message confirmation mechanism, message retransmission mechanism, and message speed adjustment mechanism. The three mechanisms enable the wireless router and the terminal to negotiate a message sending and receiving rate that meets the current environment on the air interface.
[0065] Message confirmation mechanism: This mechanism is used to ensure the reliability of air interface data transmission. During the message transmission process, the receiver must send an ACK reply to confirm each IEEE802.11 message sent by the sender. When the sender receives the ACK confirmation from the receiver, it determines that the message has been sent successfully and sends the next frame of data; otherwise, the sender resends the message;
[0066] Message retransmission mechanism: After a message fails to be sent, it is resent at the same rate; at this time, the sender and receiver still use the message confirmation mechanism to confirm reliability.
[0067] Message speed adjustment mechanism: In the current environment, if the current rate still cannot be retransmitted successfully after the message confirmation mechanism and message retransmission mechanism, the sender will reduce the speed and retransmit the message after reducing the speed. When reducing the speed, the speed will be reduced according to 54Mbps, 48Mbps, 36Mbps, 24Mbps, 18Mbps, 12Mbps, 11Mbps, 5.5Mbps, 1Mbps and other rates until a suitable rate is negotiated, at which the message can be transmitted normally.
[0068] Please refer to Table 1, which shows the modulation mode, FEC and maximum data rate corresponding to each MCS index.
[0069] Table 1 Comparison of modulation and coding strategies and maximum data rates
[0070]
[0071] BPSK (Binary Phase Shift Keying) stands for binary phase shift keying, QPSK (Quadrature Phase Shift Keying) stands for quadrature phase shift keying, QAM (Quadrature Amplitude Modulation) stands for quadrature amplitude modulation, and FEC (Forward Error Correction) stands for forward error correction.
[0072] When the environment recovers to support high-speed transmission of messages, the sender will increase the rate by trying to increase the transmission rate; after the rate is increased and the message can be sent normally, the sender maintains high-speed transmission. It should be noted that the message transmission rate is independent of the wireless router and the terminal in the negotiation process, and is determined by the sender of the message. For example, the wireless router may use 54Mbps messages to send to the terminal user, while the terminal user may use 11Mbps to send messages to the wireless router.
[0073] This embodiment proposes a strategy of using different link adaptations based on services. The central idea of the entire strategy is to use robust rate control to enhance link adaptation based on different services, thereby improving the network performance of WiFi. The entire strategy mainly includes two parts: robust control based on services and robust control against interference.
[0074] In the service-based robust control, the transmission of large packets uses a fast order-up and order-down mechanism to improve the link adaptation speed; small packets use low-speed transmission to achieve greater fading margin and improve anti-interference capabilities. In the robust control of anti-interference, delay order reduction can be achieved by counteracting sudden interference.
[0075] See also Figure 2 , Figure 2 A curve diagram of channel quality and signal-to-noise ratio changes over time provided in an embodiment of the present application, in which MCS5 and MCS8 represent modulation and coding strategies, SNR represents signal-to-noise ratio, Packet Loss represents packet loss rate, Channel Quality represents channel quality, and Time represents time.
[0076] The following is a detailed explanation of the entire strategy. For business-based robust control, there are two different business situations: large packet transmission and small packet transmission. For large packets, a fast upgrade and downgrade mechanism is needed to improve the link adaptation speed. In order to implement a fast WiFi upgrade and downgrade mechanism, the following measures are taken:
[0077] Measure 1: Signal strength threshold adjustment: By adjusting the signal strength threshold for the device to switch to other APs, ensure that the device can quickly switch to a stronger signal source when the signal is weak.
[0078] Measure 2: Intelligent speed-up and speed-down strategy: Implement an intelligent speed-up and speed-down strategy that takes into account factors such as network load, signal quality, and user needs, so that switching can be performed when necessary.
[0079] Measure 3: Pre-fetch: Perform authentication in advance when possible to reduce authentication delays during switching.
[0080] Measure 4: Fast reassociation: When the device is roaming, a fast reassociation mechanism is used to reduce the time required for reconnection.
[0081] Measure 5: Fast switching algorithm optimization: Optimize the algorithm of the upgrade and downgrade mechanism for specific environments and usage scenarios to ensure fast switching between different networks.
[0082] Due to factors such as signal strength, distance, and interference, large delays, bit errors, and even packet loss may occur during data transmission. In order to more effectively alleviate delays and bit errors and ensure the accuracy of data transmission, WiFi terminal devices need to use lower-order encoding methods when transmitting small packets to improve the data message's ability to resist bit errors and delays in the air interface. The above mechanism can improve the ability to resist bit errors.
[0083] The low-speed transmission of WiFi packets can improve the anti-interference ability, which is mainly reflected in the following aspects:
[0084] Improved anti-interference ability: Small packet transmission usually means shorter transmission time, so when facing instantaneous interference, small packets may be more easily protected, reducing the possibility of packet loss.
[0085] Spectrum efficiency: By adopting small packets and low-speed transmission, spectrum resources can be used more effectively, reducing network occupancy, thereby alleviating congestion and improving adaptability to interference.
[0086] Flexibility: Small packet transmissions may be more flexible in network congestion or high-interference environments because they can more easily adapt to dynamically changing channel conditions.
[0087] Reduced packet loss rate: Since the transmission time of small packets is relatively short, the risk of packet loss may be reduced when facing interference such as signal attenuation or multipath propagation.
[0088] For robust control against interference, delay reduction is a strategy proposed in this scheme to counter interference, which mainly improves stability by adjusting the parameters of the WiFi network. The specific methods are as follows: (1) Adjust the threshold of request to send / clear to send (RTS / CTS) to make it higher; this can reduce network collisions and improve the reliability of signal transmission. (2) Choose a more conservative modulation method and reduce the transmission rate. Although this will result in lower bandwidth, it helps to improve signal stability. (3) Increase the timeout for acknowledgment (ACK), which can be more tolerant of some packet loss or delay. (4) Increase the number of signal retries to tolerate some transmission failures. (5) Use a conservative adaptive rate control algorithm to adjust the transmission rate more conservatively in the case of interference.
[0089] See also Figure 3 , Figure 3 A schematic diagram of a data transmission system provided in an embodiment of the present application, which can be applied to a wireless router, includes:
[0090] The data volume determination module 301 is used to receive a data transmission request and determine the data volume of a target data packet corresponding to the data transmission request;
[0091] The large packet transmission control module 302 is used to determine a first modulation and coding strategy according to the network congestion situation and the signal strength of the opposite device if the data volume of the target data packet is greater than the preset data volume, and transmit the target data packet to the opposite device according to the first modulation and coding strategy;
[0092] The packet transmission control module 303 is used to transmit the target data packet to the opposite device according to the second modulation and coding strategy if the data volume of the target data packet is less than or equal to the preset data volume; wherein the second modulation and coding strategy is a modulation and coding strategy that makes the data transmission rate lower than the preset rate.
[0093] After receiving the data transmission request, this embodiment determines the data volume of the target data packet that needs to be transmitted to the opposite device, and selects the corresponding modulation and coding strategy according to the data volume of the target data packet. Specifically, if the data volume of the target data packet is greater than the preset data volume, the first modulation and coding strategy is selected for transmission according to the current network congestion and the signal strength of the opposite device; the above method can improve the reliability and efficiency of transmission, and can ensure the network performance of the wireless router under complex network conditions or weak signal strength. If the data volume of the target data packet is less than or equal to the preset data volume, the second modulation and coding strategy is directly used for transmission; the above method can use a lower data transmission rate to transmit a target data packet with a smaller data volume. Although a certain speed is sacrificed, it helps to reduce network congestion and bit error rate. It can be seen that this embodiment can accurately adjust the data transmission rate and improve the network performance of the wireless router.
[0094] Furthermore, it also includes:
[0095] A retransmission module is used to record the number of transmissions of the target data packet after transmitting the target data packet to the opposite device according to the first modulation and coding strategy; it is also used to determine whether the number of transmissions is greater than a critical value if the opposite device does not return confirmation information within a preset time period; and if not, to retransmit the target data packet to the opposite device according to the first modulation and coding strategy.
[0096] Furthermore, it also includes:
[0097] A strategy adjustment module is used to, after determining whether the number of transmissions is greater than a critical value, transmit the target data packet to the opposite device according to the third modulation and coding strategy if the number of transmissions is greater than the critical value; wherein the data transmission rate corresponding to the third modulation and coding strategy is lower than the data transmission rate corresponding to the first modulation and coding strategy.
[0098] Furthermore, it also includes:
[0099] The time setting module is used to obtain the signal-to-noise ratio of the current scene and set the preset time length according to the signal-to-noise ratio.
[0100] Furthermore, it also includes:
[0101] A strategy adjustment module is used to transmit other data packets with a data volume greater than a preset data volume to the opposite device according to a fourth modulation and coding strategy after the target data packet is transmitted to the opposite device according to the first modulation and coding strategy, if the opposite device returns a confirmation message within a preset time length; wherein the data transmission rate corresponding to the fourth modulation and coding strategy is higher than the data transmission rate corresponding to the first modulation and coding strategy.
[0102] Furthermore, it also includes:
[0103] The switching module is used to detect the signal strength of all devices in the environment; if the signal strength of the opposite device is lower than the signal strength threshold and the signal strength of the alternative device is higher than or equal to the signal strength threshold, the alternative device is set as the new opposite device and a communication connection is established with the new opposite device.
[0104] Furthermore, it also includes:
[0105] The parameter setting module is used to set the request sending threshold and clear sending threshold of the wireless router according to the network throughput and the data packet retransmission rate.
[0106] Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, which will not be repeated here.
[0107] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0108] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.
[0109] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of this application.
[0110] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A data transmission method, characterized in that: Applicable to wireless routers, including: receiving a data transmission request, and determining a data volume of a target data packet corresponding to the data transmission request; If the data volume of the target data packet is greater than the preset data volume, determining a first modulation and coding strategy according to the network congestion situation and the signal strength of the opposite device, and transmitting the target data packet to the opposite device according to the first modulation and coding strategy; If the data volume of the target data packet is less than or equal to the preset data volume, the target data packet is transmitted to the opposite device according to a second modulation and coding strategy; wherein the second modulation and coding strategy is a modulation and coding strategy that makes the data transmission rate lower than the preset rate.
2. The data transmission method according to claim 1, characterized in that: After transmitting the target data packet to the opposite device according to the first modulation and coding strategy, the method further includes: Recording the number of transmissions of the target data packet; If the opposite device does not return confirmation information within the preset time period, determining whether the number of transmissions is greater than a critical value; If not, retransmit the target data packet to the opposite device according to the first modulation and coding strategy.
3. The data transmission method according to claim 2, characterized in that: After determining whether the number of transmissions is greater than a critical value, the method further includes: If the number of transmissions is greater than the critical value, the target data packet is transmitted to the opposite device according to a third modulation and coding strategy; wherein the data transmission rate corresponding to the third modulation and coding strategy is lower than the data transmission rate corresponding to the first modulation and coding strategy.
4. The data transmission method according to claim 2, characterized in that: Also includes: The signal-to-noise ratio of the current scene is obtained, and the preset duration is set according to the signal-to-noise ratio.
5. The data transmission method according to claim 1, characterized in that: After transmitting the target data packet to the opposite device according to the first modulation and coding strategy, the method further includes: If the opposite device returns a confirmation message within the preset time length, other data packets with a data volume greater than the preset data volume are transmitted to the opposite device according to the fourth modulation and coding strategy; wherein the data transmission rate corresponding to the fourth modulation and coding strategy is higher than the data transmission rate corresponding to the first modulation and coding strategy.
6. The data transmission method according to claim 1, characterized in that: Also includes: Detect the signal strength of all devices in the environment; If the signal strength of the opposite device is lower than the signal strength threshold, and the signal strength of the candidate device is higher than or equal to the signal strength threshold, the candidate device is set as a new opposite device, and a communication connection is established with the new opposite device.
7. The data transmission method according to claim 1, characterized in that: Also includes: The request sending threshold and the clear sending threshold of the wireless router are set according to the network throughput and the data packet retransmission rate.
8. A data transmission system, characterized in that: Applicable to wireless routers, including: A data volume determination module, configured to receive a data transmission request and determine the data volume of a target data packet corresponding to the data transmission request; A large packet transmission control module, configured to determine a first modulation and coding strategy according to network congestion and a signal strength of an opposite-end device if the data volume of the target data packet is greater than a preset data volume, and transmit the target data packet to the opposite-end device according to the first modulation and coding strategy; A packet transmission control module is used to transmit the target data packet to the opposite device according to a second modulation and coding strategy if the data volume of the target data packet is less than or equal to the preset data volume; wherein the second modulation and coding strategy is a modulation and coding strategy that makes the data transmission rate lower than the preset rate.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the data transmission method according to any one of claims 1 to 7 when calling the computer program in the memory.
10. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the data transmission method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Data transmission method and system for routing equipment and electronic equipment
CN122372522A
Data transmission method, system and electronic device for routing device
CN122372522B