CN107548105B - Data transmission confirmation method based on UDP (user Datagram protocol) and base station - Google Patents

Data transmission confirmation method based on UDP (user Datagram protocol) and base station Download PDF

Info

Publication number
CN107548105B
CN107548105B CN201710972514.7A CN201710972514A CN107548105B CN 107548105 B CN107548105 B CN 107548105B CN 201710972514 A CN201710972514 A CN 201710972514A CN 107548105 B CN107548105 B CN 107548105B
Authority
CN
China
Prior art keywords
data packet
base station
layer protocol
udp
transport layer
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
CN201710972514.7A
Other languages
Chinese (zh)
Other versions
CN107548105A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201710972514.7A priority Critical patent/CN107548105B/en
Publication of CN107548105A publication Critical patent/CN107548105A/en
Application granted granted Critical
Publication of CN107548105B publication Critical patent/CN107548105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention provides a UDP-based data transmission confirmation method and a UDP-based base station, relates to the field of data transmission, and can save uplink network resources. The method comprises the following steps: a base station receives a first data packet sent by a user terminal and analyzes the first data packet to obtain IP quintuple information; then, when determining that the transport layer protocol of the first data packet is UDP and the function is message confirmation according to the IP quintuple information content and the application layer content of the first data packet, caching the first data packet and setting a timer; when the timer counts the threshold value, the base station recombines the second data packet and the first data packet into a third data packet according to the destination IP address, wherein the destination IP address sent by the base station and all user terminals served by the base station group to which the base station belongs is the same as the destination IP address of the first data packet, the transmission layer protocol is UDP, and the data packet function is message confirmation.

Description

