A data transmission method and system, device, and storage medium based on a DDS protocol

By using the DDS protocol to build a data distribution layer in the industrial data acquisition platform, the problem that the MQTT protocol cannot meet the requirements of high real-time performance and high concurrency of big data is solved, realizing efficient and flexible distribution of industrial data and meeting the transmission needs of industrial data.

CN116016517BActive Publication Date: 2026-03-17KYLAND TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

The existing MQTT protocol cannot meet the requirements of high real-time performance and high concurrency of big data in industrial data transmission, especially when multiple programs acquire the same piece of industrial data at the same time. It cannot provide sufficient QoS and support file, audio and video transmission and shared memory.

Method used

A data distribution layer is constructed using the DDS protocol. By building DDS topics associated with the model application layer, rich QoS service quality policies are provided to achieve real-time and efficient distribution of status data and control data, and support shared memory transmission among multiple data subscribers.

Benefits of technology

It achieves high real-time performance of industrial data and high-concurrency transmission of big data, meeting the efficient and flexible distribution needs of industrial data acquisition platforms and improving data distribution efficiency and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116016517B_ABST
    Figure CN116016517B_ABST
Patent Text Reader

Abstract

This application provides a data transmission method, system, device, and storage medium based on the DDS protocol. The method includes: constructing a data distribution layer based on the DDS protocol between a data acquisition layer and a model application layer. This data distribution layer stores at least one DDS topic associated with the model application layer. The data distribution layer is used to: acquire status data from various sensors and controllers in the data acquisition layer; acquire a first data subscription instruction from the model application layer; respond to the first data subscription instruction from the model application layer; publish corresponding status data on an agreed-upon first DDS topic; and read the status data on the first DDS topic and distribute it to the model application layer for processing. This application provides rich QoS (Quality of Service) policies through DDS services, ensuring real-time, efficient, and flexible distribution of industrial data, meeting the high real-time and high-concurrency transmission requirements of industrial data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial control technology, and in particular to a data transmission method, system, device, and storage medium based on the DDS protocol. Background Technology

[0002] DDS (Data Distribution Service) is a data-centric communication protocol that uses a data-centric publish / subscribe model. It features high real-time performance, high flexibility, and low coupling, and is widely used in distributed system communication networks.

[0003] In the field of industrial automation control technology, industrial data typically refers to the data generated by sensors in industrial scenarios that perceive the state and parameters of a specific physical environment. This includes the state, measurement, and criteria of the physical quantities sensed by the industrial sensors. Industrial data acquisition platforms have stringent requirements for the real-time performance, security, and reliability of industrial data. Typically, they need to acquire and process industrial data within milliseconds, and then feed the processed data back to the control system in real time for corresponding control actions. In some special scenarios, multiple programs may need to acquire and process the same piece of industrial data simultaneously. In such cases, the industrial data acquisition platform must distribute the acquired industrial data to multiple programs in real time, posing challenges to the platform's data distribution capabilities, including high real-time performance and handling large amounts of data with high concurrency.

[0004] Currently, industrial data transmission relies on MQTT (Message Queuing Telemetry Transport) as a communication method. This is a lightweight communication protocol based on a publish / subscribe model, providing real-time and reliable messaging services to connected remote devices with minimal code and limited bandwidth, thus meeting the data distribution needs of industrial data acquisition platforms. However, compared to the DDS protocol, MQTT has several drawbacks, such as offering fewer QoS (Quality of Service) options, not supporting file, audio, and video transmission, and not supporting shared memory. Consequently, it cannot meet the high real-time and high-concurrency transmission requirements of various industrial data scenarios. Summary of the Invention

[0005] In view of this, this application proposes a data transmission method, system, device, and storage medium based on the DDS protocol. By providing rich QoS service quality policies through DDS services, it can ensure the real-time, efficient, and flexible distribution of industrial data, and meet the transmission requirements of high real-time performance and high concurrency of big data in industrial data.

[0006] In a first aspect, this application provides a data transmission method based on the DDS protocol, which constructs a data distribution layer based on the DDS protocol between a data acquisition layer and a model application layer. This data distribution layer stores at least one DDS topic associated with the model application layer; the data distribution layer is used for:

