A message processing method and related device

CN122952007APending Publication Date: 2026-10-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510449727.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]然而,对于网络层报文较小的情况下,对于一个数据链路层报文来说,开销的占比过大,会导致小包的承载效率较低

Benefits of technology

[0080]本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005354508710000011
    Figure HDA0005354508710000011
  • Figure HDA0005354508710000012
    Figure HDA0005354508710000012
  • Figure HDA0005354508710000021
    Figure HDA0005354508710000021
Patent Text Reader

Abstract

This application provides a message processing method in which the message processing device, after determining that the length of each of at least two consecutive network layer messages is less than a first threshold, sends a data link layer message comprising at least two consecutive network layer messages. That is, by concatenating at least two consecutive network layer messages to obtain a data link layer message, the small packet carrying efficiency of network layer messages is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a message processing method and related equipment. Background Technology

[0002] With the development of technology, various network devices and smart devices are being used more frequently in our lives, leading to increasing functional demands on them. The more functions network devices and smart devices utilize, the more data they generate that needs to be processed. In current data communication systems, data exchange and transmission are typically conducted in units of messages, each containing the complete data information to be sent.

[0003] Currently, after receiving multiple network layer messages from the network layer, the data link layer at the sending end encapsulates these network layer messages by adding overhead to each of them to obtain multiple data link layer messages, and then sends these multiple data link layer messages to the receiving end to achieve data transmission.

[0004] However, when network layer packets are small, the overhead of a single data link layer packet is too high, resulting in low packet carrying efficiency. Summary of the Invention

[0005] This application provides a message processing method and related equipment for transmitting data link layer messages that include at least two consecutive network layer messages, thereby improving the small packet carrying efficiency of network layer messages.

[0006] This application provides a message processing method, which is executed by a message processing device, or by a component (e.g., a processor, chip, or chip system) of the message processing device, or by a logic module or software capable of implementing all or part of the functions of the message processing device. In this first aspect and its possible implementations, the method is described as being executed by a message processing device. In this method, the message processing device determines that the length of each of at least two consecutive network layer messages is less than a first threshold. The message processing device sends a data link layer message, which includes at least two consecutive network layer messages.

[0007] Among them, at least two consecutive network layer messages can be understood as at least two consecutive or adjacent messages identified by network layer message identifiers, or at least two consecutive or adjacent messages in the time sequence to be sent, or at least two consecutive or adjacent messages in the buffer, or at least two messages received consecutively from the network layer, or at least two adjacent messages received from the network layer, etc. The specific meaning is not limited here.

[0008] Based on the above scheme, after determining that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold, a data link layer message comprising at least two consecutive network layer messages is sent. That is, by concatenating at least two consecutive network layer messages to obtain a data link layer message, the small packet carrying efficiency of network layer messages is improved.

[0009] Optionally, in one possible implementation of the first aspect, at least two consecutive network layer packets include a first network layer packet and a second network layer packet, and the data link layer packet includes: a first network layer packet, a first overhead field of the first network layer packet in the data link layer, a second network layer packet, a second overhead field of the second network layer packet in the data link layer, and a check field of the data link layer packet.

[0010] In this possible implementation, at least two network layer packets only need to add a check field at the data link layer. Compared to the method where each network layer packet needs to have a check field added at the data link layer, the method provided in this application can reduce the overhead of check fields.

[0011] Optionally, in one possible implementation of the first aspect, the first cost field includes: a first field, a second field, and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, the second field is used to indicate the length of the data link layer message, and the third field is used to indicate the sum of the lengths of the first network layer message and the first cost field; the second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer message and the second cost field.

[0012] In this possible implementation, on the one hand, the second field in the first overhead field indicates the length of the data link layer message, increasing the efficiency of the receiver in parsing the data link layer message. On the other hand, the third and fourth fields indicate the sum of the lengths of each network layer message and its overhead field, improving the accuracy of the receiver in parsing the network layer message.

[0013] Optionally, in one possible implementation of the first aspect, the first cost field includes: a first field and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer message and the first cost field; the second cost field includes a fourth field and a fifth field, wherein the fourth field is used to indicate the sum of the lengths of the second network layer message and the second cost field, and the fifth field is used to indicate whether the second network layer message is the last network layer message to participate in the concatenation process.

[0014] In this possible implementation, on the one hand, the third and fourth fields indicate the sum of the lengths of each network layer packet and its overhead field, improving the accuracy of the receiver in parsing network layer packets. On the other hand, the fifth field in the second overhead field indicates whether the second network layer packet is the last network layer packet to participate in the packet reassembly process, improving the accuracy of identifying the network layer packet.

[0015] Optionally, in one possible implementation of the first aspect, the data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; the sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

[0016] In this possible implementation, during the process of assembling at least two network layer packets, the length of the first padding field is aligned with that of the second padding field, thereby improving the efficiency of the receiving end in parsing data blocks.

[0017] Optionally, in one possible implementation of the first aspect, the data link layer message includes M data blocks of equal length, where M is a positive integer.

[0018] In this possible implementation, the data link layer message includes M identical data blocks, that is, the lengths of each data block included in the data link layer are aligned, which improves the accuracy and efficiency of the receiver in parsing the data link layer message.

[0019] Alternatively, in one possible implementation of the first aspect, the message processing device specifically sends data link layer messages based on M data blocks of equal length.

[0020] In this possible implementation, the message processing device sends data link layer messages based on M data blocks of the same length, thereby improving the accuracy and efficiency of the receiving end in parsing the data link layer messages.

[0021] Optionally, in one possible implementation of the first aspect, the message processing device may further add a first overhead field before the first network layer message to obtain first data; if the length of the first data is not an integer multiple of N, then a first padding field is added to the first data to obtain a first data block, and the length of the first data block is an integer multiple of N, and the data link layer message includes the first data block.

[0022] In this possible implementation, during the process of assembling at least two network layer packets, the first padding field is aligned to an integer multiple of the length of the first data block, thereby improving the efficiency of the receiving end in parsing the data block.

[0023] Optionally, in one possible implementation of the first aspect, the message processing device may further add a second overhead field before the second network layer message to obtain second data; if the length of the second data is not an integer multiple of N, then a second padding field is added to the second data to obtain a second data block, and the length of the second data block is an integer multiple of N, and the data link layer message includes the second data block.

[0024] In this possible implementation, during the process of assembling at least two network layer packets, the second padding field is used to align the second data block length to an integer multiple of N, thereby improving the efficiency of the receiving end in parsing the data block.

[0025] Optionally, in one possible implementation of the first aspect, the message processing device may further add a third padding field if the sum of the lengths of the first data block, the second data block, and the check field is not M, and the sum of the lengths after adding the third padding field is M; the first data block includes a first network layer message, a first overhead field, and a first padding field; the second data block includes a second network layer message, a second overhead field, and a second padding field.

[0026] In this possible implementation, during the generation of data link layer messages, the length of the data link layer message is aligned using a third padding field, thereby improving the efficiency of the receiving end in parsing the data link layer message.

[0027] Alternatively, in one possible implementation of the first aspect, the message processing device may also receive at least two consecutive network layer messages sent from the network layer.

[0028] In this possible implementation, the data link layer message sent by the message processing device includes at least two consecutive network layer messages from the network layer, thereby achieving encapsulated transmission of network layer messages.

[0029] A second aspect of this application provides a message processing method, which is executed by a message processing device, or by a component (e.g., a processor, chip, or chip system) within the message processing device, or by a logic module or software capable of implementing all or part of the functions of the message processing device. In this second aspect and its possible implementations, the method is described as being executed by a message processing device. In this method, the message processing device receives a data link layer message, which includes at least two consecutive network layer messages. The message processing device parses the data link layer message to obtain at least two consecutive network layer messages.

[0030] Based on the above scheme, a data link layer message comprising at least two consecutive network layer messages is received. That is, a data link layer message is obtained by concatenating at least two consecutive network layer messages, thereby improving the small packet carrying efficiency of network layer messages.

[0031] Optionally, in one possible implementation of the second aspect, at least two consecutive network layer packets include a first network layer packet and a second network layer packet, and the data link layer packet includes: a first network layer packet, a first cost field of the first network layer packet in the data link layer, a second network layer packet, a second cost field of the second network layer packet in the data link layer, and a check field of the data link layer packet.

[0032] In this possible implementation, at least two network layer packets only need to add a check field at the data link layer. Compared to the method where each network layer packet needs to have a check field added at the data link layer, the method provided in this application can reduce the overhead of check fields.

[0033] Optionally, in one possible implementation of the second aspect, the first cost field includes: a first field, a second field, and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, the second field is used to indicate the length of the data link layer message, and the third field is used to indicate the sum of the lengths of the first network layer message and the first cost field; the second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer message and the second cost field.

[0034] In this possible implementation, on the one hand, the second field in the first overhead field indicates the length of the data link layer message, increasing the efficiency of the receiver in parsing the data link layer message. On the other hand, the third and fourth fields indicate the sum of the lengths of each network layer message and its overhead field, improving the accuracy of the receiver in parsing the network layer message.

[0035] Optionally, in one possible implementation of the second aspect, the message processing device specifically determines that the data link layer message is a packet concatenation message based on the first field; determines the length of the data link layer message based on the second field, and performs verification based on the check field; if the verification is successful, parses the data link layer message based on the third field to obtain the first network layer message, and parses the data link layer message based on the fourth field to obtain the second network layer message.

[0036] In this possible implementation, during the parsing of data link layer packets, the first field is used to determine whether the data link layer packet is a concatenated packet. The second field in the first overhead field indicates the length of the data link layer packet, and the third field in the first overhead field and the fourth field in the second overhead field indicate the length of the data block, thereby increasing the efficiency of the receiving end in parsing each network layer packet in the data link layer packet.

