Message generation verification method, device, system, equipment, cluster, medium and product

By calculating and filling in the checksum in advance on the host side, the problem of identifying abnormal messages when an internal network card is solved, and higher data transmission reliability and error detection efficiency are achieved.

CN119363858BActive Publication Date: 2025-04-08ZHUHAI XINGYUN ZHILIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411908064.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-08
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

The prior art is difficult to identify abnormal messages when there are exceptions within the network card, especially in the case of data disorders, sticking packets, etc., the checksum calculation is based on wrong data, resulting in the receiver being unable to accurately troubleshoot the error messages.

Method used

Before the host sends the data to be transmitted to the network card, the checksum is calculated in advance, and a check message header is inserted in each segment. The checksum is calculated by estimating the message header and inserting the segment, and the checksum is filled in, thereby generating the second data to be transmitted.

Benefits of technology

When there are abnormalities inside the network card, abnormal messages can still be identified through checksum, which improves the reliability of data transmission and the efficiency of error detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363858B_ABST
    Figure CN119363858B_ABST
Patent Text Reader

Abstract

The present application provides a message generation verification method, device, system, equipment, cluster, medium and product. The method is applied to a sending device, including: obtaining a first data to be transmitted through a host, the first data to be transmitted includes a first message header and a first load; determining a first segment according to a maximum segment size through the host, the first segment includes a first check message header; setting a first check message header in the first segment to a first value through the host to obtain a first insertion segment, estimating a first estimated message header according to the first message header, calculating a first checksum based on the first estimated message header and the first insertion segment, and filling the first checksum into the first check message header to obtain a second data to be transmitted; dividing the second data to be transmitted based on the maximum segment size through a network card to obtain a first fragment, and adding a first fragment message header to the first fragment to obtain a first data message, the value of the first fragment message header is the same as the value of the first estimated message header.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communications, and in particular to a message generation and verification method, device, system, equipment, cluster, medium and product. Background Art

[0002] In order to ensure the working efficiency of the host, the slices are often unloaded to the network card for processing, and the network card calculates the checksum of the sliced ​​slices. Once there is an abnormality inside the network card, the corresponding abnormal message cannot be identified by the checksum. For example, if the data is garbled when the host sends data to the network card; or, data garbled or packet sticking occurs during slicing, the corresponding checksum will still be calculated based on the erroneous data when filling the checksum. At this time, the receiving end cannot rely on the checksum mechanism of the network protocol specification to detect the erroneous message, and the erroneous message will still be sent to the specific application. Summary of the invention

[0003] The present application provides a message generation verification method, device, system, equipment, cluster, medium and product, which can calculate the checksum in advance, so that when there is an abnormality inside the network card, the corresponding abnormal message can be identified by the checksum.

[0004] In a first aspect, a message generation method is provided, which is applied to a sending device, wherein the sending device includes a host and a network card, including:

[0005] Acquire first data to be transmitted through the host, wherein the first data to be transmitted includes a first message header and a first payload;

[0006] Determining, by the host, a first segment from the first payload according to a maximum segment size, wherein the first segment includes a first check message header;

[0007] By means of the host, a first check message header in the first segment is set to a first value to obtain a first insertion segment, a first estimated message header is estimated according to the first message header, a first checksum is calculated based on the first estimated message header and the first insertion segment, and the first checksum is filled into the first check message header to obtain second data to be transmitted, and the second data to be transmitted is sent to the network card;

[0008] The network card divides the second data to be transmitted into a first fragment based on the maximum segment size to obtain a first fragment including a first check message header, adds a first fragment header to the first fragment to obtain a first data message, and sends the first data message, wherein the value of the first fragment header is the same as the value of the first estimated message header.

[0009] In the above scheme, the host calculates the checksum in advance before sending the data to be transmitted to the network card. Therefore, when an abnormality exists inside the network card, the corresponding abnormal message can be identified by the checksum.

[0010] In some possible designs, after determining, by the host, the first segment according to the maximum segment size, the method further includes:

