Method and related apparatus for mapping between service layers facing DDS and TSN

By establishing a mapping relationship between DDS and TSN, the problems of non-universality and high cost of existing DDS and TSN fusion schemes are solved, achieving efficient and universal network mapping and enhancing the real-time performance and determinism of the network.

CN120455572BActive Publication Date: 2025-10-17XIAN MICROELECTRONICS TECH INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510963053.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-17
Estimated Expiration
2045-07-14

AI Technical Summary

Technical Problem

Existing DDS and TSN integration solutions suffer from issues such as lack of universality, high development difficulty, and high application costs. They are incompatible with other systems and require secondary development of the DDS protocol, thus lacking universality.

Method used

By receiving DDS layer data packets, extracting mapped network parameters, and constructing TSN layer data packets according to preset mapping relationships, the mapping relationship between DDS layer data packets and TSN layer data packets is set in combination with DDS layer topics and QoS policies to achieve one-to-one or many-to-one mapping, shielding the underlying TSN network configuration and enhancing network flexibility.

Benefits of technology

It enables the matching between DDS layer application messages and TSN layer real-time data frames of different performance levels, ensuring the efficiency and universality of the mapping process, reducing development and maintenance costs, and enhancing the real-time performance and determinism of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455572B_ABST
    Figure CN120455572B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of communication, and discloses a service layer intermapping method and related device for DDS and TSN, which comprises receiving a DDS layer data packet and extracting mapping network parameters in the DDS layer data packet; obtaining mapping service parameters of a TSN layer data packet based on a preset mapping relationship according to the mapping network parameters; extracting service data in the DDS layer data packet and combining the mapping service parameters of the TSN layer data packet to construct a TSN layer data packet; the mapping relationship is obtained by setting the mapping relationship between the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet according to the topic and QoS strategy of the DDS layer. The mapping relationship is constructed by using the field of the DDS data packet, the interlayer mapping between DDS and TSN is realized, the efficiency of the mapping process is ensured, the mapping method is independent of the manufacturer and version of the application layer DDS and the underlying operating system and hardware platform, and is universal.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of communication, and relates to a service inter-layer mapping method for DDS and TSN and a related device. BACKGROUND

[0002] DDS (Data Distribution Service) is a kind of distributed communication specification, which adopts a subscription and publication model. DDS works at the application layer and serves as a kind of data distribution middleware to realize data communication between ends based on a standard socket interface. DDS supports multiple types of service transmission, and when network communication is realized by using DDS technology, only the QoS (Quality of Service) requirement of data and the transmission layer parameter need to be set, so that the user layer communication configuration can be simplified. TSN (Time-Sensitive Networking) is a kind of bottom-layer network technology conforming to the multi-type IEEE (Institute of Electrical and Electronics Engineers) 802 protocol standard, which works at the data link layer. In TSN, the service type is divided into three types, namely, ST (Scheduled Traffic), AVB (Audio Video Bridging) and BE (Best Effort), and the network transmission priority of different service types is different. TSN increases the determinacy and reliability of the standard Ethernet by defining the time-sensitive mechanism of data transmission, so as to ensure the real-time, deterministic and reliable transmission of data.

[0003] DDS and TSN are two horizontal standards of different protocol levels, and the fusion of the two technologies can amplify the advantages of both. TSN at the data link layer can provide real-time and deterministic communication guarantee for the application layer DDS service, and DDS at the application layer can simplify the configuration of the data link layer TSN and improve the compatibility of the network. At present, the schemes related to the fusion of DDS and TSN mainly include the following two kinds. The first fusion scheme realizes the fusion of DDS and TSN by using an adaptation layer and a QoS configuration module. The DDS communication adaptation layer and the TSN network adaptation layer are set between DDS and TSN to encapsulate and analyze the self-defined data format, and the independent QoS configuration module realizes the configuration of the peer network parameters to the publishing end and the subscribing end and whether to enable the bottom-layer TSN. The second fusion scheme realizes the fusion of DDS and TSN by setting identifiers in the QoS. The main content is to distinguish the network scene, the real-time state and the traffic load in the QoS configuration of DDS, and then analyze in TSN and call the corresponding control strategy according to different marks.

