Reliable message transmission device compatible with single processor and multiple processors

By adopting a unified message transmission queue and multi-layer module structure in a multiprocessor system, the message queue is dynamically adjusted and the first-in-first-out mechanism is adopted, combining sharding and aggregation technology, ACK confirmation mechanism and timeout retransmission mechanism, multi-processing is solved The reliability and efficiency of message transmission in the machine system achieve efficient and reliable message transmission.

CN119473663APending Publication Date: 2025-02-18WUHAN SHIP COMM RES INST (NO 722 RES INST OF CHINA STATE SHIPBUILDING CORP)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411709764.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In a multiprocessor system, how to achieve efficient and reliable message transmission and solve the problems of message loss, repetition, delay and out of order, especially when different processors have different computing capabilities and workloads.

Method used

A unified message transmission queue is used as the internal interface for system message interaction and data transmission, including the device interface encapsulation layer, reliable transmission layer and protocol scheduling layer module. The message queue is dynamically adjusted through the message queue manager, and the message is managed using the first-in-first-out mechanism and priority classification, combining sharding and aggregation technology, ACK confirmation mechanism and timeout retransmission mechanism to ensure reliable transmission of messages.

Benefits of technology

It realizes effective communication between different processor nodes, improves the communication efficiency of the system, ensures reliable transmission of messages, and is suitable for single-processor and multi-processor systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473663A_ABST
    Figure CN119473663A_ABST
Patent Text Reader

Abstract

The invention discloses a reliable message transmission device compatible with a single processor and multiple processors, and relates to the field of reliable message transmission, and the device comprises an equipment interface packaging layer module, a reliable transmission layer module and a protocol scheduling layer module, the equipment interface encapsulation layer module is connected with the protocol processing layer and the reliable transmission layer module in the application layer, and is used for acquiring a target message from the uniprocessor system and the multiprocessor system, sending the target message to the protocol scheduling layer module and providing data cache for the reliable transmission layer module; the reliable transmission layer module is used for reliably transmitting the target message; and the protocol scheduling layer module is connected with the reliable transmission layer module and the equipment interface encapsulation layer module and is used for performing message format encapsulation and data format analysis on the target message. The device shields the data transmission difference between the uniprocessor and the multiprocessor of the system, is simultaneously suitable for a uniprocessor system and a multiprocessor system, realizes effective communication among different processor nodes, and improves the communication efficiency of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of reliable message transmission applications, and more specifically, to a reliable message transmission device compatible with a single processor and multiple processors. Background Art

[0002] In the field of modern computing, computer systems are increasingly moving towards multi-processor architectures. With the widespread application of multi-processor systems, how to achieve efficient and reliable message transmission in these complex systems has become a key issue. Message transmission is not only an important part of the operating system, but also the basis for communication between applications. Therefore, a reliable message transmission device that is compatible with single-processor and multi-processor architectures has important theoretical significance and practical application value.

[0003] Whether multi-processor communication uses direct message passing or indirect message communication mechanisms such as shared memory and bus, it has to face problems such as message loss, duplication, delay and disorder. The existence of these problems makes it more complicated to achieve reliable message transmission in multi-processor conditions. In addition, different processors may have different computing capabilities and workloads, which leads to different message transmission needs and performance requirements. Summary of the invention

[0004] In response to at least one defect or improvement need in the prior art, the present invention provides a reliable message transmission device that is compatible with both single-processor and multi-processor devices, which solves the defects of the prior art. By using a unified message transmission queue as the internal interface for system message interaction and data transmission, the device is suitable for both single-processor systems and multi-processor systems, thereby achieving effective communication between different processor nodes and improving the communication efficiency of the system.

[0005] To achieve the above object, according to a first aspect of the present invention, there is provided a message reliable transmission device compatible with single processor and multi-processor, comprising: a device interface encapsulation layer module, a reliable transmission layer module and a protocol scheduling layer module;

[0006] The device interface encapsulation layer module connects the protocol processing layer and the reliable transport layer module in the application layer, is used to obtain the target message from the single-processor system and the multi-processor system and send it to the protocol scheduling layer module, and provides data cache for the reliable transport layer module; wherein the device interface encapsulation layer includes a single-processor interface and a multi-processor interface;