[0011] Determining, by the host, a second segment from the first payload according to a maximum segment size, wherein the second segment includes a second inspection message header;

[0012] The method includes setting the first check message header in the first segment to a first value to obtain a first insertion segment, estimating a first estimated message header according to the first message header, calculating a first checksum based on the first estimated message header and the first insertion segment, and filling the first checksum into the first check message header to obtain second data to be transmitted, including:

[0013] The host sets the first check message header in the first segment to a first value to obtain a first insertion segment, estimates the first estimated message header according to the first message header, calculates a first checksum based on the first estimated message header and the first insertion segment, and fills the first checksum into the first check message header, sets the second check message header in the second segment to a first value to obtain a second insertion segment, estimates the second estimated message header according to the first message header, calculates a second checksum based on the second estimated message header and the second insertion segment, and fills the second checksum into the second check message header to obtain second data to be transmitted;

[0014] After the second data to be transmitted is segmented by the network card based on the maximum segment size to obtain a first segment including a first inspection message header, and a first segment message header is added to the first segment to obtain a first data message, and the first data message is sent, the method further includes:

[0015] The second data to be transmitted is divided into second fragments including a second check message header through the network card based on the maximum segment size, and a second fragment message header is added to the second fragment to obtain a second data message, and the second data message is sent, wherein the value of the second fragment message header is the same as the value of the second estimated message header.

[0016] In some possible designs, the first segment carries first data, the second segment carries second data, and the first data is incremented or decremented to obtain the second data.

[0017] In the above solution, by carrying increasing or decreasing data in different segments, it is possible to quickly determine which message has failed when a message fails.

[0018] In some possible designs, the first check message header also includes one or more of a segment number, a maximum segment size, and a starting incremental number, wherein the segment number is used to indicate the position of the segment in the first data to be transmitted, the maximum segment size is used to indicate the size of the segment, and the starting incremental number is used to indicate the data carried in the first segment.

[0019] In a second aspect, a message verification method is provided, which is applied to a receiving device, including:

[0020] Receive a first data message, wherein the first data message includes a first fragment message header and a first fragment, the first fragment includes a first check message header, and the first check message header includes a first checksum;

[0021] Setting the first check message header in the first fragment to a first value to obtain a first value-set fragment;

[0022] Obtain a first calculated checksum based on the first fragment header and the first set value fragment;

[0023] The first checksum is compared with the first calculated checksum, and when the first checksum is the same as the first calculated checksum, it is determined that the first data message is correct.

[0024] In some possible designs, the method further includes:

[0025] Receive a second data message, wherein the second data message includes a second fragment message header and a second fragment, the second fragment includes a second check message header, and the second check message header includes a second checksum;

[0026] Setting the second check message header in the second fragment to a first value to obtain a second value-set fragment, and calculating a second calculated checksum based on the second fragment message header and the second value-set fragment;

[0027] The second checksum is compared with the second calculated checksum, and when the second checksum is the same as the second calculated checksum, it is determined that the second data message is correct.

[0028] In some possible designs, the method further includes:

[0029] Deleting the first check message header in the first value-setting fragment to obtain a first segment;

[0030] Deleting the second check message header in the second value-setting fragment to obtain a second segment;

[0031] The first segment and the second segment are spliced ​​together.

[0032] In some possible designs, the first segment carries first data, the second segment carries second data, and the first data is incremented or decremented to obtain the second data.

[0033] In some possible designs, the first check message header also includes one or more of a segment number, a maximum segment size, and a starting incremental number, wherein the segment number is used to indicate the position of the segment in the first data to be transmitted, the maximum segment size is used to indicate the size of the segment, and the starting incremental number is used to indicate the data carried in the first segment.

[0034] In a third aspect, a sending device is provided, the device comprising a host and a network card,

[0035] The host is used to obtain first data to be transmitted, wherein the first data to be transmitted includes a first message header and a first payload;