[0004] However, the first fusion scheme is only applicable to systems using the same data distribution service in the application layer, and has the defect of being unable to communicate with other systems. In the second fusion scheme, the DDS protocol is developed twice and the identifier set in the QoS does not have universality, and the complexity and use cost are high. In summary, the existing DDS and TSN fusion schemes all need to customize the development of the QoS parameters in DDS, and are incompatible with upper layer services of other versions or manufacturers, and have the problems of non-universality, great development difficulty and high application cost. SUMMARY

[0005] The purpose of the present application is to overcome the shortcomings of the prior art and provide a service layer inter-mapping method for DDS and TSN and related devices.

[0006] To achieve the above purpose, the present application adopts the following technical solutions:

[0007] In a first aspect of the present application, a service layer inter-mapping method for DDS and TSN is provided, comprising: receiving a DDS layer data packet and extracting a mapping network parameter in the DDS layer data packet; obtaining a mapping service parameter of a TSN layer data packet based on a preset mapping relationship according to the mapping network parameter; extracting service data in the DDS layer data packet and combining the mapping service parameter of the TSN layer data packet to construct a TSN layer data packet; wherein the mapping relationship is obtained by setting the mapping relationship between the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet according to the topic and QoS policy of the DDS layer.

[0008] Optionally, the mapping network parameter comprises one or more of the following: source MAC address, destination MAC address, source IP address, destination IP address, source port number and destination port number; and the mapping service parameter of the TSN layer data packet comprises one or more of the following: virtual link identifier, service type and service priority.

[0009] Optionally, the implementation form of the preset mapping relationship is static storage query or linear calculation.

[0010] Optionally, when setting the mapping relationship between the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet: when the forwarding mode of the current service flow is unicast, the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet are one-to-one mapping; and when the forwarding mode of the current service flow is multicast, the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet are many-to-one mapping.

[0011] Optionally, before the obtaining of the mapping network parameter of the TSN layer data packet based on the preset mapping relationship according to the mapping network parameter, the method further comprises: checking the legality of the mapping network parameter.

[0012] Optionally, the method further comprises: receiving the TSN layer data packet and extracting the mapping network parameter of the TSN layer data packet; obtaining the mapping network parameter based on the preset mapping relationship according to the mapping network parameter; extracting the network parameter corresponding to the mapping network parameter in the TSN layer data packet and comparing the mapping network parameter with the network parameter; when the comparison result is consistent, performing the TSN layer data packet receiving process; otherwise, generating a prompt information.

[0013] Optionally, before the obtaining of the mapping network parameter of the TSN layer data packet based on the preset mapping relationship according to the mapping network parameter, the method further comprises: checking the legality of the mapping network parameter.

[0014] In the second aspect of the present application, a service layer interworking system for DDS and TSN is provided, comprising: an extraction module configured to receive a DDS layer data packet and extract a mapping network parameter in the DDS layer data packet; a mapping module configured to obtain a mapping service parameter of a TSN layer data packet based on a preset mapping relationship according to the mapping network parameter; and a data packet construction module configured to extract service data in the DDS layer data packet and construct a TSN layer data packet in combination with the mapping service parameter of the TSN layer data packet; wherein the mapping relationship is obtained by setting the mapping relationship between the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet according to the topic and QoS policy of the DDS layer.

[0015] In the third aspect of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the service layer interworking method for DDS and TSN.

[0016] In the fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the service layer interworking method for DDS and TSN.

[0017] Compared with the prior art, the present application has the following beneficial effects:

[0018] The application is a DDS and TSN oriented service interlayer mapping method, according to network scale and characteristics, combining DDS layer topic and QoS strategy, setting mapping relationship between mapping network parameters of DDS layer data packet and mapping service parameters of TSN layer data packet, realizing information matching between mapping network parameters in DDS layer data packet and mapping service parameters of TSN layer data packet, realizing matching between DDS layer application message and different real-time data frames of TSN layer. By using existing field in DDS data packet, i.e. mapping network parameters to construct mapping relationship, realizing interlayer mapping between DDS and TSN, ensuring high efficiency of mapping process; and the mapping method is independent of application layer DDS manufacturer, version and underlying operating system and hardware platform, and has universality. Based on this interlayer mapping method, complex underlying TSN network configuration can be shielded by using DDS technology in application layer, network flexibility is enhanced, real-time performance and determinacy of DDS service is enhanced by using TSN technology in data link layer, and the combination of the two has the advantages of high mapping efficiency, strong universality and low development and maintenance cost. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The application is a DDS and TSN oriented service interlayer mapping method flow chart.

[0020] Figure 2 The application is a DDS to TSN mapping specific flow chart.

[0021] Figure 3 The application is a TSN to DDS mapping specific flow chart.

[0022] Figure 4 The application is a DDS and TSN oriented service interlayer mapping system structure block diagram.

[0023] Figure 5 The application is an end node function architecture composition diagram.

[0024] Figure 6 The application is a network connection topology diagram.

[0025] Wherein, 1-application layer DDS middleware; 2-operating system; 3-TSN end system; 4-protocol stack; 5-device driver; 6-mapping table module; 7-interlayer mapping module; 8-select mapping parameters; 9-determine mapping rule module; 10-form mapping relationship table module; 11-extraction module; 12-legitimacy check module; 13-execute mapping mechanism module; 14-parameter comparison and verification module; 15-first interface; 16-second interface; 17-first TSN end node; 18-TSN switch node; 19-second TSN end node; 20-first application layer DDS; 21-first data link layer TSN; 22-second data link layer TSN; 23-second application layer DDS; 24-third data link layer TSN. DETAILED DESCRIPTION

[0026] In order to make the personnel in the technical field better understand the application scheme, the technical scheme in the embodiments of the application will be clearly and completely described below in combination with the drawings in the embodiments of the application. Obviously, the described embodiments are only a part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor should belong to the protection scope of the application.

[0027] It should be noted that the terms "first", "second" and the like in the specification and claims of the application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0028] The application will be described in further detail below in combination with the drawings:

[0029] Referring to Figure 1 In an embodiment of the application, a service interlayer mapping method for DDS and TSN is provided, which can realize the matching between DDS layer application messages and different real-time data frames of TSN layer, and further realize the effective fusion of DDS technology and TSN technology, so as to improve the network transmission performance.

[0030] Specifically, the service interlayer mapping method for DDS and TSN includes the following steps:

[0031] S1: receiving a DDS layer data packet and extracting a mapping network parameter in the DDS layer data packet.

[0032] S2: obtaining a mapping service parameter of a TSN layer data packet based on a preset mapping relationship according to the mapping network parameter.

[0033] S3: extracting service data in the DDS layer data packet, and constructing the TSN layer data packet in combination with the mapping service parameter of the TSN layer data packet.

[0034] The mapping relationship is obtained by setting the mapping relationship between the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet according to a topic and a QoS policy of the DDS layer.

[0035] The method for mapping between service layers of DDS and TSN according to the application sets the mapping relationship between the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet according to the network scale and characteristics, in combination with the topic and the QoS policy of the DDS layer, so as to realize information matching between the mapping network parameter in the DDS layer data packet and the mapping service parameter of the TSN layer data packet, and realize matching between the DDS layer application message and different real-time data frames of the TSN layer. The existing field in the DDS data packet, i.e. the mapping network parameter, is used to construct the mapping relationship, so as to realize interlayer mapping between DDS and TSN, and ensure high efficiency of the mapping process. The mapping method is independent of the manufacturer and version of the application layer DDS, and independent of the underlying operating system and hardware platform, and is universal. Based on this interlayer mapping method, the complex underlying TSN network configuration can be shielded by using the DDS technology at the application layer, so as to enhance network flexibility. The real-time performance and determinacy of the DDS service can be enhanced by using the TSN technology at the data link layer, and the combination of the two has the advantages of high mapping efficiency, strong universality and low development and maintenance cost.

[0036] In a possible implementation, the mapping network parameter comprises one or more of the following: a source MAC (Media Access Control) address, a destination MAC address, a source IP (Internet Protocol) address, a destination IP address, a source port number and a destination port number; and the mapping service parameter of the TSN layer data packet comprises one or more of the following: a virtual link identifier, a service type and a service priority.

[0037] Explanatorily, in the system of the fusion of DDS and TSN, the mapping relationship is used to realize the matching between the topics of DDS and the QoS parameters of different services and the different real-time services of TSN, and the construction of the mapping relationship is the premise of realizing the fusion of DDS and TSN communication systems. The mapping relationship is generally bidirectional mapping, and the mapping from DDS to TSN is realized at the sending end based on the mapping relationship, and the mapping from TSN to DDS is realized at the receiving end.

[0038] In a possible implementation, the implementation form of the preset mapping relationship is static storage query or linear calculation. Explanatorily, the static storage query can be in the form of a mapping relationship table.

[0039] In a possible implementation, when the forwarding mode of the current service flow is unicast, the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet are one-to-one mapping; when the forwarding mode of the current service flow is multicast, the mapping network parameter of the DDS layer data packet and the mapping service parameter of the TSN layer data packet are many-to-one mapping.

[0040] Explanatorily, the flow of dynamically constructing the mapping relationship by the transceiving two ends is consistent, and specifically as follows:

[0041] 1) According to the current user demand, the topics and QoS strategies of the DDS layer are determined, and based on this, the mapping object of the DDS layer data packet is determined, but since the topics and QoS strategies of the DDS layer are not attached in the DDS layer data packet, the mapping network parameter in the DDS layer data packet is further used for representation. Explanatorily, in order to ensure the mapping efficiency and protocol specification, a single or a combination of multiple different topics and QoS strategies can be selected to represent different quality of service requirements.

[0042] 2) According to the current network traffic characteristics, the virtual link identifier, service type and service priority of the TSN layer are determined, and based on this, the mapping service parameter of the TSN layer data packet is determined. Explanatorily, in order to ensure the mapping efficiency and protocol specification, a single or a combination of multiple different virtual link identifiers, service types and service priorities can be selected as the mapping service parameter to represent different service real-time and bandwidth requirements.

[0043] 3) The mapping rule is divided into one-to-one mapping and many-to-one mapping according to the forwarding mode of the current service flow, when the service flow is unicast (one source end sends to one destination end), the mapping rule is one-to-one mapping, that is, a group of mapping service parameters of the TSN layer data packet corresponds to a group of mapping network parameters of the DDS layer data packet; when the service flow is multicast (one source end sends to multiple destination ends), the mapping rule is many-to-one mapping, that is, a group of mapping service parameters of the TSN layer data packet corresponds to multiple groups of mapping network parameters of the DDS layer data packet.

[0044] 4) Forming mapping relationship according to the selected mapping parameters and mapping rules, here, in order to improve mapping efficiency, the implementation form of the mapping relationship table in the memory is determined according to the actual network situation, and the currently adopted implementation form is written into the configuration information. The implementation form can be divided into two kinds of static storage query and linear calculation mode.

[0045] 5) In actual communication, the output parameter (the mapping service parameter of the TSN layer data packet or the mapping network parameter of the DDS layer data packet) is obtained from the input parameter (the mapping network parameter of the DDS layer data packet or the mapping service parameter of the TSN layer data packet) through the mapping relationship, and then the corresponding sending / receiving process is executed according to the parameter.

[0046] In a possible implementation, before the mapping network parameter is obtained based on the preset mapping relationship according to the mapping network parameter, the legality of the mapping network parameter is checked.

[0047] For example, whether the IP address in the mapping network parameter of the DDS layer data packet is in the current network segment and whether the port number is in the limited range, etc. are checked to ensure the correctness of the mapping network parameter of the DDS layer data packet.

[0048] In a possible implementation, the DDS and TSN oriented service layer mapping method further includes: receiving a TSN layer data packet and extracting the mapping service parameter of the TSN layer data packet; obtaining the mapping network parameter based on the preset mapping relationship according to the mapping service parameter; extracting the network parameter corresponding to the mapping network parameter in the TSN layer data packet and comparing the mapping network parameter, when the comparison result is consistent, executing the TSN layer data packet receiving process; otherwise, generating a prompt information.

[0049] Explanatorily, when receiving, the mapping service parameter in the TSN layer data packet is mainly mapped to obtain the mapping network parameter of the DDS layer data packet, so as to be compared to ensure the transmission correctness.

[0050] In a possible implementation, before the mapping network parameter is obtained based on the preset mapping relationship according to the mapping service parameter, the legality of the mapping service parameter is checked.

[0051] For example, whether the virtual link identifier in the mapping service parameter of the TSN layer data packet is in the limited range, whether the priority and the service type are matched and whether they are in the limited range, etc. are checked to ensure the correctness of the mapping service parameter of the TSN layer data packet.

[0052] Exemplarily, referring to Figure 2 , the mapping from the sending end DDS to TSN is shown, and the main process is as follows:

[0053] 1), first parse the DDS layer data packet, extract the mapping network parameters of the DDS layer data packet as the mapping input parameters, and check the legality of the input parameters.

[0054] 2), determine the mapping implementation by reading the current configuration information, if the configuration information is a query mapping relationship table, then according to the mapping input parameters, obtain the mapping output parameters by querying the mapping relationship table; if the configuration information is a mapping rule calculation, then according to the mapping input parameters, calculate the mapping output parameters according to the mapping algorithm and judge the legality of the mapping output parameters.

[0055] 3), the mapping output parameters are the mapping service parameters of the TSN layer data packet, and the TSN layer data packet framing is completed in combination with the service data of the DDS layer data packet.

[0056] For example, see Figure 3 , which shows the mapping from TSN to DDS at the receiving end, and the main process is as follows:

[0057] 1), first parse the TSN layer data packet, extract the mapping service parameters of the TSN layer data packet as the mapping input parameters, and check the legality of the input parameters.

[0058] 2), determine the mapping implementation by reading the current configuration information, if the configuration information is a query mapping relationship table, then according to the mapping input parameters, obtain the mapping output parameters by querying the mapping relationship table; if the configuration information is a mapping rule calculation, then according to the mapping input parameters, calculate the mapping output parameters according to the mapping algorithm and judge the legality of the mapping output parameters.

[0059] 3), parse the TSN layer data packet, get the content corresponding to the mapping network parameters of the DDS layer data packet in the TSN layer data packet, and compare and verify with the mapping network parameters of the DDS layer data packet, further judge the correctness of the transmitted TSN layer data packet.

[0060] 4), execute the data receiving process.

[0061] In one possible implementation, the mapping method between DDS and TSN layers is functionally tested, a network composed of two end nodes and a switch node is built, both end nodes use DDS technology at the application layer and TSN technology at the data link layer, the network plans two different real-time requirement services, and result monitoring and data verification are performed at the end nodes.

[0062] After the communication ends, no packet loss or error number occurs, different real-time services can successfully reach the opposite end node after inter-layer mapping, and the average delay jitter of the DDS statistical service is less than 200us. It can be seen that the DDS and TSN inter-layer mapping method designed in the application realizes the mapping of different real-time services in the network, and can guarantee the real-time and determinacy of data communication. The results show that the application has good implementability, and the dynamic mapping table construction and inter-layer service mapping mechanism can flexibly and efficiently complete service mapping, meeting the expectation.

[0063] The following is an apparatus embodiment of the application, which can be used to execute the method embodiment of the application. For details not disclosed in the apparatus embodiment, please refer to the method embodiment of the application.