[0007] Acquire the status data of each sensor and controller in the data acquisition layer, and acquire the first data subscription instruction in the model application layer;

[0008] In response to the first data subscription instruction of the model application layer, the corresponding state data is published on the agreed first DDS topic;

[0009] The state data on the first DDS topic is read and distributed to the model application layer for processing.

[0010] Therefore, the data transmission method based on the DDS protocol provided in this application constructs a data distribution layer based on the DDS protocol, and builds one or more DDS topics associated with the model application layer within this data distribution layer. This data distribution layer is used to acquire and store the status data of various sensors and controllers in the data acquisition layer. When the model application layer issues one or more data subscription instructions to acquire status data, the data distribution layer can publish the corresponding status data on one or more agreed topics according to the one or more data subscription instructions, so as to distribute the status data to the associated model application layer for processing. This application can provide rich QoS (Quality of Service) policies through DDS services, ensuring the real-time, efficient, and flexible distribution of industrial data, meeting the transmission requirements of high real-time performance and high concurrency of large amounts of data in industrial applications.

[0011] Optionally, the data distribution layer is further used for:

[0012] A second data subscription instruction is sent to the model application layer, and control data published by the model application layer on the agreed second DDS topic according to the second data subscription instruction is read. The corresponding controller is controlled according to the control data. The control data is generated by the model application layer processing the state data.

[0013] Therefore, when it is necessary to control the controller back based on the processing results of the state data by the model application layer, the data distribution layer can also send a data subscription instruction to the model application layer. The model application layer can publish the corresponding control data on the matching DDS topic according to the data subscription instruction. The data distribution layer can read the control data and distribute it to the corresponding controller so as to control the controller back based on the control data.

[0014] Optionally, the data distribution layer includes a first data publisher and a first data subscriber associated with the first DDS topic. The first data publisher is connected to at least one database of the data distribution layer, and the first data subscriber is connected to at least one data model of the model application layer.

[0015] The first data subscription terminal is used to obtain the first data subscription instruction from the model application layer and send it to the first data publishing terminal;

[0016] The first data publishing terminal is used to publish corresponding status data on the agreed first DDS topic according to the first data subscription instruction;

[0017] The first data subscription terminal is also used to read the status data on the first DDS topic and distribute it to at least one data model in the model application layer for processing.

[0018] As described above, the associated DDS topics link the corresponding data publishers and data subscribers. The data publisher connects to the database of the data distribution layer through an interface, and the data subscriber connects to the data model of the application layer through an interface. The application layer sends its data subscription instruction to the data publisher through the data subscriber, and the data publisher can then publish the corresponding state data on the agreed DDS topics according to the data subscription instruction, so that the data subscriber can read the state data and distribute it to the data model of the application layer for processing.

[0019] Optionally, the data distribution layer includes a second data publisher and a second data subscriber associated with the second DDS topic. The second data publisher is connected to at least one data model of the model application layer, and the second data subscriber is connected to at least one control terminal of the data distribution layer.

[0020] The second data subscriber is used to obtain the second data subscription instruction from the data distribution layer and send it to the second data publisher;

[0021] The second data publishing terminal is used to publish corresponding control data on the agreed second DDS topic according to the second data subscription instruction;

[0022] The second data subscription terminal is also used to read control data on the second DDS topic and distribute it to at least one control terminal of the data distribution layer, and control the corresponding controller according to the control data.

[0023] Therefore, when the controller needs to be controlled back based on the processing results of the state data by the model application layer, the second data subscription end and the second data publishing end are associated with the second DDS topic. The second data publishing end is connected to the data model of the model application layer through an interface, and the second data subscription end is connected to the control end of the data distribution layer through an interface. The data distribution layer sends a second data subscription command through the second data subscription end. The model application layer publishes the corresponding control data on the agreed second DDS topic through the second data publishing end. The second data subscription end reads the control data and distributes it to the corresponding controller, and controls back the controller based on the control data.

[0024] Optionally, when multiple data subscribers subscribe to the same status data or control data, the data publisher and multiple data subscribers use a shared memory transmission mechanism to transmit the status data or control data.

[0025] Therefore, when multiple data subscribers need to subscribe to and use the same status data or control data, the data publisher and multiple data subscribers can adopt a shared memory transmission mechanism to transmit status data or control data. The data publisher and multiple data subscribers can share access to the same memory space, avoiding data copying, improving data distribution efficiency, and ensuring real-time performance.

[0026] Optionally, the data publishing end publishes data on an agreed-upon DDS topic through a data writer, and the data subscription end reads data on the agreed-upon DDS topic through a data reader.

[0027] As described above, the data publishing end creates and binds data writers to publish data on the agreed DDS topic, and the data subscription end creates and binds data readers to read data on the agreed DDS topic.

[0028] Optionally, the data acquisition layer acquires status data from each sensor and controller via the OPCUA protocol, and the data distribution layer converts the OPCUA protocol status data into DDS protocol status data through protocol conversion.

[0029] As described above, the data acquisition layer can connect to various OPCUA (OPC Unified Architecture, time-sensitive networking technology based on OPC unified architecture) protocols of sensors and controllers, collect the OPCUA protocol status data of each sensor and controller, and convert it into DDS protocol status data in the data distribution layer for distribution.

[0030] Secondly, this application provides a data transmission system based on the DDS protocol, including a DDS protocol-based data distribution layer constructed between a data acquisition layer and a model application layer, wherein the data distribution layer stores at least one DDS topic associated with the model application layer; the data distribution layer includes:

[0031] The acquisition module is used to acquire the status data of each sensor and controller in the data acquisition layer, and to acquire the first data subscription instruction in the model application layer;

[0032] The publishing module is used to respond to the first data subscription instruction of the model application layer and publish the corresponding status data on the agreed first DDS topic;

[0033] The subscription module is used to read the state data on the first DDS topic and send it to the model application layer for processing.

[0034] Thirdly, this application provides a computing device, the computing device comprising:

[0035] processor;

[0036] Memory, used to store one or more programs;

[0037] When the processor executes one or more programs, it enables the processor to implement the aforementioned data transmission method based on the DDS protocol.

[0038] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the aforementioned data transmission method based on the DDS protocol.

[0039] These and other aspects of this application will become more apparent in the description of the following embodiments(s). Attached Figure Description

[0040] Figure 1 A flowchart illustrating the first data transmission method based on the DDS protocol provided in this application embodiment;

[0041] Figure 2 This is a schematic diagram of a data center transmitting data, provided as an embodiment of this application.

[0042] Figure 3 A flowchart illustrating a second data transmission method based on the DDS protocol provided in this application embodiment;

[0043] Figure 4 A structural diagram of a data transmission system based on the DDS protocol provided in an embodiment of this application;

[0044] Figure 5This is a structural diagram of a computing device provided in an embodiment of this application.

[0045] It should be understood that the dimensions and shapes of the block diagrams in the above structural diagrams are for reference only and should not constitute an exclusive interpretation of the embodiments of this application. The relative positions and inclusion relationships between the block diagrams presented in the structural diagrams are only schematic representations of the structural relationships between the block diagrams, and are not intended to limit the physical connection methods of the embodiments of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will now be described in further detail with reference to the accompanying drawings.

[0047] DDS (Data Distribution Service) is a data-centric communication protocol that employs a data-centric publish / subscribe model. It provides rich QoS (Quality of Service) policies to ensure real-time, efficient, and flexible data distribution, meeting the needs of various distributed real-time communication applications and is widely used in distributed system communication networks. This application provides a data transmission method based on the DDS protocol. By providing rich QoS policies through the DDS service, it ensures the real-time, efficient, and flexible distribution of industrial data, meeting the transmission requirements of high real-time performance and high concurrency of large datasets.

[0048] like Figure 1 As shown in the embodiment of this application, a data transmission method based on the DDS protocol is provided. This method constructs a data distribution layer based on the DDS protocol between the data acquisition layer and the model application layer. This data distribution layer stores at least one DDS topic associated with the model application layer. The method includes:

[0049] S101: Obtain the status data of each sensor and controller in the data acquisition layer, and obtain the first data subscription instruction in the model application layer.

[0050] In this step, each sensor and controller can be a device based on the OPCUA protocol. The data acquisition layer collects and manages the status data of each sensor and controller in real time through the OPC unified architecture to obtain OPCUA protocol status data. The data distribution layer converts the OPCUA protocol status data to obtain DDS protocol status data for distribution.

[0051] like Figure 2As shown, in this embodiment, there can be multiple sensors and controllers. Their status data can be sensor-collected data, such as temperature and humidity data, audio and video data, etc., or control input data from the controller. In some embodiments, this status data can be real-time collected data or historical data stored in a database. The model application layer can include multiple data models, such as multiple analysis models and control models, to analyze and process the obtained status data to obtain analytical data or control data, etc.

[0052] In some embodiments, the first DDS topic associated with the data distribution layer and the model application layer is specifically a DDS topic association between a first data publisher connected to the data distribution layer and a first data subscriber connected to the model application layer. The first data publisher is connected to at least one database of the data distribution layer, and the first data subscriber is connected to at least one data model of the model application layer. The first data subscriber is used to obtain a first data subscription instruction from the model application layer and send it to the first data publisher.

[0053] S102: In response to the first data subscription instruction of the model application layer, publish the corresponding state data on the agreed first DDS topic.

[0054] In this step, the first data subscriber sends a first data subscription instruction to the first data publisher. The first data publisher responds to the first data subscription instruction and searches for the corresponding status data in the real-time database or historical database according to the first data subscription instruction. It then publishes the corresponding status data on the agreed first DDS topic so that the first data subscriber can read the status data and distribute it to at least one data model in the model application layer for processing.

[0055] S103: Read the state data on the first DDS topic and distribute it to the model application layer for processing.

[0056] In this step, the first data subscriber reads the status data published by the first data publisher on the agreed first DDS topic, and distributes it to at least one data model in the model application layer for analysis and processing.

[0057] like Figure 3 As shown, when it is necessary to control the controller back, the data transmission method based on the DDS protocol provided in this application embodiment further includes:

[0058] S104: Send a second data subscription instruction to the model application layer through the data distribution layer.

[0059] In this step, when it is necessary to control the controller based on the control data generated by the model application layer after processing the state data, the data distribution layer can also send a second data subscription instruction to the model application layer. The model application layer can publish the corresponding control data on the matching second DDS topic according to the second data subscription instruction. The data distribution layer can read the control data and distribute it to the corresponding controller to control the controller according to the control data.

[0060] Specifically, the second DDS topic associated with the data distribution layer and the model application layer is to associate the second data subscription end connected to the data distribution layer and the second data publishing end connected to the model application layer through DDS topic association. The second data subscription end is connected to at least one control end of the data distribution layer, and the second data publishing end is connected to at least one data model of the model application layer. The second data subscription end is used to obtain the second data subscription instruction of the data distribution layer and send it to the second data publishing end.

[0061] S105: Read the control data published by the model application layer on the agreed second DDS topic according to the second data subscription instruction, and control the corresponding controller according to the control data.

[0062] In this step, the second data publishing terminal connected to the model application layer responds to the second data subscription instruction sent by the data distribution layer through the second data subscription terminal. According to the second data subscription instruction, it publishes the corresponding control data on the matching second DDS topic. The second data subscription terminal reads the control data and distributes it to the corresponding controller through the control terminal of the data distribution layer to perform corresponding feedback control on the controller.

[0063] In some embodiments, when multiple data subscribers need to subscribe to the same status data or control data, the data publisher and multiple data subscribers adopt a shared memory transmission mechanism to transmit the status data or control data. The data publisher and multiple data subscribers can share access to the same memory space, avoiding multiple copies of the status data or control data, improving data distribution efficiency, and ensuring the real-time performance of data transmission.

[0064] In some embodiments, the data publisher creates and binds a data writer to publish data on an agreed-upon DDS topic, and the data subscriber creates and binds a data reader to read data on the agreed-upon DDS topic.

