Data sending method, device and equipment based on fragment packaging, and storage medium
By determining the maximum transmission unit size and link packet loss rate of the data transmission link, dynamically selecting the network layer or application layer sharding packet grouping method, the problem of low data transmission efficiency in the prior art is solved, and more efficient data is achieved transmission.
Patent Information
- Application Number
- CN202411085656.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-06
AI Technical Summary
In real-time audio and video communication, the existing set-based shard packet grouping method results in low data transmission efficiency, and it is impossible to dynamically adjust the shard packet grouping method according to the current network situation.
By determining the maximum transmission unit size and link packet loss rate of the data transmission link, dynamically decide whether to adopt network layer or application layer shard packets, select the target shard packet method according to the transmission efficiency of the two methods to improve data Transmission efficiency.
Accurately determine the shard packet grouping method with higher transmission efficiency based on the current network conditions, improve data transmission efficiency, reduce data processing volume, and improve the determination efficiency of shard packet grouping method.
Smart Images

Figure CN119094468A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data transmission, and in particular to a data transmission method, apparatus, device and storage medium based on fragmentation and packaging. Background Art
[0002] In real-time audio and video communications, information is usually transmitted in data packets, and how large a data packet should be transmitted at a time becomes one of the core issues for efficient data transmission. If the data packet size is set too small, the device needs to process more data packets when transmitting the same amount of data, resulting in reduced data transmission efficiency. If the packet size is set too large, there is more valid data in a data packet, and the transmission efficiency is higher, but the cost of retransmitting the lost data packet is also greater, and the entire data packet needs to be retransmitted, which in turn reduces data transmission efficiency.
[0003] In current data transmission schemes, the data to be sent is usually fragmented and packaged, and the data is transmitted in the form of data fragments to improve data transmission efficiency. The fragmentation and packaging scheme usually includes two types: fragmentation and packaging at the network layer (IP layer) and fragmentation and packaging at the application layer. When fragmentation and packaging are performed at the network layer, the application layer does not need to consider the maximum transmission unit (MTU) size in the transmission link, but directly hands the data packet to the network layer for fragmentation and packaging. When fragmentation and packaging are performed at the application layer, the application layer will fragment and package the data packets that exceed the maximum transmission unit size and then send them without fragmentation and packaging at the network layer. However, at present, data transmission is based on the set fragmentation and packaging method in the entire real-time audio and video communication process. The fragmentation and packaging method for sending data is relatively fixed, and the data transmission efficiency is low. Summary of the invention
[0004] The embodiments of the present application provide a data transmission method, apparatus, device and storage medium based on fragmentation and packaging to solve the technical problem of low data transmission efficiency in the related art when data is transmitted based on a set fragmentation and packaging method, and can effectively improve the data transmission efficiency.
[0005] In a first aspect, an embodiment of the present application provides a data transmission method based on fragmentation packaging, including:
[0006] Determine the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization;
[0007] When the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is a preset value, determining the target fragmentation packetization mode to be network layer fragmentation packetization;
[0008] When the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, determine a first transmission efficiency for performing network layer fragmentation and packetization on the data to be transmitted, and a second transmission efficiency for performing application layer fragmentation and packetization on the data to be transmitted, and determine a target fragmentation and packetization mode from the network layer fragmentation and packetization and the application layer fragmentation and packetization according to the first transmission efficiency and the second transmission efficiency;
[0009] The data segments to be transmitted are packaged into multiple data segments based on the target segment packaging method and sent.
[0010] In a second aspect, an embodiment of the present application provides a data sending device based on fragmentation packaging, including a data determination module, a first decision module, a second decision module and a data sending module, wherein:
[0011] The data determination module is configured to determine the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization;
[0012] The first decision module is configured to determine that the target fragmentation packetization mode is network layer fragmentation packetization when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is a preset value;
[0013] The second decision module is configured to determine a first transmission efficiency of performing network layer fragmentation and packetization on the data to be transmitted and a second transmission efficiency of performing application layer fragmentation and packetization on the data to be transmitted when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, and determine a target fragmentation and packetization mode from the network layer fragmentation and packetization and the application layer fragmentation and packetization according to the first transmission efficiency and the second transmission efficiency;
[0014] The data sending module is configured to group the data segments to be transmitted into multiple data segments based on the target segment grouping method and send the data segments.
[0015] In a third aspect, an embodiment of the present application provides a data transmission device based on fragmentation and packetization, including: a memory and one or more processors;
[0016] The memory is used to store one or more programs;
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the data sending method based on fragmentation packaging as described in the first aspect.
[0018] In a fourth aspect, an embodiment of the present application provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the data sending method based on fragmentation packaging as described in the first aspect.
[0019] In the fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, which is stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device performs the data sending method based on fragmentation and packaging as described in the first aspect.
[0020] The embodiment of the present application determines the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization. When the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, according to the first transmission efficiency based on the network layer fragmentation and packetization and the second transmission efficiency based on the application layer fragmentation and packetization, the target fragmentation and packetization method is determined from the network layer fragmentation and packetization and the application layer fragmentation and packetization. Based on the target fragmentation and packetization method, the data to be transmitted is fragmented and packetized into multiple data fragments and sent. According to the link packet loss rate under the current network conditions and the size of the data to be transmitted, a fragmentation and packetization method with higher transmission efficiency can be accurately determined to fragment and packetize and send the data to be transmitted. The fragmentation and packetization method of data is more flexible, which effectively improves the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flow chart of a data transmission method based on fragmentation and packaging provided by an embodiment of the present application;
[0022] Figure 2 is a flowchart of another data transmission method based on fragmentation and packaging provided by an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of a first transmission efficiency determination process provided by an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of a second transmission efficiency determination process provided by an embodiment of the present application;
[0025] Figure 5 It is a structural schematic diagram of a data sending device based on fragmentation and packaging provided in an embodiment of the present application;
[0026] Figure 6 It is a structural diagram of a data sending device based on fragmentation and packaging provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The above process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The above process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0028] The data sending method based on fragmentation and packetization provided in the present application can be applied to the implementation of audio and video call scenarios. It aims to accurately determine the fragmentation and packetization method with higher transmission efficiency to fragment, packetize and send the transmitted data according to the link packet loss rate under the current network conditions and the size of the data to be transmitted, dynamically determine the fragmentation and packetization method of the data, and improve data transmission efficiency.
[0029] In existing data transmission schemes, the transmission data is generally fragmented, packaged and sent based on a fixed fragmentation and packaging method. For example, when the length of a single Internet Protocol message (IP message) is greater than the maximum transmission unit size (MTU size, which refers to the maximum data packet size that the network can transmit) in the transmission link, the Internet Protocol message will be fragmented before being sent out of the interface, and will be cut into multiple Internet Protocol packets (IP packets) less than or equal to the maximum transmission unit size and sent to the destination host. After all data fragments (message fragments) are sent to the destination host, they are fragmented and reassembled at the destination host to restore them to the original Internet Protocol message. If any data fragment is lost during the transmission, the destination host will be unable to complete the fragmentation reassembly, and because the Internet Protocol (IP protocol) itself does not have a fragmentation retransmission mechanism, the entire Internet Protocol message needs to be resent.
[0030] In the current transmission method, the fragmentation and packetization scheme usually includes two types: fragmentation and packetization at the network layer and fragmentation and packetization at the application layer. When fragmentation and packetization is performed at the network layer, the application layer does not need to consider the maximum transmission unit size in the transmission link, and can directly hand over the data packet to the network layer, which performs fragmentation and packetization according to the maximum transmission unit size. When fragmentation and packetization is performed at the application layer, the application layer can fragment and packetize the data packets that exceed the maximum transmission unit size in advance at the application layer according to the maximum transmission unit (Path MTU) of the dynamically detected transmission path or the default maximum transmission unit, and then send them to the network layer. At this time, the data packets do not need to be fragmented at the network layer. At present, data transmission is based on the set fragmentation and packetization method in the entire real-time audio and video communication process. The fragmentation and packetization method for sending data is relatively fixed, and the data transmission efficiency is low.
[0031] Based on this, a data sending method based on fragmentation and packaging is provided in an embodiment of the present application to solve the technical problem that the existing data transmission scheme performs data transmission based on a set fragmentation and packaging method, and the data transmission efficiency is low.
[0032] Figure 1 A flowchart of a data sending method based on slice grouping provided in an embodiment of the present application is given. The data sending method based on slice grouping provided in an embodiment of the present application can be executed by a data sending device based on slice grouping. The data sending device based on slice grouping can be implemented by hardware and / or software and integrated in a data sending device based on slice grouping.
[0033] The following description is made by taking the data sending method based on fragmentation and packetization performed by the data sending device based on fragmentation and packetization as an example. Figure 1 , the data sending method based on fragmentation and packetization includes:
[0034] S110: Determine the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization.
[0035] Exemplarily, the maximum transmission unit size in the current data transmission link and the packet loss rate of the current data link for data transmission are detected, and the estimated data packet size of the data to be transmitted without fragmentation and packetization is determined.
[0036] Optionally, the maximum transmission unit size can be detected through a maximum transmission unit detection tool, or by using a maximum transmission unit detection command (such as tcp_pmtu_discover, udp_pmtu_discover and other detection commands), or by sending a Ping command to the target server through the current data transmission link, for example, by setting the parameters of the Ping command to send data packets of different sizes to the network and observe whether they can successfully reach the target server, thereby determining the maximum transmission unit size of the current data transmission link. The packet loss rate can be detected by sending a test data packet to the target server through the current data transmission link, or it can be determined based on the confirmation information (such as ACK information) returned to the data receiving end.
[0037] In one embodiment, the maximum transmission unit size and the link packet loss rate may be determined when a data transmission link is connected or an audio or video call is established, or may be determined at set time intervals during the audio or video call.
[0038] Among them, the data to be transmitted provided by this scheme is data that has not been fragmented and packaged. Before passing through the data transmission link, it may need to be processed by fragmentation and packaging (for example, when the estimated data packet size of the data to be transmitted is greater than the maximum transmission unit size), or it may not need to be processed by fragmentation and packaging, but directly sent to the network (for example, when the estimated data packet size of the data to be transmitted is less than or equal to the maximum transmission unit size). In one embodiment, the estimated data packet size of the data to be transmitted is greater than the data volume of the data to be transmitted itself. For example, when uploading data (which may be segmented data or unsegmented data), it is necessary to package the data into an application packet according to a preset data transmission protocol at the application layer (at this time, the application packet includes an application layer header and the data to be uploaded), and then package the application packet into a user datagram protocol packet according to the user datagram protocol (UDP) (at this time, the user datagram protocol packet includes a user datagram protocol header and an application packet), and then package the user datagram protocol packet into an Internet data packet according to the Internet Protocol (IP protocol) (at this time, the Internet data packet includes an Internet protocol header and a user datagram protocol packet, and the user datagram protocol packet may be segmented and then packaged), and finally, the Internet data packet is uploaded through the data transmission network. If the data to be transmitted or the User Datagram Protocol packet is not fragmented and packetized, the size of the Internet data packet finally uploaded is the estimated data packet size of the data to be transmitted without fragmentation and packetization, and the estimated data packet size is larger than the data size of the data to be transmitted itself.
[0039] In one embodiment, after determining the estimated data packet size of the data to be transmitted without fragmentation and packetization, the estimated data packet size and the maximum transmission unit size can be compared. When the estimated data packet size is less than or equal to the maximum transmission unit size, there is no need to fragment and packetize the data to be transmitted, and the data can be directly packaged and sent.
[0040] S120: When the estimated data packet size is larger than the maximum transmission unit size and the link packet loss rate is not a preset value, determine a first transmission efficiency for network layer fragmentation and packetization of the data to be transmitted, and a second transmission efficiency for application layer fragmentation and packetization of the data to be transmitted, and determine a target fragmentation and packetization method from the network layer fragmentation and packetization and the application layer fragmentation and packetization based on the first transmission efficiency and the second transmission efficiency.
[0041] Exemplarily, when the estimated data packet size is larger than the maximum transmission unit size, it is determined whether the link packet loss rate is a preset value; when the link packet loss rate is not the preset value, a first transmission efficiency for network layer fragmentation and packetization of the data to be transmitted and a second transmission efficiency for application layer fragmentation and packetization of the data to be transmitted are further determined.
[0042] Optionally, the preset value provided by this solution may range from 0 to 10%. For example, if the preset value is set to 0, then when the link packet loss rate is not 0, it is necessary to determine the first transmission efficiency of network layer fragmentation and packetization of the data to be transmitted, and the second transmission efficiency of application layer fragmentation and packetization of the data to be transmitted under the current maximum transmission unit size, link packet loss rate, and data size of the data to be transmitted. The preset value may also be a set numerical range. For example, if the numerical range corresponding to the preset value is 0 to 10%, then when the link packet loss rate is outside 0 to 10%, it is considered that the link packet loss rate is not the preset value, and it is necessary to determine the first transmission efficiency of network layer fragmentation and packetization of the data to be transmitted, and the second transmission efficiency of application layer fragmentation and packetization of the data to be transmitted.
[0043] Among them, the first transmission efficiency based on network layer fragmentation and packetization can be understood as the estimated value of the transmission efficiency when the network layer is assumed to be fragmented and packetized before uploading the data to be transmitted under the current maximum transmission unit size, link packet loss rate and data size of the data to be transmitted. The second transmission efficiency based on application layer fragmentation and packetization can be understood as the estimated value of the transmission efficiency when the application layer is assumed to be fragmented and packetized before uploading the data to be transmitted under the current maximum transmission unit size, link packet loss rate and data size of the data to be transmitted.
[0044] In one embodiment, after determining a first transmission efficiency for performing network layer fragmentation and packetization on data to be transmitted, and a second transmission efficiency for performing application layer fragmentation and packetization on data to be transmitted, a target fragmentation and packetization mode may be determined from network layer fragmentation and packetization and application layer fragmentation and packetization according to the first transmission efficiency and the second transmission efficiency. For example, the fragmentation and packetization mode corresponding to the maximum transmission efficiency of the first transmission efficiency and the second transmission efficiency is determined as the target fragmentation and packetization mode. When the first transmission efficiency and the second transmission efficiency are the same, the network layer fragmentation and packetization or the application layer fragmentation and packetization may be used as the target fragmentation and packetization mode.
[0045] S130: Packaging the data segments to be transmitted into multiple data segments based on the target segment packaging method and sending the data segments.
[0046] Exemplarily, after determining the target fragment packaging method, the data fragments to be transmitted are packaged into multiple data fragments based on the target fragment packaging method, and the corresponding data fragments are sent to the target server through the current data transmission link.
[0047] For example, when the target fragmentation and packetization mode is network layer fragmentation and packetization, the user datagram protocol packet containing the data to be transmitted is sent to the network layer, and the user datagram protocol packet is fragmented and packetized according to the maximum transmission unit size in the network layer, and each fragment data is packaged into an Internet Protocol packet and then uploaded to the target server through the data transmission link. At this time, the size of each Internet Protocol packet is less than or equal to the maximum transmission unit size.
[0048] When the target fragmentation and packetization mode is application layer fragmentation and packetization, after the data to be transmitted is fragmented and packetized according to the maximum transmission unit size in the network layer, each fragmented data is packaged into a user datagram protocol packet and sent to the network layer. After the user datagram protocol packet is packaged into an Internet Protocol packet at the network layer, it is uploaded to the target server through the data transmission link. At this time, the size of each Internet Protocol packet is less than or equal to the maximum transmission unit size.
[0049] In the above, by determining the maximum transmission unit size of the data transmission link, the link packet loss rate and the estimated data packet size of the data to be transmitted without fragmentation and packetization, when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, according to the first transmission efficiency based on the network layer fragmentation and packetization and the second transmission efficiency based on the application layer fragmentation and packetization, the target fragmentation and packetization method is determined from the network layer fragmentation and packetization and the application layer fragmentation and packetization, and the data to be transmitted is fragmented and packetized into multiple data fragments based on the target fragmentation and packetization method and sent. According to the link packet loss rate under the current network conditions and the size of the data to be transmitted, a fragmentation and packetization method with higher transmission efficiency can be accurately determined to fragment and packetize and send the data to be transmitted. The fragmentation and packetization method of data is more flexible, which effectively improves the data transmission efficiency.
[0050] Based on the above embodiments, Figure 2 A flowchart of another data transmission method based on fragmentation and packetization provided in an embodiment of the present application is given. The data transmission method based on fragmentation and packetization is a specific embodiment of the above-mentioned data transmission method based on fragmentation and packetization. Figure 2 , the data sending method based on fragmentation and packetization includes:
[0051] S210: Determine the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization.
[0052] In a possible embodiment, the data sending method based on fragmentation and packetization provided by the present solution determines the estimated data packet size of the data to be transmitted without fragmentation and packetization. The estimated data packet size of the data to be transmitted without fragmentation and packetization can be determined based on the data size of the data to be transmitted, as well as the application layer header size, user datagram protocol header size and Internet protocol header size corresponding to the data to be transmitted.
[0053] Exemplarily, the data size of the data to be transmitted, and the application layer header size, user datagram protocol header size (UDP header size), and Internet protocol header size (IP header size) corresponding to the data to be transmitted are determined. The application layer header size, user datagram protocol header size, and Internet protocol header size can be determined when a data transmission link is connected or an audio or video call is established, or can be determined at a set time interval during an audio or video call.
[0054] Optionally, since the application layer header size, user datagram protocol header size, and internet protocol header size are relatively fixed, they can be determined when connecting a data transmission link or establishing an audio or video call. The same application layer header size, user datagram protocol header size, and internet protocol header size can be used for the same audio or video call.
[0055] After determining the data size, application layer header size, user datagram protocol header size, and Internet protocol header size of the data to be transmitted, the sum of the data size, application layer header size, user datagram protocol header size, and Internet protocol header size of the data to be transmitted can be used as the estimated data packet size of the data to be transmitted without fragmentation and packetization. Optionally, the estimated data packet size can be determined by the following estimated data packet size determination formula:
[0056] s=(d+a+u+i)
[0057] Among them, s is the estimated data packet size, d is the data size of the data to be transmitted, a is the application layer header size, u is the user datagram protocol header size, and i is the Internet protocol header size. This solution effectively improves the accuracy of determining the target fragmentation and packetization method by accurately determining the estimated data packet size according to the data size of the data to be transmitted, the application layer header size, the user datagram protocol header size, and the Internet protocol header size, thereby effectively improving the data transmission efficiency.
[0058] S220: When the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is a preset value, determining the target fragmentation packetization mode to be network layer fragmentation packetization.
[0059] Exemplarily, when the estimated data packet size of the data to be transmitted without fragmentation and packetization is greater than the maximum transmission unit size, and the link packet loss rate is a preset value, the network layer fragmentation and packetization can be used as the target fragmentation and packetization method for the current data to be transmitted. After determining that the target fragmentation and packetization method is the network layer fragmentation and packetization, jump to step S240 to perform fragmentation and packetization of the data to be transmitted and send it.
[0060] Optionally, the preset value provided by this solution may have a value range of 0 to 10%. For example, if the preset value is set to 0, then when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is 0, the target fragmentation packet grouping mode is determined to be network layer fragmentation packet grouping. The preset value may also be a set numerical range. For example, if the numerical range corresponding to the preset value is 0 to 10%, then when the link packet loss rate is within 0 to 10%, the link packet loss rate is considered to be the preset value, and the target fragmentation packet grouping mode may be determined to be network layer fragmentation packet grouping.
[0061] It needs to be explained that when the estimated data packet size is larger than the maximum transmission unit size and the link packet loss rate is a preset value, it can be considered that the transmission efficiency based on network layer fragmentation and packetization is higher than the transmission efficiency based on application layer fragmentation and packetization (for example, when the link packet loss rate is equal to the preset value), or the transmission efficiency based on network layer fragmentation and packetization and the transmission efficiency based on application layer fragmentation and packetization differ within a set range (for example, when the link packet loss rate is within the numerical range corresponding to the preset value), the transmission efficiency of network layer fragmentation and packetization and the transmission efficiency based on application layer fragmentation and packetization are not much different, the first transmission efficiency based on network layer fragmentation and packetization and the second transmission efficiency based on application layer fragmentation and packetization are not calculated, and the target fragmentation and packetization method is directly determined as network layer fragmentation and packetization, thereby reducing the amount of data processing and effectively improving the efficiency of determining the target fragmentation and packetization method while ensuring data transmission efficiency.
[0062] For example, assuming that the preset value is 0, when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is 0 (at this time (d+a+u+i)>m), assuming that fragmentation and packet grouping are performed at the network layer, the corresponding third estimated number of fragments is:
[0063] n3=ceil((d+a+u) / (mi))
[0064] Wherein, n3 is the third estimated number of fragments, ceil(·) is rounded up, d is the data size of the data to be transmitted, a is the application layer header size, u is the user datagram protocol header size, m is the maximum transmission unit size, and i is the Internet Protocol header size.
[0065] At this time, the estimated third transmission efficiency based on network layer fragmentation and packetization is:
[0066] Q3=d / (d+a+u+n3*i)
[0067] Among them, Q3 is the third transmission efficiency.
[0068] Assuming that fragmentation and packetization are performed at the application layer, the corresponding fourth estimated number of fragments is:
[0069] n4=ceil(d / (maui))
[0070] Here, n4 is the fourth estimated number of shards.
[0071] At this time, the estimated fourth transmission efficiency based on application layer fragmentation and packetization is:
[0072] Q4=d / (d+n4*(a+u+i))
[0073] Among them, Q4 is the fourth transmission efficiency.
[0074] At this time, the difference between the third estimated number of shards and the fourth estimated number of shards is:
[0075] n3-n4=(d+a+u) / (mi)-d / (maui)
[0076] =((d+a+u)(maui)-d(mi)) / ((mi)(mau
[0077] -i))
[0078] =((a(mdaui))+u(mdaui)) / ((mi)(ma
[0079] -ui))
[0080] Since (d + a + u + i) > m at this time, it can be obtained that n3 - n4 < 0, that is, n3 < n4. At the same time:
[0081] 1 / Q3 = (d + a + u + n3 * i) / d
[0082] 1 / Q4 = (d + n4 * (a + u + i)) / d
[0083] 1 / Q3 - 1 / Q4 = ((1 - n4)a + (1 - n4)u + (n3 - n4)i) / d
[0084] Since n4 > 1 and n3 < n4 at this time, it can be obtained that Q3 > Q4. That is, when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is a preset value (such as 0), the third transmission efficiency based on network layer fragmentation and packet assembly is greater than the fourth transmission efficiency based on application layer fragmentation and packet assembly. At this time, taking the network layer fragmentation and packet assembly as the target fragmentation and packet assembly method can effectively improve the determination efficiency of the target fragmentation and packet assembly method.
[0085] S230: When the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not the preset value, determine the first transmission efficiency of performing network layer fragmentation and packet assembly on the data to be transmitted, and the second transmission efficiency of performing application layer fragmentation and packet assembly on the data to be transmitted, and determine the target fragmentation and packet assembly method from the network layer fragmentation and packet assembly and the application layer fragmentation and packet assembly according to the first transmission efficiency and the second transmission efficiency.
[0086] In a possible embodiment, the method for sending data based on fragmentation and packet assembly provided by this solution to determine the first transmission efficiency of performing network layer fragmentation and packet assembly on the data to be transmitted, and the second transmission efficiency of performing application layer fragmentation and packet assembly on the data to be transmitted may be: according to the maximum transmission unit size, the link packet loss rate, the size of the application layer header corresponding to the data to be transmitted, the size of the user datagram protocol header, and the size of the internet protocol header, determine the first transmission efficiency of performing network layer fragmentation and packet assembly on the data to be transmitted, and the second transmission efficiency of performing application layer fragmentation and packet assembly on the data to be transmitted.
[0087] Exemplarily, when performing fragmentation and packet assembly based on the network layer, under the current maximum transmission unit size, the link packet loss rate, and the data size of the data to be transmitted, use the application layer header corresponding to the size of the application layer header of the data to be transmitted, the user datagram protocol header corresponding to the size of the user datagram protocol header, and the internet protocol header corresponding to the size of the internet protocol header to pack the data to be transmitted in sequence, and estimate the first transmission efficiency of sending the data to be transmitted to the target server after performing network layer fragmentation and packet assembly according to the number of data fragments corresponding to the data fragmentation during network layer fragmentation and packet assembly and the loss prediction situation of each data packet after fragmentation.
[0088] In one embodiment, according to the number of data fragments corresponding to fragmentation and packetization of the data to be transmitted at the application layer under the current maximum transmission unit size, link packet loss rate and the data size of the data to be transmitted when fragmentation and packetization is performed based on the application layer, and the estimated loss of each data packet when each packaged data fragment is transmitted after each data fragment corresponding to the data to be transmitted is packaged in sequence by using an application layer header corresponding to the application layer header size corresponding to the data to be transmitted, a user datagram protocol header corresponding to the user datagram protocol header size and an Internet Protocol header corresponding to the Internet Protocol header size. A second transmission efficiency of the data to be transmitted after fragmentation and packetization at the application layer and then sending it to a target server is estimated.
[0089] This scheme accurately determines the first transmission efficiency based on network layer fragmentation and the second transmission efficiency based on application layer fragmentation according to the maximum transmission unit size, link packet loss rate, application layer header size corresponding to the data to be transmitted, user datagram protocol header size and Internet protocol header size, thereby effectively improving the accuracy of determining the target fragmentation and packetization method and effectively improving data transmission efficiency.
[0090] In one possible embodiment, Figure 3 As shown in a schematic diagram of a first transmission efficiency determination process, the data transmission method based on fragmentation and packetization provided by the present solution determines the first transmission efficiency of network layer fragmentation and packetization of the data to be transmitted according to the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size, including:
[0091] S231: Determine a first estimated number of fragments for fragmenting and packetizing the data to be transmitted at the network layer based on the data size of the data to be transmitted, the maximum transmission unit size, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size.
[0092] S232: Determine an estimated probability of no data fragment loss according to the link packet loss rate and the first estimated number of fragments.
[0093] S233: Determine a first estimated transmission efficiency without data fragment loss based on the data size of the data to be transmitted, the application layer header size corresponding to the data to be transmitted, the user datagram protocol header size, the Internet Protocol header size, and the first estimated number of fragments.
[0094] S234: Determine a first transmission efficiency for performing network layer segmentation and packetization on the data to be transmitted according to the estimated probability and the first estimated transmission efficiency.
[0095] Exemplarily, the first estimated number of fragments for fragmenting and grouping the data to be transmitted at the network layer is determined based on the data size of the data to be transmitted, the maximum transmission unit size, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size. For example, the first estimated number of fragments based on network layer fragmentation and grouping can be determined based on the result of rounding up corresponding to the ratio of the sum of the data size of the data to be transmitted, the application layer header size, and the user datagram protocol header size to the difference between the maximum transmission unit size and the Internet protocol header size. Optionally, the first estimated number of fragments can be determined based on the following first estimated number of fragments determination formula:
[0096] n1=ceil((d+a+u) / (mi))
[0097] Among them, n1 is the first estimated number of fragments, d is the data size of the data to be transmitted, a is the application layer header size, u is the user datagram protocol header size, m is the maximum transmission unit size, and i is the Internet Protocol header size.
[0098] In one embodiment, the estimated probability that each data fragment will not be lost during the transmission process is estimated based on the link packet loss rate and the first estimated number of fragments determined above. For example, the first estimated number of fragments of the difference between 1 and the link packet loss rate can be used as the estimated probability that no data fragment loss occurs. Optionally, the estimated probability can be determined by the following estimated probability determination formula:
[0099]
[0100] Among them, P is the estimated probability, p is the link packet loss rate, and n1 is the first estimated number of fragments.
[0101] In one embodiment, based on the data size of the data to be transmitted, the application layer header size corresponding to the data to be transmitted, the user datagram protocol header size, the Internet protocol header size, and the first estimated number of fragments determined above, the first estimated transmission efficiency at which each data fragment is not lost during the transmission process is estimated. For example, the ratio of the data size of the data to be transmitted to the first calculated value can be used as the first estimated transmission efficiency, wherein the first calculated value is the sum of the data size of the data to be transmitted, the application layer header size, the user datagram protocol header size, and the second calculated value, and the second calculated value is the product of the first estimated number of fragments and the Internet protocol header size. Optionally, the first estimated transmission efficiency can be determined by the following first estimated transmission efficiency determination formula:
[0102] Q=d / (d+a+u+n1*i)
[0103] Among them, Q is the first estimated transmission efficiency, d is the data size of the data to be transmitted, a is the application layer header size, u is the user datagram protocol header size, i is the Internet protocol header size, and n1 is the first estimated number of fragments.
[0104] In one embodiment, the first transmission efficiency of performing network layer fragmentation and packetization on the data to be transmitted is determined based on the estimated probability determined above and the first estimated transmission efficiency. For example, the product of the estimated probability and the first estimated transmission efficiency can be used as the first transmission efficiency. In one possible embodiment, the first transmission efficiency provided by this solution is determined based on the following first transmission efficiency determination formula:
[0105]
[0106] Wherein, Q1 is the first transmission efficiency, g is the preset first accuracy coefficient, P is the estimated probability, and Q is the first estimated transmission efficiency. This solution effectively improves the accuracy of determining the target fragmentation and packaging method, and effectively improves the data transmission efficiency by accurately estimating the first transmission efficiency of network layer fragmentation and packaging of the data to be transmitted according to the first transmission efficiency determination formula.
[0107] This scheme accurately estimates the first transmission efficiency of network layer fragmentation and packetization of data to be transmitted by determining the first estimated number of fragments for fragmentation and packetization of data to be transmitted at the network layer, the estimated probability of no data fragment loss, and the first estimated transmission efficiency, thereby effectively improving the accuracy of determining the target fragmentation and packetization method and effectively improving data transmission efficiency.
[0108] In one possible embodiment, Figure 4 As shown in a schematic diagram of a second transmission efficiency determination process, the data transmission method based on fragmentation and packetization provided by the present solution determines the second transmission efficiency of application layer fragmentation and packetization of data to be transmitted according to the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size, including:
[0109] S235: Determine a second estimated number of fragments for fragmenting and packetizing the data to be transmitted at the application layer according to the data size of the data to be transmitted, the maximum transmission unit size, the application layer packet header size corresponding to sending the data to be transmitted, the user datagram protocol packet header size, and the Internet protocol packet header size.
[0110] S236: Determine the estimated number of lost fragments according to the second estimated number of fragments and the link packet loss rate.
[0111] S237: Determine the estimated number of retransmissions of the data fragment according to the link packet loss rate.
[0112] S238: Determine the second transmission efficiency of application layer fragmentation and packetization of the data to be transmitted based on the maximum transmission unit size, the data size of the data to be transmitted, the application layer header size, the user datagram protocol header size, the Internet Protocol header size, the second estimated number of fragments, the estimated number of lost fragments, and the estimated number of retransmissions.
[0113] Exemplarily, the second estimated number of fragments for fragmenting and packetizing the data to be transmitted at the application layer is determined based on the data size of the data to be transmitted, the maximum transmission unit size, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size. For example, the result of rounding up the ratio of the data size of the data to be transmitted to the third calculated value can be used as the second estimated number of fragments, where the third calculated value is the difference between the maximum transmission unit size and the application layer header size, the user datagram protocol header size, and the Internet protocol header size. Optionally, the second estimated number of fragments can be determined based on the following second estimated number of fragments determination formula:
[0114] n2=ceil(d / (maui))
[0115] Among them, n2 is the second estimated number of fragments, d is the data size of the data to be transmitted, a is the application layer header size, u is the user datagram protocol header size, i is the Internet protocol header size, and m is the maximum transmission unit size.
[0116] In one embodiment, the estimated number of lost fragments when transmitting data fragments is estimated based on the second estimated number of fragments determined above and the current link packet loss rate. For example, the product of the second estimated number of fragments and the link packet loss rate can be used as the estimated number of lost fragments. Optionally, the estimated number of lost fragments can be determined based on the following estimated number of lost fragments determination formula:
[0117] n=n2*p
[0118] Where n is the estimated number of lost fragments, n2 is the second estimated number of fragments, and p is the link packet loss rate.
[0119] In one embodiment, the estimated number of retransmissions of each data segment is estimated based on the link packet loss rate of the current data transmission link. Optionally, the estimated number of retransmissions provided by this solution can be determined based on the following estimated number of retransmissions determination formula:
[0120]
[0121] Wherein, c is the estimated number of retransmissions, p is the link packet loss rate, and k is the preset second precision coefficient. This solution accurately calculates the estimated number of retransmissions through the estimated number of retransmissions determination formula, improves the calculation accuracy of the second transmission efficiency, and ensures the correct determination of the fragmentation and packaging method to achieve higher transmission efficiency.
[0122] In one embodiment, the second transmission efficiency of application layer fragmentation and packetization of the data to be transmitted is determined based on the maximum transmission unit size, the data size of the data to be transmitted, the application layer header size, the user datagram protocol header size, the Internet protocol header size, and the second estimated number of fragments, the estimated number of lost fragments, and the estimated number of retransmissions determined above. For example, the ratio of the data size of the data to be transmitted to the fourth calculated value can be used as the second transmission efficiency, the fourth calculated value is the sum of the data size of the data to be transmitted and the fifth calculated value and the sixth calculated value, the fifth calculated value is the product of the second estimated number of fragments and the sum of the application layer header size, the user datagram protocol header size, and the Internet protocol header size, and the sixth calculated value is the product of the estimated number of lost fragments, the estimated number of retransmissions, and the maximum transmission unit size. Optionally, the second transmission efficiency provided by this solution can be determined based on the following second transmission efficiency determination formula:
[0123] Q2=d / (d+n2*(a+u+i)+n*c*m)
[0124] Among them, Q2 is the second transmission efficiency, d is the data size of the data to be transmitted, n2 is the second estimated number of fragments, a is the application layer header size, u is the user datagram protocol header size, i is the Internet protocol header size, n is the estimated number of lost fragments, c is the estimated number of retransmissions, and m is the maximum transmission unit size. This solution accurately calculates the second transmission efficiency through the second transmission efficiency determination formula, ensures that the fragment grouping method that achieves higher transmission efficiency is correctly determined, and improves data transmission efficiency.
[0125] This scheme estimates the second estimated number of fragments, the estimated number of lost fragments, and the estimated number of retransmissions for fragmenting and packaging the data to be transmitted at the application layer, and accurately estimates the second transmission efficiency of application layer fragmentation and packaging of the data to be transmitted based on the maximum transmission unit size, the data size of the data to be transmitted, the application layer header size, the user datagram protocol header size, the Internet Protocol header size, the second estimated number of fragments, the estimated number of lost fragments, and the estimated number of retransmissions, thereby effectively improving the accuracy of determining the target fragmentation and packaging method and effectively improving data transmission efficiency.
[0126] S240: Packaging the data segments to be transmitted into multiple data segments based on the target segment packaging method and sending the data segments.
[0127] In the above, by determining the maximum transmission unit size of the data transmission link, the link packet loss rate and the estimated data packet size of the data to be transmitted without fragmentation and packetization, when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, according to the first transmission efficiency based on the network layer fragmentation and packetization and the second transmission efficiency based on the application layer fragmentation and packetization, the target fragmentation and packetization method is determined from the network layer fragmentation and packetization and the application layer fragmentation and packetization, and the data to be transmitted is fragmented and packetized into multiple data fragments based on the target fragmentation and packetization method and sent. According to the link packet loss rate under the current network conditions and the size of the data to be transmitted, a fragmentation and packetization method with higher transmission efficiency can be accurately determined to fragment and packetize and send the data to be transmitted. The fragmentation and packetization method of data is more flexible, which effectively improves the data transmission efficiency. At the same time, when the estimated data packet size of the data to be transmitted without fragmentation and packetization is greater than the maximum transmission unit size and the link packet loss rate is a preset value, the network layer fragmentation and packetization is directly used as the target fragmentation and packetization method for the current data to be transmitted, thereby reducing the data processing amount and effectively improving the efficiency of determining the target fragmentation and packetization method while ensuring the data transmission efficiency.
[0128] Figure 5 is a structural diagram of a data transmission device based on fragmentation and packetization provided by an embodiment of the present application. Figure 5 The data sending device based on fragmentation packaging includes a data determination module 51, a fragmentation decision module 52 and a data sending module 53.
[0129] The data determination module 51 is configured to determine the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization;
[0130] The fragmentation decision module 52 is configured to determine a first transmission efficiency for performing network layer fragmentation and packetization on the data to be transmitted and a second transmission efficiency for performing application layer fragmentation and packetization on the data to be transmitted when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, and determine a target fragmentation and packetization mode from the network layer fragmentation and packetization and the application layer fragmentation and packetization according to the first transmission efficiency and the second transmission efficiency;
[0131] The data sending module 53 is configured to group the to-be-transmitted data segments into multiple data segments based on the target segment grouping method and send the data segments.
[0132] In the above, by determining the maximum transmission unit size of the data transmission link, the link packet loss rate and the estimated data packet size of the data to be transmitted without fragmentation and packetization, when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, according to the first transmission efficiency based on the network layer fragmentation and packetization and the second transmission efficiency based on the application layer fragmentation and packetization, the target fragmentation and packetization method is determined from the network layer fragmentation and packetization and the application layer fragmentation and packetization, and the data to be transmitted is fragmented and packetized into multiple data fragments based on the target fragmentation and packetization method and sent. According to the link packet loss rate under the current network conditions and the size of the data to be transmitted, a fragmentation and packetization method with higher transmission efficiency can be accurately determined to fragment and packetize and send the data to be transmitted. The fragmentation and packetization method of data is more flexible, which effectively improves the data transmission efficiency.
[0133] In a possible embodiment, the fragmentation decision module 52 is further configured to determine that the target fragmentation packetization mode is network layer fragmentation packetization when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is a preset value.
[0134] In a possible embodiment, the data determination module 51 determines the estimated data packet size of the data to be transmitted without being segmented and packaged, and is configured as follows:
[0135] Determine the estimated data packet size of the data to be transmitted without fragmentation and packetization based on the data size of the data to be transmitted, as well as the application layer header size, user datagram protocol header size and internet protocol header size corresponding to sending the data to be transmitted.
[0136] In a possible embodiment, the fragmentation decision module 52 determines a first transmission efficiency of performing network layer fragmentation and packetization on the data to be transmitted, and a second transmission efficiency of performing application layer fragmentation and packetization on the data to be transmitted, and is configured as follows:
[0137] Based on the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to the data to be transmitted, the User Datagram Protocol header size and the Internet Protocol header size, determine the first transmission efficiency for network layer fragmentation and packetization of the data to be transmitted, and the second transmission efficiency for application layer fragmentation and packetization of the data to be transmitted.
[0138] In a possible embodiment, the fragmentation decision module 52 determines the first transmission efficiency of network layer fragmentation and packetization of the data to be transmitted according to the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size, and is configured as follows:
[0139] Determine a first estimated number of fragments for fragmenting and packetizing the data to be transmitted at the network layer according to the data size of the data to be transmitted, the maximum transmission unit size, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size;
[0140] Determining an estimated probability that no data fragment loss will occur according to the link packet loss rate and the first estimated number of fragments;
[0141] Determine a first estimated transmission efficiency without loss of data fragments according to the data size of the data to be transmitted, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, the Internet protocol header size, and the first estimated number of fragments;
[0142] A first transmission efficiency for performing network layer segmentation and packetization on the data to be transmitted is determined according to the estimated probability and the first estimated transmission efficiency.
[0143] In a possible embodiment, the first transmission efficiency is determined based on the following first transmission efficiency determination formula:
[0144]
[0145] Among them, Q1 is the first transmission efficiency, h is the preset first accuracy coefficient, P is the estimated probability, and Q is the first estimated transmission efficiency.
[0146] In a possible embodiment, the fragmentation decision module 52 determines the second transmission efficiency of fragmenting and packetizing the data to be transmitted at the application layer according to the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size, and is configured as follows:
[0147] Determine a second estimated number of fragments for fragmenting and packetizing the data to be transmitted at the application layer according to the data size of the data to be transmitted, the maximum transmission unit size, the application layer packet header size corresponding to sending the data to be transmitted, the user datagram protocol packet header size, and the Internet protocol packet header size;
[0148] Determine an estimated number of lost fragments according to the second estimated number of fragments and the link packet loss rate;
[0149] Determine the estimated number of retransmissions of data fragments based on the link packet loss rate;
[0150] The second transmission efficiency of application layer fragmentation and packetization of the data to be transmitted is determined based on the maximum transmission unit size, the data size of the data to be transmitted, the application layer header size, the user datagram protocol header size, the Internet Protocol header size, the second estimated number of fragments, the estimated number of lost fragments and the estimated number of retransmissions.
[0151] In a possible embodiment, the estimated number of retransmissions is determined based on the following estimated number of retransmissions determination formula:
[0152]
[0153] Wherein, c is the estimated number of retransmissions, p is the link packet loss rate, and k is the preset second precision coefficient.
[0154] In a possible embodiment, the second transmission efficiency is determined based on the following second transmission efficiency determination formula:
[0155] Q2=d / (d+n2*(a+u+i)+n*c*m)
[0156] Among them, Q2 is the second transmission efficiency, d is the data size of the data to be transmitted, n2 is the second estimated number of fragments, a is the application layer header size, u is the user datagram protocol header size, i is the Internet Protocol header size, n is the estimated number of lost fragments, c is the estimated number of retransmissions, and m is the maximum transmission unit size.
[0157] It is worth noting that in the above-mentioned embodiment of the data sending device based on fragmentation and packaging, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.
[0158] The embodiment of the present application further provides a data sending device based on fragmentation packaging, and the data sending device based on fragmentation packaging can be integrated with the data sending apparatus based on fragmentation packaging provided in the embodiment of the present application. Figure 6 Schematic diagram of a data transmission device based on fragmentation and packetization provided by an embodiment of the present application. Figure 6 The data transmission device based on slicing and packaging includes: an input device 63, an output device 64, a memory 62 and one or more processors 61; the memory 62 is used to store one or more programs; when the one or more programs are executed by the one or more processors 61, the one or more processors 61 implement the data transmission method based on slicing and packaging as provided in the above embodiment. The data transmission device, equipment and computer based on slicing and packaging provided above can be used to execute the data transmission method based on slicing and packaging provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0159] The embodiment of the present application also provides a non-volatile storage medium storing computer executable instructions, which are used to execute the data sending method based on fragmentation and packetization as provided in the above embodiment when executed by a computer processor. Of course, the non-volatile storage medium storing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the data sending method based on fragmentation and packetization as provided above, can also execute the related operations in the data sending method based on fragmentation and packetization provided in any embodiment of the present application. The data sending device, equipment and storage medium based on fragmentation and packetization provided in the above embodiment can execute the data sending method based on fragmentation and packetization provided in any embodiment of the present application. For technical details not described in detail in the above embodiment, please refer to the data sending method based on fragmentation and packetization provided in any embodiment of the present application.
[0160] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The essence of the technical solution of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, including a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the data sending method based on fragmentation and packaging provided in each embodiment of the present application.
Claims
1. A data transmission method based on fragmentation and packaging, characterized in that: include: Determine the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization; When the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, determine a first transmission efficiency for performing network layer fragmentation and packetization on the data to be transmitted, and a second transmission efficiency for performing application layer fragmentation and packetization on the data to be transmitted, and determine a target fragmentation and packetization mode from the network layer fragmentation and packetization and the application layer fragmentation and packetization according to the first transmission efficiency and the second transmission efficiency; The data segments to be transmitted are packaged into multiple data segments based on the target segment packaging method and sent.
2. The data transmission method based on fragmentation and packetization according to claim 1, characterized in that: After determining the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization, the method further includes: When the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is a preset value, the target fragmentation packetization mode is determined to be network layer fragmentation packetization.
3. The data transmission method based on fragmentation and packetization according to claim 1, characterized in that: Determine the estimated packet size of the data to be transmitted without fragmentation and packetization, including: According to the data size of the data to be transmitted, and the application layer header size, user datagram protocol header size and internet protocol header size corresponding to sending the data to be transmitted, the estimated data packet size of the data to be transmitted without fragmentation and packetization is determined.
4. The data transmission method based on fragmentation and packetization according to claim 1, characterized in that: The determining of a first transmission efficiency of performing network layer fragmentation and packetization on the data to be transmitted, and a second transmission efficiency of performing application layer fragmentation and packetization on the data to be transmitted, comprises: Based on the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size and the Internet protocol header size, determine the first transmission efficiency of network layer fragmentation and packetization of the data to be transmitted, and the second transmission efficiency of application layer fragmentation and packetization of the data to be transmitted.
5. The data transmission method based on fragmentation and packetization according to claim 4, characterized in that: Determining a first transmission efficiency of performing network layer fragmentation and packet grouping on the data to be transmitted according to the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size, comprising: Determine a first estimated number of fragments for fragmenting and packetizing the data to be transmitted at the network layer according to the data size of the data to be transmitted, the maximum transmission unit size, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size; Determining an estimated probability that no data fragment loss will occur according to the link packet loss rate and the first estimated number of fragments; Determine a first estimated transmission efficiency without loss of data fragments according to the data size of the data to be transmitted, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, the Internet protocol header size, and the first estimated number of fragments; A first transmission efficiency for performing network layer fragmentation and packetization on the data to be transmitted is determined according to the estimated probability and the first estimated transmission efficiency.
6. The data transmission method based on fragmentation and packetization according to claim 5, characterized in that: The first transmission efficiency is determined based on the following first transmission efficiency determination formula: Among them, Q1 is the first transmission efficiency, g is the preset first accuracy coefficient, P is the estimated probability, and Q is the first estimated transmission efficiency.
7. The data transmission method based on fragmentation and packetization according to claim 4, characterized in that: Determining a second transmission efficiency of performing application layer fragmentation and packetization on the data to be transmitted according to the maximum transmission unit size, the link packet loss rate, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size, comprising: Determine a second estimated number of fragments for fragmenting and packetizing the data to be transmitted at the application layer according to the data size of the data to be transmitted, the maximum transmission unit size, the application layer header size corresponding to sending the data to be transmitted, the user datagram protocol header size, and the Internet protocol header size; Determine an estimated number of lost fragments according to the second estimated number of fragments and the link packet loss rate; Determining an estimated number of retransmissions of the data fragment according to the link packet loss rate; The second transmission efficiency of application layer fragmentation and packetization of the data to be transmitted is determined based on the maximum transmission unit size, the data size of the data to be transmitted, the application layer header size, the user datagram protocol header size, the Internet Protocol header size, the second estimated number of fragments, the estimated number of lost fragments, and the estimated number of retransmissions.
8. The data transmission method based on fragmentation and packetization according to claim 7, characterized in that: The estimated number of retransmissions is determined based on the following estimated number of retransmissions determination formula: Wherein, c is the estimated number of retransmissions, P is the link packet loss rate, and k is the preset second precision coefficient.
9. The data transmission method based on fragmentation and packetization according to claim 7, characterized in that: The second transmission efficiency is determined based on the following second transmission efficiency determination formula: Q2=d / (d+n2*(a+u+i)+n*c*m) Among them, Q2 is the second transmission efficiency, d is the data size of the data to be transmitted, n2 is the second estimated number of fragments, a is the application layer header size, u is the user datagram protocol header size, i is the Internet Protocol header size, n is the estimated number of lost fragments, c is the estimated number of retransmissions, and m is the maximum transmission unit size.
10. A data transmission device based on fragmentation and packetization, characterized in that: It includes a data determination module, a sharding decision module and a data sending module, wherein: The data determination module is configured to determine the maximum transmission unit size of the data transmission link, the link packet loss rate, and the estimated data packet size of the data to be transmitted without fragmentation and packetization; The fragmentation decision module is configured to determine a first transmission efficiency of performing network layer fragmentation and packetization on the data to be transmitted and a second transmission efficiency of performing application layer fragmentation and packetization on the data to be transmitted when the estimated data packet size is greater than the maximum transmission unit size and the link packet loss rate is not a preset value, and determine a target fragmentation and packetization mode from the network layer fragmentation and packetization and the application layer fragmentation and packetization according to the first transmission efficiency and the second transmission efficiency; The data sending module is configured to group the data segments to be transmitted into multiple data segments based on the target segment grouping method and send the data segments.
11. A data transmission device based on fragmentation and packetization, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data sending method based on fragmentation packaging as described in any one of claims 1 to 9.
12. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to execute the data sending method based on fragmentation packaging as described in any one of claims 1-9 when executed by a computer processor.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data sending method based on fragmentation and packetization as described in any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Data transmission system and method, electronic equipment and storage medium
CN120407510A
A data transmission system, method, electronic device, and storage medium
CN120407510B
Memory-based low-delay data transmission method
CN120528929A
