Message communication processing method and device and electronic equipment

By setting the sending queue and receiving queue in the preset memory, and directly accessing these queues using user state drivers and network card hardware, the problem of data transmission uncertainty between the user state and kernel state based on Linux terminal nodes is solved, the efficiency and real-time nature of message transmission is improved, and the certainty of data transmission is ensured.

CN119544648AActive Publication Date: 2025-02-28CHINA AUTOMOTIVE INNOVATION CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411584681.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-28
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

When Linux-based terminal nodes use data distribution services to communicate, there are complex processing of data stacks between user state and kernel state, resulting in uncertainty in transmission delay and difficulty in ensuring the certainty of end-to-end communication.

Method used

By setting the sending queue and receiving queue in preset memory, using user state drivers and network card hardware to directly access these queues, reducing context switching between kernel state and user state, and optimizing the storage and transmission path of packets.

Benefits of technology

It improves the efficiency and real-time nature of message transmission, reduces processing time, enhances the accuracy of message access and system processing capabilities, and ensures the certainty of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544648A_ABST
    Figure CN119544648A_ABST
Patent Text Reader

Abstract

The invention relates to a message communication processing method and device and electronic equipment, and the method comprises the steps: obtaining a first physical address of first original message content under the condition that the first original message content corresponding to any to-be-sent message is received; in the process of accessing the first preset memory based on the first user mode driver, determining a first storage space from a preset sending queue of the first preset memory based on the first preset configuration information, and storing the first physical address in the first storage space; in the process of accessing the first preset memory based on the first network card hardware, under the condition that it is detected that any idle storage space in a preset sending queue is occupied, based on second preset configuration information, taking out the first storage space from the preset sending queue, and analyzing the first storage space to obtain a first physical address; and sending the to-be-sent message based on the first physical address and the first network card hardware. According to the embodiment of the invention, the problem of time delay uncertainty in a message transmission process can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a message communication processing method, device and electronic equipment. Background Art

[0002] The Linux-based data distribution service can achieve efficient, reliable and real-time data communication in the vehicle system through the time-sensitive network. The data distribution and subscription mechanism of the data distribution service enables the vehicle components to share data in real time. Although the time-sensitive network can ensure the real-time and deterministic data transmission, when the Linux-based terminal nodes use the data distribution service to communicate, there are situations where data needs to be copied multiple times between the user state and the kernel state, context switching, interrupt processing, and complex processing of the protocol stack of the transmission control protocol / Internet protocol, resulting in uncertainty in transmission delay, making it difficult to ensure the determinism of end-to-end communication in the data distribution service. Summary of the invention

[0003] The present disclosure provides a message communication processing method, device, electronic device and storage medium to at least solve the technical problems in the related art that it is difficult to strictly meet the requirements of deterministic transmission and the jitter of the deterministic delay of data transmission is large. The technical solution of the present disclosure is as follows:

[0004] On the one hand, an embodiment of the present disclosure provides a method for processing message communication, including:

[0005] Upon receiving the first original message content corresponding to any message to be sent, obtaining the first physical address of the first original message content;

[0006] In the process of accessing the first preset memory based on the first user state driver, based on the first preset configuration information, a first storage space is determined from a preset sending queue of the first preset memory, and the first physical address is stored in the first storage space, the first preset configuration information is a virtual address of the preset sending queue in the first preset memory, and the first storage space is any free storage space in the preset sending queue;

[0007] In the process of accessing the first preset memory based on the first network card hardware, when it is detected that any free storage space in the preset sending queue is occupied, based on second preset configuration information, taking out the first storage space from the preset sending queue, parsing the first storage space, and obtaining the first physical address, wherein the second preset configuration information is the physical address of the preset sending queue in the first preset memory;

[0008] The message to be sent is sent based on the first physical address and the first network card hardware.

[0009] In an optional embodiment, the message to be sent is a third encapsulated message, and the method further includes:

[0010] Encapsulating the first original message content based on a real-time publish-subscribe protocol at the application layer to obtain a first encapsulated message;

[0011] In the process of accessing the first preset memory based on the first preset original partition, based on the third preset configuration information, a second storage space is determined from the first preset queue of the first preset memory, and the first encapsulated message is stored in the second storage space, the third preset configuration information is a virtual address of the first preset queue in the first preset memory, and the second storage space is any free storage space in the first preset queue;

[0012] Recording a first virtual address and a first memory address of the first encapsulated message in the second storage space;

[0013] Based on the User Datagram Protocol at the transport layer, encapsulate the first encapsulated message in the second storage space to obtain a second encapsulated message;

[0014] Based on the Internet protocol at the network layer, the second encapsulated message is encapsulated in the second storage space to obtain the third encapsulated message.

[0015] In an optional embodiment, obtaining the first physical address of the first original message content includes:

[0016] The first virtual address is converted into the first physical address.

[0017] In an optional embodiment, the sending the message to be sent based on the first physical address and the first network card hardware includes:

[0018] In the process of accessing the first preset memory based on the first network card hardware, obtaining the first memory address based on fourth preset configuration information and the first physical address, wherein the fourth preset configuration information is the physical address of the first preset queue in the first preset memory;

[0019] Based on the first memory address and the first preset controller, taking out the third encapsulated message from the second storage space;

[0020] The third encapsulated message is added to a preset scheduling sending queue to perform sending processing of the message to be sent.

[0021] In an optional embodiment, the method further includes:

[0022] Obtaining a first message length and a message priority of the third encapsulated message;

[0023] The acquiring the first memory address based on the fourth preset configuration information and the first physical address includes:

[0024] Based on the fourth preset configuration information, the first physical address and the first message length, obtaining the first memory address;

[0025] The step of adding the third encapsulated message to a preset scheduling sending queue to perform sending processing of the message to be sent includes:

[0026] Based on the message priority, the third encapsulated message is added to the preset scheduling sending queue to perform sending processing of the message to be sent.

[0027] On the other hand, an embodiment of the present disclosure provides a message communication processing method, including:

[0028] When any message to be received is received, obtaining a second physical address of the message to be received;

[0029] In the process of accessing the second preset memory based on the second network card hardware, based on the fifth preset configuration information, a third storage space is determined from the preset receiving queue of the second preset memory, and the second physical address is stored in the third storage space, the fifth preset configuration information is the physical address of the preset receiving queue in the second preset memory, and the third storage space is any free storage space in the preset receiving queue;

[0030] In the process of accessing the second preset memory based on the second user state driver, when it is detected that any free storage space in the preset receiving queue is occupied, based on the sixth preset configuration information, the third storage space is taken out from the preset receiving queue, the third storage space is parsed, and the second physical address is obtained, and the sixth preset configuration information is the virtual address of the preset receiving queue in the second preset memory;

[0031] Based on the second physical address and the second preset original partition, second original message content corresponding to the message to be received is obtained.

[0032] In an optional embodiment, the acquiring the second physical address of the message to be received includes:

[0033] In the process of accessing the second preset memory based on the second network card hardware, based on the seventh preset configuration information and the second preset controller, a fourth storage space is determined from the second preset queue of the second preset memory, and the to-be-received message is stored in the fourth storage space, the seventh preset configuration information is the physical address of the second preset queue in the second preset memory, and the fourth storage space is any free storage space in the second preset queue;

[0034] Record the second physical address of the message to be received in the fourth storage space.

[0035] In an optional embodiment, the method further includes:

[0036] converting the second physical address into a second virtual address;

[0037] Recording the second memory address of the message to be received in the fourth storage space;

[0038] The acquiring, based on the second physical address and the second preset original partition, the second original message content corresponding to the to-be-received message includes:

[0039] In the process of accessing the second preset memory based on the second preset original partition, acquiring the second memory address based on eighth preset configuration information and the second virtual address, wherein the eighth preset configuration information is a virtual address of the second preset queue in the second preset memory;

[0040] Based on the second memory address, the message to be received is taken out from the fourth storage space, and the message to be received is decapsulated to obtain the second original message content.

[0041] In an optional embodiment, the method further includes:

[0042] Obtaining a second message length of the message to be received;

[0043] The acquiring the second memory address based on the eighth preset configuration information and the second virtual address includes:

[0044] Based on the eighth preset configuration information, the second virtual address and the second message length, the second memory address is obtained.

[0045] In an optional embodiment, the second original message content is a third decapsulated message, and the decapsulating the message to be received to obtain the second original message content includes:

[0046] Decapsulating the message to be received at the network layer to obtain a first decapsulated message;

[0047] Performing decapsulation processing on the first decapsulation message at the transport layer to obtain a second decapsulation message;

[0048] The second desealing message is desealed at the application layer to obtain the third desealing message.

[0049] On the other hand, an embodiment of the present disclosure provides a message communication processing device, characterized by comprising:

[0050] A first physical address acquisition module, configured to acquire a first physical address of a first original message content upon receiving the first original message content corresponding to any message to be sent;

[0051] A first storage space determination module, used to determine a first storage space from a preset sending queue of the first preset memory based on first preset configuration information during access to the first preset memory based on the first user state driver, and store the first physical address in the first storage space, wherein the first preset configuration information is a virtual address of the preset sending queue in the first preset memory, and the first storage space is any free storage space in the preset sending queue;

[0052] A first storage space parsing module is used for, in the process of accessing the first preset memory based on the first network card hardware, when it is detected that any free storage space in the preset sending queue is occupied, taking out the first storage space from the preset sending queue based on second preset configuration information, parsing the first storage space, and obtaining the first physical address, wherein the second preset configuration information is the physical address of the preset sending queue in the first preset memory;

[0053] The message to be sent is sent by the module, which is used to send the message to be sent based on the first physical address and the first network card hardware.

[0054] In an optional embodiment, the message to be sent is a third encapsulated message, and the device further includes:

[0055] A first encapsulated message acquisition module, configured to encapsulate the first original message content based on a real-time publish-subscribe protocol at the application layer to obtain a first encapsulated message;

[0056] a second storage space determination module, configured to determine a second storage space from a first preset queue of the first preset memory based on third preset configuration information during access to the first preset original partition of the first preset memory, and store the first encapsulated message in the second storage space, wherein the third preset configuration information is a virtual address of the first preset queue in the first preset memory, and the second storage space is any free storage space in the first preset queue;

[0057] A first information acquisition module, used to record a first virtual address and a first memory address of the first encapsulated message in the second storage space;

[0058] A second encapsulated message acquisition module, configured to encapsulate the first encapsulated message in the second storage space based on the user datagram protocol at the transport layer to obtain a second encapsulated message;

[0059] The third encapsulated message acquisition module is used to encapsulate the second encapsulated message in the second storage space based on the Internet protocol at the network layer to obtain the third encapsulated message.

[0060] In an optional embodiment, the first physical address acquisition module includes:

[0061] The first physical address obtaining unit is used to convert the first virtual address into the first physical address.

[0062] In an optional embodiment, the message sending module to be sent includes:

[0063] a first memory address acquiring unit, configured to acquire the first memory address based on fourth preset configuration information and the first physical address during access to the first preset memory based on the first network card hardware, wherein the fourth preset configuration information is a physical address of the first preset queue in the first preset memory;

[0064] A third encapsulated message fetching unit, configured to fetch the third encapsulated message from the second storage space based on the first memory address and the first preset controller;

[0065] The message sending unit to be sent is used to add the third encapsulated message to a preset scheduling sending queue to perform sending processing of the message to be sent.

[0066] In an optional embodiment, the device further comprises:

[0067] A second information acquisition module, used to obtain a first message length and a message priority of the third encapsulated message;

[0068] The first memory address obtaining unit includes:

[0069] A first memory address obtaining subunit, configured to obtain the first memory address based on the fourth preset configuration information, the first physical address and the first message length;

[0070] The message sending unit to be sent includes:

[0071] The message to be sent subunit is used to add the third encapsulated message to the preset scheduling sending queue based on the message priority to perform sending processing of the message to be sent.

[0072] On the other hand, an embodiment of the present disclosure provides a message communication processing device, characterized by comprising:

[0073] A second physical address acquisition module, used for acquiring a second physical address of the message to be received when any message to be received is received;

[0074] a third storage space determination module, configured to determine a third storage space from a preset receiving queue of the second preset memory based on fifth preset configuration information during access to the second preset memory based on the second network card hardware, and store the second physical address in the third storage space, wherein the fifth preset configuration information is a physical address of the preset receiving queue in the second preset memory, and the third storage space is any free storage space in the preset receiving queue;

[0075] a third storage space parsing module, configured to, in a process of accessing the second preset memory based on the second user state driver, take out the third storage space from the preset receive queue based on sixth preset configuration information, parse the third storage space, and obtain the second physical address when detecting that any free storage space in the preset receive queue is occupied, wherein the sixth preset configuration information is a virtual address of the preset receive queue in the second preset memory;

[0076] The second original message content acquisition module is used to acquire the second original message content corresponding to the message to be received based on the second physical address and the second preset original partition.

[0077] In an optional embodiment, the second physical address acquisition module includes:

[0078] a fourth storage space determining unit, configured to determine a fourth storage space from a second preset queue of the second preset memory based on seventh preset configuration information and a second preset controller during access to the second preset memory based on the second network card hardware, and store the to-be-received message in the fourth storage space, wherein the seventh preset configuration information is a physical address of the second preset queue in the second preset memory, and the fourth storage space is any free storage space in the second preset queue;

[0079] The second physical address obtaining unit is used to record the second physical address of the message to be received in the fourth storage space.

[0080] In an optional embodiment, the device further comprises:

[0081] A second virtual address acquisition module, used for converting the second physical address into a second virtual address;

[0082] A second memory address acquisition module, used for recording the second memory address of the message to be received in the fourth storage space;

[0083] The second original message content acquisition module includes:

[0084] a second memory address acquiring unit, configured to acquire the second memory address based on eighth preset configuration information and the second virtual address during access to the second preset memory based on the second preset original partition, wherein the eighth preset configuration information is a virtual address of the second preset queue in the second preset memory;