[0064] Referring to Figure 4 In another embodiment of the application, a DDS and TSN oriented service inter-layer mapping system is provided, which can be used to implement the DDS and TSN oriented service inter-layer mapping method described above. Specifically, the DDS and TSN oriented service inter-layer mapping system comprises an extraction module, a mapping module and a data packet construction module.

[0065] The extraction module is configured to receive a DDS layer data packet and extract mapping network parameters in the DDS layer data packet. The mapping module is configured to obtain mapping service parameters of a TSN layer data packet based on a preset mapping relationship according to the mapping network parameters. The data packet construction module is configured to extract service data in the DDS layer data packet and construct a TSN layer data packet in combination with the mapping service parameters of the TSN layer data packet. The mapping relationship is obtained by setting the mapping relationship between the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet according to the topic and QoS policy of the DDS layer.

[0066] In a possible implementation, the DDS and TSN oriented service inter-layer mapping system further comprises a mapping parameter selection module, a mapping rule determination module and a mapping relationship table formation module. The mapping parameter selection module is configured to determine the mapping network parameters according to the topic and QoS policy of the DDS layer, and determine the mapping service parameters according to the service parameters of the TSN layer data packet. The mapping rule determination module is configured to set the mapping relationship between the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet. The mapping relationship table formation module is configured to generate a mapping relationship table from the mapping relationship.

[0067] In a possible implementation, the DDS and TSN oriented service inter-layer mapping system further comprises a legality checking module configured to check the legality of the mapping network parameters of the DDS layer data packet and check the legality of the mapping service parameters of the TSN layer data packet.

[0068] In a possible implementation, the DDS and TSN oriented inter-service mapping system further comprises a parameter comparison and verification module configured to compare the network parameter corresponding to the mapping network parameter in the TSN layer data packet with the mapping network parameter.

[0069] In a possible implementation, referring to Figure 5 , a functional architecture of an end node is shown. The protocol stack 4, the device driver 5, the mapping table module 6 and the inter-layer mapping module 7 are all functional modules in the operating system. The mapping table module 6 is composed of a mapping parameter selection module 8, a mapping rule determination module 9 and a mapping relationship table formation module 10. The inter-layer mapping module 7 is composed of an extraction module 11, a legality check module 12, an execution mapping mechanism module 13 and a first parameter comparison and verification module 14. Referring to Figure 6 , a network connection topology is shown. The first TSN end node 17 is composed of a first application layer DDS 20 and a first data link layer TSN 21. The TSN switch node 18 mainly comprises a second data link layer TSN 22. The second TSN end node 19 is composed of a second application layer DDS 23 and a third data link layer TSN 24.

[0070] In the communication process, when the end node is a sender, data is sent from the application layer DDS middleware 1 to the operating system 2 via the first interface 15, and the data is encapsulated layer by layer by the protocol stack 4. The device driver 5 mainly realizes the interaction between software and hardware. The DDS and TSN oriented inter-service mapping system of the application is mainly composed of the mapping table module 6 and the inter-layer mapping module 7. The mapping table module 6 realizes the dynamic construction of the mapping table, and the inter-layer mapping module 7 realizes the main service mapping process. Then the data is sent to the TSN end system 3 via the second interface 16, and then sent to the network by the TSN end system 3 via the physical link. When the end node is a receiver, data is sent from the TSN end system 3 to the operating system 2 via the second interface 16. The device driver 5 mainly realizes the interaction between software and hardware. The mapping table module 6 is the basis for mapping execution, and the inter-layer mapping module 7 mainly completes the service mapping work. Then the data is parsed layer by layer by the protocol stack 4, and finally sent to the application layer DDS middleware 1 via the first interface 15.

[0071] The following takes the sending of a UDP (User Datagram Protocol) data packet from the first TSN end node 17 to the second TSN end node 19 as an example to describe the communication process.

[0072] 1) The application layer DDS middleware 1 in the first TSN end node 17 generates data payload.

