Data distribution service processing method and device, electronic equipment and storage medium

By obtaining and processing system encoding parameters in an embedded system and configuring interface functions for data distribution services, the problem of complexity of DCPS layer application interfaces is solved, simplified development and debugging processes are realized, and user experience is improved.

CN119520602APending Publication Date: 2025-02-25BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311059561.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In embedded systems, the application interface of the DCPS layer of the data distribution service is complex and difficult to develop and debug.

Method used

By obtaining the system encoding parameters of the embedded system, determining the configuration parameters related to the data distribution service, and processing them as global variable information of the configuration data used by the DLRL layer, using this global variable information to configure the interface function of the data distribution service, providing a streamlined calling interface.

Benefits of technology

It simplifies the development and debugging process of data distribution services in embedded systems, reduces the complexity of use and the difficulty of parameter debugging, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520602A_ABST
    Figure CN119520602A_ABST
Patent Text Reader

Abstract

The invention discloses a data distribution service processing method and device, electronic equipment and a storage medium, and relates to the field of data transmission. The method comprises the following steps: acquiring system coding parameters of the embedded system; configuration parameters related to the data distribution service are determined from the system coding parameters, the configuration parameters comprise configuration parameters of a first entity object, and a plurality of second entity objects of a DCPS layer are packaged in the first entity object; processing the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer; and configuring an interface function of the data distribution service by using the global variable information. According to the method, entity creation, initialization and data publishing and subscribing interfaces of the DCPS are packaged in the DLRL layer, and the interface function is configured, so that a set of simplified calling interface is provided for developers, and convenience is provided for the developers. The technical problems that an application interface of a data distribution service DCPS layer in an embedded system is complex to use and difficult to develop and debug are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a processing method, device, electronic device and storage medium for data distribution services. Background Art

[0002] At present, when using Data Distribution Service (DDS) as middleware for communication development, the application program interface (API) of the Data-Centric Publish Subscribe (DCPS) layer specified by the Object Management Group (OMG) is usually used.

[0003] However, the application interface of the DCPS layer is a general design. In actual use, the call stack is very complex, and it is necessary to create the entity objects of the data distribution service layer by layer and set the quality of service (QoS) attribute values ​​accordingly. Taking the publication of data on a certain topic as an example, it is necessary to call the interface of the DCPS layer and create five objects, DomainParticipantFactory, DomainParticipant, Publisher,DataWriter, and Topic, in sequence, and set the QoS attribute values ​​of five levels, namely DomainParticipantFactoryQos, DomainParticipantQos, PublisherQos, DataWriterQos, and TopicQos, for the five objects respectively. It can be seen that the above calling process greatly increases the complexity of use and the difficulty of debugging parameters for embedded systems. Summary of the invention

[0004] In view of this, the present application provides a data distribution service processing method, device, electronic device and storage medium, which can solve the technical problem that the application interface of the data distribution service DCPS layer in the embedded system is complex to use and difficult to develop and debug.

[0005] In a first aspect, the present application provides a method for processing a data distribution service, comprising:

[0006] Get the system encoding parameters of the embedded system;

[0007] Determining, from the system coding parameters, configuration parameters related to the data distribution service, the configuration parameters comprising configuration parameters of a first entity object, the first entity object encapsulating a plurality of second entity objects of a DCPS layer;

[0008] Processing the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer;

[0009] The interface function of the data distribution service is configured using the global variable information, and the interface function is used to process the data communication corresponding to the data distribution service in the embedded system.

[0010] In a second aspect, the present application provides a processing device for a data distribution service, including:

[0011] An acquisition unit configured to acquire system encoding parameters of the embedded system;

[0012] a determining unit configured to determine configuration parameters related to the data distribution service from the system encoding parameters, the configuration parameters comprising configuration parameters of a first entity object, the first entity object encapsulating a plurality of second entity objects of a DCPS layer;

[0013] A processing unit, configured to process the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer;

[0014] The configuration unit is configured to configure the interface function of the data distribution service using the global variable information, wherein the interface function is used to process the data communication corresponding to the data distribution service in the embedded system.

[0015] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the processing method for the data distribution service described in the first aspect is implemented.

[0016] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the processing method for the data distribution service described in the first aspect when executing the computer program.

[0017] By means of the above technical scheme, the present application provides a method, device, electronic device and storage medium for processing a data distribution service, which first obtains the system coding parameters of the embedded system, and determines the configuration parameters related to the data distribution service in the system coding parameters. Among them, the configuration parameters include the configuration parameters of the first entity object, and the first entity object encapsulates multiple second entity objects of the DCPS layer. Then, the configuration parameters are processed to obtain the global variable information of the configuration data used by the DLRL layer, and the interface function of the data distribution service is configured using the global variable information. In order to facilitate the embedded platform application layer code to use the data distribution service for data communication, the present application encapsulates the entity creation, initialization and data publishing and subscription interface of the DCPS at the DLRL layer, and configures the interface function according to the determined configuration parameters, providing developers with a set of streamlined calling interfaces, thereby facilitating developers to use the data distribution service for communication. The technical problem that the application interface of the DCPS layer of the data distribution service in the embedded system is complex to use and difficult to develop and debug is solved, thereby improving the user experience.

[0018] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 A schematic diagram showing a process flow of a data distribution service processing method provided by an embodiment of the present application;

[0022] Figure 2 A flow chart showing another method for processing a data distribution service provided by an embodiment of the present application is shown;

[0023] Figure 3 A schematic diagram of the principles of a configuration code generation tool and a template engine provided in an embodiment of the present application is shown;

[0024] Figure 4A schematic diagram showing an application example after encapsulating an entity provided in an embodiment of the present application;

[0025] Figure 5 A schematic diagram of the data publishing and subscription process provided by an embodiment of the present application is shown;

[0026] Figure 6 A schematic diagram of the structure of a processing device for a data distribution service provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0027] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0028] In order to solve the technical problem that the application interface of the DCPS layer of the data distribution service in the embedded system is complex to use and difficult to develop and debug, this embodiment proposes a processing method for the data distribution service. Figure 1 As shown, the method includes:

[0029] S101, obtaining system encoding parameters of the embedded system.

[0030] System encoding parameters refer to hard-coded parameters in the embedded system, such as the embedded system's entity object configuration (such as Topic / Writer / Reader configuration) and entity service quality attribute values ​​(QoS attributes), maximum number of instances, maximum number of samples, DataWriter's heartbeat period, etc.

[0031] Taking the configuration of some entity objects as an example, dw_qos.protocol.rtps_object_id = 100, which means setting the rtps object id of DataWriter; dw_qos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS; which means setting the reliabilityQos type of DataWriter. These specific assignments belong to the above-mentioned system coding parameters.

[0032] S102: Determine configuration parameters related to the data distribution service from system coding parameters.

[0033] Among them, the configuration parameters include the configuration parameters of the first entity object, and the first entity object encapsulates multiple second entity objects of the DCPS layer. First of all, the DCPS layer is the core layer of the DDS service, which is data-centric and is used to provide the functions of publishing and subscribing to data, so that publishers can publish their own data, subscribers can subscribe to the data of interest, and establish a maintenance-free and fast data channel. The second entity object here is a stateful DDS communication object in the traditional DCPS layer, including DomainParticipant, Publisher, Subscriber, Topic, DataWriter and DataReader. The first entity object is obtained by encapsulating multiple second entity objects. For example, it can be encapsulated into a first context entity object, a first publishing entity object and a first subscription entity object according to the type.

[0034] S103, processing the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer.

[0035] The DLRL (Data-Local Reconstruction layer) is a local data reconstruction layer and an optional layer of the DDS service. It is built between the DCPS and the application layer and encapsulates the services provided by the DCPS layer, allowing the application layer to quickly access data and simplifying the programming work of the application layer.

[0036] S104, configuring the interface function of the data distribution service using the global variable information.

[0037] The interface function is used to process data communication corresponding to the data distribution service in the embedded system. That is, by encapsulating the second entity interface and designing the interface function at the DLRL layer, an application interface at the DLRL layer is provided for developers.

[0038] In this embodiment, the system coding parameters of the embedded system are first obtained, and the configuration parameters related to the data distribution service are determined in the system coding parameters. Among them, the configuration parameters include the configuration parameters of the first entity object, and the first entity object encapsulates multiple second entity objects of the DCPS layer. Then the configuration parameters are processed to obtain the global variable information of the configuration data used by the DLRL layer, and the interface function of the data distribution service is configured using the global variable information. In order to facilitate the embedded platform application layer code to use the data distribution service for data communication, by encapsulating the entity creation, initialization and data publishing and subscription interface of the DCPS at the DLRL layer, and configuring the interface function according to the determined configuration parameters, a set of streamlined calling interfaces is provided to developers, thereby facilitating developers to use the data distribution service for communication. The existing DDS initialization process is solved. The technical problems of being too complicated to start and create, and the parameter configuration and steps are numerous, and the user experience is improved. In addition, the technical solution provided in this embodiment also simplifies the development process of using DDS for communication in embedded devices, making application developers faster and more efficient when using DDS development, and easy to debug the system.

[0039] In addition, since many embedded system environments lack file systems and other limitations and cannot read configuration files, many of these creation and configuration processes need to be hard-coded in the user-level logic code, increasing the complexity of embedded system development and debugging. Moreover, most of the embedded devices in the Internet of Things network act as edge nodes and their functions are relatively static. Due to system resources (system memory, etc.) and functional limitations, they will only contain one DomainParticipant, and all entity objects will be created at one time when the system is initialized, and their associated QoS attribute values ​​will also be solidified in the program and do not need to be dynamically modified. Most DCPS dynamic creation interfaces are not used in embedded devices, resulting in a waste of resources. However, the technical solution provided in this embodiment uses a streamlined DLRL layer interface design, which does not require reading related configurations in the user-level logic code, nor does it require creating multiple dynamic interfaces, thereby saving this part of wasted resources and making application developers faster and more efficient when using DDS development.

[0040] Optionally, determining configuration parameters related to the data distribution service from the system coding parameters includes: processing the system coding parameters to obtain a configuration file; and reading the configuration parameters related to the data distribution service from the configuration file.

[0041] In this embodiment, before obtaining the configuration parameters, the system coding parameters need to be processed to obtain a configuration file, and then the configuration parameters related to the data distribution service are read from the configuration file, so as to facilitate the subsequent configuration of the interface function and the encapsulation of the entity.

[0042] Further, the system encoding parameters are processed to obtain a configuration file, including: converting the system encoding parameters into a configuration file in a preset format;

[0043] Reading configuration parameters related to the data distribution service from the configuration file includes: using a configuration code generation tool to read the configuration parameters related to the data distribution service from a configuration file in a preset format.

[0044] In this embodiment, the steps of obtaining configuration parameters are further described. First, the system coding parameters need to be converted into a configuration file in a preset format, where the preset format may include an Extensible Markup Language (XML) format or a JavaScript Object Notation (JSON) format. Then, a configuration code generation tool is used to read the configuration parameters related to the data distribution service from the configuration file that has been converted into XML or JSON format. By converting the format of the system coding parameters and reading them using the configuration code generation tool, the difficulty of obtaining configuration parameters from a large number of system coding parameters is simplified, thereby facilitating the subsequent configuration of interface functions and the encapsulation of entities.

[0045] Optionally, filling the configuration parameters related to the data distribution service into the corresponding configuration code template to generate instantiated code information includes: using a configuration code generation tool to fill the read configuration parameters related to the data distribution service into the corresponding configuration code template to generate code information. The code information includes global variable information.

[0046] In this embodiment, the configuration code template may use the jinja2 template engine to generate instantiated code information, wherein the code information includes global variable information for designing the interface function, thereby realizing the subsequent configuration of the interface function.

[0047] Furthermore, configuring the interface function of the data distribution service using the global variable information includes: configuring the interface function of the data distribution service using code information containing the global variable information.

[0048] In this embodiment, using global variable information to configure the interface function of the data distribution service specifically uses code information containing global variable information to configure the interface function of the data distribution service, thereby realizing the configuration of the interface function.

[0049] Optionally, the system coding parameters include: system coding parameters of the embedded system, entity object configuration and entity service quality attribute values; using a configuration code generation tool, the configuration parameters related to the data distribution service read are filled into a corresponding configuration code template to generate instantiated code information, including: using the configuration code generation tool to determine a target configuration code template of a type corresponding to the configuration parameters, and filling the configuration parameters into the target configuration code template to generate code information.

