CN116614451A - Data transmission acceleration method and device based on maximum transmission unit - Google Patents
Data transmission acceleration method and device based on maximum transmission unit Download PDFInfo
- Publication number
- CN116614451A CN116614451A CN202310590952.2A CN202310590952A CN116614451A CN 116614451 A CN116614451 A CN 116614451A CN 202310590952 A CN202310590952 A CN 202310590952A CN 116614451 A CN116614451 A CN 116614451A
- Authority
- CN
- China
- Prior art keywords
- data packet
- data
- prediction
- size
- space
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/36—Flow control; Congestion control by determining packet size, e.g. maximum transfer unit [MTU]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本申请涉及数据编码领域,特别是涉及一种基于最大传输单元的数据传输加速方法及装置。The present application relates to the field of data encoding, in particular to a method and device for accelerating data transmission based on a maximum transmission unit.
背景技术Background technique
最大传输单元(maximum transmission unit,MTU)是可以通过数据链路传输的最大大小的帧或数据包——以字节或八位字节为单位。它最常用作使用网际互联协议(Internet protocol,IP)的以太网网络上的数据包大小的参考。The maximum transmission unit (MTU) is the largest size frame or packet—measured in bytes or octets—that can be transmitted over a data link. It is most commonly used as a reference for packet size on Ethernet networks using the Internet protocol (IP).
网络中的每个设备都有一个可以接收和传输的最大传输单元大小。下一个接收设备的MTU由上一个设备在向其发送数据包之前确定。如果数据包太大,下一个接收设备无法接受,则上一个设备将数据包分成多个数据包发送,这被称为碎片。Every device in the network has a maximum transmission unit size that it can receive and transmit. The MTU of the next receiving device is determined by the previous device before sending packets to it. If the data packet is too large for the next receiving device to accept, the previous device divides the data packet into multiple data packets to send, which is called fragmentation.
碎片化增加了延迟和额外的数据,不利于网络传输性能。为获得最佳性能,原始发送设备的MTU设置得尽可能大,但仍小于发送方和最终接收方之间网络中所有设备的MTU。在实践中,发送设备不会知道所有中间设备的MTU,而只会知道排队的下一个设备的MTU。Fragmentation increases latency and extra data, which is detrimental to network transmission performance. For best performance, the MTU of the original sending device is set as large as possible, but still smaller than the MTU of all devices in the network between the sender and the final receiver. In practice, the sending device will not know the MTU of all intermediate devices, only the MTU of the next device in line.
可以通过使用网络中的MTU来最大化网络中数据传输的效率,继而加快数据传输速度。但是如何获得MTU中的数据并生成MTU是一个挑战。The efficiency of data transmission in the network can be maximized by using the MTU in the network, thereby speeding up the data transmission speed. But how to get data in MTU and generate MTU is a challenge.
发明内容Contents of the invention
本申请实施例提供了一种基于最大传输单元的数据传输加速方法及装置,通过获取当前数据包的MTU中的可填充空间的大小,再获取目标预测字典对可填充空间的数据进行预测,使得设备生成并发送数据包,达成提升数据传输效率的效果。The embodiment of the present application provides a data transmission acceleration method and device based on the maximum transmission unit, by obtaining the size of the fillable space in the MTU of the current data packet, and then obtaining the target prediction dictionary to predict the data of the fillable space, so that The device generates and sends data packets to achieve the effect of improving data transmission efficiency.
第一方面,提供了一种基于最大传输单元的数据传输加速方法,该方法包括:In the first aspect, a method for accelerating data transmission based on a maximum transmission unit is provided, the method including:
获取下一设备的MTU,根据MTU以及当前数据包的已有数据的空间大小确定当前数据包的可填充空间的大小;获取与可填充空间的大小对应的目标预测字典,目标预测字典为多个预测字典中的一个;根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,可填充空间的数据与下一个数据包的在前数据相似度大于预设阈值;根据当前数据包的已有数据和可填充空间的数据生成当前数据包,发送当前数据包。Obtain the MTU of the next device, determine the size of the fillable space of the current packet according to the MTU and the size of the existing data in the current packet; obtain the target prediction dictionary corresponding to the size of the fillable space, and the target prediction dictionary is multiple One of the prediction dictionaries; the data that can fill the space is obtained according to the existing data of the current data packet and the target prediction dictionary, and the similarity between the data that can fill the space and the previous data of the next data packet is greater than the preset threshold; according to the current data packet The current data packet is generated from the existing data and the data that can be filled, and the current data packet is sent.
可见,在本申请实施例中,通过获取设备进行数据传输的MTU确定MTU中的可填充空间大小。再获取目标预测字典,根据目标预测字典对可填充空间的数据进行预测,再根据当前数据包的已有数据和可填充空间的数据生成当前数据包,发送当前数据包。由于当前数据包根据MTU大小生成,能够最终达成提升数据传输效率、加快数据传输速度的效果。It can be seen that in the embodiment of the present application, the size of the fillable space in the MTU is determined by acquiring the MTU for data transmission of the device. Obtain the target prediction dictionary again, predict the data that can fill the space according to the target prediction dictionary, and then generate the current data packet according to the existing data of the current data packet and the data that can fill the space, and send the current data packet. Since the current data packet is generated according to the MTU size, the effect of improving data transmission efficiency and speeding up data transmission speed can be finally achieved.
在一个可能的示例中,根据MTU以及当前数据包的已有数据的空间大小确定当前数据包的可填充空间的大小,包括:根据MTU确定当前数据包的有效荷载;根据当前数据包的有效荷载和已有数据的空间大小的差值确定当前数据包的可填充空间的大小。In a possible example, determining the size of the fillable space of the current data packet according to the MTU and the space size of the existing data of the current data packet includes: determining the payload of the current packet according to the MTU; determining the payload of the current packet according to the payload of the current packet The difference between the space size of the current data packet and the space size of the existing data determines the size of the fillable space of the current data packet.
在一个可能的示例中,根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,包括:将当前数据包的已有数据与目标预测字典进行匹配,获得已有数据对应的预测项,其中,目标预测字典中包括多个预测项,且预测项的大小与可填充空间的大小对应;将预测项输入数据预测模型,根据预测模型的预测结果获得可填充空间的数据。In a possible example, obtaining the data that can fill the space according to the existing data of the current data packet and the target prediction dictionary includes: matching the existing data of the current data packet with the target prediction dictionary to obtain the prediction corresponding to the existing data Items, wherein the target prediction dictionary includes multiple prediction items, and the size of the prediction items corresponds to the size of the fillable space; input the prediction items into the data prediction model, and obtain the data that can fill the space according to the prediction results of the prediction model.
在一个可能的示例中,在获取与可填充空间对应的目标预测字典之前,该方法还包括:生成多个初始预测字典,多个初始预测字典中每个预测字典对应一个可能的空间大小,且每个预测字典中包括多个初始预测项;对多个初始预测字典中的每个初始预测字典进行处理,去除每个初始预测字典中多个初始预测项中的无效初始预测项,获得多个预测字典。In a possible example, before obtaining the target prediction dictionary corresponding to the fillable space, the method further includes: generating a plurality of initial prediction dictionaries, each prediction dictionary in the plurality of initial prediction dictionaries corresponds to a possible space size, and Each prediction dictionary includes multiple initial prediction items; each initial prediction dictionary in the multiple initial prediction dictionaries is processed, and invalid initial prediction items in the multiple initial prediction items in each initial prediction dictionary are removed to obtain multiple Prediction dictionary.
可见,在本申请实施例中,根据数据空间大小生成对应的初始预测字典后,对其进行简化处理,去除其中的无效初始预测项,获得的预测字典能够大大缩减其占用空间,降低设备存储和读取预测字典的功耗,进而提升使用预测字典进行数据预测的效率。It can be seen that in the embodiment of the present application, after the corresponding initial prediction dictionary is generated according to the size of the data space, it is simplified to remove invalid initial prediction items, and the obtained prediction dictionary can greatly reduce its occupied space, reduce device storage and Read the power consumption of the prediction dictionary, thereby improving the efficiency of data prediction using the prediction dictionary.
在一个可能的示例中,无效初始预测项满足以下至少一项:重复预测项,无语义预测项,错误语义预测项。In a possible example, the invalid initial predictor satisfies at least one of the following: duplicate predictors, non-semantic predictors, wrong semantic predictors.
在一个可能的示例中,根据当前数据包的已有数据和可填充空间的数据生成填充后当前数据包,包括:将可填充空间的数据添加在当前数据包的已有数据之后,生成填充后当前数据包。In a possible example, the current data packet after filling is generated according to the existing data of the current data packet and the data of the fillable space, including: adding the data of the fillable space after the existing data of the current data packet, and generating the filled current packet.
在一个可能的示例中,MTU中还包括中间件添加数据,发送填充后当前数据包,包括:发送填充后当前数据包,并发送指示信息,指示信息用于指示填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小;In a possible example, the MTU also includes middleware adding data, sending the current data packet after filling, including: sending the current data packet after filling, and sending indication information, and the indication information is used to indicate the current data packet after filling. There is the size of the data space, or it is also used to indicate the size of the fillable space in the current data packet after filling;
该方法还包括:接收响应消息,响应消息用于指示下一设备接收到的填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小。The method also includes: receiving a response message, the response message is used to indicate the space size of the existing data in the current data packet after filling received by the next device, or is also used to indicate the space size of the fillable space in the current data packet after filling size.
可见,本申请实施例中,通过向下一设备发送指示信息,指示填充后当前数据包中的已有数据的空间大小,能够保证真正重要的数据,也即当前数据包中的已有数据能够完整地发送到下一设备,而其他非重要数据,包括可填充空间的数据,以及中间件添加的数据,则略去确认过程,提升数据传输效率。假设指示信息还指示了填充后当前数据包中的可填充空间的大小,则可以确认可填充空间的数据是否完整发送到下一设备,以便通过可填充空间的数据确保填充后当前数据包的传输是无损传输,避免数据包在下一设备被破坏。It can be seen that in the embodiment of the present application, by sending indication information to the next device to indicate the space size of the existing data in the current data packet after filling, it can ensure that the really important data, that is, the existing data in the current data packet can be Completely sent to the next device, while other non-important data, including data that can fill the space, and data added by middleware, omit the confirmation process to improve data transmission efficiency. Assuming that the indication information also indicates the size of the fillable space in the current data packet after filling, it can be confirmed whether the data in the fillable space is completely sent to the next device, so as to ensure the transmission of the current data packet after filling through the data in the fillable space It is a lossless transmission to prevent data packets from being destroyed in the next device.
第二方面,提供了一种数据传输装置,该装置包括:In a second aspect, a data transmission device is provided, the device comprising:
获取单元,用于获取下一设备的MTU,根据MTU以及当前数据包的已有数据的空间大小确定当前数据包的可填充空间的大小;The obtaining unit is used to obtain the MTU of the next device, and determine the size of the fillable space of the current data packet according to the MTU and the size of the existing data of the current data packet;
获取单元,还用于获取与可填充空间的大小对应的目标预测字典,目标预测字典为多个预测字典中的一个;The obtaining unit is also used to obtain a target prediction dictionary corresponding to the size of the fillable space, where the target prediction dictionary is one of multiple prediction dictionaries;
预测单元,用于根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,可填充空间的数据与下一个数据包的在前数据相似度大于预设阈值;The prediction unit is used to obtain the data that can fill the space according to the existing data of the current data packet and the target prediction dictionary, and the similarity between the data that can fill the space and the previous data of the next data packet is greater than the preset threshold;
收发单元,用于根据当前数据包的已有数据和可填充空间的数据生成填充后当前数据包,发送填充后当前数据包。The transceiver unit is configured to generate the filled current data packet according to the existing data of the current data packet and the data in the fillable space, and send the filled current data packet.
在一个可能的示例中,获取单元具体用于:根据MTU确定当前数据包的有效荷载;根据当前数据包的有效荷载和已有数据的空间大小的差值确定当前数据包的可填充空间的大小。In a possible example, the obtaining unit is specifically configured to: determine the payload of the current data packet according to the MTU; determine the size of the fillable space of the current data packet according to the difference between the payload of the current data packet and the space size of existing data .
在一个可能的示例中,预测单元具体用于:将当前数据包的已有数据与目标预测字典进行匹配,获得已有数据对应的预测项,其中,目标预测字典中包括多个预测项,且预测项的大小与可填充空间的大小对应;将预测项输入数据预测模型,根据预测模型的预测结果获得可填充空间的数据。In a possible example, the prediction unit is specifically configured to: match the existing data of the current data packet with the target prediction dictionary to obtain prediction items corresponding to the existing data, wherein the target prediction dictionary includes multiple prediction items, and The size of the prediction item corresponds to the size of the space that can be filled; input the prediction item into the data prediction model, and obtain the data that can fill the space according to the prediction result of the prediction model.
在一个可能的示例中,在获取与可填充空间对应的目标预测字典之前,获取单元还用于:生成多个初始预测字典,多个初始预测字典中每个预测字典对应一个可能的空间大小,且每个预测字典中包括多个初始预测项;对多个初始预测字典中的每个初始预测字典进行处理,去除每个初始预测字典中多个初始预测项中的无效初始预测项,获得多个预测字典。In a possible example, before obtaining the target prediction dictionary corresponding to the fillable space, the obtaining unit is further configured to: generate multiple initial prediction dictionaries, each prediction dictionary in the multiple initial prediction dictionaries corresponds to a possible space size, And each prediction dictionary includes multiple initial prediction items; each initial prediction dictionary in the multiple initial prediction dictionaries is processed, and invalid initial prediction items in the multiple initial prediction items in each initial prediction dictionary are removed to obtain multiple a prediction dictionary.
在一个可能的示例中,无效初始预测项满足以下至少一项:重复预测项,无语义预测项,错误语义预测项。In a possible example, the invalid initial predictor satisfies at least one of the following: duplicate predictors, non-semantic predictors, wrong semantic predictors.
在一个可能的示例中,收发单元具体用于:将可填充空间的数据添加在当前数据包的已有数据之后,生成填充后当前数据包。In a possible example, the transceiver unit is specifically configured to: add data that can fill the space after existing data in the current data packet, to generate the filled current data packet.
在一个可能的示例中,MTU中还包括中间件添加数据,收发单元具体用于:发送填充后当前数据包,并发送指示信息,指示信息用于指示填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小;In a possible example, the MTU also includes data added by middleware, and the transceiver unit is specifically configured to: send the current data packet after filling, and send indication information, the indication information is used to indicate the existing data in the current data packet after filling Space size, or also used to indicate the size of the fillable space in the current packet after filling;
收发单元还用于:接收响应消息,响应消息用于指示下一设备接收到的填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小。The transceiver unit is also used to: receive a response message, the response message is used to indicate the space size of the existing data in the current data packet received by the next device after filling, or it is also used to indicate the fillable space in the current data packet after filling the size of.
第三方面,提供了一种电子装置,上述装置包括:处理器、存储器、通信接口,处理器、存储器和通信接口相互连接,并且完成相互间的通信工作;In a third aspect, an electronic device is provided, and the above-mentioned device includes: a processor, a memory, and a communication interface, and the processor, the memory, and the communication interface are connected to each other and complete mutual communication work;
存储器上存储有可执行程序代码,通信接口用于进行无线通信;Executable program codes are stored in the memory, and the communication interface is used for wireless communication;
处理器用于调取存储器上存储的可执行程序代码,执行如本申请实施例第一方面或第一方面任一方法中所描述的部分或全部步骤。The processor is used to call the executable program code stored in the memory, and execute some or all of the steps described in the first aspect or any method of the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述第一方面或第一方面任一方面的方法。In a fourth aspect, an embodiment of the present application provides a chip system, including: a processor, the processor is coupled to a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor , so that the chip system implements the first aspect or the method of any one of the first aspects.
可选地,该芯片系统还包括接口电路,该接口电路用于交互计算机指令至所述处理器。Optionally, the chip system further includes an interface circuit for exchanging computer instructions to the processor.
可选地,该芯片系统中的处理器可以为一个或多个,该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。Optionally, there may be one or more processors in the chip system, and the processors may be implemented by hardware or by software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented by software, the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, there may be one or more memories in the chip system. The memory can be integrated with the processor, or can be set separately from the processor, which is not limited in this application. Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be respectively arranged on different chips. The setting method of the processor is not specifically limited.
第五方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序或指令,当该计算机程序或指令被执行时,使得计算机执行上述第一方面或第一方面任一方面的方法。In the fifth aspect, the embodiment of the present application provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the computer program or instruction is executed, the computer executes the first aspect or any one of the first aspect Methods.
第六方面,本申请实施例提供了一种计算机程序产品,其中,计算机程序产品包括计算机程序,计算机程序可操作来使计算机执行如本申请实施例第一方面或第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a sixth aspect, the embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to cause the computer to execute the method described in the first aspect or any one of the first aspects of the embodiment of the present application. Some or all of the steps described. The computer program product may be a software installation package.
第七方面,本申请实施例提供了一种数据传输系统,其中包括第二方面所描述的数据传输装置。In a seventh aspect, the embodiment of the present application provides a data transmission system, which includes the data transmission device described in the second aspect.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1A为本申请实施例所适用的网络架构场景示意图;FIG. 1A is a schematic diagram of a network architecture scenario applicable to an embodiment of the present application;
图1B为本申请实施例提供的一种网络模型中的协议封装过程示意图;FIG. 1B is a schematic diagram of a protocol encapsulation process in a network model provided by an embodiment of the present application;
图1C为本申请实施例提供的一种以太网帧的结构示意图;FIG. 1C is a schematic structural diagram of an Ethernet frame provided by an embodiment of the present application;
图2A为本申请实施例提供的一种基于最大传输单元的数据传输加速方法流程图;FIG. 2A is a flowchart of a data transmission acceleration method based on a maximum transmission unit provided in an embodiment of the present application;
图2B为本申请实施例提供的一种多数据包传输示意图;FIG. 2B is a schematic diagram of multi-packet transmission provided by the embodiment of the present application;
图2C为本申请实施例提供的一种预测字典的示意图;FIG. 2C is a schematic diagram of a prediction dictionary provided in the embodiment of the present application;
图2D为本申请实施例提供的一种预测过程示意图;Fig. 2D is a schematic diagram of a prediction process provided by the embodiment of the present application;
图3为本申请实施例提供的一种数据传输装置的结构示意图;FIG. 3 is a schematic structural diagram of a data transmission device provided in an embodiment of the present application;
图4是本申请实施例提供的一种电子装置的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤的过程、方法、系统、产品或设备没有限定于已列出的步骤,而是可选地还包括没有列出的步骤,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device comprising a series of steps is not limited to the listed steps, but optionally also includes steps that are not listed, or optionally includes a reference to these processes, methods, Other steps inherent in the product or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
首先,请参阅图1A,图1A为本申请实施例所适用的网络架构场景示意图,如图1A所示,该网络架构中包括当前设备,和下一设备。当前设备和下一设备为进行网络数据传输的设备。具体例如可以是终端设备与网络设备,也可以是终端设备与终端设备,还可以是网络设备与网络设备。或者该网络架构中还可以包括至少一个中间件。中间件可以为路由器、虚拟专用网络(virtual private network,VPN)服务器或网关等。当前设备用于向下一设备发送数据包。在包括中间件的情况下,当前设备发送的数据包经过中间件到达下一设备。First, please refer to FIG. 1A . FIG. 1A is a schematic diagram of a network architecture scenario applicable to the embodiment of the present application. As shown in FIG. 1A , the network architecture includes a current device and a next device. The current device and the next device are devices for network data transmission. Specifically, for example, it may be a terminal device and a network device, or a terminal device and a terminal device, or a network device and a network device. Or the network architecture may further include at least one middleware. The middleware may be a router, a virtual private network (virtual private network, VPN) server, or a gateway. The current device is used to send packets to the next device. In the case of including the middleware, the data packet sent by the current device reaches the next device through the middleware.
然后,请参阅图1B,图1B为本申请实施例提供的一种网络模型中的协议封装过程示意图,如图1B所示,用户数据在传输层进行TCP协议封装,在网络层进行IP协议封装,在链路层进行以太网协议封装,封装过程包括在数据报文之前添加报文头(header)。Then, please refer to FIG. 1B. FIG. 1B is a schematic diagram of the protocol encapsulation process in a network model provided by the embodiment of the present application. As shown in FIG. 1B, user data is encapsulated by TCP protocol at the transport layer, and encapsulated by IP protocol at the network layer , Ethernet protocol encapsulation is performed at the link layer, and the encapsulation process includes adding a header (header) before the data message.
MTU适用于链路层和网络层。MTU的参数通常与通信接口(网卡(networkinterface card,NIC)或串行端口等)相关联。标准(例如以太网)可以固定MTU的大小;或者系统(例如点对点串行链路)可以在连接时决定MTU。MTU applies to link layer and network layer. The parameter of MTU is generally associated with a communication interface (network interface card (network interface card, NIC) or serial port, etc.). A standard (such as Ethernet) may fix the size of the MTU; or a system (such as a point-to-point serial link) may determine the MTU at connection time.
以以太网为例进行说明,对于在链路层传输的以太网帧来说,最大帧大小通常为1518字节,其中18字节为以太网首部和帧检验序列(frame check sequence,FCS)的开销,其余部分即为IP MTU,也即以太网帧能够承载的最大IP数据包,通常为1500字节。Taking Ethernet as an example, for an Ethernet frame transmitted at the link layer, the maximum frame size is usually 1518 bytes, of which 18 bytes are the Ethernet header and frame check sequence (frame check sequence, FCS) Overhead, the rest is IP MTU, that is, the largest IP packet that an Ethernet frame can carry, usually 1500 bytes.
可参阅图1C,图1C为本申请实施例提供的一种以太网帧的结构示意图,如图1C所示,在MTU中,IP首部占用20字节(bytes),TCP首部占用20字节,那么用户数据(或者称为有效载荷,或TCP最大报文段长度(maximum segment size,MSS))可占用1460字节。Can refer to Fig. 1C, Fig. 1C is the structural representation of a kind of Ethernet frame that the embodiment of the present application provides, as shown in Fig. 1C, in MTU, IP header occupies 20 bytes (bytes), and TCP header occupies 20 bytes, Then user data (or called payload, or TCP maximum segment size (MSS)) may occupy 1460 bytes.
根据前述背景技术的描述可知,以太网帧采用MTU进行数据传输,可以提升数据传输效率。但是每个IP数据包的大小刚好占用一个完整的MTU的可能性很低。大多数情况下,IP数据包远小于MTU时,每个IP数据包在数据链路层需要添加以太网首部再发送出去,这样会导致以太网帧的传输浪费。而当IP数据包大于MTU时,发送设备无法将所有IP数据包通过一个以太网帧发送出去,需要对IP数据包进行分片。分片会影响IP数据包的传输效率,同时也会增加额外的以太网首部和FCS开销。According to the foregoing description of the background technology, it can be known that the Ethernet frame uses the MTU for data transmission, which can improve data transmission efficiency. But the chances that each IP packet will be exactly the size of a full MTU are low. In most cases, when the IP data packet is much smaller than the MTU, each IP data packet needs to add an Ethernet header at the data link layer before sending it out, which will result in wasted transmission of Ethernet frames. However, when the IP data packet is larger than the MTU, the sending device cannot send all the IP data packets through an Ethernet frame, and needs to fragment the IP data packet. Fragmentation will affect the transmission efficiency of IP data packets, and will also increase additional Ethernet header and FCS overhead.
基于此,请参阅图2A,图2A为本申请实施例提供的一种基于最大传输单元的数据传输加速方法流程图,如图2A所示,该方法包括如下步骤:Based on this, please refer to FIG. 2A. FIG. 2A is a flow chart of a data transmission acceleration method based on a maximum transmission unit provided in an embodiment of the present application. As shown in FIG. 2A, the method includes the following steps:
201、获取下一设备的MTU,根据MTU以及当前数据包的已有数据的空间大小确定当前数据包的可填充空间的大小。201. Acquire the MTU of the next device, and determine the size of the fillable space of the current data packet according to the MTU and the size of the existing data space of the current data packet.
当前设备在向下一设备发送数据之前,可以获知下一设备的MTU,以便当前设备根据下一设备的MTU确定自身发送数据包(IP数据包)的大小,避免由于发送的数据包过大,下一设备无法接受的情况。Before the current device sends data to the next device, it can know the MTU of the next device, so that the current device can determine the size of the data packet (IP data packet) to be sent by itself according to the MTU of the next device, so as to avoid the excessive size of the data packet sent. Unacceptable conditions for the next device.
现有技术中,通常只需要确定当前设备发送的数据包小于下一设备的MTU,使得数据包能够正常发送即可。但是在本申请实施例中,为了提升输出传输效率,可以使得以太网帧中的数据包大小接近MTU(小于或等于MTU,小于MTU时与MTU的差值小于预设差值)。In the prior art, it is usually only necessary to determine that the data packet sent by the current device is smaller than the MTU of the next device, so that the data packet can be sent normally. However, in this embodiment of the application, in order to improve the output transmission efficiency, the size of the data packet in the Ethernet frame can be made close to the MTU (less than or equal to the MTU, and the difference between the MTU and the MTU is smaller than the preset difference).
因此,在本申请实施例中,当前设备首先获取下一设备的MTU。如前述描述的,可以根据标准获取,假设当前设备与下一设备通过以太网标准协议进行通信,那么下一设备的MTU可以是预设大小,即1500字节。假设当前设备与下一设备为点对点通信连接,那么下一设备的MTU可以是当前设备从下一设备获取的,或者是两者进行点对点通信连接时互相约定的值。本申请实施例对MTU的具体大小不做限定。以下以MTU为1500字节为示例进行描述。Therefore, in this embodiment of the application, the current device first obtains the MTU of the next device. As described above, it can be obtained according to the standard. Assuming that the current device communicates with the next device through the Ethernet standard protocol, the MTU of the next device can be a preset size, that is, 1500 bytes. Assuming that the current device is in a point-to-point communication connection with the next device, then the MTU of the next device can be obtained by the current device from the next device, or it can be a value mutually agreed between the two when they are in a point-to-point communication connection. The embodiment of the present application does not limit the specific size of the MTU. The following uses an MTU of 1500 bytes as an example for description.
可选地,根据MTU确定当前数据包的可填充空间的大小包括:根据MTU确定当前数据包的有效荷载;根据当前数据包的有效荷载和已有数据的空间大小的差值确定当前数据包的可填充空间的大小。Optionally, determining the size of the fillable space of the current data packet according to the MTU includes: determining the payload of the current packet according to the MTU; The size of the fillable space.
在获取了下一设备的MTU之后,当前设备可以获取当前数据包的已有数据的空间大小,进而确定当前数据包的可填充空间的大小。例如当前设备包括数据包1,且数据包1的已有数据的空间大小为1000字节,那么该数据包的剩余空间大小=MTU-IP首部-TCP首部-已有数据的空间大小=1500-40-1000=460字节。其中MTU-IP首部-TCP首部=有效荷载,因此也可以描述为数据包的剩余空间大小+已有数据的空间大小=有效荷载。可填充空间的大小≤数据包的剩余空间大小。在可填充空间的大小=数据包的剩余空间大小的情况下,可以确定可填充空间的大小为460字节。在可填充空间的大小<数据包的剩余空间大小的情况下,可以进一步设定数据包的剩余空间大小-可填充空间的大小≤预设差值,预设差值例如可以为10字节,50字节等。假设预设差值为50字节,则可填充空间的大小例如可以为400字节。After obtaining the MTU of the next device, the current device can obtain the space size of the existing data of the current data packet, and then determine the size of the fillable space of the current data packet. For example, the current device includes data packet 1, and the space size of existing data in data packet 1 is 1000 bytes, then the remaining space size of the data packet=MTU-IP header-TCP header-space size of existing data=1500- 40-1000 = 460 bytes. Wherein MTU-IP header-TCP header=payload, so it can also be described as remaining space size of data packet+space size of existing data=payload. The size of the fillable space ≤ the size of the remaining space of the data packet. In the case that the size of the fillable space=the remaining space of the data packet, it can be determined that the size of the fillable space is 460 bytes. In the case of the size of the fillable space<the remaining space of the data packet, the size of the remaining space of the data packet-the size of the fillable space≤the preset difference can be further set. The preset difference can be 10 bytes, for example, 50 bytes etc. Assuming that the preset difference value is 50 bytes, the size of the fillable space may be, for example, 400 bytes.
202、获取与所述可填充空间的大小对应的目标预测字典,所述目标预测字典为多个预测字典中的一个。202. Acquire a target prediction dictionary corresponding to the size of the fillable space, where the target prediction dictionary is one of multiple prediction dictionaries.
本申请实施例中,当前数据包的可填充空间的大小用于填充下一个数据包的在前数据。具体可参阅图2B,图2B为本申请实施例提供的一种多数据包传输示意图,如图2B所示,当前设备预计发送3个数据包,其中数据包1为当前数据包,数据包2为数据包1的下一个数据包,数据包3为数据包2的下一个数据包(也即当前数据包和下一个数据包是相对概念,并不特指某个数据包)。那么在传输数据包1时,确定当前可填充空间的大小为400字节,需要获取数据包2的在前400字节数据用于对数据包1所在的MTU中的可填充空间进行填充。同样地,在传输数据包2时,需要获取数据包3的在前数据用于对数据包2所在的MTU中的可填充空间进行填充。In the embodiment of the present application, the size of the fillable space of the current data packet is used to fill the previous data of the next data packet. For details, please refer to Figure 2B. Figure 2B is a schematic diagram of multi-packet transmission provided by the embodiment of the present application. As shown in Figure 2B, the current device is expected to send 3 data packets, wherein data packet 1 is the current data packet, and data packet 2 is the next data packet of data packet 1, and data packet 3 is the next data packet of data packet 2 (that is, the current data packet and the next data packet are relative concepts, and do not specifically refer to a certain data packet). Then, when transmitting data packet 1, it is determined that the size of the current fillable space is 400 bytes, and it is necessary to obtain the first 400 bytes of data of data packet 2 to fill the fillable space in the MTU where data packet 1 is located. Similarly, when the data packet 2 is transmitted, the previous data of the data packet 3 needs to be obtained to fill the fillable space in the MTU where the data packet 2 is located.
考虑到网卡对整个数据体的“文件”没有任何访问权限,而只能访问当前导入的数据包。而下一个数据包是当前数据包的未来数据,在处理当前数据包时还无法直接读取。这样我们无法从下一个数据包中直接借用在前数据。所以应该以某种方式生成下一个数据包的在前数据。首先随机生成的方式应该被排除,因为生成的数据无法保证与下一个数据包中的在前数据相同,而当前数据包中被填充后的数据与下一个数据包的在前数据不同,则当前数据包与下一个数据包不会被认为是完全无损的数据传输,在接收方这样传输的数据将被破坏。Consider that the network card does not have any access to the "file" of the entire data body, but only to the currently imported packet. The next data packet is the future data of the current data packet, which cannot be read directly while processing the current data packet. This way we cannot directly borrow previous data from the next packet. So the preceding data for the next packet should be generated somehow. First, the way of random generation should be excluded, because the generated data cannot be guaranteed to be the same as the previous data in the next data packet, and the filled data in the current data packet is different from the previous data in the next data packet, then the current A data packet and the next data packet will not be considered a completely lossless data transmission, and the data so transmitted will be corrupted on the receiving side.
基于此,本申请实施例提出采用预测字典生成下一个数据包的在前数据,用于填充当前数据包的可填充空间,生成填充后当前数据包。在该过程中,首先获取与当前数据包的可填充空间的大小对应的目标预测字典。本申请实施例中提供多个预测字典,每个预测字典对应不同数据大小。例如包括200字节字典,400字节字典,600字节字典,800字节字典等。可填充空间的大小为200字节,则对应的目标预测字典为200字节字典。Based on this, the embodiment of the present application proposes to use the prediction dictionary to generate the previous data of the next data packet, which is used to fill the fillable space of the current data packet, and generate the filled current data packet. In this process, first obtain the target prediction dictionary corresponding to the size of the fillable space of the current data packet. Multiple prediction dictionaries are provided in the embodiment of the present application, and each prediction dictionary corresponds to a different data size. Examples include 200-byte dictionaries, 400-byte dictionaries, 600-byte dictionaries, 800-byte dictionaries, etc. The size of the fillable space is 200 bytes, and the corresponding target prediction dictionary is a 200-byte dictionary.
在获取与当前数据包的可填充空间的大小对应的目标预测字典之前,可以先生成多个预测字典。可选情况下,在获取与可填充空间对应的目标预测字典之前,该方法还包括:生成多个初始预测字典,多个初始预测字典中每个预测字典对应一个可能的空间大小,且每个预测字典中包括多个初始预测项;对多个初始预测字典中的每个初始预测字典进行处理,去除每个初始预测字典中多个初始预测项中的无效初始预测项,获得多个预测字典。Before obtaining the target prediction dictionary corresponding to the size of the fillable space of the current data packet, multiple prediction dictionaries may be generated first. Optionally, before obtaining the target prediction dictionary corresponding to the fillable space, the method further includes: generating multiple initial prediction dictionaries, each prediction dictionary in the multiple initial prediction dictionaries corresponds to a possible space size, and each The prediction dictionary includes multiple initial prediction items; each initial prediction dictionary in the multiple initial prediction dictionaries is processed, and invalid initial prediction items among the multiple initial prediction items in each initial prediction dictionary are removed to obtain multiple prediction dictionaries .
初始预测字典对应的可能的空间大小,即上述举例的200字节,400字节,600字节等。每个预测字典中包括的初始预测项,是指该可能的空间大小对应的数据编码方式。因此,每个初始预测字典中的初始预测项=2^(N*8)项,N即为该初始预测字典对应的可能的空间大小。The possible space size corresponding to the initial prediction dictionary is 200 bytes, 400 bytes, 600 bytes, etc. in the above example. The initial prediction item included in each prediction dictionary refers to the data encoding method corresponding to the possible space size. Therefore, the initial prediction items in each initial prediction dictionary=2^(N*8) items, and N is the possible space size corresponding to the initial prediction dictionary.
具体可参阅图2C,图2C为本申请实施例提供的一种预测字典的示意图,如图2C所示,预测字典1对应的可能的空间大小为100字节,其中的初始预测项为100字节的数据可能的编码,总共有2^(100*8)项。由此可以看出,初始预测字典中包括的初始预测项是非常庞大的,如果采用这样的初始预测字典去预测数据,首先会给当前设备造成非常大的存储和读取负担,其次预测效率也会非常低下。实际上,初始预测字典中的初始预测项是可以简化处理的,去除其中的无效初始预测项,获得更简洁的预测字典,以便降低当前设备的存储和读取负担,并提升预测效率。For details, please refer to FIG. 2C. FIG. 2C is a schematic diagram of a prediction dictionary provided by the embodiment of the present application. As shown in FIG. 2C, the possible space size corresponding to prediction dictionary 1 is 100 bytes, and the initial prediction item is 100 characters. There are 2^(100*8) items in total for possible encodings of section data. It can be seen from this that the initial prediction items included in the initial prediction dictionary are very large. If such an initial prediction dictionary is used to predict data, it will firstly cause a very large storage and reading burden on the current device, and secondly, the prediction efficiency will also decrease. will be very low. In fact, the initial prediction items in the initial prediction dictionary can be simplified, and the invalid initial prediction items can be removed to obtain a more concise prediction dictionary, so as to reduce the storage and reading burden of the current device and improve prediction efficiency.
可选地,无效初始预测项满足以下至少一项:重复预测项,无语义预测项,错误语义预测项。Optionally, the invalid initial predictor satisfies at least one of the following: repeated predictors, non-semantic predictors, and wrong semantic predictors.
初始预测字典中的无效初始预测项可以包括重复预测项。举例如图2C中所示,对于100字节的初始预测字典,有0000…0001这一初始预测项,表示值1,但是对于小于100字节的预测字典,也有表示值1的预测项。区别在于,100字节的初始预测字典的符号1前面包括2^(100*8)-1个符号0,而小于100字节的预测字典,其预测项的符号1前面包括2^(N’*8)-1个符号0,N’小于100。但是两者的含义相同。因此,对于100字节的初始预测字典来说,0000…0001这一初始预测项为重复初始预测项,可以从100字节的初始预测字典中删除。另外,初始预测字典中的无效初始预测项可以包括无语义预测项。例如初始预测项的编码表征字符串“ooy”(图中未示出),但是这个字符串没有对应的语义,在文本中被运用到的概率也极其低,因此,可以将该项初始预测项从初始预测字典中删除。或者,初始预测字典中的无效初始预测项可以包括错误语义预测项。例如初始预测项的编码表征字符串“intensiwe”(图中未示出),但是该拼写是错误的单词,可以将该初始预测项从初始预测字典中删除。初始预测字典中的无效初始预测项还可以包括其他类型的,本申请实施例的上述举例不应对此作出限定。Invalid initial predictors in the initial predictor dictionary may include duplicate predictors. For example, as shown in FIG. 2C , for an initial prediction dictionary of 100 bytes, there is an initial prediction item 0000...0001 representing a value of 1, but for a prediction dictionary of less than 100 bytes, there is also a prediction item representing a value of 1. The difference is that the 100-byte initial prediction dictionary includes 2^(100*8)-1 symbols 0 in front of the symbol 1, and the prediction dictionary smaller than 100 bytes includes 2^(N' *8) - 1 symbol 0, N' less than 100. But both mean the same thing. Therefore, for the 100-byte initial prediction dictionary, the initial prediction item 0000...0001 is a repeated initial prediction item and can be deleted from the 100-byte initial prediction dictionary. Additionally, invalid initial predictors in the initial predictive dictionary may include non-semantic predictors. For example, the encoding character string "ooy" of the initial prediction item (not shown in the figure), but this string has no corresponding semantics, and the probability of being used in the text is extremely low. Therefore, the initial prediction item can be Remove from initial prediction dictionary. Alternatively, invalid initial predictors in the initial predictive dictionary may include wrong semantic predictors. For example, the encoding character string "intensiwe" of the initial prediction item (not shown in the figure), but the spelling is a wrong word, the initial prediction item may be deleted from the initial prediction dictionary. The invalid initial prediction items in the initial prediction dictionary may also include other types, which should not be limited by the above examples in the embodiments of the present application.
去除初始预测字典中的无效预测项之后,能够大大优化预测字典的空间占用情况,例如6字节的初始预测字典中包含的初始预测项为2^(6*8),经过简化后大约包括2^45个(有效)预测项。而800字节的初始预测字典中包含的初始预测项为2^(800*8),经过简化后大约包括2^(800*8*0.2)个预测项。After removing the invalid prediction items in the initial prediction dictionary, the space occupancy of the prediction dictionary can be greatly optimized. For example, the initial prediction items contained in the 6-byte initial prediction dictionary are 2^(6*8), which after simplification includes about 2 ^45 (valid) predictors. The initial prediction items contained in the 800-byte initial prediction dictionary are 2^(800*8), and approximately include 2^(800*8*0.2) prediction items after simplification.
可见,在本申请实施例中,根据数据空间大小生成对应的初始预测字典后,对其进行简化处理,去除其中的无效初始预测项,获得的预测字典能够大大缩减其占用空间,降低设备存储和读取预测字典的功耗,进而提升使用预测字典进行数据预测的效率。It can be seen that in the embodiment of the present application, after the corresponding initial prediction dictionary is generated according to the size of the data space, it is simplified to remove invalid initial prediction items, and the obtained prediction dictionary can greatly reduce its occupied space, reduce device storage and Read the power consumption of the prediction dictionary, thereby improving the efficiency of data prediction using the prediction dictionary.
203、根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,可填充空间的数据与下一个数据包的在前数据相似度大于预设阈值。203. Obtain the data that can fill the space according to the existing data of the current data packet and the target prediction dictionary, and the similarity between the data that can fill the space and the previous data of the next data packet is greater than a preset threshold.
在获得目标预测字典后,可以根据当前数据包的已有数据和目标预测字典预测获得可填充空间的数据。可选地,根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,包括:将当前数据包的已有数据与目标预测字典进行匹配,获得已有数据对应的预测项,其中,目标预测字典中包括多个预测项,且预测项的大小与可填充空间的大小对应;将预测项输入数据预测模型,根据预测模型的预测结果获得可填充空间的数据。After the target prediction dictionary is obtained, the data that can fill the space can be obtained according to the existing data of the current data packet and the target prediction dictionary. Optionally, obtaining the data that can fill the space according to the existing data of the current data packet and the target prediction dictionary includes: matching the existing data of the current data packet with the target prediction dictionary to obtain the prediction items corresponding to the existing data, wherein , the target prediction dictionary includes multiple prediction items, and the size of the prediction items corresponds to the size of the space that can be filled; input the prediction items into the data prediction model, and obtain the data that can fill the space according to the prediction results of the prediction model.
具体地,可参阅图2D,图2D为本申请实施例提供的一种预测过程示意图,如图2D所示,预测获得可填充空间的数据的过程,首先根据当前数据包的已有数据可以匹配到目标预测字典中的预测项,例如数据包的已有数据为200字节,那么可以与200字节的目标预测字典进行匹配,具体是匹配到200字节的目标预测字典中的预测项n。因为预测项n与数据包的已有数据都为200字节,那么两者的匹配率可能达到100%。当然也可能目标预测字典中不存在与数据包的已有数据匹配率达到100%的预测项,因此,可以设置数据包的已有数据与目标预测字典中的预测项的匹配率达到预设匹配率,则认为两者匹配成功。预设匹配率可以为90%,95%等。Specifically, please refer to FIG. 2D, which is a schematic diagram of a prediction process provided by the embodiment of the present application. As shown in FIG. 2D, the process of predicting and obtaining data that can fill the space, first of all, according to the existing data of the current data packet can match To the prediction item in the target prediction dictionary, for example, if the existing data of the data packet is 200 bytes, then it can be matched with the 200-byte target prediction dictionary, specifically matching the prediction item n in the 200-byte target prediction dictionary . Because both the prediction item n and the existing data of the data packet are 200 bytes, the matching rate of the two may reach 100%. Of course, it is also possible that there is no prediction item in the target prediction dictionary that has a 100% matching rate with the existing data in the data packet. Therefore, you can set the matching rate between the existing data in the data packet and the prediction items in the target prediction dictionary to reach a preset match rate, it is considered that the two match successfully. The preset match rate can be 90%, 95%, etc.
在一些情况下,数据包的已有数据的空间大小可能并不刚好对应某个预测字典的大小,例如已有数据的空间大小为110字节,而不存在110字典的预测字典。这种情况下,可以将已有数据的空间大小拆分成两个空间大小,然后分别获取与两个空间大小对应的目标预测字典用于匹配两个空间大小的数据。例如110字节可以拆分为100字节和10字节,然后分别用于与100字节的目标字典中的预测项以及10字节的目标字典中的预测项进行匹配。或者,可以获取与已有数据的空间大小最接近的预测字典作为目标预测字典。例如已有数据的空间大小为110字节,可以获取100字节的预测字典作为目标预测字典,匹配其中的预测项。In some cases, the space size of the existing data in the data packet may not exactly correspond to the size of a certain prediction dictionary. For example, the space size of the existing data is 110 bytes, and there is no prediction dictionary with 110 dictionaries. In this case, the spatial size of the existing data can be split into two spatial sizes, and then the target prediction dictionaries corresponding to the two spatial sizes are respectively obtained to match the data of the two spatial sizes. For example, 110 bytes can be divided into 100 bytes and 10 bytes, and then used to match the predicted items in the 100-byte target dictionary and the predicted items in the 10-byte target dictionary respectively. Alternatively, the prediction dictionary whose spatial size is closest to the existing data can be obtained as the target prediction dictionary. For example, the space size of the existing data is 110 bytes, and a 100-byte prediction dictionary can be obtained as the target prediction dictionary to match the prediction items therein.
获得与数据包的已有数据匹配的预测项n之后,可以将预测项n输入数据预测模型,根据预测结果得到可填充空间的数据。具体地,数据预测模型是根据大量历史数据训练获得的。历史数据中包括训练数据和验证数据,训练数据中包括在前数据和在后数据,在前数据为输入数据,在后数据即为输出数据。当在前数据对应同一个输出数据的概率大于预设概率时,可以认为该输出数据为在前数据的预测结果。例如训练数据为0001111111…010101110,其中的在先数据,即前100字节数据为0001111111…,将在先数据输入初始数据预测模型,调整初始数据预测模型中的参数,使得获得的数据预测模型的输出结果对应预测结果为…010101110,完成对数据预测模型的训练。那么,当将目标预测字典中的预测项作为输出数据输入数据预测模型时,获得的预测结果,即为该预测项作为在前数据时,其可能对应的在后数据。相对应地,可以确定数据包的已有数据接下来可能对应的数据,即为预测项作为在前数据预测获得的在后数据。可以作为可填充空间的数据。After obtaining the prediction item n matching the existing data of the data packet, the prediction item n can be input into the data prediction model, and the data that can fill the space can be obtained according to the prediction result. Specifically, the data prediction model is obtained through training based on a large amount of historical data. Historical data includes training data and verification data, training data includes previous data and later data, the former data is the input data, and the later data is the output data. When the probability that the previous data corresponds to the same output data is greater than the preset probability, the output data can be considered as the prediction result of the previous data. For example, the training data is 0001111111...010101110, the previous data, that is, the first 100 bytes of data is 0001111111..., input the previous data into the initial data prediction model, adjust the parameters in the initial data prediction model, so that the obtained data prediction model The corresponding prediction result of the output result is...010101110, and the training of the data prediction model is completed. Then, when the prediction item in the target prediction dictionary is input into the data prediction model as output data, the obtained prediction result is the subsequent data that may correspond to the prediction item as the previous data. Correspondingly, the data that may correspond to the existing data of the data packet next may be determined, that is, the predicted item is the subsequent data that is predicted and obtained as the previous data. Data that can act as a fillable space.
在本申请实施例中,将数据包的已有数据与目标预测字典中的预测项进行匹配,然后将预测项输入数据预测模型获得预测结果,这是因为,对于数据包的已有数据来说,其内容是不固定的,直接采用数据包的已有数据输入数据预测模型进行预测,其预测结果的准确性不可控。而预测项是相对固定的数据,输入数据预测模型进行预测,其预测结果的准确性更有保障,也进一步保障了获得的可填充空间的数据的准确性。同时由于预测项的长度比较固定,也使得数据预测模型只需要针对特定长度的输入数据进行预测,提升了数据预测效率。In this embodiment of the application, the existing data of the data packet is matched with the prediction items in the target prediction dictionary, and then the prediction items are input into the data prediction model to obtain the prediction result. This is because, for the existing data of the data packet , its content is not fixed, and the existing data in the data package is directly used to input the data prediction model for prediction, and the accuracy of the prediction result is uncontrollable. The prediction item is relatively fixed data, input data prediction model for prediction, the accuracy of the prediction result is more guaranteed, and the accuracy of the obtained data that can fill the space is further guaranteed. At the same time, because the length of the prediction item is relatively fixed, the data prediction model only needs to predict the input data of a specific length, which improves the efficiency of data prediction.
204、根据当前数据包的已有数据和可填充空间的数据生成填充后当前数据包,发送填充后当前数据包。204. Generate the filled current data packet according to the existing data of the current data packet and the data of the fillable space, and send the filled current data packet.
在获得当前数据包的可填充空间的数据之后,可以根据当前数据包的已有数据和当前数据包的可填充空间的数据生成填充后当前数据包。其中,根据当前数据包的已有数据和可填充空间的数据生成填充后当前数据包,包括:将可填充空间的数据添加在当前数据包的已有数据之后,生成填充后当前数据包。也即是说,将两段数据进行拼接,即可生成填充后当前数据包。然后由当前设备将填充后当前数据包发送给下一设备,即完成数据包的传输。After the data of the fillable space of the current data packet is obtained, the filled current data packet may be generated according to the existing data of the current data packet and the data of the fillable space of the current data packet. Wherein, generating the current data packet after filling according to the existing data of the current data packet and the data of the fillable space includes: adding the data of the fillable space after the existing data of the current data packet to generate the current data packet after filling. That is to say, the current data packet after filling can be generated by splicing two pieces of data. Then the current device sends the filled current data packet to the next device, that is, the transmission of the data packet is completed.
可见,在本申请实施例中,通过获取设备进行数据传输的MTU确定MTU中的可填充空间大小。再获取目标预测字典,根据目标预测字典对可填充空间的数据进行预测,再根据当前数据包的已有数据和可填充空间的数据生成当前数据包,发送当前数据包。由于当前数据包根据MTU大小生成,能够最终达成提升数据传输效率、加快数据传输速度的效果。It can be seen that in the embodiment of the present application, the size of the fillable space in the MTU is determined by acquiring the MTU for data transmission of the device. Obtain the target prediction dictionary again, predict the data that can fill the space according to the target prediction dictionary, and then generate the current data packet according to the existing data of the current data packet and the data that can fill the space, and send the current data packet. Since the current data packets are generated according to the MTU size, the effect of improving data transmission efficiency and speeding up data transmission speed can be finally achieved.
可选地,已有数据的空间大小和可填充空间的大小之和小于MTU时,MTU中还包括中间件添加数据,发送填充后当前数据包,包括:发送填充后当前数据包,并发送指示信息,指示信息用于指示填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小;该方法还包括:接收响应消息,响应消息用于指示接收端接收到的填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小。Optionally, when the sum of the space size of the existing data and the size of the fillable space is less than the MTU, the MTU also includes middleware adding data, sending the current data packet after filling, including: sending the current data packet after filling, and sending an indication Information, the indication information is used to indicate the space size of the existing data in the current data packet after filling, or is also used to indicate the size of the fillable space in the current data packet after filling; the method also includes: receiving a response message, the response message It is used to indicate the space size of the existing data in the current data packet after filling received by the receiving end, or it is also used to indicate the size of the fillable space in the current data packet after filling.
可参阅前述图1A中的网络架构场景示意图,当前设备在向下一设备发送填充后当前数据包时,可能会经过一个或多个中间件,而中间件可能会在填充后当前数据包中添加额外的数据。这些数据的添加可能导致填充后当前数据包的数据超过MTU,继而造成分片的产生,削弱本申请实施例采用的基于MTU进行数据包发送的方法带来的技术效果。Refer to the schematic diagram of the network architecture scenario in Figure 1A above. When the current device sends the filled current data packet to the next device, it may pass through one or more middleware, and the middleware may add additional data. The addition of these data may cause the data of the current data packet after filling to exceed the MTU, and then cause fragmentation, which weakens the technical effect brought by the method for sending data packets based on the MTU adopted in the embodiment of the present application.
基于此,可以由当前设备在发送填充后当前数据包的同时或之后,向下一设备发送指示信息,用于指示填充后数据包中的已有数据的空间大小。下一设备接收到填充后当前数据包之后,确定其中实际的已有数据的空间大小(不包括可填充空间的数据),对比两者,确定接收过程是否发生数据丢失的情况。然后,下一设备向当前设备发送响应消息,用于指示下一设备接收到的填充后当前数据包中的已有数据的空间大小,以便当前设备对比自身发送的填充后当前数据包中的已有数据的空间大小与下一设备接收到的填充后数据包中的已有数据的空间大小是否相同,如果不相同,则可能填充后当前数据包的传输过程发生了已有数据的丢失,当前设备可以再次发送填充后当前数据包给下一设备。如果相同,则填充后当前数据包的传输过程没有发生已有数据的丢失,当前设备可以不必再次发送填充后当前数据包给下一设备。至于可填充空间的数据,以及中间件在填充后当前数据包添加的数据,无论是否发生丢失,都可以不必通过再次发送填充后当前数据包发送给下一设备。该过程能够保证真正重要的数据,也即当前数据包中的已有数据能够完整地发送到下一设备,而其他非重要数据,包括可填充空间的数据,以及中间件添加的数据,则略去确认过程,提升数据传输效率。Based on this, the current device may send indication information to the next device at the same time or after sending the filled current data packet, which is used to indicate the space size of the existing data in the filled data packet. After the next device receives the filled current data packet, it determines the size of the actual existing data space (excluding the data that can be filled), compares the two, and determines whether data loss occurs during the receiving process. Then, the next device sends a response message to the current device, which is used to indicate the space size of the existing data in the current data packet after the padding received by the next device, so that the current device can compare the existing data in the current data packet after the padding sent by itself. Whether the size of the space with data is the same as the space size of the existing data in the filled data packet received by the next device, if not, the existing data may be lost during the transmission process of the current data packet after filling. The device can send the padded current data packet to the next device again. If they are the same, no loss of existing data occurs in the transmission process of the current data packet after filling, and the current device does not need to send the current data packet after filling to the next device again. As for the data that can fill the space, and the data added by the middleware to the current data packet after filling, no matter whether it is lost or not, it is not necessary to send the filled current data packet to the next device again. This process can ensure that the really important data, that is, the existing data in the current data packet can be completely sent to the next device, while other non-important data, including the data that can fill the space and the data added by the middleware, will be omitted. To confirm the process, improve the efficiency of data transmission.
可能的情况下,当前设备发送给下一设备的指示信息还用于指示填充后当前数据包中的可填充空间的大小,也即是说,当前设备也需要确认可填充空间的数据是否完整发送到下一设备,因为可填充空间的数据可以确保填充后当前数据包的传输是无损传输,避免数据包在下一设备被破坏。If possible, the indication information sent by the current device to the next device is also used to indicate the size of the fillable space in the current data packet after filling, that is to say, the current device also needs to confirm whether the data in the fillable space is completely sent To the next device, because the data that can fill the space can ensure that the transmission of the current data packet after filling is lossless transmission, preventing the data packet from being destroyed in the next device.
可能的情况下,下一设备向当前设备发送的响应消息也可以是确认信息,用于确认当前设备发送的填充后当前数据包中的已有数据的空间大小与下一设备接收到的填充后当前数据包的已有数据的空间大小是否相同(或者还用于确认当前设备发送的填充后当前数据包中的可填充空间的大小与下一设备接收到的填充后当前数据包中的可填充空间的大小是否相同),则当前设备可以根据确认信息直接决定是否重新发送填充后当前数据包而不需要再做比较。提升了当前设备与下一设备的通信效率。If possible, the response message sent by the next device to the current device can also be confirmation information, which is used to confirm the space size of the existing data in the current data packet after the padding sent by the current device and the padding received by the next device. Whether the space size of the existing data in the current data packet is the same (or it is also used to confirm that the size of the fillable space in the current data packet sent by the current device is the same as the fillable space in the current data packet received by the next device space size is the same), the current device can directly decide whether to resend the filled current data packet according to the confirmation information without further comparison. The communication efficiency between the current device and the next device is improved.
与上述图2A~图2D对应实施例一致的,请参阅图3,图3为本申请实施例提供的一种数据传输装置300的结构示意图,如图3所示,其中包括:Consistent with the above-mentioned embodiments corresponding to FIG. 2A to FIG. 2D , please refer to FIG. 3 . FIG. 3 is a schematic structural diagram of a data transmission device 300 provided in the embodiment of the present application, as shown in FIG. 3 , which includes:
获取单元301,用于获取下一设备的MTU,根据MTU以及当前数据包的已有数据的空间大小确定当前数据包的可填充空间的大小;The obtaining unit 301 is used to obtain the MTU of the next device, and determine the size of the fillable space of the current data packet according to the MTU and the space size of the existing data of the current data packet;
获取单元301,还用于获取与可填充空间的大小对应的目标预测字典,目标预测字典为多个预测字典中的一个;The obtaining unit 301 is also used to obtain a target prediction dictionary corresponding to the size of the fillable space, where the target prediction dictionary is one of multiple prediction dictionaries;
预测单元302,用于根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,可填充空间的数据与下一个数据包的在前数据相似度大于预设阈值;The prediction unit 302 is used to obtain data that can fill the space according to the existing data of the current data packet and the target prediction dictionary, and the similarity between the data that can fill the space and the previous data of the next data packet is greater than a preset threshold;
收发单元303,用于根据当前数据包的已有数据和可填充空间的数据生成填充后当前数据包,发送填充后当前数据包。The transceiver unit 303 is configured to generate the filled current data packet according to the existing data of the current data packet and the data of the fillable space, and send the filled current data packet.
在一个可能的示例中,获取单元301具体用于:根据MTU确定当前数据包的有效荷载;根据当前数据包的有效荷载和已有数据的空间大小的差值确定当前数据包的可填充空间的大小。In a possible example, the obtaining unit 301 is specifically configured to: determine the payload of the current data packet according to the MTU; determine the fillable space of the current data packet according to the difference between the payload of the current data packet and the space size of the existing data size.
在一个可能的示例中,预测单元302具体用于:将当前数据包的已有数据与目标预测字典进行匹配,获得已有数据对应的预测项,其中,目标预测字典中包括多个预测项,且预测项的大小与可填充空间的大小对应;将预测项输入数据预测模型,根据预测模型的预测结果获得可填充空间的数据。In a possible example, the prediction unit 302 is specifically configured to: match the existing data of the current data packet with the target prediction dictionary to obtain prediction items corresponding to the existing data, wherein the target prediction dictionary includes multiple prediction items, And the size of the prediction item corresponds to the size of the space that can be filled; the prediction item is input into the data prediction model, and the data that can fill the space is obtained according to the prediction result of the prediction model.
在一个可能的示例中,在获取与可填充空间对应的目标预测字典之前,获取单元301还用于:生成多个初始预测字典,多个初始预测字典中每个预测字典对应一个可能的空间大小,且每个预测字典中包括多个初始预测项;对多个初始预测字典中的每个初始预测字典进行处理,去除每个初始预测字典中多个初始预测项中的无效初始预测项,获得多个预测字典。In a possible example, before obtaining the target prediction dictionary corresponding to the fillable space, the obtaining unit 301 is further configured to: generate multiple initial prediction dictionaries, each prediction dictionary in the multiple initial prediction dictionaries corresponds to a possible space size , and each prediction dictionary includes multiple initial prediction items; each initial prediction dictionary in the multiple initial prediction dictionaries is processed, and the invalid initial prediction items in the multiple initial prediction items in each initial prediction dictionary are removed, and the obtained Multiple prediction dictionaries.
在一个可能的示例中,无效初始预测项满足以下至少一项:重复预测项,无语义预测项,错误语义预测项。In a possible example, the invalid initial predictor satisfies at least one of the following: duplicate predictors, non-semantic predictors, wrong semantic predictors.
在一个可能的示例中,收发单元303具体用于:将可填充空间的数据添加在当前数据包的已有数据之后,生成填充后当前数据包。In a possible example, the transceiving unit 303 is specifically configured to: add data that can fill the space after existing data in the current data packet, to generate the filled current data packet.
在一个可能的示例中,MTU中还包括中间件添加数据,收发单元303具体用于:发送填充后当前数据包,并发送指示信息,指示信息用于指示填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小;In a possible example, the MTU also includes data added by middleware, and the transceiver unit 303 is specifically configured to: send the current data packet after filling, and send indication information, the indication information is used to indicate the existing data in the current data packet after filling The size of the space, or also used to indicate the size of the fillable space in the current packet after filling;
收发单元303还用于:接收响应消息,响应消息用于指示下一设备接收到的填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小。The transceiver unit 303 is also used to: receive a response message, the response message is used to indicate the space size of the existing data in the current data packet received by the next device after filling, or it is also used to indicate the space that can be filled in the current data packet after filling The size of the space.
具体地,本申请实施例可以根据上述方法示例对数据采集装置进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。Specifically, the embodiment of the present application can divide the functional units of the data acquisition device according to the above method example, for example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit . The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
与上述图2A~图2D对应实施例一致的,请参阅图4,图4是本申请实施例提供的一种电子装置1000的结构示意图,如图4所示:该装置包括处理器、存储器、通信接口,处理器、存储器和通信接口相互连接,并且完成相互间的通信工作;Consistent with the embodiments corresponding to the above-mentioned Figures 2A to 2D, please refer to Figure 4, which is a schematic structural diagram of an electronic device 1000 provided by an embodiment of the present application, as shown in Figure 4: the device includes a processor, a memory, The communication interface, the processor, the memory and the communication interface are connected to each other, and complete the mutual communication work;
存储器上存储有可执行程序代码,通信接口用于进行无线通信;Executable program codes are stored in the memory, and the communication interface is used for wireless communication;
处理器用于调取存储器上存储的可执行程序代码,执行如上述方法实施例中记载的任何一种基于最大传输单元的数据传输加速方法的部分或全部步骤,上述计算机包括电子终端设备。The processor is used to call the executable program code stored in the memory, and execute some or all steps of any one of the maximum transmission unit-based data transmission acceleration methods described in the above method embodiments, and the above computer includes electronic terminal equipment.
其中,存储器可以是易失性存储器如动态随机存储器DRAM,也可以是非易失性存储器如机械硬盘。上述存储器用于存储一组可执行程序代码,上述处理器用于调用存储器中存储的可执行程序代码,可以执行包括以下指令:Wherein, the memory may be a volatile memory such as a dynamic random access memory (DRAM), or a non-volatile memory such as a mechanical hard disk. The above-mentioned memory is used to store a set of executable program codes, and the above-mentioned processor is used to call the executable program codes stored in the memory, and can execute instructions including the following:
获取下一设备的MTU,根据MTU以及当前数据包的已有数据的空间大小确定当前数据包的可填充空间的大小;获取与可填充空间的大小对应的目标预测字典,目标预测字典为多个预测字典中的一个;根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,可填充空间的数据与下一个数据包的在前数据相似度大于预设阈值;根据当前数据包的已有数据和可填充空间的数据生成当前数据包,发送当前数据包。Obtain the MTU of the next device, determine the size of the fillable space of the current packet according to the MTU and the size of the existing data in the current packet; obtain the target prediction dictionary corresponding to the size of the fillable space, and the target prediction dictionary is multiple One of the prediction dictionaries; the data that can fill the space is obtained according to the existing data of the current data packet and the target prediction dictionary, and the similarity between the data that can fill the space and the previous data of the next data packet is greater than the preset threshold; according to the current data packet The current data packet is generated from the existing data and the data that can be filled, and the current data packet is sent.
可见,在本申请实施例中,通过获取设备进行数据传输的MTU确定MTU中的可填充空间大小。再获取目标预测字典,根据目标预测字典对可填充空间的数据进行预测,再根据当前数据包的已有数据和可填充空间的数据生成当前数据包,发送当前数据包。由于当前数据包根据MTU大小生成,能够最终达成提升数据传输效率、加快数据传输速度的效果。It can be seen that in the embodiment of the present application, the size of the fillable space in the MTU is determined by acquiring the MTU for data transmission of the device. Obtain the target prediction dictionary again, predict the data that can fill the space according to the target prediction dictionary, and then generate the current data packet according to the existing data of the current data packet and the data that can fill the space, and send the current data packet. Since the current data packets are generated according to the MTU size, the effect of improving data transmission efficiency and speeding up data transmission speed can be finally achieved.
可选地,根据MTU以及当前数据包的已有数据的空间大小确定当前数据包的可填充空间的大小,包括:根据MTU确定当前数据包的有效荷载;根据当前数据包的有效荷载和已有数据的空间大小的差值确定当前数据包的可填充空间的大小。Optionally, determining the size of the fillable space of the current data packet according to the MTU and the size of the existing data of the current data packet includes: determining the payload of the current packet according to the MTU; according to the payload of the current packet and the existing The difference in the space size of the data determines the size of the fillable space of the current data packet.
可选地,根据当前数据包的已有数据和目标预测字典获得可填充空间的数据,包括:将当前数据包的已有数据与目标预测字典进行匹配,获得已有数据对应的预测项,其中,目标预测字典中包括多个预测项,且预测项的大小与可填充空间的大小对应;将预测项输入数据预测模型,根据预测模型的预测结果获得可填充空间的数据。Optionally, obtaining the data that can fill the space according to the existing data of the current data packet and the target prediction dictionary includes: matching the existing data of the current data packet with the target prediction dictionary to obtain the prediction items corresponding to the existing data, wherein , the target prediction dictionary includes multiple prediction items, and the size of the prediction items corresponds to the size of the space that can be filled; input the prediction items into the data prediction model, and obtain the data that can fill the space according to the prediction results of the prediction model.
可选地,在获取与可填充空间对应的目标预测字典之前,该方法还包括:生成多个初始预测字典,多个初始预测字典中每个预测字典对应一个可能的空间大小,且每个预测字典中包括多个初始预测项;对多个初始预测字典中的每个初始预测字典进行处理,去除每个初始预测字典中多个初始预测项中的无效初始预测项,获得多个预测字典。Optionally, before obtaining the target prediction dictionary corresponding to the fillable space, the method further includes: generating multiple initial prediction dictionaries, each prediction dictionary in the multiple initial prediction dictionaries corresponds to a possible space size, and each prediction The dictionary includes a plurality of initial prediction items; each initial prediction dictionary in the plurality of initial prediction dictionaries is processed, and invalid initial prediction items in the plurality of initial prediction items in each initial prediction dictionary are removed to obtain multiple prediction dictionaries.
可选地,无效初始预测项满足以下至少一项:重复预测项,无语义预测项,错误语义预测项。Optionally, the invalid initial predictor satisfies at least one of the following: repeated predictors, non-semantic predictors, and wrong semantic predictors.
可选地,根据当前数据包的已有数据和可填充空间的数据生成填充后当前数据包,包括:将可填充空间的数据添加在当前数据包的已有数据之后,生成填充后当前数据包。Optionally, generating the current data packet after filling according to the existing data of the current data packet and the data of the fillable space includes: adding the data of the fillable space after the existing data of the current data packet, and generating the current data packet after filling .
可选地,MTU中还包括中间件添加数据,发送填充后当前数据包,包括:发送填充后当前数据包,并发送指示信息,指示信息用于指示填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小;Optionally, the MTU also includes middleware adding data, sending the current data packet after filling, including: sending the current data packet after filling, and sending indication information, the indication information is used to indicate the existing data in the current data packet after filling Space size, or also used to indicate the size of the fillable space in the current packet after filling;
该方法还包括:接收响应消息,响应消息用于指示下一设备接收到的填充后当前数据包中的已有数据的空间大小,或者还用于指示填充后当前数据包中的可填充空间的大小。The method also includes: receiving a response message, the response message is used to indicate the space size of the existing data in the current data packet after filling received by the next device, or is also used to indicate the space size of the fillable space in the current data packet after filling size.
本申请实施例提供了一种计算机程序产品,其中,计算机程序产品包括计算机程序,计算机程序可操作来使计算机如上述方法实施例中记载的任何一种基于最大传输单元的数据传输加速方法的部分或全部步骤,该计算机程序产品可以是一个软件安装包。An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to make the computer as part of any one of the maximum transmission unit-based data transmission acceleration methods described in the above method embodiments or all steps, the computer program product may be a software installation package.
本申请实施例提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序用于执行上述实施例中记载的任何一种基于最大传输单元的数据传输加速方法的部分或全部步骤。An embodiment of the present application provides a computer-readable storage medium storing a computer program for performing some or all of the steps of any method for accelerating data transmission based on the maximum transmission unit described in the above embodiments.
需要说明的是,对于前述的任一种基于最大传输单元的数据传输加速方法的实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请所必须的。It should be noted that, for any of the aforementioned embodiments of the maximum transmission unit-based data transmission acceleration method, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that the present application The order of actions described is not limited, as certain steps may be performed in other orders or simultaneously, depending on the application. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by this application.
尽管在此结合各实施例对本申请进行了描述,然而,在实施所要求保护的本申请过程中,本领域技术人员通过查看附图、公开内容、以及所附权利要求书,可理解并实现所公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present application has been described in conjunction with various embodiments herein, those skilled in the art can understand and realize the present application by referring to the drawings, the disclosure, and the appended claims during the implementation of the claimed application. Other variations of the embodiments are disclosed. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.
本领域普通技术人员可以理解上述任一种基于最大传输单元的数据传输加速方法的方法实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various method embodiments of any one of the method embodiments based on the maximum transmission unit-based data transmission acceleration method can be completed by instructing related hardware through a program, and the program can be stored In the computer-readable memory, the memory may include: flash disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access device (English: Random Access Memory, abbreviated: RAM), magnetic disk or optical disc, etc. .
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请一种基于最大传输单元的数据传输加速方法及装置的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请一种基于最大传输单元的数据传输加速方法及装置的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The above is a detailed introduction to the embodiments of the present application. In this paper, specific examples are used to illustrate the principle and implementation of a data transmission acceleration method and device based on the maximum transmission unit of the present application. The description of the above embodiments is only for helping Understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of a data transmission acceleration method and device based on the maximum transmission unit of the present application, there will be specific implementation methods and application ranges Changes, in summary, the contents of this specification should not be construed as limiting the application.
本申请是参照本申请实施例的方法、硬件产品和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, hardware products and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
可以理解的是,凡是被控制或者被配置以用于执行本申请一种基于最大传输单元的数据传输加速方法的方法实施例所描述的流程图的处理方法的产品,如上述流程图的终端以及计算机程序产品,均属于本申请所描述的相关产品的范畴。It can be understood that any product that is controlled or configured to execute the processing method of the flow chart described in the method embodiment of a maximum transmission unit-based data transmission acceleration method in this application, such as the terminal in the above flow chart and Computer program products all belong to the category of related products described in this application.
显然,本领域的技术人员可以对本申请提供的一种基于最大传输单元的数据传输加速方法及装置进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Apparently, those skilled in the art may make various changes and modifications to the MTU-based data transmission acceleration method and device provided in the present application without departing from the spirit and scope of the present application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310590952.2A CN116614451A (en) | 2023-05-23 | 2023-05-23 | Data transmission acceleration method and device based on maximum transmission unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310590952.2A CN116614451A (en) | 2023-05-23 | 2023-05-23 | Data transmission acceleration method and device based on maximum transmission unit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116614451A true CN116614451A (en) | 2023-08-18 |
Family
ID=87674309
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310590952.2A Pending CN116614451A (en) | 2023-05-23 | 2023-05-23 | Data transmission acceleration method and device based on maximum transmission unit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116614451A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130226838A1 (en) * | 2012-02-23 | 2013-08-29 | International Business Machines Corporation | Missing value imputation for predictive models |
EP2720398A1 (en) * | 2012-10-12 | 2014-04-16 | Alcatel Lucent | Mechanism for packet FEC bandwidth optimization |
US10992591B1 (en) * | 2019-03-12 | 2021-04-27 | Juniper Networks, Inc | Apparatus, system, and method for discovering path maximum transmission units |
CN112738014A (en) * | 2020-10-28 | 2021-04-30 | 北京工业大学 | Industrial control flow abnormity detection method and system based on convolution time sequence network |
CN114390004A (en) * | 2022-03-24 | 2022-04-22 | 成都数联云算科技有限公司 | Message processing method, system, device and medium |
US20220224354A1 (en) * | 2021-01-13 | 2022-07-14 | Improbable Worlds Limited | Dynamic Dictionary-Based Network Compression |
-
2023
- 2023-05-23 CN CN202310590952.2A patent/CN116614451A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130226838A1 (en) * | 2012-02-23 | 2013-08-29 | International Business Machines Corporation | Missing value imputation for predictive models |
EP2720398A1 (en) * | 2012-10-12 | 2014-04-16 | Alcatel Lucent | Mechanism for packet FEC bandwidth optimization |
US10992591B1 (en) * | 2019-03-12 | 2021-04-27 | Juniper Networks, Inc | Apparatus, system, and method for discovering path maximum transmission units |
CN112738014A (en) * | 2020-10-28 | 2021-04-30 | 北京工业大学 | Industrial control flow abnormity detection method and system based on convolution time sequence network |
US20220224354A1 (en) * | 2021-01-13 | 2022-07-14 | Improbable Worlds Limited | Dynamic Dictionary-Based Network Compression |
CN114390004A (en) * | 2022-03-24 | 2022-04-22 | 成都数联云算科技有限公司 | Message processing method, system, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11023412B2 (en) | RDMA data sending and receiving methods, electronic device, and readable storage medium | |
CN108667739A (en) | Congestion control method, device and system | |
US8908717B2 (en) | Method and system of transmitting and receiving fragmentable data units in a wireless communication environment | |
US20120002680A1 (en) | Interruption, at least in part, of frame transmission | |
CN106254041A (en) | Data transmission method, data receiver method and device thereof | |
KR102006873B1 (en) | A method and a system for dynamically changing upper bound on data packet size in wireless communication networks | |
CN111343148A (en) | A method, system and device for processing FGPA communication data | |
CN114006953A (en) | Method and device for processing message | |
WO2023025299A1 (en) | Data frame format, chip communication method, and chip | |
CN106856457A (en) | A kind of data transmission method, dispensing device and reception device | |
WO2021152369A1 (en) | Dynamic uplink end-to-end data transfer scheme with optimized memory path | |
CN108632896A (en) | A kind of data transmission method and relevant device | |
EP2564526B1 (en) | Methods of encoding and decoding control information in a medium access control protocol data unit | |
US12255737B2 (en) | Method and apparatus for packet wash in networks | |
CN117768407A (en) | Data processing method and server | |
CN114301576B (en) | Method and communication device for generating and transmitting acknowledgement frames in an IEEE802.15.4 network | |
CN115278775A (en) | Reflective QoS control method, UPF entity, communication system and storage medium | |
CN110704361A (en) | RDMA (remote direct memory Access) data transmitting and receiving method, electronic equipment and readable storage medium | |
CN116614451A (en) | Data transmission acceleration method and device based on maximum transmission unit | |
WO2022098377A1 (en) | Qualitative communication using adaptive network coding with a sliding window | |
CN115913473B (en) | Data selective retransmission method and system, storage medium and electronic equipment thereof | |
CN115866105A (en) | Unidirectional message transmission method, unidirectional message extraction method and unidirectional message extraction device | |
CN114579490A (en) | A data transmission method, device, electronic device and storage medium | |
CN115604537A (en) | A data transmission method, related device and equipment | |
CN113098780A (en) | Message processing method of virtual network, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |