One-way message transmission method, one-way message extraction method and device

By using jumbo frame messages to encapsulate multiple small messages in a one-way optical gate, the resource occupation and data loss problems of the one-way optical gate when transmitting small messages are solved, the transmission speed and throughput are improved, and the reliability and performance are improved.

CN115866105BActive Publication Date: 2025-09-05BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211741216.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-09-05
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

When transmitting a large number of small messages, existing one-way optical gates are prone to excessive use of one-way isolation cards and CPU resources, resulting in reduced reliability and performance, and the risk of large-scale data loss.

Method used

The method of using jumbo frame messages to encapsulate multiple small messages reduces the risk of losing the original small messages by encapsulating multiple application messages into jumbo frame unidirectional private protocol messages at the sending end and parsing and processing them at the receiving end.

Benefits of technology

It improves the one-way transmission speed and throughput, reduces computing resource loss, reduces the probability of data loss, and improves the reliability and performance of the one-way optical gate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115866105B_ABST
    Figure CN115866105B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a one-way message transmission method, a one-way message extraction method, and an apparatus, relating to the technical field of cross-domain data one-way transmission. The method comprises encapsulating multiple application messages into a one-way private protocol message based on a preset data payload to generate a jumbo frame one-way private message; adding an Ethernet protocol header to the jumbo frame one-way private message to generate an Ethernet jumbo frame message; and sending the Ethernet jumbo frame message to a receiving end. The method uses a jumbo frame message to encapsulate multiple small messages, thereby increasing the one-way transmission speed of the external and internal terminals, reducing the risk of losing the original small messages, and solving the problem of large-scale data loss that is prone to occur in existing methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cross-domain data unidirectional transmission, and in particular to a unidirectional message transmission method, a unidirectional message extraction method and a device. Background Art

[0002] A one-way optical gate (also known as a one-way network gate) is deployed between networks with different security levels. It uses a one-way, feedback-free transmission physical environment to enable unidirectional data transmission from a low-security domain to a high-security domain. The hardware architecture of a one-way optical gate typically adopts a 2+1 structure, consisting of an external terminal, an internal terminal, and a one-way isolation component (a one-way isolation card, further divided into a one-way sending card and a one-way receiving card). The one-way isolation component consists of two one-way isolation cards connected by a single optical fiber. The software architecture consists of a network agent program and a security engine running on the external and internal terminals. This hardware and software architecture forms a secure host, ultimately providing one-way data transmission services through the secure host. When the external and internal terminals communicate, data is sent via the one-way isolation card. The one-way sending card can only send data, while the one-way receiving card can only receive data.

[0003] Due to the principle of unidirectional transmission, data loss cannot be 100% guaranteed. Therefore, it is necessary to maximize the reliability of one-way data transmission and reduce the probability of data loss. Improving reliability has become a key technical development direction for products and a key technical innovation direction. When a large number of small application messages (hereinafter referred to as small messages) are included in the unidirectional private message to be sent, each small message will be sent independently, which will significantly occupy the transmission resources and CPU computing resources of the one-way isolation card, resulting in reduced reliability and performance. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a one-way message transmission method, a one-way message extraction method and a device, which adopts a method of encapsulating multiple small messages in a jumbo frame message to improve the one-way transmission speed of the external terminal and the internal terminal, reduce the risk of losing the original small message, and solve the problem that large amounts of data are easily lost in the existing method.

[0005] The present invention provides a one-way message transmission method, which is applied to a sending end and includes:

[0006] Encapsulate multiple application messages into a unidirectional private protocol message based on a preset data payload to generate a jumbo frame unidirectional private message;

[0007] Add an Ethernet protocol header to the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message;

[0008] The Ethernet jumbo frame message is sent to a receiving end.

[0009] In the above implementation process, the method of using jumbo frames and a single private protocol message to carry multiple small messages is adopted to improve the one-way transmission speed of the external and internal machines, increase the message transmission load, accommodate more small messages, improve the throughput of one-way message transmission, and reduce the risk of losing the original small messages. At the same time, since fragmentation and reassembly are no longer performed, the loss of computing resources is reduced, and the problem of large-scale data loss that is prone to occur in existing methods is solved.