[0050] In this embodiment, the system coding parameters include hard-coded parameters such as system resource parameters, Topic / Writer / Reader configuration and Qos attributes. Using the configuration code generation tool, the configuration parameters related to the data distribution service are filled into the corresponding configuration code template to generate instantiated code information. Specifically, the configuration code generation tool is used to determine the target configuration code template of the corresponding type of the configuration parameters. Then, the configuration parameters are filled into the target configuration code template to generate code information. The efficiency of the configuration code generation tool in obtaining configuration parameters is improved.

[0051] Optionally, the first entity object includes: a first context entity object, a first publishing entity object and a first subscription entity object; the first context entity object encapsulates multiple second context entity objects related to the publishing and subscription operations of the DCPS layer; the first publishing entity object encapsulates multiple second publishing entity objects related to data publishing of the DCPS layer; the first subscription entity object encapsulates multiple second subscription entity objects related to data publishing of the DCPS layer.

[0052] In this embodiment, the first entity object may include a first context entity object Bus context, a first publishing entity object Bus writer, and a first subscription entity object Bus reader, and may also include topic / instance of each topic and the corresponding data type Type. Among them, the first context entity object Bus context encapsulates multiple second context entity objects related to the publishing and subscription operations of the DCPS layer, such as DomainParticipantFactory, DomainParticipant, DomainParticipantQos, etc. The above objects in each application are unique. The first subscription entity object Bus reader encapsulates Subscriber, SubscriberQos, DataReader, DataReaderQos, DataReaderListener, and the Topic and type information corresponding to DataReader, and can receive data subscriptions according to the callback passed in by the user. The first publishing entity object Bus writer encapsulates Publisher, PublisherQos, DataWriter, DataWriterQos, DataWriterListener, and the Topic and Type information corresponding to DataWriter, and can publish data through the publish interface. Entity encapsulation makes the functions more centralized, thereby facilitating developers to communicate using data distribution services.

[0053] like Figure 2 FIG. 1 shows another method for processing data distribution services provided by this embodiment, and describes the steps of obtaining code information containing global variable information. The method includes:

[0054] S201, obtaining system encoding parameters of the embedded system.

[0055] S202, converting the system encoding parameters into a configuration file in a preset format.

[0056] S203: Using a configuration code generation tool, read configuration parameters related to the data distribution service from a configuration file in a preset format.

[0057] S204, filling the read configuration parameters related to the data distribution service into the corresponding configuration code template to generate instantiated code information.

[0058] S205: Use the code information including the global variable information to configure the interface function of the data distribution service.

[0059] In this embodiment, the system coding parameters are first converted into a configuration file in a preset format. The system coding parameters here include hard-coded parameters such as system resource parameters, Topic / Writer / Reader configuration and Qos attributes. The preset format can generally be selected in XML format or JSON format, so that the configuration code generation tool can be used to read the configuration parameters related to the data distribution service from the configuration file in the preset format. Then, the read configuration parameters related to the data distribution service are filled in the corresponding configuration code template to generate instantiated code information. Finally, the interface function of the data distribution service can be configured according to the code information containing global variable information. Among them, the principles of the configuration code generation tool and the jinja2 template engine are as follows Figure 3 As shown. By encapsulating the entity creation, initialization and data publishing and subscription interface of DCPS in the DLRL layer, and configuring the interface function according to the determined configuration parameters, a set of streamlined calling interfaces is provided to developers, thereby facilitating developers to use data distribution services for communication. The technical problems of the existing DDS initialization process being too complicated to start and create, and having numerous parameter configurations and steps are solved, thereby improving the user experience. In addition, the technical solution provided in this embodiment also simplifies the development process of using DDS for communication in embedded devices, making it faster and more efficient for application developers to develop using DDS, and easier to debug the system.

[0060] Furthermore, the present embodiment also exemplarily provides encapsulation types of some interfaces and corresponding interface function configuration methods. Of course, the encapsulation type and configuration method can also be determined by the user according to the actual application scenario.

[0061] Package types may include:

[0062] Context encapsulation entity bus_context_t: Encapsulates the context entities related to the publishing and subscription operations in the DCPS Entity, and encapsulates the common properties such as DomainParticipantFactory, DomainParticipant, DomainParticipantQos, service discovery configuration, network interface configuration, etc. into the bus_context_t object for life cycle management.

[0063] Publishing encapsulation entity bus_writer_t: Encapsulates the entity that publishes data in DCPS Entity, and encapsulates DataWriter, DataWriterQos, DataWriterListener and the Topic / Type information they depend on.

[0064] Subscription encapsulation entity bus_reader_t: encapsulates the entity for data subscription in DCPS Entity, and encapsulates DataReader, DataReaderQos, DataReaderListener and its dependent Topic / Type information.

[0065] Interface function configuration may include:

[0066] bus_register_profile loads system configuration: This interface function is used to load the configuration data structure in the configuration code (generated by the configuration code generation tool busconfgen). The process is as follows:

[0067] Load network interface configuration; load service discovery configuration; load domain_id; load topic related configuration; load datawriter, datareader related configuration; load Qos configuration.

[0068] bus_register_reader_callback registers subscription data callback: This interface is used to register the user's callback function for processing subscription data. The callback function will be triggered when the data arrives. The process is: mount the user callback function pointer to DataReaderListener. When the RTPS layer receives the data, it will trigger the user's registered callback function through DataReaderListener to perform business logic processing on the data.

[0069] bus_init system initialization: This interface is used to initialize all components of the DDS system. The process is as follows: initialize Writer Histroy and Reader History modules; initialize Udp interface; initialize service discovery module; create entities at the DomainParticipant, publisher, and subscriber levels, initialize all Topics, and register corresponding Types; create all bus_writers according to the configuration, encapsulate DataWriter, DataWriterQos, and DataWriterListener in bus_writer, and establish a hash mapping table from topic to bus_writer; create all bus_readers according to the configuration, encapsulate DataReader, DataReaderQos, and DataReaderListener in bus_reader, and establish a hash mapping table from topic to bus_reader; Enable all DDSEntity, and the service startup is complete.

[0070] bus_publish publishes data: This interface is used to publish data sample data created by the user to a specific topic. The process is as follows: According to the topic in the parameter, the corresponding DataWriter is found from the hash mapping table from topic to bus_writer, and the write function interface of the DCPS layer DataWriter is called to publish the data.

[0071] Figure 4 The following is an application example after encapsulating entities according to the above method, where mvbs1 and mvbs2 can be regarded as two nodes publishing and subscribing to data. Both nodes include encapsulated entities such as bus_reader and bus_writer, and interact through the subject Topic and data type data type. Figure 5 The process of data publishing and subscription using the encapsulated interface bus api is shown. The data subscription process includes calling bus_register_profile to load the global configuration (the configuration code is generated by the configuration code generation tool busconfgen), then calling bus_register_reader_callback to register the callback function for processing when the data arrives, and finally calling bus_init to initialize the DDS system. The data publishing process includes calling bus_register_profile to load the global configuration, then calling bus_init to initialize the DDS system, and finally creating a data sample and calling the bus_writer_publish interface to publish the data.

[0072] Further, as Figures 1 to 5 The specific implementation of the method shown in the embodiment provides a processing device for data distribution service, such as Figure 6 As shown, the device includes: an acquisition unit 601, a determination unit 602, a processing unit 603 and a configuration unit 604.

[0073] The acquisition unit 601 is configured to acquire system encoding parameters of the embedded system;

[0074] The determining unit 602 is configured to determine configuration parameters related to the data distribution service from the system coding parameters, wherein the configuration parameters include configuration parameters of a first entity object, wherein the first entity object encapsulates a plurality of second entity objects of a DCPS layer;

[0075] The processing unit 603 is configured to process the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer;

[0076] The configuration unit 604 is configured to configure the interface function of the data distribution service using the global variable information, wherein the interface function is used to process the data communication corresponding to the data distribution service in the embedded system.

[0077] In a specific application scenario, the determination unit 602 is specifically configured to process the system encoding parameters to obtain a configuration file; read the configuration parameters related to the data distribution service from the configuration file.

[0078] In a specific application scenario, the determination unit 602 is further configured to convert the system encoding parameters into a configuration file in a preset format; reading the configuration parameters related to the data distribution service from the configuration file includes: using a configuration code generation tool to read the configuration parameters related to the data distribution service from the configuration file in the preset format.

[0079] In a specific application scenario, the processing unit 603 is further configured to process the configuration parameters related to the data distribution service to obtain the global variable information of the configuration data used by the DLRL layer, including: using the configuration code generation tool to fill in the read configuration parameters related to the data distribution service into the corresponding configuration code template to generate instantiated code information, wherein the code information includes the global variable information.