[0036] The host is used to determine a first segment from the first payload according to a maximum segment size, wherein the first segment includes a first inspection message header;

[0037] The host is used to set the first check message header in the first segment to a first value to obtain a first insertion segment, estimate the first estimated message header according to the first message header, calculate a first checksum based on the first estimated message header and the first insertion segment, fill the first checksum into the first check message header, obtain second data to be transmitted, and send the second data to be transmitted to the network card;

[0038] The network card is used to divide the second data to be transmitted based on the maximum segment size to obtain a first fragment including a first check message header, and add a first fragment message header to the first fragment to obtain a first data message, and send the first data message, wherein the value of the first fragment message header is the same as the value of the first estimated message header.

[0039] In a fourth aspect, a receiving device is provided, including:

[0040] A receiving module, configured to receive a first data message, wherein the first data message includes a first fragment message header and a first fragment, the first fragment includes a first check message header, and the first check message header includes a first checksum;

[0041] A setting module, used for setting the first check message header in the first fragment to a first value to obtain a first set value fragment;

[0042] A calculation module, configured to calculate a first calculation checksum based on the first fragment message header and the first value-setting fragment;

[0043] A comparison module is used to compare the first checksum with the first calculated checksum, and determine that the first data message is correct when the first checksum is the same as the first calculated checksum.

[0044] In a fifth aspect, a message transmission system is provided, the system comprising: a sending device and a receiving device, the sending device being capable of executing the method as described in any one of the first aspect, and the receiving device being capable of executing the method as described in any one of the second aspect.

[0045] In a sixth aspect, a computing device is provided, the computing device comprising a processor and a memory;

[0046] The processor is used to execute instructions stored in the memory so that the computing device performs the operating steps of the method described in any one of the first aspect or the second aspect.

[0047] In a seventh aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory;

[0048] The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the operation steps of the method described in any one of the first aspect or the second aspect.

[0049] In an eighth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device or a cluster, the computing device or the cluster executes the operation steps of the method described in any one of the first aspect or the second aspect.

[0050] In a ninth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the operation steps of the method described in any one of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.

[0052] Figure 1 It is a flowchart of a message verification method provided by this application;

[0053] Figure 2 is a structural schematic diagram of a second data to be transmitted provided by the present application;

[0054] Figure 3 It is a structural diagram of a message verification system provided by this application;

[0055] Figure 4 It is a structural schematic diagram of a computing device provided by this application. DETAILED DESCRIPTION

[0056] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention. The terms used in the implementation mode of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.

[0057] See also Figure 1 , Figure 1 This is a flow chart of a message verification method provided by this application. Figure 1 As shown, the message verification method of the present application includes:

[0058] S101: A sending device obtains first data to be transmitted through a host.

[0059] The first data to be transmitted includes a first message header and a first payload. The first message header may include a layer 2 (L2) message header, a layer 3 (L3) message header, a layer 4 (L4) message header, a tunnel message header, etc.

[0060] S102: The sending device processes the first data to be transmitted through the host to obtain the second data to be transmitted.

[0061] like Figure 2As shown, the host estimates the length of each segment in the first load based on the maximum segment size, inserts a check message header in each segment, sets the check message header in each segment to the first value to obtain multiple inserted segments, estimates the estimated message header of each segment based on the first message header, calculates each checksum based on the estimated message header of each segment and the corresponding inserted segment, and fills each checksum into the corresponding check message header to obtain the second data to be transmitted. Among them, the maximum segment size (Maximum Segment Size, MSS) refers to the size of the maximum data segment that can be sent in the Transmission Control Protocol (TCP) connection. The user can set the size of the maximum segment size as needed, for example, it can be 1460 bytes, etc. The size of the check message header can be set according to user needs, for example, 3 bytes, 4 bytes or 5 bytes, etc. The first value can be that all bits are 0, all bits are 1, or some bits are 0, some bits are 1, etc. The length of the estimated message header of each segment is the same, and the contents of the estimated message headers of different segments may be different, but they can all be estimated based on the first message header.