[0065] Reference Figure 1 , Figure 3The data transmission method illustrated below describes the data transmission process in the embodiments of this application in detail. The data acquisition layer of the data center collects status data from sensors and the main control PLC, storing it in a file database and caching it in a memory database, respectively. The file database stores historical data, while the memory database caches real-time data. A message bus based on the DDS protocol is constructed to respond to data subscription commands in the algorithm model. According to the data subscription commands, the corresponding status data is published in real-time on the agreed-upon DDS topics, allowing the algorithm model to receive and analyze the status data. The resulting warning data can be stored in a relational database (file database). Furthermore, in response to the data subscription commands of the message bus, the corresponding control data can be published on the agreed-upon DDS topics, allowing the message bus to distribute the control data to the corresponding main control PLC, and to control the status of the main control PLC in real-time based on this control data.

[0066] In this embodiment, the in-memory database is used to cache the real-time status data collected by the data acquisition layer. By performing preprocessing such as timestamp alignment and data association on the real-time status data, the preprocessed status data can be stored in the time series database so that the algorithm model can call it when needed.

[0067] In this embodiment, the data acquisition layer of the aforementioned data center is used to collect real-time status data from various sensors and controllers. The data distribution layer is used to acquire the real-time status data and cache it in a cache. It also performs preprocessing and stores the data in a real-time database and a file database (SQLite3 database). When the algorithm model needs the status data, it can send a data subscription instruction to the data publishing end through the data subscription end. The data publishing end publishes the real-time status data in the cache, the status data in the real-time database, and the file database (SQLite3 database) on the agreed DDS topic according to the data subscription instruction. This allows the data subscription end to read the status data on the DDS topic and send it to the algorithm model for analysis and processing. The results obtained by the algorithm model after analysis and processing can be stored in the real-time database and the file database (SQLite3 database) for preservation. The algorithm model can also respond to the data subscription instruction of the data distribution layer and publish the obtained control data on the agreed DDS topic to achieve decision forwarding.

[0068] In some embodiments, when the data distribution layer needs to obtain control data obtained from the analysis and processing of the algorithm model, it sends a data subscription instruction to the data distribution layer through the model result lookup table pre-stored in the decision forwarding terminal. The corresponding data model in the algorithm model can publish the corresponding control data on the agreed DDS topic according to the data subscription instruction, so that the data subscription terminal of the data distribution layer can read the control data and send it to the corresponding master control PLC according to the model result lookup table, and perform feedback control on the master control PLC.

[0069] In summary, the data transmission method based on the DDS protocol provided in this application constructs a data distribution layer based on the DDS protocol, and builds one or more DDS topics associated with the model application layer within this data distribution layer. This data distribution layer is used to acquire and store the status data of various sensors and controllers in the data acquisition layer. When the model application layer issues one or more data subscription instructions to acquire status data, the data distribution layer can publish the corresponding status data on one or more agreed topics according to the one or more data subscription instructions, so as to distribute the status data to the associated model application layer for processing. When it is necessary to control the controller, the data distribution layer can also send a data subscription instruction to read the control data published by the model application layer on the agreed topics, and control the corresponding controller according to the control data. This application embodiment can provide rich QoS service quality policies through DDS services, ensuring the real-time, efficient, and flexible distribution of industrial data, meeting the transmission requirements of high real-time performance and high concurrency of large amounts of data in industrial data.

[0070] like Figure 4 As shown, this application embodiment also provides a data transmission system based on the DDS protocol. This system can be used to implement any step of the above-described data transmission method based on the DDS protocol and its optional embodiments. The system includes a data distribution layer 300 based on the DDS protocol built between the data acquisition layer and the model application layer. The data distribution layer 300 stores at least one DDS topic associated with the model application layer. The data distribution layer 300 includes an acquisition module 301, a publishing module 302, and a subscription module 303.

[0071] The acquisition module 301 is used to acquire the status data of each sensor and controller in the data acquisition layer and acquire the first data subscription instruction of the model application layer; the publishing module 302 is used to respond to the first data subscription instruction of the model application layer and publish the corresponding status data on the agreed first DDS topic; the subscription module 303 is used to read the status data on the first DDS topic and send it to the model application layer for processing.