[0085] The second original message content obtaining unit is used to take out the message to be received from the fourth storage space based on the second memory address, decapsulate the message to be received, and obtain the second original message content.

[0086] In an optional embodiment, the device further comprises:

[0087] A second message length obtaining module, used to obtain a second message length of the message to be received;

[0088] The second memory address obtaining unit includes:

[0089] The second memory address obtaining subunit is used to obtain the second memory address based on the eighth preset configuration information, the second virtual address and the second message length.

[0090] In an optional embodiment, the second original message content obtaining unit includes:

[0091] A first decapsulated message obtaining unit, configured to decapsulate the message to be received at a network layer to obtain a first decapsulated message;

[0092] A second decapsulation message obtaining unit, configured to decapsulate the first decapsulation message at a transport layer to obtain a second decapsulation message;

[0093] The third desealing message obtaining unit is used to perform desealing processing on the second desealing message at the application layer to obtain the third desealing message.

[0094] On the other hand, an embodiment of the present disclosure provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a method as described in any one of the first aspects above.

[0095] On the other hand, an embodiment of the present disclosure provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute any one of the message communication processing methods of the embodiment of the present disclosure.

[0096] On the other hand, an embodiment of the present disclosure provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method as described in any one of the above-mentioned first aspects.

[0097] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0098] The first user-mode driver directly accesses the first preset memory based on the virtual address of the preset send queue SQ (send queue) in the first preset memory, and stores the first physical address of the message to be sent in the first storage space SQE (send queue element) of the preset send queue in the first preset memory, which facilitates the subsequent first network card hardware access, reduces the context switching between the kernel state and the user state, and improves the message transmission efficiency. Then, the first network card hardware directly accesses the first preset memory based on the physical address of the preset send queue in the first preset memory, and when it detects that the free storage space of the preset send queue is occupied, it parses the occupied first storage space to obtain the stored first physical address, thereby reducing the processing time and improving the real-time performance of message transmission, and improving the accuracy and efficiency of message access. The message to be sent is sent directly from the first preset memory through the first network card hardware, which optimizes the path and efficiency of message transmission.

[0099] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0101] Figure 1 It is a flowchart of a message communication processing method according to an exemplary embodiment;

[0102] Figure 2 It is a schematic diagram of a process of encapsulating the content of a first original message and storing the message in a second storage space according to an exemplary embodiment;

[0103] Figure 3 is a schematic diagram of a process of sending a message to be sent according to an exemplary embodiment;

[0104] Figure 4 is a flowchart of another message communication processing method according to an exemplary embodiment;

[0105] Figure 5 is a flowchart of another message communication processing method according to an exemplary embodiment;

[0106] Figure 6 is a flowchart of another message communication processing method according to an exemplary embodiment;

[0107] Figure 7 is a block diagram of a device for message communication processing according to an exemplary embodiment;

[0108] Figure 8 is a block diagram of another device for message communication processing according to an exemplary embodiment;

[0109] Fig. 9 The invention is a block diagram of an electronic device for message communication processing according to an exemplary embodiment. DETAILED DESCRIPTION

[0110] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0111] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0112] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0113] See also Figure 1 , Figure 1 The present invention is a flowchart of a message communication processing method according to an exemplary embodiment. Specifically, the method can be applied to a sending end. The method may include the following steps:

[0114] Step S101, when a first original message content corresponding to any message to be sent is received, a first physical address of the first original message content is obtained.

[0115] In practical applications, the above-mentioned sending end may be a sending terminal of the message, such as a vehicle-mounted terminal, etc. The vehicle-mounted terminal may include a vehicle-mounted domain controller. Accordingly, the message communication processing method provided in the embodiment of the present application may be executed based on the vehicle-mounted domain controller.

[0116] In a specific embodiment, the first original message content corresponding to the message to be sent may be the first original message content corresponding to the message that the vehicle-mounted domain controller needs to send. In a specific embodiment, the first original message content may be control data. Exemplarily, the control data may be unmanned driving environment perception data streams such as power control data, brake control data, and steering control data. Specifically, the power control data may be engine speed and accelerator pedal position. The brake control data may be brake pedal position and brake pressure. The steering control data may be steering wheel data and steering torque. In a specific embodiment, the first original message content may be perception data. Exemplarily, the perception data may be millimeter wave radar data and lidar data.

[0117] In a specific embodiment, the message to be sent is a third encapsulated message, such as Figure 2 As shown, the above method also includes:

[0118] Step S201: encapsulate the first original message content based on the real-time publish-subscribe protocol at the application layer to obtain a first encapsulated message.

[0119] In a specific embodiment, the first encapsulated message includes a message header of a real-time publish-subscribe protocol and the first original message content. The message header of the real-time publish-subscribe protocol includes basic information such as protocol version, message type, sequence number, etc., which is used to identify and process the message.

[0120] Step S203, in the process of accessing the first preset memory based on the first preset original partition, based on the third preset configuration information, determine the second storage space from the first preset queue of the first preset memory, and store the first encapsulated message in the second storage space.

[0121] In a specific embodiment, the first preset raw partition is used to allocate the first preset memory to the first preset queue rawpktQ (raw packet queue) and the preset sending queue. Exemplarily, the first preset raw partition can be RAW (raw device) on the sending end side. In a specific embodiment, the first preset memory includes a first preset queue and a preset sending queue, and the first preset memory is mapped based on mmap (Memory Mapping) so that the first preset raw partition, the first user-mode driver and the first network card hardware can all access it. In a specific embodiment, the third preset configuration information is the virtual address of the first preset queue in the first preset memory. In a specific embodiment, the first preset queue is used to store messages to be sent. In a specific embodiment, the second storage space is any free storage space rawpktqe (rawpacket queue element) in the first preset queue.

[0122] In a specific embodiment, in the process of accessing the first preset memory based on the first preset original partition, based on the third preset configuration information, the second storage space is determined from the first preset queue of the first preset memory, and the first encapsulated message is stored in the second storage space. This can be based on the virtual address of the first preset queue in the first preset memory. The first preset original partition can access the first preset queue in the first preset memory, search for an idle second storage space in the first preset queue, and store the first encapsulated message in the second storage space.

[0123] Step S205: Record the first virtual address and the first memory address of the first encapsulated message in the second storage space.

[0124] In a specific embodiment, the first virtual information may be an address assigned by the operating system to the current message communication process, and the first virtual information includes a page directory index, a page table index, and an offset within a page. In a specific embodiment, the page directory index is used to find an item in the page directory, the page table index is used to find an item in the page table, and the offset within a page is used to locate data within a page.

[0125] Step S207: encapsulate the first encapsulated message in the second storage space based on the user datagram protocol at the transport layer to obtain a second encapsulated message.

[0126] In a specific embodiment, the second encapsulated message includes user datagram protocol port information, a message header of a real-time publish-subscribe protocol, and the first original message content. In a specific embodiment, the user datagram protocol port information is used to identify a specific application or service in the network, and each user datagram protocol port information is associated with a specific application or service. Through the user datagram protocol port information, it can be determined to which application or service the first encapsulated message should be delivered.