[0010] Furthermore, the encapsulating of multiple application messages into a unidirectional private protocol message based on a preset data payload to generate a jumbo frame unidirectional private message includes:

[0011] Encapsulating the first application message into a unidirectional protocol private message according to a preset data payload;

[0012] If the remaining payload can still encapsulate the next application message, the value of the "Multi-Message Flag" field is set to 1;

[0013] Encapsulating the private protocol header of the second application message after the first application message, and encapsulating the second application message into the unidirectional private protocol message, setting the "Data Length" field to the data length of the second application message, and setting the value of the "Multiple Message Flag" field to 1 if the remaining payload can still encapsulate the next application message;

[0014] Multiple application messages are encapsulated in sequence until the data payload is unable to carry the application messages.

[0015] In the above implementation process, multiple small messages are encapsulated into a jumbo frame unidirectional private message according to the data payload, thereby improving the unidirectional transmission speed of the external terminal and the internal terminal and reducing the risk of losing the original small message.

[0016] Furthermore, the adding of an Ethernet protocol header to the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message includes:

[0017] The jumbo frame unidirectional private message is sent to the system kernel, and an Ethernet protocol header is added before the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message.

[0018] In the above implementation process, an Ethernet protocol header is added before the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message, which is transmitted to the receiving end in the form of an Ethernet jumbo frame message, thereby improving the throughput of unidirectional message transmission.

[0019] The present application also provides a one-way message extraction method, which is applied to a receiving end. The method includes:

[0020] Receive jumbo frame Ethernet messages;

[0021] removing the Ethernet protocol header from the jumbo frame Ethernet message and sending it to the application software;

[0022] The application software parses the first unidirectional private protocol header and extracts application message data;

[0023] According to the "multi-message flag" value in the protocol header, determine whether to continue extracting the next unidirectional private protocol message.

[0024] In the above implementation process, the receiving end can determine whether to continue to extract the next unidirectional private protocol message based on the value of the multi-message flag, thereby realizing the processing of jumbo frames carrying multiple unidirectional private protocol messages and reducing the risk of losing the original small message.

[0025] Furthermore, judging whether to continue extracting the next unidirectional private protocol message according to the value of the "multi-message flag" in the protocol header includes:

[0026] If the "multi-message flag" value is 1, the next unidirectional private protocol message is extracted;

[0027] If the value of the "multi-message flag" is 0, the extraction of the unidirectional private protocol message is terminated.

[0028] In the above implementation process, whether to continue extracting the next unidirectional private protocol message is determined according to the value of the multi-message flag.

[0029] The present application also provides a one-way message transmission device, comprising:

[0030] An encapsulation module, configured to encapsulate multiple application messages into a unidirectional private protocol message based on a preset data payload to generate a jumbo frame unidirectional private message;

[0031] An Ethernet jumbo frame message generation module is used to add an Ethernet protocol header to a jumbo frame unidirectional private message to generate an Ethernet jumbo frame message;

[0032] The sending module is used to send the Ethernet jumbo frame message to the receiving end.

[0033] In the above implementation process, the method of using jumbo frames and a single private protocol message to carry multiple small messages is adopted to improve the one-way transmission speed of the external and internal machines, increase the message transmission load, accommodate more small messages, improve the throughput of one-way message transmission, and reduce the risk of losing the original small messages. At the same time, since fragmentation and reassembly are no longer performed, the loss of computing resources is reduced, and the problem of large-scale data loss that is prone to occur in existing methods is solved.

[0034] Furthermore, the packaging module includes:

[0035] A first encapsulation module, configured to encapsulate the first application message into a unidirectional protocol private message according to a preset data payload;

[0036] A marking module is used to set the value of the "multi-message flag" field to 1 if the remaining payload can still encapsulate the next application message;

[0037] a second encapsulation module, configured to encapsulate a private protocol header of a second application message after the first application message, encapsulate the second application message into the unidirectional private protocol message, set the "data length" field to the data length of the second application message, and set the value of the "multi-message flag" field to 1 if the remaining payload can still encapsulate the next application message;