[0072] In some embodiments, the acquisition module 301 is further configured to acquire a second data subscription instruction from the data distribution layer, the publishing module 302 is configured to respond to the second data subscription instruction from the data distribution layer and publish the corresponding control data generated by the model application layer processing the state data on the agreed second DDS topic, and the subscription module 303 is configured to read the control data on the second DDS topic and send it to the corresponding controller to control the controller.

[0073] It should be understood that the systems or modules in the embodiments of this application can be implemented by software, for example, by computer programs or instructions having the above-described functions. The corresponding computer programs or instructions can be stored in the internal memory of the terminal, and the processor reads the corresponding computer programs or instructions from the memory to implement the above functions. Alternatively, the systems or modules in the embodiments of this application can also be implemented by hardware. Or, the systems or modules in the embodiments of this application can also be implemented by a combination of a processor and software modules.

[0074] It should be understood that the processing details of the system or module in the embodiments of this application can be found by referring to... Figures 1-3 The descriptions of the embodiments and related extended embodiments shown will not be repeated in this application.

[0075] Figure 5 This is a schematic structural diagram of a computing device 1000 provided in an embodiment of this application. The computing device 1000 includes: a processor 1010, a memory 1020, a communication interface 1030, and a bus 1040.

[0076] It should be understood that Figure 5 The communication interface 1030 in the computing device 1000 shown can be used to communicate with other devices.

[0077] The processor 1010 can be connected to the memory 1020. The memory 1020 can be used to store the program code and data. Therefore, the memory 1020 can be a storage unit inside the processor 1010, an external storage unit independent of the processor 1010, or a component that includes both the storage unit inside the processor 1010 and the external storage unit independent of the processor 1010.

[0078] Optionally, the computing device 1000 may also include a bus 1040. The memory 1020 and communication interface 1030 can be connected to the processor 1010 via the bus 1040. The bus 1040 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1040 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The symbol is represented by only one line, but this does not mean that there is only one bus or one type of bus.

[0079] It should be understood that in the embodiments of this application, the processor 1010 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Alternatively, the processor 1010 may employ one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0080] The memory 1020 may include read-only memory and random access memory, and provides instructions and data to the processor 1010. A portion of the processor 1010 may also include non-volatile random access memory. For example, the processor 1010 may also store device type information.

[0081] When the computing device 1000 is running, the processor 1010 executes the computer execution instructions in the memory 1020 to perform the operation steps of the above method.

[0082] It should be understood that the computing device 1000 according to the embodiments of this application can correspond to the corresponding subject in executing the methods according to the various embodiments of this application, and the other operations and / or functions of each module in the computing device 1000 are respectively for implementing the corresponding processes of the methods of this embodiment. For the sake of brevity, they will not be described in detail here.

[0083] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0084] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0085] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

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

[0087] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0088] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0089] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is used to perform the above-described method, which includes at least one of the schemes described in the above embodiments.

[0090] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0091] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0092] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0093] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0094] It should be noted that the embodiments described in this application are merely some embodiments, not all embodiments. The components of the embodiments of this application typically described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the above detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0095] The terms "first, second, third, etc." or similar terms such as module A, module B, module C, etc., used in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that a specific order or sequence may be interchanged where permitted so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0096] In the above description, the labels indicating the steps do not necessarily mean that the steps will be executed. They may include intermediate steps or be replaced by other steps. Where permissible, the order of the steps may be interchanged or executed simultaneously.

[0097] The term "comprising" as used in the specification and claims should not be construed as limiting itself to what follows; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the mentioned feature, integral, step, or component, but does not exclude the presence or addition of one or more other features, integrals, steps, or components, or groups thereof. Thus, the statement "device comprising means A and B" should not be limited to a device consisting solely of components A and B.

[0098] The terms "an embodiment" or "an embodiment" as used in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in at least one embodiment of this application. Therefore, the terms "in one embodiment" or "in an embodiment" appearing throughout this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. Furthermore, in the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions between different embodiments are consistent and can be mutually referenced. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0099] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present application has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, all of which fall within the scope of protection of the present invention.