[0127] Step S209: encapsulate the second encapsulated message in the second storage space based on the Internet protocol at the network layer to obtain a third encapsulated message.

[0128] In a specific embodiment, the third encapsulated message includes an Internet Protocol address, a User Datagram Protocol port information, a message header of a Real-time Publish Subscribe Protocol, and the first original message content. In a specific embodiment, the Internet Protocol address is used to uniquely identify and locate each device in the Internet or a local area network. Through the Internet Protocol address, the second encapsulated message can be correctly routed to the target device.

[0129] In the above embodiments, the flexibility and efficiency of message transmission are improved through the layered encapsulation process. Application layer encapsulation ensures that the message format meets the protocol requirements, and further encapsulation of the transport layer and the network layer ensures that the message is transmitted safely and reliably in the network. Based on the virtual address of the first preset queue in the first preset memory, the first preset original partition can directly access the first preset queue and determine the second storage space, which helps to efficiently store the messages to be sent, thereby improving the utilization rate of the first preset memory and the flexibility of processing the messages to be sent, ensuring the reasonable allocation and efficient access of the first preset memory resources, and improving the integrity and performance of the transmission of the messages to be sent.

[0130] In a specific embodiment, the obtaining of the first physical address of the first original message content includes:

[0131] The first virtual address is converted into a first physical address.

[0132] In a specific embodiment, the first virtual address is converted into the first physical address by first obtaining a base address of a page table from a page directory using a page directory index of the first virtual address, then obtaining a base address of a page frame from a page table using a page table index of the first virtual address, and finally combining the page frame base address with the page offset of the first virtual address to calculate the final first physical address.

[0133] In the above embodiment, by converting the first virtual address into the first physical address, it is ensured that the actual first preset memory can be correctly accessed and operated. This conversion enables the first network card hardware to read the message to be sent from the first preset memory so as to correctly send the message to be sent, ensure that the content of the message to be sent is consistent with the actual message in the memory, and improve the accuracy and reliability of message transmission.

[0134] Step S103, in the process of accessing the first preset memory based on the first user mode driver, based on the first preset configuration information, a first storage space is determined from a preset sending queue of the first preset memory, and the first physical address is stored in the first storage space.

[0135] In a specific embodiment, the first preset configuration information is a virtual address of a preset sending queue in a first preset memory. In a specific embodiment, the preset sending queue is a memory area for storing and managing basic information of received messages to be sent. In a specific embodiment, the first storage space is any free storage space in the preset sending queue.

[0136] In a specific embodiment, in the process of accessing the first preset memory based on the first user state driver, based on the first preset configuration information, the first storage space is determined from the preset sending queue of the first preset memory, and the first physical address is stored in the first storage space, which can be based on the virtual address of the preset sending queue in the first preset memory. The first user state driver can access the preset sending queue in the first preset memory, search for the free first storage space in the preset sending queue, and place the first physical address in the first storage space, thereby changing the first storage space from an idle state to an occupied state.

[0137] Step S105, in the process of accessing the first preset memory based on the first network card hardware, when it is detected that any free storage space in the preset sending queue is occupied, based on the second preset configuration information, the first storage space is taken out from the preset sending queue, the first storage space is parsed, and the first physical address is obtained.

[0138] In a specific embodiment, the second preset configuration information is the physical address of the preset sending queue in the first preset memory.

[0139] In a specific embodiment, in the above-mentioned process of accessing the first preset memory based on the first network card hardware, when it is detected that any free storage space in the preset sending queue is occupied, based on the second preset configuration information, the first storage space is taken out from the preset sending queue, and the first storage space is parsed to obtain the first physical address, which can be based on the physical address of the preset sending queue in the first preset memory. The first network card hardware can access the preset sending queue in the first preset memory. When it is detected that any free storage space in the preset sending queue is occupied, the occupied first storage space is taken out from the preset sending queue and parsed to obtain the first physical address.

[0140] Step S107: Send the message to be sent based on the first physical address and the first network card hardware.

[0141] In a specific embodiment, Figure 3 As shown, the sending of the message to be sent based on the first physical address and the first network card hardware includes:

[0142] Step S301, in a process of accessing a first preset memory based on first network card hardware, obtaining a first memory address based on fourth preset configuration information and a first physical address.

[0143] In a specific embodiment, the fourth preset configuration information is the physical address of the first preset queue in the first preset memory.

[0144] In a specific embodiment, in the process of accessing the first preset memory based on the first network card hardware, based on the fourth preset configuration information and the first physical address, obtaining the first memory address can be based on the physical address of the first preset queue in the first preset memory. The first network card hardware can access the first preset queue in the first preset memory, and based on the first physical address of the second storage space of the message to be sent in the first preset queue, obtain the first memory address of the second storage space of the message to be sent in the first preset queue.

[0145] Step S303: based on the first memory address and the first preset controller, retrieve the third encapsulated message from the second storage space.

[0146] In a specific embodiment, the first preset controller is used to directly transfer data between the memory and the peripheral device in the computer system. Exemplarily, the first preset controller can be a DMA (Direct Memory Access) controller on the transmitting end side.

[0147] In a specific embodiment, the above-mentioned taking out the third encapsulated message from the second storage space based on the first memory address and the first preset controller can be based on the first memory address, finding the second storage space where the message to be sent is located, and taking out the third encapsulated message from the second storage space based on the first preset controller.

[0148] Step S305: Add the third encapsulated message to a preset scheduling sending queue to perform sending processing of the message to be sent.

[0149] In a specific embodiment, the preset scheduling sending queue is used to optimize the transmission and scheduling of messages to achieve time-sensitive network service quality.

[0150] In the above embodiment, through the physical address of the first preset queue in the first preset memory, the first network card hardware can directly obtain the message to be sent from the first preset memory, reducing the overhead of intermediate conversion, improving the efficiency of message transmission, and optimizing the access efficiency of messages; using the first preset controller to extract the third encapsulated message from the second storage space, reducing the burden of the central processing unit, ensuring the integrity of the message to be sent; adding the message to be sent to the preset scheduling sending queue realizes efficient and sequential sending processing. Therefore, the reliability of the processing of the message to be sent is improved.

[0151] In a specific embodiment, the above method includes:

[0152] Obtaining a first message length and a message priority of a third encapsulated message;

[0153] The obtaining of the first memory address based on the fourth preset configuration information and the first physical address includes:

[0154] Based on the fourth preset configuration information, the first physical address and the first message length, obtaining the first memory address;

[0155] Adding the third encapsulated message to a preset scheduling sending queue to perform sending processing of the message to be sent includes:

[0156] Based on the message priority, the third encapsulated message is added to a preset scheduling sending queue to perform sending processing of the message to be sent.

[0157] In a specific embodiment, the first message length is the total number of bytes from the beginning of the message header to the end of the data portion. The message priority is the importance level of the message transmitted in the network, which is used to determine the processing order and resource allocation of different messages.