Data transmission confirmation method based on UDP (user Datagram protocol) and base station
Technical Field
The present invention relates to the field of data transmission, and in particular, to a data transmission confirmation method based on UDP and a base station.
Background
In network communication, since a User Datagram Protocol (UDP) has characteristics of small resource consumption and high processing speed when processing a data packet, the UDP is widely applied to audio, video and data transmission. The main role of UDP is to compress network data traffic into a data packet form, but UDP does not provide packet grouping and assembly and cannot sequence data packets, and a receiving end does not acknowledge received packets. Therefore, some data services select UDP as a transport layer protocol based on the characteristic of low transmission overhead, but in order to enable the server to determine whether data transmission succeeds or not and determine whether transmission continues or stops, a message confirmation mechanism needs to be additionally added to an application layer, so that the reliability of data transmission is guaranteed. For example, TFTP (simple File Transfer Protocol) is a simple File Transfer Protocol based on UDP Protocol, and the user terminal uses an ACK (Acknowledgement character) packet as a message Acknowledgement packet to inform the server that it has successfully received data.
Although reliable Transmission based on the UDP Protocol can be achieved by using a message acknowledgement packet mechanism such as ACK, the problem of increased overhead of Transmission network resources similar to the TCP (Transmission Control Protocol) Protocol is also caused. Particularly, the ACK packet message based on the UDP Protocol has a single function, is only used for confirming the packet reception, has a simple packet format and a very small packet length, for example, the ACK packet of the TFTP Protocol has only 4 bytes, but the data packet is sent to the base station by the user terminal through the wireless network, and then when the data packet is forwarded to the server by the base station, UDP encapsulation and IP (Internet Protocol, Protocol interconnection between networks) encapsulation need to be superimposed, the size of the data portion of the IP packet is even smaller than that of the packet header, and then the data packet needs to be further encapsulated into a physical layer data packet in the mobile network. Therefore, how to improve the sending efficiency of the ACK packet, thereby improving the utilization rate of the uplink transmission resource, becomes an urgent problem to be solved.
Disclosure of Invention
Embodiments of the present invention provide a data transmission confirmation method and a base station based on UDP, which can save uplink network resources.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, a UDP-based data transmission acknowledgement method is provided, including: the base station receives a first data packet sent by the user terminal and analyzes the first data packet to acquire IP five-tuple information of the first data packet; the base station judges whether the transport layer protocol of the first data packet is UDP or not according to the transport layer protocol field in the IP five-tuple information, and simultaneously judges the function of the first data packet according to the destination IP address and the destination port number in the IP five-tuple information and the application layer content of the first data packet; when the base station determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the base station caches the first data packet and sets a timer to start timing; before the timing time of the timer reaches the threshold value of the timer, the base station caches second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, and the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the function of the second data packet is message confirmation; when the timer reaches the timer threshold value, the base station recombines the first data packet and the second data packet into a third data packet and sends the third data packet to a corresponding server according to the destination IP address in the IP five-tuple information.
In the scheme, when a base station receives a first data packet sent by a user terminal, if a transport layer protocol of the first data packet is UDP and a function of the first data packet is message acknowledgement, the base station sets a timer, and during a period from zero timing of the timer to a timer threshold, the base station caches a second data packet, where the destination IP addresses sent by all user terminals served by a base station group to which the base station and the base station belong are the same as the first data packet and the transport layer protocol is UDP while the data packet function is message acknowledgement, and when the timer times the timer threshold, the base station reassembles the first data packet and all the second data packets into a large third data packet and sends the third data packet to a server corresponding to the destination IP address; therefore, the scheme provided by the embodiment of the invention enables the base station to recombine the message confirmation packets sent by the user terminal to the same destination server within a certain time period into a large data packet and then send the large data packet to the destination server, thereby reducing the transmission of excessive small message confirmation packets, saving the header resources of the encapsulation packets of the message confirmation packets in the transmission process and further saving the transmission overhead of uplink wireless network resources.
Specifically, the base station determining whether the transport layer protocol of the first packet is the UDP according to the transport layer protocol field in the IP quintuple information includes: the base station acquires the value of a transport layer protocol field according to the transport layer protocol field in the IP quintuple information; and if the value of the transport layer protocol is the first preset value, the transport layer protocol of the first data packet is UDP.
Specifically, the function of the base station determining the first data packet according to the destination IP address and the destination port number in the IP quintuple information and the application layer content of the first data packet includes: judging the type of an application layer protocol of the first data packet according to a destination IP address and a destination port number in the IP five-tuple information; when the application layer protocol type of the first data packet is determined to be the type of the message transmission confirmation packet, judging the function of the first data packet according to the values of a first byte and a second byte of the application layer part of the first data packet; and if the values of the first byte and the second byte of the application layer part of the first data packet are the second preset value, determining that the function of the first data packet is message confirmation.
Specifically, the size of the third data packet is less than or equal to a third preset value.
Optionally, the method further includes: when the timing time of the timer reaches the threshold value of the timer, the base station controls the timer to reset, and starts timing when the next data packet which is confirmed by the UDP transmission layer protocol and has the function of the data packet as a message is received.
In a second aspect, a base station is provided, including: the device comprises a receiving module, an analysis module, a cache module and a sending module; the receiving module is used for receiving a first data packet sent by a user terminal; the analysis module is used for analyzing the first data packet received by the receiving module to acquire IP five-tuple information of the first data packet, judging whether a transport layer protocol of the first data packet is UDP according to a transport layer protocol field in the IP five-tuple information, and judging the function of the first data packet according to a target IP address and a target port number in the IP five-tuple information and the application layer content of the first data packet; when the analysis module determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the cache module caches the first data packet and sets a timer to start timing; before the timing time of the timer reaches the threshold value of the timer, the cache module is further used for caching second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, and the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the function of the second data packet is message confirmation; and when the timing time of the timer reaches the threshold value of the timer, the cache module is used for recombining the first data packet and the second data packet into a third data packet and sending the third data packet to the corresponding server by the sending module according to the destination IP address in the IP five-tuple information.
Optionally, the parsing module is specifically configured to: acquiring a value of a transport layer protocol field according to the transport layer protocol field in the IP five-tuple information; and if the value of the transport layer protocol is the first preset value, determining that the transport layer protocol of the first data packet is UDP.
Optionally, the parsing module is specifically configured to: judging the type of an application layer protocol of the first data packet according to a destination IP address and a destination port number in the IP five-tuple information; when the application layer protocol type of the first data packet is determined to be the type of the message transmission confirmation packet, judging the function of the first data packet according to the values of a first byte and a second byte of the application layer part of the first data packet; and if the values of the first byte and the second byte of the application layer part of the first data packet are the second preset value, determining that the function of the first data packet is message confirmation.
Preferably, the capacity of the third data packet is less than or equal to a third preset value.
Optionally, when the timer reaches the timer threshold, the buffer module is configured to control the timer to reset, and start timing when the next data packet is buffered when the transport layer protocol is UDP and the function of the data packet is message acknowledgement.
The data transmission confirmation method and the base station based on the UDP provided by the embodiment of the invention are characterized in that the method comprises the following steps: the base station receives a first data packet sent by the user terminal and analyzes the first data packet to acquire internet protocol IP five-tuple information of the first data packet; the base station judges whether the transport layer protocol of the data packet is a User Datagram Protocol (UDP) or not according to the transport layer protocol field in the IP quintuple information, and simultaneously judges the function of the data packet according to a target IP address and a target port number in the IP quintuple information and the application layer content of the first data packet; when the base station determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the base station caches the first data packet and sets a timer to start timing; before the timing time of the timer reaches the threshold value of the timer, the base station caches second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, and the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the second data packet function is message acknowledgement; when the timer reaches the timer threshold value, the base station recombines the first data packet and the second data packet into a third data packet and sends the third data packet to a corresponding server according to the destination IP address in the IP five-tuple information. Specifically, in the scheme, when a base station receives a first data packet sent by a user terminal, if a transport layer protocol of the first data packet is UDP and a function of the first data packet is message acknowledgement, the base station caches the first data packet and sets a timer, during a period from zero timing to a timer threshold value, the base station caches a second data packet, which is sent by all user terminals served by a base station group to which the base station and the base station belong, and has a transport layer protocol of UDP and a data packet function of message acknowledgement, and when the timer counts the timer threshold value, the base station reassembles the first data packet and all the second data packets into a large third data packet and sends the third data packet to a server corresponding to a destination IP address; therefore, the scheme provided by the embodiment of the invention enables the base station to recombine the message confirmation packets sent by the user terminal to the same destination server within a certain time period into a large data packet and then send the large data packet to the destination server, thereby reducing the transmission of excessive small message confirmation packets, saving the header resources of the encapsulation packets of the message confirmation packets in the transmission process and further saving the transmission overhead of uplink wireless network resources.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a UDP-based data transmission confirmation method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a UDP-based data transmission confirmation method according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of a base station according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
It should be noted that, in the embodiments of the present invention, "of", "corresponding" and "corresponding" may be sometimes used in combination, and it should be noted that, when the difference is not emphasized, the intended meaning is consistent.
For the convenience of clearly describing the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", and the like are used for distinguishing the same items or similar items with basically the same functions and actions, and those skilled in the art can understand that the words "first", "second", and the like are not limited in number or execution order.
In the prior art, a message acknowledgement packet for acknowledging the successful transmission of a data packet is simple in format and extremely small in packet length in the process of data transmission based on UDP sent by a user terminal to a base station, so that the size of various encapsulated data required to be added in the wireless network transmission from the user terminal to a server through the base station is even larger than the size of data actually required to be transmitted by the message acknowledgement packet, which is a waste for uplink wireless resources to a certain extent.
In view of the above problem, referring to fig. 1, an embodiment of the present invention provides a data transmission confirmation method based on UDP, where the method includes:
101. the base station receives a first data packet sent by the user terminal and analyzes the first data packet to acquire IP five-tuple information of the first data packet.
Specifically, parsing the first packet as described herein separates the encapsulation of the first packet from the original data, and decapsulates each item of information included in the encapsulation of the first packet, where the IP quintuple information obtained by parsing includes: a destination IP address, a source IP address, a destination port number, a source port number, and a transport layer protocol field.
102. And the base station judges whether the transport layer protocol of the first data packet is UDP or not according to the transport layer protocol field in the IP five-tuple information, and simultaneously judges the function of the first data packet according to the destination IP address and the destination port number in the IP five-tuple information and the application layer content of the first data packet.
Specifically, when the values of the transport layer protocol fields are different, the transport layer protocols are also different, and in the prior art, each transport layer protocol corresponds to one value; the step 102, the step of judging, by the base station according to the transport layer protocol field in the IP quintuple information, whether the transport layer protocol of the first packet is the UDP, may specifically include: the base station acquires the value of a transport layer protocol field according to the transport layer protocol field in the IP quintuple information; if the value of the transport layer protocol is a first preset value, the transport layer protocol of the data packet is UDP; in the prior art, the value of the transport layer protocol field for the UDP is 17, that is, the first preset value in the embodiment of the present invention is 17.
In addition, since the function of the packet is related to its application layer protocol and its application layer content, the base station determines the function of the first packet according to the destination IP address and the destination port number in the IP quintuple information and the application layer content of the first packet in step 102, which needs to determine what the application layer protocol of the first packet is according to the destination IP address and the destination port number in the IP quintuple information, and then determines the function of the first packet according to the application layer protocol and the content of the first packet.
103. When the base station determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the base station caches the first data packet and sets a timer to start timing.
Specifically, the application layer protocol of the first packet with the function of message acknowledgement should be an application layer protocol that needs to transmit a message acknowledgement packet, and such a protocol is generally a UDP-based application layer protocol designed to ensure the reliability of packet transmission, such as TFTP; illustratively, a destination port number corresponding to TFTP is generally 69, and when a data packet sent by the user terminal to the server uses TFTP as an application layer protocol, if a first byte and a second byte of an application layer part in the data packet are a second preset value, the data packet may be used as a message acknowledgement packet; of course, in the prior art, if the application layer protocol of the data packet is a type that requires transmission of a message acknowledgement packet other than TFTP, it is not necessarily determined whether the data packet is a message acknowledgement packet according to the values of the first byte and the second byte of the application layer part of the data packet, and the specific determination scheme is determined according to the specific application layer protocol for the design condition of the identifier of the application layer part of the data packet when the data packet is a message acknowledgement packet.
104. Before the timing time of the timer reaches the threshold value of the timer, the base station caches second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs; the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second packet is UDP and the function of the second packet is message acknowledgement.
Specifically, the size of the timer threshold is related to the sensitivity of the user terminal to the data service and the data service concentration, the higher the sensitivity of the user terminal to the data service, the shorter the timer threshold is, and the higher the service concentration, the smaller the timer threshold is; the second packet here refers to a packet that is the same as the destination server to which the first packet is to be sent and is also a message acknowledgement packet; the base station group refers to a group of base stations with data intercommunication, and the base stations in the base station group send the cached second data packet to the same base station cache when the timer times to a threshold value of the timer.
105. When the timer reaches the timer threshold value, the base station recombines the first data packet and the second data packet into a third data packet and sends the third data packet to a corresponding server according to the destination IP address in the IP five-tuple information.
Specifically, the size of the third data packet is less than or equal to a third preset value; in the prior art, a data packet is transmitted in a mobile network, and the size of the data packet is limited, and the total length of the data packet does not exceed 65535 bytes, namely the third preset value is 65535 bytes.
In the scheme, when a base station receives a first data packet sent by a user terminal, if a transport layer protocol of the first data packet is UDP and a function of the first data packet is message acknowledgement, the base station sets a timer, and during a period from zero timing of the timer to a timer threshold, the base station caches a second data packet, where the destination IP addresses sent by all user terminals served by a base station group to which the base station and the base station belong are the same as the first data packet and the transport layer protocol is UDP while the data packet function is message acknowledgement, and when the timer times the timer threshold, the base station reassembles the first data packet and all the second data packets into a large third data packet and sends the third data packet to a server corresponding to the destination IP address; therefore, the scheme provided by the embodiment of the invention enables the base station to recombine the message confirmation packets sent by the user terminal to the same destination server within a certain time period into a large data packet and then send the large data packet to the destination server, thereby reducing the transmission of excessive small message confirmation packets, saving the header resources of the encapsulation packets of the message confirmation packets in the transmission process and further saving the transmission overhead of uplink wireless network resources.
Referring to fig. 2, another embodiment of the present invention further provides a UDP-based data transmission confirmation method as a further supplementary description of the UDP-based data transmission confirmation method provided in the foregoing embodiment, where the method includes:
201. the base station receives a first data packet sent by the user terminal and analyzes the first data packet to acquire IP five-tuple information of the first data packet.
2021a, the base station obtains the value of the transport layer protocol field according to the transport layer protocol field in the IP quintuple information.
2021b, if the value of the transport layer protocol is the first preset value, the transport layer protocol of the first data packet is UDP.
2022a, the base station determines the type of the application layer protocol of the first data packet according to the destination IP address and the destination port number in the IP quintuple information.
2022b, when determining that the application layer protocol type of the first data packet is the type of the message acknowledgement packet required to be transmitted, determining the function of the first data packet according to the values of the first byte and the second byte of the application layer part of the first data packet.
2022c, if the values of the first byte and the second byte of the application layer part of the first data packet are the second preset value, determining that the function of the first data packet is message confirmation.
Specifically, in the prior art, the second preset value is 4.
The schemes of 2022b and 2022c for determining the function of the first packet according to the values of the first byte and the second byte in the application layer portion of the first packet only correspond to the case where the application layer protocol of the first packet is TFTP.
203. When the base station determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the base station caches the first data packet and sets a timer to start timing.
204. Before the timing time of the timer reaches the threshold value of the timer, the base station caches second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, and the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second packet is UDP and the function of the second packet is message acknowledgement.
205. When the timer reaches the timer threshold value, the base station recombines the first data packet and the second data packet into a third data packet and sends the third data packet to a corresponding server according to the destination IP address in the IP five-tuple information.
206. When the timing time of the timer reaches the threshold value of the timer, the base station controls the timer to reset, and starts timing when the next data packet which is confirmed by the UDP transmission layer protocol and has the function of the data packet as a message is received.
Specifically, in order to ensure the continuity of the message acknowledgement packet sent by the base station to the server, after the timing operation of the sending process of the timer is completed, the timer restarts the timing operation when the base station needs to send the message acknowledgement packet of the same destination server next time.
In summary, the UDP-based data transmission acknowledgement method and the base station provided in the embodiments of the present invention include: the base station receives a first data packet sent by the user terminal and analyzes the first data packet to acquire internet protocol IP five-tuple information of the first data packet; the base station judges whether the transport layer protocol of the data packet is a User Datagram Protocol (UDP) or not according to the transport layer protocol field in the IP quintuple information, and simultaneously judges the function of the data packet according to a target IP address and a target port number in the IP quintuple information and the application layer content of the first data packet; when the base station determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the base station caches the first data packet and sets a timer to start timing; before the timing time of the timer reaches the threshold value of the timer, the base station caches second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, and the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the function of the second data packet is message confirmation; when the timer reaches the timer threshold value, the base station recombines the first data packet and the second data packet into a third data packet and sends the third data packet to a corresponding server according to the destination IP address in the IP five-tuple information. Specifically, in the scheme, when a base station receives a first data packet sent by a user terminal, if a transport layer protocol of the first data packet is UDP and the function of the first data packet is message acknowledgement, the base station sets a timer, and in a period from zero timing of the timer to a timer threshold, the base station caches a second data packet in which destination IP addresses sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs are the same as the first data packet and the transport layer protocol is UDP and the function of the data packet is message acknowledgement, and when the timer times the timer threshold, the base station reassembles the first data packet and all the second data packets into a large third data packet and sends the third data packet to a server corresponding to the destination IP address; therefore, the scheme provided by the embodiment of the invention enables the base station to recombine the message confirmation packets sent by the user terminal to the same destination server within a certain time period into a large data packet and then send the large data packet to the destination server, thereby reducing the transmission of excessive small message confirmation packets, saving the header resources of the encapsulation packets of the message confirmation packets in the transmission process and further saving the transmission overhead of uplink wireless network resources.
Referring to fig. 3, in order to better implement the UDP-based data transmission acknowledgement method provided in the foregoing embodiment, an embodiment of the present invention further provides a base station 02, where the base station 02 includes: a receiving module 31, a parsing module 32, a buffering module 33 and a sending module 34;
the receiving module 31 is configured to receive a first data packet sent by the user terminal 03;
the analyzing module 32 is configured to analyze the first packet received by the receiving module 31 to obtain IP quintuple information of the first packet, determine whether a transport layer protocol of the first packet is UDP according to a transport layer protocol field in the IP quintuple information, and determine a function of the first packet according to a destination IP address and a destination port number in the IP quintuple information and an application layer content of the first packet;
when the parsing module 32 determines that the transport layer protocol of the first packet is UDP and the function of the first packet is message acknowledgement, the buffering module 33 buffers the first packet and sets a timer to start timing; before the timer reaches the timer threshold, the cache module 33 is further configured to cache second data packets sent by all the user terminals 03 served by the base station 02 and all the user terminals 03 served by the base station group to which the base station 02 belongs, where a destination IP address of the second data packet is the same as a destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the function of the second data packet is message confirmation;
when the timer reaches the timer threshold, the cache module 33 is configured to reassemble the first data packet and the second data packet into a third data packet, and the sending module 34 sends the third data packet to the corresponding server 01 according to the destination IP address in the IP quintuple information.
It should be noted that fig. 3 does not illustrate a base station group, and actually, the structure of each base station in the base station group is the same as that of the base station shown in fig. 3, and after determining that the second data packet, which is a message acknowledgement packet of the user terminal, is received by other base stations in the base station to which the base station group shown in fig. 3 belongs, the second data packet is sent to the base station shown in fig. 3 within a timer threshold, and in addition, all base stations in one base station group are timed by one timer.
Specifically, the size of the third data packet is less than or equal to a third preset value; in the prior art, a data packet is transmitted in a mobile network, and the size of the data packet is limited, and the total length of the data packet does not exceed 65535 bytes, namely the third preset value is 65535 bytes.
Optionally, the parsing module is specifically configured to: acquiring a value of a transport layer protocol field according to the transport layer protocol field in the IP five-tuple information; and if the value of the transport layer protocol is the first preset value, determining that the transport layer protocol of the first data packet is UDP.
Optionally, the parsing module is specifically configured to: judging the type of an application layer protocol of the first data packet according to a destination IP address and a destination port number in the IP five-tuple information; when the application layer protocol type of the first data packet is determined to be the type of the message transmission confirmation packet, judging the function of the first data packet according to the values of a first byte and a second byte of the application layer part of the first data packet; and if the values of the first byte and the second byte of the application layer part of the first data packet are the second preset value, determining that the function of the first data packet is message confirmation.
It should be noted that, only when the application layer protocol of the first packet is TFTP, the parsing module may determine the function of the first packet according to the values of the first byte and the second byte of the application layer portion of the first packet.
Optionally, when the timer reaches the timer threshold, the buffer module is configured to control the timer to reset, and start timing when the next data packet is buffered when the transport layer protocol is UDP and the function of the data packet is message acknowledgement.
In the base station provided in the embodiment of the present invention, the base station includes: the device comprises a receiving module, an analysis module, a cache module and a sending module; the receiving module is used for receiving a first data packet sent by a user terminal; the analysis module is used for analyzing the first data packet received by the receiving module to acquire IP five-tuple information of the first data packet, judging whether a transport layer protocol of the first data packet is UDP according to a transport layer protocol field in the IP five-tuple information, and judging the function of the first data packet according to a target IP address and a target port number in the IP five-tuple information and the application layer content of the first data packet; when the analysis module determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the cache module caches the first data packet and sets a timer to start timing; before the timing time of the timer reaches the threshold value of the timer, the cache module is further used for caching second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, and the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the function of the second data packet is message confirmation; and when the timing time of the timer reaches the threshold value of the timer, the cache module is used for recombining the first data packet and the second data packet into a third data packet and sending the third data packet to the corresponding server by the sending module according to the destination IP address in the IP five-tuple information. Therefore, when the base station transmits a data packet received by the receiving module from the user terminal, when the parsing module determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message acknowledgement, the cache module caches the first data packet and sets a timer, during a period from zero timing to a timer threshold, the cache module caches a second data packet in which the destination IP addresses sent by all user terminals served by a base station group to which the base station and the base station belong are the same as the first data packet and the transport layer protocol is UDP and the function of the data packet is message acknowledgement, and when the timer counts the timer threshold, the cache module reassembles the first data packet and all the second data packets into a large third data packet and sends the third data packet to a server corresponding to the destination IP address through the sending module; therefore, the scheme provided by the embodiment of the invention enables the base station to recombine the message confirmation packets sent by the user terminal to the same destination server within a certain time period into a large data packet and then send the large data packet to the destination server, thereby reducing the transmission of excessive small message confirmation packets, saving the header resources of the encapsulation packets of the message confirmation packets in the transmission process and further saving the transmission overhead of uplink wireless network resources.
The embodiment of the present invention further provides a computer program, where the computer program may be directly loaded into a memory and contains a software code, and the computer program is loaded and executed by a computer, so as to implement the UDP-based data transmission validation method.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Illustratively, the user terminal may specifically be: mobile phones, navigators, Personal Computers (PCs), netbooks, Personal Digital Assistants (PDAs), servers, and the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A data transmission confirmation method based on UDP is characterized by comprising the following steps:
a base station receives a first data packet sent by a user terminal and analyzes the first data packet to acquire Internet Protocol (IP) quintuple information of the first data packet;
the base station judges whether the transport layer protocol of the first data packet is a User Datagram Protocol (UDP) or not according to the transport layer protocol field in the IP quintuple information, and simultaneously judges the function of the first data packet according to a target IP address and a target port number in the IP quintuple information and the application layer content of the first data packet;
when the base station determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the base station caches the first data packet and sets a timer to start timing;
before the timing time of the timer reaches a timer threshold value, the base station caches second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, and the destination IP address of the second data packet is the same as the destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the function of the second data packet is message acknowledgement;
and when the timing time of the timer reaches the threshold value of the timer, the base station recombines the first data packet and the second data packet into a third data packet and sends the third data packet to a corresponding server according to a destination IP address in the IP five-tuple information.
2. The method of claim 1, wherein the base station determining whether the transport layer protocol of the first packet is UDP according to a transport layer protocol field in the IP quintuple information comprises:
the base station acquires the value of the transport layer protocol field according to the transport layer protocol field in the IP quintuple information;
and if the value of the transport layer protocol is a first preset value, the transport layer protocol of the first data packet is UDP.
3. The method of claim 1, wherein the base station determining the function of the first packet according to a destination IP address and a destination port number in the IP quintuple information and an application layer content of the first packet comprises:
judging the type of an application layer protocol of the first data packet according to a destination IP address and a destination port number in the IP five-tuple information;
when the application layer protocol type of the first data packet is determined to be the type of a message acknowledgement packet needing to be transmitted, judging the function of the first data packet according to the values of a first byte and a second byte of the application layer part of the first data packet;
and if the values of the first byte and the second byte of the application layer part of the first data packet are the second preset values, determining that the function of the first data packet is message confirmation.
4. The method of claim 1, wherein the capacity of the third data packet is less than or equal to a third predetermined value.
5. The method of claim 1, further comprising: and when the timing time of the timer reaches the threshold value of the timer, the base station controls the timer to reset, and starts timing when a data packet with a UDP transmission layer protocol and a message confirmation function is received next time.
6. A base station, comprising: the device comprises a receiving module, an analysis module, a cache module and a sending module;
the receiving module is used for receiving a first data packet sent by a user terminal;
the analysis module is used for analyzing the first data packet received by the receiving module to acquire IP five-tuple information of the first data packet, judging whether a transport layer protocol of the first data packet is UDP according to a transport layer protocol field in the IP five-tuple information, and judging the function of the first data packet according to a destination IP address and a destination port number in the IP five-tuple information and an application layer content of the first data packet;
when the analysis module determines that the transport layer protocol of the first data packet is UDP and the function of the first data packet is message confirmation, the cache module caches the first data packet and sets a timer to start timing;
before the timer reaches a timer threshold value, the cache module is further configured to cache second data packets sent by all user terminals served by the base station and all user terminals served by a base station group to which the base station belongs, where a destination IP address of the second data packet is the same as a destination IP address in the IP quintuple information; the transport layer protocol of the second data packet is UDP and the function of the second data packet is message acknowledgement;
and when the time counted by the timer reaches the timer threshold value, the cache module is used for recombining the first data packet and the second data packet into a third data packet and sending the third data packet to a corresponding server by the sending module according to a destination IP address in the IP five-tuple information.
7. The base station of claim 6, wherein the parsing module is specifically configured to:
acquiring the value of the transport layer protocol field according to the transport layer protocol field in the IP five-tuple information;
and if the value of the transport layer protocol is a first preset value, determining that the transport layer protocol of the first data packet is UDP.
8. The base station of claim 6, wherein the parsing module is specifically configured to:
judging the type of an application layer protocol of the first data packet according to a destination IP address and a destination port number in the IP five-tuple information;
when the application layer protocol type of the first data packet is determined to be the type of a message acknowledgement packet needing to be transmitted, judging the function of the first data packet according to the values of a first byte and a second byte of the application layer part of the first data packet;
and if the values of the first byte and the second byte of the application layer part of the first data packet are the second preset values, determining that the function of the first data packet is message confirmation.
9. The base station of claim 6, wherein the capacity of the third data packet is less than or equal to a third predetermined value.
10. The base station of claim 6, wherein when the timer reaches the timer threshold, the buffering module is configured to control the timer to reset, and start timing when buffering a packet when the transport layer protocol is UDP and the packet functions as a message acknowledgement next time.
CN201710972514.7A 2017-10-18 2017-10-18 Data transmission confirmation method based on UDP (user Datagram protocol) and base station Active CN107548105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710972514.7A CN107548105B (en) 2017-10-18 2017-10-18 Data transmission confirmation method based on UDP (user Datagram protocol) and base station

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710972514.7A CN107548105B (en) 2017-10-18 2017-10-18 Data transmission confirmation method based on UDP (user Datagram protocol) and base station