[0038] The multi-encapsulation module is used to encapsulate multiple application messages in sequence until the data payload is unable to carry the application messages.

[0039] In the above implementation process, multiple small messages are encapsulated into a jumbo frame unidirectional private message according to the data payload, thereby improving the unidirectional transmission speed of the external terminal and the internal terminal and reducing the risk of losing the original small message.

[0040] The present application also provides a one-way message extraction device, comprising:

[0041] A receiving module, used for receiving jumbo frame Ethernet messages;

[0042] A protocol header removal module, configured to remove the Ethernet protocol header from the jumbo frame Ethernet message and send the jumbo frame Ethernet message to the application software;

[0043] A message extraction module, used for the application software to parse the first unidirectional private protocol header and extract application message data;

[0044] The extraction judgment module is used to judge whether to continue to extract the next unidirectional private protocol message according to the "multi-message flag" value in the protocol header.

[0045] In the above implementation process, the receiving end can determine whether to continue to extract the next unidirectional private protocol message based on the value of the multi-message flag, thereby realizing the processing of jumbo frames carrying multiple unidirectional private protocol messages and reducing the risk of losing the original small message.

[0046] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute any one of the above-mentioned one-way message transmission methods.

[0047] An embodiment of the present application further provides a readable storage medium, wherein the readable storage medium stores computer program instructions. When the computer program instructions are read and executed by a processor, the unidirectional message transmission method described above is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 A flowchart of a one-way message transmission method provided in an embodiment of the present application;

[0050] Figure 2 A flow chart of jumbo frame unidirectional message transmission provided in an embodiment of the present application;

[0051] Figure 3 A flow chart for encapsulating jumbo frame unidirectional private messages provided in an embodiment of the present application;

[0052] Figure 4 Flowchart of the one-way message extraction method provided in an embodiment of the present application;

[0053] Figure 5 A structural block diagram of a one-way message transmission device provided in an embodiment of the present application;

[0054] Figure 6 A structural block diagram of another one-way message transmission device provided in an embodiment of the present application;

[0055] Figure 7 This is a structural block diagram of the one-way message extraction device provided in an embodiment of the present application.

[0056] icon:

[0057] 100-encapsulation module; 101-first encapsulation module; 102-marking module; 103-second encapsulation module; 104-multi-encapsulation module; 200-Ethernet jumbo frame message generation module; 300-sending module; 400-receiving module; 500-protocol header removal module; 600-message extraction module; 700-extraction judgment module. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0059] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.

[0060] Example 1

[0061] Please see Figure 1 , Figure 1 A flowchart of a one-way message transmission method provided in an embodiment of the present application, applied to a sending end, provides a method for improving the one-way message transmission speed by accommodating multiple small messages based on jumbo frames, and the method specifically includes the following steps:

[0062] Step S100: Encapsulating multiple application messages into a unidirectional private protocol message based on a preset data payload to generate a jumbo frame unidirectional private message;

[0063] Step S200: Adding an Ethernet protocol header to the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message;

[0064] The jumbo frame unidirectional private message is sent to the system kernel, and an Ethernet protocol header is added before the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message.

[0065] Step S300: Send the Ethernet jumbo frame message to a receiving end.

[0066] like Figure 2 Figure 2 shows a flow chart for jumbo frame unidirectional message transmission. In the application software or driver, small messages are combined into a unidirectional private message. The maximum length of the combined data block is controlled within the MTU of a single message. This method increases the MTU value. Specifically, in the driver and FPGA chip, the MTU value is set to 2048, increasing the transmission capacity of a single message through jumbo frame technology.

[0067] During the communication between the external and internal terminals of a one-way optical switch, the application design of jumbo frame transmission and single-frame combination of multiple original small messages is adopted to reduce the number of packet losses and further improve the transmission speed of one-way private messages. Specifically:

[0068] Assume that 10 application messages of 1KB (A1-A10), 512KB (B1-B10), and 256KB (C1-C10) are placed into the queue to be sent at intervals. The data volume carried by a unidirectional private protocol message is 2048-14 (Ethernet header)-14 (unidirectional private protocol header) = 2020.