[0037] Optionally, in one possible implementation of the second aspect, the first cost field includes: a first field and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer message and the first cost field; the second cost field includes a fourth field and a fifth field, wherein the fourth field is used to indicate the sum of the lengths of the second network layer message and the second cost field, and the fifth field is used to indicate whether the second network layer message is the last network layer message to participate in the concatenation process.

[0038] In this possible implementation, on the one hand, the third and fourth fields indicate the sum of the lengths of each network layer packet and its overhead field, improving the accuracy of the receiver in parsing network layer packets. On the other hand, the fifth field in the second overhead field indicates whether the second network layer packet is the last network layer packet to participate in the packet reassembly process, improving the accuracy of identifying the network layer packet.

[0039] Optionally, in one possible implementation of the second aspect, the message processing device specifically determines whether the network layer message being processed by packet assembly has ended based on the fourth field; if it has ended, it performs verification based on the verification field; if the verification is successful, it parses the data link layer message based on the second field to obtain the first network layer message, and parses the data link layer message based on the third field to obtain the second network layer message.

[0040] In this possible implementation, during the parsing of data link layer packets, the fourth field is used to determine whether the parsing of network layer packets involved in packet assembly has ended. Then, the third field in the first overhead field and the fourth field in the second overhead field are used to indicate the length of the data block, thereby increasing the efficiency of the receiving end in parsing each network layer packet in the data link layer packet.

[0041] Optionally, in one possible implementation of the second aspect, the data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; the sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

[0042] In this possible implementation, the efficiency of parsing data blocks at the receiving end is improved by aligning the lengths of the first padding field and the second padding field.

[0043] Alternatively, in one possible implementation of the second aspect, the data link layer message includes M data blocks of equal length, where N and M are positive integers and N is less than M.

[0044] In this possible implementation, the data link layer message includes M identical data blocks, that is, the lengths of each data block included in the data link layer are aligned, which improves the accuracy and efficiency of the receiver in parsing the data link layer message.

[0045] Alternatively, in one possible implementation of the second aspect, the message processing device may also send at least two consecutive network layer messages to the network layer.

[0046] In this possible implementation, the message processing device parses at least two consecutive network layer messages from the received data link layer messages, and then sends at least two consecutive network layer messages to its local network layer, thereby achieving the decapsulation and transmission of network layer messages.

[0047] A third aspect of this application provides a message processing device, which may be a router, a switch, a device with a DisplayPort (DP) interface, or a user equipment, or a component of the aforementioned devices (e.g., a processor, a chip, or a chip system), or the device may be a logic module or software capable of implementing all or part of the message processing device functions. The message processing device includes a transceiver unit and a processing unit.

[0048] A processing unit is configured to determine that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold.

[0049] The transceiver unit is used to send data link layer messages, which include at least two consecutive network layer messages.

[0050] Optionally, in one possible implementation of the third aspect, the above-mentioned at least two consecutive network layer messages include a first network layer message and a second network layer message, and the data link layer message includes: a first network layer message, a first overhead field of the first network layer message in the data link layer, a second network layer message, a second overhead field of the second network layer message in the data link layer, and a check field of the data link layer message.

[0051] Optionally, in one possible implementation of the third aspect, the aforementioned first cost field includes: a first field, a second field, and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, the second field is used to indicate the length of the data link layer message, and the third field is used to indicate the sum of the lengths of the first network layer message and the first cost field; the second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer message and the second cost field.

[0052] Optionally, in one possible implementation of the third aspect, the aforementioned first overhead field includes: a first field and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer message and the first overhead field; the second overhead field includes a fourth field and a fifth field, wherein the fourth field is used to indicate the sum of the lengths of the second network layer message and the second overhead field, and the fifth field is used to indicate whether the second network layer message is the last network layer message participating in the concatenation process.

[0053] Optionally, in one possible implementation of the third aspect, the aforementioned data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; the sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

[0054] Alternatively, in one possible implementation of the third aspect, the aforementioned data link layer message comprises M data blocks of equal length, where M is a positive integer.

[0055] Alternatively, in one possible implementation of the third aspect, the aforementioned transceiver unit is specifically used to send data link layer messages based on M data blocks of the same length.

[0056] Optionally, in one possible implementation of the third aspect, the processing unit described above is further configured to add a first overhead field before the first network layer message to obtain first data; the processing unit is further configured to add a first padding field to the first data to obtain a first data block if the length of the first data is not an integer multiple of N, and the length of the first data block is an integer multiple of N, and the data link layer message includes the first data block.

[0057] Optionally, in one possible implementation of the third aspect, the processing unit described above is further configured to add a second overhead field before the second network layer message to obtain second data; the processing unit is further configured to add a second padding field to the second data to obtain a second data block if the length of the second data is not an integer multiple of N, and the length of the second data block is an integer multiple of N, and the data link layer message includes the second data block.

[0058] Optionally, in one possible implementation of the third aspect, the processing unit is further configured to add a third padding field if the sum of the lengths of the first data block, the second data block, and the check field is not M, and the sum of the lengths after adding the third padding field is M; the processing unit is further configured to include a first network layer message, a first overhead field, and a first padding field in the first data block; and the second data block includes a second network layer message, a second overhead field, and a second padding field.

[0059] Optionally, in one possible implementation of the third aspect, the aforementioned transceiver unit is further configured to receive at least two consecutive network layer messages sent from the network layer.

[0060] A fourth aspect of this application provides a message processing device, which may be a router, a switch, a device containing a DP (Distributed Device), or a user equipment, or a component of the aforementioned devices (e.g., a processor, a chip, or a chip system), or the device may be a logic module or software capable of implementing all or part of the functions of a message processing device. The message processing device includes a transceiver unit and a processing unit.

[0061] The transceiver unit is used to receive data link layer messages, which include at least two consecutive network layer messages.

[0062] The processing unit is used to parse data link layer messages to obtain at least two consecutive network layer messages.

[0063] Optionally, in one possible implementation of the fourth aspect, the above-mentioned at least two consecutive network layer messages include a first network layer message and a second network layer message, and the data link layer message includes: a first network layer message, a first overhead field of the first network layer message in the data link layer, a second network layer message, a second overhead field of the second network layer message in the data link layer, and a check field of the data link layer message.

[0064] Optionally, in one possible implementation of the fourth aspect, the aforementioned first cost field includes: a first field, a second field, and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, the second field is used to indicate the length of the data link layer message, and the third field is used to indicate the sum of the lengths of the first network layer message and the first cost field; the second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer message and the second cost field.

[0065] Optionally, in one possible implementation of the fourth aspect, the aforementioned processing unit is specifically used to determine that the data link layer message is a packet concatenation message based on the first field; the processing unit is specifically used to determine the length of the data link layer message based on the second field and perform verification based on the verification field; the processing unit is specifically used to, if the verification is successful, parse the data link layer message based on the third field to obtain the first network layer message, and parse the data link layer message based on the fourth field to obtain the second network layer message.

[0066] Optionally, in one possible implementation of the fourth aspect, the first overhead field mentioned above includes: a first field and a third field, wherein the first field is used to indicate that the first network layer message and the second network layer message are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer message and the first overhead field; the second overhead field includes a fourth field and a fifth field, wherein the fourth field is used to indicate the sum of the lengths of the second network layer message and the second overhead field, and the fifth field is used to indicate whether the second network layer message is the last network layer message to participate in the concatenation process.

[0067] Optionally, in one possible implementation of the fourth aspect, the aforementioned processing unit is specifically used to determine whether the network layer packet processing has ended based on the fourth field; the processing unit is specifically used to perform verification based on the verification field if the packet has ended; the processing unit is specifically used to parse the data link layer packet to obtain the first network layer packet based on the second field and parse the data link layer packet to obtain the second network layer packet based on the third field if the verification is successful.

[0068] Optionally, in one possible implementation of the fourth aspect, the aforementioned data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; the sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

[0069] Optionally, in one possible implementation of the fourth aspect, the aforementioned data link layer message includes M data blocks of equal length, where N and M are positive integers and N is less than M.

[0070] Optionally, in one possible implementation of the fourth aspect, the aforementioned transceiver unit is further configured to send at least two consecutive network layer messages to the network layer.

[0071] The fifth aspect of this application provides a message processing apparatus, including at least one processor coupled to a memory; the memory is used to store a program or instructions; the at least one processor is used to execute the program or instructions to enable the message processing apparatus to implement any possible implementation of the first or second aspect described above.

[0072] The sixth aspect of this application provides a message processing device, including at least one logic circuit and an input / output interface; the logic circuit is used to perform a method as described in any of the possible implementations of the first or second aspect above.

[0073] A seventh aspect of this application provides a computer-readable storage medium for storing one or more computer-executable instructions, which, when executed by a processor, perform a method as described in any possible implementation of either the first or second aspect above.

[0074] The eighth aspect of this application provides a computer program product in which, when a computer program in the computer program product is executed by a processor, the processor performs a method of any possible implementation of either the first or second aspect described above.

[0075] The ninth aspect of this application provides a chip or chip system including at least one processor for supporting a method for a communication device to implement any possible implementation of the first or second aspect described above.

[0076] In one possible design, the chip system may further include a memory for storing program instructions and data necessary for the communication device. The chip system may be composed of chips or may include chips and other discrete devices. Optionally, the chip system may also include interface circuitry that provides program instructions and / or data to at least one processor.

[0077] The tenth aspect of this application provides a message processing apparatus, including a chip system as described in the ninth aspect above. The chip system includes a processor and a communication interface for communicating with a module outside the chip system. The processor is used to run computer programs or instructions, enabling the message processing apparatus to perform the methods of any of the above aspects.

[0078] The eleventh aspect of this application provides a computing device cluster, which includes at least two computing devices, each computing device including a processor and a memory; the at least two computing devices include a first computing device and a second computing device; the processor of the first computing device is used to execute instructions stored in the memory of the first computing device, so that the computing device cluster executes any possible implementation of any aspect of the first aspect; the processor of the second computing device is used to execute instructions stored in the memory of the second computing device, so that the computing device cluster executes any possible implementation of any aspect of the second aspect.

