Method for distributed real-time communication, computing device and storage medium
By combining DDS and EPA technologies on node devices, the conversion and transmission of DDS data is achieved, and the real-time communication problem in the shared scenario of EPA network and DDS protocol is solved, ensuring real-time and reliability from the application layer to the device layer. Meets the real-time communication needs in diverse scenarios.
Patent Information
- Application Number
- CN202411473997.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-10-22
AI Technical Summary
In the scenario where EPA network and DDS protocol are shared, the control system cannot have real-time communication at all network levels, and traditional distributed real-time communication methods are difficult to achieve real-time communication at all network levels from top to bottom.
At the node device, DDS data is generated through the DDS module, and converted into EPA data through the data conversion module of DDS and EPA. It is sent to the EPA network using the EPA protocol stack to realize the real-time transmission of DDS data and parsed on the receiving end and process to ensure real-time and reliability of data.
In the scenario where the EPA network and DDS protocol are shared, the control system has real-time communication at each network level, ensuring high bandwidth, strong real-time and low jitter of node devices, and meeting the real-time communication needs in diverse scenarios.
Smart Images

Figure CN119031010A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention generally relate to the field of communications, and more particularly to a method, a computing device, and a storage medium for distributed real-time communications. Background Art
[0002] EPA (Ethernet for Plant Automation) is a real-time Ethernet technology for control systems developed independently by China, and has been included in the fieldbus international standard IEC61158 and the real-time Ethernet standard IEC61784. EPA allows periodic and non-periodic data to be transmitted in the same network, giving standard Ethernet the advantages of deterministic transmission, and has the characteristics of high bandwidth, high real-time performance, high reliability and high compatibility.
[0003] DDS (Data Distribution Service) is a new generation of distributed real-time communication middleware technical specifications developed by the Object Management Group (OMG) based on standards such as HLA (High Level Architecture) and CORBA (Common Object Request Broker Architecture). DDS adopts a publish / subscribe architecture, emphasizes data-centricity, and provides rich QoS (Quality of Service) strategies. It can ensure real-time, efficient and flexible distribution of data and meet the needs of various distributed real-time communication applications.
[0004] However, although EPA and DDS can guarantee their respective timeliness at their respective network levels, with the diversification of usage scenarios, in scenarios where the control system needs to be compatible with application messages and control devices, node devices need to send and receive application layer data and data in the EPA network in real time to control each device based on application messages. Traditional distributed real-time communication methods make it difficult for the control system to have real-time communication at all network levels from top to bottom.
[0005] In summary, the shortcomings of the traditional method for distributed real-time communication are that in the scenario where the EPA network and the DDS protocol are shared, the control system cannot have real-time communication at all network levels. Summary of the invention
[0006] In response to the above problems, the present invention provides a method, computing device and storage medium for distributed real-time communication, which can enable the control system to have real-time communication at all network levels in a scenario where the EPA network and the DDS protocol are shared.
[0007] According to a first aspect of the present invention, a method for distributed real-time communication includes: at a node device, based on at least one DDS topic to be published associated with the node device, generating at least one DDS data corresponding to the at least one DDS topic to be published via a DDS module of the node device, wherein each of the at least one DDS data generated corresponds to a DDS topic, and the node device includes at least: a DDS module, a DDS and EPA data conversion module, and an EPA protocol stack module; converting the generated DDS data to generate EPA data via the DDS and EPA data conversion module; and sending the generated EPA data to an EPA network via an EPA bus connected to the node device based on the EPA protocol stack module.
[0008] In some embodiments, converting the generated DDS data to generate EPA data via a data conversion module of DDS and EPA includes: determining a packaging order of at least one DDS data based on a DDS topic corresponding to each DDS data in at least one DDS data, and generating a topic identifier for each DDS data; based on a predetermined EPA data format, packaging at least one DDS data in the determined packaging order to generate a DDS data segment; and generating EPA data corresponding to at least one DDS data based at least on the generated topic identifier, the generated DDS data segment and the predetermined EPA data format.
[0009] In some embodiments, converting the generated DDS data to generate EPA data via the data conversion module of DDS and EPA also includes: determining keywords related to the generated DDS data based at least on the DDS topic corresponding to the generated DDS data, the keywords are at least used to indicate the real-time requirements of the DDS data; and generating keyword identifiers based on the keywords.
[0010] In some embodiments, encapsulating at least one DDS data in a determined encapsulation order to generate a DDS data segment includes: based on a predetermined EPA data format, encapsulating DDS data associated with keyword identifiers in the same DDS data segment in the determined encapsulation order; and generating EPA data based on at least the generated subject identifier, the generated DDS data segment and the predetermined EPA data format includes: generating EPA data corresponding to at least one DDS data based on the generated subject identifier, the generated DDS data segment, the predetermined EPA data format, and the keyword identifier of the DDS data segment.
[0011] In some embodiments, sending the generated EPA data to the EPA network includes: determining the type of sending time slice that matches the EPA data based on the keyword identifier included in the EPA data, the type of time slice including periodic time slice and non-periodic time slice; and allocating time slices based on the EPA network, so that the node device sends the EPA data within the time slice that matches the EPA data type.
[0012] In some embodiments, the method for distributed real-time communication also includes: at a node device, based on at least one DDS topic associated with the node device and requiring subscription, receiving EPA data from an EPA network to which the node device is connected, wherein the received EPA data includes data about at least one DDS topic published by other node devices; converting the received EPA data via a DDS and EPA data conversion module to generate DDS data; and parsing the DDS data generated by the conversion via a DDS module of the node device.
[0013] In some embodiments, receiving EPA data from an EPA network to which a node device is connected includes: determining valid data related to the node device from a received EPA message based on at least one DDS topic to be subscribed; and based on the determined valid data, performing at least one of the following from the received EPA message: extracting EPA data; deleting duplicate EPA data; and deleting erroneous EPA data.
[0014] In some embodiments, converting the received EPA data to generate DDS data includes: extracting at least one DDS data from the received EPA data; and determining a DDS topic corresponding to the extracted DDS data, wherein each of the at least one DDS data extracted corresponds to a DDS topic.
[0015] In some embodiments, the method for distributed real-time communication further includes: after parsing the DDS data generated by the conversion, sending the parsed DDS data to an application and / or device associated with the node device.
[0016] In some embodiments, sending parsed DDS data to applications and / or devices associated with the node device includes: generating relevant data or instructions based on the extracted DDS data; and based on the DDS topic corresponding to the extracted DDS data, sending relevant data or instructions to applications and / or devices that subscribe to the corresponding DDS topic, so that the applications and / or devices perform corresponding operations.
[0017] According to a second aspect of the present invention, a computing device is provided, comprising: at least one processing unit; at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, enabling the computing device to perform the steps of the method according to the first aspect.
[0018] According to a third aspect of the present invention, a computer-readable storage medium is further provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a machine, the method of the first aspect of the present invention is executed.
[0019] According to a fourth aspect of the present invention, there is further provided a computer program product, comprising a computer program, wherein when the computer program is executed by a machine, the method of the first aspect of the present invention is performed.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements.
[0022] Figure 1 A schematic diagram of a system for implementing a method for distributed real-time communication according to an embodiment of the present invention is shown.
[0023] Figure 2 A flow chart of a method for distributed real-time communication according to an embodiment of the present invention is shown.
[0024] Figure 3 A flow chart of a method for converting generated DDS data to generate EPA data according to an embodiment of the present invention is shown.
[0025] Figure 4 A flow chart of another method for distributed real-time communication according to an embodiment of the present invention is shown.
[0026] Figure 5 A flow chart of a method for parsing DDS data according to an embodiment of the present invention is shown.
[0027] Figure 6 A communication structure diagram of an EPA network according to an embodiment of the present invention is shown.
[0028] Figure 7A schematic diagram of content receiving and sending by a node device according to an embodiment of the present invention is shown.
[0029] Figure 8 A block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0030] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0031] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0032] EPA is an underlying network technology that can meet the real-time communication requirements of the underlying network and guarantee the determinism of communication. DDS attempts to communicate by using an effective binary protocol, but DDS cannot guarantee the determinism of communication because DDS does not control the underlying network layer. It is usually combined with the underlying network (such as UDP / IP) to provide content compatibility.
[0033] As described above, the disadvantage of the traditional method for distributed real-time communication is that in the scenario where the EPA network and the DDS protocol are used together, the control system cannot have real-time communication at all network levels.
[0034] In order to at least partially solve one or more of the above problems and other potential problems, an exemplary embodiment of the present invention proposes a scheme for distributed real-time communication. In the scheme of the present invention, at a node device, based on at least one DDS topic to be published associated with the node device, at least one DDS data corresponding to the at least one DDS topic to be published is generated via a DDS module of the node device, wherein each of the at least one DDS data generated corresponds to a DDS topic, and the generated DDS data is converted via a DDS and EPA data conversion module to generate EPA data; based on an EPA protocol stack module, the generated EPA data is sent to an EPA network via an EPA bus connected to the node device; wherein the node device at least includes: a DDS module, a DDS and EPA data conversion module, and an EPA protocol stack module; the present invention combines the DDS protocol with the EPA network, so that the node device generates the DDS data to be published through the DDS module, and then converts the generated DDS data into EPA data, and then sends the converted EPA data to the EPA network through the EPA protocol stack module, so that the DDS data can be sent in the form of EPA data after conversion and received by other node devices.
[0035] Therefore, the present invention can achieve decoupling between publishers and subscribers in the traditional DDS protocol, without relying on the other end to build the communication relationship of the entire system, so that in the scenario where the EPA network and the DDS protocol are shared, the control system can have real-time communication at all network levels. In addition, the method of the present invention uses the combination of EPA technology and DDS to solve the problem of communication certainty, real-time and redundancy of each layer of the network from the bottom layer to the application layer, and can ensure that the node device determines the data reception order based on the DDS topic, and has many excellent performances such as high bandwidth, strong real-time, low jitter, and cross-platform.
[0036] Figure 1 FIG. 1 is a schematic diagram of a system 100 for implementing a method for distributed real-time communication according to an embodiment of the present invention. Figure 1 As shown in , the system 100 includes multiple node devices (12-1, 12-2, ..., 12-N), an EPA bus 150, and several applications and devices. The node devices are connected to the EPA bus 150 to access the EPA network and can send and receive EPA data through the EPA bus.
[0037] Regarding the node device, it includes, for example, a DDS module, a data conversion module between DDS and EPA, and an EPA protocol stack module. The node device may have one or more processing units, including dedicated processing units such as GPU, FPGA, and ASIC, and general processing units such as CPU. In addition, one or more virtual machines may also be running on each node device. The processing unit on the node device may be, for example, separately configured from the DDS module, the data conversion module between DDS and EPA, and the EPA protocol stack module, or may be integrated with any module.
[0038] The node device is associated with at least one application and / or at least one device, for example, the node device 12-1 is associated with application 12-11, application 12-12, and device 12-13; the application can run on the node device or on the device associated with the node device, for example, application 12-11 runs on node device 12-1, and application 12-12 runs on device 12-13; with respect to the application, it can, for example, subscribe to at least one DDS topic and publish at least one DDS topic; with respect to the device, it can, for example, subscribe to at least one DDS topic and publish at least one DDS topic.
[0039] Regarding the DDS module, it is configured to generate at least one DDS data corresponding to at least one DDS topic to be published based on at least one DDS topic to be published associated with the node device, wherein each of the at least one DDS data generated corresponds to a DDS topic.
[0040] The data conversion module for DDS and EPA is configured to convert the generated DDS data to generate EPA data; and is also configured to convert the received EPA data to generate DDS data.
[0041] Regarding the EPA protocol stack module, it is configured to send the generated EPA data to the EPA network via the EPA bus connected to the node device; regarding the EPA protocol stack module, it is also configured to receive EPA data from the EPA network to which the node device is connected based on at least one DDS topic that needs to be subscribed and is associated with the node device, and the received EPA data includes data on at least one DDS topic published by other node devices.
[0042] About DDS, Data Distribution Service, is a middleware protocol and API standard defined by OMG (Object Management Group). DDS adopts a publish / subscribe architecture, emphasizes data-centricity, provides a rich QoS (Quality of Service) service quality strategy, can ensure real-time, efficient and flexible data distribution, and can meet the needs of various distributed real-time communication applications.
[0043] Regarding DDS topics, in DDS, a topic is a logical concept used to group data into specific categories. Specifically, topics play a vital role in DDS, connecting the producer (publisher) and receiver (subscriber) of data. Data is transmitted through topics, and the receiver (subscriber) can obtain the corresponding data by subscribing to the topic of interest. Each topic is unique in the DDS domain and can be regarded as a message of data exchanged between processes. These data can contain structures of different data types, such as integers, strings, etc.
[0044] Figure 2 2 is a flowchart of a method 200 for use according to an embodiment of the present invention. The method 200 may be performed as follows: Figure 1 The node device shown is executed, and can also be Figure 8 The method 200 is executed at the electronic device 800. It should be understood that the method 200 may further include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect.
[0045] In step 210, at the node device, based on at least one DDS topic to be published associated with the node device, at least one DDS data corresponding to the at least one DDS topic to be published is generated via a DDS module of the node device, wherein each of the at least one DDS data generated corresponds to a DDS topic.
[0046] Among them, please refer to Figure 1, the node devices (such as 12-1, 12-2, ..., 12-3) at least include: DDS module, DDS and EPA data conversion module, EPA protocol stack module. For example, the node device 12-1, the associated DDS topics to be published are Topic A, Topic B and Topic C, and the associated topics to be subscribed are Topic C and Topic D. For example, the node device 12-1 generates 6 DDS data A01, B01, B02, C01, C02, C03 according to the DDS topics A, B and C to be published, where A01 corresponds to Topic A, B01 and B02 correspond to Topic B respectively, and C01, C02 and C03 correspond to Topic C.
[0047] In step 220, the node device converts the generated DDS data via the DDS and EPA data conversion module to generate EPA data.
[0048] In some embodiments, converting the generated DDS data to generate EPA data via the data conversion module of DDS and EPA also includes: determining keywords related to the generated DDS data based at least on the DDS topic corresponding to the generated DDS data, the keywords are at least used to indicate the real-time requirements of the DDS data; and generating keyword identifiers based on the keywords.
[0049] For example, continuing with the above example, the six DDS data generated by node device 12-1 are A01, B01, B02, C01, C02, and C03, respectively. Keyword identifier K1 indicates that the data bit is real-time data, and keyword identifier K2 indicates that the data bit is non-real-time data; determine A01 (K1), B01 (K1), B02 (K2), C01 (K1), C02 (K2), and C03 (K1).
[0050] In some embodiments, please refer to Figure 3 , which illustrates a further detailed flow chart of step 220, shows a flow chart of a method for converting the generated DDS data to generate EPA data according to an embodiment of the present invention. Figure 3 As shown, the conversion of the generated DDS data to generate EPA data via the data conversion module of DDS and EPA also includes the following detailed steps.
[0051] In step 222, the node device determines the encapsulation order of at least one piece of DDS data based on the DDS topic corresponding to each piece of DDS data in the at least one piece of DDS data, and generates a topic identifier for each piece of DDS data.
[0052] Regarding the encapsulation order, for example, DDS data encapsulation is performed in the order of DDS topics, for example, the predetermined (or determined based on user operation) encapsulation order is topic A-topic B-topic C.
[0053] In step 224, the node device encapsulates at least one piece of DDS data in the determined encapsulation order based on the predetermined EPA data format to generate a DDS data segment.
[0054] In some embodiments, encapsulating at least one DDS data in a determined encapsulation order to generate a DDS data segment includes: based on a predetermined EPA data format, encapsulating DDS data associated with keyword identifiers in the same DDS data segment in the determined encapsulation order.
[0055] There is an association with the keyword identifier, for example, the keyword identifiers are the same, similar, or have some kind of connection. For example, continuing the above example, the 6 DDS data generated by the node device 12-1 are A01 (K1), B01 (K1), B02 (K2), C01 (K1), C02 (K2), and C03 (K1), and the packaging order is determined as: DDS data of topic A - DDS data of topic B - DDS data of topic C; the DDS data with the keyword identifier K1 is packaged in the same data segment, and the DDS data with the keyword identifier K2 is packaged in another data segment; for example, A01 (K1), B01 (K1), C01 (K1), and C03 (K1) are packaged in the DDS data segment 12-1-K1-01 in the packaging order of the topic (A-B-C); B02 (K2) and C02 (K2) are packaged in the DDS data segment 12-1-K2-02.
[0056] In step 226, the node device generates EPA data corresponding to at least one piece of DDS data based at least on the generated subject identifier, the generated DDS data segment, and a predetermined EPA data format.
[0057] In some embodiments, the node device further generates EPA data corresponding to at least one piece of DDS data based on the generated subject identifier, the generated DDS data segment, a predetermined EPA data format, and a keyword identifier of the DDS data segment.
[0058] In this way, the DDS data generated by the node device based on the DDS topic can be converted into EPA data, so that it can be sent in the EPA network and received by other nodes connected to the EPA network, so that the DDS protocol is compatible with EPA data, and the network has real-time performance at all levels from the application layer to the device layer.
[0059] In step 230, the node device sends the generated EPA data to the EPA network via the EPA bus connected to the node device based on the EPA protocol stack module.
[0060] In some embodiments, sending the generated EPA data to the EPA network includes: the node device determines the type of sending time slice that matches the EPA data based on the keyword identifier included in the EPA data, the type of time slice including periodic time slice and non-periodic time slice; and the node device sends the EPA data within the time slice that matches the EPA data type based on the time slice allocation method of the EPA network.
[0061] Regarding keyword identification, for example, it is related to the specific application scenario corresponding to the DDS topic. In different application scenarios, different topic data have different priorities; for example, in the intelligent driving scenario, braking-related topics take precedence over raising and lowering windows, increasing and decreasing the speed takes precedence over playing music, and navigation takes precedence over opening the roof, etc.
[0062] For example, continuing with the above example, for DDS data segment 12-1-K1-01 and DDS data segment 12-1-K2-02; K1 indicates real-time data, so it needs to be sent within the periodic time slot of the EPA network; K2 indicates non-real-time data, which can be sent in the non-periodic time slot of the EPA network or in the periodic time slot. The periodic time slot is preferentially used to send DDS data segments with real-time requirements, time limit requirements or other specific requirements.
[0063] For example, see Figure 6 , which illustrates the communication structure of the EPA network. EPA is a deterministic scheduling scheme. The communication mode is periodic communication. The communication cycle is as follows: Figure 6 The macrocycle shown in the figure is the basic scheduling unit, which is continuous in time. The macrocycle is divided into periodic time and non-periodic time. Among them, the periodic time is the time for each node in the network to send a periodic message. The time point when each node sends a message during the periodic time is a fixed time point. The time occupied by each node to send a message is a time slice. Only a fixed node can send a message in each time slice. The sending time of any time message in the periodic time is unique, and there will be no overlap and conflict. Among them, the non-periodic time is a time period shared by all nodes. The sending time slices of all messages in this area still cannot overlap, but the sending time point is not fixed. Each node calculates the sending time point of its own non-periodic sending message according to the non-periodic declaration field carried in the periodic message sent during the periodic time. Each cycle will be calculated, and the result of each cycle time calculation will control the allocation of the current macrocycle non-periodic time.
[0064] Continuing with the above example, for DDS data segment 12-1-K1-01 and DDS data segment 12-1-K2-02, K1 indicates real-time data, and node device 12-1 sends DDS data segment 12-1-K1-01 in a periodic time slice in the network communication macro cycle; node device 12-1 can send DDS data segment 12-1-K2-02 in a non-periodic time slice in the network communication macro cycle.
[0065] Therefore, the above scheme can associate keywords with the priority of DDS data, and thus with the periodic time and non-periodic time in the EPA network, so that each node device can send EPA data containing data related to the DDS topic in the time slice corresponding to the priority according to the priority difference of the DDS topic and the characteristics of the EPA communication cycle. In this way, the advantages of both the EPA network and the DDS protocol are fully combined to achieve fast data transmission and real-time response, ensure the reliability and real-time performance of data transmission, and meet the real-time data requirements in various business scenarios.
[0066] Figure 4 FIG. 3 is a flow chart of another method 300 for distributed real-time communication according to an embodiment of the present invention. The method 300 may be performed as follows: Figure 1 The node device shown is executed, and can also be Figure 8 The method 300 is executed at the electronic device 800. It should be understood that the method 300 may further include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect.
[0067] In step 310, at the node device, based on at least one DDS topic associated with the node device and requiring subscription, EPA data is received from the EPA network to which the node device is connected, and the received EPA data includes data on at least one DDS topic published by other node devices.
[0068] In some embodiments, receiving EPA data from an EPA network to which a node device is connected includes: determining valid data related to the node device from a received EPA message based on at least one DDS topic to be subscribed.
[0069] For example, please refer to Figure 1 , node device 12-1, the associated DDS topics that need to be subscribed are Topic C and Topic D; node device 12-2, the associated DDS topics that need to be subscribed are Topic A, Topic B and Topic C; node device 12-3, the associated DDS topics that need to be subscribed are Topic A and Topic C.
[0070] Regarding valid data related to the node device, for example, the DDS data segment in the EPA message received by the node device may contain data of multiple topics, but the node device itself does not subscribe to all these DDS topics, and the data that is not related to the DDS topic it needs to subscribe to is invalid data of the node. For example, for node device 12-2, the valid data is the data related to the topics A, B and C it subscribes to; for node device 12-3, the valid data is the data related to the topics A and C it subscribes to. It should be understood that, for example, the EPA message also contains the necessary data to ensure that the EPA message is received normally, such as source address data, destination address data, FCS (Frame Check Sequence) data, etc., which will inevitably be received by the node device.
[0071] In some embodiments, based on the determined valid data, at least one of the following is performed from the received EPA message: extracting EPA data; deleting duplicate EPA data; and deleting erroneous EPA data.
[0072] For example, when the node device is in a network structure such as a ring topology or a hybrid topology, the same EPA message may reach the node device via different paths. At this time, for the EPA message that has been received, the duplicated EPA data needs to be deleted; for example, when the node device receives the EPA message, it performs a check, and when a data error is found, the erroneous EPA data is deleted; for example, the node device deletes data related to non-subscribed DDS topics based on the DDS topics it needs to subscribe to. For example, when node 12-2 receives an EPA message, it extracts the data in the DDS data segment in the message, and extracts the data related to topic A, topic B, and topic C as valid data.
[0073] Therefore, the node device does not receive all the data in the EPA message, but receives the data selectively to improve the receiving efficiency, the EPA data parsing efficiency and save the storage resources and computing resources of the node device.
[0074] In step 320, the node device converts the received EPA data via the DDS and EPA data conversion module to generate DDS data.
[0075] In some embodiments, converting the received EPA data to generate DDS data includes: extracting at least one DDS data from the received EPA data; and determining a DDS topic corresponding to the extracted DDS data, wherein each of the at least one DDS data extracted corresponds to a DDS topic.
[0076] For example, node device 12-2, in a certain communication macrocycle, receives 2 EPA messages in the cycle time and 1 EPA message in the non-cycle time, extracts 3 DDS data segments from the 3 EPA messages, and extracts 2 DDS data from each DDS data segment. For another example, node device 12-3, in a certain communication macrocycle, receives 1 EPA message B03 in the cycle time, extracts DDS data segment D03 from message B03, and extracts 3 DDS data from DDS data segment D03, namely D03-1, D03-2 and D03-3, where D03-1 corresponds to topic A, D03-1 corresponds to topic A, D03-2 also corresponds to topic A, and D03-3 corresponds to topic C.
[0077] In step 330 , the node device parses the DDS data generated by the conversion via the DDS module of the node device.
[0078] Please refer to Figure 1 , the node devices (such as 12-1, 12-2, ..., 12-3) at least include: a DDS module, a DDS and EPA data conversion module, and an EPA protocol stack module. The DDS module is used to generate and parse DDS data. Specifically, the current node device generates DDS data based on the DDS topic to be published via the DDS module on it, and the current node device generates DDS data via the DDS module on it (converted by the DDS and EPA data conversion module).
[0079] In step 340 , after parsing the DDS data generated by the conversion, the node device sends the parsed DDS data to an application and / or device associated with the node device.
[0080] In some embodiments, please refer to Figure 5 , which illustrates a further detailed flow chart of step 340, is a flow chart of a method for parsing DDS data according to an embodiment of the present invention. Figure 5 As shown, sending the parsed DDS data to the application and / or device associated with the node device includes the following detailed steps.
[0081] Step 342: Generate relevant data or instructions based on the extracted DDS data.
[0082] Step 344: Based on the DDS topic corresponding to the extracted DDS data, relevant data or instructions are sent to the application and / or device subscribed to the corresponding DDS topic, so that the application and / or device performs corresponding operations.
[0083] For example, based on the extracted DDS data D03-1, data about the navigation request is extracted, and the extracted navigation request data is sent to the navigation application in the node device (such as the vehicle's central control) so that the navigation application generates a route and performs navigation; for example, based on the extracted DDS data D03-2, instructions about vehicle braking are extracted, and braking instructions are sent to the node device (such as the vehicle's brake) to facilitate the vehicle's braking operation.
[0084] For example, the car central control is the node device 12-1, and its application publishes topics A (brake, high real-time requirement, keyword K1), topic B (turn signal, high real-time requirement, keyword K1), and topic C (play music, low real-time requirement, keyword K2). The car chassis is the node device 12-2, which subscribes to topic A. After receiving the topic, it performs the braking operation; the car lighting is the node device 12-3, which subscribes to topic B. After receiving the turn signal topic, it performs the corresponding operation, such as flashing the left turn signal; the car audio and video is the node device 12-4, which subscribes to topic C. After receiving the topic, it starts playing music.
[0085] Therefore, the above scheme can realize the conversion, parsing, sending and receiving of DDS data through EPA, and based on the DDS topic publish-subscribe mechanism, realize the underlying real-time communication of each node device through the EPA network, and realize the real-time communication of the control layer, application layer, etc. of each node device through DDS data, so as to realize the real-time communication, control and operation of devices and applications in various application scenarios.
[0086] In the above scheme, through the DDS module, the DDS and EPA data conversion module, the node device itself can generate DDS data based on the DDS topic to be published, and convert the DDS data generated by itself into EPA data; and can convert the received EPA data into DDS data, and parse the DDS data generated by the conversion, thereby realizing the two-way conversion of DDS data and EPA data. In combination with the EPA protocol stack module, the node devices can send and receive data messages through the EPA network and communicate with each other, so that the EPA network is compatible with the DDS protocol, and the entire network system can realize real-time communication in both the underlying communication and the upper-level applications.
[0087] In order to facilitate the understanding of the above scheme, the following Figure 7 The schematic diagram of node device sending and receiving content shown further explains any method for distributed real-time communication provided by the embodiments of the present invention.
[0088] For example, see Figure 1, the node devices (such as 12-1, 12-2, ..., 12-3) at least include: DDS module, DDS and EPA data conversion module, EPA protocol stack module. For example, the node device 12-1, the associated DDS topics to be published are topic A (keyword K1), topic B (keyword K1), topic C (keyword K1) and topic D (keyword K2), Figure 7 , the data transmission and reception of the topic related to the keyword K1, the node device 12-1 generates a DDS data segment (for example, Figure 7 For example, if the keyword K1 corresponds to the real-time requirement, the node device 12-1 sends the DDS data segment in the periodic time slice of the communication macro cycle.
[0089] Continuing with the above example, node device 12-1 sends an EPA message. Node device 12-1 subscribes to Topic A, node device 12-3 subscribes to Topic B and Topic C, and node device 12-4 subscribes to Topic E. Therefore, for Figure 7 In the EPA message shown in the figure, the receiving offset of node device 12-2 is 0KB, and only 20B of data related to topic A is received in the DDS data segment; the receiving offset of node device 12-2 is 20KB, and only 20B of data related to topic B and 30B of data related to topic C are received in the DDS data segment; node device 12-4 does not subscribe to any of topics ABC, so this DDS data segment is deleted.
[0090] In addition, the node device 12 - 1 encapsulates the DDS data about the topic D in another DDS data segment and sends it in the non-periodic time slice of the node device 12 - 1 . The keyword K2 of the topic D corresponds to the non-real-time requirement.
[0091] Figure 8 Schematic diagram of an example electronic device 800 that can be used to implement an embodiment of the present specification is shown. Figure 1 The node device shown can be implemented by an electronic device 800. As shown in the figure, the electronic device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 802 or computer program instructions loaded from a storage unit 808 to a random access memory (RAM) 803. In the random access memory 803, various programs and data required for the operation of the electronic device 800 can also be stored. The central processing unit 801, the read-only memory 802, and the random access memory 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0092] Multiple components in the electronic device 800 are connected to the input / output interface 805, including: an input unit 806, such as a keyboard, a mouse, a microphone, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0093] The various processes and processing described above, such as methods 200 to 300, may be performed by the central processing unit 801. For example, in some embodiments, methods 200 to 300 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the read-only memory 802 and / or the communication unit 809. When the computer program is loaded into the random access memory 803 and executed by the central processing unit 801, one or more actions of the methods 200 to 300 described above may be performed.
[0094] The present invention relates to methods, apparatuses, systems, electronic devices, computer-readable storage media and / or computer program products. The computer program products may include computer-readable program instructions for executing various aspects of the present invention.
[0095] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0096] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge computing devices. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.
[0097] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, the electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be executed by using the state information of the computer-readable program instructions to personalize and customize the electronic circuit, thereby implementing various aspects of the present invention.
[0098] Various aspects of the present invention are described herein with reference to flow charts and / or step diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each of the steps in the flow charts and / or step diagrams and the combination of the steps in the flow charts and / or step diagrams can be implemented by computer-readable program instructions.
[0099] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more steps in the flowchart and / or step diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more steps in the flowchart and / or step diagram.
[0100] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more steps in the flowchart and / or step diagram.
[0101] The flowchart and step diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to multiple embodiments of the present invention. In this regard, each square step in the flowchart or step diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the square steps can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive square steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square step in the step diagram and / or the flowchart, and the combination of the square steps in the step diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0102] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for distributed real-time communication, characterized in that: include: At a node device, based on at least one DDS topic to be published associated with the node device, at least one DDS data corresponding to the at least one DDS topic to be published is generated via a DDS module of the node device, wherein each of the at least one DDS data generated corresponds to a DDS topic, and the node device at least includes: a DDS module, a DDS and EPA data conversion module, and an EPA protocol stack module; Converting the generated DDS data to generate EPA data via a DDS and EPA data conversion module; and Based on the EPA protocol stack module, the generated EPA data is sent to the EPA network via the EPA bus connected to the node device.
2. The method according to claim 1, characterized in that: The DDS data generated by the DDS and EPA data conversion module is converted to generate EPA data including: Based on the DDS topic corresponding to each DDS data in the at least one DDS data, determine the encapsulation order of the at least one DDS data, and generate a topic identifier for each DDS data; Based on a predetermined EPA data format, encapsulating the at least one DDS data in the determined encapsulation order to generate a DDS data segment; and Based at least on the generated subject identification, the generated DDS data segment and a predetermined EPA data format, EPA data corresponding to the at least one DDS data is generated.
3. The method according to claim 2, characterized in that The step of converting the generated DDS data to generate EPA data via the DDS and EPA data conversion module further includes: At least based on the DDS topic corresponding to the generated DDS data, determining keywords related to the generated DDS data, wherein the keywords are at least used to indicate the real-time requirement of the DDS data; and Based on the keywords, a keyword identifier is generated.
4. The method according to claim 3, characterized in that Encapsulating the at least one DDS data in the determined encapsulation order to generate a DDS data segment includes: Based on a predetermined EPA data format, encapsulating the DDS data associated with the keyword identifiers into the same DDS data segment in a determined encapsulation order; and Generating EPA data based at least on the generated subject identifier, the generated DDS data segment and the predetermined EPA data format includes: generating EPA data corresponding to the at least one DDS data based on the generated subject identifier, the generated DDS data segment, the predetermined EPA data format and the keyword identifier of the DDS data segment.
5. The method according to claim 4, characterized in that The EPA data generated by sending it to the EPA network includes: Based on the keyword identifier included in the EPA data, determining the type of the transmission time slice matching the EPA data, the type of the time slice including a periodic time slice and a non-periodic time slice; and Based on the time slice allocation method of the EPA network, the node device sends the EPA data within the time slice matching the EPA data type.
6. The method according to claim 1, characterized in that The method further comprises: At a node device, based on at least one DDS topic to be subscribed and associated with the node device, EPA data is received from an EPA network to which the node device is connected, wherein the received EPA data includes data on at least one DDS topic published by other node devices; Converting the received EPA data to generate DDS data via a DDS and EPA data conversion module; and The DDS data generated by the conversion is analyzed via the DDS module of the node device.
7. The method according to claim 6, characterized in that Receiving EPA data from the EPA network accessed by the node device includes: Determining valid data related to the node device from the received EPA message based on at least one DDS topic to be subscribed; and Based on the determined valid data, perform at least one of the following from the received EPA message: Extract EPA data; De-duplication of EPA data; and Removed erroneous EPA data.
8. The method according to claim 6, characterized in that Converting the received EPA data to generate DDS data involves: extracting at least one DDS data from the received EPA data; and A DDS topic corresponding to the extracted DDS data is determined, wherein each of the at least one piece of DDS data extracted corresponds to a DDS topic.
9. The method according to claim 6, characterized in that Also includes: After parsing the DDS data generated by the conversion, the parsed DDS data is sent to an application and / or device associated with the node device.
10. The method according to claim 6, characterized in that Sending the parsed DDS data to the application and / or device associated with the node device includes: generating relevant data or instructions based on the extracted DDS data; and Based on the DDS topic corresponding to the extracted DDS data, the relevant data or instructions are sent to the application and / or device subscribed to the corresponding DDS topic, so that the application and / or device performs the corresponding operation.
11. A computing device, characterized in that: include: at least one processing unit; At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform the steps of the method according to any one of claims 1 to 10.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a machine, the method according to any one of claims 1 to 10 is implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a machine, the method according to any one of claims 1 to 10 is performed.
Citation Information
Patent Citations
Embedded type industry ethernet safety gateway
CN101159718A
EPA industrial Ethernet and HART field bus interconnection method
CN101262473A
OPCUA and DDS protocol signal conversion device, communication system and communication method
CN107454092A
Distributed industrial data distribution method based on DDS
CN109547529A
Communication method for gateway equipment, and gateway equipment
CN113839964A
