Service discovery method, device and system for vehicle, vehicle and medium
By introducing the first routing module to the on-board system for topic matching and forwarding, the problems of large computing overhead, high network load and service discovery packet storm in the DDS service discovery mechanism are solved, and a more efficient and stable service discovery process is achieved.
Patent Information
- Application Number
- CN202510279405.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-06
AI Technical Summary
The existing DDS service discovery mechanism has problems such as large computing overhead, high network load and service discovery packet storm in on-board systems.
The first routing module is introduced. After obtaining the endpoint message of the data processing module in the PDP stage, it is forwarded to the first routing module for topic matching and forwarding, avoiding unrelated participants from processing EDP messages.
Reduces computing overhead, reduces network load, avoids service discovery packet storms, and improves the stability and efficiency of the on-board system.
Smart Images

Figure CN120111095A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-mounted systems, and in particular to a service discovery method, device, system, vehicle and medium for a vehicle. Background Art
[0002] With the development of intelligent automobiles, vehicle systems are becoming more and more complex, including multiple subsystems with different functions, such as power systems, chassis control systems, driver assistance systems, infotainment systems, etc. By introducing the Data Distribution Service (DDS), subsystems can achieve efficient information interaction and collaborative work based on data publishing and subscription mechanisms, enabling the entire automobile system to operate more coordinated.
[0003] DDS is a new generation of distributed real-time communication middleware protocol that can provide a variety of quality-of-service (QoS) strategies to ensure real-time, efficient and flexible data distribution and meet the needs of various distributed real-time communication applications. The core function of DDS is to enable the data writers and data readers of all participants in the network to find matching DataReaders and DataWriters.
[0004] However, in the existing DDS service discovery mechanism, whenever a new Topic Data Reader or Data Writer comes online, the service discovery process of all processes in the entire distributed system needs to be triggered. This means that regardless of whether the process is related to the Topic, it will participate in the processing of the Endpoint Discovery Protocol (EDP) message transmission for discovering new endpoints. For vehicle-mounted systems with a large number of Topics and a large number of processes, the above-mentioned DDS service discovery mechanism has problems such as high computational overhead, high network load, and service discovery message storms. Summary of the invention
[0005] In view of this, the present invention provides a service discovery method, device, system, vehicle and medium for a vehicle, so as to improve the problems of large computational overhead, high network load and service discovery message storm in the existing DDS service discovery mechanism.
[0006] In a first aspect, the present invention provides a service discovery method for a vehicle, which is applied to a first routing module of an in-vehicle system, wherein the in-vehicle system includes a first routing module, a first data processing module, and a second data processing module, wherein the first data processing module and the second data processing module are both associated with a topic, and the method includes: receiving a first endpoint message and a second endpoint message, the first endpoint message including a topic and an address associated with the first data processing module, and the second endpoint message including a topic and an address associated with the second data processing module; caching routing information according to the first endpoint message and the second endpoint message; if the topic of the first data processing module matches the topic of the second data processing module, forwarding the first endpoint message or the second endpoint message according to the routing information to complete the service discovery process.
[0007] The service discovery method for vehicles provided in this embodiment introduces a first routing module in the vehicle system. After obtaining the endpoint messages of each data processing module in the PDP stage, the endpoint messages are forwarded to the first routing module, and the first routing module performs topic matching and forwards the endpoint messages to complete the service discovery process. In this way, the data processing modules of other topics do not have the same sending and receiving nodes, so they do not need to interact with the endpoint information, avoiding the processing of EDP messages by participants unrelated to the topic, and fundamentally reducing the computing overhead. Compared with a simple dynamic service discovery mechanism, the number of messages of a node can be reduced from o(N^2) to o(N), fundamentally solving the problem of service discovery message storms. Moreover, accurate message forwarding not only limits the sending of EDP messages to related participants, greatly reduces useless network transmission, protects network resources, but also simplifies the EDP processing process, allowing only necessary processes to participate, thereby significantly reducing the CPU surge phenomenon and improving the stability of the vehicle system.
[0008] In an optional embodiment, if the subject of the first data processing module matches the subject of the second data processing module, the first endpoint message or the second endpoint message is forwarded according to the routing information, including: when the first data processing module is a data writer and the second data processing module is a data reader, if the subject of the first data processing module matches the subject of the second data processing module, the first endpoint message is sent to the second data processing module according to the routing information; when the first data processing module is a data reader and the second data processing module is a data writer, if the subject of the first data processing module matches the subject of the second data processing module, the second endpoint message is sent to the first data processing module according to the routing information.
[0009] In an optional embodiment, before forwarding the first endpoint message or the second endpoint message according to the routing information, the method also includes: creating a publishing end topic unit and a subscribing end topic unit; forwarding the first endpoint message or the second endpoint message according to the routing information, including: if the first endpoint message or the second endpoint message belongs to the publishing end, forwarding the first endpoint message or the second endpoint message through the publishing end topic unit; if the first endpoint message or the second endpoint message belongs to the subscribing end, forwarding the first endpoint message or the second endpoint message through the subscribing end topic unit.
[0010] In an optional embodiment, the first endpoint message also includes a first entity identifier of the first data processing module, and the second endpoint message also includes a second entity identifier of the second data processing module. The first entity identifier is an indication information that the first endpoint message belongs to the publisher or the subscriber, and the second entity identifier is an indication information that the second endpoint message belongs to the publisher or the subscriber.
[0011] In an optional implementation, the first routing module, the first data processing module and the second data processing module are integrated on the same host.
[0012] In an optional embodiment, the vehicle-mounted system also includes a second routing module, the number of first data processing modules and the number of second data processing modules are both multiple, at least one first data processing module and / or at least one second data processing module is connected to the first routing module, the remaining first data processing modules and / or the remaining second data processing modules are connected to the second routing module, the first routing module and the second routing module are connected, and receiving first endpoint messages and second endpoint messages includes: receiving first endpoint messages from the first data processing module and / or the second routing module; receiving second endpoint messages from the second data processing module and / or the second routing module.
[0013] The service discovery method for vehicles provided in this embodiment can store routing information in a distributed manner in the routing modules of each Participant through the interaction of multiple routing modules, rather than being concentrated in one routing module. Each Participant queries and updates routing information as needed, thereby realizing decentralized message forwarding.
[0014] In an optional implementation, the first routing module is disposed on the first host, and the second routing module is disposed on the second host.
[0015] In an optional embodiment, before forwarding the first endpoint message or the second endpoint message according to the routing information, the method also includes: encrypting the first endpoint message and encrypting the second endpoint message; forwarding the first endpoint message or the second endpoint message according to the routing information includes: forwarding the encrypted first endpoint message or the encrypted second endpoint message according to the routing information.
[0016] In this embodiment, an encryption and authentication mechanism is introduced in the message forwarding process, which can ensure the security and integrity of the EDP message and prevent malicious attacks and data leakage.
[0017] In a second aspect, the present invention provides a service discovery device for a vehicle, the device comprising: a receiving unit for receiving a first endpoint message and a second endpoint message, the first endpoint message comprising a subject and an address associated with a first data processing module, and the second endpoint message comprising a subject and an address associated with the second data processing module; a cache unit for caching routing information based on the first endpoint message and the second endpoint message; and a matching forwarding unit for forwarding the first endpoint message or the second endpoint message based on the routing information if the subject of the first data processing module matches the subject of the second data processing module, so as to complete the service discovery process.
[0018] In an optional embodiment, the matching forwarding unit includes: a first sending unit, used to send a first endpoint message to the second data processing module according to routing information when the first data processing module is a data writer and the second data processing module is a data reader, if the subject of the first data processing module matches the subject of the second data processing module; a second sending unit, used to send a second endpoint message to the first data processing module according to routing information when the first data processing module is a data reader and the second data processing module is a data writer, if the subject of the first data processing module matches the subject of the second data processing module.
[0019] In an optional embodiment, the device also includes: a creation unit for creating a publishing end topic unit and a subscribing end topic unit; the matching forwarding unit includes: a first forwarding unit for forwarding the first endpoint message or the second endpoint message through the publishing end topic unit if the first endpoint message or the second endpoint message belongs to the publishing end; a second forwarding unit for forwarding the first endpoint message or the second endpoint message through the subscribing end topic unit if the first endpoint message or the second endpoint message belongs to the subscribing end.
[0020] In an optional embodiment, the first endpoint message also includes a first entity identifier of the first data processing module, and the second endpoint message also includes a second entity identifier of the second data processing module. The first entity identifier is an indication information that the first endpoint message belongs to the publisher or the subscriber, and the second entity identifier is an indication information that the second endpoint message belongs to the publisher or the subscriber.
[0021] In an optional implementation, the first routing module, the first data processing module and the second data processing module are integrated on the same host.
[0022] In an optional embodiment, the vehicle-mounted system also includes a second routing module, the number of first data processing modules and the number of second data processing modules are both multiple, at least one first data processing module and / or at least one second data processing module is connected to the first routing module, and the remaining first data processing modules and / or the remaining second data processing modules are connected to the second routing module, and the receiving unit includes: a first receiving subunit, used to receive a first endpoint message from the first data processing module and / or the second routing module; a second receiving subunit, used to receive a second endpoint message from the second data processing module and / or the second routing module.
[0023] In an optional implementation, the first routing module is disposed on the first host, and the second routing module is disposed on the second host.
[0024] In an optional embodiment, the device also includes: an encryption processing unit, used to encrypt the first endpoint message and to encrypt the second endpoint message; the matching forwarding unit includes: a third forwarding unit, used to forward the encrypted first endpoint message or the encrypted second endpoint message according to routing information.
[0025] In a third aspect, the present invention provides a vehicle-mounted system, which includes a first routing module, a first data processing module, and a second data processing module, wherein the first data processing module and the second data processing module are both associated with a topic; the first routing module is used to receive a first endpoint message and a second endpoint message, the first endpoint message includes a topic and an address associated with the first data processing module, and the second endpoint message includes a topic and an address associated with the second data processing module; the first routing module is also used to cache routing information based on the first endpoint message and the second endpoint message; the first routing module is also used to forward the first endpoint message or the second endpoint message according to the routing information if the topic of the first data processing module matches the topic of the second data processing module, so as to complete the service discovery process.
[0026] In a fourth aspect, the present invention provides a vehicle, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the service discovery method for a vehicle according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0027] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a vehicle to execute the service discovery method for a vehicle according to the first aspect or any corresponding embodiment thereof.
[0028] In a sixth aspect, the present invention provides a computer program product, comprising computer instructions for causing a vehicle to execute the service discovery method for a vehicle according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 is a schematic diagram of a communication architecture based on a built-in protocol between a DDS publisher and a subscriber according to an embodiment of the present invention;
[0031] Figure 2 is a schematic diagram of a centralized service discovery architecture according to an embodiment of the present invention;
[0032] Figure 3 is a schematic diagram of a distributed service discovery architecture according to an embodiment of the present invention;
[0033] Figure 4 is a schematic diagram of the architecture of an in-vehicle system according to an embodiment of the present invention;
[0034] Figure 5 is a schematic diagram of the architecture of another vehicle-mounted system according to an embodiment of the present invention;
[0035] Figure 6 is a flow chart of a service discovery method for a vehicle according to an embodiment of the present invention;
[0036] Figure 7 is a schematic diagram of topology information of a simple dynamic service discovery according to an embodiment of the present invention;
[0037] Figure 8is a flow chart of another service discovery method for a vehicle according to an embodiment of the present invention;
[0038] Fig. 9 is a flow chart of another service discovery method for a vehicle according to an embodiment of the present invention;
[0039] Fig.10 The invention is a structural block diagram of a service discovery device for a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. According to the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0041] DDS is a data-centric communication middleware standard developed by the Object Management Group (OMG), which aims to achieve efficient, real-time, and reliable data transmission in distributed systems and provide a flexible data sharing mechanism between different applications, devices, and systems. In the DDS system, service discovery is a key functional module that determines the interconnection and data exchange mechanism between system components.
[0042] To facilitate understanding and implementation of the present invention, the relevant concepts in the DDS protocol are explained:
[0043] (1) Participant
[0044] A participant is a basic entity in a DDS application and provides a context for publishers, subscribers, and other related objects (such as data writers and data readers).
[0045] Each DDS application contains at least one participant. A participant can be regarded as an independent logical entity, representing the identity of the application in the DDS system. For example, in a vehicle system, a participant can correspond to an independent functional system in the vehicle, such as a body control system, a powertrain control system, etc. Taking the body control system as an example, as a participant, it interacts with other systems in the DDS system and manages its own resources such as publishers and subscribers.
[0046] A participant can have multiple publishers and subscribers at the same time to implement complex data interaction logic, which enables an application to publish and subscribe to multiple types of data on different topics.
[0047] (2) Publisher
[0048] The publisher is responsible for publishing data to a specific topic, is associated with at least one Data Writer, and sends data by calling the Data Writer's related functions. The publisher is an entity within the participant and is responsible for publishing data to the DDS system.
[0049] In the vehicle system, the publisher can be various sensors of the vehicle. For example, the speed sensor can act as a publisher to publish the real-time measured vehicle speed data to speed-related topics. For another example, the temperature sensor can also act as a publisher to publish the detected engine temperature and other data to temperature-related topics.
[0050] The publisher can also be a driving assistance system. For example, when the driving assistance system makes a decision such as adjusting the vehicle speed, it can act as a publisher to publish the relevant control instruction data to the corresponding topic for other components to receive.
[0051] (3) Subscriber
[0052] A subscriber is used to receive data from a specific topic and is associated with at least one Data Reader. It obtains data by calling the relevant functions of the DataReader. A subscriber is also an entity within a participant and is used to receive data of interest from the DDS system.
[0053] In the vehicle system, the dashboard display system can act as a subscriber to subscribe to topics such as vehicle speed and engine temperature, thereby obtaining and displaying information such as vehicle speed and engine temperature to the driver. The autonomous driving decision system can also act as a subscriber to subscribe to topics published by multiple sensors, such as speed sensors, camera sensors (publishing image data, etc.), radar sensors (publishing distance data, etc.), etc., so as to make autonomous driving decisions based on the above data.
[0054] (4) Data Writer
[0055] The Data Writer is subordinate to the publisher and actually writes the data into the DDS system and sends it to the matching subscribers.
[0056] (5) Data Reader
[0057] The data reader is subordinate to the subscriber and is responsible for reading matching data from the DDS system. The data reader can be understood as a cache, which obtains the topic data from the subscriber and then passes it to the application layer.
[0058] (6) Topic
[0059] Topic is a logical channel for data publishing and subscription. It defines the type and name of the data. Publishers and subscribers match and transmit data through topics.
[0060] The communication architecture between DDS publisher and subscriber based on built-in protocols can be as follows: Figure 1 As shown in the figure, the DDS service discovery that meets the OMG standard is divided into two parts: the Participant Discovery Protocol (PDP) stage and the Endpoint Discovery Protocol (EDP) stage. The PDP stage is used to obtain all Participant information. Participants can send announcement messages regularly. The messages include but are not limited to the participant's name, identification (ID), process information, host information, monitored user data, and the Internet Protocol (IP) and port (Port) of the discovered data; the EDP stage is used to determine the endpoint messages of the Data Writer and Data Reader, such as the subject, data type, communication IP and port number, and other information.
[0061] Specifically, in order to enable DDSs from different manufacturers to communicate with each other, the OMG standard stipulates that all types of DDSs need to implement the Simple Participant Discovery Protocol (PDP) and the Simple Endpoint Discovery Protocol (SEDP) phase to meet interoperability.
[0062] Among them, Figure 1In the , the Simple ParticipantDiscovery Protocol Writer (SPDPWriter) on the publisher is used to write participant discovery related information to the network on the publisher so that the subscriber can discover the publisher participants; the Simple ParticipantDiscovery Protocol Reader (SPDPReader) on the publisher is used to read participant discovery related information from the subscriber. The functions of SPDPWriter and SPDPReader on the subscriber are similar to those of the corresponding components on the publisher, and are used to write and read participant discovery related information on the subscriber, respectively, to achieve mutual discovery between the publisher and subscriber participants.
[0063] The Simple Endpoint Discovery Protocol Publisher Writer (SEDPPubWriter) on the publisher side is used to publish endpoint discovery related information and inform the subscriber side of the existence and related properties of its published endpoint; the Simple Endpoint Discovery Protocol Publisher Reader (SEDPPubReader) reads the discovery information related to the published endpoint from the subscriber side on the publisher side; the Simple Endpoint Discovery Protocol Subscriber Writer (SEDPSubWriter) is used to write the discovery information related to the subscribed endpoint to the subscriber side; the Simple Endpoint Discovery Protocol Subscriber Reader (SEDPSubReader) reads the discovery information related to the subscribed endpoint sent by the subscriber side on the publisher side. The SEDPPubWriter, SEDPPubReader, SEDPSubWriter, and SEDPSubReader on the subscriber side have similar functions to the corresponding components on the publisher side, and are used to write and read endpoint discovery related information on the subscriber side, respectively, to achieve mutual discovery between the publisher and subscriber endpoints.
[0064] After the EDP phase, the Wire-Level Protocol (WLP) phase is entered. The builtinRTPSParticipantMessageWriter on the publisher is used to write messages related to Real-Time Publish-Subscribe (RTPS) participants to the network on the publisher; the builtinRTPSParticipantMessageReader is used to read messages related to RTPS participants from the network on the publisher. The builtinRTPSParticipantMessageWriter and builtinRTPSParticipantMessageReader on the subscriber have similar functions to the corresponding components on the publisher, and are used to write and read messages related to RTPS participants on the subscriber, respectively.
[0065] After the WLP phase, the user writer (UserWriter) with the same topic can be matched with the user reader (UserReader). The publisher writes user data to the network for publication through the user writer (UserWriter), and the subscriber reads user data from the network through the user reader (UserReader).
[0066] Exemplarily, the service discovery architecture may be as follows: Figure 2 The centralized service discovery architecture shown in Figure 3 The distributed service discovery architecture shown in Figure 2 In the discovery server, the discovery server interacts with multiple clients (such as Client 1 to Client 4). The client registers its own information or queries service information with the discovery server. The server is responsible for storing and managing this information, responding to the client's request and informing the client of the available server(s) information. Figure 3 In the process, multiple participants (such as Participant 1 to Participant 4) are directly connected to each other and can directly discover each other through some protocol or mechanism. There is no central management node.
[0067] At present, with the development of automobile intelligence, the communication structure is becoming more and more complex, and the number of communication nodes is increasing. DDS has a large number of message sending and processing in the service discovery stage. In the existing DDS service discovery mechanism, a Topic's DataWriter or Data Reader will trigger the service discovery process of all processes after it goes online. For vehicle systems with a large number of Topics and a large number of processes, this mechanism will cause the following problems:
[0068] (1) High computational overhead. Specifically, non-related processes will spend a lot of computing resources to process EDP messages, resulting in a significant increase in the utilization of the central processing unit (CPU).
[0069] (2) The network load is heavy. Specifically, a large number of useless EDP messages occupy the network bandwidth and reduce the overall efficiency of the distributed system.
[0070] (3) Service discovery storms grow rapidly. Specifically, when there are many processes, a large number of EDP message floods will further slow down the distributed system and sometimes even cause failures and delays in services.
[0071] In view of this, the present invention provides a service discovery method for vehicles. Based on the mechanism of simple dynamic service discovery, the mechanism of Topic forwarding EDP messages is combined to effectively avoid forwarding EDP messages to irrelevant processes, which can effectively solve the problem of message surge in the service discovery stage and the performance problem of the vehicle-mounted system. At the same time, it does not change the existing implementation logic, has strong real-time performance, and can be easily expanded.
[0072] In order to better understand the service discovery method for a vehicle provided by the present invention, the architecture of the vehicle system is first described.
[0073] Specifically, the vehicle-mounted system includes at least one routing module (Edp-Router), at least one first data processing module and at least one second data processing module, and the first data processing module and the second data processing module are both associated with a subject. Among them, the first data processing module can be the above-mentioned data writer (Data Writer), and the data reader can be the above-mentioned data reader (Data Reader); or, the first data processing module is the above-mentioned Data Reader, and the second data processing module is the above-mentioned Data Writer.
[0074] The routing module is used to receive and forward EDP messages. When the number of routing modules is one, at least one first data processing module and at least one second data processing module are both communicatively connected to the routing module; when the number of routing modules is multiple, any two routing modules are communicatively connected, and each routing module is communicatively connected to a portion of the first data processing modules and / or a portion of the second data processing modules.
[0075] Specifically, the first data processing module and / or the second data processing module connected to each routing module can be configured by a designer based on the requirements of the vehicle-mounted system.
[0076] In some examples, such as Figure 4As shown, the vehicle-mounted system may include a routing module, two first data processing modules and two second data processing modules. For the convenience of distinction, one routing module is recorded as the first routing module (i.e., Edp-Router 1). In this embodiment, the two first data processing modules may be a first data writer with subject A (i.e., A(w)) and a second data writer with subject B (i.e., B(w)), and the two second data processing modules may be a first data reader with subject A (i.e., A(r)) and a second data reader with subject C (i.e., C(r)).
[0077] For example, in Figure 4 In the embodiment, a routing module, two first data processing modules and two second data processing modules can be integrated on the same host. Figure 4 The number of the first data processing modules and the second data processing modules is only an example and is not limited thereto. For example, the number of the first data processing modules may be 1, 3, or 4, and the number of the second data processing modules may be 1, 4, or 5, and the number of the first data processing modules and the number of the second data processing modules may be the same or different.
[0078] In other examples, such as Figure 5 As shown, the vehicle-mounted system may include two routing modules, three first data processing modules and two second data processing modules, and the two routing modules are respectively the first routing module (Edp-Router 1) and the second routing module (Edp-Router 2). In this embodiment, the three first data processing modules may be A(w), B(w) and the third data writer with the subject D (i.e., D(w)), and the two second data processing modules may be A(r) and C(r).
[0079] Among them, the first routing module and the second routing module are connected in communication, the first routing module is connected in communication with A(w), B(w) and C(r), and the second routing module is connected in communication with A(r) and D(w). The first routing module and the data processing module connected thereto are arranged on the first host, and the second routing module and the data processing module connected thereto are arranged on the second host. That is, the first routing module, A(w), B(w) and C(r) are integrated on the same host, and the second routing module, A(r) and D(w) are integrated on another host. The first host can be a device where one participant is located, and the second host can be a device where another participant is located.
[0080] Figure 5The number of routing modules, first data processing modules and second data processing modules is only an example and is not limited thereto. For example, the number of routing modules may be 3, 4 or 5, the number of first data processing modules may be 1, 4 or 5, and the number of second data processing modules may be 1, 2, 4 or 6. When the number of routing modules is greater than or equal to 3, any two routing modules among the plurality of routing modules are connected in communication.
[0081] According to an embodiment of the present invention, an embodiment of a service discovery method for a vehicle is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a first routing module such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0082] In this embodiment, a service discovery method for a vehicle is provided, which can be used in the first routing module of the above-mentioned vehicle-mounted system. Figure 6 is a flow chart of a service discovery method for a vehicle according to an embodiment of the present invention. Figure 6 As shown, the method comprises the following steps:
[0083] Step S601: receiving a first endpoint message and a second endpoint message.
[0084] The first endpoint message includes a topic (Topic) and an address (Locator) associated with the first data processing module, and the second endpoint message includes a topic and an address associated with the second data processing module.
[0085] Specifically, both the first endpoint message and the second endpoint message may be EDP messages, the first endpoint message is used to indicate the endpoint information of the first data processing module, and the second endpoint message is used to indicate the endpoint information of the second data processing module.
[0086] Step S602: Cache routing information according to the first endpoint message and the second endpoint message.
[0087] Specifically, after obtaining the first endpoint message and the second endpoint message, the endpoint of the first data processing module is stored according to the topic name (Topicname) of the first endpoint message, and the address of the first data processing module is recorded in the address list (Locatorlist). Similarly, the endpoint of the second data processing module is stored according to the topic name of the second endpoint message, and the address of the second data processing module is recorded in the address list to obtain routing information.
[0088] Step S603: if the subject of the first data processing module matches the subject of the second data processing module, forward the first endpoint message or the second endpoint message according to the routing information to complete the service discovery process.
[0089] Specifically, when the subject of the first data processing module is the same as the subject of the second data processing module, the first endpoint message or the second endpoint message can be forwarded according to the cached address in the routing information to complete the service discovery process. When the subject of the first data processing module is different from the subject of the second data processing module, the endpoint message is not forwarded and a new endpoint message is waited for to be added.
[0090] Exemplarily, when the first data processing module is a data writer (i.e., Data Writer) and the second data processing module is a data reader (i.e., Data Reader), the above step S603 may specifically be: if the subject of the first data processing module matches the subject of the second data processing module, send the first endpoint message to the second data processing module according to the routing information.
[0091] Specifically, when the subject of the first data processing module and the second data processing module is the same, the address of the second data processing module is found from the routing information, and the first endpoint message is forwarded to the second data processing module according to the address of the second data processing module.
[0092] Exemplarily, when the first data processing module is a data reader and the second data processing module is a data writer, the above step S603 may specifically be: if the subject of the first data processing module matches the subject of the second data processing module, send a second endpoint message to the first data processing module according to the routing information.
[0093] Specifically, when the subject of the first data processing module and the second data processing module is the same, the address of the first data processing module is found from the routing information, and the second endpoint message is forwarded to the first data processing module according to the address of the first data processing module.
[0094] The service discovery method for vehicles provided in this embodiment introduces a first routing module in the vehicle system. After acquiring the endpoint messages of each data processing module in the PDP stage, the endpoint messages are forwarded to the first routing module, which performs topic matching and forwards the endpoint messages to complete the service discovery process. In this way, the data processing modules of other topics do not have the same sending and receiving nodes, so they do not need to interact with the endpoint information, thus avoiding the processing of EDP messages by participants unrelated to the topic, and fundamentally reducing the computing overhead. Compared with Figure 7The simple dynamic service discovery mechanism shown can reduce the number of node messages from o(N^2) to o(N), fundamentally solving the service discovery message storm problem. Moreover, accurate message forwarding not only limits the sending of EDP messages to relevant participants, greatly reducing useless network transmission and protecting network resources, but also simplifies the EDP processing process, allowing only necessary processes to participate, thereby significantly reducing the CPU surge phenomenon and improving the stability of the vehicle system.
[0095] In this embodiment, a service discovery method for a vehicle is provided, which can be used in the first routing module of the above-mentioned vehicle-mounted system. Figure 8 is a flow chart of another service discovery method for a vehicle according to an embodiment of the present invention. Figure 8 As shown, the method comprises the following steps:
[0096] Step S801: receiving a first endpoint message and a second endpoint message.
[0097] Specifically, in the process of service discovery, the initial stage is first entered to create a unique background process routing module (Edp-Router) for the process, and then the PDP stage is entered to discover the endpoint information of each participant. After obtaining the endpoint information in the PDP stage, the EDP stage is entered to send the endpoint information of the current participant's data processing module to the first routing module.
[0098] Among them, the first endpoint message also includes a first entity identifier (EntityId) of the first data processing module, and the second endpoint message also includes a second entity identifier of the second data processing module. The first entity identifier is an indication information that the first endpoint message belongs to the publisher or the subscriber, and the second entity identifier is an indication information that the second endpoint message belongs to the publisher or the subscriber.
[0099] For example, if EntityId=0x000003c2, it can be determined that the data processing module belongs to the publishing end; if EntityId=0x000004c2, it can be determined that the data processing module belongs to the subscribing end.
[0100] Step S802: Create a publishing-end topic unit and a subscribing-end topic unit.
[0101] Specifically, when performing the service discovery process, the first routing module creates a publishing end topic unit (EdpPubsTopic) and a subscription end topic unit (EdpSubsTopic). The publishing end topic unit (EdpPubsTopic) is used to forward the endpoint message of the publishing end, and the subscription end topic unit (EdpSubsTopic) is used to forward the endpoint message of the subscription end.
[0102] Step S803: Cache routing information according to the first endpoint message and the second endpoint message.
[0103] For details, please see Figure 6 Step S602 of the illustrated embodiment will not be described in detail here.
[0104] Step S804: if the subject of the first data processing module matches the subject of the second data processing module, forward the first endpoint message or the second endpoint message according to the routing information to complete the service discovery process.
[0105] Exemplarily, the above step S804 may include step S8041 and step S8042:
[0106] Step S8041: If the first endpoint message or the second endpoint message belongs to the publishing end, the first endpoint message or the second endpoint message is forwarded through the publishing end topic unit.
[0107] Step S8042: If the first endpoint message or the second endpoint message belongs to the subscriber, the first endpoint message or the second endpoint message is forwarded through the subscriber topic unit.
[0108] Specifically, it can be determined based on the entity identifier whether the first endpoint message and the second endpoint message belong to the publisher or the subscriber. For example, when the EntityId of the first endpoint message or the second endpoint message is 0x000003c2, it can be determined that the first endpoint message or the second endpoint message belongs to the publisher; when the EntityId of the first endpoint message or the second endpoint message is 0x000004c2, it can be determined that the first endpoint message or the second endpoint message belongs to the subscriber.
[0109] If the first endpoint message is an endpoint message of the publishing end, the sending address of the second data processing module is found in the routing information, and the first endpoint message is forwarded to the second data processing module through the publishing end subject unit; if the first endpoint message is an endpoint message of the subscribing end, the receiving address of the first data processing module is found in the routing information, and the second endpoint information is forwarded to the first data processing module through the subscribing end subject unit.
[0110] If the second endpoint message is an endpoint message of the publishing end, the sending address of the first data processing module is found in the routing information, and the second endpoint message is forwarded to the first data processing module through the publishing end subject unit; if the second endpoint message is an endpoint message of the subscribing end, the receiving address of the second data processing module is found in the routing information, and the first endpoint information is forwarded to the second data processing module through the subscribing end subject unit.
[0111] For example, in Figure 4 The service discovery method for a vehicle provided in this embodiment is described in detail based on the vehicle-mounted system shown.
[0112] First, after the first routing module (Edp_Router1) is created, in the EDP stage, the endpoint information of each data processing module will be forwarded to Edp_Router1. The endpoint message forwarded to Edp_Router1 carries important information such as Topic, EntityId and Locator.
[0113] After receiving the endpoint messages from each data processing module, Edp_Router1 caches the routing information according to the Topic, for example, Topic A records the receiving end address and the sending end address of Topic A. In addition, Edp_Router1 will also create the sending and receiving endpoints of EdpPubsTopic and EdpSubsTopic. EdpPubsTopic is used to forward and process the endpoint message of EntityId = 0x000003c2, and EdpSubsTopic is used to forward and process the endpoint message of EntityId = 0x000004c2.
[0114] If the endpoint message EntityId received by Edp_Router1 is 0x000003c2, the sending address of the data processing module of the same Topic is found in the routing information. For example, after receiving the endpoint message of Topic A(w), it will be forwarded according to the cached address of A(r). And vice versa. Through the above steps, the sending and receiving end of Topic A completes the service discovery. Since other Topics do not have the same sending and receiving nodes, there is no interaction of endpoint information.
[0115] The service discovery method for vehicles provided in this embodiment accurately records the topics of each data processing module through the routing module, and only notifies the Participant through the EDP message when the Topic of the newly launched data processing module is the same as the Topic of a certain data processing module. It can effectively avoid invalid processing and forwarding while maintaining the advantages of dynamic service discovery, greatly improving the efficiency and stability of the vehicle system discovery mechanism, and providing more reliable and accurate support for data exchange of complex real-time systems. Moreover, using a routing module to receive and forward all EDP messages instead of creating a routing module in each process can further centrally manage and optimize message routing.
[0116] In this embodiment, a service discovery method for a vehicle is also provided, which can be used for the first routing module of the above-mentioned vehicle-mounted system. In this embodiment, the vehicle-mounted system includes a second routing module, the number of first data processing modules and the number of second data processing modules are both multiple, at least one first data processing module and / or at least one second data processing module are connected to the first routing module, and the remaining first data processing modules and / or the remaining second data processing modules are connected to the second routing module. Exemplarily, the vehicle-mounted system of this embodiment can be as follows Figure 5 shown. Fig. 9 FIG. 1 is a flow chart of another service discovery method for a vehicle according to an embodiment of the present invention. Fig. 9 As shown, the method comprises the following steps:
[0117] Step S901: receiving a first endpoint message from a first data processing module and / or a second routing module.
[0118] Specifically, the first endpoint message may come from the first data processing module directly connected to the first routing module, or the first endpoint message may come from the second routing module, and the first endpoint message of the second routing module comes from the first data processing module connected to the second routing module.
[0119] For example, Figure 5 As shown, the first routing module receives endpoint information from A(w), receives endpoint information from B(w), and receives endpoint information from D(w) sent by EdpPubsTopic of the second routing module.
[0120] Similarly, if Figure 5 As shown, the second routing module receives the endpoint information from D(w) and receives the endpoint information of A(w) and the endpoint information of B(w) sent by EdpPubsTopic from the first routing module.
[0121] Step S902: receiving a second endpoint message from a second data processing module and / or a second routing module.
[0122] Specifically, the second endpoint message may come from a second data processing module directly connected to the first routing module, or the second endpoint message may come from the second routing module, and the second endpoint message of the second routing module may come from a second data processing module directly connected to the second routing module.
[0123] For example, Figure 5 As shown, the first routing module receives the endpoint information from C(r) and receives the endpoint information of A(r) sent by EdpSubsTopic from the second routing module.
[0124] Similarly, if Figure 5 As shown, the second routing module receives the endpoint information from A(r) and the endpoint information of C(r) sent by EdpSubsTopic from the first routing module.
[0125] Step S903: Cache routing information according to the first endpoint message and the second endpoint message.
[0126] For details, please see Figure 6 Step S602 of the illustrated embodiment will not be described in detail here.
[0127] Step S904, encrypting the first endpoint message and encrypting the second endpoint message.
[0128] Specifically, the first routing module, the second routing module, the first data processing module and the second data processing module may share a key, and the first routing module uses the key to encrypt the first endpoint message and the second endpoint message before data transmission.
[0129] Step S905: if the subject of the first data processing module matches the subject of the second data processing module, the encrypted first endpoint message or the encrypted second endpoint message is forwarded according to the routing information.
[0130] Specifically, when the corresponding data processing module receives the encrypted first endpoint message or the encrypted second endpoint message, it can be decrypted using the key.
[0131] The service discovery method for vehicles provided in this embodiment can store routing information in a distributed manner in the routing modules of each participant through the interaction of multiple routing modules, rather than being concentrated in one routing module. Each participant queries and updates routing information as needed, thereby realizing decentralized message forwarding. Moreover, the introduction of encryption and authentication mechanisms in the message forwarding process can ensure the security and integrity of EDP messages and prevent malicious attacks and data leakage.
[0132] In some examples, the service discovery and message forwarding functions can be migrated to the cloud (cloud server), and a high-availability and scalable EDP message processing solution can be provided through cloud services. In this embodiment, artificial intelligence or machine learning algorithms can also be used to optimize routing information, dynamically adjust endpoint message forwarding paths based on historical data and real-time analysis, and improve the communication efficiency of the vehicle system.
[0133] In this embodiment, a service discovery device for a vehicle is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceivable. Among them, the service discovery device for a vehicle may be the above-mentioned first routing module.
[0134] This embodiment provides a service discovery device for a vehicle, such as Fig.10 As shown, including:
[0135] A receiving unit 1001 is used to receive a first endpoint message and a second endpoint message, the first endpoint message includes a subject and an address associated with the first data processing module, and the second endpoint message includes a subject and an address associated with the second data processing module;
[0136] A cache unit 1002, configured to cache routing information according to the first endpoint message and the second endpoint message;
[0137] The matching forwarding unit 1003 is used to forward the first endpoint message or the second endpoint message according to the routing information if the subject of the first data processing module matches the subject of the second data processing module to complete the service discovery process.
[0138] In some optional implementations, the matching and forwarding unit 1003 includes:
[0139] A first sending unit is used to send a first endpoint message to the second data processing module according to routing information when the first data processing module is a data writer and the second data processing module is a data reader if the subject of the first data processing module matches the subject of the second data processing module;
[0140] The second sending unit is used to send a second endpoint message to the first data processing module according to the routing information when the first data processing module is a data reader and the second data processing module is a data writer if the subject of the first data processing module matches the subject of the second data processing module.
[0141] In some optional embodiments, the device further comprises:
[0142] Create unit, used to create publishing end topic unit and subscription end topic unit;
[0143] The matching and forwarding unit 1003 includes:
[0144] A first forwarding unit, configured to forward the first endpoint message or the second endpoint message through a publishing end topic unit if the first endpoint message or the second endpoint message belongs to the publishing end;
[0145] The second forwarding unit is used to forward the first endpoint message or the second endpoint message through the subscription end topic unit if the first endpoint message or the second endpoint message belongs to the subscription end.
[0146] In some optional embodiments, the first endpoint message also includes a first entity identifier of the first data processing module, and the second endpoint message also includes a second entity identifier of the second data processing module. The first entity identifier is an indication information that the first endpoint message belongs to the publisher or the subscriber, and the second entity identifier is an indication information that the second endpoint message belongs to the publisher or the subscriber.
[0147] In some optional implementations, the first routing module, the first data processing module, and the second data processing module are integrated on the same host.
[0148] In some optional implementations, the vehicle-mounted system further includes a second routing module, the number of the first data processing modules and the number of the second data processing modules are both multiple, at least one first data processing module and / or at least one second data processing module is connected to the first routing module, and the remaining first data processing modules and / or the remaining second data processing modules are connected to the second routing module, and the receiving unit 1001 includes:
[0149] A first receiving subunit, configured to receive a first endpoint message from the first data processing module and / or the second routing module;
[0150] The second receiving subunit is used to receive a second endpoint message from the second data processing module and / or the second routing module.
[0151] In some optional implementations, the first routing module is disposed on the first host, and the second routing module is disposed on the second host.
[0152] In some optional embodiments, the device further comprises:
[0153] An encryption processing unit, used for encrypting the first endpoint message and encrypting the second endpoint message;
[0154] The matching and forwarding unit 1003 includes:
[0155] The third forwarding unit is used to forward the encrypted first endpoint message or the encrypted second endpoint message according to the routing information.
[0156] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0157] The service discovery device for vehicles in this embodiment is presented in the form of a functional unit, where the unit refers to an application specific integrated circuit (ASIC) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0158] An embodiment of the present invention further provides a vehicle-mounted system, which includes a first routing module, a first data processing module, and a second data processing module, wherein the first data processing module and the second data processing module are both associated with a topic.
[0159] The first routing module is used to receive a first endpoint message and a second endpoint message, the first endpoint message includes a subject and an address associated with the first data processing module, and the second endpoint message includes a subject and an address associated with the second data processing module; the first routing module is also used to cache routing information based on the first endpoint message and the second endpoint message; the first routing module is also used to forward the first endpoint message or the second endpoint message according to the routing information if the subject of the first data processing module matches the subject of the second data processing module, so as to complete the service discovery process.
[0160] An embodiment of the present invention further provides a vehicle having the above-mentioned vehicle-mounted system or a service discovery device for a vehicle.
[0161] The vehicle includes: one or more processors, memory, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the vehicle, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple vehicles can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0162] The processor may be a central processing unit, a network processor or a combination thereof. The processor may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0163] The memory stores instructions executable by at least one processor, so that the at least one processor executes the method shown in the above embodiment.
[0164] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the vehicle, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the vehicle via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0165] The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid state drive; the memory may also include a combination of the above types of memory.
[0166] The vehicle also includes a communication interface for the vehicle to communicate with other devices or a communication network.
[0167] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0168] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a vehicle, can call or provide the method and / or technical solution according to the present invention through the operation of the vehicle. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes but is not limited to source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0169] In the description of this specification, the description with reference to the terms "this embodiment", "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0170] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0171] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the present invention.
Claims
1. A service discovery method for a vehicle, characterized in that: A first routing module applied to a vehicle-mounted system, the vehicle-mounted system comprising the first routing module, a first data processing module and a second data processing module, the first data processing module and the second data processing module are both associated with a subject, the method comprising: receiving a first endpoint message and a second endpoint message, wherein the first endpoint message includes a subject and an address associated with the first data processing module, and the second endpoint message includes a subject and an address associated with the second data processing module; caching routing information according to the first endpoint message and the second endpoint message; If the subject of the first data processing module matches the subject of the second data processing module, the first endpoint message or the second endpoint message is forwarded according to the routing information to complete the service discovery process.
2. The method according to claim 1, characterized in that If the subject of the first data processing module matches the subject of the second data processing module, forwarding the first endpoint message or the second endpoint message according to the routing information includes: When the first data processing module is a data writer and the second data processing module is a data reader, if the subject of the first data processing module matches the subject of the second data processing module, the first endpoint message is sent to the second data processing module according to the routing information; When the first data processing module is a data reader and the second data processing module is a data writer, if the subject of the first data processing module matches the subject of the second data processing module, the second endpoint message is sent to the first data processing module according to the routing information.
3. The method according to claim 1, characterized in that Before forwarding the first endpoint message or the second endpoint message according to the routing information, the method further includes: Create a publishing-side topic unit and a subscription-side topic unit; The forwarding the first endpoint message or the second endpoint message according to the routing information includes: If the first endpoint message or the second endpoint message belongs to the publishing end, forwarding the first endpoint message or the second endpoint message through the publishing end topic unit; If the first endpoint message or the second endpoint message belongs to a subscriber, the first endpoint message or the second endpoint message is forwarded through the subscriber topic unit.
4. The method according to claim 3, characterized in that The first endpoint message also includes a first entity identifier of the first data processing module, and the second endpoint message also includes a second entity identifier of the second data processing module. The first entity identifier is indication information that the first endpoint message belongs to the publisher or the subscriber, and the second entity identifier is indication information that the second endpoint message belongs to the publisher or the subscriber.
5. The method according to any one of claims 1 to 4, characterized in that The first routing module, the first data processing module and the second data processing module are integrated on the same host.
6. The method according to any one of claims 1 to 4, characterized in that The vehicle-mounted system further includes a second routing module, the number of the first data processing modules and the number of the second data processing modules are both plural, at least one of the first data processing modules and / or at least one of the second data processing modules is connected to the first routing module, the remaining first data processing modules and / or the remaining second data processing modules are connected to the second routing module, the first routing module is connected to the second routing module, and the receiving of the first endpoint message and the second endpoint message includes: Receiving a first endpoint message from the first data processing module and / or the second routing module; Receive a second endpoint message from the second data processing module and / or the second routing module.
7. The method according to claim 6, characterized in that The first routing module is arranged on the first host, and the second routing module is arranged on the second host.
8. The method according to any one of claims 1 to 4, characterized in that Before forwarding the first endpoint message or the second endpoint message according to the routing information, the method further includes: Encrypting the first endpoint message and encrypting the second endpoint message; The forwarding the first endpoint message or the second endpoint message according to the routing information includes: The encrypted first endpoint message or the encrypted second endpoint message is forwarded according to the routing information.
9. A service discovery device for a vehicle, characterized in that: The device comprises: A receiving unit, configured to receive a first endpoint message and a second endpoint message, wherein the first endpoint message includes a subject and an address associated with the first data processing module, and the second endpoint message includes a subject and an address associated with the second data processing module; A cache unit, configured to cache routing information according to the first endpoint message and the second endpoint message; A matching forwarding unit is used to forward the first endpoint message or the second endpoint message according to the routing information if the subject of the first data processing module matches the subject of the second data processing module to complete the service discovery process.
10. A vehicle-mounted system, characterized in that: The vehicle-mounted system includes a first routing module, a first data processing module, and a second data processing module, wherein the first data processing module and the second data processing module are both associated with a topic; The first routing module is used to receive a first endpoint message and a second endpoint message, the first endpoint message includes a subject and an address associated with the first data processing module, and the second endpoint message includes a subject and an address associated with the second data processing module; The first routing module is further used to cache routing information according to the first endpoint message and the second endpoint message; The first routing module is also used to forward the first endpoint message or the second endpoint message according to the routing information if the subject of the first data processing module matches the subject of the second data processing module to complete the service discovery process.
11. A vehicle, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the service discovery method for a vehicle according to any one of claims 1 to 8 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a vehicle to execute the service discovery method for a vehicle according to any one of claims 1 to 8.
13. A computer program product, characterized in that The method comprises computer instructions for causing a vehicle to execute the service discovery method for a vehicle according to any one of claims 1 to 8.