[0079] The technical effects of any of the design methods in aspects five through eleven can be found in the technical effects of different design methods in aspects one or two above, and will not be repeated here.

[0080] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0081] Figure 1 This application provides a schematic diagram of the OSI model and the TCP / IP protocol suite.

[0082] Figure 2 A schematic diagram of a system structure is provided for this application;

[0083] Figure 3 A flowchart illustrating the message processing method provided in this application;

[0084] Figure 4A A structural example diagram of a data link layer message provided in this application;

[0085] Figure 4B Another structural example diagram of the data link layer message provided in this application;

[0086] Figure 5 Another structural example diagram of the data link layer message provided in this application;

[0087] Figure 6 A structural example diagram of the first and second overhead fields provided in this application;

[0088] Figure 7 Another structural example diagram of the first and second overhead fields provided in this application;

[0089] Figure 8 Another flowchart illustrating the message processing method provided in this application;

[0090] Figure 9 Another flowchart illustrating the message processing method provided in this application;

[0091] Figure 10 Another flowchart illustrating the message processing method provided in this application;

[0092] Figure 11 Another flowchart illustrating the message processing method provided in this application;

[0093] Figures 12 to 14 Here are some schematic diagrams of the message processing equipment involved in this application;

[0094] Figure 15 This application provides a schematic diagram of the structure of a computing device cluster;

[0095] Figure 16 This is a schematic diagram of another computing device cluster provided in this application. Detailed Implementation

[0096] The technical solutions of the embodiments of the present invention will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0097] To facilitate understanding, the relevant terms and concepts mainly involved in the embodiments of this application will be introduced below.

[0098] 1. Open System Interconnection Reference Model (OSI model)

[0099] The OSI model is a conceptual model proposed by the International Organization for Standardization (ISO). It is essentially a standard framework that attempts to interconnect various computers worldwide into a network. OSI divides the computer network architecture into seven layers: Physical Layer, Data Link Layer, Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer.

[0100] The functions of the seven-layer structure are as follows.

[0101] Physical layer: Converts data into electronic signals that can be transmitted through physical media.

[0102] Data link layer: used for frame coding and error correction control.

[0103] Network layer: Used for routing and addressing.

[0104] Transport layer: Used to provide general data transmission services for communication between processes on two hosts.

[0105] Session layer: Used to manage (e.g., establish, maintain, and reconnect) sessions between applications.

[0106] Presentation layer: Used for data processing (e.g., encoding / decoding, encryption / decryption, compression / decompression, etc.), negotiating data exchange formats, etc.

[0107] Application layer: Used to provide services to computer users, serving as the interface between user applications and the network.

[0108] 2. Transmission Control Protocol (TCP)

[0109] TCP is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. Specifically, TCP is a transport protocol specifically designed to provide reliable end-to-end byte streams over unreliable internetworks.

[0110] 3. Internet Protocol (IP)

[0111] IP is a network layer protocol in the TCP / IP architecture. The purpose of IP is to improve network scalability: first, to solve the problems of the Internet and achieve interconnection of large-scale, heterogeneous networks; second, to separate the coupling between top-level network applications and underlying network technologies, so as to facilitate the independent development of both. Based on end-to-end design principles, IP only provides hosts with a connectionless, unreliable, best-effort packet transmission service.

[0112] 4. TCP / IP protocol suite

[0113] The TCP / IP protocol suite is actually a collection of protocols, including TCP at the transport layer and IP at the network layer. Within the TCP / IP protocol suite, each protocol is responsible for a specific part of the network data transmission process, providing a particular service for data transmission over the network.

[0114] The TCP / IP protocol suite is developed based on the OSI model, but its layered structure differs from the OSI model. Specifically, the TCP / IP layered structure includes the application layer, transport layer, network layer, and network interface layer. The TCP / IP application layer essentially integrates the OSI model's application, presentation, and session layers into a single layer, allowing for tighter integration of data format representation, session establishment, and other functions with application software. The TCP / IP network interface layer essentially combines the OSI model's data link layer and physical layer, responsible for physical transmission between devices and data frame encapsulation.

[0115] 5. Ethernet

[0116] Ethernet typically consists of a data link layer and a physical layer. The OSI model's layered structure differs from Ethernet's. For example... Figure 1As shown, the Ethernet data link layer includes the Logical Link Control (LLC) layer and the Media Access Control (MAC) layer. The Ethernet physical layer includes the Reconciliation Sublayer (RS), Gigabit Media Independent Interface (GMII), Physical Coding Sublayer (PCS), Physical Medium Attachment Sublayer (PMA), Physical Medium Dependent Sublayer (PMD), and Medium Dependent Interface (MDI). For further explanation, please refer to standards such as IEEE 802.3; details will not be elaborated here.

[0117] 6. The terms "system" and "network" in the embodiments of this application can be used interchangeably. "At least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, "at least one of A, B and C" includes A, B, C, AB, AC, BC or ABC. And, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects and are not used to limit the order, sequence, priority or importance of multiple objects.

[0118] 7. In this application, the terms "exemplarily," "for example," etc., are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as an "example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the term "example" is intended to present concepts in a concrete manner. In the embodiments of this application, "of," "corresponding, relevant," and "corresponding" may sometimes be used interchangeably, and it should be noted that their intended meanings are consistent unless their distinction is emphasized.

[0119] Currently, after receiving multiple network layer packets from the network layer, the data link layer at the sending end encapsulates these network layer packets with added overhead to obtain multiple data link layer packets, which are then sent to the receiving end to achieve data transmission. However, when the network layer packets are small, the overhead becomes too large for a single data link layer packet, resulting in low packet carrying efficiency.

[0120] To address the aforementioned technical problems, embodiments of this application provide a message processing method and related equipment. Since the network layer involves multiple paths, while the data link layer typically involves a single path, after determining that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold, a data link layer message comprising at least two consecutive network layer messages is sent. That is, by concatenating at least two consecutive network layer messages to obtain a data link layer message, the small packet carrying efficiency of network layer messages is improved.

[0121] Before describing the message processing method provided in the embodiments of this application, the system architecture involved in the embodiments of this application will be described first.

[0122] For example, using the OSI model, please refer to [link / reference]. Figure 2 The system architecture diagram involved in this application embodiment includes a sending end and a receiving end.

[0123] When the sending end sends data to the receiving end, the data passes through the application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer of the sending end, and then through the transport link to the physical layer of the receiving end, and then through the physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer of the receiving end.

[0124] Optionally, the receiving end can also send data to the sending end. The transmission process of the receiving end sending data to the sending end is the reverse of the transmission process of the sending end sending data to the receiving end, and will not be described in detail here.

[0125] Understandable Figure 2The various layers in the text are for illustrative purposes only and should not be taken as limiting.

[0126] For example, during data transmission, each layer of the protocol is executed by the corresponding layer's entity. For instance, the entity executing the physical layer protocol can be called a physical layer entity, and the entity executing the data link layer protocol can be called a data link layer entity, and so on.

[0127] For ease of description in this embodiment, the processing of the protocol layer between two protocol entity units may be omitted during data transmission. For example, when data transmission occurs between the data link layer of the sending end and the data link layer of the receiving end, the processing of the physical layer of the receiving end and the sending end is omitted.

[0128] It should also be understood that the devices (e.g., transmitting end, receiving end) involved in the embodiments of the present invention can be network devices, specifically, such as routers, switches, XPUs (e.g., graphics processing unit (GPU), tensor processing unit (TPU), data processing unit (DPU), etc.), devices with display interfaces (DisplayPort, DP), or user equipment. The user equipment can also be referred to as a terminal, mobile station (MS), mobile terminal, etc., and can access the Internet or enterprise network via a wired network; the user equipment can also communicate with one or more core networks via a radio access network (RAN). For example, the user equipment can be a mobile phone (or "cellular" phone), a computer with a mobile terminal, or a portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile device, which exchanges voice and / or data with the radio access network.