[0007] A reliable transport layer module connects the device interface encapsulation layer module and the protocol scheduling layer module to reliably transmit the target message;

[0008] The protocol scheduling layer module connects the reliable transport layer module and the device interface encapsulation layer module, and is used to encapsulate the target message in message format and parse the data format.

[0009] As described in the message reliable transmission device compatible with single processor and multiple processors, the device interface encapsulation layer module includes:

[0010] A message queue manager, used to dynamically adjust the number and size of message queues in the device interface encapsulation layer, assign priorities to message queues, and classify messages according to urgency based on the priorities of the message queues;

[0011] The processor cluster channel configuration management unit is used to classify channel types according to whether the channel supports cache, timeout, and data sharding, and to generate a unified configuration protocol based on the characteristics of the channel;

[0012] The inter-process communication unit is used to generate different message queues according to the classification of message queues, put the message cache into its corresponding message queue, call the inter-process communication mechanism to transmit the message to the target processor node according to the configuration protocol, and determine whether the target processor node processes the message.

[0013] As described in the message reliable transmission device compatible with single processor and multiple processors, the device interface encapsulation layer module further includes:

[0014] The message queue configuration management unit is used to count the traffic of each message queue, predict the future traffic based on the traffic and generate a traffic prediction report, estimate the configuration of the future message queue based on the traffic report and the historical data of the traffic report, obtain the message queue configuration request, and dynamically adjust the message queue allocation resources.

[0015] As described in the message reliable transmission device compatible with single processor and multiple processors, predicting the future traffic according to the traffic and generating the traffic prediction report includes:

[0016] Count the traffic of each message queue to get the statistical results;

[0017] Generate traffic reports based on statistical results;

[0018] Obtain the current usage of all message queues and the allocatable resources of message queues, predict future traffic based on traffic reports, and generate traffic forecast reports.

[0019] As described in the message reliable transmission device compatible with single processor and multiple processors, the reliable transmission layer module includes:

[0020] A determination unit, used for message retransmission request and message confirmation request;

[0021] Data cache unit, used for memory application, send cache, receive cache and cache read-after-write control;

[0022] A communication unit, used for receiving and sending messages between the protocol scheduling layer in the application layer;

[0023] Retransmission unit, used to record the sequence number and timeout mechanism of the unreceived ACK segment;

[0024] The sequence number unit is used to generate and allocate communication sequence numbers and ensure that each fragment is received in sequence.

[0025] As described in the message reliable transmission device compatible with single processor and multiple processors, the protocol scheduling layer module includes:

[0026] The flow control unit is used to handle the blocking of the message queue and the remaining capacity of the message queue;

[0027] A flow control unit, used to segment the data of the message queue according to a preset block or frame size;

[0028] The scheduling unit is used to schedule the slices according to the preset block and frame sizes.

[0029] As described in the reliable message transmission device compatible with single processor and multiple processors, the timeout mechanism includes discarding the packet if no confirmation packet is received after three retransmissions.

[0030] As described above, the message reliable transmission device compatible with single processor and multi-processor is a shared memory mechanism in a multi-processor system and an inter-process communication mechanism in a single processor system.

[0031] As described in the message reliable transmission device compatible with single processor and multiple processors, the processor node encapsulates the message into a message frame and transmits it to the local message queue by calling the inter-process communication mechanism.

[0032] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:

[0033] (1) The message reliable transmission device compatible with single processors and multi-processors provided by the present invention uses a unified message transmission queue as the internal interface for system message interaction and data transmission. That is, by providing a unified interface to the application layer, the difference in data transmission between single processors and multi-processors in the system is shielded. The device is applicable to both single processor systems and multi-processor systems, thereby achieving effective communication between different processor nodes and improving the communication efficiency of the system.