[0073] 2) The application layer DDS middleware 1 needs to be initialized, the theme and QoS configuration and the end discovery process is performed when sending data for the first time, which includes the following: first, create a DCPS (Data-Centric Publish-Subscribe) system entity, including domain, theme, participant, publisher, subscriber, data writer and data reader; second, configure the theme according to the current data type and select the corresponding QoS policy, which needs to ensure that the theme and QoS policy of both ends match when sending and receiving data of the same type; finally, according to the current network size, adopt centralized discovery or point-to-point discovery mode to realize the communication link establishment of the DDS layer, here, since the network only contains two end nodes, the point-to-point discovery mode is selected to establish the DDS layer connection.

[0074] 3) The application layer DDS middleware 1 encapsulates the data payload, adds the DDS layer header information, and then calls the first interface 15 to send the data to the operating system 2.

[0075] 4) The protocol stack 4 in the operating system 2 encapsulates the data by level, and adds the UDP header, IP header and MAC header in turn.

[0076] 5) The mapping table module 6 in the operating system 2 constructs the mapping relationship table according to the established rules.

[0077] 6) The interlayer mapping module 7 in the operating system 2 performs mapping operation, which specifically includes: selecting the source IP address, destination IP address and UDP destination port number fields from the data packet as mapping input parameters; performing legality check on the input parameters, including format and value range, etc.; determining the mapping implementation mode according to the configuration parameters, here, the query mapping table mode is adopted; obtaining the virtual link identifier, priority and queue information as output parameters according to the mapping relationship table and input parameters.

[0078] 7) The device driver 5 in the operating system 2 sends the data and output parameters to the TSN end system 3 through the second interface 16.

[0079] 8) In the TSN end system 3, the TSN flow type is distinguished based on the output parameters, and the corresponding fields of the TSN frame are filled.

[0080] 9) The TSN end system 3 sends the data to the TSN switch node 18.

[0081] 10) The TSN switch node 18 receives the data and transmits it out to the second TSN end node 19 according to the forwarding table.

[0082] 11) The TSN end system 3 of the second TSN end node 19 receives and parses the data frame, and extracts the virtual link identifier, priority and queue information as input parameters.

[0083] 12) The TSN end system 3 sends the input parameters and the parsed data frame to the operating system 2 through the second interface 16.

[0084] 13) The device driver 5 in the operating system 2 receives the data and the input parameters.

[0085] 14) The mapping table module 6 in the operating system 2 constructs a mapping relationship table according to the established rules.

[0086] 15) The inter-layer mapping module 7 in the operating system 2 performs the mapping operation, which specifically includes: performing a legality check on the input parameters, including data format and value range, etc.; determining the mapping implementation method according to the configuration parameters, where the query mapping table method is adopted; obtaining the source IP address, the destination IP address and the UDP destination port number as the output parameters according to the mapping relationship table and the input parameters; and extracting the above output parameters from the data frame and performing a comparison and verification with the mapping obtained parameters.

[0087] 16) The protocol stack 4 in the operating system 2 parses the data frame by layer, and sequentially removes the MAC header, the IP header and the UDP header.

[0088] 17) The operating system 2 submits the data to the application layer DDS middleware 1 through the first interface 15.

[0089] 18) The application layer DDS middleware 1 parses and verifies the data payload, removes the DDS layer header information after the verification is correct, and finally submits the data to the upper layer user.

[0090] All related contents of the steps involved in the foregoing embodiment of the DDS and TSN oriented service inter-layer mapping method can be cited to the function description of the function modules corresponding to the DDS and TSN oriented service inter-layer mapping system in the embodiment of the present application, and will not be repeated here.

[0091] The division of the modules in the embodiment of the present application is illustrative, and is only a logical function division. In actual implementation, there can be another division method. In addition, the function modules in each embodiment of the present application can be integrated in one processor, or can be physically separated, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software function module.

[0092] In still another embodiment of the present application, a computer device is provided, which comprises a processor and a memory, the memory being configured to store a computer program, the computer program comprising program instructions, and the processor being configured to execute the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in the computer storage medium to implement a corresponding method process or a corresponding function; the processor in the embodiments of the present application can be used for the operation of the service layer mapping method for DDS and TSN.