[0129] Please see Figure 3 This application provides a flowchart illustrating a message processing method, which may include steps 301 to 303. Steps 301 to 303 may be executed by a message processing device, or by some components of the message processing device (e.g., a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the message processing device's functions. The following description uses execution by a message processing device as an example. The processing performed by a single execution entity in steps 301 to 303 can also be divided into processes performed by multiple execution entities (e.g., ...). Figure 1The execution of the multi-layered corresponding entities shown can be logically and / or physically separated. The message processing device may include the aforementioned... Figure 2 The sending end and / or the aforementioned Figure 2 The receiving end in the middle.

[0130] Step 301: The sending end determines that the length of each network layer message in at least two consecutive network layer messages is less than the first threshold.

[0131] In step 301, the sending end determines that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold. Alternatively, this can be understood as the sending end determining, based on the first threshold, whether at least two consecutive network layer messages are small data packets.

[0132] The first threshold can be set according to actual needs, and the unit granularity of the first threshold can be bits or bytes, etc. This application does not limit the specific value or unit granularity of the first threshold. For example, the first threshold can be 321 bytes or 232 bytes, etc.

[0133] The at least two consecutive network layer messages in this application embodiment can be understood as at least two consecutive or adjacent network layer message identifiers, or at least two consecutive or adjacent messages in the transmission sequence, or at least two consecutive or adjacent messages in the buffer, or at least two consecutive messages received from the network layer, or at least two adjacent messages received from the network layer, etc. The specific meaning is not limited here.

[0134] Optionally, the data link layer of the sending end receives at least two consecutive network layer messages sent by the network layer.

[0135] Step 302: The sending end sends a data link layer message.

[0136] In step 302, the sending end sends a data link layer message, which includes at least two consecutive network layer messages. The number of data link layer messages can be one or more, and the number of network layer messages included in a data link layer message can be two or more; no specific limitation is made here.

[0137] Sending a data link layer message can be understood as the sending end's data link layer sending a data link layer message to the physical layer of the sending end. Alternatively, it can be understood as the sending end's data link layer sending a data link layer message to the receiving end's data link layer.

[0138] Optionally, a data link layer message comprises M data blocks of equal length (also called message blocks, message segments, data segments, fragments, etc.), where M is a positive integer and can be set according to actual needs. Each data block in a data link layer message includes at least one network layer message.

[0139] Further optionally, each data block in a data link layer message includes at least one network layer message and an overhead field. The length of the aforementioned data block is an integer multiple of N, where N is a positive integer and can be set according to actual needs. For example, N can be 4 bytes, 5 bytes, 6 bytes, 20 bytes, 4 bits, 5 bits, 30 bits, etc.

[0140] Correspondingly, the data link layer at the sending end can send data link layer messages based on M data blocks of the same length.

[0141] For example, such as Figure 4A As shown, the data link layer message includes: data block 1, data block 2, ..., data block M. Data block 1 includes network layer message 1. Data block 2 includes network layer message 2. Data block M includes network layer message M.

[0142] Optionally, at least two consecutive network layer packets include a first network layer packet and a second network layer packet. The data link layer packet includes: a first network layer packet, a first cost field of the first network layer packet at the data link layer, a second network layer packet, a second cost field of the second network layer packet at the data link layer, and a checksum field of the data link layer packet. The first cost field and the second cost field mentioned above will be described in detail later, depending on the specific circumstances.

[0143] Alternatively, it can be understood as follows: for each of at least two consecutive network layer packets, a corresponding overhead field is added at the data link layer; and a checksum field is added to the concatenated data of the at least two network layer packets with added overhead fields. In other words, only one checksum field needs to be added to each of the at least two network layer packets at the data link layer. Compared to the method where a checksum field needs to be added to the data link layer for each network layer packet, the method provided in this application can reduce the overhead of checksum fields.

[0144] For example, such as Figure 4B As shown, the data link layer message includes: data block 1, data block 2, ..., data block M. Data block 1 includes a first cost field and network layer message 1. Data block 2 includes a second cost field and network layer message 2. Data block M includes a second cost field, network layer message M, and a checksum field.

[0145] The verification field in this application embodiment can use one or more of the following: Cyclic Redundancy Check (CRC), parity check, XOR check, Longitudinal Redundancy Check (LRC), etc., and no specific limitation is made here.

[0146] It should be noted that, in order for the receiving end to better parse data link layer messages, when there are at least two consecutive network layer messages, including more than three network layer messages, the first network layer message has a first overhead field added to the data link layer, and the remaining multiple network layer messages have the same second overhead field added to the data link layer.

[0147] For example, the first overhead field can be called LPH-A (link packet header assembly), and the second overhead field can be called MPH-A (multi packet header).

[0148] Alternatively, since the lengths of multiple network layer messages may not be the same, corresponding padding fields can be added to different data blocks to ensure that each data block has the same length.

[0149] For example, such as Figure 5 As shown, taking two data blocks as an example, a data link layer message includes: data block 1, data block 2, and a checksum field. The lengths of data block 1 and data block 2 are integer multiples of N. Data block 1 includes: a first network layer message, a first cost field of the first network layer message at the data link layer, and a first padding field corresponding to the first network layer message. Data block 1 also includes: a second network layer message, a second cost field of the second network layer message at the data link layer, and a second padding field corresponding to the second network layer message.

[0150] The process of adding a padding field can also be understood as a data block size alignment process. The padding field can be 0 or greater than 0.

[0151] For example, a first overhead field is added before the first network layer packet to obtain the first data. If the length of the first data is not an integer multiple of N, a first padding field is added to the first data to obtain the first data block, and the length of the first data block is an integer multiple of N. In other words, the first data is padded to an integer multiple of N. Of course, if the length of the first data is already an integer multiple of N, then the first data block is equivalent to the first data. That is, the first data is used as the first data block, or it can be understood that the first padding field is not added, or that the first padding field is 0.

[0152] For example, a second overhead field is added before the second network layer message to obtain the second data. If the length of the second data is not an integer multiple of N, a second padding field is added to the second data to obtain the second data block, and the length of the second data block is an integer multiple of N. In other words, the second data is padded to an integer multiple of N. Of course, if the length of the second data is already an integer multiple of N, then the second data block is equivalent to the second data. That is, the second data is treated as the second data block, or it can be understood that no second padding field is added, or that the second padding field is 0.

[0153] After alignment, the sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

[0154] In addition to aligning the length of each data block within a data link layer message, the total length of the data link layer message can also be aligned. For example, when sending multiple data link layer messages, the length of each data link layer message can be Q (e.g., Q could be 10 bytes, 20 bytes, 32 bytes, 20 bits, 30 bits, etc.). Alternatively, each data link layer message can include Q data blocks (e.g., Q could be 8, 16, 20, etc.), where Q is a positive integer and can be set according to actual needs. Similarly, when the length of a data link layer message is not an integer multiple of Q, a third padding field can be added to make the length of the added data link layer message an integer multiple of Q. Of course, if the length of the data link layer message is already an integer multiple of Q, then no third padding field needs to be added, or it can be understood that the third padding field is 0.

[0155] For example, if the sum of the lengths of the first data block, the second data block, and the check field is not M, then a third padding field is added, and the sum of the lengths after adding the third padding field is M. Of course, if the sum of the lengths of the first data block, the second data block, and the check field is M, then no third padding field is added, or it can be understood that the third padding field is 0.

[0156] The above describes the data link layer message, the check field, the possible padding fields for the data block, and the possible padding fields for the data link layer message. The following describes the first overhead field and the second overhead field.

[0157] In this application embodiment, there are several cases for the first cost field and the second cost field, which are described below.

[0158] In the first case, the first overhead field is used to indicate the length of the data link layer message.

[0159] In this case, the first expense field includes: the first field, the second field, and the third field. The second expense field includes the fourth field.

[0160] The first field indicates that the first network layer message and the second network layer message are concatenated packets. Alternatively, the first field indicates that the data link layer message is a concatenated packet. For example, the first field can use 1 bit to indicate whether the data link layer message is a concatenated packet. For instance, a first field value of "0" indicates that the data link layer message is not a concatenated packet, and a first field value of "1" indicates that the data link layer message is a concatenated packet. Of course, the first field can also be set to "1" to indicate that the data link layer message is not a concatenated packet, and "0" to indicate that the data link layer message is a concatenated packet.

[0161] The second field is used to indicate the length of the data link layer message. Alternatively, the second field is used to indicate the number of data blocks included in the data link layer message. Or, the second field is used to indicate the number of data blocks participating in the packet assembly. For example, the length and number indicated by the second field can be Q as described above.

[0162] The third field is used to indicate the sum of the lengths of the first network layer message and the first overhead field. Alternatively, it can be understood as indicating the size of the payload in the first data block.

[0163] The fourth field indicates the sum of the lengths of the second network layer message and the second overhead field. Alternatively, it can be understood as indicating the size of the payload in the second data block.

[0164] For example, in this case, the first expense field and the second expense field are as follows: Figure 6 As shown, the first field can also be called the Assembly field, the second field can also be called the Olength field, and the third and fourth fields can also be called the Plength fields.

[0165] For example, the first cost field is the cost field of the first data block in the data link layer message, and the second cost field is the cost field of the data blocks in the data link layer message other than the first data block.

[0166] In the second case, the first overhead field does not need to indicate the length of the data link layer message.

[0167] In this case, the first expense field includes the first field and the third field. The second expense field includes the fourth field and the fifth field.

[0168] The first field indicates that the first network layer message and the second network layer message are concatenated packets. Alternatively, the first field indicates that the data link layer message is a concatenated packet. For example, the first field can use 1 bit to indicate whether the data link layer message is a concatenated packet. For instance, a first field value of "0" indicates that the data link layer message is not a concatenated packet, and a first field value of "1" indicates that the data link layer message is a concatenated packet. Of course, the first field can also be set to "1" to indicate that the data link layer message is not a concatenated packet, and "0" to indicate that the data link layer message is a concatenated packet.

[0169] The third field is used to indicate the sum of the lengths of the first network layer message and the first overhead field. Alternatively, it can be understood as indicating the size of the payload in the first data block.

[0170] The fourth field indicates the sum of the lengths of the second network layer message and the second overhead field. Alternatively, it can be understood as indicating the size of the payload in the second data block.

[0171] The fifth field is used to indicate whether the second network layer packet is the last network layer packet participating in the packet consolidation process. Alternatively, it can be understood as indicating whether the current data block is the last data block participating in the packet consolidation process. For example, the fifth field can use 1 bit to indicate whether the current data block is the last data block participating in the packet consolidation process. For instance, a fifth field of "0" indicates that the current data block is the last data block participating in the packet consolidation process, and a fifth field of "1" indicates that the current data block is not the last data block participating in the packet consolidation process. Another example is that a fifth field of "0" indicates the end of packet consolidation, and a fifth field of "1" indicates that packet consolidation continues. Of course, it is also possible for the fifth field to be "1" to indicate that the current data block is the last data block participating in the packet consolidation process, and a fifth field of "0" to indicate that the current data block is not the last data block participating in the packet consolidation process. Yet another example is that a fifth field of "1" indicates the end of packet consolidation, and a fifth field of "0" indicates that packet consolidation continues.

[0172] For example, in this case, the first expense field and the second expense field are as follows: Figure 7 As shown, the first field can also be called the Assembly field, and the third and fourth fields can also be called the Plength field.

[0173] For example, the first cost field is the cost field of the first data block in the data link layer message, and the second cost field is the cost field of the data blocks in the data link layer message other than the first data block.

[0174] Step 303: Parse the data link layer message.

[0175] In step 303, the receiving end receives the data link layer message and parses the data link layer message to obtain at least two consecutive network layer messages.

[0176] Similarly, when a receiving end receives a data link layer message, it can mean that the receiving end's data link layer receives the data link layer message sent by the sending end's physical layer. Alternatively, it can be understood as the receiving end's data link layer receiving the data link layer message sent by the sending end.

[0177] In one possible implementation, the receiving end determines that the data link layer message is a concatenated message based on the first field, determines the length of the data link layer message based on the second field, and performs verification based on the checksum field. If the verification is successful, the receiving end parses the data link layer message to obtain the first network layer message based on the third field, and parses the data link layer message to obtain the second network layer message based on the fourth field.

[0178] In another possible implementation, the receiving end determines whether the network layer packet processing has ended based on the fourth field; if it has ended, it performs verification based on the check field; if the verification is successful, it parses the data link layer packet based on the second field to obtain the first network layer packet, and parses the data link layer packet based on the third field to obtain the second network layer packet.

[0179] Optionally, the receiving side's data link layer parses the data link layer message to obtain at least two consecutive network layer messages, and sends at least two consecutive network layer messages to the receiving end's network layer.

[0180] In this embodiment, on the one hand, after determining that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold, a data link layer message comprising at least two consecutive network layer messages is sent. That is, by concatenating at least two consecutive network layer messages to obtain a data link layer message, the small packet carrying efficiency of the network layer message is improved. On the other hand, during the concatenation of at least two network layer messages, the data block length is aligned using a first padding field and a second padding field, improving the efficiency of the receiving end in parsing the data block. Furthermore, during the generation of the data link layer message, the data link layer message length is aligned using a third padding field, improving the efficiency of the receiving end in parsing the data link layer message.

[0181] For ease of understanding, the following description uses N as 4 bytes and Q as 10 bytes as an example to illustrate the sending and receiving processes involved in different cases of the overhead field.

[0182] In one possible implementation method Figure 3 The sending process involved in the first case in the illustrated embodiment is as follows: Figure 8 As shown, Figure 3The receiving process involved in the first case in the illustrated embodiment is as follows: Figure 9 As shown.

[0183] Please see Figure 8 This application provides another flowchart illustrating the message processing method, which may include steps 801 to 811. Steps 801 to 811 can be executed by a message processing device, or by some components of the message processing device (e.g., a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the message processing device's functions. The following description uses execution by a message processing device as an example. The processing performed by a single execution entity in steps 801 to 811 can also be divided into multiple execution entities (e.g., ... Figure 1 The execution of the multi-layered corresponding entities shown can be logically and / or physically separated. The message processing device can be one of the aforementioned... Figure 2 The sending end in the middle.

[0184] Step 801: Determine that the length of each network layer message in at least two consecutive network layer messages is less than the first threshold.

[0185] This step 801 can be referred to the above. Figure 3 Step 301 in the illustrated embodiment will not be repeated here.

[0186] Step 802: Record the number of data blocks participating in packet assembly, and add a first overhead field before the first network layer packet.

[0187] After the sender determines that there are at least two consecutive network layer packets less than the first threshold, it records the number of data blocks involved in packet assembly and adds a first overhead field before the first network layer packet to obtain the first data. This first overhead field can be referenced from the previous section. Figure 3 The first scenario in the illustrated embodiment will not be described further here.

[0188] Step 803: Is the length after the increase divisible by 4? If not, proceed to step 804; if yes, proceed to step 805.

[0189] The sending end determines whether the length after the increase is divisible by 4. If not, proceed to step 804; if yes, proceed to step 805.

[0190] Alternatively, the sending end checks if the length of the first data is a multiple of 4. If so, it directly uses the first data as the first data block. If not, it adds a first padding field to obtain the first data block, ensuring that the length of the first data block is divisible by 4.

[0191] The first data includes the first network layer message and the first overhead field.

[0192] Step 804: Increase the first padding field to an integer multiple of 4.

[0193] If the length of the first data is not divisible by 4, increase the first padding field to a multiple of 4. That is, the length of the first data block after adding the first padding field is a multiple of 4. After increasing the first padding field to a multiple of 4, proceed to step 805.

[0194] Step 805: Begin assembling the next second network layer packet and add a second overhead field before the second network layer packet.

[0195] After the sending end processes the first network layer message and obtains the first data block, it begins to assemble the next second network layer message and adds a second overhead field before the second network layer message to obtain the second data.

[0196] Step 806: Is the length after the increase divisible by 4? If not, proceed to step 807; if yes, proceed to step 808.

[0197] Similarly, the sending end determines whether the length after the increase is divisible by 4. If not, proceed to step 807; if so, proceed to step 808.

[0198] Alternatively, the sending end checks if the length of the second data is a multiple of 4. If so, it directly uses the second data as the second data block. If not, it adds a second padding field to obtain the second data block, ensuring that the length of the second data block is divisible by 4.

[0199] The second data includes the second network layer message and the second overhead field.

[0200] Step 807: Increase the second padding field to an integer multiple of 4.

[0201] If the length of the second data is not divisible by 4, increase the second padding field to a multiple of 4. That is, the length of the second data block obtained after adding the second padding field is a multiple of 4. After increasing the second padding field to a multiple of 4, proceed to step 808.

[0202] Step 808: Are there any more network layer packets participating in the packet reassembly? If no, proceed to step 809; if yes, proceed to step 805.

[0203] The sender determines whether there are any more network layer packets to participate in packet reassembly. If not, proceed to step 809; if yes, proceed to step 805.

[0204] Alternatively, if the second network layer packet is the last network layer packet to participate in the packet consolidation process, then step 809 is executed. If the second network layer packet is not the last network layer packet to participate in the packet consolidation process, then step 805 is executed to continue processing the next network layer packet to participate in the packet consolidation process (e.g., adding a second overhead field, whether to add a second padding field, etc.) until the processing of the network layer packets participating in the packet consolidation process is completed.

[0205] Step 809: Is the length of the current data link layer message plus the length of the checksum field a multiple of 20? If not, proceed to step 810; if yes, proceed to step 811.

[0206] After the sending end determines that the network layer packets involved in the packet assembly have finished processing, it checks whether the length of the current data link layer packet plus the length of the checksum field is an integer multiple of 20. If not, proceed to step 810; if yes, proceed to step 811.

[0207] Step 810: Increase the third padding field to an integer multiple of 20.

[0208] If the length of the current data link layer packet plus the length of the checksum field is not a multiple of 20, add a third padding field to make it a multiple of 20. That is, the length of the data link layer packet after adding the third padding field is a multiple of 20. After adding the third padding field to make it a multiple of 20, proceed to step 811.

[0209] Step 811: After adding the verification field, the packet assembly is completed and a data link layer message is sent.

[0210] If the length of the current data link layer message plus the length of the checksum field is a multiple of 20, then the checksum field is added directly, the packet assembly is completed, and the data link layer message is sent.

[0211] In this embodiment, on the one hand, after determining that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold, a data link layer message comprising at least two consecutive network layer messages is sent. That is, by concatenating at least two consecutive network layer messages to obtain a data link layer message, the small packet carrying efficiency of the network layer message is improved. On the other hand, during the concatenation of at least two network layer messages, the data block length is aligned using the first padding field and the second padding field, improving the efficiency of the receiving end in parsing the data block. Furthermore, during the generation of the data link layer message, the data link layer message length is aligned using the third padding field, improving the efficiency of the receiving end in parsing the data link layer message. Additionally, the length of the data link layer message is indicated by the second field in the first overhead field, increasing the efficiency of the receiving end in parsing the data link layer message.

[0212] Please see Figure 9This application provides another flowchart illustrating the message processing method, which may include steps 901 to 909. Steps 901 to 909 may be executed by a message processing device, or by some components of the message processing device (e.g., a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the message processing device's functions. The following description uses execution by a message processing device as an example. The processing performed by a single execution entity in steps 901 to 909 can also be divided into processing by multiple execution entities (e.g., ...). Figure 1 The execution of the multi-layered corresponding entities shown can be logically and / or physically separated. The message processing device can be one of the aforementioned... Figure 2 The receiving end in the middle.

[0213] Step 901: Determine that the first cost field in the data link layer message exists.

[0214] The receiving end receives the data link layer message and determines that the first cost field in the data link layer message exists. For example, the first cost field indicates that the data link layer message is a packet concatenation message.

[0215] Similarly, when a receiving end receives a data link layer message, it can mean that the receiving end's data link layer receives the data link layer message sent by the sending end's physical layer. Alternatively, it can be understood as the receiving end's data link layer receiving the data link layer message sent by the sending end.

[0216] Step 902: Determine the boundary of the data link layer message based on the second field.

[0217] The receiving end determines the boundary of the data link layer message based on the second field, that is, it determines the boundary of the data link layer message based on the length of the data link layer message indicated by the second field.

[0218] Step 903: Perform validation based on the validation field. If validation is successful, proceed to step 905; if validation fails, proceed to step 904.

[0219] The receiving end verifies the data link layer message based on the verification field. If the verification is successful, proceed to step 905; if the verification fails, proceed to step 904.

[0220] Alternatively, it can be understood as using checksum fields to determine whether data link layer messages are transmitted correctly. For example, whether a data link layer message is transmitted completely and / or whether a data link layer message is transmitted correctly.

[0221] Step 904: Discard the message and trigger retransmission.

[0222] If the verification fails, the message (i.e., the data link layer message) is discarded, triggering a retransmission.

[0223] For example, if a negative acknowledgment (NACK) message is sent to the sender, the sender will retransmit the data link layer message. Alternatively, without sending a NACK message, if the sender does not receive an acknowledgment (ACK) message, it will retransmit the data link layer message.

[0224] Step 905: Determine the data block boundary based on the second overhead field.

[0225] If the verification is successful, the sender determines the data block boundary based on the second overhead field. That is, the boundary of the second data block is determined based on the length of the second data block indicated by the second overhead field.

[0226] Step 906: Is there a field to fill in? If there is a field to fill in, proceed to step 907; otherwise, proceed to step 908.

[0227] The receiving end determines whether there is a fill field. If there is a fill field, proceed to step 907; otherwise, proceed to step 908.

[0228] The fill field may include the aforementioned Figure 3 The descriptions of the first fill field, the second fill field, and the third fill field in the illustrated embodiment will not be repeated here.

[0229] Step 907: Delete the fill field.

[0230] If the receiving end determines that there is a padding field, it deletes the padding field and executes step 908. That is, deleting the padding field determines at least two network layer packets in the data link layer packet.

[0231] Step 908: Has the second cost field of the next data block been found? If yes, proceed to step 905; otherwise, proceed to step 909.

[0232] The receiving end determines whether the second cost field of the next data block has been found. If yes, proceed to step 905; otherwise, proceed to step 909. Alternatively, if there is a second cost field for the next data block, continue to repeat step 905.

[0233] Step 909, message parsing complete.

[0234] If the receiving end determines that it cannot find the second overhead field of the next data block, then the message parsing ends. Alternatively, it can be understood as the message parsing ending after all data blocks in the data link layer message have been parsed (i.e., the corresponding network layer message has been parsed).

[0235] In this embodiment, on the one hand, a data link layer packet comprising at least two consecutive network layer packets is received. That is, at least two consecutive network layer packets are combined to form the data link layer packet, thereby improving the small packet carrying efficiency of the network layer packets. On the other hand, the accuracy of the receiving end in parsing data blocks is improved by judging and deleting padding fields. Furthermore, during the parsing of the data link layer packet, the length of the data link layer packet is indicated by the second field in the first overhead field, increasing the efficiency of the receiving end in parsing the data link layer packet. Also, the accuracy of the receiving end in parsing data blocks is improved by judging and deleting padding fields.

[0236] In another possible way of implementation Figure 3 The sending process involved in the second case in the illustrated embodiment is as follows: Figure 10 As shown, Figure 3 The receiving process involved in the first case in the illustrated embodiment is as follows: Figure 11 As shown.

[0237] Please see Figure 10 This application provides another flowchart illustrating the message processing method, which may include steps 1001 to 1011. Steps 1001 to 1011 can be executed by a message processing device, or by some components of the message processing device (e.g., a processor, chip, or chip system), or by a logic module or software capable of implementing all or part of the message processing device's functions. The following description uses execution by a message processing device as an example. The processing performed by a single execution entity in steps 1001 to 1011 can also be divided into processing by multiple execution entities (e.g., ...). Figure 1 The execution of the multi-layered corresponding entities shown can be logically and / or physically separated. The message processing device can be one of the aforementioned... Figure 2 The sending end in the middle.

[0238] Step 1001: Determine that the length of each network layer message in at least two consecutive network layer messages is less than the first threshold.

[0239] This step 1001 can refer to the aforementioned. Figure 3 Step 301 in the illustrated embodiment will not be repeated here.

[0240] Step 1002: Add a first overhead field before the first network layer message.

[0241] After the sender determines at least two consecutive network layer packets with values ​​less than the first threshold, it adds a first overhead field before the first network layer packet to obtain the first data. This first overhead field can be referenced from the previous description. Figure 3 The second scenario in the illustrated embodiment will not be described further here.

[0242] Step 1003: Is the length after the increase divisible by 4? If not, proceed to step 1004; if yes, proceed to step 1005.

[0243] Step 1004: Increase the first fill field to an integer multiple of 4.

[0244] Steps 1003 and 1004 are the same as those mentioned above. Figure 8 Step 803 in the illustrated embodiment is similar to step 804, and will not be described again here.

[0245] Step 1005: Begin assembling the next second network layer packet and add a second overhead field before the second network layer packet.

[0246] After the sending end processes the first network layer packet and obtains the first data block, it begins assembling the next second network layer packet, adding a second overhead field before the second network layer packet to obtain the second data. This second overhead field can be referred to the aforementioned... Figure 3 The second scenario in the illustrated embodiment will not be described further here.

[0247] Step 1006: Is the length after the increase divisible by 4? If not, proceed to step 1007; if yes, proceed to step 1008.

[0248] Step 1007: Increase the second padding field to an integer multiple of 4.

[0249] Step 1008: Are there any network layer packets participating in the packet reassembly? If no, proceed to step 1009; if yes, proceed to step 1005.

[0250] Step 1009: Is the length of the current data link layer message plus the length of the checksum field a multiple of 20? If not, proceed to step 1010; if yes, proceed to step 1011.

[0251] Step 1010: Increase the third padding field to an integer multiple of 20.

[0252] Step 1011: After adding the verification field, the packet assembly is completed and a data link layer message is sent.

[0253] Steps 1006 to 1011 are the same as those described above. Figure 8 Steps 806 to 811 in the illustrated embodiment are similar and will not be described again here.

[0254] In this embodiment, on the one hand, after determining that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold, a data link layer message comprising at least two consecutive network layer messages is sent. That is, by concatenating at least two consecutive network layer messages to obtain a data link layer message, the small packet carrying efficiency of the network layer message is improved. On the other hand, during the concatenation process of at least two network layer messages, the data block length is aligned using the first padding field and the second padding field, improving the efficiency of the receiving end in parsing the data block. Furthermore, during the generation of the data link layer message, the data link layer message length is aligned using the third padding field, improving the efficiency of the receiving end in parsing the data link layer message. Additionally, the first field in the first overhead field indicates that the data link layer message is a concatenated message, increasing the accuracy of the receiving end in parsing the data link layer message. Finally, the length of the data block is indicated by the third field in the first overhead field and the fourth field in the second overhead field, increasing the efficiency of the receiving end in parsing the data link layer message. On the other hand, the fifth field in the second overhead field indicates whether the receiver should continue to use packet reassembly to parse data link layer messages, thereby improving the accuracy of determining network layer messages.

[0255] Please see Figure 11 This application provides another flowchart illustrating the message processing method, which may include steps 1101 to 1110. Steps 1101 to 1110 can be executed by a message processing device, or by some components (e.g., processor, chip, or chip system) within the message processing device, or by a logic module or software capable of implementing all or part of the message processing device's functions. The following description uses execution by a message processing device as an example. The processing performed by a single execution entity in steps 1101 to 1110 can also be divided into processes performed by multiple execution entities (e.g., ...). Figure 1 The execution of the multi-layered corresponding entities shown can be logically and / or physically separated. The message processing device can be one of the aforementioned... Figure 2 The receiving end in the middle.

[0256] Step 1101: Determine that the first cost field in the data link layer message exists.

[0257] The receiving end receives the data link layer message and determines that the first cost field in the data link layer message exists. For example, the first cost field indicates that the data link layer message is a packet concatenation message.

[0258] Similarly, when a receiving end receives a data link layer message, it can mean that the receiving end's data link layer receives the data link layer message sent by the sending end's physical layer. Alternatively, it can be understood as the receiving end's data link layer receiving the data link layer message sent by the sending end.

[0259] Step 1102: Find the next second cost field and determine whether the packet consolidation is complete based on the fifth field. If it is complete, proceed to step 1103; if it is not complete, repeat step 1102.

[0260] The receiving end searches for the next second overhead field and determines whether packet assembly is complete based on the fifth field. If it is complete, proceed to step 1103; if it is not complete, repeat step 1102.

[0261] Step 1103: Locate the boundaries of the validation field and perform validation.

[0262] The receiving end locates the boundary of the verification field and verifies the data link layer message based on the verification field.

[0263] Step 1104: If the verification is successful, proceed to step 1105; if the verification fails, proceed to step 1106.

[0264] The receiving end verifies the data link layer message based on the verification field. If the verification is successful, proceed to step 1105; if the verification fails, proceed to step 1106.

[0265] Alternatively, it can be understood as using checksum fields to determine whether data link layer messages are transmitted correctly. For example, whether a data link layer message is transmitted completely and / or whether a data link layer message is transmitted correctly.

[0266] Step 1105: Determine the boundaries of the data block based on the fourth field and parse out the small packets.

[0267] If the verification is successful, the sender determines the data block boundary based on the fourth field in the second overhead field and parses out the small packet. That is, the boundary of the second data block is determined based on the length of the second data block indicated by the fourth field in the second overhead field, and the second network layer message is parsed based on the second data block.

[0268] Step 1106: Discard the message and trigger retransmission.

[0269] If the verification fails, the message (i.e., the data link layer message) is discarded, triggering a retransmission.

[0270] For example, a NACK message is sent to the sender, and the sender retransmits the data link layer message. Alternatively, without sending a NACK message, the sender retransmits the data link layer message after not receiving an ACK message.

[0271] Step 1107: Is there a field to fill in? If there is a field to fill in, proceed to step 1108; if there is no field to fill in, proceed to step 1109.

[0272] The receiving end determines whether there is a fill field. If there is a fill field, proceed to step 1108; otherwise, proceed to step 1109.

[0273] The fill field may include the aforementioned Figure 3 The descriptions of the first fill field, the second fill field, and the third fill field in the illustrated embodiment will not be repeated here.

[0274] Step 1108: Delete the fill field.

[0275] If the receiving end determines that there is a padding field, it deletes the padding field and executes step 1108. That is, deleting the padding field determines at least two network layer packets in the data link layer packet.

[0276] Step 1109: Has the second cost field of the next data block been found? If yes, proceed to step 1105; otherwise, proceed to step 1110.

[0277] The receiving end determines whether the second cost field of the next data block has been found. If yes, proceed to step 1105; otherwise, proceed to step 1110. Alternatively, if there is a second cost field for the next data block, continue to repeat step 1105.

[0278] Step 1110: Message parsing complete.

[0279] If the receiving end determines that it cannot find the second overhead field of the next data block, then the message parsing ends. Alternatively, it can be understood as the message parsing ending after all data blocks in the data link layer message have been parsed (i.e., the corresponding network layer message has been parsed).

[0280] In this embodiment, on the one hand, a data link layer packet comprising at least two consecutive network layer packets is received. That is, at least two consecutive network layer packets are concatenated to obtain the data link layer packet, thereby improving the small packet carrying efficiency of the network layer packets. On the other hand, the accuracy of the receiving end in parsing data blocks is improved by judging and deleting padding fields. Furthermore, the accuracy of the receiving end in parsing data link layer packets is increased by using the first field in the first overhead field to indicate that the data link layer packet is a concatenated packet. Additionally, the length of the data block is indicated by the third field in the first overhead field and the fourth field in the second overhead field, increasing the efficiency of the receiving end in parsing data link layer packets. Finally, the accuracy in determining the network layer packet is improved by using the fifth field in the second overhead field to indicate whether the receiving end should continue to use the concatenation method to parse the data link layer packet.

[0281] The message processing method in this application has been described above. The message processing device in this application is described below. Please refer to [link / reference]. Figure 12 This application discloses an embodiment of a message processing device that can implement the functions of the message processing device in the above-described method embodiments, and thus also achieve the beneficial effects of the above-described method embodiments. In this application, the message processing device includes: a transceiver unit 1201 and a processing unit 1202.

[0282] Both the transceiver unit 1201 and the processing unit 1202 can be implemented in software or in hardware. For example, the implementation of the processing unit 1202 will be described below. Similarly, the implementation of the transceiver unit 1201 can refer to the implementation of the processing unit 1202.

[0283] As an example of a software functional unit, the processing unit 1202 may include code running on a computing instance. The computing instance can be similar to the aforementioned description of a message processing device, meaning it may include at least one of a physical host (computing device), a virtual machine, or a container. Related descriptions can be found in the previous descriptions and will not be repeated here.

[0284] Furthermore, as an example of a hardware functional unit, the processing unit 1202 may include at least one computing device, such as a server. Alternatively, the processing unit 1202 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.

[0285] In one possible implementation, the message processing device can be the aforementioned Figure 2 The sending end in this mode. The execution of each unit in this mode is as follows:

[0286] Processing unit 1202 is configured to determine that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold.

[0287] The transceiver unit 1201 is used to send data link layer messages, which include at least two consecutive network layer messages.

[0288] Optionally, at least two consecutive network layer packets include a first network layer packet and a second network layer packet, and the data link layer packet includes: a first network layer packet, a first cost field of the first network layer packet in the data link layer, a second network layer packet, a second cost field of the second network layer packet in the data link layer, and a check field of the data link layer packet.

[0289] Optionally, the first cost field includes: a first field, a second field, and a third field. The first field is used to indicate that the first network layer message and the second network layer message are concatenated packets. The second field is used to indicate the length of the data link layer message. The third field is used to indicate the sum of the lengths of the first network layer message and the first cost field. The second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer message and the second cost field.

[0290] Optionally, the first cost field includes a first field and a third field, wherein the first field is used to indicate that the first network layer packet and the second network layer packet are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer packet and the first cost field; the second cost field includes a fourth field and a fifth field, wherein the fourth field is used to indicate the sum of the lengths of the second network layer packet and the second cost field, and the fifth field is used to indicate whether the second network layer packet is the last network layer packet to participate in the concatenation process.

[0291] Optionally, the data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; the sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

[0292] Optionally, the data link layer message includes M data blocks of equal length, where M is a positive integer.

[0293] Optionally, the transceiver unit 1201 is specifically used to send data link layer messages based on M data blocks of the same length.

[0294] Optionally, the processing unit 1202 is further configured to add a first overhead field before the first network layer message to obtain first data; the processing unit 1202 is further configured to add a first padding field to the first data to obtain a first data block if the length of the first data is not an integer multiple of N, and the length of the first data block is an integer multiple of N, and the data link layer message includes the first data block.

[0295] Optionally, the processing unit 1202 is further configured to add a second overhead field before the second network layer message to obtain second data; the processing unit 1202 is further configured to add a second padding field to the second data to obtain a second data block if the length of the second data is not an integer multiple of N, and the length of the second data block is an integer multiple of N, and the data link layer message includes the second data block.

[0296] Optionally, the processing unit 1202 is further configured to add a third padding field if the sum of the lengths of the first data block, the second data block, and the check field is not M, and the sum of the lengths after adding the third padding field is M; the processing unit 1202 is further configured to include a first network layer message, a first overhead field, and a first padding field in the first data block; and the second data block includes a second network layer message, a second overhead field, and a second padding field.

[0297] Optionally, the transceiver unit 1201 is also configured to receive at least two consecutive network layer messages sent from the network layer.

[0298] In this embodiment, the operations performed by each unit in the message processing device are the same as those described above. Figures 1 to 11 The description of the sending end in the illustrated embodiment is similar and will not be repeated here.

[0299] In this embodiment, on one hand, after the processing unit 1202 determines that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold, the transceiver unit 1201 sends a data link layer message comprising at least two consecutive network layer messages. That is, by concatenating at least two consecutive network layer messages to obtain a data link layer message, the small packet carrying efficiency of the network layer message is improved. On the other hand, during the concatenation process of at least two network layer messages, the data block length is aligned using the first padding field and the second padding field, improving the efficiency of the receiving end in parsing the data block. Furthermore, during the generation of the data link layer message, the data link layer message length is aligned using the third padding field, improving the efficiency of the receiving end in parsing the data link layer message.

[0300] In another possible implementation, the message processing device can be as described above. Figure 2 The receiving end in this mode. The units in this mode execute as follows:

[0301] The transceiver unit 1201 is used to receive data link layer messages, which include at least two consecutive network layer messages.

[0302] Processing unit 1202 is used to parse data link layer messages to obtain at least two consecutive network layer messages.

[0303] Optionally, at least two consecutive network layer packets include a first network layer packet and a second network layer packet, and the data link layer packet includes: a first network layer packet, a first cost field of the first network layer packet in the data link layer, a second network layer packet, a second cost field of the second network layer packet in the data link layer, and a check field of the data link layer packet.

[0304] Optionally, the first cost field includes: a first field, a second field, and a third field. The first field is used to indicate that the first network layer message and the second network layer message are concatenated packets. The second field is used to indicate the length of the data link layer message. The third field is used to indicate the sum of the lengths of the first network layer message and the first cost field. The second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer message and the second cost field.

[0305] Optionally, the processing unit 1202 is specifically used to determine that the data link layer message is a packet concatenation message based on the first field; the processing unit 1202 is specifically used to determine the length of the data link layer message based on the second field and perform verification based on the verification field; the processing unit 1202 is specifically used to parse the data link layer message to obtain the first network layer message based on the third field if the verification is successful, and parse the data link layer message to obtain the second network layer message based on the fourth field.

[0306] Optionally, the first cost field includes a first field and a third field, wherein the first field is used to indicate that the first network layer packet and the second network layer packet are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer packet and the first cost field; the second cost field includes a fourth field and a fifth field, wherein the fourth field is used to indicate the sum of the lengths of the second network layer packet and the second cost field, and the fifth field is used to indicate whether the second network layer packet is the last network layer packet to participate in the concatenation process.

[0307] Optionally, the processing unit 1202 is specifically used to determine whether the network layer packet processing has ended based on the fourth field; the processing unit 1202 is specifically used to perform verification based on the verification field if it has ended; the processing unit 1202 is specifically used to parse the data link layer packet to obtain the first network layer packet based on the second field if the verification is successful, and parse the data link layer packet to obtain the second network layer packet based on the third field.

[0308] Optionally, the data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; the sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

[0309] Optionally, the data link layer message includes M data blocks of the same length, where N and M are positive integers, and N is less than M.

[0310] Optionally, the transceiver unit 1201 is also used to send at least two consecutive network layer messages to the network layer.

[0311] In this embodiment, the operations performed by each unit in the message processing device are the same as those described above. Figures 1 to 11 The description of the receiving end in the illustrated embodiment is similar and will not be repeated here.

[0312] In this embodiment, the transceiver unit 1201 receives a data link layer packet comprising at least two consecutive network layer packets. That is, the data link layer packet is obtained by concatenating at least two consecutive network layer packets, thereby improving the small packet carrying efficiency of the network layer packets. Furthermore, during the parsing of the data link layer packet, the accuracy of parsing data blocks at the receiving end is improved by judging and deleting padding fields.

[0313] Please see Figure 13 This is another schematic structural diagram of the message processing device provided in this application. The message processing device includes logic circuit 1301 and input / output interface 1302. The message processing device can be an integrated circuit, etc.

[0314] in, Figure 12 The transceiver unit 1201 shown can be a communication interface, which can be... Figure 13 The input / output interface 1302 may include an input interface and an output interface. Alternatively, the communication interface may also be a transceiver circuit, which may include an input interface circuit and an output interface circuit. Figure 12 The processing unit 1202 shown can be Figure 13 The logic circuit 1301 in the middle.

[0315] The logic circuit 1301 and the input / output interface 1302 can also perform other steps executed by the message processing device in any embodiment and achieve corresponding beneficial effects, which will not be elaborated here.

[0316] Optionally, the logic circuit 1301 can be a processing device, the functions of which can be partially or entirely implemented in software.

[0317] Optionally, the message processing device may include a memory and a processor, wherein the memory is used to store a computer program, and the processor reads and executes the computer program stored in the memory to perform the corresponding processing and / or steps in any of the method embodiments.

[0318] Optionally, the message processing device may consist of only a processor. A memory for storing computer programs is located outside the processing device, and the processor is connected to the memory via circuitry / wires to read and execute the computer programs stored in the memory. The memory and processor may be integrated together or physically independent.

[0319] Optionally, the message processing device may be one or more chips, or one or more integrated circuits. For example, the processing device may be one or more field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), system on-chips (SoCs), central processors (CPUs), network processors (NPs), digital signal processors (DSPs), microcontroller units (MCUs), programmable logic devices (PLDs), or other integrated chips, or any group of the above chips or processors.

[0320] Please see Figure 14 This refers to the message processing device 1400 described in the embodiments of this application. The message processing device 1400 may be the aforementioned message processing device, etc.

[0321] like Figure 14 As shown, the message processing device 1400 includes a bus 1402, a processor 1404, a memory 1406, and a communication interface 1408. The processor 1404, the memory 1406, and the communication interface 1408 communicate with each other via the bus 1402. The message processing device 1400 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the message processing device 1400.

[0322] Bus 1402 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 14 The bus 1402 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 1402 may include a path for transmitting information between various components of the message processing device 1400 (e.g., memory 1406, processor 1404, communication interface 1408).

[0323] The processor 1404 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0324] The memory 1406 may include volatile memory, such as random access memory (RAM). The processor 1404 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0325] The memory 1406 stores executable program code, and the processor 1404 executes the executable program code to implement the functions of the aforementioned transceiver unit and processing unit, thereby implementing the aforementioned message processing method. That is, the memory 1406 stores instructions for executing the message processing method.