[0080] In a specific application scenario, the configuration unit 604 is further configured to configure the interface function of the data distribution service using the global variable information, including: configuring the interface function of the data distribution service using the code information containing the global variable information.

[0081] In a specific application scenario, the configuration unit 604 is further configured to use the configuration code generation tool to determine a target configuration code template of a type corresponding to the configuration parameter, and fill the configuration parameter into the target configuration code template to generate the code information.

[0082] It should be noted that for other corresponding descriptions of the functional units involved in the processing device for a data distribution service provided in this embodiment, reference can be made to Figures 1 to 5 The corresponding description in will not be repeated here.

[0083] Based on the above Figures 1 to 5 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figures 1 to 5 The method shown.

[0084] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0085] Based on the above Figures 1 to 5 The method shown, and Figure 6 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides an electronic device, which can be configured on a computer side or a vehicle side, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 5 The method shown.

[0086] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0087] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.

[0088] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0089] Through the description of the above implementation methods, technical personnel in this field can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By encapsulating the entity creation, initialization and data publishing and subscription interfaces of DCPS at the DLRL layer, and configuring the interface functions according to the determined configuration parameters, a set of streamlined calling interfaces is provided to developers, thereby facilitating developers to use data distribution services for communication. The technical problem that the application interface of the DCPS layer of the data distribution service in embedded systems is complex to use and difficult to develop and debug is solved, thereby improving the user experience.

[0090] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0091] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.

Claims

1. A method for processing data distribution services, characterized in that: include: Get the system encoding parameters of the embedded system; Determining, from the system coding parameters, configuration parameters related to the data distribution service, the configuration parameters comprising configuration parameters of a first entity object, the first entity object encapsulating a plurality of second entity objects of a DCPS layer; Processing the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer; The interface function of the data distribution service is configured using the global variable information, and the interface function is used to process the data communication corresponding to the data distribution service in the embedded system.

2. The method according to claim 1, characterized in that: Determining configuration parameters related to the data distribution service from the system encoding parameters includes: Processing the system encoding parameters to obtain a configuration file; The configuration parameters related to the data distribution service are read from the configuration file.

3. The method according to claim 2, characterized in that The step of processing the system encoding parameters to obtain a configuration file includes: Converting the system encoding parameters into a configuration file in a preset format; The step of reading the configuration parameters related to the data distribution service from the configuration file includes: The configuration parameters related to the data distribution service are read from the configuration file in the preset format using a configuration code generation tool.

4. The method according to claim 3, characterized in that The processing of the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer includes: The configuration code generation tool is used to fill the read configuration parameters related to the data distribution service into the corresponding configuration code template to generate instantiated code information, wherein the code information includes the global variable information.

5. The method according to claim 4, characterized in that The interface function of configuring the data distribution service by using the global variable information includes: The interface function of the data distribution service is configured using the code information including the global variable information.

6. The method according to claim 4, characterized in that The system coding parameters include: system coding parameters of the embedded system, entity object configuration and entity service quality attribute value; The configuration code generation tool is used to fill the read configuration parameters related to the data distribution service into the corresponding configuration code template to generate instantiated code information, including: The configuration code generation tool is used to determine a target configuration code template of a type corresponding to the configuration parameter, and the configuration parameter is filled into the target configuration code template to generate the code information.

7. The method according to any one of claims 1 to 6, characterized in that The first entity object includes: a first context entity object, a first publishing entity object and a first subscription entity object; The first context entity object encapsulates a plurality of second context entity objects related to the publishing and subscribing operations of the DCPS layer; The first publishing entity object encapsulates a plurality of second publishing entity objects related to data publishing of the DCPS layer; The first subscription entity object encapsulates a plurality of second subscription entity objects related to data publishing at the DCPS layer.

8. A processing device for data distribution service, characterized in that: include: An acquisition unit configured to acquire system encoding parameters of the embedded system; a determining unit configured to determine configuration parameters related to the data distribution service from the system coding parameters, the configuration parameters comprising configuration parameters of a first entity object, the first entity object encapsulating a plurality of second entity objects of a DCPS layer; A processing unit, configured to process the configuration parameters related to the data distribution service to obtain global variable information of the configuration data used by the DLRL layer; The configuration unit is configured to configure the interface function of the data distribution service using the global variable information, wherein the interface function is used to process the data communication corresponding to the data distribution service in the embedded system.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.