CN111654355B - Data transmission method, system, electronic device and storage medium - Google Patents

Data transmission method, system, electronic device and storage medium Download PDF

Info

Publication number
CN111654355B
CN111654355B CN202010780416.5A CN202010780416A CN111654355B CN 111654355 B CN111654355 B CN 111654355B CN 202010780416 A CN202010780416 A CN 202010780416A CN 111654355 B CN111654355 B CN 111654355B
Authority
CN
China
Prior art keywords
tcp
message
information
data
tcp ack
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010780416.5A
Other languages
Chinese (zh)
Other versions
CN111654355A (en
Inventor
周斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202010780416.5A priority Critical patent/CN111654355B/en
Publication of CN111654355A publication Critical patent/CN111654355A/en
Application granted granted Critical
Publication of CN111654355B publication Critical patent/CN111654355B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
    • H04L1/0016Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy involving special memory structures, e.g. look-up tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data transmission method, a data transmission system, electronic equipment and a storage medium. The data transmission method is applied to a sending end, and comprises the following steps: monitoring a storage space occupied by a TCP message to be sent by a data sending module; judging whether the storage space is larger than or equal to a first storage threshold value: if so, the data receiving module is informed to stop submitting the TCP message including the TCP ACK information to the application processor. In the invention, whether the storage space occupied by the TCP message is larger than or equal to the preset storage upper limit is judged firstly, if so, the sending of the TCP ACK information is stopped, and the application processor automatically adjusts the size of the TCP sending window, so that the throughput rate of the sending end can be maintained at a relatively stable level without increasing the interactive interfaces and interactive times of the application processor and the data sending module, and the average throughput rate of the sending end and the average throughput rate of the receiving end can be maintained at a higher level in the long term.

Description

Data transmission method, system, electronic device and storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a data transmission method, system, electronic device, and storage medium.
Background
With the proliferation of mobile communication device usage, there is growing interest in mobile internet and Web-based applications. TCP (transmission control protocol) is a popular transport layer protocol on the internet, and is responsible for providing high reliability data transmission of wired and wireless links. Any packet loss causes network congestion and results in a reduced rate of data transmission at the transmitting end. Meanwhile, when there is a large amount of data interaction, along with the acknowledgement response of the receiving end to the TCP message sent by the sending end, the sending end TCP may increase the size of the sending window and challenge the limit of the transmission resource, where the sending window may be understood as the amount of data sent at one time.
In this case, once the transmission resource carrying capacity of the sending end is exceeded, part of data in the sending end is actively lost, or the size of a sending window of a TCP message of the sending end is reduced through interaction between a sending module of the sending end and the application processor, so that the limitation of transmission resource shortage is alleviated.
In addition, the number of interfaces and the number of interaction times between the application processor and the data sending module of the sending end can be increased by adjusting the size of a sending window of the TCP through the interaction between the sending module of the sending end and the application processor, and system resources are additionally occupied.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a data transmission method, system, electronic device and storage medium, which can maintain the average throughput rate sent by the sending end and the average throughput rate received by the receiving end at a higher level in a relatively simple manner without increasing the number of interfaces and the number of interactions between the application processor and the data sending module of the sending end, in order to overcome the defect that the throughput rate of the sending end is obviously reduced and cannot be quickly recovered in the manner of adjusting the TCP sending window by packet loss and interaction between the sending module and the application processor in the prior art when the TCP message stored by the sending end exceeds the carrying capacity of the transmission resource.
The invention solves the technical problems through the following technical scheme:
the invention provides a data transmission method, which is applied to a sending end, wherein the sending end comprises a data receiving module, a data sending module and an application processor, the data sending module is used for sending a TCP message to a receiving end, the data receiving module is used for receiving the TCP message sent by the receiving end and submitting the TCP message to the application processor, the application processor is used for controlling the data volume of the TCP message sent by the data sending module according to the data volume confirmed by TCP ACK (TCP acknowledgement character) information in the TCP message, the TCP message comprises optional information and optional information, the optional information comprises TCP ACK information and other optional information except the TCP ACK information, and the data transmission method comprises the following steps:
monitoring the storage space occupied by the TCP message to be sent currently stored by the data sending module;
judging whether the storage space is larger than or equal to a first storage threshold value: and if so, informing the data receiving module to stop submitting the TCP message including the TCP ACK information to the application processor.
Preferably, after the step of notifying the data receiving module to stop submitting the TCP packet including the TCP ACK information to the application processor, the method further includes:
detecting a type of information in a current TCP message before submitting the current TCP message to the application processor:
when the optional information in the current TCP message comprises TCP ACK information and other optional information, stripping the TCP ACK information from the current TCP message, and submitting the current TCP message after stripping the TCP ACK information to the application processor as a TCP message to be submitted;
when the optional information in the current TCP message only comprises TCP ACK information, stopping submitting the current TCP message to the application processor;
and/or the presence of a gas in the gas,
and when the optional information in the current TCP message does not comprise TCP ACK information, submitting the current TCP message to the application processor as a TCP message to be submitted.
Preferably, the data receiving module includes a TCP ACK storage queue, the TCP ACK storage queue is configured to store a TCP ACK packet, and in the step of detecting an information type in the current TCP packet before submitting the current TCP packet to the application processor:
when the current TCP packet includes TCP ACK information and other optional information at the same time, the step of stripping the TCP ACK information from the current TCP packet further includes: generating an independent current TCP ACK message according to the TCP ACK message and the optional information, and storing the current TCP ACK message into the TCP ACK storage queue;
and/or the presence of a gas in the gas,
and when the optional information in the current TCP message only contains TCP ACK information, taking the current TCP message as the current TCP ACK message, and storing the current TCP ACK message into the TCP ACK storage queue.
Preferably, after the step of storing the current TCP ACK packet in the TCP ACK storage queue, the method further includes:
and judging whether the storage space is smaller than or equal to a second storage threshold value, if so, informing the data receiving module to recover and submit the TCP message including the TCP ACK information to the application processor, wherein the second storage threshold value is smaller than the first storage threshold value.
Preferably, after the step of notifying the data receiving module to resume submitting the TCP packet including the TCP ACK information to the application processor, the method further includes:
and submitting the TCP ACK message in the TCP ACK storage queue to the application processor.
The invention also provides a data transmission system, which is applied to a sending end, wherein the sending end comprises a data receiving module, a data sending module and an application processor, the data sending module is used for sending a TCP message to a receiving end, the data receiving module is used for receiving the TCP message sent by the receiving end and submitting the TCP message to the application processor, the application processor is used for controlling the data volume of the TCP message sent by the data sending module according to the data volume confirmed by the TCP ACK information in the TCP message, the TCP message comprises optional information and optional information, the optional information comprises TCP ACK information and other optional information except the TCP ACK information, and the data transmission system comprises: the data monitoring module and the storage space judging module;
the data monitoring module is used for monitoring the storage space occupied by the TCP message to be sent currently stored by the data sending module;
the storage space judging module is used for judging whether the storage space is larger than or equal to a first storage threshold value: and if so, informing the data receiving module to stop submitting the TCP message including the TCP ACK information to the application processor.
Preferably, the data transmission system further includes an information type detection module, and the storage space determination module is further configured to invoke the information type detection module after notifying the data reception module to stop submitting the TCP packet including the TCP ACK information to the application processor;
the information type detection module is used for detecting the type of the information in the current TCP message before submitting the current TCP message to the application processor:
when the optional information in the current TCP message comprises TCP ACK information and other optional information, stripping the TCP ACK information from the current TCP message, and submitting the current TCP message after stripping the TCP ACK information to the application processor as a TCP message to be submitted;
when the optional information in the current TCP message only comprises TCP ACK information, stopping submitting the current TCP message to the application processor;
and/or the presence of a gas in the gas,
and when the optional information in the current TCP message does not comprise TCP ACK information, submitting the current TCP message to the application processor as a TCP message to be submitted.
Preferably, the data receiving module includes a TCP ACK storage queue, where the TCP ACK storage queue is configured to store a TCP ACK packet, and the information type detecting module is further configured to: after the TCP ACK information is stripped from the current TCP message, generating an independent current TCP ACK message according to the TCP ACK information and the necessary information, and storing the current TCP ACK message into a TCP ACK storage queue;
and/or the presence of a gas in the gas,
and the information type detection module is also used for taking the current TCP message as the current TCP ACK message and storing the current TCP ACK message into the TCP ACK storage queue when the optional information in the current TCP message only contains TCP ACK information.
Preferably, the information type detecting module is further configured to call the storage space determining module after storing the current TCP ACK information in the TCP ACK storage queue:
the storage space judging module is further configured to judge whether the storage space is less than or equal to a second storage threshold, and if so, notify the data receiving module to resume submitting the TCP packet including the TCP ACK information to the application processor, where the second storage threshold is less than the first storage threshold.
Preferably, the data transmission system further includes a priority submission module, and the storage space determination module is further configured to invoke the priority submission module after notifying the data receiving module to resume submitting the TCP packet including the TCP ACK information to the application processor;
the priority submission module is used for submitting the TCP ACK message in the TCP ACK storage queue to the application processor.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data transmission method as described above when executing the computer program.
The invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the data transmission method as described above.
The positive progress effects of the invention are as follows: in the invention, when a data sending module of a sending end receives a TCP message sent by an application processor, whether the storage space occupied by the TCP message is larger than or equal to a preset storage upper limit, namely a first storage threshold value, if so, a data receiving module is informed to stop submitting TCP ACK information to the application processor, and the application processor can automatically adjust the size of a sending window under the condition that the TCP ACK information cannot be received or the data volume confirmed by the received TCP ACK information is reduced, so that the throughput rate of the sending end can be maintained at a stable level under the condition that the interaction times of the application processor and the data sending module are not increased, and the average throughput rate of the sending end and the average throughput rate of a receiving end can be maintained at a higher level in a long term.
Drawings
Fig. 1 is a flowchart of a data transmission method according to embodiment 1 of the present invention.
Fig. 2 is a block diagram of a data transmission system according to embodiment 2 of the present invention.
Fig. 3 is a block diagram of an electronic system according to embodiment 3 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Before describing the embodiments of the present invention in detail, the principles of the embodiments of the present invention are explained to facilitate an understanding of the following embodiments:
when data transmission is performed through a Transmission Control Protocol (TCP), various service scenarios exist, such as uploading while downloading a File Transfer Protocol (FTP) of a mobile phone, and bidirectional concurrence of the TCP. In practice, it is found that the downloading rate for the terminal depends on whether it feeds back the TCP ACK message in time. If the TCP ACK packet cannot be fed back in time, the rate of sending the TCP data packet by the opposite end is also limited, and finally the receiving throughput rate is reduced.
When a sending end and a receiving end perform data transmission, a data link layer protocol, such as RLC (radio link control) of LTE (long term evolution), can provide reliable transmission service through a data transmission module, where the data transmission modules of the sending end and the receiving end both include respective data receiving modules and data sending modules, and the sending end and the receiving end also include respective application processors.
The data sending module of the sending end is used for sending a TCP message to the receiving end, after the data receiving module of the receiving end receives the TCP message sent by the sending end, the data receiving module of the receiving end feeds back TCP ACK information to the sending end through the data sending module of the receiving end to inform the sending end that the sending end confirms that the TCP message is received, the data receiving module of the sending end receives the TCP ACK information fed back by the receiving end and submits the TCP ACK information to the application processor, the application processor controls the data quantity of the TCP message sent by the data sending module according to the data quantity confirmed by the TCP ACK information submitted by the data receiving module, if the TCP ACK information submitted by the data receiving module of the sending end is timely, namely the data quantity confirmed by the TCP ACK information submitted in a set time unit is increased, the application processor controls the data sending module to increase the size of a sending window so as to send more data, on the contrary, if the TCP ACK message submitted by the data receiving module of the sending end is not timely, that is, the data amount confirmed by the TCP ACK message submitted in the predetermined time unit is decreased, the application processor controls the data sending module to decrease the size of the sending window to decrease the data sent to the receiving end.
Generally, for a sending end, when too many TCP messages are received by a data receiving module, which causes the TCP messages stored by the data sending module to exceed the carrying capacity of transmission resources, there are two ways to alleviate the situation of current shortage of transmission resources. The first mode is that part of data is lost, and in this mode, network congestion may be caused by retransmission of lost data due to packet loss, and the sending rate of the sending end is reduced; the second way is that the data sending module and the application processor of the sending end simultaneously increase interfaces, and the information interaction through the increased interfaces feeds back the information exceeding the transmission resource bearing capacity to the application processor so as to reduce the sending window size of the TCP message of the sending end.
However, the throughput rates of the receiving end and the transmitting end can be obviously reduced and cannot be quickly recovered no matter in a mode of adjusting the TCP sending window through packet loss or through internal message interaction, so the embodiment of the invention provides a data transmission method, a system, an electronic device and a storage medium, which can maintain the average throughput rate transmitted by the transmitting end and the average throughput rate received by the receiving end at a higher level through a relatively simple mode under the condition of not increasing the number of message interaction times between the application processor and the data sending module of the transmitting end.
It should be understood that, in this embodiment, the TCP packet includes optional information and optional information, where the optional information includes other optional information besides TCP ACK information and TCP ACK information, where the optional information is indispensable information in the TCP packet and includes information such as a source port, a destination port, a data offset, a SYNC (synchronization information), a RST (reset information), and the optional information is optional information in the TCP packet and includes information such as TCP ACK information, data information, and an urgent pointer information.
It should be understood that the receiving end and the sending end in the embodiment of the present invention are only defined for convenience of description at opposite ends, where the sending end may also be used to receive data, and the receiving end may also be used to send data, that is, the receiving end may also serve as the sending end to send a TCP packet to an opposite end, and the sending end may also serve as the receiving end to receive a packet sent by the receiving end.
In this embodiment, the receiving end and the sending end are two terminals that send and receive data to each other, where a terminal may refer to User Equipment (UE), an access terminal, a subscriber unit, a subscriber station, a mobile station (mobile station, MS), a remote station, a remote terminal, a mobile device, a user terminal, a terminal device (terminal equipment), a wireless communication device, a user agent, or a user equipment in various forms. The terminal device may also be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a handheld device with a Wireless communication function, a computing device or other processing devices connected to a Wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a future 5G Network or a terminal device in a future evolved Public Land Mobile Network (PLMN), and the like, which is not limited in this embodiment. The technical solution of the present invention is illustrated by the following specific examples:
example 1
This embodiment provides a data transmission method, where the data transmission method is applied to a sending end, and as shown in fig. 1, the data transmission method includes:
step 101, monitoring a storage space occupied by a TCP message to be sent currently stored by a data sending module.
It should be understood that, in the process of monitoring the storage space, the data receiving module may also continuously receive the TCP packet sent to it by the opposite end. In other words, the TCP packets currently stored by the data receiving module include both the previously stored TCP packets and the newly received TCP packets.
It should be understood that, in the present embodiment, the step 101 performs real-time monitoring on the storage space, for example, the monitoring may be performed at intervals.
Step 102, judging whether the storage space is larger than or equal to a first storage threshold value: if yes, go to step 103, otherwise go to step 112.
It should be understood that the storage space here is a storage space occupied by the TCP packet to be sent currently stored by the data sending module in step 101.
The first storage threshold may be set according to actual requirements, for example, the first storage threshold may be set to eighty percent of the maximum storage capacity of the data sending module.
Step 103, informing the data receiving module to stop submitting the TCP message including the TCP ACK information to the application processor.
In this embodiment, the application processor may automatically adjust the size of the sending window when the TCP ACK message sent by the data receiving module is not received or the data volume confirmed by the TCP ACK message sent by the data receiving module is decreased, so that the throughput of the sending end may be maintained at a stable level without increasing the interaction interface and the interaction frequency between the application processor of the sending end and the data sending module, and correspondingly, the throughput of the receiving end may be maintained at a stable level, so that the average throughput of the sending end and the average throughput of the receiving end may be maintained at a higher level in the long term.
Step 104, before submitting the current TCP message to the application processor, detecting the type of the information in the current TCP message: when the optional information in the current TCP message includes the TCP ACK information and other optional information, step 105 is executed; when the optional information in the current TCP message only includes TCP ACK information, step 106 is executed; when the optional information in the current TCP message does not include the TCP ACK information, step 107 is performed.
And 105, stripping the TCP ACK information from the current TCP message, submitting the current TCP message after the TCP ACK information is stripped to an application processor as a TCP message to be submitted, and executing the step 108.
It should be understood that, in a general case, after receiving a TCP packet, a data receiving module at a receiving end stores the TCP packet in a default storage queue, where the default storage queue is used to store all received TCP packets, that is, there are undifferentiated TCP ACK information and other information in the default storage queue. In this embodiment, the data receiving module of the receiving end may further include a TCP ACK storage queue for storing the TCP ACK packet specially, wherein the step of organizing the stripped TCP ACK message into an independent current TCP ACK packet and storing the current TCP ACK packet in the TCP ACK storage queue may further be included after the TCP ACK message is stripped from the current TCP packet.
In general, when the rate of data provided by the application processor on the transmitting end exceeds the transmission capability of the data transmitting module, data may accumulate on the data transmitting module, and the storage space of the data transmitting module is exhausted. Thereafter, since there is no storage space to accommodate the newly arrived TCP data, the data transmission module has to discard part of the data and thus trigger TCP congestion control to reduce the transmission window size.
In the mode of storing TCP ACK information through the TCP ACK storage queue, the maximum length of each TCP packet is generally 1460 bytes, and the maximum length after adding a TCP header and an IP (internet protocol) header is generally 1500 bytes, while the maximum length of a single TCP ACK information generally does not exceed 80 bytes. Therefore, the storage space requirement of the data receiving module for storing the TCP ACK packet is far less than the storage space requirement of the data sending module for storing the normal TCP packet, on one hand, the data sending module can have enough storage space to receive the new TCP packet, and on the other hand, the data receiving module does not lose part of data or increase the interaction interface and interaction times of the application processor and the data sending module due to triggering TCP congestion control, thereby wasting system resources.
Step 106, stopping submitting the current TCP message to the application processor, and executing step 108.
Step 107, submitting the current TCP message as a TCP message to be submitted to the application processor, and executing step 108.
Wherein, step 107 may further include storing the current TCP packet as the current TCP ACK packet in the TCP ACK storage queue.
Step 108, determining whether the storage space is less than or equal to a second storage threshold, if so, executing step 109, and if not, executing step 111.
It should be understood that the storage space here is a storage space occupied by the TCP packet to be sent currently stored by the data sending module after the step 101-107, and the storage space does not exceed the storage capability thereof.
The second storage threshold may be set according to actual requirements, for example, the second storage threshold may be set to twenty percent of the maximum storage capacity of the data sending module.
Step 109, notifying the data receiving module to resume submitting the TCP ACK message to the application processor.
In this embodiment, after the data receiving module is notified to resume submitting the TCP ACK message to the application processor through step 109, the data receiving module may start to submit the TCP ACK message again, and it should be understood that the TCP ACK message that starts to be submitted again here refers to a TCP message that includes the TCP ACK message or an independent ACK message. After receiving the TCP ACK information, the application processor can automatically adjust the size of the sending window, so that the sending end can be helped to break away from the congestion state as soon as possible under the condition that the number of interaction interfaces and interaction times between the application processor and the data sending module of the sending end are not increased, the sending throughput rate of the sending end is improved, and correspondingly, the receiving throughput rate of the receiving end is also improved.
Step 110, the data receiving module submits the TCP ACK information in the TCP ACK storage queue to the application processor, then submits the TCP message in the default storage queue, and after the processing is finished and a preset time interval is set, step 101 is executed.
It should be understood that, in practical scenarios, step 108 is not limited to be performed after steps 105, 106 and 107, and may be performed at any point after step 101, for example, simultaneously with step 102, and the specific execution sequence and execution manner may be written in code according to practical requirements.
In this embodiment, the TCP ACK information in the TCP ACK storage queue is submitted first, so that the application processor can increase the size of the sending window according to the TCP ACK information that is increased rapidly, thereby rapidly improving the throughput of the sending end.
And step 111, taking the next TCP message as the current TCP message, and returning to step 104.
And 112, submitting the TCP message to the application processor according to the original processing mode, and executing the step 101 after a preset time interval.
The data receiving module may process, such as encode, the TCP packets after receiving the TCP packets, so as to confirm an order in which the TCP packets are submitted to the application processor.
In this embodiment, the sending end may continuously monitor the storage space occupied by the TCP message to be sent currently stored by the data sending module, when the application processor is going to send the TCP message to the data sending module, the storage space occupied by the TCP message that is monitored first is monitored, when the storage space is greater than or equal to a preset storage upper limit, that is, a first storage threshold, the data receiving module is notified to stop sending the TCP ACK message to the application processor, the application processor may automatically adjust the size of its sending window to reduce the TCP message sent to the receiving end when the application processor cannot receive the TCP ACK message or when the data amount confirmed by the received TCP ACK message is reduced, the data amount confirmed by the TCPACK message fed back to the sending end is also reduced when the receiving end receives a reduced TCP message, so that the number of interactions between the data sending module and the application processor may not be increased, the data volume of sending is automatically adjusted, so that the data can be prevented from being accumulated in the data sending module, and the storage space of the data sending module is further exhausted; when the storage space of the data sending module is less than or equal to the preset lower storage limit, that is, the second storage threshold, the data receiving module is notified to resume sending the TCP ACK message to the receiving end of the application processor, and the application processor, upon receiving the TCP ACK message sent by the sending end or receiving the increase of the data amount confirmed by the TCP ACK message sent by the sending end, automatically adjusts the size of the sending window of the application processor to increase the data amount of the TCP message sent to the receiving end, and correspondingly, the data amount of the TCP message received by the receiving end also increases, so that the throughput rates of the sending end and the receiving end can be maintained at a stable level, and in the long term, the average throughput rate of the sending end and the average throughput rate of the receiving end can be maintained at a higher level.
Example 2
This embodiment provides a data transmission system, where the data transmission system is applied to a sending end, and as shown in fig. 2, the data transmission system includes: the system comprises a data monitoring module 201, a storage space judging module 202, an information type detecting module 203 and a priority submitting module 204.
The data monitoring module 201 is configured to monitor a storage space occupied by a TCP packet to be sent currently stored by the data sending module. It should be understood that, in the process of monitoring the storage space, the data receiving module may also continuously receive the TCP packet sent to it by the opposite end. In other words, the TCP packets currently stored by the data receiving module include both the previously stored TCP packets and the newly received TCP packets.
It should be understood that in the embodiment, the data monitoring module 201 monitors the storage space in real time, for example, the data monitoring module 201 may monitor the storage space at intervals.
The storage space determining module 202 is configured to determine whether the storage space is greater than or equal to a first storage threshold: if so, the data receiving module is notified to stop submitting the TCP message including the TCP ACK information to the application processor, otherwise, the TCP message is submitted to the application processor according to the original sequence, and the data monitoring module 201 is called again after a preset time interval. The data receiving module may process, such as encode, the TCP packets after receiving the TCP packets, so as to confirm an order in which the TCP packets are submitted to the application processor.
In this embodiment, when the application processor does not receive the TCP ACK message sent by the data receiving module, or receives a decrease in the data amount confirmed by the TCP ACK message sent by the data receiving module, the storage space determining module notifies that the TCP packet including the TCP ACK message is to be stopped being submitted, and then the application processor automatically adjusts the size of the sending window of the application processor, so that the throughput rate of the sending end can be maintained at a stable level without increasing the number of interactions between the sent data sending module and the application processor, and the average throughput rate of the sending end and the average throughput rate of the receiving end can be maintained at a higher level in a long term.
The storage space determining module 202 is further configured to notify the data receiving module to stop submitting the TCP packet including the TCP ACK information to the application processor, and then invoke the information type detecting module 203, where the information type detecting module 203 is configured to detect the type of information in the current TCP packet before submitting the current TCP packet to the application processor:
when the optional information in the current TCP message comprises TCP ACK information and other optional information, stripping the TCP ACK information from the current TCP message, and submitting the current TCP message after the TCP ACK information is stripped to an application processor as a TCP message to be submitted;
when the optional information in the current TCP message only comprises TCP ACK information, stopping submitting the current TCP message to the application processor;
and when the optional information in the current TCP message does not comprise TCP ACK information, submitting the current TCP message to the application processor as a TCP message to be submitted.
It should be understood that, in a general case, after receiving a TCP packet, a data receiving module at a receiving end stores the TCP packet in a default storage queue, where the default storage queue is used to store all received TCP packets, that is, there are undifferentiated TCP ACK information and other information in the default storage queue. In this embodiment, the data receiving module of the receiving end may further include a TCP ACK storage queue for specially storing a TCP ACK packet, wherein the information type detecting module 203 is further configured to strip TCP ACK information from the current TCP packet, and submit the current TCP packet stripped of the TCP ACK information to the application processor as a to-be-submitted TCP packet, specifically, may copy the optional information in the current TCP packet, and organize the copied optional information and the stripped TCP ACK information into an independent current TCP ACK packet, and the information type detecting module 203 is further configured to store the current TCP packet into the TCP ACK storage queue as the current TCP ACK packet when the optional information in the current TCP packet only includes the TCP ACK information.
In general, when the rate of data provided by the application processor on the transmitting end exceeds the transmission capability of the data transmitting module, data may accumulate on the data transmitting module, and the storage space of the data transmitting module is exhausted. Thereafter, since there is no storage space to accommodate the newly arrived TCP data, the data transmission module has to discard part of the data and thus trigger TCP congestion control to reduce the transmission window size.
In the way of storing TCP ACK information through the TCP ACK storage queue, the information type detection module 203 generally stores 1460 bytes in maximum length of each TCP packet, and generally stores 1500 bytes in maximum length after adding a TCP header and an IP (internet protocol) header, whereas individual TCP ACK information generally does not exceed 80 bytes in maximum length. Therefore, the storage space requirement of the data receiving module for storing the TCP ACK packet is far less than the storage space requirement of the data sending module for storing the normal TCP packet, on one hand, the data sending module can have enough storage space to receive the new TCP packet, and on the other hand, the data receiving module does not lose part of data or increase the interaction interface and interaction times of the application processor and the data sending module due to triggering TCP congestion control, thereby wasting system resources.
In addition, the information type detecting module 203 is further configured to call the storage space judging module 202 after storing the current TCP ACK information in the TCP ACK storage queue, and the storage space judging module 202 is further configured to judge whether the storage space is less than or equal to a second storage threshold, and if yes, notify the data receiving module to resume submitting the TCP packet including the TCP ACK information to the application processor, where the second storage threshold is less than the first storage threshold.
In this embodiment, after the storage space determining module determines that the storage space is less than or equal to the second storage threshold, and notifies that the TCP packet including the TCP ACK information is recovered to be submitted, the data receiving module may start to submit the TCP ACK information again, and it should be understood that the TCP ACK information that starts to be submitted again here refers to the TCP packet including the TCP ACK information or an independent ACK packet. After receiving the TCP ACK information, the application processor can automatically adjust the size of the sending window, so that the sending end can be helped to break away from the congestion state as soon as possible under the condition that the number of interaction interfaces and interaction times between the application processor and the data sending module of the sending end are not increased, the sending throughput rate of the sending end is improved, and correspondingly, the receiving throughput rate of the receiving end is also improved.
In this embodiment, the storage space determining module 202 is further configured to notify the data receiving module to resume submitting the TCP ACK message to the application processor and then call the priority submitting module 204, where the priority submitting module 204 is configured to submit the TCP ACK message in the TCP ACK storage queue to the application processor first through the data receiving module, then submit the TCP message in the default storage queue, and call the data monitoring module 201 again after the processing is completed and a preset time interval elapses.
In this embodiment, the priority submission module submits the TCP ACK packet in the TCP ACK storage queue first, so that the application processor can increase the size of the sending window according to the TCP ACK packet that is rapidly increased, thereby increasing the throughput of the sending end.
In this embodiment, the data monitoring module may continuously monitor the storage space occupied by the TCP message to be sent currently stored by the data sending module, when the application processor is going to send the TCP message to the data sending module, the storage space judgment module first monitors the storage space occupied by the TCP message, when the storage space is greater than or equal to a preset storage upper limit, that is, a first storage threshold, the information type detection module notifies the data receiving module to stop sending the TCP ACK message to the application processor, the application processor may automatically adjust the size of its sending window to reduce the TCP message sent to the receiving end when the TCP ACK message is not received or the data amount confirmed by the received TCP ACK message is reduced, the data amount confirmed by the TCP ACK message fed back to the sending end by the receiving end is also reduced when the data amount of the TCP message received by the receiving end is reduced, therefore, the data volume sent by the sending end can be automatically adjusted without increasing the interaction times of the data sending module and the application processor, so that the data can be prevented from being accumulated in the data sending module, and the storage space of the data sending module is further exhausted; and when the storage space judgment module judges that the storage space of the data sending module is less than or equal to the preset lower storage limit, namely the second storage threshold, the information type detection module informs the data receiving module to recover sending the TCP ACK information to the application processor, and the application processor can automatically adjust the size of a sending window of the application processor under the condition that the TCP ACK information is received or the data volume confirmed by the received TCP ACK information is increased so as to increase the TCP messages sent to the receiving end, and correspondingly, the TCP messages received by the receiving end are increased, so that the throughput rate of the sending end can be maintained at a stable level, and the average throughput rate of the sending end and the average throughput rate of the receiving end can be maintained at a higher level in the long term.
Example 3
The embodiment of the present invention further provides an electronic device, which may be represented in a form of a computing device (for example, may be a server device), and includes a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor executes the computer program, so as to implement the data transmission method in embodiment 1 of the present invention.
Fig. 3 shows a schematic diagram of a hardware structure of the present embodiment, and as shown in fig. 3, the electronic device 9 specifically includes:
at least one processor 91, at least one memory 92, and a bus 93 for connecting the various system components (including the processor 91 and the memory 92), wherein:
the bus 93 includes a data bus, an address bus, and a control bus.
Memory 92 includes volatile memory, such as Random Access Memory (RAM) 921 and/or cache memory 922, and can further include Read Only Memory (ROM) 923.
Memory 92 also includes a program/utility 925 having a set (at least one) of program modules 924, such program modules 924 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 91 executes various functional applications and data processing, such as a data transmission method in embodiment 1 of the present invention, by executing the computer program stored in the memory 92.
The electronic device 9 may further communicate with one or more external devices 94 (e.g., a keyboard, a pointing device, etc.). Such communication may be through an input/output (I/O) interface 95. Also, the electronic device 9 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 96. The network adapter 96 communicates with the other modules of the electronic device 9 via the bus 93. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 9, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module, according to embodiments of the application. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 4
The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data transmission method in embodiment 1 of the present invention.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code for causing a terminal device to execute steps of implementing the data transmission method in embodiment 1 of the present invention when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (10)

1. A data transmission method is characterized in that the data transmission method is applied to a sending end, the sending end comprises a data receiving module, a data sending module and an application processor, the data sending module is used for sending a TCP message to a receiving end, the data receiving module is used for receiving the TCP message sent by the receiving end and submitting the TCP message to the application processor, the application processor is used for controlling the data volume of the TCP message sent by the data sending module according to the data volume confirmed by TCP ACK information in the TCP message, the TCP message comprises optional information and optional information, the optional information comprises TCP ACK information and other optional information except the TCP ACK information, and the data transmission method comprises the following steps:
monitoring the storage space occupied by the TCP message to be sent currently stored by the data sending module;
judging whether the storage space is larger than or equal to a first storage threshold value: if so, informing the data receiving module to stop submitting a TCP message including TCP ACK information to the application processor, and automatically adjusting the size of a sending window of a sending end by the application processor under the condition that the application processor cannot receive the TCP ACK information or the data volume confirmed by the received TCP ACK information is reduced so as to reduce the TCP message sent to the receiving end;
judging whether the storage space is smaller than or equal to a second storage threshold value, if so, informing the data receiving module to resume submitting TCP ACK information to the application processor, wherein the second storage threshold value is smaller than the first storage threshold value, and the application processor can automatically adjust the size of a sending window of the sending end under the condition that the TCP ACK information sent by the sending end is received or the data volume confirmed by the TCP ACK information sent by the sending end is received is increased, so that the data volume of the TCP message sent to the receiving end is increased.
2. The data transmission method according to claim 1, wherein the step of notifying the data receiving module to stop submitting the TCP packet including the TCP ACK message to the application processor further comprises:
detecting a type of information in a current TCP message before submitting the current TCP message to the application processor:
when the optional information in the current TCP message comprises TCP ACK information and other optional information, stripping the TCP ACK information from the current TCP message, and submitting the current TCP message after stripping the TCP ACK information to the application processor as a TCP message to be submitted;
when the optional information in the current TCP message only comprises TCP ACK information, stopping submitting the current TCP message to the application processor;
and/or the presence of a gas in the gas,
and when the optional information in the current TCP message does not comprise TCP ACK information, submitting the current TCP message to the application processor as a TCP message to be submitted.
3. The data transmission method according to claim 2, wherein the data receiving module includes a TCP ACK storage queue for storing TCP ACK messages, and in the step of detecting the type of information in the current TCP message before submitting the current TCP message to the application processor:
when the current TCP packet includes TCP ACK information and other optional information at the same time, the step of stripping the TCP ACK information from the current TCP packet further includes: generating an independent current TCP ACK message according to the TCP ACK message and the optional information, and storing the current TCP ACK message into the TCP ACK storage queue;
and/or the presence of a gas in the gas,
and when the optional information in the current TCP message only comprises TCP ACK information, taking the current TCP message as the current TCP ACK message, and storing the current TCP ACK message into the TCP ACK storage queue.
4. The data transmission method according to claim 3, wherein the step of notifying the data receiving module to resume submitting the TCP packet including the TCP ACK information to the application processor further comprises:
and submitting the TCP ACK message in the TCP ACK storage queue to the application processor.
5. A data transmission system is characterized in that the data transmission system is applied to a sending end, the sending end comprises a data receiving module, a data sending module and an application processor, the data sending module is used for sending a TCP message to a receiving end, the data receiving module is used for receiving the TCP message sent by the receiving end and submitting the TCP message to the application processor, the application processor is used for controlling the data volume of the TCP message sent by the data sending module according to the data volume confirmed by TCP ACK information in the TCP message, the TCP message comprises optional information and optional information, the optional information comprises TCP ACK information and other optional information except the TCP ACK information, and the data transmission system comprises: the data monitoring module and the storage space judging module;
the data monitoring module is used for monitoring the storage space occupied by the TCP message to be sent currently stored by the data sending module;
the storage space judging module is used for judging whether the storage space is larger than or equal to a first storage threshold value: if so, informing the data receiving module to stop submitting the TCP message including the TCP ACK information to the application processor, wherein the application processor is also used for automatically adjusting the size of a sending window of the sending end under the condition that the TCP ACK information cannot be received or the data volume confirmed by the received TCP ACK information is reduced so as to reduce the TCP message sent to the receiving end;
the storage space judging module is further configured to judge whether the storage space is smaller than or equal to a second storage threshold, and if so, notify the data receiving module to resume submitting the TCP ACK message to the application processor, where the second storage threshold is smaller than the first storage threshold, and the application processor is further configured to automatically adjust the size of the sending window of the sending terminal when receiving the TCP ACK message sent by the sending terminal or receiving the data volume confirmed by the TCP ACK message sent by the sending terminal is increased, so as to increase the data volume of the TCP packet sent to the receiving terminal.
6. The data transmission system of claim 5, wherein the data transmission system further comprises an information type detection module, and the storage space determination module is further configured to invoke the information type detection module after notifying the data reception module to stop submitting the TCP packet including the TCP ACK information to the application processor;
the information type detection module is used for detecting the type of the information in the current TCP message before submitting the current TCP message to the application processor:
when the optional information in the current TCP message comprises TCP ACK information and other optional information, stripping the TCP ACK information from the current TCP message, and submitting the current TCP message after stripping the TCP ACK information to the application processor as a TCP message to be submitted;
when the optional information in the current TCP message only comprises TCP ACK information, stopping submitting the current TCP message to the application processor;
and/or the presence of a gas in the gas,
and when the optional information in the current TCP message does not comprise TCP ACK information, submitting the current TCP message to the application processor as a TCP message to be submitted.
7. The data transmission system of claim 6, wherein the data receiving module comprises a TCP ACK store queue, the TCP ACK store queue configured to store TCP ACK packets, and the information type detecting module is further configured to: after the TCP ACK information is stripped from the current TCP message, generating an independent current TCP ACK message according to the TCP ACK information and the necessary information, and storing the current TCP ACK message into a TCP ACK storage queue;
and/or the presence of a gas in the gas,
and the information type detection module is also used for taking the current TCP message as the current TCP ACK message and storing the current TCP ACK message into the TCPACK storage queue when the optional information in the current TCP message only comprises TCP ACK information.
8. The data transmission system according to claim 7, wherein the data transmission system further comprises a priority submission module, and the storage space judgment module is further configured to invoke the priority submission module after notifying the data reception module to resume submitting the TCP packet including the TCP ACK information to the application processor;
the priority submission module is used for submitting the TCP ACK message in the TCP ACK storage queue to the application processor.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the data transmission method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the data transmission method according to any one of claims 1 to 4.
CN202010780416.5A 2020-08-06 2020-08-06 Data transmission method, system, electronic device and storage medium Active CN111654355B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010780416.5A CN111654355B (en) 2020-08-06 2020-08-06 Data transmission method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010780416.5A CN111654355B (en) 2020-08-06 2020-08-06 Data transmission method, system, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN111654355A CN111654355A (en) 2020-09-11
CN111654355B true CN111654355B (en) 2020-11-03

Family

ID=72350257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010780416.5A Active CN111654355B (en) 2020-08-06 2020-08-06 Data transmission method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN111654355B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667165B (en) * 2020-12-29 2023-11-17 湖南博匠信息科技有限公司 Data storage system and data storage method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954279A (en) * 2014-03-28 2015-09-30 华为技术有限公司 Transmission control method, device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404187A (en) * 2010-09-13 2012-04-04 华为技术有限公司 Congestion control method and system as well as network equipment
WO2016072836A1 (en) * 2014-11-06 2016-05-12 Universiti Putra Malaysia A method for tcp congestion in multi-hop wireless network
KR102333327B1 (en) * 2017-01-16 2021-12-02 삼성전자 주식회사 Method and apparatus for data processing in a wireless communication system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954279A (en) * 2014-03-28 2015-09-30 华为技术有限公司 Transmission control method, device and system

Also Published As

Publication number Publication date
CN111654355A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
US8031689B2 (en) Method and related apparatus for handling re-establishment of radio link control entity in a wireless communications system
EP2045950A2 (en) Method and apparatus for triggering a poll function in a wireless communications system
WO2022017529A1 (en) Data transmission method and system, electronic device, and storage medium
JP2006311543A (en) Method and device for polling transmission state in radio communication system
EP2369794A1 (en) Wireless network control device, wireless network control method, and wireless network control system
JP2008005021A (en) Retransmission control method and device
JP2007089177A (en) Method and apparatus for improving transmission rate of state report signal in radio communication system
KR20090055550A (en) Communications equipment
CN104093170A (en) TCP-based data transmission method and TCP agent apparatus
CN104798320A (en) Data transmission method and device
CN108667560B (en) Method and device for adjusting data sending rate of terminal
EP3709663A1 (en) Video transmission method, apparatus, and system, and computer readable storage medium
CN110072254B (en) Data transmission method and related equipment thereof
CN111711680A (en) File breakpoint continuous transmission method and device based on UDP (user Datagram protocol)
US11528345B2 (en) Data transmission method and system, and apparatus
CN111654355B (en) Data transmission method, system, electronic device and storage medium
CN110266446B (en) Method and device for adjusting out-of-order time length based on SACK mode
JP4166602B2 (en) Mobile device
US9246638B2 (en) Method and apparatus for polling transmission status in a wireless communications system
CN109905209B (en) Method and device for setting network disorder value
WO2022001737A1 (en) Data transmission method and apparatus, and computer storage medium
CN116963175A (en) Data transmission method, device and system
WO2021212438A1 (en) Data transmission method, apparatus and system, terminal device, and storage medium
WO2022052031A1 (en) Packet loss indication method and related device
CN112615760A (en) Data transmission method, device, base station and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant