Distributed communication system and communication method based on GRPC and OpenDDS

By adopting a distributed communication system based on GRPC and OpenDDS in a large distributed system, the problem that existing communication methods cannot meet the needs of multiple nodes is solved, and efficient, real-time data transmission and communication efficiency are improved.

CN117319234BActive Publication Date: 2025-01-21XIAN EXPLORER INTELLIGENT PHOTOELECTRIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311191656.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2025-01-21
Estimated Expiration
2043-09-14

AI Technical Summary

Technical Problem

In large distributed systems, existing communication methods cannot meet the needs of all experimental resources, and adding middleware to improve request/reply communication methods will reduce system efficiency and be cost-effective.

Method used

A distributed communication system based on GRPC and OpenDDS is used to realize cross-platform multi-node communication and collaborative control through GRPC, and the data publishing/subscription mechanism of OpenDDS is used for data transmission and information interaction.

Benefits of technology

It improves the real-time performance and communication efficiency of data transmission, reduces data transmission redundancy, and achieves efficient transmission of data from distributed nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117319234B_ABST
    Figure CN117319234B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a distributed communication system and communication method based on GRPC and OpenDDS. The system includes: multiple user nodes, a GRPC process control and resource monitoring module, a GRPC client, a GRPC service node, multiple distributed nodes and an OpenDDS data transmission and information interaction module; wherein the multiple user nodes send requests for controlling and monitoring each distributed node; the GRPC process control and resource monitoring module controls the start and stop of the process and resource monitoring; the GRPC client receives and forwards the request; the GRPC service node processes the request and sends a control command to each distributed node; the multiple distributed nodes execute the control command and return the execution result; the OpenDDS data transmission and information interaction module performs data transmission and information interaction based on OpenDDS data publishing / subscription.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of distributed communication technology, and in particular to a distributed communication system and a communication method based on GRPC and OpenDDS. Background Art

[0002] With the development of distributed and simulation technologies, distributed systems are experiencing a transition from centralized distribution of real servers to decentralized distribution of virtual servers. In traditional test simulation systems, test simulation resources are distributed in a relatively centralized manner, which makes it impossible to complete information transmission to long-distance targets, and operations and updates are hindered. As distributed systems gradually develop, they overcome the problems existing in traditional test simulation systems, and use the network to connect test simulation resources in different geographical locations to simulate the test environment to meet the needs of interoperability and information sharing between resources, reduce test costs, and achieve goals such as large-scale tests and flexible changes in test resources within the system. In order to achieve the above goals, there is an urgent need for a more flexible communication mechanism between various test resources.

[0003] The communication mechanism is the basis for ensuring the interoperability of the two communicating parties. The main communication mechanisms include the publish / subscribe method of multi-point interaction and the point-to-point request / response method. In the publish / subscribe method of multi-point interaction, the client and the server communicate through a unified architecture specification, and there is no need to understand the implementation method of the other party. Therefore, the communication nodes are highly flexible and have low dependence; the point-to-point request / response method requires the client and the server to establish a one-to-one response mode, and both parties can send messages to each other. It has a wider scope of application, a simple architecture, and can be quickly deployed and applied.

[0004] In a large distributed system, a certain communication method cannot meet the needs of all experimental resources. Increasing the number of middleware to increase the request / response communication method will reduce the communication efficiency of the system and increase the cost. Summary of the invention

[0005] In view of this, the embodiments of the present invention hope to provide a distributed communication system and communication method based on GRPC and OpenDDS, which can shield the underlying network transmission mode and serialization mode to support a cross-platform environment and have the ability of multi-node communication and multi-node collaborative control, while improving the real-time data transmission and communication efficiency.

[0006] The technical solution of the embodiment of the present invention is achieved as follows:

[0007] In a first aspect, an embodiment of the present invention provides a distributed communication system based on GRPC and OpenDDS, including: multiple user nodes, a GRPC process control and resource monitoring module, a GRPC client, a GRPC service node, multiple distributed nodes, and an OpenDDS data transmission and information interaction module; wherein,

[0008] The multiple user nodes are used to send a request for controlling and monitoring each distributed node to the GRPC service node through the GRPC client and receive the returned system status of each distributed node;

[0009] The GRPC process control and resource monitoring module is used to control the start and stop of the process and monitor resources;

[0010] The GRPC client is used to receive requests sent by the multiple user nodes and forward them to the GRPC service node;

[0011] The GRPC service node receives and processes the request sent by the user node forwarded by the GRPC client, converts the request into a control command, sends the control command to each distributed node, and receives the execution result of the control command of each distributed node;

[0012] The multiple distributed nodes receive the control command and execute the corresponding operation of the control command, and transmit the execution result back to the GRPC service node and any one of the other distributed nodes to complete the data transmission and information interaction based on OpenDDS;

[0013] The OpenDDS data transmission and information interaction module is based on the data publish / subscribe mechanism of OpenDDS to enable data transmission and information interaction between distributed nodes.

[0014] In a second aspect, an embodiment of the present invention provides a distributed communication method based on GRPC and OpenDDS, the method comprising:

[0015] The user node sends a request to the GRPC service node to control and monitor each distributed node;

[0016] The GRPC service node receives and processes the request and returns a response message, and sends a control command to the GRPC control and monitoring node pre-deployed by each distributed node;

[0017] Each distributed node obtains the control command of the GRPC service node and executes the corresponding operation of the control command, transmits the execution result back to the GRPC service node, and obtains the data content published by any other distributed node through data subscription based on OpenDDS to perform data transmission and information interaction.

[0018] In a third aspect, an embodiment of the present invention provides a computing device, the computing device comprising: a communication interface, a memory and a processor; each component is coupled together through a bus system; wherein,

[0019] The communication interface is used to receive and send signals during the process of sending and receiving information with other external network elements;

[0020] The memory is used to store a computer program that can be run on the processor;

[0021] The processor is used to execute the steps of the distributed communication method based on GRPC and OpenDDS described in the second aspect when running the computer program.

[0022] In a fourth aspect, an embodiment of the present invention provides a computer storage medium, which stores a program for distributed communication based on GRPC and OpenDDS, and when the program for distributed communication based on GRPC and OpenDDS is executed by at least one processor, the steps of the distributed communication method based on GRPC and OpenDDS described in the second aspect are implemented.

[0023] The embodiment of the present invention provides a distributed communication system and communication method based on GRPC and OpenDDS. Through the interaction between the GRPC-based service node and each distributed node to realize the user's control of the distributed nodes and the monitoring of their system status, multi-node (multi-machine) communication and multi-node (multi-machine) collaborative control can be realized; each distributed node defines a data structure to publish data content, and any of the other distributed nodes obtains the data content through subscription based on OpenDDS to perform data transmission and information interaction of the distributed communication system. The cross-platform environment and data publishing and subscription mechanism provided by the OpenDDS adaptive communication environment greatly improve the real-time performance and communication efficiency of system data transmission, reduce data transmission redundancy, and realize efficient data transmission of each distributed node. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of the composition of a distributed communication system based on GRPC and OpenDDS provided in an embodiment of the present invention;

[0025] Figure 2 A communication structure diagram based on GRPC provided for an embodiment of the present invention;

[0026] Figure 3 A schematic diagram based on GRPC provided for an embodiment of the present invention;

[0027] Figure 4An OpenDDS-based architecture diagram provided for an embodiment of the present invention;

[0028] Figure 5 A communication model diagram based on OpenDDS provided in an embodiment of the present invention;

[0029] Figure 6 A flow chart of a distributed communication method based on GRPC and OpenDDS provided in an embodiment of the present invention;

[0030] Figure 7 A GRPC-based workflow diagram provided for an embodiment of the present invention;

[0031] Figure 8 A distributed communication workflow diagram based on GRPC and OpenDDS provided in an embodiment of the present invention;

[0032] Fig. 9 A distributed simulation schematic diagram provided by an embodiment of the present invention;

[0033] Fig.10 A GRPC parsing server provided by an embodiment of the present invention;

[0034] Fig.11 Another GRPC parsing server provided by an embodiment of the present invention;

[0035] Fig.12 An interface of the simulation design software provided by the embodiment of the present invention;

[0036] Fig.13 A scene simulation model diagram provided by an embodiment of the present invention;

[0037] Fig.14 A schematic diagram of a missile model provided by an embodiment of the present invention;

[0038] Fig.15 A schematic diagram of a simulation master control model provided by an embodiment of the present invention;

[0039] Fig.16 A schematic diagram of the hardware structure of a computing device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0041] GRPC (Remote Procedure Call) developed by Google is a high-performance, open source and general RPC framework, developed based on the Protocol Buffers (ProtoBuf) serialization protocol and designed based on the HyperText Transfer Protocol (HTTP) version 2.0 for server-side and mobile-side protocols. GRPC provides a remote procedure call mechanism, which enables communication between applications of different service callers, making remote service calls simpler and more transparent, and lowering the threshold for developers to use it. It shields the underlying network transmission method, such as the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP) and shields the serialization method (XML / Json / binary). Service callers can call remote service providers like calling local interfaces without worrying about the underlying communication details and the calling process. However, the real-time data transmission and communication efficiency of the communication system based on the GRPC are low, and the data transmission delay is large; and the Open Data Distribution Service (OpenDDS) is an open source C++ implementation of the Object Management Group (OMG) Data Distribution Service (DDS). The OpenDDS uses an adaptive communication environment to provide a cross-platform environment, adopts a publish / subscribe architecture, emphasizes data-centricity, and provides a wealth of service quality (QoS) strategies, namely data-centric publish / subscribe (Data-Centric The Publish-Subscribe (DCPS) model builds a concept of a shared "global data space" in which all data objects exist. Distributed nodes can access these data objects through simple read and write operations, ensuring real-time, efficient and flexible data distribution, which can meet the needs of various distributed real-time communication applications. Based on this, an embodiment of the present invention provides a distributed communication system based on GRPC and OpenDDS technology.

[0042] See also Figure 1 , which shows a schematic diagram of a distributed system 100 based on GRPC and OpenDDS that can implement an embodiment of the present invention. It should be noted that Figure 1The system 100 shown is only one example of a possible system, and embodiments of the present invention may be implemented in any of a variety of systems as desired. The system 100 includes: a plurality of user nodes, a GRPC process control and resource monitoring module, a GRPC client, a GRPC service node, a plurality of distributed nodes, and an OpenDDS data transmission and information interaction module; wherein,

[0043] The multiple user nodes are used to send a request for controlling and monitoring each distributed node to the GRPC service node through the GRPC client and receive the returned system status of each distributed node;

[0044] The GRPC process control and resource monitoring module is used to control the start and stop of the process and monitor resources;

[0045] The GRPC client is used to receive requests sent by the multiple user nodes and forward them to the GRPC service node;

[0046] The GRPC service node receives and processes the request sent by the user node forwarded by the GRPC client, converts the request into a control command, sends the control command to each distributed node, and receives the execution result of the control command of each distributed node;

[0047] The multiple distributed nodes receive the control command and execute the corresponding operation of the control command, and transmit the execution result back to the GRPC service node and any one of the other distributed nodes to complete the data transmission and information interaction based on OpenDDS;

[0048] The OpenDDS data transmission and information interaction module is based on the data publish / subscribe mechanism of OpenDDS to enable data transmission and information interaction between distributed nodes.

[0049] For the above-mentioned system 100, in some examples, the GRPC client and the GRPC service node are deployed on distributed nodes in the form of software; wherein, the GRPC service node is also used to control and monitor service resources through its own GRPC control and monitoring function. Therefore, when the GRPC service node implements the GRPC control and monitoring function, it can also be referred to as a GRPC control and monitoring node. In order to facilitate the explanation of the scheme, the embodiments of the present invention are described in terms of a GRPC service node and a GRPC control and monitoring node respectively.

[0050] It should be noted that each of the GRPC service nodes corresponds to a distributed node; the GRPC client can be deployed on any distributed node or on multiple distributed nodes at the same time.

[0051] In some examples, the GRPC service node is also used to control the opening and closing of the OpenDDS data transmission and information interaction module.

[0052] GRPC is a high-performance, open source and universal RPC framework. It is a server-side and mobile-side protocol designed based on HTTP 2.0. GRPC can shield the underlying network transmission method (such as TCP or UDP) and serialization method (XML / Json / binary). Service callers can call remote service providers just like calling local interfaces without having to worry about the underlying communication details and calling process, which reduces the threshold for developers to use. Figure 1 The system 100 shown in FIG. Figure 2 , which shows a GRPC-based communication structure diagram provided in an embodiment of the present invention, including: multiple GRPC clients and a GRPC server, wherein the multiple GRPC clients, the embodiment of the present invention takes two as an example, such as a Ruby client and an Android-Java client, respectively send a protocol request to the GRPC server, wherein the GRPC server is Figure 1 The GRPC service node in the system shown in ; the GRPC server receives and processes the requests initiated by each GRPC client and implements the methods in the service interface according to the code generated by the microservice definition, and then performs corresponding processing according to the received request, and returns the processing result to each GRPC client node through the protocol response. Specifically, Figure 2 As shown, the GRPC client initiates a request from the GRPC core library, serializes it into the ProtoBuf message format, and then transmits it to the GRPC server. The GRPC server receives the GRPC client request, processes the ProtoBuf data in the request and deserializes it, then passes the request object to the server and implements business logic processing, and finally serializes the response and returns it to each GRPC client, thus forming a complete interface call process. A stub Stub is stored in the GRPC client, and the Stub is automatically generated by the GRPC framework to provide the same methods and functions as the server. Based on the Stub, developers only need to care about the specific business logic, and do not need to care about the implementation principles related to network communication.

[0053] For the above example, there are four types of message transmission based on GRPC, namely:

[0054] The first is a unary message of request-response type, that is, a simple request-response;.

[0055] The second is a streaming response, where the client initiates a request, the server reads a series of messages, and returns them to the client through a data stream;

[0056] The third type is a streaming request, where the client writes a series of messages to the server through a data stream and waits for a response from the server.

[0057] The fourth type is bidirectional streaming, namely streaming requests and streaming responses.

[0058] Since the GRPC-based system framework can shield the underlying transmission method (TCP or UDP), serialization method (XML / Json / binary) and communication details, the microservice caller can call the remote service provider just like calling the local interface, without having to worry about the underlying communication details and calling process. In some examples, the GRPC system framework includes at least the following components: service definition unit, code generator, transport layer, serialization and deserialization unit, server and client;

[0059] The service definition unit uses an interface definition language (IDL) to define a service interface and a message structure;

[0060] Because IDL provides a unified way to describe services and messages, developers of different languages ​​can generate corresponding client and server codes based on IDL.

[0061] The code generator automatically generates client code based on the IDL file defined by the service; wherein the generated code includes interface implementation, serialization and deserialization logic and provides an application program interface and operating environment in a corresponding language;

[0062] The transport layer uses HTTP 2.0 as the underlying transport protocol;

[0063] Specifically, the HTTP 2.0 is a binary protocol that supports passing a timeout to the upstream, allowing the upstream to actively decide how to perform subsequent operations when a timeout is detected. Compared with the direct disconnection of the traditional HTTP 1.x protocol, it has lower latency and higher throughput. The HTTP 2.0 supports multiplexing, allowing multiple requests and responses to be performed simultaneously on the same TCP connection, reducing the number of simultaneous network connections and reducing the overhead of network connections.

[0064] The serialization and deserialization unit uses the protocol buffer ProtoBuf as the default serialization and deserialization;

[0065] Specifically, GRPC generates server-side and client-side code based on the standard ProtoBuf, and all interface descriptions and documentation can be placed in the .proto file for easy viewing and modification. The ProtoBuf comes with a serialization framework and has its own compiler. The .proto file is compiled by the compiler. The .proto file needs to be compiled to generate a similar library file, and data applications can be truly developed based on the library file. The ProtoBuf has two main functions in the GRPC framework, namely, defining the data structure and improving transmission efficiency through serialization and deserialization.

[0066] The server is used to receive and process requests initiated by the client;

[0067] Specifically, the server is responsible for receiving and processing RPC requests initiated by the client, implementing the methods in the service interface according to the code generated by the service definition, and performing corresponding processing based on the received request.

[0068] The client is used to initiate a request and receive a response from the server.

[0069] Specifically, the client calls the corresponding method according to the code generated by the service definition and passes the request parameters to the server.

[0070] It should be noted that for the entire GRPC process interaction, there are only client and server sides in terms of expression, and the other components are components of the underlying protocol and software development.

[0071] See also Figure 3 , which shows a schematic diagram based on GRPC provided by an embodiment of the present invention, such as Figure 3 As shown in the figure, the reason why remote procedure call is called "remote" is that in the microservice architecture, each microservice is deployed on a different server, and it makes communication between remote services possible. From the user's perspective, it works like a local function call. Specifically, the microservice consumer initiates a REST request. After receiving the REST request, the GRPC client converts it, encodes it into binary format, constructs a GRPC request message, and sends the data packet to the GRPC server through the network based on HTTP 2.0; after receiving the data packet from the network, the GRPC server decodes it and calls the relevant service application, returns the execution result, encodes it, and sends it to the GRPC client through the network's transport layer; after receiving the data packet, the GRPC client decodes it and sends the result to the microservice consumer application. Since GRPC is more efficient than Restful services and the encoding saves space, it has advantages in low-bandwidth scenarios; the data reading and writing code is generated by the ProtoBuf compiler, which improves the coding efficiency of developers.

[0072] Combination Figure 1 The data transmission and message interaction based on OpenDDS shown in the figure, the OpenDDS uses an adaptive communication environment to provide a cross-platform environment, adopts a publish / subscribe architecture, emphasizes data-centricity, and provides rich QoS strategies, that is, a data-centric publish / subscribe model, builds a shared "global data space", all data objects exist in the space, and can achieve real-time, efficient and flexible data distribution to meet the needs of various distributed real-time communication applications, see Figure 4 , which shows an architecture diagram based on OpenDDS, including: topic unit, data writer, data reader, publisher and subscriber; among them,

[0073] The subject unit is used for data messages exchanged between processes;

[0074] The data writer is used to send data;

[0075] The data reader is used to receive data and make the data available to the process;

[0076] The publisher uses a quality of service policy to control the network flow of messages;

[0077] The subscriber is used to control the input flow of messages.

[0078] Based on the above-mentioned OpenDDS architecture, specifically, the OpenDDS specification uses the Unified Modeling Language (UML) to provide a platform-independent data model that can be mapped to various specific platforms and programming languages, so that data can be published efficiently and reliably in real-time distributed systems. It is mainly used in mission-critical areas that require high performance, predictability and effective use of resources.

[0079] See also Figure 5 , which shows a communication model diagram based on OpenDDS provided by an embodiment of the present invention. Specifically, the data-centric publish / subscribe model in OpenDDS builds a shared "global data space" in which all data objects exist. Each distributed node can access these data objects through simple read and write operations. However, the data in the global data space does not exist in the address space of all computers, but only in the local cache of the application that calls the data.

[0080] Combination Figure 1 The system 100 shown in FIG. Figure 6, which shows a flow chart of a distributed communication method based on GRPC and OpenDDS provided in an embodiment of the present invention, the method is applied to the above-mentioned system 100, and the method includes:

[0081] S601: The user node sends a request to the GRPC service node to control and monitor each distributed node;

[0082] S602: The GRPC service node receives and processes the request and returns a response message, and sends a control command to the GRPC control and monitoring node pre-deployed by each distributed node;

[0083] S603: Each distributed node obtains the control command of the GRPC service node and executes the corresponding operation of the control command, transmits the execution result back to the GRPC service node, and obtains the data content published by any other distributed node through data subscription based on OpenDDS for data transmission and information exchange.

[0084] According to the description of the above scheme, the embodiment of the present invention can realize multi-node (multi-machine) communication and multi-node (multi-machine) collaborative control through the interaction between the GRPC-based service node and each distributed node to realize the user's control of the distributed nodes and the monitoring of their system status; each distributed node defines a data structure to publish data content, and any of the other distributed nodes obtains the data content through subscription based on OpenDDS to perform data transmission and information interaction in the distributed communication system. The cross-platform environment and data publishing and subscription mechanism provided by the OpenDDS adaptive communication environment greatly improve the real-time and communication efficiency of system data transmission, reduce data transmission redundancy, and realize efficient data transmission of each distributed node.

[0085] against Figure 6 In some possible implementations of the technical solution shown, the GRPC service node receives and processes the request and returns a response message, and sends a control command to the GRPC control monitoring node pre-deployed by each distributed node, including:

[0086] The GRPC client calls the method in the corresponding service interface according to the code generated by the microservice definition and passes the request parameters and return type to the GRPC service node through the protocol request message;

[0087] The GRPC service node receives and processes the protocol request message sent by the GRPC client, implements the method in the service interface according to the code generated by the microservice definition, and sends it to the GRPC client through a protocol response message.

[0088] For the above implementation, in some examples, the GRPC service node receives and processes the protocol request message sent by the GRPC client, implements the method in the service interface according to the code generated by the microservice definition, and sends it to the GRPC client through a protocol response message. Specifically, GRPC adopts the client / server working mode, the service requester is the client, and the service provider is the server. The workflow of the GRPC client and GRPC server is as follows: Figure 7 As shown, the specific process steps are:

[0089] (1) The user node calls the GRPC client handle and executes the transmission parameters;

[0090] The service definition unit in the GRPC system framework first defines a service, specifies the method that can be called remotely, including parameters and return types.

[0091] (2) The GRPC client calls the local system kernel to send network messages;

[0092] Specifically, when executing a remote procedure call, the GRPC client program first executes a local procedure call, that is, the client function calls the client handle, first sends a call message with parameters to the network call, then a system call, that is, calls the local system kernel to execute the network call, and then transmits the request message to the GRPC server through network communication, and waits for the response of the GRPC server. The client and server in the GRPC communication structure are not the client and server in a narrow sense. As long as the call message with the request is sent, it is the client, and the server that can process the request information from the client is the server.

[0093] (3) The network message is transmitted to the remote host;

[0094] Specifically, in some examples, the network message, i.e., the request message, can be serialized into the ProtoBuf message format by the GRPC client, and the data packet can be sent to the GRPC server through the network transport layer based on HTTP 2.0, or it can be transmitted to the server to which the remote host belongs through the local server.

[0095] (4) The server handle on the server side receives the request message and obtains the parameters;

[0096] Specifically, the GRPC server is the GRPC service node, and the service process remains in a dormant state until the client's call information arrives. When a call information arrives, the GRPC server obtains the request message through the server handle and obtains the parameters in the request message, processes the ProtoBuf data in the request and deserializes it, then passes the request object to the server and implements business logic processing.

[0097] (5) Execute remote procedures;

[0098] (6) The executed process returns the result to the server handle;

[0099] (7) The server handle returns the result and calls the remote system kernel;

[0100] Specifically, the server calls the remote system kernel and returns the serialized response message to the client through the server handle, thus completing a complete interface call process, and then waits for the next call.

[0101] (8) The message is transmitted back to the local host;

[0102] (9) The client handle receives the message from the kernel;

[0103] (10) The client receives the data returned by the handle.

[0104] against Figure 6 The technical solution shown, in some possible implementations, the GRPC service node receives and processes the request and returns a response message, and sends a control command to the GRPC control and monitoring node pre-deployed at each distributed node, including: sending a control command to the GRPC control and monitoring node pre-deployed at each distributed node through the GRPC service node and completing the process control and resource monitoring of each distributed node through the GRPC process control and resource monitoring module, wherein the control command includes at least a distributed communication process control command or a resource command of each distributed node.

[0105] against Figure 6 In some possible implementations of the technical solution shown, each distributed node obtains the control command of the GRPC service node and executes the corresponding operation of the control command, transmits the execution result back to the GRPC service node, and obtains the data content published by any one of the other distributed nodes through data subscription based on OpenDDS for data transmission and information interaction, including:

[0106] The publishers respectively define data structures to publish data content, wherein the publishers are any one of the distributed nodes;

[0107] Through the data subscription mechanism based on OpenDDS, the subscriber obtains the data content and performs data transmission and information exchange according to the service quality predefined by the publisher and the subscriber.

[0108] For the above implementation, in some examples, the subscriber obtains the data content through the data subscription mechanism based on OpenDDS and performs data transmission and information interaction according to the service quality predefined by the publisher and the subscriber, including:

[0109] Define quality of service policies for each entity in a data-centric publish / subscribe model based on the OpenDDS specification;

[0110] An independent quality of service agreement is established for each pair of publishers and subscribers based on the quality of service policy to configure and utilize system resources.

[0111] For the above example, it should be noted that the publishers and subscribers pre-define the quality of service for data transmission and information exchange. Specifically, the OpenDDS specification lists and defines a complete set of QoS strategies, which can be used for system control. Each DCPS entity has its own QoS strategy, and an independent QoS agreement can be established between each pair of publishers and subscribers. This allows data distributed services to configure and utilize system resources well, coordinate the balance between predictability and execution efficiency, and support complex and changing data flow requirements.

[0112] against Figure 6 The technical solution shown in the figure has a detailed workflow, such as Figure 8 As shown, since the GRPC service node, GRPC client and software with OpenDDS protocol are all deployed on the distributed nodes, for the convenience of viewing and description, each component is displayed separately in the system, and user node 1, user node 2...user node N respectively send requests for controlling and monitoring each distributed node to the corresponding GRPC service node through the GRPC client; the GRPC service node receives and processes the request sent by the user node, and sends a control command to the GRPC control and monitoring node pre-deployed by each distributed node; each distributed node obtains the control command of the GRPC service node and executes the corresponding operation of the control command, and transmits the execution result back to the GRPC service node to complete the process control and resource monitoring of each distributed node; for data transmission between each distributed node, the GRPC service node is integrated with a switch for controlling the opening and closing of the software with OpenDDS protocol. When the switch is turned on, any one of the distributed nodes obtains the data content published by other distributed nodes through data subscription based on OpenDDS for data transmission and information interaction.

[0113] To verify the effectiveness of the distributed communication system based on GRPC and OpenDDS, see Fig. 9 , which shows a distributed simulation schematic diagram provided by an embodiment of the present invention. Using simulation design software, it is sent to any computer through GRPC to start any model for simulation. All simulation models are deployed on each computer. After the model is started, data between models is transmitted and information exchanged through OpenDDS.

[0114] Combination Fig. 9 The distributed simulation system shown in Fig.10 and Fig.11 The connection status of Computer 1 and Computer 2 based on the GRPC resolution server is shown respectively, wherein the IP address of Computer 1 is 192.168.1.11, and the IP address of Computer 2 is 192.168.1.10.

[0115] For the design interface, scenario simulation model and missile model of the simulation design software used in the above distributed simulation system, such as Figure 12-14 As shown, the computer where the model runs is determined by designing the IP of the computer where the simulation model is located.

[0116] Combination Fig.14 The missile model shown and Fig.15 The simulation master control model provided by the embodiment of the present invention, i.e., the target model, can be seen Fig.14 and Fig.15 The target model and the position data and image data of the missile model are all sent through OpenDDS. The simulation design software and GRPC parsing server are all parsed through GRPC commands. The GRPC parsing server is responsible for parsing GRPC commands and starting the simulation model. It should be noted that one computer can run all models at the same time, or different computers can run different simulation models to achieve flexible distributed simulation. GRPC can shield the underlying network protocol and realize remote calls. The data publishing and subscription mechanism of OpenDDS greatly improves the system data transmission capability, reduces data transmission redundancy, and realizes efficient transmission of data from each distributed node.

[0117] Understandably, Figure 6The technical solutions and examples shown can be implemented in the form of hardware or in the form of software function modules. The embodiment of the present invention is implemented in the form of software function modules. If it is implemented in the form of a software function part and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes. Therefore, this embodiment provides a computer storage medium, which stores a program for distributed communication based on GRPC and OpenDDS. When the program for distributed communication based on GRPC and OpenDDS is executed by at least one processor, the steps of the distributed communication method based on GRPC and OpenDDS described in the above technical solution are implemented.

[0118] According to the above-mentioned distributed communication device based on GRPC and OpenDDS and computer storage medium, see Fig.16 , which shows the specific hardware structure of a computing device 1600 provided by an embodiment of the present invention that can implement the above-mentioned distributed communication device based on GRPC and OpenDDS. The computing device 1600 can be a wireless device, a mobile or cellular phone (including a so-called smart phone), a personal digital assistant (PDA), a video game console (including a video display, a mobile video game device, a mobile video conferencing unit), a laptop computer, a desktop computer, a TV set-top box, a tablet computing device, an e-book reader, a fixed or mobile media player, etc. The computing device 1600 includes: a communication interface 1601, a memory 1602 and a processor 1603; the various components are coupled together through a bus system 1604. It can be understood that the bus system 1604 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1604 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Fig.16 In FIG. 1 , various buses are labeled as bus system 1604. Among them,

[0119] The communication interface 1601 is used to receive and send signals during the process of sending and receiving information with other external network elements;

[0120] The memory 1602 is used to store a computer program that can be run on the processor 1603;

[0121] The processor 1603 is used to execute the steps of the distributed communication method based on GRPC and OpenDDS in the aforementioned technical solution when running the computer program.

[0122] It can be understood that the memory 1602 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The memory 1602 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0123] The processor 1603 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1603. The above processor 1603 may be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1602, and the processor 1603 reads the information in the memory 1602 and completes the steps of the above method in combination with its hardware.

[0124] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.

[0125] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0126] It can be understood that the exemplary technical solution of the computing device 1600 is the same concept as the technical solution of the aforementioned distributed communication method based on GRPC and OpenDDS. Therefore, the details not described in detail in the technical solution of the computing device 1600 can be found in the description of the technical solution of the aforementioned distributed communication method based on GRPC and OpenDDS. This embodiment of the present invention will not be elaborated on.

[0127] 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.

Claims

1. A distributed communication system based on GRPC and OpenDDS, characterized in that: The system includes: multiple user nodes, GRPC process control and resource monitoring modules, GRPC clients, GRPC service nodes, multiple distributed nodes and OpenDDS data transmission and information interaction modules; wherein, The multiple user nodes are used to send a request for controlling and monitoring each distributed node to the GRPC service node through the GRPC client and receive the returned system status of each distributed node; The GRPC process control and resource monitoring module is used to control the start and stop of the process and monitor resources; The GRPC client is used to receive requests sent by the multiple user nodes and forward them to the GRPC service node; The GRPC service node receives and processes the request sent by the user node forwarded by the GRPC client, converts the request into a control command, sends the control command to each distributed node, and receives the execution result of the control command of each distributed node; The multiple distributed nodes receive the control command and execute the corresponding operation of the control command, and transmit the execution result back to the GRPC service node and any one of the other distributed nodes to complete the data transmission and information interaction based on OpenDDS; The OpenDDS data transmission and information interaction module enables data transmission and information interaction between distributed nodes based on the OpenDDS data publish / subscribe mechanism; Among them, the GRPC client and GRPC service node are deployed on distributed nodes in the form of software; among them, the GRPC service node is also used to control and monitor service resources through its own GRPC control and monitoring function, and the GRPC service node is a GRPC control and monitoring node.

2. The system according to claim 1, characterized in that The GRPC service node is also used to control the opening and closing of the OpenDDS data transmission and information interaction module.

3. A distributed communication method based on GRPC and OpenDDS, the method being applied to the system according to any one of claims 1 to 2, characterized in that: The method comprises: The user node sends a request to the GRPC service node to control and monitor each distributed node; The GRPC service node receives and processes the request and returns a response message, and sends a control command to the GRPC control and monitoring node pre-deployed by each distributed node; Each distributed node obtains the control command of the GRPC service node and executes the corresponding operation of the control command, transmits the execution result back to the GRPC service node, and obtains the data content published by any other distributed node through data subscription based on OpenDDS to perform data transmission and information interaction.

4. The method according to claim 3, characterized in that The GRPC service node receives and processes the request and returns a response message, and sends a control command to the GRPC control and monitoring node pre-deployed by each distributed node, including: The GRPC client calls the method in the corresponding service interface according to the code generated by the microservice definition and passes the request parameters and return type to the GRPC service node through the protocol request message; The GRPC service node receives and processes the protocol request message sent by the GRPC client, implements the method in the service interface according to the code generated by the microservice definition, and sends it to the GRPC client through a protocol response message.

5. The method according to claim 3, characterized in that: The GRPC service node receives and processes the request and returns a response message, and sends a control command to the GRPC control and monitoring node pre-deployed by each distributed node, including: The GRPC service node sends control commands to the GRPC control and monitoring nodes pre-deployed at each distributed node, and the process control and resource monitoring of each distributed node are completed through the GRPC process control and resource monitoring module, wherein the control commands at least include distributed communication process control commands or distributed node resource commands.

6. The method according to claim 3, characterized in that Each distributed node obtains the control command of the GRPC service node and executes the corresponding operation of the control command, transmits the execution result back to the GRPC service node, and obtains the data content published by any one of the other distributed nodes through data subscription based on OpenDDS for data transmission and information interaction, including: The publishers respectively define data structures to publish data content, wherein the publishers are any one of the distributed nodes; Through the data subscription mechanism based on OpenDDS, the subscriber obtains the data content and performs data transmission and information exchange according to the service quality predefined by the publisher and the subscriber.

7. The method according to claim 6, characterized in that The data subscription mechanism based on OpenDDS allows subscribers to obtain the data content and perform data transmission and information exchange according to the quality of service predefined by the publisher and subscriber, including: Define quality of service policies for each entity in a data-centric publish / subscribe model based on the OpenDDS specification; An independent quality of service agreement is established for each pair of publishers and subscribers based on the quality of service policy to configure and utilize system resources.

8. A computing device, characterized in that The computing device includes: a communication interface, a processor, and a memory, and each component is coupled together through a bus system; wherein, The communication interface is used to receive and send signals during the process of sending and receiving information with other external network elements; The memory is used to store a computer program that can be run on the processor; The processor is used to execute the steps of the distributed communication method based on GRPC and OpenDDS as described in any one of claims 3 to 7 when running the computer program.

9. A computer storage medium, characterized in that: The computer storage medium stores a program for distributed communication based on GRPC and OpenDDS, and when the program for distributed communication based on GRPC and OpenDDS is executed by at least one processor, the steps of the distributed communication method based on GRPC and OpenDDS described in any one of claims 3 to 7 are implemented.

Citation Information

Patent Citations

  • Integrated supervisory control system

    CN107608285A

  • Distributed resource monitoring method and system

    CN114443422A