[0158] In a specific embodiment, the above-mentioned acquisition of the first memory address based on the fourth preset configuration information, the first physical address and the first message length can be based on the physical address of the first preset queue in the first preset memory, and the first network card hardware can access the first preset queue in the first preset memory, and based on the first physical address and the first message length of the message to be sent, obtain the first memory address of the message to be sent in the first preset memory.

[0159] In the above embodiment, the first message length and message priority of the message to be sent are obtained in order to correctly process and schedule the message to be sent. Based on the first physical address and the first message length of the message to be sent, double protection can be provided to prevent the position of the message to be sent in the first preset memory from being incompletely obtained at the first physical address, thereby ensuring that the message to be sent is correctly read. The message to be sent is added to the scheduling queue according to the message priority, so as to realize efficient processing of the message to be sent according to the priority and optimize the utilization of resources.

[0160] Figure 4 Another message communication processing method provided by the embodiment of the present application is as follows: Figure 4 As shown, the method can be applied to the receiving end, comprising the following steps:

[0161] Step S401: when any message to be received is received, a second physical address of the message to be received is obtained.

[0162] In practical applications, the above-mentioned receiving end may be a receiving terminal for the message, such as a vehicle-mounted terminal, etc. The vehicle-mounted terminal may include a vehicle-mounted domain controller. Accordingly, another message communication processing method provided in an embodiment of the present application may be executed based on the vehicle-mounted domain controller.

[0163] In a specific embodiment, the above-mentioned message to be received may be a message that the vehicle-mounted domain controller needs to receive. In a specific embodiment, the above-mentioned message to be received may be control data. Exemplarily, the control data may be unmanned driving environment perception data streams such as power control data, brake control data, and steering control data. Specifically, the power control data may be engine speed and accelerator pedal position. Braking control data may be brake pedal position and brake pressure. Steering control data may be steering wheel data and steering torque. In a specific embodiment, the above-mentioned message to be received may be perception data. Exemplarily, the perception data may be millimeter wave radar data and lidar data.

[0164] In a specific embodiment, the obtaining of the second physical address of the message to be received includes:

[0165] In the process of accessing the second preset memory based on the second network card hardware, based on the seventh preset configuration information and the second preset controller, a fourth storage space is determined from the second preset queue of the second preset memory, and the message to be received is stored in the fourth storage space;

[0166] The second physical address of the message to be received in the fourth storage space is recorded.

[0167] In a specific embodiment, the second preset memory includes a second preset queue rawpktQ (rawpacket queue) and a preset receive queue RQ (receive queue), and the second preset memory is mapped based on mmap (Memory Mapping) so that the second pre-raw partition, the second user-mode driver and the second network card hardware can all access it. In a specific embodiment, the seventh preset configuration information is the physical address of the second preset queue in the second preset memory. In a specific embodiment, the second preset controller is used to directly transfer data between the memory and the peripherals in the computer system. Exemplarily, the second preset controller can be a DMA (Direct Memory Access) controller on the receiving end side.

[0168] In a specific embodiment, the second preset queue is used to store messages to be received. In a specific embodiment, the fourth storage space is any free storage space rawpktqe (rawpacket queue element) in the second preset queue.

[0169] In a specific embodiment, in the process of accessing the second preset memory based on the second network card hardware, based on the seventh preset configuration information and the second preset controller, the fourth storage space is determined from the second preset queue of the second preset memory, and the message to be received is stored in the fourth storage space. It can be based on the physical address of the second preset queue in the second preset memory. The second network card hardware can access the second preset queue in the second preset memory, search for an idle fourth storage space in the second preset queue, and store the message to be received in the fourth storage space.

[0170] In the above embodiment, through the physical address of the second preset queue in the second preset memory, the second network card hardware can directly access the second preset memory, determine the fourth storage space in the second preset queue, and ensure that the message to be received is correctly stored in the appropriate storage location. In addition, the message is stored in the free storage space in the second preset queue, which optimizes the use of the second preset memory. Selecting the free storage space avoids conflicts and overwriting of messages to be received, and improves the efficiency of the second preset memory management. Recording the second physical address of the message to be received in the fourth storage space provides the necessary information for the subsequent processing of the message, which can quickly locate the position of the message to be received in the subsequent processing stage, reduce the search time, and improve the system processing efficiency.

[0171] Step S403, in the process of accessing the second preset memory based on the second network card hardware, based on the fifth preset configuration information, determine the third storage space from the preset receiving queue of the second preset memory, and store the second physical address in the third storage space.

[0172] In a specific embodiment, the fifth preset configuration information is a physical address of the preset receiving queue in the second preset memory. In a specific embodiment, the preset receiving queue is a memory area for storing and managing basic information of received messages to be received. In a specific embodiment, the third storage space is any free storage space RQE (receive queue element) in the preset receiving queue.

[0173] In a specific embodiment, in the process of accessing the second preset memory based on the second network card hardware, based on the fifth preset configuration information, the third storage space is determined from the preset receive queue of the second preset memory, and the second physical address is stored in the third storage space. It can be based on the physical address of the preset receive queue in the second preset memory. The second network card hardware can access the preset receive queue in the second preset memory, search for an idle third storage space in the preset receive queue, and place the second physical address in the third storage space, thereby changing the third storage space from an idle state to an occupied state.

[0174] Step S405, in the process of accessing the second preset memory based on the second user mode driver, when it is detected that any free storage space in the preset receiving queue is occupied, based on the sixth preset configuration information, the third storage space is taken out from the preset receiving queue, the third storage space is parsed, and the second physical address is obtained.

[0175] In a specific embodiment, the sixth preset configuration information is a virtual address of the preset receiving queue in the second preset memory.

[0176] In a specific embodiment, in the process of accessing the second preset memory based on the second user state driver, when it is detected that any free storage space in the preset receive queue is occupied, based on the sixth preset configuration information, the third storage space is taken out from the preset receive queue, and the third storage space is parsed to obtain the second physical address, which can be a virtual address based on the preset receive queue in the second preset memory. The second user state driver can access the preset receive queue in the second preset memory. When it is detected that any free storage space in the preset receive queue is occupied, the occupied third storage space is taken out from the preset receive queue and parsed to obtain the second physical address.

[0177] Step S407: Based on the second physical address and the second preset original partition, obtain the second original message content corresponding to the message to be received.

[0178] In a specific embodiment, the above method further includes:

[0179] converting the second physical address into a second virtual address;

[0180] Recording the second memory address of the message to be received in the fourth storage space;

[0181] The acquiring of the second original message content corresponding to the message to be received based on the second physical address and the second preset original partition includes:

[0182] In the process of accessing the second preset memory based on the second preset original partition, obtaining the second memory address based on the eighth preset configuration information and the second virtual address;

[0183] Based on the second memory address, the message to be received is taken out from the fourth storage space, and the message to be received is decapsulated to obtain the second original message content.