Publications (2)

Publication Number Publication Date
CN107548105A CN107548105A (en) 2018-01-05
CN107548105B true CN107548105B (en) 2021-04-30

Family

ID=60967326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710972514.7A Active CN107548105B (en) 2017-10-18 2017-10-18 Data transmission confirmation method based on UDP (user Datagram protocol) and base station

Country Status (1)

Country Link
CN (1) CN107548105B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900501B (en) * 2018-06-27 2021-06-15 安徽省航嘉智源科技有限公司 Protocol content reading method, system, storage medium and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012051963A1 (en) * 2010-10-21 2012-04-26 意法·爱立信半导体(北京)有限公司 Method and device for data transmission
CN103986647A (en) * 2014-05-21 2014-08-13 大唐移动通信设备有限公司 Message transmission method and device
CN106209325A (en) * 2015-04-30 2016-12-07 中兴通讯股份有限公司 A kind of TCP ACK message processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105262746A (en) * 2015-10-12 2016-01-20 国家电网公司 Method for guaranteeing reliable data transmission on the basis of UDP protocol

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012051963A1 (en) * 2010-10-21 2012-04-26 意法·爱立信半导体(北京)有限公司 Method and device for data transmission
CN103986647A (en) * 2014-05-21 2014-08-13 大唐移动通信设备有限公司 Message transmission method and device
CN106209325A (en) * 2015-04-30 2016-12-07 中兴通讯股份有限公司 A kind of TCP ACK message processing method and device

