Data transmission method, system and device based on communication middleware

The hash algorithm searches for serialization rules and sets serialization configuration information, which solves the performance degradation caused by the large number of methods under topic in DDS, and realizes efficient data transmission and is compatible with serialization and non-serialization.

CN119071294APending Publication Date: 2024-12-03CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411278255.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In DDS, when there are many methods under topic, traversing the method list during data serialization and deserialization results in performance degradation, and it needs to be compatible with serialization and non-serialization, which affects data transmission efficiency.

Method used

The hash algorithm is used to find serialization rules, and the processing methods of serialization and deserialization are set separately. By serializing the configuration information, whether to perform serialization processing is determined, and the hash table is used to efficiently find serialization rules.

Benefits of technology

It improves the efficiency of serialization rules search, is compatible with serialization and non-serialization, and improves data transmission speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071294A_ABST
    Figure CN119071294A_ABST
Patent Text Reader

Abstract

The invention relates to a data transmission method, system and device based on communication middleware, the data transmission method, system and device are applied to a sending end, the sending end is in communication connection with a receiving end, and the method comprises the following steps: acquiring to-be-transmitted data uploaded by a sending end user and pre-acquired serialization configuration information, the serialization configuration information is used for indicating whether the to-be-transmitted data needs to be serialized, if the serialization configuration information indicates that the to-be-transmitted data needs to be serialized, searching a serialization rule corresponding to the to-be-transmitted data in a preset hash table according to the to-be-transmitted data, and carrying out serialization processing on the to-be-transmitted data according to the serialization rule, and sending the serialized data to be transmitted to a receiving end through a preset network protocol. Whether to-be-transmitted data is serialized or not is determined through the serialization configuration information, and serialization and deserialization are compatible. And in addition, the hash table is used for searching the serialization rule, so that the searching efficiency is improved, and the data transmission speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data transmission, and in particular to a data transmission method, system and device based on communication middleware. Background Art

[0002] DDS (Data Distribution Service) is a communication middleware widely used in scenarios with tight memory resources and high processor requirements. In order to improve data processing efficiency while ensuring communication quality, a solution is designed to include a method list under a topic. This solution reduces the number of topics and enriches the capabilities of each topic, thereby realizing rich DDS services under limited memory resources. Specifically, multiple data processing operations or services are defined under each topic, and each method corresponds to a different serialization and deserialization method. The design of this method list can reduce memory usage, so that diverse service needs can be met even with a small number of topics.

[0003] Although the above method can reduce memory usage, it also introduces performance issues. When there are many methods under a topic, the data needs to traverse the method list when serializing and deserializing until the corresponding method is found. This traversal operation significantly increases the processing time, resulting in performance degradation. In addition, a DDS participant may transmit data with multiple peers at the same time, and there may be both situations where serialization is required and situations where serialization is not required. This requires compatibility with these two situations while improving data transmission efficiency. Summary of the invention

[0004] The object of the present invention is to provide a data transmission method based on communication middleware, in which a hash algorithm is set to search for serialization rules during data transmission, and processing methods are set for serialization and non-serialization. The present invention improves the efficiency of searching for serialization rules and is compatible with both serialization and non-serialization.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] A first aspect of an embodiment of the present invention provides a data transmission method based on communication middleware, characterized in that the method is applied to a sending end, and a communication connection is established between the sending end and the receiving end. The method includes:

[0007] Acquire the data to be transmitted uploaded by the sending end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized;

[0008] If the serialization configuration information indicates that the data to be transmitted needs to be serialized, searching a preset hash table for a serialization rule corresponding to the data to be transmitted according to the data to be transmitted;

[0009] Serializing the data to be transmitted according to the serialization rule;

[0010] The serialized data to be transmitted is sent to the receiving end through a preset network protocol.

[0011] Optionally, the method further comprises:

[0012] If the serialization configuration information indicates that the data to be transmitted does not need to be serialized, the data to be transmitted is sent to the receiving end through the preset network protocol.

[0013] Optionally, the serialization configuration information is obtained in the following manner:

[0014] In response to the serialization configuration of the data to be transmitted by the user through the preset subject configuration interface, a first serialization signal is sent to the receiving end, wherein the subject is a data identifier associated with the data to be transmitted, and the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the subject;

[0015] Receiving a second serialization signal sent by the receiving end in response to the serialization configuration of the data to be transmitted by the user through a preset topic configuration interface, wherein the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the topic;

[0016] If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determining that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0017] If the first serialization signal indicates that the sending end needs to serialize when sending the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0018] Optionally, the communication middleware includes a plurality of participants, the participants include a plurality of the sending ends and a plurality of the receiving ends, the participants are in communication connection with other participants, and the serialization configuration information is also obtained in the following manner:

[0019] In response to the serialization configuration performed by the user on the current participant through the preset participant configuration interface, a third serialization signal is sent to other participants, wherein the third serialization signal is used to indicate whether serialization is required when several of the sending ends and several of the receiving ends in the current participant transmit the data to be transmitted;

[0020] Receiving a fourth serialization signal sent by the other participants in response to the serialization configuration of the current participant by the user through the preset participant configuration interface, wherein the fourth serialization signal is used to indicate whether some of the sending ends and some of the receiving ends among the other participants need to perform deserialization when transmitting the data to be transmitted;

[0021] If the third serialization signal indicates that some of the sending ends and some of the receiving ends in the current participant do not need to perform serialization when transmitting the data to be transmitted, and the fourth serialization signal indicates that some of the sending ends and some of the receiving ends in the other participants do not need to perform deserialization when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0022] If the third serialization signal indicates that several of the senders and several of the receivers among the current participants need to serialize when transmitting the data to be transmitted, and / or the fourth serialization signal indicates that several of the senders and several of the receivers among the other participants need to deserialize when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0023] Optionally, the preset hash table is generated as follows:

[0024] Pre-acquire a number of serialization rule names corresponding to the data to be transmitted;

[0025] Acquire in advance from the interface definition file of the communication middleware a plurality of storage locations of the serialization rules corresponding to the plurality of data to be transmitted;

[0026] Determine hash values ​​corresponding to the serialization rule names respectively;

[0027] Associating a hash value corresponding to the serialization rule name corresponding to the same data to be transmitted with a storage location of the serialization rule corresponding to the same data to be transmitted and saving them as a set of structured data;

[0028] A number of groups of structured data corresponding to the number of data to be transmitted are formed into a hash table.

[0029] Optionally, if the serialization configuration information indicates that the data to be transmitted needs to be serialized, searching a preset hash table according to the data to be transmitted for a serialization rule corresponding to the data to be transmitted, includes:

[0030] If the serialization configuration information indicates that the data to be transmitted needs to be serialized, obtaining the serialization rule name corresponding to the data to be transmitted according to the data to be transmitted;

[0031] Determine a hash value corresponding to the serialization rule name;

[0032] Searching the serialization rule storage location in the hash table by using the remainder method;

[0033] According to the serialization rule storage location, the serialization rule corresponding to the data to be transmitted is determined in the interface definition file.

[0034] Optionally, the communication middleware includes several participants, and the communication middleware deploys services corresponding to the participants through a tool chain, and the tool chain includes a hash table generation tool, wherein the hash table generation tool is used to execute the preset hash table generation method.

[0035] A second aspect of an embodiment of the present invention provides a data transmission method based on communication middleware, characterized in that the method is applied to a receiving end, and a communication connection is established between the receiving end and the sending end. The method includes:

[0036] Receiving the serialized data to be transmitted sent by the sending end through a preset network protocol;

[0037] Acquire pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized;

[0038] If the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, searching a preset hash table for a deserialization rule corresponding to the data to be transmitted according to the data to be transmitted;

[0039] Deserialize the data to be transmitted according to the deserialization rule;

[0040] The deserialized data to be transmitted is presented to the receiving end user.

[0041] Optionally, the method further comprises:

[0042] If the deserialization configuration information indicates that the data to be transmitted does not need to be deserialized, the data to be transmitted is presented to the receiving end user.

[0043] Optionally, the deserialization configuration information is obtained in the following manner:

[0044] In response to the serialization configuration of the data to be transmitted by the user through the preset subject configuration interface, a second serialization signal is sent to the sending end, wherein the subject is a data identifier associated with the data to be transmitted, and the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the subject;

[0045] Receiving a first serialization signal sent by the sending end in response to a user's serialization configuration of the data to be transmitted through a preset topic configuration interface, wherein the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the topic;

[0046] If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determining that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0047] If the first serialization signal indicates that the sending end needs to serialize when sending the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0048] Optionally, the receiving the serialized data to be transmitted sent by the sending end through a preset network protocol includes:

[0049] The serialized data to be transmitted sent by the sending end through a preset network protocol is directly stored in the communication middleware protocol stack.

[0050] A third aspect of an embodiment of the present invention provides a data transmission system based on communication middleware, characterized in that the communication middleware includes a sending end and a receiving end;

[0051] The transmitting end is used to obtain the data to be transmitted uploaded by the transmitting end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized;

[0052] If the serialization configuration information indicates that the data to be transmitted needs to be serialized, the sending end is used to search a preset hash table for a serialization rule corresponding to the data to be transmitted according to the data to be transmitted;

[0053] The sending end is used to perform serialization processing on the data to be transmitted according to the serialization rule;

[0054] The sending end is used to send the serialized data to be transmitted to the receiving end through a preset network protocol;

[0055] The receiving end is used to receive the serialized data to be transmitted sent by the sending end through a preset network protocol;

[0056] The receiving end is used to obtain pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized;

[0057] If the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, the receiving end is used to search for a deserialization rule corresponding to the data to be transmitted in a preset hash table according to the data to be transmitted;

[0058] The receiving end is used to perform deserialization processing on the data to be transmitted according to the deserialization rule;

[0059] The receiving end is used to present the to-be-transmitted data after deserialization processing to the receiving end user.

[0060] A fourth aspect of an embodiment of the present invention provides a data transmission device based on communication middleware, characterized in that it is applied to a sending end, and there is a communication connection between the sending end and the receiving end, and the device includes:

[0061] The sending end data acquisition module is used to acquire the data to be transmitted uploaded by the sending end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized;

[0062] A serialization rule search module, configured to search a preset hash table for a serialization rule corresponding to the data to be transmitted if the serialization configuration information indicates that the data to be transmitted needs to be serialized;

[0063] A serialization processing module, used for performing serialization processing on the data to be transmitted according to the serialization rule;

[0064] The serialized data sending module is used to send the to-be-transmitted data after serialization processing to the receiving end through a preset network protocol.

[0065] A fifth aspect of an embodiment of the present invention provides a data transmission device based on communication middleware, characterized in that it is applied to a receiving end, and there is a communication connection between the receiving end and the sending end, and the device includes:

[0066] A data receiving module, used to receive the serialized data to be transmitted sent by the sending end through a preset network protocol;

[0067] A receiving end data acquisition module, used to acquire pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized;

[0068] A deserialization rule search module, configured to search a preset hash table for a deserialization rule corresponding to the data to be transmitted if the deserialization configuration information indicates that the data to be transmitted needs to be deserialized;

[0069] A deserialization processing module, used for performing deserialization processing on the data to be transmitted according to the deserialization rule;

[0070] The deserialized data presentation module is used to present the data to be transmitted after deserialization processing to the receiving end user.

[0071] A sixth aspect of an embodiment of the present invention provides an electronic device, characterized by comprising:

[0072] at least one processor;

[0073] a memory communicatively coupled to the at least one processor;

[0074] The memory has a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the method described in the embodiment of the present invention.

[0075] A seventh aspect of an embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program implements the method described in the embodiment of the present invention when executed by a processor.

[0076] Beneficial effects of the present invention:

[0077] The embodiment of the present invention obtains the data to be transmitted uploaded by the sending end user and the serialization configuration information obtained in advance, wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized. If the serialization configuration information indicates that the data to be transmitted needs to be serialized, the serialization rule corresponding to the data to be transmitted is searched in a preset hash table according to the data to be transmitted, the data to be transmitted is serialized according to the serialization rule, and the serialized data to be transmitted is sent to the receiving end through a preset network protocol. By setting the serialization configuration information, the present invention can flexibly determine whether to serialize the data to be transmitted, so that data can be efficiently transmitted whether serialization is required or not. In addition, the present invention uses a hash table to search for serialization rules, which reduces traversal operations, improves search efficiency, and thus improves the overall data transmission speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A flowchart of a data transmission method based on communication middleware provided in an embodiment of the present invention;

[0079] Figure 2 A flowchart of whether to perform serialization processing on a subject level provided in an embodiment of the present invention;

[0080] Figure 3 A schematic diagram of a flow chart of whether to perform serialization processing at the participant level provided in an embodiment of the present invention;

[0081] Figure 4 A flowchart of a method for using a hash table provided in an embodiment of the present invention;

[0082] Figure 5 A functional schematic diagram of a hash algorithm generation tool provided in an embodiment of the present invention;

[0083] Figure 6 A flowchart of another data transmission method based on communication middleware provided in an embodiment of the present invention;

[0084] Figure 7 A schematic diagram of a working process of a data transmission system based on communication middleware provided in an embodiment of the present invention;

[0085] Figure 8 A schematic diagram of the structure of a data transmission device based on communication middleware provided in an embodiment of the present invention;

[0086] Fig. 9 The present invention is a schematic diagram of the structure of a data transmission device based on communication middleware provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0087] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0088] Reference Figure 1 , shows a step flow chart of a data transmission method based on communication middleware provided in an embodiment of the present invention, which is applied to a sending end, and there is a communication connection between the sending end and the receiving end.

[0089] It should be noted that the communication middleware may be DDS (Data Distribution Service), which is a communication middleware for real-time systems and is widely used in distributed systems that require high reliability and low latency. DDS provides a publish-subscribe communication model that enables data to be efficiently and reliably transmitted in a distributed system. In an embodiment of the present invention, the data transmission process may be implemented based on the communication middleware.

[0090] The sender (Publisher) can be the initiator and publisher of data, responsible for sending data to interested receivers (Subscribers). The sender can publish data to the DDS network. These data can be sensor data, control commands, status information, etc. In an embodiment of the present invention, the sender can be a component for sending data to be transmitted.

[0091] The receiver (Subscriber) is the receiver and consumer of data, responsible for receiving and processing the data of interest from the DDS network. The receiver receives data by subscribing to the topic of interest. The subscription can be global or based on specific conditions or filters. In an embodiment of the present invention, the receiver can be a component for receiving data to be transmitted.

[0092] In the DDS communication system, the communication connection between the sender (Publisher) and the receiver (Subscriber) is the key link to achieve data transmission. This connection is based on the publish-subscribe model, ensuring that data can be efficiently and reliably transmitted between the sender and the receiver. Among them, DDS supports a many-to-many communication mode, where a sender can send data to multiple receivers at the same time, and a receiver can also receive data from multiple senders at the same time. In an embodiment of the present invention, the communication connection between the sender and the receiver is realized based on the publish-subscribe model.

[0093] The method may specifically include the following steps:

[0094] Step 101, obtaining the data to be transmitted uploaded by the sending end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized.

[0095] It should be noted that the serialization configuration information may be a key parameter for indicating whether the data to be transmitted needs to be serialized. The existence of the serialization configuration information enables the system to flexibly decide whether to serialize the data to be transmitted, so that it can efficiently process the data when serialization is required or not. In an embodiment of the present invention, during the data transmission process, it can be determined whether the data to be transmitted needs to be serialized by the serialization configuration information.

[0096] In an embodiment of the present invention, the sender can obtain the data to be transmitted uploaded by the sender user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized. The data to be transmitted can be data uploaded by the user that needs to be sent or published.

[0097] Step 102: If the serialization configuration information indicates that the data to be transmitted needs to be serialized, a serialization rule corresponding to the data to be transmitted is searched in a preset hash table according to the data to be transmitted.

[0098] It should be noted that the serialization rules can be used to define key parameters for how to convert data into a format that can be transmitted in a network. The serialization rules ensure that data can be correctly transmitted and parsed between the sender and the receiver. In an embodiment of the present invention, the serialization rules are used to perform serialization processing on the data to be transmitted.

[0099] In an embodiment of the present invention, a hash table may be a pre-configured data structure that can be used to efficiently store and search for serialization rules. By using a hash table, a key is mapped to a specific position in the hash table through a hash function, and a search operation can be completed in a constant time, thereby significantly improving data processing efficiency.

[0100] In the embodiment of the present invention, if the serialization configuration information indicates that the data to be transmitted needs to be serialized, the serialization rule corresponding to the data to be transmitted can be searched in a preset hash table according to the data to be transmitted.

[0101] The serialization rules can be obtained based on the idle file. The idle file (Interface Definition Language) can be a file format for defining data structures and interfaces. The idle file provides a basis for the serialization rules, which can ensure that data can be correctly transmitted and parsed between the sender and the receiver.

[0102] Step 103: serialize the data to be transmitted according to the serialization rule.

[0103] It should be noted that in the DDS communication system, serialization processing can convert the data to be transmitted into a format that can be transmitted in the network. Serialization processing can ensure that the data can be correctly transmitted and parsed between the sender and the receiver.

[0104] In the embodiment of the present invention, the data to be transmitted may be serialized according to the serialization rule.

[0105] Step 104: Send the serialized data to be transmitted to the receiving end via a preset network protocol.

[0106] It should be noted that the preset network protocol may be TCP (Transmission Control Protocol) or UDP (User Datagram Protocol).

[0107] TCP is a connection-oriented transmission protocol. A connection can be established through a three-way handshake to ensure that data is not lost or damaged during transmission. TCP can provide mechanisms such as data retransmission, flow control, and congestion control to ensure data integrity and reliability.

[0108] UDP is a connectionless transmission protocol that can send data without establishing a connection. It is suitable for scenarios with high real-time requirements, such as video streaming, audio streaming, and online games.

[0109] In the embodiment of the present invention, the serialized data to be transmitted may be sent to the receiving end via a preset network protocol.

[0110] The embodiment of the present invention obtains the data to be transmitted uploaded by the sending end user and the serialization configuration information obtained in advance, wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized. If the serialization configuration information indicates that the data to be transmitted needs to be serialized, the serialization rule corresponding to the data to be transmitted is searched in a preset hash table according to the data to be transmitted, the data to be transmitted is serialized according to the serialization rule, and the serialized data to be transmitted is sent to the receiving end through a preset network protocol. By setting the serialization configuration information, the present invention can flexibly determine whether to serialize the data to be transmitted, so that data can be efficiently transmitted whether serialization is required or not. In addition, the present invention uses a hash table to search for serialization rules, which reduces traversal operations, improves search efficiency, and thus improves the overall data transmission speed.

[0111] In an optional embodiment of the present invention, the method further includes:

[0112] S11: If the serialization configuration information indicates that the data to be transmitted does not need to be serialized, the data to be transmitted is sent to the receiving end through the preset network protocol.

[0113] In the embodiment of the present invention, if the serialization configuration information indicates that the data to be transmitted does not need to be serialized, the data to be transmitted can be directly sent to the receiving end through a preset network protocol. At this time, the data to be transmitted is original data that has not been serialized.

[0114] In an optional embodiment of the present invention, the serialization configuration information is obtained in the following manner:

[0115] S21: In response to the user configuring serialization of the data to be transmitted through a preset topic configuration interface, sending a first serialization signal to the receiving end, wherein the topic is a data identifier associated with the data to be transmitted, and the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the topic;

[0116] S22: receiving a second serialization signal sent by the receiving end in response to the serialization configuration of the data to be transmitted by the user through the preset topic configuration interface, wherein the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the topic;

[0117] S23: If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determine that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0118] S24: If the first serialization signal indicates that the sending end needs to serialize the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize the data to be transmitted associated with the topic, determine that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0119] It should be noted that the preset topic configuration interface is a key mechanism for defining and managing topics. A topic is the basic unit of data publishing and subscription. The preset topic configuration interface ensures that the system can manage topics efficiently and flexibly to meet different communication requirements. In an embodiment of the present invention, the preset topic configuration interface may be a preset interface for configuring whether a topic is serialized. The preset topic configuration interface may be provided by the DDS protocol stack.

[0120] A topic can be a data identifier that uniquely identifies the data to be transmitted. A topic usually consists of a name, a data type, and quality attributes. The name can be a unique identifier for the topic, the data type can define the data structure transmitted in the topic, and the quality attributes can define the reliability, latency, and bandwidth of data transmission.

[0121] In an embodiment of the present invention, in response to the user configuring serialization of data to be transmitted through a preset subject configuration interface, a first serialization signal can be sent to a receiving end, wherein the subject is a data identifier associated with the data to be transmitted, and the first serialization signal is used to indicate whether serialization is required when the transmitting end sends the data to be transmitted associated with the subject. In a specific implementation, the first serialization signal can be presented in the form of data(w), and the specific form of the first serialization signal can be set according to actual conditions, and the present invention does not limit the specific form of the first serialization signal.

[0122] Then, the receiving end sends a second serialization signal in response to the serialization configuration of the data to be transmitted by the user through the preset topic configuration interface, wherein the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the topic.

[0123] If the first serialization signal indicates that the sending end does not need to serialize when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized.

[0124] If the first serialization signal indicates that the sending end needs to serialize the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0125] In the specific implementation, the DDS protocol stack can provide an interface for users to call when creating a topic to choose whether to perform serialization operations on the current topic, and pass this information to the other end through data(w) / data(r) in the SEDP stage. Only when both receiving and sending are not serialized, will the serialization operation be chosen not to be performed. Otherwise, the data will still be sent and received according to the serialization operation.

[0126] It should be noted that the DDS protocol stack is a key component of the DDS system for achieving efficient and reliable data transmission. The DDS protocol stack can include multiple layers and protocols. The following are the main layers and protocols of the DDS protocol stack:

[0127] Main layers: The application layer is the top layer of the DDS protocol stack and is responsible for data generation and consumption. The application layer interacts with the DDS network through a publish-subscribe model, publishing data to specific topics or subscribing to topics of interest.

[0128] The data distribution layer is responsible for the transmission and distribution of data. It includes multiple protocols and mechanisms to ensure that data can be transmitted efficiently and reliably in a distributed system.

[0129] The transport layer is responsible for the physical transmission of data. It includes network protocols such as TCP / IP and UDP to ensure that data can be transmitted efficiently and reliably in the network.

[0130] Main protocol: SEDP (Simple Endpoint Discovery Protocol), SEDP can be used to discover publishers and subscribers in the network. Through SEDP, publishers and subscribers can discover each other and establish communication connections. SEDP is also used to exchange configuration information, including serialization settings information, to ensure that publishers and subscribers can process data correctly.

[0131] PDP (Participant Discovery Protocol) can be used to discover participants in the network. Participants can be publishers, subscribers, or other DDS entities. PDP ensures that all participants can discover each other and establish communication connections.

[0132] RTPS (Real-Time Publish-Subscribe) is the core protocol of DDS and is responsible for data transmission and distribution. RTPS uses a publish-subscribe model to ensure that data can be transmitted efficiently and reliably in a distributed system. RTPS provides a variety of reliability mechanisms, such as data retransmission and data verification, to ensure data integrity and reliability.

[0133] QoS (Quality of Service) can be used to define the quality attributes of data transmission, such as reliability, latency, bandwidth, etc. QoS ensures that data transmission can meet the requirements of different application scenarios.

[0134] The SEDP phase can be used to discover publishers and subscribers in the network. Through SEDP, publishers and subscribers can discover each other and establish communication connections. Among them, data(w) / data(r) can be a data structure or message carrying serialized setting information.

[0135] Reference Figure 2 , which shows a flow chart of whether to perform serialization processing on a subject level according to an embodiment of the present invention. In a specific implementation, Figure 2 The process of executing the subject level serialization process.

[0136] The user calls the subject interface to select whether to perform a serialization operation, and the DDS protocol stack transmits the serialization information to the peer end in the SEDP stage. Transmitting the serialization information to the peer end in the SEDP stage can be the process in the present invention where the sender and the receiver determine the serialization configuration information through a serialization signal.

[0137] If the SEDP check fails, the data cannot be transmitted normally and the process ends.

[0138] If the SEDP check passes, the data sending end will serialize the data to be transmitted if it performs serialization. If the data sending end does not perform serialization, the serialization process will be skipped.

[0139] If the SEDP verification passes, the data receiving end will deserialize the data to be transmitted if it performs deserialization. If the data receiving end does not perform deserialization, the data will be directly copied to the user.

[0140] In the DDS communication system, the embodiment of the present invention performs serialization configuration on the topic level through a preset topic configuration interface, and sends and receives serialization signals in advance to obtain serialization configuration information, thereby ensuring that the sender can correctly perform serialization when processing the data to be transmitted, so that the DDS communication system can operate efficiently in various complex communication scenarios.

[0141] In an optional embodiment of the present invention, the communication middleware includes a plurality of participants, the participants include a plurality of the sending ends and a plurality of the receiving ends, the participants have a communication connection with other participants, and the serialization configuration information is also obtained in the following manner:

[0142] S31: In response to the serialization configuration performed by the user on the current participant through the preset participant configuration interface, a third serialization signal is sent to other participants, wherein the third serialization signal is used to indicate whether serialization is required when several of the sending ends and several of the receiving ends in the current participant transmit the data to be transmitted;

[0143] S32: receiving a fourth serialization signal sent by the other participants in response to the serialization configuration of the current participant by the user through the preset participant configuration interface, wherein the fourth serialization signal is used to indicate whether some of the sending ends and some of the receiving ends among the other participants need to perform deserialization when transmitting the data to be transmitted;

[0144] S33: If the third serialization signal indicates that some of the sending ends and some of the receiving ends in the current participant do not need to perform serialization when transmitting the data to be transmitted, and the fourth serialization signal indicates that some of the sending ends and some of the receiving ends in the other participants do not need to perform deserialization when transmitting the data to be transmitted, determine that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0145] S34: If the third serialization signal indicates that several of the senders and several of the receivers among the current participants need to serialize when transmitting the data to be transmitted, and / or the fourth serialization signal indicates that several of the senders and several of the receivers among the other participants need to deserialize when transmitting the data to be transmitted, determine that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0146] It should be noted that a participant can be a basic unit of data publishing and subscription. A participant can be a publisher, a subscriber, or other DDS entities. In an embodiment of the present invention, a preset participant configuration interface can be used to set whether to serialize the data when the current participant transmits it.

[0147] The preset participant configuration interface may be a key mechanism for defining and managing participants. Participants may be publishers, subscribers, or other DDS entities. The preset participant configuration interface ensures that the system can efficiently and flexibly manage participants to meet different communication needs. In an embodiment of the present invention, the preset participant configuration interface may be a preset interface for configuring whether a participant performs serialization when transmitting data. The preset participant configuration interface may be provided by the DDS protocol stack.

[0148] In an embodiment of the present invention, in response to the serialization configuration of the current participant by the user through the preset participant configuration interface, a third serialization signal can be sent to other participants, wherein the third serialization signal is used to indicate whether serialization is required when several sending ends and several receiving ends of the current participant transmit the data to be transmitted. In a specific implementation, the third serialization signal can be presented in the form of data(p) sent by the current participant, and the specific form of the third serialization signal can be set according to actual conditions, and the present invention does not limit the specific form of the third serialization signal.

[0149] Then, a fourth serialization signal is received from other participants in response to the serialization configuration of the current participant by the user through the preset participant configuration interface, wherein the fourth serialization signal is used to indicate whether deserialization is required when several sending ends and several receiving ends of other participants transmit the data to be transmitted. In a specific implementation, the fourth serialization signal can be presented in the form of data(p) sent by the opposite participant or other participants. The specific form of the fourth serialization signal can be set according to the actual situation, and the present invention does not limit the specific form of the fourth serialization signal.

[0150] If the third serialization signal indicates that several senders and several receivers among the current participants do not need to serialize when transmitting the data to be transmitted, and the fourth serialization signal indicates that several senders and several receivers among other participants do not need to deserialize when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized.

[0151] If the third serialization signal indicates that several senders and several receivers among the current participants need to serialize when transmitting the data to be transmitted, and / or the fourth serialization signal indicates that several senders and several receivers among other participants need to deserialize when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0152] In the specific implementation, the DDS protocol stack provides an interface for the user to specify whether the current participant performs serialization operations before initialization. The DDS protocol stack chooses to pass the serialization information through data(p) during initialization based on the user's settings. When the data(p) of the other participant is received, it is compared with the data(p) of the local participant. If both are not serialized, then the data is sent and received without serialization. Otherwise, the data is sent and received according to the serialization operation. Among them, data(p) can be a data structure or message that carries serialization setting information.

[0153] Reference Figure 3 , which shows a flow chart of whether to perform serialization processing on a participant level according to an embodiment of the present invention. In a specific implementation, Figure 3 The process execution determines whether the participant level is serialized.

[0154] The user calls the participant interface to choose whether to perform a serialization operation, and the DDS protocol stack transmits the serialization information to the peer end in the SEDP stage. Transmitting the serialization information to the peer end in the SEDP stage can be the process of determining the serialization configuration information through the serialization signal by the current participant and other participants in the present invention.

[0155] If the SEDP check fails, the data cannot be transmitted normally and the process ends.

[0156] If the SEDP verification passes, it is determined whether both parties in communication do not perform serialization / deserialization operations. If both parties in communication do not perform serialization / deserialization operations, the serialization / deserialization process is skipped when sending / receiving data, and subsequent data processing continues.

[0157] If both parties in communication do not perform serialization / deserialization operations, serialization / deserialization processing is performed when sending / receiving data, and then subsequent data processing is continued.

[0158] In the DDS communication system, the embodiment of the present invention performs serialization configuration on the Participant level by presetting the participant configuration interface, and pre-sends and receives serialization signals to obtain serialization configuration information, thereby ensuring that the participant level can correctly serialize and deserialize when processing the data to be transmitted, so that the DDS communication system can operate efficiently in various complex communication scenarios.

[0159] In an optional embodiment of the present invention, the preset hash table is generated as follows:

[0160] S41: pre-acquire a number of serialization rule names corresponding to a number of the data to be transmitted;

[0161] S42: obtaining in advance from the interface definition file of the communication middleware a plurality of serialization rule storage locations corresponding to a plurality of the data to be transmitted;

[0162] S43: Determine the hash values ​​corresponding to the serialization rule names respectively;

[0163] S44: associating a hash value corresponding to the serialization rule name corresponding to the same data to be transmitted with a storage location of the serialization rule corresponding to the same data to be transmitted and saving them as a set of structured data;

[0164] S45: Composing a hash table with a plurality of groups of structured data corresponding to the plurality of data to be transmitted.

[0165] It should be noted that the serialization rule name can be a key parameter for identifying and referencing a specific serialization rule. The serialization rule name ensures that the system can correctly apply the corresponding serialization rule, so that data can be correctly transmitted and parsed between the sender and the receiver. In an embodiment of the present invention, the serialization rule name can be the name of the method corresponding to the data to be transmitted.

[0166] The interface definition file can be an idle file, which can define data types, including basic data types (such as integers, floating-point numbers, Boolean values, etc.) and complex data types (such as structures, arrays, enumerations, etc.). The data type defines the structure and format of the data and provides a basis for serialization rules. Serialization rules can also be defined, including serialization algorithms, data formats, field orders, etc. Interfaces can also be defined, including methods, parameters, return values, etc. In an embodiment of the present invention, the interface definition file can include serialization rules stored in different locations.

[0167] The serialization rule storage location may refer to a storage location of the serialization rule in an interface definition file.

[0168] The hash values ​​corresponding to the serialization rule names may be hash values ​​of the methods corresponding to the data to be transmitted.

[0169] A hash table can be a data structure used to efficiently store and find serialization rules. The key-value pair in a hash table is the basic component of the hash table, and each key-value pair consists of a key and a value.

[0170] A set of structured data can be a key-value pair in a hash table, which contains a key value and a value that correspond to each other. The key value is the hash value of the method, and the value value is the storage location of the serialization rule corresponding to the method in the interface definition file.

[0171] In the embodiment of the present invention, several serialization rule names respectively corresponding to several data to be transmitted can be obtained in advance, and several serialization rule storage locations respectively corresponding to several data to be transmitted can be obtained in advance from the interface definition file of the communication middleware.

[0172] Then, determine the hash values ​​corresponding to several serialization rule names respectively, associate the hash values ​​corresponding to the serialization rule names corresponding to the same data to be transmitted with the serialization rule storage locations corresponding to the same data to be transmitted and save them as a set of structured data, and form a hash table with several groups of structured data corresponding to several data to be transmitted.

[0173] In the specific implementation, the hash table can be constructed in the following way: the hash algorithm has a key value and a value value. The key value in this hash table corresponds to the hash of the method, and the value value is the position of the data type defined by this method in the idle file. Therefore, the design of the hash table is a large array, and the members in the array are a structure. The first parameter in the structure is the method hash value, and the second parameter is the position of the hash value.

[0174] In an optional embodiment of the present invention, step 102 further includes the following sub-steps:

[0175] S51: If the serialization configuration information indicates that the data to be transmitted needs to be serialized, obtaining the serialization rule name corresponding to the data to be transmitted according to the data to be transmitted;

[0176] S52: Determine the hash value corresponding to the serialization rule name;

[0177] S53: searching the serialization rule storage location in the hash table by using a remainder method;

[0178] S54: Determine the serialization rule corresponding to the data to be transmitted in the interface definition file according to the serialization rule storage location.

[0179] It should be noted that, in a hash table, a modulo operation can be a hash function used to map a key to a specific position in a hash table. The modulo operation determines the storage position of the key in the hash table by calculating the modulo of the hash value of the key and the size of the hash table. In an embodiment of the present invention, the serialization rule can be found by the modulo operation.

[0180] In the embodiment of the present invention, if the serialization configuration information indicates that the data to be transmitted needs to be serialized, the serialization rule name corresponding to the data to be transmitted can be obtained according to the data to be transmitted, and the hash value corresponding to the serialization rule name can be determined.

[0181] Then, the serialization rule storage location is searched in the hash table by the remainder method, and then the serialization rule corresponding to the data to be transmitted is determined in the interface definition file according to the serialization rule storage location.

[0182] In the specific implementation, finding the position of the key value in the hash table is the key to the efficiency of this algorithm. The search method used can be the remainder method, and the calculation formula is as follows:

[0183] index = key%(x*hashCount)

[0184] Among them, x represents the hash table coefficient. The larger this coefficient is, the faster the hash algorithm is, but the larger the hash table is, so it is not necessarily the case that the larger the better. hashCount represents the number of methods contained in this service. It is not difficult to see from the above formula that different key values ​​may get the same index, where index is the subscript of the hash table array. When the subscript position is occupied by other methods, you can find the nearest free position to save the hash value and the hash value position. When querying the hash table, you can use this formula to first calculate the position of the hash table where the method is located, and then compare the key value with the hash. When a conflict occurs, traverse downward until the position of its hash value is found and returned.

[0185] In an optional embodiment of the present invention, the communication middleware includes several participants, and the communication middleware deploys services corresponding to the participants through a tool chain, and the tool chain includes a hash table generation tool, wherein the hash table generation tool is used to execute the preset hash table generation method.

[0186] It should be noted that a toolchain can be a set of tools for compiling, linking, debugging and deploying software. A toolchain usually includes tools such as a compiler, a linker, a debugger, and a build system to ensure that software can be developed and deployed efficiently and reliably. In an embodiment of the present invention, the services corresponding to the participants can be deployed in the DDS system through the toolchain.

[0187] The hash table generation tool may be a tool for executing the above-mentioned hash table generation method, and may be integrated into a tool chain.

[0188] In an embodiment of the present invention, the communication middleware includes several participants, and the communication middleware can deploy services corresponding to the participants through a tool chain, and the tool chain includes a hash table generation tool, wherein the hash table generation tool is used to execute a preset hash table generation method. Among them, the tool chain includes a hash table generation tool, which means that the hash table generation tool is integrated on the tool chain.

[0189] In the specific implementation, since the services in the DDS system need to be deployed to each domain from the tool chain first, and then each domain downloads the code, its idle files are all obtained from the tool chain. The hash table is generated by the idle file, so the tool chain needs to be integrated to generate this hash table. However, from the perspective of the DDS system, if the deployment of subsequent services does not need to rely on the tool chain, the hash table set on the tool chain cannot be provided to each service. Therefore, the function of generating the hash table is made into a tool, and the tool chain integrates this tool. When the user downloads the code from the tool chain, the hash table generated by the tool can be provided synchronously.

[0190] Reference Figure 4 , which shows a flow chart of a method for using a hash table provided by an embodiment of the present invention. In a specific implementation, Figure 4 The process performs a hash table usage.

[0191] First, create a hash table generation tool and integrate it into the tool chain. The user specifies the service that needs to generate the hash table and the location where the hash table is generated in the configuration file.

[0192] The user deploys the service from the tool chain. For the deployed service, the user obtains the hash table generated by the hash table generation tool. The DDS protocol stack selects the corresponding method to serialize and deserialize the data based on whether the hash table exists.

[0193] Reference Figure 5 , which shows a functional schematic diagram of a hash algorithm generation tool provided by an embodiment of the present invention. In a specific implementation, the hash algorithm generation tool can be configured according to Figure 5 Get the hash algorithm generation tool function.

[0194] The hash table generation tool has the following features:

[0195] Services are configurable and selectable. The hash table generation tool provides configurable service options, and users can choose different service configurations according to their needs.

[0196] Adaptable to different operating systems. The hash table generation tool supports multiple operating systems, such as Windows, Linux, macOS, etc. The tool can run on different operating systems to ensure cross-platform compatibility and consistency.

[0197] The size of the hash table is configurable. The larger the hash table, the higher the efficiency. The hash table generation tool allows users to configure the size of the hash table. The size of the hash table directly affects the search efficiency. The larger the hash table, the lower the conflict rate and the higher the search efficiency. Users can adjust the size of the hash table according to actual needs.

[0198] The storage location and name of the hash table can be configured according to the rules. The hash table generation tool allows users to configure the storage location and name of the hash table. Users can specify the storage path and file name of the hash table according to the rules, which is convenient for management and maintenance.

[0199] The embodiment of the present invention obtains the data to be transmitted uploaded by the sending end user and the serialization configuration information obtained in advance, wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized. If the serialization configuration information indicates that the data to be transmitted needs to be serialized, the serialization rule corresponding to the data to be transmitted is searched in a preset hash table according to the data to be transmitted, the data to be transmitted is serialized according to the serialization rule, and the serialized data to be transmitted is sent to the receiving end through a preset network protocol. By setting the serialization configuration information, the present invention can flexibly determine whether to serialize the data to be transmitted, so that data can be efficiently transmitted whether serialization is required or not. In addition, the present invention uses a hash table to search for serialization rules, which reduces traversal operations, improves search efficiency, and thus improves the overall data transmission speed.

[0200] Reference Figure 6 , showing a step flow chart of another data transmission method based on communication middleware provided by an embodiment of the present invention, which is applied to a receiving end, and there is a communication connection between the receiving end and the sending end.

[0201] The method may specifically include the following steps:

[0202] Step 201: receiving the serialized data to be transmitted sent by the sending end through a preset network protocol.

[0203] In the embodiment of the present invention, the serialized data to be transmitted sent by the sending end through the preset network protocol can be received.

[0204] Step 202: Obtain pre-obtained deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized.

[0205] It should be noted that the deserialization configuration information may be a key parameter for indicating whether the data to be transmitted needs to be deserialized. The existence of the deserialization configuration information enables the system to flexibly decide whether to deserialize the data to be transmitted, so that it can efficiently process the data when deserialization is required or not. In an embodiment of the present invention, during the data transmission process, it can be determined whether the data to be transmitted needs to be deserialized by the deserialization configuration information.

[0206] In the embodiment of the present invention, the receiving end may obtain pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized. In this case, the data to be transmitted may be data that needs to be received.

[0207] Step 203: If the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, a deserialization rule corresponding to the data to be transmitted is searched in a preset hash table according to the data to be transmitted.

[0208] It should be noted that the deserialization rules can be used to define how to convert data in a format transmitted in the network into receivable data. The deserialization rules ensure that the data can be correctly transmitted and parsed between the sender and the receiver. In an embodiment of the present invention, the deserialization rules are used to perform deserialization processing on the data to be transmitted.

[0209] In an embodiment of the present invention, if the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, the deserialization rules corresponding to the data to be transmitted can be searched in a preset hash table according to the data to be transmitted. The deserialization rules can be obtained based on the idle file.

[0210] Step 204: Deserialize the data to be transmitted according to the deserialization rule.

[0211] It should be noted that in the DDS communication system, the deserialization process can convert the data to be transmitted in the format transmitted in the network into a format that can be processed by the receiving end. The deserialization process can ensure that the data can be correctly transmitted and parsed between the sending end and the receiving end.

[0212] In the embodiment of the present invention, the data to be transmitted may be deserialized according to the deserialization rules.

[0213] Step 205: present the deserialized data to be transmitted to the receiving end user.

[0214] In the embodiment of the present invention, the data to be transmitted after deserialization processing can be presented to the receiving end user. The data in the original format can be presented to the user to realize data transmission.

[0215] The embodiment of the present invention obtains the pre-acquired deserialization configuration information by receiving the serialized data to be transmitted sent by the sending end through the preset network protocol; the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized. If the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, the deserialization rules corresponding to the data to be transmitted are searched in a preset hash table according to the data to be transmitted, and the data to be transmitted is deserialized according to the deserialization rules, and the data to be transmitted after the deserialization is presented to the receiving end user. By setting the deserialization configuration information, the present invention can flexibly determine whether to deserialize the data to be transmitted, so that data can be efficiently transmitted whether deserialization is required or not. In addition, the present invention uses a hash table to search for deserialization rules, which reduces traversal operations, improves search efficiency, and thus improves the overall data transmission speed.

[0216] In an optional embodiment of the present invention, the method further includes:

[0217] S61: If the deserialization configuration information indicates that the data to be transmitted does not need to be deserialized, presenting the data to be transmitted to the receiving end user.

[0218] In the embodiment of the present invention, if the deserialization configuration information indicates that the data to be transmitted does not need to be deserialized, the data to be transmitted can be directly presented to the receiving end user. At this time, the data to be transmitted is the original data that has not been deserialized.

[0219] In an optional embodiment of the present invention, the deserialization configuration information is obtained in the following manner:

[0220] S71: In response to the serialization configuration of the data to be transmitted by the user through the preset subject configuration interface, a second serialization signal is sent to the sending end, wherein the subject is a data identifier associated with the data to be transmitted, and the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the subject;

[0221] S72: Receive a first serialization signal sent by the sending end in response to a user's serialization configuration of the data to be transmitted through a preset topic configuration interface, wherein the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the topic;

[0222] S73: If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determine that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0223] S74: If the first serialization signal indicates that the sending end needs to serialize the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize the data to be transmitted associated with the topic, determine that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0224] In an embodiment of the present invention, in response to the user's serialization configuration of the data to be transmitted through the preset subject configuration interface, a second serialization signal can be sent to the sending end, wherein the subject is a data identifier associated with the data to be transmitted, and the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the subject. In a specific implementation, the second serialization signal can be presented in the form of data(r), and the specific form of the second serialization signal can be set according to actual conditions. The present invention does not limit the specific form of the second serialization signal.

[0225] Then, the receiving end sends a first serialization signal in response to the user's serialization configuration of the data to be transmitted through the preset topic configuration interface, and the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the topic. In a specific implementation, the first serialization signal can be presented in the form of data(w), and the specific form of the first serialization signal can be set according to actual conditions. The present invention does not limit the specific form of the first serialization signal.

[0226] If the first serialization signal indicates that the sending end does not need to serialize when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized.

[0227] If the first serialization signal indicates that the sending end needs to serialize the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0228] In the DDS communication system, the embodiment of the present invention performs serialization configuration on the topic level through a preset topic configuration interface, and sends and receives serialization signals in advance to obtain deserialization configuration information, thereby ensuring that the receiving end can correctly deserialize when processing the data to be transmitted, so that the DDS communication system can operate efficiently in various complex communication scenarios.

[0229] In an optional embodiment of the present invention, step 201 further includes the following sub-steps:

[0230] S81: directly storing the serialized data to be transmitted sent by the sending end through a preset network protocol into the communication middleware protocol stack.

[0231] In the embodiment of the present invention, the serialized data to be transmitted sent by the sending end through the preset network protocol can be directly stored in the communication middleware protocol stack.

[0232] In the specific implementation, after receiving the data, UDP usually copies the data into a queue, and then takes the data out for processing in the DDS receiving function. Since DDS is deployed on the MCU without multi-threading, data processing is linear and not parallel. Therefore, this kind of copying is not required. After receiving the data, the DDS receiving function can be directly called to complete the subsequent data processing.

[0233] It should be noted that MCU (Microcontroller Unit) is a single-chip microcomputer that integrates components such as a processor core, memory, input / output interface, and timer. MCU is widely used in embedded systems to control and process various tasks. In an embodiment of the present invention, if DDS is running on the MCU, the DDS receiving function can be used to process the data directly after receiving the data through the preset network protocol UDP, without storing the data in the queue.

[0234] An embodiment of the present invention further provides a data transmission system based on communication middleware, wherein the communication middleware includes a sending end and a receiving end;

[0235] The transmitting end is used to obtain the data to be transmitted uploaded by the transmitting end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized;

[0236] If the serialization configuration information indicates that the data to be transmitted needs to be serialized, the sending end is used to search a preset hash table for a serialization rule corresponding to the data to be transmitted according to the data to be transmitted;

[0237] The sending end is used to perform serialization processing on the data to be transmitted according to the serialization rule;

[0238] The sending end is used to send the serialized data to be transmitted to the receiving end through a preset network protocol;

[0239] The receiving end is used to receive the serialized data to be transmitted sent by the sending end through a preset network protocol;

[0240] The receiving end is used to obtain pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized;

[0241] If the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, the receiving end is used to search for a deserialization rule corresponding to the data to be transmitted in a preset hash table according to the data to be transmitted;

[0242] The receiving end is used to perform deserialization processing on the data to be transmitted according to the deserialization rule;

[0243] The receiving end is used to present the to-be-transmitted data after deserialization processing to the receiving end user.

[0244] Reference Figure 7 , shows a schematic diagram of the workflow of a data transmission system based on communication middleware provided in one embodiment of the present invention. In a specific implementation, the data transmission system based on communication middleware can implement data transmission according to the following process.

[0245] The user calls the data sending interface on the sending end and determines whether to serialize based on the serialization configuration information. If serialization is performed, the serialization rule is found through the hash algorithm, the serialization operation is completed for the data to be transmitted, and then the data to be transmitted is sent to the DDS protocol stack.

[0246] If serialization is not performed, the data to be transmitted is directly sent to the DDS protocol stack.