[0184] In a specific embodiment, the above-mentioned conversion of the second physical address into the second virtual address can be as follows: first, the page table of the current process is obtained, and the page table records the mapping relationship between the virtual address and the physical address. Then, the physical address is used to find the page table entry, and the page table entry stores the mapping relationship between the virtual address and the physical address. The physical address usually needs to be converted into a corresponding page table index in order to find the corresponding page table entry from the page table. Secondly, according to the mapping information in the page table entry, the virtual address is calculated. The mapping usually includes the address mapping of the page directory and the page table, and the final virtual address is obtained in combination with the offset in the page table entry.

[0185] In a specific embodiment, the second preset original partition is used to allocate the second preset memory to the second preset queue and the preset receiving queue. Exemplarily, the second preset original partition can be a RAW (raw device, original partition) on the receiving end side. In a specific embodiment, the eighth preset configuration information is a virtual address of the second preset queue in the second preset memory.

[0186] In a specific embodiment, in the process of accessing the second preset memory based on the second preset original partition, based on the eighth preset configuration information and the second virtual address, the second memory address obtained can be a virtual address based on the second preset queue in the second preset memory, and the second preset original partition can access the second preset queue in the second preset memory, and based on the second virtual address of the message to be received in the third storage space of the second preset queue, the second memory address of the message to be received in the fourth storage space of the second preset queue is obtained.

[0187] In the above embodiment, by converting the second physical address into the second virtual address, the message to be received can be located in the second preset memory space, and the second memory address of the message to be received is recorded in the fourth storage space, so that the subsequent processing steps can accurately find and operate the message to be received. In addition, based on the virtual address of the second preset queue in the second preset memory, the second preset original partition can directly access the second preset memory, thereby obtaining the message to be received in the second preset memory, reducing the overhead of intermediate conversion and improving the efficiency of message transmission.

[0188] In a specific embodiment, the above method further includes:

[0189] Obtaining a second message length of the message to be received;

[0190] The method of obtaining the second memory address based on the eighth preset configuration information and the second virtual address includes:

[0191] Based on the eighth preset configuration information, the second virtual address and the second message length, a second memory address is obtained.

[0192] In a specific embodiment, the second message length is the total number of bytes from the beginning of the message header to the end of the data part.

[0193] In a specific embodiment, the above-mentioned second memory address is obtained based on the eighth preset configuration information, the second virtual address and the second message length, which can be based on the virtual address of the second preset queue in the second preset memory, and the second preset original partition can access the second preset queue in the second preset memory, and based on the second physical address of the message to be received and the second message length, the second memory address of the message to be received in the third storage space of the second preset queue is obtained.

[0194] In the above embodiment, based on the second virtual address and the second message length of the message to be received, double protection can be provided. In case the second virtual address is not fully obtained, the second memory address of the message to be received in the second preset memory can be accurately located to ensure that the message to be received is read correctly.

[0195] In a specific embodiment, the second original message content is a third decapsulated message, and the decapsulation process is performed on the message to be received, and the second original message content obtained includes:

[0196] Decapsulating the message to be received at the network layer to obtain a first decapsulated message;

[0197] Decapsulating the first decapsulated message at the transport layer to obtain a second decapsulated message;

[0198] The second desealed message is desealed at the application layer to obtain a third desealed message.

[0199] In a specific embodiment, the first unsealed message is a to-be-received message with the Internet Protocol address removed.

[0200] In a specific embodiment, the second unsealed message is a message to be received without information including an Internet Protocol address and a User Datagram Protocol port.

[0201] In a specific embodiment, the third unsealed message is a to-be-received message with the Internet Protocol address, User Datagram Protocol port information, and Real-time Publish Subscribe Protocol message header removed.

[0202] In the above embodiment, through the layer-by-layer decapsulation process, the header information of each layer of the protocol can be gradually stripped from the network layer, the transport layer to the application layer, and the message closest to the user's needs can be accurately extracted. The decapsulation step of each layer ensures that the message is correctly decoded according to the protocol specification, thereby reducing the risk of message damage or parsing errors.

[0203] Figure 5 Another message communication processing method provided by the present application is as follows: Figure 5 Said, comprising the following steps:

[0204] Step S501, when receiving the first original message content corresponding to any message to be sent, encapsulate the first original message content based on the real-time publish-subscribe protocol at the application layer to obtain a first encapsulated message;

[0205] Step S503, in the process of accessing the first preset memory based on the first preset original partition, based on the third preset configuration information, determining a second storage space from the first preset queue of the first preset memory, and storing the first encapsulated message in the second storage space;

[0206] Step S505, recording the first virtual address and the first memory address of the first encapsulated message in the second storage space;

[0207] Step S507, encapsulating the first encapsulated message in the second storage space based on the user datagram protocol at the transport layer to obtain a second encapsulated message;

[0208] Step S509, encapsulating the second encapsulated message in the second storage space based on the Internet protocol at the network layer to obtain a third encapsulated message;

[0209] Step S511, obtaining a first message length and a message priority of a third encapsulation message;

[0210] Step S513, converting the first virtual address into a first physical address;

[0211] Step S515, in the process of accessing the first preset memory based on the first user mode driver, based on the first preset configuration information, determining the first storage space from the preset sending queue of the first preset memory, and storing the first physical address in the first storage space;

[0212] Step S517, in the process of accessing the first preset memory based on the first network card hardware, if it is detected that any idle storage space in the preset sending queue is occupied, based on the second preset configuration information, taking out the first storage space from the preset sending queue, parsing the first storage space, and obtaining the first physical address;

[0213] Step S519, in the process of accessing the first preset memory based on the first network card hardware, obtaining the first memory address based on the fourth preset configuration information, the first physical address and the first message length;

[0214] Step S521, taking out a third encapsulated message from the second storage space based on the first memory address and the first preset controller;

[0215] Step S523: based on the message priority, add the third encapsulated message to a preset scheduling sending queue to perform sending processing of the message to be sent.

[0216] Figure 6 Another message communication processing method provided by the present application is as follows: Figure 6 Said, comprising the following steps:

[0217] Step S601, when any to-be-received message is received, in the process of accessing the second preset memory based on the second network card hardware, based on the seventh preset configuration information and the second preset controller, a fourth storage space is determined from the second preset queue of the second preset memory, and the to-be-received message is stored in the fourth storage space;

[0218] Step S603, recording the second physical address, the second memory address and the second message length of the message to be received in the fourth storage space;

[0219] Step S605, in the process of accessing the second preset memory based on the second network card hardware, based on the fifth preset configuration information, determining a third storage space from a preset receiving queue of the second preset memory, and storing the second physical address in the third storage space;

[0220] Step S607, in the process of accessing the second preset memory based on the second user mode driver, when it is detected that any free storage space in the preset receiving queue is occupied, based on the sixth preset configuration information, taking out the third storage space from the preset receiving queue, parsing the third storage space, and obtaining the second physical address;

[0221] Step S609, converting the second physical address into a second virtual address;

[0222] Step S611, in the process of accessing the second preset memory based on the second preset original partition, obtaining the second memory address based on the eighth preset configuration information, the second virtual address and the second message length;

[0223] Step S613, taking out the message to be received from the fourth storage space based on the second memory address;

[0224] Step S615, decapsulating the message to be received at the network layer to obtain a first decapsulated message;