[0326] The communication interface 1408 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the message processing device 1400 and other devices or communication networks.

[0327] This application also provides a computing device cluster for implementing the functions of the aforementioned message processing device cluster. The computing device cluster includes at least one computing device. This computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0328] Please see Figure 15 , Figure 15 This is a schematic diagram of a computing device cluster provided in this application. Figure 15 As shown, the computing device cluster includes at least one message processing device 1400. The memory 1406 of one or more message processing devices 1400 in the computing device cluster may store the same instructions for executing message processing methods.

[0329] In some possible implementations, the memory 1406 of one or more message processing devices 1400 in the computing device cluster may also store partial instructions for executing message processing methods. In other words, a combination of one or more message processing devices 1400 can jointly execute instructions for executing message processing methods.

[0330] It should be noted that the memory 1406 in different message processing devices 1400 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the message processing device. That is, the instructions stored in the memory 1406 of different message processing devices 1400 can implement the functions of one or more modules in the aforementioned transceiver unit and processing unit.

[0331] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN), a local area network (LAN), or similar. Figure 16 One possible implementation method is shown. Figure 16 This is a schematic diagram of another computing device cluster structure provided in this application. Figure 16 As shown, in the computing device cluster 1600, two message processing devices 1400A and 1400B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each computing device. In this possible implementation, the memory 1406 in message processing device 1400A stores instructions for executing the transceiver unit and processing unit of the sending end in the aforementioned embodiment. Simultaneously, the memory 1406 in message processing device 1400B stores instructions for executing the transceiver unit and processing unit of the receiving end in the aforementioned embodiment. For example, message processing device 1400A is the sending end in the aforementioned embodiment, and message processing device 1400B is the receiving end in the aforementioned embodiment.