[0247] The receiving end determines whether to deserialize based on the deserialization configuration information. If deserialization is required, the deserialization rules are searched through the hash algorithm, the deserialization operation is completed for the data to be transmitted, and then the data is presented to the user.

[0248] If deserialization is not performed, the data to be transmitted is directly presented to the user.

[0249] Reference Figure 8 , shows a schematic diagram of the structure of a data transmission device based on communication middleware provided by an embodiment of the present invention, which is applied to a sending end, and there is a communication connection between the sending end and the receiving end. The device includes:

[0250] The sending end data acquisition module 801 is used to acquire the data to be transmitted uploaded by the sending end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized;

[0251] A serialization rule search module 802 is configured to search a preset hash table for a serialization rule corresponding to the data to be transmitted if the serialization configuration information indicates that the data to be transmitted needs to be serialized;

[0252] A serialization processing module 803 is used to perform serialization processing on the data to be transmitted according to the serialization rule;

[0253] The serialized data sending module 804 is used to send the serialized data to be transmitted to the receiving end through a preset network protocol.

[0254] In an optional embodiment of the present invention, the device further comprises:

[0255] The original data sending module is used to send the data to be transmitted to the receiving end through the preset network protocol if the serialization configuration information indicates that the data to be transmitted does not need to be serialized.

[0256] In an optional embodiment of the present invention, the serialization configuration information is obtained in the following manner:

[0257] In response to the serialization configuration of the data to be transmitted by the user through the preset subject configuration interface, a first serialization signal is sent to the receiving end, wherein the subject is a data identifier associated with the data to be transmitted, and the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the subject;

[0258] Receiving a second serialization signal sent by the receiving end in response to the serialization configuration of the data to be transmitted by the user through a preset topic configuration interface, wherein the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the topic;

[0259] If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determining that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0260] If the first serialization signal indicates that the sending end needs to serialize when sending the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0261] In an optional embodiment of the present invention, the communication middleware includes a plurality of participants, the participants include a plurality of the sending ends and a plurality of the receiving ends, the participants have a communication connection with other participants, and the serialization configuration information is also obtained in the following manner:

[0262] In response to the serialization configuration performed by the user on the current participant through the preset participant configuration interface, a third serialization signal is sent to other participants, wherein the third serialization signal is used to indicate whether serialization is required when several of the sending ends and several of the receiving ends in the current participant transmit the data to be transmitted;

[0263] Receiving a fourth serialization signal sent by the other participants in response to the serialization configuration of the current participant by the user through the preset participant configuration interface, wherein the fourth serialization signal is used to indicate whether some of the sending ends and some of the receiving ends among the other participants need to perform deserialization when transmitting the data to be transmitted;

[0264] If the third serialization signal indicates that some of the sending ends and some of the receiving ends in the current participant do not need to perform serialization when transmitting the data to be transmitted, and the fourth serialization signal indicates that some of the sending ends and some of the receiving ends in the other participants do not need to perform deserialization when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0265] If the third serialization signal indicates that several of the senders and several of the receivers among the current participants need to serialize when transmitting the data to be transmitted, and / or the fourth serialization signal indicates that several of the senders and several of the receivers among the other participants need to deserialize when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0266] In an optional embodiment of the present invention, the preset hash table is generated as follows:

[0267] Pre-acquire a number of serialization rule names corresponding to the data to be transmitted;

[0268] Acquire in advance from the interface definition file of the communication middleware a plurality of storage locations of the serialization rules corresponding to the plurality of data to be transmitted;

[0269] Determine hash values ​​corresponding to the serialization rule names respectively;

[0270] Associating a hash value corresponding to the serialization rule name corresponding to the same data to be transmitted with a storage location of the serialization rule corresponding to the same data to be transmitted and saving them as a set of structured data;

[0271] A number of groups of structured data corresponding to the number of data to be transmitted are formed into a hash table.

[0272] In an optional embodiment of the present invention, the serialization rule search module 802 includes:

[0273] A serialization rule name acquisition module, configured to acquire the serialization rule name corresponding to the data to be transmitted according to the data to be transmitted if the serialization configuration information indicates that the data to be transmitted needs to be serialized;

[0274] A method hash value determination module, used to determine the hash value corresponding to the serialization rule name;

[0275] A storage location search module, used to search the serialization rule storage location in the hash table by using a remainder method;

[0276] The serialization rule determination module is used to determine the serialization rule corresponding to the data to be transmitted in the interface definition file according to the serialization rule storage location.

[0277] In an optional embodiment of the present invention, the communication middleware includes several participants, and the communication middleware deploys services corresponding to the participants through a tool chain, and the tool chain includes a hash table generation tool, wherein the hash table generation tool is used to execute the preset hash table generation method.

[0278] Reference Fig. 9 , shows a schematic diagram of the structure of another data transmission device based on communication middleware provided by an embodiment of the present invention, which is applied to a receiving end, and there is a communication connection between the receiving end and the sending end, and the device includes:

[0279] The data receiving module 901 is used to receive the serialized data to be transmitted sent by the sending end through a preset network protocol;

[0280] The receiving end data acquisition module 902 is used to acquire pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized;

[0281] A deserialization rule search module 903 is used to search a preset hash table for a deserialization rule corresponding to the data to be transmitted if the deserialization configuration information indicates that the data to be transmitted needs to be deserialized;

[0282] A deserialization processing module 904, configured to perform deserialization processing on the data to be transmitted according to the deserialization rule;

[0283] The deserialized data presentation module 905 is used to present the to-be-transmitted data after deserialization processing to the receiving end user.

[0284] In an optional embodiment of the present invention, the device further comprises:

[0285] The original data presentation module is used to present the data to be transmitted to the receiving end user if the deserialization configuration information indicates that the data to be transmitted does not need to be deserialized.

[0286] In an optional embodiment of the present invention, the deserialization configuration information is obtained in the following manner:

[0287] In response to the serialization configuration of the data to be transmitted by the user through the preset subject configuration interface, a second serialization signal is sent to the sending end, wherein the subject is a data identifier associated with the data to be transmitted, and the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the subject;

[0288] Receiving a first serialization signal sent by the sending end in response to a user's serialization configuration of the data to be transmitted through a preset topic configuration interface, wherein the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the topic;

[0289] If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determining that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized;

[0290] If the first serialization signal indicates that the sending end needs to serialize when sending the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

[0291] In an optional embodiment of the present invention, the data receiving module 901 includes:

[0292] The data direct receiving module is used to directly store the serialized data to be transmitted sent by the sending end through a preset network protocol into the communication middleware protocol stack.

[0293] An embodiment of the present invention further provides an electronic device, characterized in that it includes:

[0294] at least one processor;

[0295] a memory communicatively coupled to the at least one processor;

[0296] The memory has a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the method described in the embodiment of the present invention.

[0297] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the method described in the embodiment of the present invention when executed by a processor.

[0298] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0299] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. According to the above description, it is obvious that the structure required for constructing this type of device is. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific language is to disclose the best mode of the present invention.

[0300] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0301] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Therefore, the claims that follow the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present invention.

[0302] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0303] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0304] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

[0305] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, apparatuses and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0306] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

[0307] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0308] It should be noted that the various data-related processes in the embodiments of the present invention are all carried out in compliance with the corresponding data protection laws and policies of the country where the device is located and with the authorization given by the corresponding device owner.

Claims

1. A data transmission method based on communication middleware, characterized in that: Applied to a sending end, the sending end and the receiving end have a communication connection, and the method includes: Acquire the data to be transmitted uploaded by the sending end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized; If the serialization configuration information indicates that the data to be transmitted needs to be serialized, searching a preset hash table for a serialization rule corresponding to the data to be transmitted according to the data to be transmitted; Serializing the data to be transmitted according to the serialization rule; The serialized data to be transmitted is sent to the receiving end through a preset network protocol.

2. The method according to claim 1, characterized in that: The method further comprises: If the serialization configuration information indicates that the data to be transmitted does not need to be serialized, the data to be transmitted is sent to the receiving end through the preset network protocol.