[0062] For example, the host determines the first segment from the first load according to the maximum segment size, wherein the first segment includes a first check message header. Then, the host sets the first check message header in the first segment to a first value to obtain a first insertion segment, estimates the first estimated message header according to the first message header, calculates the first checksum based on the first estimated message header and the first insertion segment, and fills the first checksum into the first inspection message header. The host determines the second segment from the first load according to the maximum segment size, wherein the second segment includes a second check message header. Then, the second check message header in the second segment is set to a first value to obtain a second insertion segment, estimates the second estimated message header according to the first message header, calculates the second checksum based on the second estimated message header and the second insertion segment, and fills the second checksum into the second inspection message header, and so on, until the last segment is processed and the second data to be transmitted is obtained. The above processing of each segment can be parallel or serial, which is not specifically limited here.

[0063] In order to quickly determine which message has failed when a message fails, data can be carried in each segment by increasing or decreasing. For example, data 1 can be carried in the first segment, data 2 can be carried in the second segment, and so on, until the last segment. Alternatively, data 100 can be carried in the first segment, data 98 ​​can be carried in the second segment, and so on, until the last segment. Of course, data 50 can be carried in the first segment, data 53 can be carried in the second segment, and so on, until the last segment.

[0064] In addition to carrying the checksum, the first check message header can also be used to carry one or more of the segment number, the maximum segment size, and the starting increment number. Among them, the segment number is used to indicate the position of the segment in the first data to be transmitted, the maximum segment size is used to indicate the size of the segment, and the starting increment number is used to indicate the data carried in the first segment. The above-mentioned carrying contents are only used as specific examples. In actual applications, the first check message header can also include other contents, which are not specifically limited here.

[0065] S103: The host of the sending device sends the second data to be transmitted to the network card of the sending device. Correspondingly, the network card of the sending device receives the second data to be transmitted sent by the host of the sending device.

[0066] S104: The network card of the sending device processes the second data to be transmitted to obtain multiple data packets.

[0067] The network card of the sending device divides the second data to be transmitted according to the maximum segment size to obtain multiple fragments. Then, a fragment header is added to each fragment to obtain each data message, and each data message is sent. For example, the second data to be transmitted is divided by the network card based on the maximum segment size to obtain a first fragment containing a first check message header, and a first fragment header is added to the first fragment to obtain a first data message, and the first data message is sent. Then, the second data to be transmitted is divided by the network card based on the maximum segment size to obtain a second fragment containing a second check message header, and a second fragment header is added to the second fragment to obtain a second data message, and the second data message is sent, and so on, until the last fragment is processed.

[0068] Since the host of the sending device estimates the segments according to the maximum segment size, and when segmenting the first data to be transmitted, it is also segmented according to the maximum segment size, so the length of the first segment is the same as the length of the first segment, the length of the second segment is the same as the length of the second segment, and so on, the length of the last segment is the same as the length of the last segment. Similarly, the host of the sending device estimates each estimated message header according to the first message header, so the first estimated message header and the first segment message header are exactly the same, the second estimated message header and the second segment message header are exactly the same, and so on, the last estimated message header and the last segment message header are also exactly the same.

[0069] It is understandable that the network card of the sending device can also calculate multiple fragment checksums based on multiple fragment headers and multiple fragments, and carry the fragment checksums in the layer 4 header. In this case, each fragment can have two checksums, one is the calculated checksum, and the other is the fragment checksum.

[0070] S105: The network card of the sending device sends multiple data messages to the receiving device. Correspondingly, the receiving device receives the multiple data messages sent by the network card of the sending device.

[0071] Each data message in the plurality of data messages includes a fragment message header and a fragment, each fragment includes a check message header, and each first check message header includes a checksum. For example, the first data message includes a first fragment message header and a first fragment, the first fragment includes a first check message header, the first check message header includes a first checksum, the second data message includes a second fragment message header and a second fragment, the second fragment includes a second check message header, the second check message header includes a second checksum, and so on, until the last data message.

[0072] S106: The receiving device verifies the multiple data messages.

[0073] The receiving device sets the check message header in each fragment to a first value, obtains multiple value-set fragments, and calculates multiple calculated checksums based on each fragment message header and the corresponding value-set fragment. The multiple calculated checksums are compared with the corresponding checksums respectively. When each checksum is the same as the corresponding calculated checksum, it is determined that each data message is correct. If a checksum is different from the corresponding calculated checksum, it means that an error has occurred in the data message corresponding to the checksum. For example, the first check message header in the first fragment is set to the first value to obtain the first set value fragment, and the first calculated checksum is calculated based on the first fragment message header and the first set value fragment. The first checksum is compared with the first calculated checksum. When the first checksum is the same as the first calculated checksum, it is determined that the first data message is correct; then, the second check message header in the second fragment is set to the first value to obtain the second set value fragment, and the second calculated checksum is calculated based on the second fragment message header and the second set value fragment. The second checksum is compared with the second calculated checksum. When the second checksum is the same as the second calculated checksum, it is determined that the second data message is correct, and so on.

[0074] S107: The receiving device processes the multiple data messages to obtain multiple fragments, and splices the multiple fragments to obtain first data to be transmitted.

[0075] The receiving device deletes each check message header in each value-setting slice to obtain each segment, and splices multiple segments to obtain the first data to be transmitted. For example, the first check message header in the first value-setting slice is deleted to obtain the first segment; the second check message header in the second value-setting slice is deleted to obtain the second segment, and so on, until the last check message header in the last value-setting slice is deleted to obtain the last segment, and then, the multiple segments are spliced ​​in sequence to obtain the first data to be transmitted.

[0076] In the above scheme, the host calculates the checksum in advance before sending the data to be transmitted to the network card. Therefore, when an abnormality exists inside the network card, the corresponding abnormal message can be identified by the checksum.

[0077] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a message verification system provided by this application. Figure 3 As shown, the message verification system of the present application includes a sending device 110 and a receiving device 120 .

[0078] The sending device 110 includes a host 111 and a network card 112 .

[0079] The host 111 is used to obtain first data to be transmitted, wherein the first data to be transmitted includes a first message header and a first payload;

[0080] The host 111 is used to determine a first segment from the first payload according to a maximum segment size, wherein the first segment includes a first inspection message header;

[0081] The host 111 is used to set the first check message header in the first segment to a first value to obtain a first insertion segment, estimate the first estimated message header according to the first message header, calculate a first checksum based on the first estimated message header and the first insertion segment, fill the first checksum into the first check message header, obtain second data to be transmitted, and send the second data to be transmitted to the network card;

[0082] The network card 112 is used to divide the second data to be transmitted based on the maximum segment size to obtain a first fragment including a first check message header, and add a first fragment message header to the first fragment to obtain a first data message, and send the first data message, wherein the value of the first fragment message header is the same as the value of the first estimated message header.

[0083] Here, the sending device may execute as follows Figure 1 The steps performed by the sending device in the message verification method shown in the figure are as follows. Figure 1 and related descriptions.

[0084] The receiving device 120 includes: a receiving module 121 , a setting module 122 , a calculating module 123 and a comparing module 124 .

[0085] The receiving module 121 is used to receive a first data message, wherein the first data message includes a first fragment message header and a first fragment, the first fragment includes a first check message header, and the first check message header includes a first checksum;

[0086] The setting module 122 is used to set the first check message header in the first fragment to a first value to obtain a first set value fragment;

[0087] The calculation module 123 is used to calculate a first calculation checksum based on the first fragment message header and the first value-setting fragment;

[0088] The comparison module 124 is used to compare the first checksum with the first calculated checksum, and determine that the first data message is correct when the first checksum is the same as the first calculated checksum.

[0089] Here, the receiving device may perform the following Figure 1The steps performed by the receiving device in the message verification method shown in Figure 1 and related descriptions.

[0090] See also Figure 4 , Figure 4 4 is a schematic diagram of a computing device provided by the present application. The computing device 400 includes: one or more processors 410 , a communication interface 420 and a memory 430 .

[0091] The processor 410, the communication interface 420 and the memory 430 are interconnected via a bus 440. Optionally, the computing device 400 may also include an input / output interface 450, which is connected to an input / output device for receiving parameters set by a user, etc. The computing device 400 can be used to implement some or all of the functions of the device embodiment or system embodiment in the above-mentioned embodiment of the present application; the processor 410 can also be used to implement some or all of the operation steps of the method embodiment in the above-mentioned embodiment of the present application. For example, the specific implementation of the various operations performed by the computing device 400 can refer to the specific details in the above-mentioned embodiment, such as the processor 410 is used to perform some or all of the steps in the above-mentioned method embodiment or some or all of the operations in the above-mentioned method embodiment. For another example, in the embodiment of the present application, the computing device 400 can be used to implement some or all of the functions of one or more components in the above-mentioned device embodiment, and the communication interface 420 can be specifically used for the communication functions necessary to implement the functions of these devices and components, and the processor 410 can be specifically used for the processing functions necessary to implement the functions of these devices and components, etc.

[0092] Figure 4 The computing device 400 may include one or more processors 410, and the multiple processors 410 may provide processing capabilities in a parallel connection mode, a serial connection mode, a serial-parallel connection mode, or any connection mode, or the multiple processors 410 may form a processor sequence or a processor array, or the multiple processors 410 may be divided into a main processor and an auxiliary processor, or the multiple processors 410 may have different architectures such as a heterogeneous computing architecture. In addition, Figure 4 The computing device 400 shown in the figure, and the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 400 may include Figure 4 More or fewer components may be shown, or some components may be combined or separated, or may have a different arrangement of components.

[0093] The processor 410 may have a variety of specific implementation forms. For example, the processor 410 may include a processor (central processing unit, CPU), a graphic processing unit (graphic processing unit, GPU), a neural-network processing unit (neural-network processing unit, NPU), a tensor processing unit (tensor processing unit, TPU) or a data processing unit (data processing unit, DPU) and other combinations thereof, which are not specifically limited in the embodiments of the present application. The processor 410 may also be a single-core processor or a multi-core processor. The processor 410 may be a combination of a CPU and a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (application-specific integrated circuit, ASIC), a programmable logic device (programmable logic device, PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), a generic array logic (generic array logic, GAL) or any combination thereof. The processor 410 may also be implemented using a logic device with built-in processing logic alone, such as an FPGA or a digital signal processor (digital signal processor, DSP), etc.

[0094] The communication interface 420 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface may be a cellular network interface or a wireless local area network interface, etc.

[0095] The memory 430 may be a non-volatile memory, such as a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The memory 430 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). The memory 430 may also be used to store program codes and data, so that the processor 410 calls the program codes stored in the memory 430 to execute some or all of the operation steps in the above method embodiment, or to execute the corresponding functions in the above device embodiment. Figure 4 Show more or fewer components, or have different component configurations.

[0096] The bus 440 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 440 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 440 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0097] The present application also provides a system, which includes multiple computing devices, and the structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiment and / or the specific functions described in the above device embodiment, which will not be repeated here.

[0098] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The 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 processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one network site, computer, server or data center to another network site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or it can be a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape, etc.), an optical medium (e.g., a DVD, etc.), or a semiconductor medium (e.g., a solid-state hard disk), etc. In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

Claims