[0332] It should be understood that Figure 16 The functions of the message processing device 1400A shown can also be performed by multiple message processing devices 1400. Similarly, the functions of the message processing device 1400B can also be performed by multiple message processing devices 1400.

[0333] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the accompanying drawings of the device embodiments provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0334] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods of the various embodiments of this application.

[0335] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.

[0336] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, computer instructions may be transferred from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A message processing method, characterized in that, The method includes: Determine that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold; Send a data link layer message, the data link layer message including the at least two consecutive network layer messages.

2. The method according to claim 1, characterized in that, The at least two consecutive network layer packets include a first network layer packet and a second network layer packet. The data link layer packet includes: the first network layer packet, a first cost field of the first network layer packet at the data link layer, the second network layer packet, a second cost field of the second network layer packet at the data link layer, and a check field of the data link layer packet.

3. The method according to claim 2, characterized in that, The first cost field includes a first field, a second field, and a third field. The first field is used to indicate that the first network layer packet and the second network layer packet are concatenated packets. The second field is used to indicate the length of the data link layer packet. The third field is used to indicate the sum of the lengths of the first network layer packet and the first cost field. The second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer packet and the second cost field.

4. The method according to claim 2, characterized in that, in, The first cost field includes a first field and a third field. The first field is used to indicate that the first network layer packet and the second network layer packet are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer packet and the first cost field. The second cost field includes a fourth field and a fifth field. The fourth field is used to indicate the sum of the lengths of the second network layer packet and the second cost field, and the fifth field is used to indicate whether the second network layer packet is the last network layer packet to participate in the concatenation process.