[0069] The application software or the one-way isolation card driver calculates that 2020 can carry multiple original small messages. After calculation, one jumbo frame one-way private protocol message can carry three original small messages A1, B1, and C1. 2020-1024-512-256=228 (cannot carry A2).

[0070] And so on, A2, B2, C2... A total of 10 unidirectional private protocol messages.

[0071] After each unidirectional private protocol message is transmitted through the unidirectional isolation card of the external terminal and the internal terminal, the internal terminal separates each unidirectional private protocol message into three original small messages A1, B1, and C1.

[0072] The original 30 small messages are transmitted through 10 one-way private messages. This method further reduces the number of one-way private protocol messages compared to the existing method, improves the one-way transmission speed of the external and internal machines through jumbo frames, and further improves the reliability of one-way transmission.

[0073] When a unidirectional private message is lost, at most part of the original small messages contained therein will be lost, and no large number of original small messages will be lost.

[0074] In practice, the Linux systems on both the external and internal ends of the one-way optical switch are configured with an MTU of 2KB. The FPGA logic in the external sender card and the internal one-way receive card supports 2KB jumbo frames. When the application software sends and receives data, the maximum payload of the one-way proprietary protocol is: 2048 - 14 (Ethernet header) - 14 (one-way proprietary protocol header) = 2020 bytes.

[0075] The following table shows the format of the private protocol:

[0076]

[0077]

[0078] Among them, the special field: other unidirectional transmission characteristics, length 3 bytes, default value 0;

[0079] Message: The sender and receiver applications mutually identify the type of communication data, with a length of 1 byte and a value range of 0-255;

[0080] Application field: used for other one-way application transmission, length 5 bytes, default value 0;

[0081] Multi-message flag: When multiple unidirectional private messages are encapsulated in one jumbo frame, this flag value is 1. The default value is 0.

[0082] Data length: The data payload length of the one-way private message, 2 bytes, with a default value of 0.

[0083] like Figure 3 FIG. 1 is a flow chart for encapsulating a jumbo frame unidirectional private message. Step S100 may specifically include the following steps:

[0084] Step S101: encapsulating the first application message into a unidirectional protocol private message according to a preset data payload;

[0085] The data payload of a unidirectional private protocol message sent by the application software is 2020, and subsequent messages are encapsulated based on the data payload of 2020.

[0086] Step S102: If the remaining payload can still encapsulate the next application message, the value of the "Multi-Message Flag" field is set to 1;

[0087] Step S103: Encapsulating the private protocol header of the second application message after the first application message, and encapsulating the second application message into the unidirectional private protocol message, setting the "Data Length" field to the data length of the second application message, and setting the value of the "Multiple Message Flag" field to 1 if the remaining payload can still encapsulate the next application message;

[0088] Step S104: encapsulating multiple application messages in sequence until the data payload is unable to carry the application messages.

[0089] The application software sends the jumbo frame unidirectional private message to the system kernel (including the driver), and adds an Ethernet protocol header before the jumbo frame unidirectional private message; the jumbo frame Ethernet message is sent to the receiving card of the internal terminal through the sending card and the optical fiber line.

[0090] The embodiment of the present application also provides a one-way message extraction method, which is applied to the receiving end, such as Figure 4 FIG. 1 is a flow chart of a one-way message extraction method, wherein the method specifically comprises the following steps:

[0091] Step S400: receiving a jumbo frame Ethernet message;

[0092] Step S500: removing the Ethernet protocol header from the jumbo frame Ethernet message and sending it to the application software;

[0093] Step S600: the application software parses the first unidirectional private protocol header and extracts application message data;

[0094] Step S700: Determine whether to continue extracting the next unidirectional private protocol message based on the value of the "multi-message flag" in the protocol header.

[0095] In step S700, specifically:

[0096] If the "multi-message flag" value is 1, the next unidirectional private protocol message is extracted;

[0097] If the value of the "multi-message flag" is 0, the extraction of the unidirectional private protocol message is terminated.

[0098] After receiving the jumbo frame Ethernet message, the receiving card transmits it to the system kernel (including the driver), removes the Ethernet message header, and then transmits it to the application software;