Claims

1. A data transmission method based on the DDS protocol, characterized in that, A data distribution layer based on the DDS protocol is constructed between the data acquisition layer and the model application layer. This data distribution layer stores at least one DDS topic associated with the model application layer; the data distribution layer is used for: The data acquisition layer acquires the status data of each sensor and controller, and acquires the first data subscription instruction of the model application layer; the data acquisition layer acquires the status data of each sensor and controller through the OPCUA protocol. In response to the first data subscription instruction of the model application layer, the corresponding state data is published on the agreed first DDS topic; the data distribution layer converts the state data of the OPCUA protocol into state data of the DDS protocol through protocol conversion. Read the state data on the first DDS topic and distribute it to the model application layer for processing; A second data subscription instruction is sent to the model application layer, and control data published by the model application layer on the agreed second DDS topic according to the second data subscription instruction is read. The corresponding controller is controlled according to the control data. The control data is generated by the model application layer processing the state data.

2. The method according to claim 1, characterized in that, The data distribution layer includes a first data publisher and a first data subscriber associated with the first DDS topic. The first data publisher is connected to at least one database of the data distribution layer, and the first data subscriber is connected to at least one data model of the model application layer. The first data subscription terminal is used to obtain the first data subscription instruction from the model application layer and send it to the first data publishing terminal; The first data publishing terminal is used to publish corresponding status data on the agreed first DDS topic according to the first data subscription instruction; The first data subscription terminal is also used to read the status data on the first DDS topic and distribute it to at least one data model in the model application layer for processing.

3. The method according to claim 1, characterized in that, The data distribution layer includes a second data publisher and a second data subscriber associated with the second DDS topic. The second data publisher is connected to at least one data model of the model application layer, and the second data subscriber is connected to at least one control terminal of the data distribution layer. The second data subscriber is used to obtain the second data subscription instruction from the data distribution layer and send it to the second data publisher; The second data publishing terminal is used to publish corresponding control data on the agreed second DDS topic according to the second data subscription instruction; The second data subscription terminal is also used to read control data on the second DDS topic and distribute it to at least one control terminal of the data distribution layer, and control the corresponding controller according to the control data.

4. The method according to claim 2 or 3, characterized in that, When multiple data subscribers subscribe to the same status data or control data, the data publisher and multiple data subscribers use a shared memory transmission mechanism to transmit the status data or control data.

5. The method according to claim 2 or 3, characterized in that, The data publishing end publishes data on the agreed DDS topic through data writers, and the data subscription end reads data on the agreed DDS topic through data readers.

6. A data transmission system based on the DDS protocol, characterized in that, The data distribution layer includes a DDS protocol-based data distribution layer built between the data acquisition layer and the model application layer, the data distribution layer storing at least one DDS topic associated with the model application layer; the data distribution layer includes: The acquisition module is used to acquire the status data of each sensor and controller in the data acquisition layer and to acquire the first data subscription instruction in the model application layer; the data acquisition layer acquires the status data of each sensor and controller through the OPCUA protocol. The publishing module is used to respond to the first data subscription instruction of the model application layer and publish the corresponding state data on the agreed first DDS topic; the data distribution layer converts the state data of the OPCUA protocol into the state data of the DDS protocol through protocol conversion. The subscription module is used to read the state data on the first DDS topic and distribute it to the model application layer for processing. The acquisition module is further configured to acquire the second data subscription instruction of the data distribution layer, and the publishing module is further configured to respond to the second data subscription instruction of the data distribution layer and publish the corresponding control data generated by the model application layer processing the state data on the agreed second DDS topic. The subscription module is further configured to read the control data on the second DDS topic and send it to the corresponding controller to control the controller.

7. A computing device, characterized in that, include: processor; Memory, used to store one or more programs; When the processor executes the one or more programs, the processor implements a data transmission method based on the DDS protocol as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a computer, the computer program implements a data transmission method based on the DDS protocol as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Distributed industrial data distribution method based on DDS

    CN109547529A