Block transmission packet aggregation method and device combined with codec
By introducing a small packet aggregation method into the codec, the problem of low throughput in the block transmission channel is solved, efficient codec operation is achieved, and the throughput and resource utilization of the channel is improved.
Patent Information
- Application Number
- CN202510529345.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-04
AI Technical Summary
When existing block transmission channels process frequently generated packet data, the throughput is low and inefficient, resulting in waste of resources and congestion in the channel.
By introducing small packet aggregation methods into the codec, including soft codec and hard codec, the small packets are spliced and disassembled for application processes and driver scenarios respectively, to improve the encoding and decoding efficiency.
It improves the packet throughput rate of the block transmission channel, reduces resource consumption, avoids long waits for small packets, and realizes efficient parallel operation of the codec.
Smart Images

Figure CN120263746A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a method and device for aggregating small packets in block transmission in combination with a codec. Background Art
[0002] Currently, the commonly used block transmissions in the communication field, such as block transmissions over channels like USB, GPRS, PCIe, 5G, etc., do not have the small packet aggregation function, and the throughput is relatively low when transmitting small packets. Compared with the "transmit as it comes" of single bytes, the block transmission, where the length is fixed and the blocks are packed and then transmitted, is indeed more efficient because less channel protocol consumption is allocated to each byte. However, this high-efficiency advantage is only for large packets or payloads that are approximately the same length as the block length. In extreme cases, for small packets with a payload of a single byte, since blank data needs to be filled first until a block is full and then transmitted, the transmission efficiency not only does not increase but decreases - not only is all the channel protocol consumption allocated to this single byte, but also the transmission of overly long blocks causes unnecessary occupation of the channel bandwidth, artificially creating waiting and congestion aggravation. Tracing back to the source, block transmission is designed for the efficient transmission of large amounts of data. On the contrary, for those data-intensive application programs that frequently generate small packets, it should be the application program that encapsulates the small packets into large packets and then hands them over to the channel for block transmission (instead of direct channel transmission). However, contrary to expectations, most block transmission devices are only responsible for channel transmission and are located at the bottom layer of the channel, such as the physical layer and the data link layer, and have extremely limited binding force on other devices and upper-layer application programs outside the channel and within the subnet. For example, a user within a subnet accesses a server in another subnet through Telnet. Since Telnet defaults to single-character mode transmission, every time the user types a character, the client generates a TCP packet containing this single character and sends it to the server in the other subnet through the underlying block transmission channel. In this process, the block transmission channel does not refrain from performing block transmission just because the packet has a payload of only one byte. The result is that this single-character transmission causes a large number of data blocks to be transmitted at the sending end, occupying channel resources and also causing other applications to be unable to use the channel smoothly, even if the packets generated by other applications are all efficient large packets that match the block transmission size. Although system developers have provided a small packet merging solution for the Telnet single-character transmission problem at the transport layer, such as the Nagle algorithm. However, the Nagle algorithm still needs to be manually loaded, and similar problems are not limited to only the Telnet application. How to constrain similar inefficient situations arising from other application programs remains a problem.
[0003] If it is not possible to prevent "small packet occupying block" in advance at the upper layer (such as the transport layer or network layer mentioned above), then can small packet aggregation be completed on the block transfer channel? This is the problem that the present invention attempts to solve. In the block transfer channel without the support of an external aggregation device, the small packet aggregation / disassembly function can be added to the channel driver; but in the block transfer channel supported by a software or hardware codec, the codec can fully undertake the work of small packet aggregation and disassembly, so as to reduce the consumption of driver resources, improve the method adaptability, and at the same time, it may be possible to achieve dual-hardware parallel and pipelined operations, improving the throughput efficiency of the "encoding-channel" as a whole. Summary of the Invention
[0004] For the block transfer scenario with frequent small packets and including the encoding and decoding process, to solve the problems of low encoding and decoding rate and decreased throughput rate, the present invention provides a method and device for aggregating small packets in block transfer in combination with a codec.
[0005] In the first aspect, the present invention provides a method for aggregating small packets in block transfer in combination with a codec, including:
[0006] (1) For the scenario where small packets of the application process block transfer need to be encoded and decoded, perform the software encoding and decoding small packet aggregation method; the software encoding and decoding small packet aggregation method includes:
[0007] The sender application process delivers the external packet to the first encoder for encoding and obtains the encoded large packet;
[0008] The first encoder performs operations of receiving incoming packets, splicing small packets, encoding large packets and returning them;
[0009] The receiver application process delivers the incoming packet to the first decoder for decoding and obtains the decoded packet;
[0010] The first decoder performs operations of receiving incoming packets, decoding, disassembling the spliced large packet and returning it;
[0011] (2) For the scenario where small packets of the driver program block transfer need to be encoded and decoded, perform the hardware encoding and decoding small packet aggregation method; the hardware encoding and decoding small packet aggregation method includes:
[0012] The sender driver program splices the upper-layer incoming packets into large packets and then delivers them to the second encoder for encoding;
[0013] The second encoder performs operations of receiving incoming packets, encoding and returning them;
[0014] The receiver driver program delivers the incoming packet to the second decoder for decoding and obtains the decoded large packet;
[0015] The second decoder performs operations of receiving incoming packets, decoding and returning them.
[0016] In some embodiments, the sender application process hands over the outsourcing packet to the first encoder for encoding and obtains the encoded large packet, including:
[0017] Set the splicing size according to the size of the lower layer block transfer payload;
[0018] Generate the first small packet and send it to the first encoder;
[0019] Continuously generate small packets and send them to the first encoder;
[0020] Receive the large packet spliced from the encoded small packets and transmit it to the lower layer block transfer;
[0021] Continuously generate large packets and send them to the first encoder;
[0022] Transmit the encoded large packet to the lower layer block transfer channel for block transfer.
[0023] In some embodiments, the first encoder performs operations of receiving incoming packets, splicing small packets, encoding large packets, and returning them, including:
[0024] Set the splicing size;
[0025] Receive the first small packet and start encoding;
[0026] Continuously receive small packets and start encoding until the small packets are spliced into a compliant large packet; wherein, the large packet and the small packet are distinguished by length, and this length can be set according to experience and actual needs;
[0027] Return the spliced large packet to the sender application;
[0028] Start encoding directly after receiving the large packet;
[0029] Return the encoded large packet to the sender application.
[0030] In some embodiments, the receiver application process hands over the incoming packet to the first decoder for decoding and obtains the decoded packet, including:
[0031] Set the splicing size according to the size of the lower layer block transfer payload;
[0032] Receive the spliced large packet from the lower layer block transfer and send it to the first decoder;
[0033] Receive the first disassembled and decoded small packet and use it;
[0034] Continuously receive the disassembled and decoded intermediate small packets and use them until the last small packet;
[0035] Receive the ordinary large packet from the lower layer block transfer channel and send it to the first decoder;
[0036] Receive the decoded large packet and use it directly.
[0037] In some embodiments, the first decoder receives and decodes incoming packets, disassembles and returns the spliced large packet, including:
[0038] Receive and start unpacking monitoring;
[0039] When a spliced large packet is detected, start disassembling and decoding the spliced large packet;
[0040] Disassemble and decode the first small packet and return it;
[0041] Continuously disassemble, decode and return the intermediate small packets until the last small packet;
[0042] If a normal large packet is received, directly decode the normal large packet;
[0043] Return the decoded large packet to the receiving application.
[0044] In some embodiments, the sender driver splices the incoming packets from the upper layer into a large packet and then delivers it to the second encoder for encoding, including:
[0045] Send the large packet transmitted from the upper layer directly to the second encoder through block transfer;
[0046] When the second encoder is busy encoding, receive small packets, cache them locally, and wait for splicing;
[0047] Continuously receive small packets until all the previously cached small packets can be spliced into a compliant large packet according to the format and be ready for sending;
[0048] Receive the previous encoded large packet returned by the second encoder and pass it to the upper layer;
[0049] Send the prepared spliced large packet to the second encoder;
[0050] Take advantage of the time when the second encoder is busy encoding to continue receiving packets. If small packets are received, cache them locally and wait for splicing; if large packets are received, directly prepare for sending.
[0051] In some embodiments, the second encoder receives, encodes and returns incoming packets, including:
[0052] Receive a large packet and start encoding;
[0053] Return the encoded large packet to the sender driver;
[0054] Continuously receive large packets and start encoding;
[0055] Return the encoded large packet to the sender driver.
[0056] In some embodiments, the recipient driver delivers the foreign packet to the second decoder for decoding and obtains the decoded large packet, including:
[0057] Send the spliced large packet transmitted from the upper layer to the second decoder through block transfer;
[0058] Receive the decoded spliced large packet and cache it locally;
[0059] Continue to send the spliced large packet transmitted from the upper layer to the second decoder through block transfer;
[0060] Take advantage of the time when the second encoder is busy decoding to disassemble the decoded spliced large packet cached locally;
[0061] Disassemble the first small packet and deliver it to the upper layer for use;
[0062] Disassemble the middle small packets and deliver them to the upper layer for use until the last small packet;
[0063] Receive the previous decoded large packet returned by the second decoder and cache it locally for disassembly.
[0064] In some embodiments, the second decoder receives, decodes, and returns the incoming packet, including:
[0065] Receive the spliced large packet and start decoding;
[0066] Return the decoded spliced large packet to the recipient driver;
[0067] Continue to receive the spliced large packet and start decoding;
[0068] Return the decoded spliced large packet to the recipient driver.
[0069] In a second aspect, the present invention provides a block transfer small packet aggregation device combined with a codec for performing the above-mentioned block transfer small packet aggregation method combined with a codec;
[0070] The device includes:
[0071] (1) A software codec small packet aggregation device applied to the scenario where the block transfer small packets of the application process require codec; the software codec small packet aggregation device includes:
[0072] A sender application process for delivering the foreign packet to the first encoder for encoding and obtaining the encoded large packet;
[0073] A first encoder for performing operations of receiving incoming packets, splicing small packets, encoding large packets, and returning them;
[0074] A recipient application process for delivering the foreign packet to the first decoder for decoding and obtaining the decoded packet;
[0075] A first decoder, configured to receive and decode incoming packets, disassemble and return the spliced large packets.
[0076] (2) A hard codec small packet aggregation device applied to the scenario where small packets need to be encoded and decoded in the driver block transfer; the hard codec small packet aggregation device includes:
[0077] A sender driver, configured to splice incoming packets from the upper layer into large packets and then hand them over to the second encoder for encoding.
[0078] A second encoder, configured to receive, encode, and return incoming packets.
[0079] A receiver driver, configured to hand over incoming packets to the second decoder for decoding and obtain the decoded packets.
[0080] A second decoder, configured to receive, decode, and return incoming packets.
[0081] In some embodiments, the block transfer small packet aggregation device combined with the codec further includes a timer for indicating the packet splicing stop time.
[0082] In summary, due to the adoption of the above technical solutions, the beneficial effects of the present invention are:
[0083] 1. In the scenario where small packets need to be encoded and decoded in the presentation layer application process block transfer, the present invention realizes the result that the application process no longer hands over inefficient small packets to the lower layer block transfer through the parallel operation of the encoder for packet receiving and encoding and the decoder for decoding and packet sending; in the scenario where small packets need to be encoded and decoded in the driver block transfer, the present invention improves the small packet throughput rate of the codec block transfer channel through the parallel operation of the driver for packet splicing and the encoder for encoding and the parallel operation of the decoder for decoding and the driver for disassembling and sending out packets, and solves the problems of low encoding and decoding efficiency and low throughput rate of block transfer small packets.
[0084] 2. The present invention introduces a configurable small packet aggregation window time, which not only makes full use of the block transfer channel bandwidth and only transmits large packets, but also avoids long waits for small packets caused by insufficient small packets during a certain period.
[0085] 3. For the scenario where the driver is duplex or calls the hard codec in the form of "one question and one answer", through the extended protocol (mainly the extended small packet disassembly and assembly protocol), it is possible to realize the pipelined operation of the three tasks of the driver for aggregating / disassembling small packets, block transfer, and encoding / decoding. While saving the waiting time for the three tasks, the overall efficiency of hard encoding and decoding is also doubled because the hard codec has always been in the high-performance working area for large packet encoding and decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] Figure 1 It is a schematic diagram of a block transfer small packet aggregation method and device combined with a codec provided by an embodiment of the present invention.
[0087] Figure 2 This is the flowchart of the sender application program and the first encoder in the embodiments of the present invention.
[0088] Figure 3 This is the flowchart of the receiver application program and the first decoder in the embodiments of the present invention.
[0089] Figure 4 This is the flowchart of the sender driver program and the second encoder in the embodiments of the present invention.
[0090] Figure 5 This is the flowchart of the receiver driver program and the second decoder in the embodiments of the present invention.
[0091] Figure 6 This is a schematic diagram of an implementation manner of the soft codec packet aggregation device in the block transfer packet aggregation device combined with the codec in the embodiments of the present invention.
[0092] Figure 7 This is a schematic diagram of an implementation manner of the hard codec packet aggregation device in the block transfer packet aggregation device combined with the codec in the embodiments of the present invention. Detailed implementation manners
[0093] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations.
[0094] Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0095] As Figure 1 shown, an embodiment of the present invention proposes a block transfer packet aggregation method combined with a codec, including:
[0096] S1. For the scenario where the block transfer packets of the (presentation layer) application process need to be coded and decoded, perform the soft codec packet aggregation method; the soft codec packet aggregation method includes:
[0097] S11. The sender application process delivers the external packets to the first encoder for encoding and obtains the encoded large packets;
[0098] S12, the first encoder performs operations of receiving incoming packets, splicing small packets, encoding large packets, and returning them;
[0099] S13, the receiving application process delivers the incoming packets to the first decoder for decoding and obtains the decoded packets;
[0100] S14, the first decoder performs operations of receiving incoming packets, decoding, disassembling the spliced large packets, and returning them;
[0101] S2, for the scenario where the driver block transfers small packets that require encoding and decoding, perform the hard encoding and decoding small packet aggregation method; the hard encoding and decoding small packet aggregation method includes:
[0102] S21, the sending driver splices the upper-layer incoming packets into large packets and then delivers them to the second encoder for encoding;
[0103] S22, the second encoder performs operations of receiving incoming packets, encoding, and returning them;
[0104] S23, the receiving driver delivers the incoming packets to the second decoder for decoding and obtains the decoded large packets;
[0105] S24, the second decoder performs operations of receiving incoming packets, decoding, and returning them.
[0106] In some embodiments, as Figure 2 shown, the sending application process delivers the outgoing packets to the first encoder for encoding and obtains the encoded large packets, including:
[0107] S111, set the splicing size according to the lower-layer block transfer payload size;
[0108] S112, generate the first small packet and send it to the first encoder;
[0109] S113, continuously generate small packets and send them to the first encoder;
[0110] S114, receive the large packet spliced from the encoded small packets and transfer it to the lower-layer block transfer;
[0111] S115, continuously generate large packets and send them to the first encoder;
[0112] S116, transfer the encoded large packets to the lower-layer block transfer channel for block transfer.
[0113] In some embodiments, as Figure 2 shown, the operations of the first encoder for receiving incoming packets, splicing small packets, encoding large packets, and returning them include:
[0114] S121, set the splicing size;
[0115] S122, start encoding after receiving the first small packet;
[0116] S123. Continuously receive small packets and start encoding until the small packets are assembled into a compliant large packet. Among them, the large packet and the small packet are distinguished by length, and this length can be set according to experience and actual needs.
[0117] S124. Return the assembled large packet to the sender application.
[0118] S125. Start encoding directly after receiving the large packet.
[0119] S126. Return the encoded large packet to the sender application.
[0120] In some embodiments, as Figure 3 shown, the receiving application process delivers the foreign packet to the first decoder for decoding and obtains the decoded large packet, including:
[0121] S131. Set the splicing size according to the size of the lower layer block transfer payload.
[0122] S132. Receive the assembled large packet from the lower layer block transfer and send it to the first decoder.
[0123] S133. Receive the first disassembled and decoded small packet and use it.
[0124] S134. Continuously receive the disassembled and decoded intermediate small packets and use them until the last small packet.
[0125] S135. Receive a normal large packet (non-assembled large packet) from the lower layer block transfer channel and send it to the first decoder.
[0126] S136. Receive the decoded large packet and use it directly.
[0127] In some embodiments, as Figure 3 shown, the first decoder receives and decodes the incoming packet, disassembles and returns the assembled large packet, including:
[0128] S141. Receive and start unpacking monitoring.
[0129] S142. When a spliced large packet is detected, start disassembling and decoding the spliced large packet.
[0130] S143. Disassemble and decode the first small packet and return it.
[0131] S144. Continuously disassemble and decode the intermediate small packets and return them until the last small packet.
[0132] S145. If the received is a normal large packet (non-assembled large packet), directly decode the normal large packet.
[0133] S146, return the decoded large packet to the receiving application.
[0134] In some embodiments, as Figure 4 shown, the sender driver assembles the upper-layer packets into a large packet and then delivers it to the second encoder for encoding, including:
[0135] S211, directly send the large packet from the upper layer to the second encoder through block transfer;
[0136] S212, when the second encoder is busy encoding, receive small packets, cache them locally, and wait for assembly;
[0137] S213, continuously receive small packets until all the previously cached small packets can be assembled into a compliant large packet according to the format and get ready for sending;
[0138] S214, receive the previously encoded large packet returned by the second encoder and deliver it to the upper layer;
[0139] S215, send the prepared assembled large packet to the second encoder;
[0140] S216, take advantage of the time when the second encoder is busy encoding to continue receiving packets. If small packets are received, cache them locally and wait for assembly; if large packets are received, directly get ready for sending.
[0141] In some embodiments, as Figure 4 shown, the second encoder receives, encodes, and returns the incoming packets, including:
[0142] S221, receive a large packet and start encoding;
[0143] S222, return the encoded large packet to the sender driver;
[0144] S223, continuously receive large packets and start encoding;
[0145] S224, return the encoded large packet to the sender driver.
[0146] In some embodiments, as Figure 5 shown, the receiver driver delivers the incoming packets to the second decoder for decoding and obtains the decoded large packet, including:
[0147] S231, send the assembled large packet from the upper layer to the second decoder through block transfer;
[0148] S232, receive the decoded assembled large packet and cache it locally;
[0149] S233, continue to send the assembled large packet from the upper layer to the second decoder through block transfer;
[0150] S234. While the second encoder is busy decoding, disassemble the decoded and spliced large packet cached locally.
[0151] S235. Disassemble the first small packet and transfer it to the upper layer for use.
[0152] S236. Disassemble the middle small packets and transfer them to the upper layer for use until the last small packet.
[0153] S237. Receive the previous decoded large packet returned by the second decoder and cache it locally for disassembly.
[0154] In some embodiments, as Figure 5 shown, the operations of the second decoder for receiving, decoding, and returning incoming packets include:
[0155] S241. Receive the spliced large packet and start decoding.
[0156] S242. Return the decoded spliced large packet to the receiving party driver.
[0157] S243. Continue to receive the spliced large packet (or ordinary large packet) and start decoding.
[0158] S244. Return the decoded spliced large packet (or ordinary large packet) to the receiving party driver.
[0159] Based on the same technical concept, as Figure 1 shown, an embodiment of the present invention provides a block transfer small packet aggregation device combined with a codec, which is used to execute the above-mentioned block transfer small packet aggregation method combined with a codec;
[0160] The device includes:
[0161] (1) A soft codec small packet aggregation device applied to the scenario where the application process block transfer small packet requires codec; the soft codec small packet aggregation device includes:
[0162] A sender application process, which is used to hand over the outgoing packet to the first encoder for encoding and obtain the encoded large packet.
[0163] A first encoder, which is used to perform operations of receiving incoming packets, splicing small packets, encoding large packets, and returning them.
[0164] A receiver application process, which is used to hand over the incoming packet to the first decoder for decoding and obtain the decoded packet.
[0165] A first decoder, which is used to receive incoming packets, decode them, disassemble and return the spliced large packet.
[0166] (2) A hard codec small packet aggregation device applied to the scenario where the driver block transfer small packet requires codec; the hard codec small packet aggregation device includes:
[0167] A sender driver for splicing packets from the upper layer into large packets and then delivering them to the second encoder for encoding;
[0168] A second encoder for receiving, encoding, and returning incoming packets;
[0169] A receiver driver for delivering incoming packets to the second decoder for decoding and obtaining the decoded packets;
[0170] A second decoder for receiving, decoding, and returning incoming packets.
[0171] For each device in the above device, reference may be made to the description in the method of the foregoing embodiment, which will not be elaborated herein.
[0172] In addition, it further includes a timer for indicating the packet splicing stop time. Some implementation manners are as follows:
[0173] As Figure 6 shown, in the block transfer small packet aggregation device combined with the codec, the soft codec small packet aggregation device includes a timer, a soft codec, and an interface protocol in the application process. Among them, the timer provides the packet splicing stop time, the soft codec performs operations related to the first encoder and the second decoder; the interface protocol in the application process performs operations related to the sender application and the receiver application, and supports multiple transmissions and single reception of small packets to be encoded and single transmission and multiple receptions of large packets to be decoded.
[0174] As Figure 7 shown, in the block transfer small packet aggregation device combined with the codec, the hard codec small packet aggregation device includes a timer, a block transfer channel driver, and a hard codec. Among them, the timer provides the packet splicing stop time; the hard codec performs operations related to the second encoder and the second decoder; the block transfer channel driver performs operations related to the sender driver and the receiver driver, aggregates small packets into large packets and then sends them to the hard codec for encoding, and disassembles the received decoded and spliced large packets before using them.
[0175] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A block transfer small packet aggregation method combined with a codec, characterized in that, including: (1) For the scenario where small packets need to be encoded and decoded for application process block transfer, perform soft encoding and decoding small packet aggregation method; The soft encoding and decoding small packet aggregation method includes: The sender application process delivers the external packets to the first encoder for encoding and obtains the encoded large packet; The first encoder performs operations of receiving incoming packets, splicing small packets, encoding large packets and returning them; The receiver application process delivers the incoming packets to the first decoder for decoding and obtains the decoded packets; The first decoder performs receiving, decoding of incoming packets, disassembling and returning the spliced large packets; (2) For the scenario where small packets need to be encoded and decoded for driver block transfer, perform hard encoding and decoding small packet aggregation method; The hard encoding and decoding small packet aggregation method includes: The sender driver splices the upper layer incoming packets into large packets and then delivers them to the second encoder for encoding; The second encoder performs receiving, encoding and returning of incoming packets; The receiver driver delivers the incoming packets to the second decoder for decoding and obtains the decoded large packets; The second decoder performs receiving, decoding and returning of incoming packets.
2. The method for aggregating small packets of block transmission in combination with a codec according to claim 1, wherein The sender application process delivering the external packets to the first encoder for encoding and obtaining the encoded large packet includes: Set the splicing size according to the lower layer block transfer payload size; Generate the first small packet and send it to the first encoder; Continuously generate small packets and send them to the first encoder; Receive the large packet spliced from the encoded small packets and transfer it to the lower layer block transfer; Continuously generate large packets and send them to the first encoder; Transfer the encoded large packet to the lower layer block transfer channel for block transfer.
3. The block transfer packet aggregation method combined with a codec according to claim 1, wherein The first encoder performing operations of receiving incoming packets, splicing small packets, encoding large packets and returning them includes: Set the splicing size; Start encoding after receiving the first small packet; Continuously receive small packets and start encoding until the small packets are spliced into a compliant large packet; Among them, the large packet and the small packet are distinguished by length, and this length can be set according to experience and actual needs; Return the spliced large packet to the sender application; Start encoding directly after receiving the large packet; Return the encoded large packet to the sender application.
4. The method for aggregating small packets of block transfer in combination with a codec according to claim 1, wherein The receiver application process delivering the incoming packets to the first decoder for decoding and obtaining the decoded packets includes: Set the splicing size according to the lower layer block transfer payload size; Receive the spliced large packet from the lower layer block transfer and send it to the first decoder; Receive the first disassembled and decoded small packet and use it; Continuously receive the disassembled and decoded intermediate small packets and use them until the last small packet; Receive the ordinary large packet from the lower layer block transfer channel and send it to the first decoder; Receive the decoded large packet and use it directly.
5. The method for aggregating small packets in block transmission combined with a codec according to claim 1, characterized in that, The first decoder performing receiving, decoding of incoming packets, disassembling and returning the spliced large packets includes: Receive and start unpacking monitoring; When a spliced large packet is detected, start disassembling and decoding operations on the spliced large packet; Disassemble and decode the first small packet and return it; Continuously disassemble and decode intermediate small packets and return them until the last small packet; If the received is an ordinary large packet, directly decode the ordinary large packet; Return the decoded large packet to the receiver application.
6. The method for aggregating small packets of block transmission in combination with a codec according to claim 1, wherein The sender driver splicing the upper layer incoming packets into large packets and then delivering them to the second encoder for encoding includes: Directly send the large packet transmitted from the upper layer to the second encoder through block transfer; When the second encoder is busy encoding, receive small packets, cache them locally and wait for splicing; Continuously receive small packets until all the previously cached small packets can be assembled into a compliant large packet in the format and are ready for transmission; Receive the previous encoded large packet returned by the second encoder and pass it to the upper layer; Send the assembled large packet that is ready to the second encoder; Take advantage of the time when the second encoder is busy encoding to continue receiving packets. If a small packet is received, cache it locally and wait for assembly. If a large packet is received, directly prepare for transmission.
7. The method for aggregating small packets of block transfer in combination with a codec according to claim 1, characterized in that, The second encoder performs incoming packet reception, encoding, and return, including: Receive a large packet and start encoding; Return the encoded large packet to the sender driver; Continuously receive large packets and start encoding; Return the encoded large packet to the sender driver.
8. The method for aggregating block transfer packets in combination with a codec according to claim 1, characterized in that, The receiver driver delivers the incoming packet to the second decoder for decoding and obtains the decoded large packet, including: Send the assembled large packet passed from the upper layer to the second decoder through block transfer; Receive the decoded assembled large packet and cache it locally; Continue to send the assembled large packet passed from the upper layer to the second decoder through block transfer; Take advantage of the time when the second encoder is busy decoding to disassemble the decoded assembled large packet cached locally; Disassemble the first small packet and pass it to the upper layer for use; Disassemble the intermediate small packets and pass them to the upper layer for use until the last small packet; Receive the previous decoded large packet returned by the second decoder and cache it locally for disassembly.
9. The method for aggregating small packets of block transmission in combination with a codec according to claim 1, characterized in that, The second decoder performs incoming packet reception, decoding, and return, including: Receive the assembled large packet and start decoding; Return the decoded assembled large packet to the receiver driver; Continue to receive the assembled large packet and start decoding; Return the decoded assembled large packet to the receiver driver.
10. A block transfer small packet aggregation device combined with a codec, characterized in that, For executing the block transfer small packet aggregation method combined with a codec as described in any one of claims 1 - 9; The device includes: (1) A software codec small packet aggregation device applied to the scenario where block transfer small packets of an application process require codec; The software codec small packet aggregation device includes: A sender application process for delivering an outgoing packet to the first encoder for encoding and obtaining the encoded large packet; The first encoder for performing incoming packet reception, assembling small packets, encoding large packets, and returning them; A receiver application process for delivering an incoming packet to the first decoder for decoding and obtaining the decoded packet; The first decoder for performing incoming packet reception, decoding, disassembling the assembled large packet, and returning it; (2) A hardware codec small packet aggregation device applied to the scenario where block transfer small packets of a driver require codec; The hardware codec small packet aggregation device includes: A sender driver for assembling the incoming packet from the upper layer into a large packet and then delivering it to the second encoder for encoding; The second encoder for performing incoming packet reception, encoding, and return; A receiver driver for delivering an incoming packet to the second decoder for decoding and obtaining the decoded packet; The second decoder for performing incoming packet reception, decoding, and return.
11. The block transfer packet aggregation device combined with a codec according to claim 10, characterized in that, It also includes a timer for indicating the stop time of packet assembly.