[0099] The application software of the internal terminal parses and extracts the application message data based on the first unidirectional private protocol header, and then determines whether to continue to extract the next unidirectional private protocol message based on the "multi-message flag" value in the protocol header. If the multi-message flag is 1, the next message is extracted;

[0100] When the "Multi-Message Flag" value of a message is 0, message extraction is terminated, completing the processing of one jumbo frame carrying multiple unidirectional private protocol messages.

[0101] This application uses jumbo frames, a method where a single private protocol message carries multiple small messages, to increase the one-way transmission speed between the external and internal terminals, reducing the risk of losing the original small messages. Furthermore, by eliminating fragmentation and reassembly, it reduces computing resource consumption. Overall, this improves the performance and reliability of the one-way optical switch's external services and reduces system operation and maintenance costs.

[0102] The external and internal isolation cards, operating systems, and application software utilize jumbo frames, increasing the message transmission payload and accommodating more small messages, thereby improving the throughput of one-way message transmission. The unidirectional proprietary protocol employed supports the encapsulation of multiple small messages. Therefore, by using jumbo frames and a one-way proprietary protocol to carry multiple small messages, the speed and reliability of one-way transmission are improved.

[0103] Example 2

[0104] The embodiment of the present application provides a one-way message transmission device, such as Figure 5 FIG. 1 is a structural block diagram of a one-way message transmission device, the device comprising:

[0105] The encapsulation module 100 is configured to encapsulate multiple application messages into a unidirectional private protocol message based on a preset data payload to generate a jumbo frame unidirectional private message;

[0106] The Ethernet jumbo frame message generation module 200 is used to add an Ethernet protocol header to the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message;

[0107] The sending module 300 is configured to send the Ethernet jumbo frame message to a receiving end.

[0108] like Figure 6 FIG. 1 is a structural block diagram of another one-way message transmission device, wherein the encapsulation module 100 includes but is not limited to:

[0109] A first encapsulation module 101 is configured to encapsulate the first application message into a unidirectional protocol private message according to a preset data payload;

[0110] The marking module 102 is configured to set the value of the "multi-packet flag" field to 1 if the remaining payload can still encapsulate the next application packet;

[0111] The second encapsulation module 103 is configured to encapsulate the private protocol header of the second application message after the first application message, encapsulate the second application message into the unidirectional private protocol message, set the "Data Length" field to the data length of the second application message, and set the value of the "Multi-Message Flag" field to 1 if the remaining payload can be used to encapsulate the next application message;

[0112] The multi-encapsulation module 104 is configured to sequentially encapsulate multiple application messages until the data payload is unable to carry the application messages.

[0113] The method of using jumbo frames and a single private protocol message to carry multiple small messages is adopted to improve the one-way transmission speed of the external and internal machines, increase the message transmission load, accommodate more small messages, improve the throughput of one-way message transmission, and reduce the risk of losing the original small messages. At the same time, since fragmentation and reassembly are no longer performed, the loss of computing resources is reduced, and the problem of large-scale data loss that is prone to occur in existing methods is solved.

[0114] The embodiment of the present application also provides a one-way message extraction device, such as Figure 7 FIG. 1 is a block diagram of a one-way message extraction device, which includes:

[0115] Receiving module 400, used for receiving jumbo frame Ethernet messages;

[0116] The protocol header removal module 500 is used to remove the Ethernet protocol header in the jumbo frame Ethernet message and send it to the application software;

[0117] The message extraction module 600 is used for the application software to parse the first unidirectional private protocol header and extract application message data;

[0118] The extraction judgment module 700 is used to judge whether to continue to extract the next unidirectional private protocol message according to the value of the "multi-message flag" in the protocol header.

[0119] At the receiving end, the value of the multi-message flag can be used to determine whether to continue extracting the next unidirectional private protocol message, thereby realizing the processing of jumbo frames carrying multiple unidirectional private protocol messages and reducing the risk of losing the original small message.

[0120] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the one-way message transmission method described in Example 1.