[0034] (2) The present invention is a reliable message transmission device compatible with single-processor and multi-processor devices, and adopts a first-in-first-out (FIFO) message queue to manage the cache of the message queue, classifies the system message cache according to priority, manages messages of different priorities with different FIFO queues, and adds a first-in-first-out mechanism to ensure that messages are dequeued in order according to priority, and ensure that the priority of each message queue is adjustable.

[0035] (3) The message reliable transmission device of the present invention is compatible with single processors and multi-processors. It adjusts the message queue by predicting the message flow, obtains the flow report according to the statistical message flow, and predicts the future message queue flow according to the allocatable resources of the message queue and the current usage. It adjusts the message queue configuration in time to ensure the reliable transmission of messages. In conjunction with the use of multi-channel message queues, through the multi-channel message queues, isolated channels are provided for different message flows, ensuring that the system can be reasonably scheduled under the flow of different message queues, further ensuring the reliable transmission of messages.

[0036] (4) The message reliable transmission device of the present invention is compatible with single processors and multi-processors. It adopts fragmentation and aggregation technology. Through the algorithm and data format design based on the communication protocol, the application layer message is segmented and distributed to the message queue. At the same time, the cache data is aggregated and encapsulated and transmitted to the target processor node in different ways to improve the efficiency of system message transmission. At the same time, an ACK confirmation mechanism and a timeout retransmission mechanism are provided to improve the certainty of system message transmission. In the message retransmission mechanism, each retransmitted message is a data fragment of a part of the message that has been received and confirmed, which reduces unnecessary retransmission and improves the system message transmission performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 A schematic diagram of the structure of an optional message reliable transmission device compatible with single processors and multiple processors provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of an optional reliable message transmission data flow structure provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of a message transmission process provided by a sender in an embodiment of the present application;

[0041] Figure 4A structural diagram of a receiving party message transmission process provided in an embodiment of the present application;

[0042] Figure 5 A structural diagram of a message return transmission process provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0044] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0045] According to one aspect of the embodiments of the present application, a message reliable transmission device compatible with a single processor and multiple processors is provided. Figure 1 A message reliable transmission device compatible with a single processor and multiple processors provided in an embodiment of the present application is described.

[0046] Figure 1 is a schematic diagram of the structure of an optional message reliable transmission device compatible with a single processor and multiple processors provided in an embodiment of the present application, such as Figure 1 As shown, the device may include the following modules:

[0047] Device interface encapsulation layer module, reliable transport layer module and protocol scheduling layer module;

[0048] The device interface encapsulation layer module connects the protocol processing layer and the reliable transport layer module in the application layer, is used to obtain the target message from the single-processor system and the multi-processor system and send it to the protocol scheduling layer module, and provides data cache for the reliable transport layer module; wherein the device interface encapsulation layer includes a single-processor interface and a multi-processor interface;

[0049] A reliable transport layer module connects the device interface encapsulation layer module and the protocol scheduling layer module to reliably transmit the target message;

[0050] The protocol scheduling layer module connects the reliable transport layer module and the device interface encapsulation layer module, and is used to encapsulate the target message in message format and parse the data format.

[0051] In a preferred embodiment, the device interface encapsulation layer module includes: a message queue manager, which is used to dynamically adjust the number and size of message queues in the device interface encapsulation layer, assign priorities to message queues, and classify messages according to their urgency according to the priorities of the message queues; a processor cluster channel configuration management unit, which is used to divide channel types according to whether the channels support caching, timeouts, and data sharding, and generate a unified configuration protocol based on the characteristics of the channels; an inter-process communication unit, which is used to generate different message queues according to the classification of message queues, place the message cache in its corresponding message queue, call the inter-process communication mechanism to transmit the message to the target processor node according to the configuration protocol, and determine whether the target processor node processes the message.

[0052] In a preferred embodiment, the device interface encapsulation layer module also includes: a message queue configuration management unit, which is used to count the traffic of each message queue, predict future traffic based on the traffic and generate a traffic prediction report, estimate the configuration of future message queues based on the traffic report and the historical data of the traffic report, and obtain a message queue configuration request to dynamically adjust the message queue allocation resources.

