Communication systems, methods, vehicles, and media
By deploying a gateway at the processing end and selecting the communication method based on the authentication identifier, the interoperability between the controller and the processor is realized, which solves the problem of limited controller resources, reduces resource utilization, meets communication latency requirements, and improves applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING CHANGAN TECH CO LTD
- Filing Date
- 2023-04-17
- Publication Date
- 2026-05-15
AI Technical Summary
When controller resources are limited, the controller cannot accommodate the number of entities that match the processor, resulting in high communication latency and low applicability.
A gateway is deployed at the processing end, which connects to the global data space through the external space and to the controller and processor through the internal space. Based on the authentication identifier set by the processor, it can choose to communicate directly or forward data through the gateway, thereby realizing the interoperability between the controller and the processor and reducing resource consumption.
It effectively reduces controller resource utilization, accommodates more agent entities, meets different communication latency requirements, and improves applicability.
Smart Images

Figure CN116488960B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a communication system, method, vehicle and medium. Background Technology
[0002] In the automotive field, SOA (Service-Oriented Architecture) software architecture is gradually being used. Under the SOA software architecture design concept, automotive software architecture is becoming more layered and modular, enabling application layer functions to be reused across different vehicle models, hardware platforms, and operating systems, and allowing for rapid iteration and upgrades of application functions through standardized interfaces.
[0003] DDS (Data Distribution Service), as a new generation of distributed real-time communication middleware protocol, adopts a publish / subscribe architecture, emphasizes data as the core, and provides rich QoS (Quality of Service) policies to ensure that data is distributed in real time, efficiently, and flexibly, which can meet the needs of various distributed real-time communication applications.
[0004] In related technologies, the resources that can be allocated to the DDS protocol stack in the controller are limited. Communication between the processor and the controller will establish a remote entity of the processor on the controller, which will consume a lot of the controller's resources. The controller cannot accommodate the number of proxy entities that match the processor side, resulting in high communication latency. Summary of the Invention
[0005] This application provides a communication system, method, vehicle, and medium to solve the problems in related technologies, such as the controller's inability to accommodate the number of entities matched with the processor due to limited controller resources and communication latency, resulting in low applicability.
[0006] A first aspect of this application provides a communication system, comprising: a control terminal with control functions and a processing terminal with processing functions, wherein the control terminal includes one or more controllers, and the processing terminal includes one or more processors; a gateway deployed in the communication process of any processor in the processing terminal, wherein the gateway includes an internal space and an external space, accesses a global data space through the external space, accesses the one or more controllers and other processors through the internal space, and selects communication between the processor and other processors, direct communication between the controller and the processor, or forwards communication data between the controller and the processor through the gateway based on an authentication identifier set by the processor.
[0007] Based on the above technical means, the embodiments of this application can deploy the gateway in the communication process of any processor in the processing end, and access the global data space through the external space, and access the controller and processor through the internal space. Based on the authentication identifier set by the processor, the gateway can select direct communication between the controller and the processor, communication between different processors, or forward the communication data between the controller and the processor, thereby realizing the interoperability between the processor and the controller. This allows the controller to directly use the global data space protocol stack for communication, effectively reducing the resource occupancy of the controller. Under the condition of limited controller resources, it can accommodate a number of proxy entities matching the processor end, meet different communication latency requirements during transmission, and has high applicability.
[0008] Optionally, the internal space includes a first internal space and a second internal space, which are connected to the controller and other processors through different interfaces.
[0009] Based on the above technical means, in the embodiments of this application, the first internal space and the second internal space are respectively connected to the controller and the processor through different interfaces, so that the gateway is compatible and can be compatible with the pass-through scheme.
[0010] Optionally, the authentication identifier includes a first to a third identifier. If the authentication identifier is the first identifier, the processor communicates with other processors. If the authentication identifier is the second identifier, the processor communicates directly with the controller. If the authentication identifier is the third identifier, and the expected data transmission delay between the controller and the processor is less than a preset delay, the controller and the processor communicate directly; otherwise, the communication data between the controller and the processor is forwarded through the gateway.
[0011] According to the above technical means, in the authentication identifier of this application embodiment, the first identifier is used for interoperability between different processors, the second identifier is used for direct communication between the processor and the controller, and the third identifier is used to select different communication methods according to the data transmission delay. When the expected data transmission delay between the processor and the controller is less than the preset delay, the processor and the controller are selected to interoperate. Otherwise, the communication data between the controller and the processor is forwarded through the gateway to ensure that the controller can reasonably access the relevant participant entities, selectively establish connections with relevant participants, save the memory consumed by the peer entity information, and control the unnecessary occupation of remote entities through an appropriate mechanism.
[0012] Optionally, the communication processes of the gateway and the processor communicate via a network, and the gateway and the controller communicate via multicast or unicast.
[0013] Based on the above technical means, the communication process between the gateway and the processor in this application uses multicast or unicast to communicate. Multicast or unicast can filter out invalid data, save its own resources, and ensure the scheduling of the MCU.
[0014] Optionally, the processor communicates with other processors via a deployed gateway.
[0015] Based on the above technical means, in this embodiment of the application, the processor communicates with other processors through a deployed gateway, and the data is forwarded through the gateway without affecting processor scheduling.
[0016] Optionally, the communication data between the gateway and the processor is filtered by the service ID (Identity Document) and the method ID.
[0017] Based on the above technical means, in this embodiment of the application, the communication data between the gateway and the processor is filtered by service ID and method ID, so that normal data can pass through while redundant or invalid data cannot, thereby improving communication quality and ensuring the scheduling of the controller.
[0018] Optionally, the multicast addresses of all applications within the controller, the multicast addresses of all applications within the processor, and the multicast addresses of the global data space are isolated from each other.
[0019] Based on the above technical means, in this embodiment of the application, the controller, processor, and multicast addresses of all applications in the global data space are isolated from each other to avoid sending data to the wrong address, causing data chaos, and ensuring that multicast messages do not affect each other.
[0020] Optionally, the processor, the controller, and the global data space each have different multicast isolation addresses.
[0021] Based on the above technical means, in the embodiments of this application, the processor, controller and global data space each have different multicast isolation addresses to avoid data confusion and ensure that multicast packets do not affect each other.
[0022] Optionally, within the same multicast, publishers and subscribers send messages through the current multicast address, while within different multicasts, publishers and subscribers send messages through the multicast address within the multicast of the subscriber.
[0023] Based on the above technical means, in the embodiments of this application, publishers and subscribers within the same multicast send messages through the current multicast address, while publishers and subscribers in different multicasts send messages through the multicast address within the multicast of the subscriber, ensuring that multicast messages do not interfere with each other.
[0024] Optionally, the applications of the processor are partitioned to enable communication between the applications of the processor and the gateway, between the applications of the processor and other processors, and between applications within the processor.
[0025] Based on the above technical means, the application of the processor in this embodiment is partitioned, which improves the communication efficiency between the application of the processor and the gateway, the application of the processor and other processors, and the application within the processor.
[0026] Optionally, the processing terminal is configured with one or more interfaces.
[0027] Optionally, the control terminal is a microcontroller unit (MCU), the processing terminal is a microprocessor unit (MPU), the controller is an MCU, and the processor is an MPU.
[0028] A second aspect of this application provides a vehicle including the communication system described in the above embodiments.
[0029] A third aspect of this application provides a communication method applied to a communication system as described in the above embodiments, comprising the following steps: identifying an authentication identifier of any processor deployed in the processing terminal; selecting, based on the authentication identifier, whether the processor communicates with other processors, the controller and the processor communicate directly, or the communication data between the controller and the processor is forwarded through the gateway, wherein the authentication identifier includes a first to a third identifier; if the authentication identifier is a first identifier, the processor communicates with other processors; if the authentication identifier is a second identifier, the processor communicates directly with the controller; if the authentication identifier is a third identifier, and the expected data transmission delay between the controller and the processor is less than a preset delay, then direct communication between the controller and the processor is selected; otherwise, the communication data between the controller and the processor is forwarded through the gateway.
[0030] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the communication method as described in the above embodiments.
[0031] Therefore, this application has at least the following beneficial effects:
[0032] (1) In this embodiment, the gateway can be deployed in the communication process of any processor in the processing end, and access the global data space through the external space, and access the controller and processor through the internal space. Based on the authentication identifier set by the processor, communication between different processors, direct communication between the controller and the processor, or forwarding the communication data between the controller and the processor through the gateway can be selected to achieve interoperability between the controller and the processor. This allows the controller to directly use the global data space protocol stack for communication, effectively reducing the resource occupancy rate of the controller. Under the condition of limited controller resources, it can accommodate the number of proxy entities matching the processor and meet the different communication latency requirements during transmission, which has high applicability.
[0033] (2) In the embodiments of this application, the first internal space and the second internal space are connected to the controller and the processor through different interfaces, so that the gateway is compatible and can be compatible with the pass-through scheme.
[0034] (3) In the authentication identifier of this application embodiment, the first identifier is used for communication between different processors, the second identifier is used for direct communication between the processor and the controller, and the third identifier is used to select different communication methods according to the data transmission delay. When the expected data transmission delay between the processor and the controller is less than the preset delay, the processor and the controller are selected to communicate. Otherwise, the communication data between the controller and the processor is forwarded through the gateway to ensure that the controller can reasonably access the relevant participant entities, selectively establish connections with relevant participants, save the memory consumed by the peer entity information, and control the unnecessary occupation of remote entities through a suitable mechanism.
[0035] (4) The communication process between the gateway and the processor in this application uses multicast or unicast to communicate. Multicast or unicast can filter out invalid data, save its own resources, and ensure the scheduling of the controller.
[0036] (5) In this embodiment of the application, the processor communicates with other processors through a deployed gateway, and the data is forwarded through the gateway, which does not affect the processor scheduling.
[0037] (6) In this embodiment of the application, the communication data between the gateway and the processor is filtered by the service ID and the method ID, so that normal data can pass through and redundant or invalid data cannot pass through, thereby improving the communication quality and ensuring the scheduling of the controller.
[0038] (7) In this embodiment of the application, the controller, processor and multicast addresses of all applications in the global data space are isolated from each other to avoid sending data to the wrong address and causing data chaos, and to ensure that multicast messages do not affect each other.
[0039] (8) In this application embodiment, the processor, controller and global data space each have different multicast isolation addresses to avoid data confusion and ensure that multicast messages do not affect each other.
[0040] (9) In this embodiment of the application, the publisher and subscriber in the same multicast send messages through the current multicast address, and the publisher and subscriber in different multicast send messages through the multicast address in the multicast in which the subscriber is located, so as to ensure that the multicast messages do not affect each other.
[0041] (10) The application of the processor in this application is partitioned to improve communication efficiency between the application of the processor and the gateway, the application of the processor and other processors, and the application within the processor.
[0042] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0043] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0044] Figure 1 This is a schematic diagram of a communication system provided according to an embodiment of this application;
[0045] Figure 2 This is a diagram showing the DDS protocol stack and resource usage of each entity according to embodiments of this application;
[0046] Figure 3 This is a block diagram of the overall solution provided according to the embodiments of this application;
[0047] Figure 4 This is a DDS gateway fusion diagram provided according to an embodiment of this application;
[0048] Figure 5 A local graph for configuring the controller according to embodiments of this application;
[0049] Figure 6 This is a direct diagram of processor configuration provided according to embodiments of this application;
[0050] Figure 7 This is a processor configuration proxy diagram provided according to embodiments of this application;
[0051] Figure 8 This is a diagram of a gateway deployment on a processor according to embodiments of this application;
[0052] Figure 9 This is a flowchart of a communication method provided according to an embodiment of this application. Detailed Implementation
[0053] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0054] In the automotive industry, SOA software architecture is increasingly being used. Under the SOA design philosophy, automotive software architecture is becoming more layered and modular, enabling application-layer functions to be reused across different vehicle models, hardware platforms, and operating systems. Furthermore, standardized interfaces allow for rapid iteration and upgrades of application functions. DDS, as a next-generation distributed real-time communication middleware protocol, adopts a publish / subscribe architecture, emphasizing a data-centric approach and providing rich QoS (Quality of Service) policies to ensure real-time, efficient, and flexible data distribution, meeting the needs of various distributed real-time communication applications. In automobiles, DDS facilitates communication between the controller and the processor.
[0055] Currently, the controller can allocate approximately 200K-300K of resources to the DDS protocol stack. Communication between the processor and the controller involves establishing remote entities on the controller, which consumes controller resources. Therefore, the number of participants that can be created on the controller is limited. To address the issue of insufficient DDS resources on the controller, the size of remote entities on the controller (1 participant + 1 writer + 1 reader) has been optimized from an estimated 15KB to less than 4KB. Optimizations and reductions have also been made to the controller-data distribution service. However, to comply with the basic DDS specification characteristics, optimization of the DDS protocol stack is nearing its limit. Therefore, resolving the resource constraint issue on the controller is particularly important.
[0056] Therefore, this application, based on the implementation principle of DDS communication technology, combined with the controller's processing performance, as well as functional application requirements, performance requirements, security requirements, etc., designs a pass-through scheme and reasonably deploys a DDS gateway to achieve interoperability between the controller and the processor.
[0057] The communication system, method, vehicle, and medium according to embodiments of this application are described below with reference to the accompanying drawings. Specifically, Figure 1 This is a schematic diagram of a communication system provided in an embodiment of this application.
[0058] like Figure 1 As shown, the communication system 10 includes: a control terminal 100, a processing terminal 200, and a gateway 300.
[0059] Among them, the control terminal 100 has control functions and includes one or more controllers; the processing terminal 200 has processing functions and includes one or more processors; in the communication process of any processor in the processing terminal 200, the gateway 300 includes an internal space and an external space. It accesses the global data space through the external space and accesses one or more controllers and other processors through the internal space. Based on the authentication identifier set by the processor, it selects whether the processor communicates with other processors, whether the controller and the processor communicate directly, or whether the communication data between the controller and the processor is forwarded through the gateway.
[0060] In this embodiment, the control terminal 100 is a microcontroller unit (MCU) terminal, and the processing terminal 200 is a microprocessor (MPU) terminal. The controller is an MCU, and the processor is an MPU. In the following embodiments, the MPU and MCU will be used for explanation.
[0061] The processing terminal 200 is equipped with one or more interfaces, and the types of processors and controllers can be selected according to actual needs; the gateway 300 can be a gateway with DDS; the internal space can include a first internal space and a second internal space, which are connected to the controller and other processors through different interfaces; the global data space refers to the local data storage area, which is not specifically limited here.
[0062] It is understood that in this application embodiment, the gateway is deployed in the communication process of any processor in the processing end, and accesses the global data space through the external space and the controller and processor through the internal space. Based on the authentication identifier set by the processor, it selects communication between different processors, direct communication between the controller and the processor, or forwards the communication data between the controller and the processor through the gateway, so as to realize direct or indirect communication between the MCU and the MPU, thereby realizing the interoperability between the MCU and the MPU. This allows the MCU to directly use the global data space protocol stack for communication, effectively reducing the resource occupancy of the MCU. Under the condition of limited MCU resources, it can accommodate a number of proxy entities matching the MPU, meet different communication latency requirements during transmission, and has high applicability.
[0063] In this embodiment of the application, the authentication identifier may include a first to a third identifier. If the authentication identifier is the first identifier, the processor communicates with other processors. If the authentication identifier is the second identifier, the processor communicates directly with the controller. If the authentication identifier is the third identifier and the expected data transmission delay between the controller and the processor is less than the preset delay, the controller and the processor communicate directly. Otherwise, the communication data between the controller and the processor is forwarded through the gateway 300.
[0064] The preset latency can be set according to the user's actual intention or according to the data transmission latency requirements, and no specific limitation is made here.
[0065] It is understood that, in order to ensure that the MCU side can reasonably access the relevant participant entities and solve the memory consumption of selectively establishing connections with relevant participants and saving peer entity information under the same internal space, this application adopts an authentication method. Authentication is to control the unnecessary remote entity occupation on the MCU through an appropriate mechanism.
[0066] It should be noted that when implementing communication between the processor and the controller in the embodiments of this application, an authentication flag can be selected or set according to the actual latency requirements. For example, if low latency is desired, a second flag can be selected; or, if the communication latency requirement is moderate, a third flag can be selected. When the third flag is selected, the communication mode can be switched according to the dynamic changes in communication latency. It is generally expected that the communication latency corresponding to the third flag is greater than that corresponding to the second flag.
[0067] Examples of authentication are as follows:
[0068] Each participant on the MPU is provided with three identifiers.
[0069] First identifier: DEFAULT_TOKEN ----- the default token, meaning it can only communicate with the MPU;
[0070] The second identifier: DIRECT_VIU_TOKEN ----- means that it can communicate with both VIU and MPU simultaneously (pass-through);
[0071] The third identifier: PROXY_TOKEN ------ means that it can communicate with the MPU or with the MCU through the gateway.
[0072] In this embodiment, the communication process between the gateway 300 and the processor communicates via a network, and the gateway 300 and the controller communicate via multicast or unicast.
[0073] The processor communicates with other processors through a deployed gateway.
[0074] Multicast, also known as multi-target broadcast, allows a message to be sent to a selected subset of all possible destinations, i.e., to send information to multiple explicitly specified addresses. It is a method of communication between a sender and multiple receivers. For example, when a source host sends a message request to multiple target hosts, the source host sends only one copy of the data, and the destination address of the data is the multicast group address. In this way, all members belonging to the group can receive a copy of the data sent by the source host. Under this multicast method, only the members who actually need the information will receive the information, and other hosts will not receive it.
[0075] Unicast is a point-to-point connection between a client and a server, where communication takes place over a network between a single sender and a single receiver.
[0076] It is understood that in the embodiments of this application, the communication processes between the gateway and the processor communicate in a multicast or unicast manner. By using multicast or unicast, the MCU can filter out invalid data and save its own resources.
[0077] In this embodiment, the communication data between the gateway 300 and the processor is filtered by the service ID and the method ID.
[0078] It is understood that in this embodiment of the application, the communication data between the gateway and the processor is filtered by service ID and method ID, so that normal data can pass through while redundant or invalid data cannot, thereby improving communication quality and ensuring MCU scheduling.
[0079] In this embodiment of the application, the multicast addresses of all applications within the controller, the multicast addresses of all applications within the processor, and the multicast addresses of the global data space are isolated from each other.
[0080] The processor, controller, and global data space each have different multicast isolation addresses.
[0081] It is understood that, in the embodiments of this application, the multicast addresses of the processor, controller and global data space are isolated from each other to avoid sending data to the wrong address, causing data chaos, and to ensure that multicast messages do not affect each other.
[0082] In this embodiment of the application, publishers and subscribers within the same multicast send messages through the current multicast address, while publishers and subscribers in different multicasts send messages through the multicast address within the multicast of the subscriber.
[0083] It is understood that in this application embodiment, publishers and subscribers within the same multicast send messages through the current multicast address, while publishers and subscribers in different multicasts send messages through the multicast address within the multicast of the subscriber, ensuring that multicast messages do not interfere with each other.
[0084] Specifically, multicast isolation does not mean that user data is blocked, but rather:
[0085] 1. Within a multicast group, there are 1 pub (publish) and multiple sub (subscribe) messages, sent through the current multicast address;
[0086] 2. Within different multicast groups, 1pub and multiple subs are sent through the multicast address where the sub ends are located;
[0087] 3. If there are 1 pub and multiple sub in a multicast group, the multicast packets will not affect the unmatched sub in another multicast group.
[0088] In this embodiment of the application, the application of the processor is partitioned so that the application of the processor can communicate with the gateway, the application of the processor with the application of other processors, and the application within the processor.
[0089] It is understood that the application of the processor in the embodiments of this application is partitioned so that the application of the processor can communicate with the gateway, the gateway, the application of the processor with other processors, and the application within the processor, thereby improving communication efficiency.
[0090] The communication system proposed in this application can deploy a gateway within the communication process of any processor in the processing unit. It accesses the global data space via external space and the controller and processor via internal space. Based on the authentication identifier set by the processor, it selects communication between different processors, direct communication between the controller and the processor, or forwards communication data between the controller and the processor through the gateway. This enables interoperability between the MCU and the MPU, allowing the MCU to directly use the global data space protocol stack for communication. This effectively reduces the MCU's resource occupancy and allows for a sufficient number of proxy entities matching the MPU's capabilities even with limited MCU resources. It also meets different communication latency requirements during transmission, demonstrating high applicability. Therefore, it solves the problems in related technologies where, under limited MCU resources, the MCU cannot accommodate the required number of entities matching the MPU's capabilities, leading to lower applicability due to communication latency.
[0091] The following will combine Figures 2 to 8 A detailed description of the communication system is provided below, with the MCU and MPU serving as examples in the following embodiments:
[0092] The current problem of insufficient DDS resources on MCUs, such as Figure 2As shown, although the size of the remote entity on the MCU (1 participant + 1 writer + 1 reader) has been optimized, and the MCU-DDS has been optimized and trimmed, the optimization of the DDS protocol stack is already close to its limit in order to comply with the basic DDS specification characteristics.
[0093] This application, based on the DDS communication technology principle and considering the MCU processing performance, functional application requirements, performance requirements, and security requirements, designs a direct communication scheme and rationally deploys a DDS gateway to achieve interoperability between the MCU and MPU. When data transmission latency requirements are high, direct communication between the MCU and MPU is used; when latency requirements are low, data forwarding is performed through the gateway. Specifically:
[0094] I. Communication between MCU and MPU
[0095] Multicast isolation is implemented on the MCU and MPU sides to ensure MCU scheduling. Because topics on the MCU are aggregated in the DDS system and asymmetric communication is used, most existing communication modes in the DDS system use multicast or broadcast. This can lead to the MCU receiving a lot of invalid data, causing overflow of the MCU's receive buffer. Therefore, multicast isolation is necessary. Figure 3 As shown, the specific isolation method is as follows:
[0096] 1. All DDS applications on the MCU side are configured with specific IPs, such as setting the Meta multicast IP to ABCD, etc., which can be configured according to actual application requirements;
[0097] 2. All DDS applications on the MPU side are configured with specific IPs, such as setting the Meta multicast IP to ABCE, etc., which can be configured according to actual application requirements.
[0098] 3. All DDS applications globally are configured with specific IPs, for example, SPDP multicast IPs are ABCF, etc., which can be configured according to actual application needs;
[0099] 4. All DDS applications globally reside in the same DDS global data space (one domain);
[0100] 5. To ensure compatibility with the gateway solution, the DDS application on the MPU side needs to be configured with partitions appropriately to ensure that the MPU application <-> proxy gateway, the MPU application <-> MCU application, and the MPU application <-> MPU application can all communicate with each other;
[0101] 6. Set up DDS authentication on the MCU side, so that only participants carrying the specified user_data (token1) can directly access the MCU on the MPU side; at the same time, set up DDS authentication on the proxy gateway, so that only participants carrying the specified user_data (token2) can access the proxy gateway on the MPU side.
[0102] 7. In the proxy gateway solution, the application on the MPU side is configured with multiple network ports, which ensures that the interaction with the local proxy gateway is limited to the loopback interface.
[0103] II. Modification and Adaptation of the Gateway
[0104] 1) Gateway Deployment Instructions Figure 4 The gateway only needs to complete the communication between the MCU and the MPU. Therefore, the gateway is deployed in one of the processes of the MPU that needs to communicate with the MCU. When a process needs to communicate with the MCU, the process first sends the data to the gateway process, and the gateway then forwards the data to the MCU.
[0105] 2) The processes of the gateway and the MPU can only communicate through the local loopback network;
[0106] 3) The gateway and MCU communicate via multicast or unicast, and data is filtered by service ID and method ID.
[0107] To ensure compatibility with the pass-through solution, the gateway needs to be modified and adapted as follows:
[0108] 1) The gateway provides external access to a unique global data space (domain0);
[0109] 2) The gateway is also divided into domain0 and domain1, which are responsible for DDS forwarding on the MCU side and DDS forwarding on the MPU side, respectively.
[0110] 3) Domain0 and Domain1 inside the gateway access the global data space through different network ports.
[0111] 4) Domain 1 inside the gateway accesses the DDS application on the local MPU via the loopback interface.
[0112] 5) Domain 0 inside the gateway connects to the DDS application on the MCU side via an external interface.
[0113] III. Multicast Isolation
[0114] Multicast isolation does not mean that user data is not shared, but rather:
[0115] 1. Within a multicast group, there is 1 pub (publish) and multiple sub (subscribe), sent through the current multicast address.
[0116] 2. Within different multicast groups, 1 pub and multiple subs transmit through the multicast address of the sub endpoint.
[0117] 3. If there are 1 pub and multiple sub in a multicast group, the multicast packets will not affect the unmatched sub in another multicast group.
[0118] IV. Authentication and Tokens
[0119] To ensure that the MCU can reasonably access relevant participant entities and to address the issue of selectively establishing connections with relevant participants within the same domain, thus minimizing memory consumption for storing peer entity information, an authentication method is employed. Authentication involves using an appropriate mechanism to control unnecessary remote entity usage on the MCU. An example of authentication is as follows:
[0120] Each participant on the MPU is provided with three types of tokens.
[0121] DEFAULT_TOKEN ----- The default token, meaning it can only communicate with the MPU;
[0122] DIRECT_VIU_TOKEN means that it can communicate with both VIU and MPU simultaneously (pass-through);
[0123] PROXY_TOKEN means that it can communicate with the MPU or with the MCU through a gateway.
[0124] Set a unique token for each participant in the MCU: LOCAL_VIU_TOKEN
[0125] Additionally, the authentication settings need to be configured in the following locations:
[0126] 1. Participants on the MCU: PDP (Packet Data Protocol) discovery will only be allowed if the peer is found to be carrying user data including DIRECT_VIU_TOKEN or LOCAL_VIU_TOKEN;
[0127] 2. Participants on the gateway that connect to the MCU: PDP discovery will only be allowed if userdata carrying LOCAL_VIU_TOKEN is detected on the other end;
[0128] 3. Participants of the MPU on the gateway: PDP discovery will only be allowed if the user data carrying PROXY_TOKEN is detected on the other end.
[0129] After completing the above configuration, the desired effect is as follows:
[0130] (1) Configure a local MCU to communicate directly with DDS participants configured as direct on the MPU, local MCUs, and DDS gateways deployed on all MPUs, such as... Figure 5 As shown;
[0131] (2) DDS participants configured on the MPU can only communicate with all MCUs, and cannot communicate with gateways or MPU participants, such as... Figure 6 As shown;
[0132] (3) A DDS participant configured with a proxy on the MPU can communicate with other DDS participants configured with proxies on the MPU and gateway participants deployed on the MPU; they can also communicate indirectly through the gateway and the MCU, such as... Figure 7 As shown;
[0133] (4) A DDS gateway deployed on an MPU can only communicate with DDS participants within the MPU it is deployed on, and cannot communicate with participants in other MPUs, such as... Figure 8 As shown.
[0134] In summary, this application's DDS-based communication system solves the interoperability problem between the MCU and MPU in existing technologies. Furthermore, it isolates the Meta multicast addresses on the MCU and MPU sides. Therefore, when applications on the MPU side interact through a large number of multicast messages, it will not affect the MCU's scheduling at all, reducing the impact of multicast on low-computing-power platforms. In the SDA platform, gateway redundancy is required to prevent single-point failures, while also achieving service decentralization under the SOA service architecture.
[0135] This application also provides a vehicle including the communication system described above.
[0136] Next, the communication method proposed according to the embodiments of this application is described with reference to the accompanying drawings.
[0137] Figure 9 This is a flowchart of a communication method according to an embodiment of this application.
[0138] like Figure 9 As shown, the communication method includes the following steps:
[0139] In step S101, the authentication identifier of any processor deployed in the processing terminal is identified.
[0140] It is understood that embodiments of this application provide an authentication identifier that identifies any processor deployed on the processing end, so as to facilitate the subsequent selection of communication methods.
[0141] In step S102, the processor is selected to communicate with other processors, communicate directly with the controller and the processor, or forward communication data between the controller and the processor through the gateway, based on the authentication identifier. The authentication identifier includes a first to a third identifier. If the authentication identifier is the first identifier, the processor communicates with other processors; if the authentication identifier is the second identifier, the processor communicates directly with the controller; if the authentication identifier is the third identifier and the expected data transmission delay between the controller and the processor is less than a preset delay, then direct communication between the controller and the processor is selected; otherwise, communication data between the controller and the processor is forwarded through the gateway.
[0142] It is understood that, according to the authentication identifier, the present application embodiment selectively establishes a connection by comparing the expected data transmission delay between the controller and the processor with the preset delay. It can choose to establish a connection between different processors, choose to communicate directly between the controller and the processor, or forward the communication data between the controller and the processor through a gateway, thereby realizing the interoperability between the MCU and the MPU, effectively reducing the resource occupancy of the MCU, and enabling the number of proxy entities matching the MPU end to be accommodated under the condition of limited MCU resources, meeting different communication delay requirements during transmission, and has high applicability.
[0143] According to the communication method proposed in this application, a connection is selectively established by comparing the expected data transmission delay between the controller and the processor with a preset delay based on an authentication identifier. Connections can be established between different processors, or direct communication between the controller and the processor can be selected, or communication data between the controller and the processor can be forwarded through a gateway. When the expected data transmission delay between the controller and the processor is less than the preset delay, direct communication between the controller and the processor is used; otherwise, communication data between the controller and the processor is forwarded through a gateway. This achieves interoperability between the MCU and the MPU, effectively reducing the resource occupancy rate of the MCU. Under the condition of limited MCU resources, it can accommodate a number of proxy entities matching the MPU end, meeting different communication delay requirements during transmission, and has high applicability.
[0144] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described communication method.
[0145] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0146] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0147] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0148] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.
[0149] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0150] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A communication system, characterized in that, include: A control terminal with control functions and a processing terminal with processing functions, wherein the control terminal includes one or more controllers and the processing terminal includes one or more processors; A gateway deployed in the communication process of any processor in the processing terminal, wherein the gateway includes an internal space and an external space, accesses the global data space through the external space, and accesses the one or more controllers and other processors through the internal space, and selects communication between the processor and other processors, direct communication between the controller and the processor, or forwarding communication data between the controller and the processor through the gateway based on the authentication identifier set by the processor; the internal space includes a first internal space and a second internal space, which are respectively connected to the controller and other processors through different interfaces; The processor's applications are partitioned to enable communication between the processor's applications and the gateway, between the processor and applications of other processors, and between applications within the processor. The processing terminal is configured with one or more interfaces.
2. The system according to claim 1, characterized in that, The authentication identifier includes a first to a third identifier. If the authentication identifier is the first identifier, then the processor communicates with other processors. If the authentication identifier is the second identifier, then the processor communicates directly with the controller; If the authentication identifier is a third identifier and the expected data transmission delay between the controller and the processor is less than the preset delay, then the controller and the processor communicate directly; otherwise, the communication data between the controller and the processor is forwarded through the gateway.
3. The system according to claim 1, characterized in that, The gateway and the processor communicate via a network, and the gateway and the controller communicate via multicast or unicast.
4. The system according to claim 3, characterized in that, The processor communicates with other processors via a deployed gateway.
5. The system according to claim 3, characterized in that, The communication data between the gateway and the processor is filtered by service ID and method ID.
6. The system according to claim 1, characterized in that, The multicast addresses of all applications within the controller, the multicast addresses of all applications within the processor, and the multicast addresses of the global data space are isolated from each other.
7. The system according to claim 6, characterized in that, The processor, the controller, and the global data space each have different multicast isolation addresses.
8. The system according to claim 5, characterized in that, Within the same multicast, publishers and subscribers send messages through the current multicast address, while publishers and subscribers in different multicasts send messages through the multicast address within the multicast of the subscriber.
9. The system according to any one of claims 1-8, characterized in that, The control terminal is a microcontroller unit (MCU), the processing terminal is a microprocessor (MPU), the controller is an MCU, and the processor is an MPU.
10. A vehicle, characterized in that, Includes the communication system as described in any one of claims 1-9.
11. A communication method, characterized in that, The method is applied to the communication system as described in any one of claims 1-9, wherein the method includes the following steps: Identify the authentication identifier deployed on any processor in the processing terminal; The authentication identifier is used to select whether the processor communicates with other processors, the controller communicates directly with the processor, or the communication data between the controller and the processor is forwarded through the gateway. The authentication identifier includes a first to a third identifier. If the authentication identifier is the first identifier, the processor communicates with other processors. If the authentication identifier is the second identifier, the processor communicates directly with the controller. If the authentication identifier is the third identifier and the expected data transmission delay between the controller and the processor is less than a preset delay, then the controller and the processor communicate directly; otherwise, the communication data between the controller and the processor is forwarded through the gateway.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the communication method as described in claim 11.