1. A message generation method, characterized in that: Applied to a sending device, the sending device includes a host and a network card, including: Acquire first data to be transmitted through the host, wherein the first data to be transmitted includes a first message header and a first payload; Determining, by the host, a first segment from the first payload according to a maximum segment size, wherein the first segment includes a first check message header; By means of the host, a first check message header in the first segment is set to a first value to obtain a first insertion segment, a first estimated message header is estimated according to the first message header, a first checksum is calculated based on the first estimated message header and the first insertion segment, and the first checksum is filled into the first check message header to obtain second data to be transmitted, and the second data to be transmitted is sent to the network card; The network card divides the second data to be transmitted into a first fragment based on the maximum segment size to obtain a first fragment including a first check message header, adds a first fragment header to the first fragment to obtain a first data message, and sends the first data message, wherein the value of the first fragment header is the same as the value of the first estimated message header.

2. The method according to claim 1, characterized in that After determining the first segment according to the maximum segment size by the host, the method further includes: Determining, by the host, a second segment from the first payload according to a maximum segment size, wherein the second segment includes a second inspection message header; The method includes setting the first check message header in the first segment to a first value to obtain a first insertion segment, estimating a first estimated message header according to the first message header, calculating a first checksum based on the first estimated message header and the first insertion segment, and filling the first checksum into the first check message header to obtain second data to be transmitted, including: The host sets the first check message header in the first segment to a first value to obtain a first insertion segment, estimates the first estimated message header according to the first message header, calculates a first checksum based on the first estimated message header and the first insertion segment, and fills the first checksum into the first check message header, sets the second check message header in the second segment to a first value to obtain a second insertion segment, estimates the second estimated message header according to the first message header, calculates a second checksum based on the second estimated message header and the second insertion segment, and fills the second checksum into the second check message header to obtain second data to be transmitted; After the second data to be transmitted is segmented by the network card based on the maximum segment size to obtain a first segment including a first inspection message header, and a first segment message header is added to the first segment to obtain a first data message, and the first data message is sent, the method further includes: The second data to be transmitted is divided into second fragments including a second check message header through the network card based on the maximum segment size, and a second fragment message header is added to the second fragment to obtain a second data message, and the second data message is sent, wherein the value of the second fragment message header is the same as the value of the second estimated message header.

3. The method according to claim 2, characterized in that The first segment carries first data, the second segment carries second data, and the first data is incremented or decremented to obtain the second data.

4. The method according to claim 3, characterized in that The first check message header also includes one or more of a segment number, a maximum segment size, and a starting incremental number, wherein the segment number is used to indicate the position of the segment in the first data to be transmitted, the maximum segment size is used to indicate the size of the segment, and the starting incremental number is used to indicate the data carried in the first segment.

5. A sending device, characterized in that: The device includes a host and a network card. The host is used to obtain first data to be transmitted, wherein the first data to be transmitted includes a first message header and a first payload; The host is used to determine a first segment from the first payload according to a maximum segment size, wherein the first segment includes a first inspection message header; The host is used to set the first check message header in the first segment to a first value to obtain a first insertion segment, estimate the first estimated message header according to the first message header, calculate a first checksum based on the first estimated message header and the first insertion segment, fill the first checksum into the first check message header, obtain second data to be transmitted, and send the second data to be transmitted to the network card; The network card is used to divide the second data to be transmitted based on the maximum segment size to obtain a first fragment including a first check message header, and add a first fragment message header to the first fragment to obtain a first data message, and send the first data message, wherein the value of the first fragment message header is the same as the value of the first estimated message header.

6. A message transmission system, characterized in that: The system comprises: a sending device and a receiving device, wherein the sending device can execute the method according to any one of claims 1 to 4.

7. A computing device, characterized in that The computing device includes a processor and a memory; The processor is configured to execute instructions stored in the memory so that the computing device performs the operation steps of the method according to any one of claims 1 to 4.

8. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the operation steps of the method according to any one of claims 1 to 4.

9. A computer program product comprising instructions, characterized in that When the instructions are executed by a computing device or a cluster, the computing device or the cluster executes the operation steps of the method according to any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the operation steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Recording and playback devices with avoidance of missynchronisation by scrambling payload with modified payload checksum

    CN109997310A

  • Message segment transmission method and device, equipment and medium

    CN117579725A