[0053] In a preferred embodiment, predicting future traffic based on traffic and generating a traffic forecast report includes: counting the traffic of each message queue to obtain statistical results; generating a traffic report based on the statistical results; obtaining the current utilization rate of all message queues and the allocatable resources of the message queues, and predicting future traffic based on the traffic report to generate a traffic forecast report.

[0054] In a preferred embodiment, the reliable transport layer module includes: a determination unit for message retransmission requests and message confirmation requests; a data cache unit for memory application, send cache, receive cache and cache write-after-read control; a communication unit for receiving and sending messages between the protocol scheduling layer in the application layer; a retransmission unit for recording the sequence number and timeout mechanism of the ACK fragment that has not been received; a sequence number unit for generating and allocating communication sequence numbers, and ensuring that each fragment can be received in sequence.

[0055] In a preferred embodiment, the protocol scheduling layer module includes: a flow control unit, used to handle the congestion of the message queue and the remaining capacity of the message queue; a flow control unit, used to slice the data of the message queue according to a preset block or frame size; and a scheduling unit, used to schedule the slices according to the preset block and frame size.

[0056] Furthermore, the timeout mechanism includes discarding a packet if no confirmation is received after three retransmissions.

[0057] In a preferred embodiment, the multi-processor system uses a shared memory mechanism, and the single-processor system uses an inter-process communication mechanism. The processor node encapsulates the message into a message frame and transmits it to the local message queue by calling the inter-process communication mechanism.

[0058] Figure 2 This is a schematic diagram of an optional reliable message transmission data flow provided by an embodiment of the present application, such as Figure 2 As shown, the device is compatible with single and multiple processors, and uses processors, processes, and services as granularity to ensure reliable data transmission. Among them, the processor is the smallest hardware unit of the device. The process is the smallest unit for processing transactions in the resident processor. The service is the smallest unit deployed in the process and distinguished by business type.

[0059] The following uses the producer of message data (Producer), the consumer of message data (Consumer) and the message queue (Buffer) as examples for explanation.

[0060] The message transmission (sending) process is as follows: Figure 3 It is a message transmission flow chart in the present invention, such as Figure 3 As shown, the details are as follows: Step S101, the producer of message data sends a message to the message queue buffer, and the message queue configuration manager determines whether the message queue buffer can be received according to the current state of the message queue buffer; if the message queue buffer is full or the message queue buffer is full, an error response is returned.

[0061] When the state of the message queue buffer is good, the message queue configuration manager determines that the message queue buffer can receive message data, and the message queue buffer groups and queues the received message data. At the same time, the message queue configuration manager determines that the message queue buffer can receive the message queue buffer.

[0062] Step S102, the reliable transport layer module receives the message sent by the message queue buffer. If the reliable transport layer module receives the message normally, a response is sent to the message queue buffer, and after the message queue buffer receives the sent response, a new message processing is started.

[0063] If the reliable transport layer module receives a message abnormally, the message will be sent repeatedly. If no response is received from the message queue buffer after multiple retransmissions, or the number of transmissions exceeds the constraint value, the message transmission will be abandoned.

[0064] Step S103, after the message data producer successfully sends the message to the message queue buffer, the message queue configuration manager determines the data block of the message data to be sent to the target message queue in the message queue buffer according to the current number of free buffer message blocks and the message block capacity.

[0065] When the message data is written into the message queue buffer, the reliable transport layer module segments the message data according to the length information of the message data, allocates segment sequence numbers, and performs sequence number determination and retransmission determination. Here, step 102 and step 103 are executed simultaneously.

[0066] The message queue configuration manager segments the message data received by the message queue buffer. When the message queue buffer receives a message data request, the processor cluster channel configuration manager segments the message data according to the message data frame size and writes it into the message queue buffer.

[0067] Step S104, the message queue buffer sends the fragment to the reliable transport layer module. After the message data frame is successfully sent, the message queue buffer determines the sequence number of the sent data frame.

[0068] When the data frame sequence number has not been sent, the message queue configuration manager waits for the feedback response from the reliable transport layer module. When the data frame sequence number is sent, the message queue buffer success response is returned to the message data consumer.