5. The method according to claim 3 or 4, characterized in that, The data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; The sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

6. The method according to any one of claims 1 to 5, characterized in that, The data link layer message consists of M data blocks of equal length, where M is a positive integer.

7. The method according to claim 6, characterized in that, The sending of data link layer messages includes: The data link layer message is sent based on the M data blocks of the same length.

8. The method according to any one of claims 2 to 7, characterized in that, The method further includes: The first overhead field is added before the first network layer message to obtain the first data; If the length of the first data is not an integer multiple of N, then a first padding field is added to the first data to obtain a first data block, and the length of the first data block is an integer multiple of N. The data link layer message includes the first data block.

9. The method according to any one of claims 2 to 8, characterized in that, The method further includes: The second overhead field is added before the second network layer message to obtain the second data; If the length of the second data is not an integer multiple of N, then a second padding field is added to the second data to obtain a second data block, and the length of the second data block is an integer multiple of N. The data link layer message includes the second data block.

10. The method according to any one of claims 2 to 9, characterized in that, The method further includes: If the sum of the lengths of the first data block, the second data block, and the verification field is not M, a third padding field is added, and the sum of the lengths after adding the third padding field is M. The first data block includes the first network layer message, the first cost field, and the first padding field; the second data block includes the second network layer message, the second cost field, and the second padding field.