[0225] Step S617, decapsulating the first decapsulated message at the transport layer to obtain a second decapsulated message;

[0226] Step S619: decapsulate the second decapsulated message at the application layer to obtain a third decapsulated message.

[0227] Figure 7 FIG. 1 is a block diagram of a message communication processing device according to an exemplary embodiment. Figure 7 , the device comprises:

[0228] A first physical address acquisition module 710 is used to acquire a first physical address of the first original message content when receiving the first original message content corresponding to any message to be sent;

[0229] A first storage space determining module 720, configured to determine a first storage space from a preset sending queue of the first preset memory based on first preset configuration information during access to the first preset memory based on the first user mode driver, and store the first physical address in the first storage space;

[0230] The first storage space parsing module 730 is used to, in the process of accessing the first preset memory based on the first network card hardware, if it is detected that any free storage space in the preset sending queue is occupied, take out the first storage space from the preset sending queue based on the second preset configuration information, parse the first storage space, and obtain the first physical address;

[0231] The message sending module 740 is used to send the message based on the first physical address and the first network card hardware.

[0232] In an optional embodiment, the message to be sent is a third encapsulated message, and the device further includes:

[0233] A first encapsulated message acquisition module, used to encapsulate the first original message content based on the real-time publish-subscribe protocol at the application layer to obtain a first encapsulated message;

[0234] A second storage space determination module, configured to determine a second storage space from a first preset queue of the first preset memory based on third preset configuration information during access to the first preset memory based on the first preset original partition, and store the first encapsulated message in the second storage space;

[0235] A first information acquisition module, used to record a first virtual address and a first memory address of the first encapsulated message in the second storage space;

[0236] A second encapsulated message acquisition module, used to encapsulate the first encapsulated message in the second storage space based on the user datagram protocol at the transport layer to obtain a second encapsulated message;

[0237] The third encapsulated message acquisition module is used to encapsulate the second encapsulated message in the second storage space based on the Internet protocol at the network layer to obtain the third encapsulated message.

[0238] In an optional embodiment, the first physical address acquisition module 710 includes:

[0239] The first physical address obtaining unit is used to convert the first virtual address into a first physical address.

[0240] In an optional embodiment, the message sending module 740 includes:

[0241] A first memory address acquiring unit, configured to acquire the first memory address based on fourth preset configuration information and the first physical address during access to the first preset memory based on the first network card hardware;

[0242] A third encapsulated message fetching unit, configured to fetch a third encapsulated message from the second storage space based on the first memory address and the first preset controller;

[0243] The message sending unit to be sent is used to add the third encapsulated message to a preset scheduling sending queue to perform sending processing of the message to be sent.

[0244] In an optional embodiment, the above device further includes:

[0245] A second information acquisition module, used to obtain a first message length and a message priority of a third encapsulated message;

[0246] The first memory address acquisition unit includes:

[0247] A first memory address acquisition subunit, configured to acquire a first memory address based on fourth preset configuration information, a first physical address, and a first message length;

[0248] The message sending unit to be sent includes:

[0249] The message-to-be-sent sending subunit is used to add the third encapsulated message to a preset scheduling sending queue based on the message priority, so as to perform sending processing of the message to be sent.

[0250] Figure 8 FIG. 1 is a block diagram of another message communication processing device according to an exemplary embodiment. Figure 8 , the device comprises:

[0251] The second physical address acquisition module 810 is used to acquire the second physical address of the message to be received when any message to be received is received;

[0252] A third storage space determination module 820, configured to determine a third storage space from a preset receiving queue of the second preset memory based on fifth preset configuration information during access to the second preset memory based on the second network card hardware, and store the second physical address in the third storage space;

[0253] A third storage space parsing module 830 is used to, in the process of accessing the second preset memory based on the second user mode driver, if it is detected that any free storage space in the preset receiving queue is occupied, take out the third storage space from the preset receiving queue based on the sixth preset configuration information, parse the third storage space, and obtain the second physical address;

[0254] The second original message content acquisition module 840 is used to acquire the second original message content corresponding to the message to be received based on the second physical address and the second preset original partition.

[0255] In an optional embodiment, the second physical address acquisition module 810 includes:

[0256] a fourth storage space determining unit, configured to determine a fourth storage space from a second preset queue of the second preset memory based on the seventh preset configuration information and the second preset controller during access to the second preset memory based on the second network card hardware, and store the to-be-received message in the fourth storage space;

[0257] The second physical address obtaining unit is used to record the second physical address of the message to be received in the fourth storage space.

[0258] In an optional embodiment, the above device further includes:

[0259] A second virtual address acquisition module, used for converting the second physical address into a second virtual address;

[0260] A second memory address acquisition module, used for recording a second memory address of the message to be received in the fourth storage space;

[0261] The second original message content acquisition module 840 includes:

[0262] A second memory address acquiring unit, configured to acquire the second memory address based on the eighth preset configuration information and the second virtual address during access to the second preset memory based on the second preset original partition;

[0263] The second original message content obtaining unit is used to take out the message to be received from the fourth storage space based on the second memory address, decapsulate the message to be received, and obtain the second original message content.

[0264] In an optional embodiment, the above device further includes:

[0265] A second message length obtaining module, used to obtain a second message length of the message to be received;

[0266] The second memory address obtaining unit comprises:

[0267] The second memory address obtaining subunit is used to obtain the second memory address based on the eighth preset configuration information, the second virtual address and the second message length.

[0268] In an optional embodiment, the second original message content is a third decapsulated message, and the second original message content acquiring unit includes:

[0269] A first decapsulated message obtaining unit, configured to decapsulate the message to be received at a network layer to obtain a first decapsulated message;

[0270] A second decapsulated message obtaining unit, configured to decapsulate the first decapsulated message at a transport layer to obtain a second decapsulated message;

[0271] The third unsealed message obtaining unit is used to perform unsealing processing on the second unsealed message at the application layer to obtain the third unsealed message.

[0272] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0273] Fig. 9 is a block diagram of an electronic device for message communication processing according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a message communication processing method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0274] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0275] In an exemplary embodiment, an electronic device is also provided, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the message communication processing method in the embodiment of the present disclosure.

[0276] In an exemplary embodiment, a computer-readable storage medium is also provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the message communication processing method in the embodiment of the present disclosure.

[0277] In an exemplary embodiment, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer is enabled to execute the message communication processing method in the embodiment of the present disclosure.

[0278] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0279] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0280] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A message communication processing method, characterized in that: include: Upon receiving the first original message content corresponding to any message to be sent, obtaining the first physical address of the first original message content; In the process of accessing the first preset memory based on the first user state driver, based on the first preset configuration information, a first storage space is determined from a preset sending queue of the first preset memory, and the first physical address is stored in the first storage space, the first preset configuration information is a virtual address of the preset sending queue in the first preset memory, and the first storage space is any free storage space in the preset sending queue; In the process of accessing the first preset memory based on the first network card hardware, when it is detected that any free storage space in the preset sending queue is occupied, based on second preset configuration information, taking out the first storage space from the preset sending queue, parsing the first storage space, and obtaining the first physical address, wherein the second preset configuration information is the physical address of the preset sending queue in the first preset memory; The message to be sent is sent based on the first physical address and the first network card hardware.