[0121] An embodiment of the present application further provides a readable storage medium, wherein the readable storage medium stores computer program instructions. When the computer program instructions are read and executed by a processor, the unidirectional message transmission method described in Example 1 is executed.

[0122] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0123] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0124] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0125] The foregoing is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.

[0126] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

[0127] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

Claims

1. A one-way message transmission method, characterized in that: Applied to a sending end, the method includes: Encapsulates multiple application messages into a unidirectional private protocol message based on a preset data payload to generate a jumbo frame unidirectional private message. Specifically, the following steps are performed: Encapsulate the first application message into a unidirectional protocol private message according to the preset data payload; if the remaining payload can still encapsulate the next application message, set the value of the "Multi-Message Flag" field to 1; encapsulate the private protocol header of the second application message after the first application message, and encapsulate the second application message into the unidirectional private protocol message, set the "Data Length" field to the data length of the second application message, and if the remaining payload can still encapsulate the next application message, set the value of the "Multi-Message Flag" field to 1; encapsulate multiple application messages in sequence until the data payload can no longer carry application messages; Add an Ethernet protocol header to the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message; The Ethernet jumbo frame message is sent to a receiving end.

2. The one-way message transmission method according to claim 1, characterized in that: The step of adding an Ethernet protocol header to the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message includes: The jumbo frame unidirectional private message is sent to the system kernel, and an Ethernet protocol header is added before the jumbo frame unidirectional private message to generate an Ethernet jumbo frame message.

3. A one-way message extraction method, characterized in that: Applied to a receiving end, the method includes: Receiving a jumbo frame Ethernet message generated in the unidirectional message transmission method according to any one of claims 1-2; removing the Ethernet protocol header from the jumbo frame Ethernet message and sending it to the application software; The application software parses the first unidirectional private protocol header and extracts application message data; According to the "multi-message flag" value in the protocol header, determine whether to continue extracting the next unidirectional private protocol message. Specifically: if the "multi-message flag" value is 1, extract the next unidirectional private protocol message; if the "multi-message flag" value is 0, terminate the extraction of the unidirectional private protocol message.

4. A one-way message transmission device, characterized in that: The device comprises: An encapsulation module, configured to encapsulate multiple application messages into a unidirectional private protocol message based on a preset data payload to generate a jumbo frame unidirectional private message; An Ethernet jumbo frame message generation module is used to add an Ethernet protocol header to a jumbo frame unidirectional private message to generate an Ethernet jumbo frame message; A sending module, configured to send the Ethernet jumbo frame message to a receiving end; The packaging module includes: A first encapsulation module, configured to encapsulate the first application message into a unidirectional protocol private message according to a preset data payload; The marking module is used to set the value of the "multi-message flag" field to 1 if the remaining payload can still encapsulate the next application message; a second encapsulation module, configured to encapsulate the private protocol header of a second application message after the first application message, encapsulate the second application message into the unidirectional private protocol message, set the "data length" field to the data length of the second application message, and set the value of the "multi-message flag" field to 1 if the remaining payload can still encapsulate the next application message; The multi-encapsulation module is used to encapsulate multiple application messages in sequence until the data payload is unable to carry the application messages.

5. A one-way message extraction device, characterized in that: The device comprises: A receiving module, configured to receive the jumbo frame Ethernet message generated in the unidirectional message transmission method according to any one of claims 1-2; A protocol header removal module, configured to remove the Ethernet protocol header from the jumbo frame Ethernet message and send the jumbo frame Ethernet message to the application software; A message extraction module, used for the application software to parse the first unidirectional private protocol header and extract application message data; The extraction judgment module is used to determine whether to continue extracting the next unidirectional private protocol message based on the "multi-message flag" value in the protocol header. Specifically: if the "multi-message flag" value is 1, the next unidirectional private protocol message is extracted; if the "multi-message flag" value is 0, the extraction of the unidirectional private protocol message is terminated.

6. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the one-way message transmission method according to any one of claims 1 to 2.

7. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the unidirectional message transmission method according to any one of claims 1 to 2 is executed.

Citation Information

Patent Citations

  • Message gathering transmission method, device and system

    CN105577566A