[0093] In still another embodiment of the present application, the present application further provides a storage medium, specifically a computer readable storage medium (Memory), which is a memory device in a computer device, and is configured to store programs and data. It can be understood that the computer readable storage medium herein can include an internal storage medium in the computer device, and of course can also include an expansion storage medium supported by the computer device. The computer readable storage medium provides a storage space, which stores an operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer readable storage medium herein can be a high-speed RAM memory, or a non-volatile memory such as at least one disk memory. One or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the service layer mapping method for DDS and TSN in the above embodiments.

[0094] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.

[0095] The present application is described in reference to the flowchart and / or block diagrams of the method, apparatus (system) and computer program product according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0096] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0098] Finally, it should be noted that the above-mentioned embodiments are merely intended for describing the technical solutions of the present application, but not for limiting it. Although the present application is described in detail with reference to the above embodiments, those skilled in the field should understand that the specific embodiments of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and any modification or equivalent replacement without departing from the spirit and scope of the present application should be covered in the protection scope of the claims of the present application.

Claims

1. A service layer mapping method for DDS and TSN, characterized in that: include: Receive DDS layer data packets and extract mapping network parameters in the DDS layer data packets; According to the mapping network parameters, the mapping service parameters of the TSN layer data packet are obtained based on the preset mapping relationship; Extract the business data from the DDS layer data packet and construct the TSN layer data packet by combining it with the mapped business parameters of the TSN layer data packet; The mapping relationship is obtained by: setting a mapping relationship between the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet according to the subject and QoS policy of the DDS layer; The mapping network parameters include one or more of the following: source MAC address, destination MAC address, source IP address, destination IP address, source port number, and destination port number; The mapping service parameters of the TSN layer data packet include one or more of the following: virtual link identifier, service type and service priority; Also includes: Receive TSN layer data packets and extract the mapping business parameters of the TSN layer data packets; According to the mapped service parameters, a mapped network parameter is obtained based on a preset mapping relationship; Extract the network parameters corresponding to the mapped network parameters in the TSN layer data packet and compare them with the mapped network parameters. When the comparison results are consistent, execute the TSN layer data packet receiving process; otherwise, generate a prompt message.

2. The service layer mapping method for DDS and TSN according to claim 1, characterized in that: The preset mapping relationship is implemented in the form of static storage query or linear calculation.

3. The service layer mapping method for DDS and TSN according to claim 1, characterized in that: When setting the mapping relationship between the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet: When the forwarding mode of the current service flow is unicast, the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet are mapped one to one; When the forwarding mode of the current service flow is multicast, the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet are many-to-one mapping.

4. The service layer mapping method for DDS and TSN according to claim 1, characterized in that: Before obtaining the mapping service parameters of the TSN layer data packet based on the preset mapping relationship according to the mapping network parameters, the method further includes: checking the legality of the mapping network parameters.

5. The service layer mapping method for DDS and TSN according to claim 1, characterized in that: Before obtaining the mapped network parameters based on the preset mapping relationship according to the mapped service parameters, the method further includes: checking the legality of the mapped service parameters.

6. A DDS and TSN-oriented service layer mapping system based on the DDS and TSN-oriented service layer mapping method according to claim 1, characterized in that: include: An extraction module, configured to receive a DDS layer data packet and extract mapping network parameters from the DDS layer data packet; A mapping module is used to obtain mapping service parameters of TSN layer data packets based on the mapping network parameters and the preset mapping relationship; The data packet construction module is used to extract the business data in the DDS layer data packet and construct the TSN layer data packet by combining the mapped business parameters of the TSN layer data packet; The mapping relationship is obtained by setting a mapping relationship between the mapping network parameters of the DDS layer data packet and the mapping service parameters of the TSN layer data packet according to the subject and QoS policy of the DDS layer.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the DDS- and TSN-oriented service layer mapping method are implemented as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the service layer mapping method for DDS and TSN are implemented as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Vehicle DDS and TSN fusion deployment method and system, storage medium and electronic equipment

    CN118200128A