[0069] Step S105: After receiving the message data, the message data consumer's message queue buffer calls the protocol scheduling layer to process the data.

[0070] The message transmission (reception) process is as follows: Figure 4 It is a message transmission flow chart in the present invention, such as Figure 4 As shown, the details are as follows: Step S201, the receiving thread of the reliable transport layer detects a message data frame and receives the message data frame from the message queue buffer.

[0071] If the message is not received successfully, the reception is repeated N times.

[0072] If the message data frame is a retransmitted message frame, the data packet is discarded; otherwise, the data packet is received and its fragment sequence number is stored.

[0073] If the message data frame is received successfully, an ACK control packet is returned.

[0074] Step S202: The message scheduling layer receives an ACK control packet and sends it to the message data producer. Since there is no feedback for the sending of the ACK control packet by the message scheduling layer, the number of ACK control packets received by the message scheduling layer is not counted.

[0075] Step S203, after receiving the ACK control packet, the message data producer determines the reception status of the message data frame and its fragment sequence number. If the fragment sequence number has been received, the message data frame is sent to the message data consumer.

[0076] After receiving the message data frame, the message data consumer determines its fragment sequence number. If the fragment sequence number has been received, the frame is discarded, otherwise the message is received and sent to the message data consumer.

[0077] Message transmission (return) processing: Figure 5 It is a message transmission flow chart in the present invention, such as Figure 5 As shown, the details are as follows: S301, a message data consumer sends a message data request to a message queue buffer.

[0078] Step S302: the message queue buffers and receives a message data request.

[0079] Step S303: the message queue configuration manager determines the message queue buffer to return the message data to the message data consumer according to the current number of free message blocks and the message block capacity.

[0080] Step S304, the message queue buffer sends a message to the message data consumer. After the message data frame is successfully sent, the message queue buffer determines whether the message data frame has been sent.

[0081] If the message data frame has not been sent completely, the message queue configuration manager waits for a feedback response from the message data consumer.

[0082] If the message data frame is sent, the message queue buffer returns a successful response to the message data consumer.

[0083] Step S305 , after successfully receiving the message data sent by the message queue buffer, the message data consumer starts to execute message processing in the message queue buffer.

[0084] In summary, the message reliable transmission device compatible with single processor and multiple processors provided by the present invention adopts the first method to extract the device interface encapsulation layer.

[0085] In a single-processor system, the inter-process communication mechanism provided by the operating system is directly called to maintain its simplicity and ease of use; in a multi-processor system, a shareable memory mechanism is provided, and lock-free data structures and cache consistency technology are applied to reduce communication delays between processors and reduce competition in the message transmission process; message queues are provided for caching uploaded and downloaded data, which can decouple producers and consumers to achieve asynchronous communication and traffic peak shaving; different numbers of message queues are allocated according to the communication mechanism classification, and according to the processing capacity of the message queue, the message size can be dynamically adjusted to adapt to the maximum capacity of the system to improve the overall message transmission efficiency; the future transmission capacity can be predicted based on the traffic analysis of the message queue over a period of time and fed back to the upper layer for fragmentation and reorganization of messages; priorities are assigned to message queues, and messages are placed in different message queues according to their importance and urgency, which can ensure that all messages can be processed in a timely manner.

[0086] Second, a reliable transport layer is refined, and a confirmation mechanism is used to solve the problem of message loss. The sender maintains a sending window. The receiver replies with a confirmation packet after receiving a fragment. The sender will release the fragment only after receiving the confirmation packet. The sequence number mechanism is used to solve the problems of message disorder and message duplication. The sender assigns sequence numbers, and the receiver maintains a receiving window. When the fragments arrive at the receiver, they are placed in the receiving window according to the sequence number until they are all received and reported. Duplicate fragments will be discarded. The retransmission mechanism is used to solve the problem of message loss. The sender maintains a retransmission window. After sending the fragment, the sender puts it into the retransmission window and starts the timer. If a confirmation packet is received before the timer expires, the fragment is released. If no confirmation packet is received, the fragment is sent again and the timer is restarted. If no confirmation packet is received after three retransmissions, the fragment is discarded.