11. The method according to any one of claims 1 to 10, characterized in that, The method further includes: Receive the at least two consecutive network layer messages sent from the network layer.

12. A message processing method, characterized in that, The method includes: Receive data link layer messages, wherein the data link layer messages include at least two consecutive network layer messages; Parse the data link layer message to obtain the at least two consecutive network layer messages.

13. The method according to claim 12, characterized in that, The at least two consecutive network layer packets include a first network layer packet and a second network layer packet. The data link layer packet includes: the first network layer packet, a first cost field of the first network layer packet at the data link layer, the second network layer packet, a second cost field of the second network layer packet at the data link layer, and a check field of the data link layer packet.

14. The method according to claim 13, characterized in that, The first cost field includes a first field, a second field, and a third field. The first field is used to indicate that the first network layer packet and the second network layer packet are concatenated packets. The second field is used to indicate the length of the data link layer packet. The third field is used to indicate the sum of the lengths of the first network layer packet and the first cost field. The second cost field includes a fourth field, which is used to indicate the sum of the lengths of the second network layer packet and the second cost field.

15. The method according to claim 14, characterized in that, The process of parsing the data link layer message to obtain the at least two consecutive network layer messages includes: Based on the first field, the data link layer message is determined to be a packet concatenation message; The length of the data link layer message is determined based on the second field, and verification is performed based on the verification field; If the verification is successful, the data link layer message is parsed according to the third field to obtain the first network layer message, and the data link layer message is parsed according to the fourth field to obtain the second network layer message.

16. The method according to claim 13, characterized in that, in, The first cost field includes a first field and a third field. The first field is used to indicate that the first network layer packet and the second network layer packet are concatenated packets, and the third field is used to indicate the sum of the lengths of the first network layer packet and the first cost field. The second cost field includes a fourth field and a fifth field. The fourth field is used to indicate the sum of the lengths of the second network layer packet and the second cost field, and the fifth field is used to indicate whether the second network layer packet is the last network layer packet to participate in the concatenation process.

17. The method according to claim 16, characterized in that, The process of parsing the data link layer message to obtain the at least two consecutive network layer messages includes: The fourth field is used to determine whether the network layer packet concatenation process has ended; If the process ends, perform validation based on the validation fields. If the verification is successful, the data link layer message is parsed according to the second field to obtain the first network layer message, and the data link layer message is parsed according to the third field to obtain the second network layer message.

18. The method according to any one of claims 13 to 17, characterized in that, The data link layer message further includes: a first padding field corresponding to the first network layer message, a second padding field corresponding to the second network layer message, and a third padding field; The sum of the lengths of the third field and the first padding field is an integer multiple of N, and the sum of the lengths of the fourth field and the second padding field is an integer multiple of N.

19. The method according to any one of claims 12 to 18, characterized in that, The data link layer message consists of M data blocks of the same length, where N and M are positive integers and N is less than M.

20. The method according to any one of claims 12 to 19, characterized in that, The method further includes: Send the at least two consecutive network layer messages to the network layer.

21. A message processing device, characterized in that, The message processing device includes: A processing unit is configured to determine that the length of each network layer message in at least two consecutive network layer messages is less than a first threshold. A transceiver unit is used to send data link layer messages, wherein the data link layer messages include the at least two consecutive network layer messages.

22. The device according to claim 21, characterized in that, The processing unit and the transceiver unit are used to perform the method as described in any one of claims 2 to 11.

23. A message processing device, characterized in that, The message processing device includes: A transceiver unit is used to receive data link layer messages, wherein the data link layer messages include at least two consecutive network layer messages. A processing unit is used to parse the data link layer message to obtain the at least two consecutive network layer messages.

24. The device according to claim 23, characterized in that, The transceiver unit is also used to perform the method as described in any one of claims 13 to 20.

25. A message processing device, characterized in that, It includes at least one processor coupled to a memory; the at least one processor is used to perform the method as described in any one of claims 1 to 20.

26. A computing device cluster, characterized in that, It includes at least two computing devices, each of which includes a processor and memory; The at least two computing devices include a first computing device and a second computing device. The processor of the first computing device is configured to execute instructions stored in the memory of the first computing device, so that the computing device cluster performs the method as described in any one of claims 1 to 11; The processor of the second computing device is configured to execute instructions stored in the memory of the second computing device to cause the computing device cluster to perform the method as described in any one of claims 12 to 20.

27. A chip, characterized in that, The chip is used to perform the method as described in any one of claims 1 to 20.

28. A readable storage medium, characterized in that, The storage medium stores a computer program or instructions, which, when executed by a message processing device, implement the method as described in any one of claims 1 to 20.

29. A computer program product, characterized in that, Includes instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 20.