3. The method according to claim 1, characterized in that The serialized configuration information is obtained in the following manner: In response to the serialization configuration of the data to be transmitted by the user through the preset subject configuration interface, a first serialization signal is sent to the receiving end, wherein the subject is a data identifier associated with the data to be transmitted, and the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the subject; Receiving a second serialization signal sent by the receiving end in response to the serialization configuration of the data to be transmitted by the user through a preset topic configuration interface, wherein the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the topic; If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determining that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized; If the first serialization signal indicates that the sending end needs to serialize when sending the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

4. The method according to claim 1, characterized in that: The communication middleware includes a plurality of participants, the participants include a plurality of the sending ends and a plurality of the receiving ends, the participants have communication connections with other participants, and the serialization configuration information is also obtained in the following manner: In response to the serialization configuration performed by the user on the current participant through the preset participant configuration interface, a third serialization signal is sent to other participants, wherein the third serialization signal is used to indicate whether serialization is required when several of the sending ends and several of the receiving ends in the current participant transmit the data to be transmitted; Receiving a fourth serialization signal sent by the other participants in response to the serialization configuration of the current participant by the user through the preset participant configuration interface, wherein the fourth serialization signal is used to indicate whether some of the sending ends and some of the receiving ends among the other participants need to perform deserialization when transmitting the data to be transmitted; If the third serialization signal indicates that some of the sending ends and some of the receiving ends in the current participant do not need to perform serialization when transmitting the data to be transmitted, and the fourth serialization signal indicates that some of the sending ends and some of the receiving ends in the other participants do not need to perform deserialization when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized; If the third serialization signal indicates that several of the senders and several of the receivers among the current participants need to serialize when transmitting the data to be transmitted, and / or the fourth serialization signal indicates that several of the senders and several of the receivers among the other participants need to deserialize when transmitting the data to be transmitted, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

5. The method according to claim 1, characterized in that The preset hash table is generated as follows: Pre-acquire a number of serialization rule names corresponding to the data to be transmitted; Acquire in advance from the interface definition file of the communication middleware a plurality of storage locations of the serialization rules corresponding to the plurality of data to be transmitted; Determine hash values ​​corresponding to the serialization rule names respectively; Associating a hash value corresponding to the serialization rule name corresponding to the same data to be transmitted with a storage location of the serialization rule corresponding to the same data to be transmitted and saving them as a set of structured data; A hash table is formed by forming a plurality of groups of structured data corresponding to the plurality of data to be transmitted.

6. The method according to claim 5, characterized in that If the serialization configuration information indicates that the data to be transmitted needs to be serialized, searching a preset hash table for a serialization rule corresponding to the data to be transmitted according to the data to be transmitted, including: If the serialization configuration information indicates that the data to be transmitted needs to be serialized, obtaining the serialization rule name corresponding to the data to be transmitted according to the data to be transmitted; Determine a hash value corresponding to the serialization rule name; Searching the serialization rule storage location in the hash table by using the remainder method; According to the serialization rule storage location, the serialization rule corresponding to the data to be transmitted is determined in the interface definition file.

7. The method according to claim 5, characterized in that The communication middleware includes several participants, and the communication middleware deploys services corresponding to the participants through a tool chain. The tool chain includes a hash table generation tool, wherein the hash table generation tool is used to execute the preset hash table generation method.

8. A data transmission method based on communication middleware, characterized in that: Applied to a receiving end, the receiving end having a communication connection with a sending end, the method comprises: Receiving the serialized data to be transmitted sent by the sending end through a preset network protocol; Acquire pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized; If the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, searching a preset hash table for a deserialization rule corresponding to the data to be transmitted according to the data to be transmitted; Deserialize the data to be transmitted according to the deserialization rule; The deserialized data to be transmitted is presented to the receiving end user.

9. The method according to claim 8, characterized in that The method further comprises: If the deserialization configuration information indicates that the data to be transmitted does not need to be deserialized, the data to be transmitted is presented to the receiving end user.

10. The method according to claim 8, characterized in that The deserialization configuration information is obtained in the following way: In response to the serialization configuration of the data to be transmitted by the user through the preset subject configuration interface, a second serialization signal is sent to the sending end, wherein the subject is a data identifier associated with the data to be transmitted, and the second serialization signal is used to indicate whether the receiving end needs to perform deserialization when receiving the data to be transmitted associated with the subject; Receiving a first serialization signal sent by the sending end in response to a user's serialization configuration of the data to be transmitted through a preset topic configuration interface, wherein the first serialization signal is used to indicate whether the sending end needs to perform serialization when sending the data to be transmitted associated with the topic; If the first serialization signal indicates that the sending end does not need to perform serialization when sending the data to be transmitted associated with the topic, and the second serialization signal indicates that the receiving end does not need to perform deserialization when receiving the data to be transmitted associated with the topic, determining that the serialization configuration information is used to indicate that the data to be transmitted does not need to be serialized; If the first serialization signal indicates that the sending end needs to serialize when sending the data to be transmitted associated with the topic, and / or the second serialization signal indicates that the receiving end needs to deserialize when receiving the data to be transmitted associated with the topic, it is determined that the serialization configuration information is used to indicate that the data to be transmitted needs to be serialized.

11. The method according to claim 8, characterized in that The receiving the serialized data to be transmitted sent by the sending end through a preset network protocol includes: The serialized data to be transmitted sent by the sending end through a preset network protocol is directly stored in the communication middleware protocol stack.

12. A data transmission system based on communication middleware, characterized in that: The communication middleware includes a sending end and a receiving end; The transmitting end is used to obtain the data to be transmitted uploaded by the transmitting end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized; If the serialization configuration information indicates that the data to be transmitted needs to be serialized, the sending end is used to search a preset hash table for a serialization rule corresponding to the data to be transmitted according to the data to be transmitted; The sending end is used to perform serialization processing on the data to be transmitted according to the serialization rule; The sending end is used to send the serialized data to be transmitted to the receiving end through a preset network protocol; The receiving end is used to receive the serialized data to be transmitted sent by the sending end through a preset network protocol; The receiving end is used to obtain pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized; If the deserialization configuration information indicates that the data to be transmitted needs to be deserialized, the receiving end is used to search for a deserialization rule corresponding to the data to be transmitted in a preset hash table according to the data to be transmitted; The receiving end is used to perform deserialization processing on the data to be transmitted according to the deserialization rule; The receiving end is used to present the to-be-transmitted data after deserialization processing to the receiving end user.

13. A data transmission device based on communication middleware, characterized in that: Applied to a transmitting end, the transmitting end and the receiving end have a communication connection, and the device includes: The sending end data acquisition module is used to acquire the data to be transmitted uploaded by the sending end user and the pre-acquired serialization configuration information; wherein the serialization configuration information is used to indicate whether the data to be transmitted needs to be serialized; A serialization rule search module, configured to search a preset hash table for a serialization rule corresponding to the data to be transmitted if the serialization configuration information indicates that the data to be transmitted needs to be serialized; A serialization processing module, used for performing serialization processing on the data to be transmitted according to the serialization rule; The serialized data sending module is used to send the to-be-transmitted data after serialization processing to the receiving end through a preset network protocol.

14. A data transmission device based on communication middleware, characterized in that: Applied to a receiving end, the receiving end is connected to a transmitting end by communication, and the device comprises: A data receiving module, used to receive the serialized data to be transmitted sent by the sending end through a preset network protocol; A receiving end data acquisition module, used to acquire pre-acquired deserialization configuration information, wherein the deserialization configuration information is used to indicate whether the data to be transmitted needs to be deserialized; A deserialization rule search module, configured to search a preset hash table for a deserialization rule corresponding to the data to be transmitted if the deserialization configuration information indicates that the data to be transmitted needs to be deserialized; A deserialization processing module, used for performing deserialization processing on the data to be transmitted according to the deserialization rule; The deserialized data presentation module is used to present the data to be transmitted after deserialization processing to the receiving end user.

15. An electronic device, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory has a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7 or 8-11.

16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 or 8 to 11 is implemented.