Also Published As

Publication number Publication date
CN107548105A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
US11153041B2 (en) Packet transmission method and user equipment
CN113411313B (en) Data transmission method, device and system
CN109327288B (en) Data transmission acceleration method, device and system
US8301799B2 (en) Method and apparatus for managing transmission of TCP data segments
JP2014524092A (en) System and method for reliable virtual bidirectional data stream communication with single socket point-to-multipoint performance
CN112436994B (en) Data transmission method and electronic equipment
US10750405B2 (en) Data packet sending method, data packet receiving method, data packet sending device and data packet receiving device
CN107567107B (en) Data transmission method and device
WO2012129922A1 (en) Packet handling method, forwarding device and system
EP3490293B1 (en) Data receiving method, data sending method, receiving device and system
US10136375B2 (en) Method for service data management, apparatus, and system
WO2020187186A1 (en) Data processing method, device and apparatus
CN107548105B (en) Data transmission confirmation method based on UDP (user Datagram protocol) and base station
CN107733903B (en) Data transmission confirmation method based on UDP (user Datagram protocol) and base station
CN108540273B (en) Method and device for retransmitting data packet
CN107431965B (en) Method and device for realizing Transmission Control Protocol (TCP) transmission
CN111314961A (en) TCP transmission method, device and system
CN108429700B (en) Method and device for sending message
US20160149855A1 (en) Service processing method, system, and relevant device
CN102469011B (en) Data transmission method and device
CN113424578A (en) Transmission control protocol acceleration method and device
CN115118392A (en) D-SACK determination method, processor and communication system
Zhang et al. The Design of File Transfer Protocol Based on R2UDP in Digital Radio Narrowband System

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