2. The method according to claim 1, characterized in that: The message to be sent is a third encapsulated message, and the method further includes: Encapsulating the first original message content based on a real-time publish-subscribe protocol at the application layer to obtain a first encapsulated message; In the process of accessing the first preset memory based on the first preset original partition, based on the third preset configuration information, a second storage space is determined from the first preset queue of the first preset memory, and the first encapsulated message is stored in the second storage space, the third preset configuration information is a virtual address of the first preset queue in the first preset memory, and the second storage space is any free storage space in the first preset queue; Recording a first virtual address and a first memory address of the first encapsulated message in the second storage space; Based on the User Datagram Protocol at the transport layer, encapsulate the first encapsulated message in the second storage space to obtain a second encapsulated message; Based on the Internet protocol at the network layer, the second encapsulated message is encapsulated in the second storage space to obtain the third encapsulated message.

3. The method according to claim 2, characterized in that: The obtaining of the first physical address of the first original message content comprises: The first virtual address is converted into the first physical address.

4. The method according to claim 2, characterized in that: The sending the message to be sent based on the first physical address and the first network card hardware includes: In the process of accessing the first preset memory based on the first network card hardware, obtaining the first memory address based on fourth preset configuration information and the first physical address, wherein the fourth preset configuration information is the physical address of the first preset queue in the first preset memory; Based on the first memory address and the first preset controller, taking out the third encapsulated message from the second storage space; The third encapsulated message is added to a preset scheduling sending queue to perform sending processing of the message to be sent.

5. The method according to claim 2, characterized in that: The method further comprises: Obtaining a first message length and a message priority of the third encapsulated message; The acquiring the first memory address based on the fourth preset configuration information and the first physical address includes: Based on the fourth preset configuration information, the first physical address and the first message length, obtaining the first memory address; The step of adding the third encapsulated message to a preset scheduling sending queue to perform sending processing of the message to be sent includes: Based on the message priority, the third encapsulated message is added to the preset scheduling sending queue to perform sending processing of the message to be sent.

6. A message communication processing method, characterized in that: include: When any message to be received is received, obtaining a second physical address of the message to be received; In the process of accessing the second preset memory based on the second network card hardware, based on the fifth preset configuration information, a third storage space is determined from the preset receiving queue of the second preset memory, and the second physical address is stored in the third storage space, the fifth preset configuration information is the physical address of the preset receiving queue in the second preset memory, and the third storage space is any free storage space in the preset receiving queue; In the process of accessing the second preset memory based on the second user state driver, when it is detected that any free storage space in the preset receiving queue is occupied, based on the sixth preset configuration information, the third storage space is taken out from the preset receiving queue, the third storage space is parsed, and the second physical address is obtained, and the sixth preset configuration information is the virtual address of the preset receiving queue in the second preset memory; Based on the second physical address and the second preset original partition, second original message content corresponding to the message to be received is obtained.

7. The method according to claim 6, characterized in that: The acquiring the second physical address of the message to be received comprises: In the process of accessing the second preset memory based on the second network card hardware, based on the seventh preset configuration information and the second preset controller, a fourth storage space is determined from the second preset queue of the second preset memory, and the to-be-received message is stored in the fourth storage space, the seventh preset configuration information is the physical address of the second preset queue in the second preset memory, and the fourth storage space is any free storage space in the second preset queue; Record the second physical address of the message to be received in the fourth storage space.

8. The method according to claim 7, characterized in that: The method further comprises: converting the second physical address into a second virtual address; Recording the second memory address of the message to be received in the fourth storage space; The acquiring, based on the second physical address and the second preset original partition, the second original message content corresponding to the to-be-received message includes: In the process of accessing the second preset memory based on the second preset original partition, acquiring the second memory address based on eighth preset configuration information and the second virtual address, wherein the eighth preset configuration information is a virtual address of the second preset queue in the second preset memory; Based on the second memory address, the message to be received is taken out from the fourth storage space, and the message to be received is decapsulated to obtain the second original message content.

9. The method according to claim 8, characterized in that: The method further comprises: Obtaining a second message length of the message to be received; The acquiring the second memory address based on the eighth preset configuration information and the second virtual address includes: Based on the eighth preset configuration information, the second virtual address and the second message length, the second memory address is obtained.

10. The method according to claim 8, characterized in that: The second original message content is a third unsealed message, and the unsealing process is performed on the message to be received to obtain the second original message content, including: Decapsulating the message to be received at the network layer to obtain a first decapsulated message; Decapsulating the first decapsulated message at the transport layer to obtain a second decapsulated message; The second desealing message is desealed at the application layer to obtain the third desealing message.

11. A message communication processing device, characterized in that: include: A first physical address acquisition module, configured to acquire a first physical address of a first original message content upon receiving the first original message content corresponding to any message to be sent; A first storage space determination module, used to determine a first storage space from a preset sending queue of the first preset memory based on first preset configuration information during access to the first preset memory based on the first user state driver, and store the first physical address in the first storage space, wherein the first preset configuration information is a virtual address of the preset sending queue in the first preset memory, and the first storage space is any free storage space in the preset sending queue; A first storage space parsing module is used for, in the process of accessing the first preset memory based on the first network card hardware, when it is detected that any free storage space in the preset sending queue is occupied, taking out the first storage space from the preset sending queue based on second preset configuration information, parsing the first storage space, and obtaining the first physical address, wherein the second preset configuration information is the physical address of the preset sending queue in the first preset memory; The message to be sent is sent by the module, which is used to send the message to be sent based on the first physical address and the first network card hardware.

12. A message communication processing device, characterized in that: include: A second physical address acquisition module, used for acquiring a second physical address of the message to be received when any message to be received is received; a third storage space determination module, configured to determine a third storage space from a preset receiving queue of the second preset memory based on fifth preset configuration information during access to the second preset memory based on the second network card hardware, and store the second physical address in the third storage space, wherein the fifth preset configuration information is a physical address of the preset receiving queue in the second preset memory, and the third storage space is any free storage space in the preset receiving queue; a third storage space parsing module, configured to, in a process of accessing the second preset memory based on the second user state driver, take out the third storage space from the preset receive queue based on sixth preset configuration information, parse the third storage space, and obtain the second physical address when detecting that any free storage space in the preset receive queue is occupied, wherein the sixth preset configuration information is a virtual address of the preset receive queue in the second preset memory; The second original message content acquisition module is used to acquire the second original message content corresponding to the message to be received based on the second physical address and the second preset original partition.

13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement a message communication processing method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • In-vehicle message processing method and device, vehicle-mounted terminal and storage medium

    CN114584582A

  • Message processing method and device, electronic equipment and computer readable storage medium

    CN116208574A

  • Concurrent communication method and device for many-core processor, equipment and medium

    CN116455849A

  • Queue page table management method and device based on remote direct memory access

    CN117873921A

  • Data transmission method, chip, and device

    WO2022007470A1