[0087] Third, the protocol scheduling layer is refined, and data is sent in block and frame formats, providing a flexible way to handle messages of different types and sizes. The size of the block or frame can be adjusted as needed to optimize performance and resource utilization. The device interface layer predicts future traffic and fragments and reassembles block and frame format messages, which can improve message transmission efficiency and reduce the pressure of fragmentation and reassembly tasks on the device interface encapsulation layer.

[0088] By adopting the above-mentioned reliable transmission architecture of communication messages, the defects existing in the prior art are solved, effective communication between different processor nodes is achieved, and the communication efficiency of the system is improved.

[0089] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0090] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0091] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0092] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0093] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0094] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.

[0095] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0096] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.

[0097] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0098] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A reliable message transmission device compatible with single processor and multi-processor, characterized in that: include: Device interface encapsulation layer module, reliable transport layer module and protocol scheduling layer module; The device interface encapsulation layer module connects the protocol processing layer and the reliable transport layer module in the application layer, is used to obtain the target message from the single-processor system and the multi-processor system and send it to the protocol scheduling layer module, and provides data cache for the reliable transport layer module; wherein the device interface encapsulation layer module includes a single-processor interface and a multi-processor interface; A reliable transport layer module connects the device interface encapsulation layer module and the protocol scheduling layer module to reliably transmit the target message; The protocol scheduling layer module connects the reliable transport layer module and the device interface encapsulation layer module, and is used to encapsulate the target message in message format and parse the data format.

2. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 1, characterized in that: The device interface encapsulation layer module includes: A message queue manager, used to dynamically adjust the number and size of message queues in the device interface encapsulation layer, assign priorities to message queues, and classify messages according to urgency based on the priorities of the message queues; The processor cluster channel configuration management unit is used to classify channel types according to whether the channel supports cache, timeout, and data sharding, and to generate a unified configuration protocol based on the characteristics of the channel; The inter-process communication unit is used to generate different message queues according to the classification of message queues, put the message cache into its corresponding message queue, call the inter-process communication mechanism to transmit the message to the target processor node according to the configuration protocol, and determine whether the target processor node processes the message.

3. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 2, characterized in that: The device interface encapsulation layer module further includes: The message queue configuration management unit is used to count the traffic of each message queue, predict the future traffic based on the traffic and generate a traffic prediction report, estimate the configuration of the future message queue based on the traffic report and the historical data of the traffic report, obtain the message queue configuration request, and dynamically adjust the message queue allocation resources.

4. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 3, characterized in that: Predicting future traffic based on traffic and generating a traffic prediction report includes: Count the traffic of each message queue to get the statistical results; Generate traffic reports based on statistical results; Obtain the current usage of all message queues and the allocatable resources of message queues, predict future traffic based on traffic reports, and generate traffic forecast reports.

5. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 1, characterized in that: The reliable transport layer module includes: A determination unit, used for message retransmission request and message confirmation request; Data cache unit, used for memory application, send cache, receive cache and cache read-after-write control; A communication unit, used for receiving and sending messages between the protocol scheduling layer in the application layer; Retransmission unit, used to record the sequence number and timeout mechanism of the unreceived ACK segment; The sequence number unit is used to generate and allocate communication sequence numbers and ensure that each fragment is received in sequence.

6. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 1, characterized in that: The protocol scheduling layer module includes: The flow control unit is used to handle the blocking of the message queue and the remaining capacity of the message queue; A flow control unit, used to segment the data of the message queue according to a preset block or frame size; The scheduling unit is used to schedule the slices according to the preset block and frame sizes.

7. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 5, characterized in that: The timeout mechanism includes discarding a packet if no confirmation packet is received after three retransmissions.

8. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 1, characterized in that: The multi-processor system uses a shared memory mechanism, and the single-processor system uses an inter-process communication mechanism.

9. The message reliable transmission device compatible with single processor and multiple processors as claimed in claim 3, characterized in that: The processor node encapsulates the message into a message frame and transmits it to the local message queue by calling the inter-process communication mechanism.