A data distribution method, system, device and medium

By mapping services to multiple topic categories and performing topic matching verification, the problem of limited service calls caused by MCU chip resource constraints is solved, the efficiency and capability of automotive communication is improved, and efficient data under the DDS protocol stack is achieved distribution.

CN115883669BActive Publication Date: 2024-11-01CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211510948.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2024-11-01
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

In automotive communication, the limited number of MCU chip resources leads to the limited number of service calls, affecting communication efficiency and capabilities. Especially during the deployment of the DDS protocol stack, the problem of limited number of topics seriously affects the efficiency of data transmission.

Method used

By mapping the services that the client needs to call into subscription topics of multiple different topic categories, and performing topic matching verification with the publishing topics on the server, establishing communication connections, realizing data distribution, and thus improving service calls under resource constraints. Quantity and communication efficiency.

Benefits of technology

It realizes large orders of service calls on resource-constrained MCU chips, improves communication efficiency, and ensures targeted topic matching and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883669B_ABST
    Figure CN115883669B_ABST
Patent Text Reader

Abstract

The present application provides a data distribution method, system, device and medium, the method comprising: mapping the service that the client needs to call to multiple subscription topics of different topic categories, so that one subscription topic mounts multiple services that need to be called; the client performs topic matching verification on the subscription topic and the publishing topic of the server, and after the verification is passed, establishes a communication connection between the client and the server; after the communication connection is established, obtains the corresponding service data of the server based on the service call request to complete the data distribution. The present application can effectively ensure the communication efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication technology, and in particular to a data distribution method, system, device and medium. Background Art

[0002] With the introduction of the concept of software-defined cars, DDS (Data Distribution Service) has become more and more popular in vehicle communications, so more and more hardware devices on cars use DDS for communication. The chips of hardware devices on cars are mainly divided into two categories: MPU (Micro Processor Unit) and MCU (Micro Control Unit). MPU focuses on executing complex and diverse large programs through relatively powerful computing and processing capabilities, and usually requires external large-capacity memory; while MCU usually runs relatively single tasks and performs management and control functions for hardware devices. It usually does not require strong computing and processing capabilities, so there is no external large-capacity memory and limited resources. However, compared with communication middleware such as SOMEIP (Scalable service-Oriented Middleware over IP), DDS (Data Distribution Service) has more mechanisms to ensure the correct transmission of data, which inevitably leads to greater resource consumption. Therefore, the design of DDS needs to consider the resource limitations of the chip during the MCU deployment process.

[0003] The MCU chips currently used can generally provide about 200K resources for DDS. The DDS protocol stack itself occupies about 50K (only one Participant is initialized). The Writer / Reader operations in the entity information matching phase of DDS communication will each occupy 4K, and the topic-related information will occupy 1K, so about 30 topics (one-way) can be carried on the MCU. In the MPU chip, there are sufficient resources, and there is no problem of limited number of topics, and thousands of topics can be easily run. In the service-based architecture, the controller devices on the vehicle side need to call each other's services. Since the number of topics on the MCU is limited, the number of services that can be called will also be limited, which greatly affects the efficiency and capabilities of communication in the car. Summary of the invention

[0004] In view of the above problems existing in the prior art, the present application proposes a data distribution method, system, device and medium, which mainly solves the problem that the existing service call is limited by processor resources and thus affects the communication efficiency.

[0005] In order to achieve the above-mentioned purpose and other purposes, the technical solution adopted in this application is as follows.

[0006] The present application provides a data distribution method, comprising:

[0007] Map the services that the client needs to call to multiple subscription topics of different topic categories, so that one subscription topic can mount multiple services that need to be called;

[0008] The client performs a topic matching verification on the subscription topic and the publishing topic of the server, and after the verification is passed, establishes a communication connection between the client and the server;

[0009] After the communication connection is established, the corresponding service data of the server is obtained based on the service call request to complete the data distribution.

[0010] In an embodiment of the present application, after mapping the services that the client needs to call to multiple topics, it also includes:

[0011] The services that the server needs to provide are mapped to multiple publishing topics of different topic categories, so that one publishing topic mounts multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscription topic.

[0012] In an embodiment of the present application, after mapping the service that the client needs to call to a plurality of subscription topics of different topic categories, the following is further included:

[0013] Provide multiple preset data fields;

[0014] Establishing a first mapping relationship between the subscription topics of different topic categories and data domains, so that the subscription topics of different topic categories belong to different data domains; and,

[0015] A second mapping relationship between the publishing topic and the data domain is established.

[0016] In one embodiment of the present application, through subject matching verification between the client and the server, a communication connection between the client and the server is established after the verification is passed, including:

[0017] Determine, according to the first mapping relationship, a domain identifier of the data domain to which the subscription subject belongs;

[0018] Determine the domain identifier of the data domain to which the publishing topic belongs according to the second mapping relationship;

[0019] The domain identifiers corresponding to the subscription topic and the publication topic are verified to obtain the publication topic and subscription topic with the same domain identifiers, and the communication connection is established by performing topic matching verification based on the publication topic and subscription topic with the same domain identifiers.

[0020] In an embodiment of the present application, before performing topic matching verification based on the publishing topic and the subscription topic with the same domain identifier, the method further includes:

[0021] An identifier is configured for the subscription topic. When the server receives a subscription topic with the identifier, it is assumed that the server matches the topic of the client.

[0022] In one embodiment of the present application, subject matching verification is performed based on the publishing subject and the subscription subject with the same domain identifier, including:

[0023] Obtaining a first hash code of a service provided by a service publisher in the publishing topic and a second hash code of a service required by a service subscriber in the subscription topic;

[0024] If the first hash code is consistent with the second hash code, the subject matching verification is successful.

[0025] In an embodiment of the present application, the subscription topic of each topic category includes a request topic for requesting message transmission and a reply topic for replying message transmission, and obtaining corresponding service data of the server based on the service call request includes:

[0026] A request is sent to the server through the request subject, and the reply subject receives reply information corresponding to the request sent by the server based on the request subject; or

[0027] The request sent by the server is received through the request subject, and the reply subject returns the corresponding reply information, so that the request sent and received by the server is synchronized with the request received and sent and received by the client.

[0028] In an embodiment of the present application, after establishing the communication connection, the method further includes:

[0029] Based on the service required by the client, a preset service quality policy is called to obtain network configuration parameters so as to perform communication data transmission based on the network configuration parameters.

[0030] In an embodiment of the present application, a plurality of preset data fields are provided, and then, the following is further included:

[0031] A transfer node connecting different data domains is set up, and services or topics in different data domains are pulled through the transfer node to complete cross-domain data transmission.

[0032] The present application also provides a data distribution system, comprising:

[0033] The topic mapping module is used to map the services that the client needs to call to multiple subscription topics of different topic categories, so that one subscription topic can mount multiple services that need to be called;

[0034] A communication verification module is used to verify the subject matching between the subscription subject and the publishing subject of the server through the client, and establish a communication connection between the client and the server after the verification is passed;

[0035] The data transmission module is used to obtain the corresponding service data of the server based on the service call request after establishing the communication connection, and complete the data distribution.

[0036] The present application also provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data distribution method when executing the computer program.

[0037] The present application also provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the data distribution method when executed by a processor.

[0038] As described above, the present application provides a data distribution method, system, device and medium, which have the following beneficial effects.

[0039] This application maps the services that the client needs to call to subscription topics of multiple different topic categories, so that one subscription topic can mount multiple services that need to be called; the client verifies the topic matching between the subscription topic and the publishing topic of the server, and establishes a communication connection between the client and the server after the verification; after the communication connection is established, the corresponding service data of the server is obtained based on the service call request to complete the data distribution. By carrying out data communication by hanging multiple services under one topic, a large number of service calls can be achieved even if the client resources are limited; targeted service calls are made for matching topics to effectively ensure communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 Schematic diagram of an application scenario of a data distribution system in one embodiment of the present application.

[0041] Figure 2 A schematic diagram of the structure of a terminal provided in one embodiment of the present application.

[0042] Figure 3 Schematic diagram of a data distribution method in an embodiment of the present application.

[0043] Figure 4 This is a timing diagram of establishing a communication connection in an embodiment of the present application.

[0044] Figure 5 Schematic diagram of the message transmission architecture in one embodiment of the present application.

[0045] Figure 6 A schematic diagram of a topic setting architecture between a client and a server in an embodiment of the present application.

[0046] Figure 7 It is a module diagram of a data distribution system in one embodiment of the present application.

[0047] Figure 8 It is a schematic diagram of the structure of a device in one embodiment of the present application. DETAILED DESCRIPTION

[0048] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0049] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0050] The resources that the MCU chips currently used can provide for DDS are generally around 200K, the DDS protocol stack itself occupies about 50K (only one participant is initialized), the Writer / Reader operation in the entity information matching phase of DDS communication will occupy 4K each, and the topic related information will occupy 1K, so the MCU can carry about 30 topics (one-way). In the MPU chip, there are sufficient resources, there is no problem of limited topic number, and thousands of topics can be easily run.

[0051] Currently, based on the service-oriented architecture, various controller devices can call services from each other. Service calls usually fall into the following four situations:

[0052] 1. MPU calls the service in MPU;

[0053] 2. MPU calls the service in MCU;

[0054] 3. MCU calls the service in MPU;

[0055] 4. MCU calls the service in MCU.

[0056] In the first case, if MPU resources are sufficient, there is no problem of limited topic number;

[0057] In the second case, the MPU can call services on the MCU through a maximum of about 30 topics;

[0058] In the third case, the MCU can only call services on the MPU through about 30 topics at most;

[0059] In the fourth case, the MCU can only call services on the MCU through about 30 topics at most.

[0060] Therefore, the current situation is that the number of topics in the entire vehicle is restricted by the minimum resource module, which greatly affects the efficiency and capabilities of communication in the vehicle.

[0061] Based on the above problems existing in the prior art, the present application discloses a data distribution method, system, device and medium. The technical solution of the present application is elaborated in detail below in conjunction with specific embodiments.

[0062] The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, smart cars, etc. The following describes an exemplary application of the device provided in the embodiments of the present application. The device provided in the embodiments of the present application can be implemented as various types of user terminals such as smart phones, smart watches, laptops, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), intelligent voice interaction devices, smart home appliances, and vehicle-mounted terminals, and can also be implemented as servers. Below, an exemplary application when the device is implemented as a server will be described.

[0063] See also Figure 1 , Figure 1 The schematic diagram of the application scenario of the data distribution system in one embodiment of the present application is as follows: The terminal 400 (terminal 400-1 and terminal 400-2 are shown as examples) is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.

[0064] Terminal 400-1 is used to call the service provided by the server. A client 410-1 for data distribution runs on terminal 400-1. When terminal 400-1 is used as a resource of the DDS protocol stack, the service to be called on terminal 400-1 can be mapped to a plurality of subscription topics of different topic categories. For example, according to different functional requirements of the service, topics are divided into three categories: request, notification and response. The topics can be functionally classified through client 410-1. After the mapping is completed, the server 200 is interacted with through the network 300 based on the three topic categories, and a request is output to call the service and obtain the reply information of the server 200. The energy demand or interaction information is uploaded to the server 200 through the network 300.

[0065] The server 200 is used to map the services that the server needs to provide to multiple publishing topics of different topic categories, so that one publishing topic can mount multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscribed topic. The terminal 400-2 calls the required service from the server 200 through the network 300, matches the energy allocation strategy from the energy spectrum, confirms the energy allocation strategy, and feeds back the result to the server 200. When allocating a large number of services to a limited topic, it is necessary to consider how to keep the communication of the entire vehicle system normal, fast, safe and reliable. This requires the QoS (Quality of Service) setting in the DDS feature, and ensures the communication quality of DDS unequal topics by selecting and configuring appropriate QoS strategies.

[0066] Terminal 400-2 can also be used to concentrate all services or methods that need to be called on the MPU in a request class topic, a response class topic, and a notification class topic according to functional requirements, and perform topic matching verification with server 200 based on the topic class. A communication connection between terminal 400-2 and server 200 has been established for data distribution.

[0067] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, and a vehicle-mounted terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0068] In some embodiments, terminal 400-1 may also be directly connected to terminal 400-2. Terminal 400-1 performs matching verification based on the mapped subject class and the subject corresponding to terminal 400-2, establishes a communication connection, and performs service request and call.

[0069] In some embodiments, the manager can also directly demarcate the area and construct the energy map of the demarcated area on the terminal 400-2, so that the terminal 400-2 can execute the vehicle energy sharing method in the embodiment of the present application according to the energy demand of the vehicle to be supplied. Or, in some embodiments, Figure 1 The terminal 400-1 and the terminal 400-2 in the embodiment can also be implemented as a server, that is, an energy spectrum is constructed based on a server-type device to generate energy supply services. The above implementation methods can be selected according to actual conditions, and the embodiments of the present application are not limited thereto.

[0070] See also Figure 2 , Figure 2 is a schematic diagram of the structure of the terminal 400 provided in an embodiment of the present application, Figure 2 The terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0071] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0072] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0073] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 250 may optionally include one or more storage devices that are physically remote from the processor 410.

[0074] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0075] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0076] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0077] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB);

[0078] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0079] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0080] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 A data distribution system 455 stored in the memory 450 is shown, which may be software in the form of programs and plug-ins, etc., including the following software modules: a topic mapping module 4551, a communication verification module 4552 and a data transmission module 4553. These modules are logical and therefore may be arbitrarily combined or further split according to the functions implemented.

[0081] The functions of each module will be described below.

[0082] In other embodiments, the system provided in the embodiments of the present application can be implemented in hardware. As an example, the system provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data distribution method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.

[0083] In some embodiments, the terminal or server can implement the data distribution method provided by the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; it can be a native application (APP, Application), that is, a program that needs to be installed in the operating system to run, such as a social application APP or a message sharing APP; it can also be a small program, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program or a web client program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form.

[0084] See also Figure 3 , the present application provides a data distribution method, which includes the following steps.

[0085] Step S300, mapping the services that the client needs to call to a plurality of subscription topics of different topic categories, so that one subscription topic mounts a plurality of services that need to be called.

[0086] In one embodiment, taking MCU as the client as an example, the number of topics that can be carried on the MCU at this stage is about 30, and there are thousands of SOA services that need to carry the MPU on the MCU. If the SOA (Service-Oriented Architecture) services are mapped to topics one by one, this will result in far insufficient MCU resources. Therefore, it is necessary to hang as many services under one topic as possible under the limited number of topics. The client maps the services that need to be called to three subscription topics. In addition, according to the different functional requirements of the services, the topics are divided into three categories: request, notification and response, so that a large number of services can be managed effectively. The specific topic category and quantity can be set according to the actual application needs, and there is no restriction here.

[0087] In one embodiment, after mapping the service that the client needs to call to a plurality of subscription topics of different topic categories, the method further includes:

[0088] Provide multiple preset data fields;

[0089] Establishing a first mapping relationship between the subscription topics of different topic categories and data domains, so that the subscription topics of different topic categories belong to different data domains; and,

[0090] A second mapping relationship between the publishing topic and the data domain is established.

[0091] Specifically, different topics are divided into different data domains to isolate data; however, due to the domain isolation mechanism, once the domains need to be interconnected, a transit node is required to achieve cross-domain transmission. This method can make the DDS communication of the entire vehicle organized and orderly, which is the cornerstone of realizing DDS unequal topic communication. After determining the data domain corresponding to the subscription topic and the publishing topic, the corresponding topic can be marked by the data domain identifier, and then the first mapping relationship or the second mapping relationship can be established.

[0092] Step S310: The client performs a topic matching verification on the subscription topic and the publishing topic of the server, and establishes a communication connection between the client and the server after the verification is passed.

[0093] In one embodiment, the subject matching verification between the client and the server is performed, and after the verification is passed, a communication connection between the client and the server is established, including:

[0094] Determine, according to the first mapping relationship, a domain identifier of the data domain to which the subscription subject belongs;

[0095] Determine the domain identifier of the data domain to which the publishing topic belongs according to the second mapping relationship;

[0096] The domain identifiers corresponding to the subscription topic and the publication topic are verified to obtain the publication topic and subscription topic with the same domain identifiers, and the communication connection is established by performing topic matching verification based on the publication topic and subscription topic with the same domain identifiers.

[0097] Specifically, a strong check is performed on the domain identifiers corresponding to the topics of the corresponding topic categories between the client and the server to determine whether the domain identifiers are consistent. If the domain identifiers are consistent, it is considered that the corresponding topics of the client and the server are in the same data domain, and the domain participants in the same data domain can be discovered through the SPDP (Simple Participant Discovery Protocol) in the DDS protocol. Further topic matching verification is performed.

[0098] In one embodiment, before performing the topic matching verification based on the publishing topic and the subscription topic with the same domain identifier, the method further includes:

[0099] An identifier is configured for the subscription topic. When the server receives a subscription topic with the identifier, it is assumed that the server matches the topic of the client.

[0100] See also Figure 4 , Figure 4 This is a timing diagram for establishing a communication connection in an embodiment of the present application. When the MCU acts as a server, all services or methods that need to be called on the MPU are concentrated in a request class topic, a response class topic, and a notification class topic according to functional requirements. These three types of topics are subscription topics, and the names of these topics need to add the "Universal" logo to facilitate the completion of the SEDP (Simple Endpoint Discovery Protocol) link in the DDS protocol.

[0101] In one embodiment, subject matching verification is performed based on the publishing subject and the subscription subject with the same domain identifier, including:

[0102] Obtaining a first hash code of a service provided by a service publisher in the publishing topic and a second hash code of a service required by a service subscriber in the subscription topic;

[0103] If the first hash code is consistent with the second hash code, the subject matching verification is successful.

[0104] When the MCU and MPU are in the same domain, the MCU can complete the SPDP (Domain Participant Discovery Protocol) link in the DDS protocol with the MPU; the MCU device sends a topic name with the "Universal" identifier, and the MPU forces all topics to match these topics of the MCU. The MPU device sends the topic name with an identifier and the hashid of the method to the MCU device, and the MCU device matches the corresponding service method according to the hashid of the method to complete the SEDP link in the DDS protocol.

[0105] The SPDP protocol will first strongly check the domainID, and then find the topic after the verification is the same. When it is found that the topic of the other end is "Universal", it is assumed that the topics are matched and the topic will not be strongly checked. Then the hash code hashid of the method is strongly checked (the reason why the hashid is strongly checked instead of the method is because the method is prone to duplication, and the hashid is used to achieve the uniqueness of each method). The client and the server will make specific feedback replies based on the method request. Requests and replies that do not match the domainID (domain identifier) ​​and the hashid of the method will also be ignored. The method can be regarded as the entity corresponding to the publishing service or subscription service, and the entity corresponds to various services. The hashid can be regarded as the unique identifier of the publisher or subscriber of the corresponding service. The hashid of the method can be used to determine who published the service or who subscribed to the service.

[0106] Step S320, after the communication connection is established, the corresponding service data of the server is obtained based on the service call request to complete the data distribution.

[0107] In one embodiment, after the communication connection is established, the method further includes: based on the service required by the client, calling a preset service quality policy to obtain network configuration parameters, so as to perform communication data transmission based on the network configuration parameters.

[0108] Specifically, when assigning a large number of services to a limited number of topics, it is necessary to consider how to keep the communication of the entire vehicle system normal, fast, safe and reliable. This requires the QoS (quality of service) setting in the DDS feature, and to ensure the communication quality of DDS unequal topics by selecting and configuring appropriate QoS policies. According to the basic QoS policies of the DDS protocol itself, or the special QoS developed for specific scenarios, reasonable QoS configuration is performed for each service.

[0109] In one embodiment, the subscription topic of each topic category includes a request topic for requesting message transmission and a reply topic for replying message transmission, and obtaining corresponding service data of the server based on the service call request includes:

[0110] A request is sent to the server through the request subject, and the reply subject receives reply information corresponding to the request sent by the server based on the request subject; or

[0111] The request sent by the server is received through the request subject, and the reply subject returns the corresponding reply information, so that the request sent and received by the server is synchronized with the request received and sent and received by the client.

[0112] See also Figure 5 , Figure 5 This is a schematic diagram of the architecture of message transmission in an embodiment of the present application. Due to limited resources, the services or methods in the MCU will concentrate all of their own services or methods in a request class topic, a response class topic, and a notification class topic. The resources in the MPU are sufficient, and each of its own services or methods becomes a topic. The request class topic in the MCU will correspond to all request class services in the MPU, which are also request class topics, and a request class topic contains a "Universal_request_topic" and a "Universal_reply_topic". The former transmits request messages after establishing a communication connection, and the latter transmits reply messages after establishing a communication connection, so that the communication between services is similar to the concept of "dual thread". The request issuance and return receipt of the server, and the request receipt and return issuance of the client are carried out synchronously, so that when a single topic relies on a large number of services, the efficiency of communication can also be guaranteed. The architecture and processing flow of the response class and notification class topics are the same as those of the request class topics, so they will not be repeated.

[0113] See also Figure 6 , Figure 6This is a diagram of the topic setting architecture between the client and the server in one embodiment of the present application. When the MCU is used as the client and the MPU is used as the server, the MCU will put all services or methods that need to be called into a request class topic, a response class topic, and a notification class topic according to functional requirements due to limited resources. However, the names of these topics need to be marked with "Universal". Each type of topic contains two topics, which are used for request and reply respectively for topic verification. At this time, the MPU is used as the server. The MPU will not limit the number of topics due to limited resources. Therefore, when the MPU is used as the server, the number of topics can be hundreds or thousands. For topic verification methods, please refer to Figure 5 .

[0114] In one embodiment, after mapping the services that the client needs to call to multiple topics, the method further includes:

[0115] The services that the server needs to provide are mapped to multiple publishing topics of different topic categories, so that one publishing topic mounts multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscription topic.

[0116] Specifically, when the MPU acts as a client and the MCU acts as a server, the MCU will also be resource-constrained and, based on functional requirements, will concentrate all services or methods that need to be provided into a request type topic, a response type topic, and a notification type topic. These three topic categories are publishing topics. First, the number of client topics will be limited by the minimum number of server topics. Secondly, in order to achieve corresponding topic matching, the MPU will, based on functional requirements, concentrate all services or methods that the MCU needs to call into a request type topic, a response type topic, and a notification type topic. The three categories of topics here are subscription topics. Therefore, when the MPU interacts with the MCU as a client, its topics are limited, even if there are sufficient resources available.

[0117] When MPUs serve as clients and servers to each other, neither side will have limited resources, so the topic category can be designed according to its own architecture design, and the number of topics will not be limited and can be hundreds or thousands; when MCUs serve as clients and servers to each other, both sides will put all services or methods into one request type topic, one response type topic, and one notification type topic according to functional requirements due to limited resources and matching topic factors, and add "Universal" to the topic name for identification.

[0118] In one embodiment, when the MPU device receives an RPC (Remote Procedure Call) request from the MCU device, it filters out requests that do not belong to itself based on the hashid of the method; when the MCU device receives an RPC reply from the MPU device, it filters out responses that do not belong to itself based on the GUID (Globally Unique Identifier). The GUID is generated after the RPC (Remote Procedure Call) is established.

[0119] Based on the above technical solution, by designing the unequal number of topics between MCU and MPU, the problem of limited resources of DDS protocol stack deployed on MCU chip in the existing technology can be effectively solved, so as to achieve the communication goal of MPU and MCU hardware devices under SOA architecture and promote the realization of SOA (service-oriented) architecture in vehicle software design.

[0120] See also Figure 4 , Figure 4 This is a module diagram of a data distribution system in one embodiment of the present application, and the system includes: a topic mapping module 4551, which is used to map the service that the client needs to call to a plurality of subscription topics of different topic categories, so that one subscription topic can mount a plurality of services that need to be called; a communication verification module 4552, which is used to perform topic matching verification on the subscription topic and the publishing topic of the server through the client, and establish a communication connection between the client and the server after the verification is passed; a data transmission module 4553, which is used to obtain the corresponding service data of the server based on the service call request after the communication connection is established, and complete the data distribution.

[0121] In one embodiment, the topic mapping module 4551 is also used to map the services that the client needs to call into multiple topics, and also includes: mapping the services that the server needs to provide into multiple publishing topics of different topic categories, so that one publishing topic can mount multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscription topic.

[0122] In one embodiment, the topic mapping module 4551 is also used to map the service that the client needs to call to subscription topics of multiple different topic categories, and also includes: providing multiple preset data domains; establishing a first mapping relationship between the subscription topics and data domains of different topic categories so that the data domains to which the subscription topics of different topic categories belong are different; and, establishing a second mapping relationship between the publishing topic and the data domain.

[0123] In one embodiment, the communication verification module 4552 is also used to perform topic matching verification between the client and the server, and establish a communication connection between the client and the server after the verification is passed, including: determining the domain identifier of the data domain to which the subscription topic belongs according to the first mapping relationship; determining the domain identifier of the data domain to which the publishing topic belongs according to the second mapping relationship; verifying the domain identifiers corresponding to the subscription topic and the publishing topic to obtain the publishing topic and the subscription topic with consistent domain identifiers, and performing topic matching verification based on the publishing topic and the subscription topic with consistent domain identifiers to establish the communication connection.

[0124] In one embodiment, the communication verification module 4552 is also used to perform topic matching verification based on the publishing topic and subscription topic that are consistent with the domain identifier, and also includes: configuring an identifier for the subscription topic, and when the server receives a subscription topic with the identifier, it is assumed that the server matches the topic of the client.

[0125] In one embodiment, the communication verification module 4552 is also used to perform topic matching verification based on the publishing topic and subscription topic that are consistent with the domain identifier, including: obtaining a first hash code of the service provided by the service publisher in the publishing topic, and a second hash code of the service required by the service subscriber in the subscription topic; if the first hash code is consistent with the second hash code, the topic matching verification is passed.

[0126] In one embodiment, the subscription topics of each topic category include a request topic for requesting message transmission and a reply topic for replying message transmission, and obtaining the corresponding service data of the server based on the service call request, including: issuing a request to the server through the request topic, and the reply topic receiving reply information corresponding to the request issued by the server based on the request topic; or, receiving the request issued by the server through the request topic, and the reply topic returning the corresponding reply information, so that the request issuance and return receipt of the server are synchronized with the request receipt and return issuance of the client.

[0127] In one embodiment, the data transmission module 4553 is also used to establish the communication connection and further include: based on the service required by the client, calling a preset service quality policy to obtain network configuration parameters to perform communication data transmission based on the network configuration parameters.

[0128] In one embodiment, a plurality of preset data domains are provided, and then the method further includes: setting a transfer node connected to different data domains, and pulling services or topics in different data domains through the transfer node to complete cross-domain data transmission.

[0129] The above data distribution system can be implemented in the form of a computer program. Figure 8 The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0130] Each module in the above data distribution system can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of the terminal's memory in the form of hardware, or can be stored in the terminal's memory in the form of software, so that the processor can call and execute the operations corresponding to each module above. The processor can be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, etc.

[0131] like Figure 8 The figure shows a schematic diagram of the internal structure of a computer device in one embodiment. A computer device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: mapping the service that the client needs to call to a plurality of subscription topics of different topic categories, so that one subscription topic mounts a plurality of services that need to be called; performing topic matching verification between the subscription topic and the publishing topic of the server through the client, and establishing a communication connection between the client and the server after the verification is passed; after establishing the communication connection, obtaining the corresponding service data of the server based on the service call request, and completing data distribution.

[0132] In one embodiment, when the above-mentioned processor is executed, after mapping the services that the client needs to call to multiple topics, it also includes: mapping the services that the server needs to provide to publishing topics of multiple different topic categories, so that one publishing topic mounts multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscription topic.

[0133] In one embodiment, when the above-mentioned processor is executed, after mapping the service that the client needs to call to subscription topics of multiple different topic categories, it also includes: providing multiple preset data domains; establishing a first mapping relationship between the subscription topics and data domains of different topic categories so that the data domains to which the subscription topics of different topic categories belong are different; and, establishing a second mapping relationship between the publishing topic and the data domain.

[0134] In one embodiment, when the above-mentioned processor is executed, the subject matching verification implemented by the client and the server is performed, and a communication connection is established between the client and the server after the verification is passed, including: determining the domain identifier of the data domain to which the subscription subject belongs according to the first mapping relationship; determining the domain identifier of the data domain to which the publishing subject belongs according to the second mapping relationship; verifying the domain identifiers corresponding to the subscription subject and the publishing subject to obtain the publishing subject and the subscription subject with consistent domain identifiers, performing subject matching verification based on the publishing subject and the subscription subject with consistent domain identifiers, and establishing the communication connection.

[0135] In one embodiment, when the above-mentioned processor is executed, before the topic matching verification is performed based on the publishing topic and the subscription topic that are consistent with the domain identifier, it also includes: configuring an identifier for the subscription topic, and when the server receives the subscription topic with the identifier, it is assumed that the server matches the topic of the client.

[0136] In one embodiment, when the above-mentioned processor is executed, the topic matching verification implemented based on the publishing topic and subscription topic consistent with the domain identifier includes: obtaining a first hash code of the service provided by the service publisher in the publishing topic, and a second hash code of the service required by the service subscriber in the subscription topic; if the first hash code is consistent with the second hash code, the topic matching verification is passed.

[0137] In one embodiment, when the above-mentioned processor is executed, the subscription topic of each topic category implemented includes a request topic for requesting message transmission and a reply topic for replying message transmission, and the corresponding service data of the server is obtained based on the service call request, including: issuing a request to the server through the request topic, and the reply topic receiving the reply information of the server corresponding to the request issued based on the request topic; or, receiving the request issued by the server through the request topic, and the reply topic returning the corresponding reply information, so that the request issuance and return receipt of the server are synchronized with the request receipt and return issuance of the client.

[0138] In one embodiment, when the processor is executed, after establishing the communication connection, the process further includes: based on the service required by the client, calling a preset quality of service policy to obtain network configuration parameters, so as to perform communication data transmission based on the network configuration parameters.

[0139] In one embodiment, when the above-mentioned processor is executed, it provides a plurality of preset data domains, and then further includes: setting a transit node connecting different data domains, and pulling services or topics in different data domains through the transit node to complete cross-domain data transmission.

[0140] In one embodiment, the above-mentioned computer device can be used as a server, including but not limited to an independent physical server, or a server cluster composed of multiple physical servers. The computer device can also be used as a terminal, including but not limited to a mobile phone, a tablet computer, a personal digital assistant or a smart device. Figure 8 As shown, the computer device includes a processor, a non-volatile storage medium, an internal memory, a display screen, and a network interface connected via a system bus.

[0141] Among them, the processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The non-volatile storage medium of the computer device stores an operating system and a computer program. The computer program can be executed by the processor to implement a data distribution method provided in each of the above embodiments. The internal memory in the computer device provides a cache operating environment for the operating system and computer program in the non-volatile storage medium. The display interface can display data through a display screen. The display screen can be a touch screen, such as a capacitive screen or an electronic screen, and can generate corresponding instructions by receiving a click operation acting on a control displayed on the touch screen.

[0142] Those skilled in the art will understand that Figure 8 The structure of the computer device shown in the figure is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0143] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: mapping the service that a client needs to call to subscription topics of multiple different topic categories, so that one subscription topic mounts multiple services that need to be called; the client performs topic matching verification on the subscription topic and the publishing topic of the server, and after the verification is passed, establishes a communication connection between the client and the server; after the communication connection is established, the corresponding service data of the server is obtained based on the service call request to complete data distribution.

[0144] In one embodiment, when the computer program is executed by a processor, after mapping the services that the client needs to call to multiple topics, it also includes: mapping the services that the server needs to provide to publishing topics of multiple different topic categories, so that one publishing topic mounts multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscription topic.

[0145] In one embodiment, when the computer program is executed by a processor, after mapping the service that the client needs to call to subscription topics of multiple different topic categories, it also includes: providing multiple preset data domains; establishing a first mapping relationship between the subscription topics of different topic categories and the data domains so that the data domains to which the subscription topics of different topic categories belong are different; and establishing a second mapping relationship between the publishing topic and the data domain.

[0146] In one embodiment, when the computer program is executed by a processor, the subject matching verification implemented by the client and the server is performed, and a communication connection is established between the client and the server after the verification is passed, including: determining the domain identifier of the data domain to which the subscription subject belongs according to the first mapping relationship; determining the domain identifier of the data domain to which the publishing subject belongs according to the second mapping relationship; verifying the domain identifiers corresponding to the subscription subject and the publishing subject to obtain the publishing subject and the subscription subject with consistent domain identifiers, performing subject matching verification based on the publishing subject and the subscription subject with consistent domain identifiers, and establishing the communication connection.

[0147] In one embodiment, when the computer program is executed by a processor, before the topic matching verification is performed based on the publishing topic and the subscription topic that are consistent with the domain identifier, it also includes: configuring an identifier for the subscription topic, and when the server receives the subscription topic with the identifier, it is assumed that the server matches the topic of the client.

[0148] In one embodiment, when the computer program is executed by a processor, the topic matching verification implemented based on the publishing topic and subscription topic that are consistent with the domain identifier includes: obtaining a first hash code of the service provided by the service publisher in the publishing topic, and a second hash code of the service required by the service subscriber in the subscription topic; if the first hash code is consistent with the second hash code, the topic matching verification is passed.

[0149] In one embodiment, when the instruction is executed by the processor, the subscription topic of each topic category implemented includes a request topic for requesting message transmission and a reply topic for replying message transmission, and the corresponding service data of the server is obtained based on the service call request, including: issuing a request to the server through the request topic, and the reply topic receiving reply information corresponding to the request issued by the server based on the request topic; or, receiving the request issued by the server through the request topic, and the reply topic returning the corresponding reply information, so that the request issuance and return receipt of the server are synchronized with the request receipt and return issuance of the client.

[0150] In one embodiment, when the instruction is executed by the processor, after establishing the communication connection, it also includes: based on the service required by the client, calling a preset service quality policy to obtain network configuration parameters to perform communication data transmission based on the network configuration parameters.

[0151] In one embodiment, when the instruction is executed by the processor, it provides multiple preset data domains, and then further includes: setting a transit node connecting different data domains, pulling services or topics in different data domains through the transit node to complete cross-domain data transmission.

[0152] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM), etc.

[0153] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A data distribution method, characterized in that: include: Map the services that the client needs to call to multiple subscription topics of different topic categories, so that one subscription topic can mount multiple services that need to be called; After mapping the services that the client needs to call to multiple topics, the method further includes: mapping the services that the server needs to provide to multiple publishing topics of different topic categories, so that one publishing topic mounts multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscription topic; providing multiple preset data domains; establishing a first mapping relationship between the subscription topics of different topic categories and data domains, so that the data domains to which the subscription topics of different topic categories belong are different; and establishing a second mapping relationship between the publishing topic and the data domain; The client performs a topic matching verification on the subscription topic and the publishing topic of the server, and establishes a communication connection between the client and the server after the verification is passed, including: determining the domain identifier of the data domain to which the subscription topic belongs according to the first mapping relationship; determining the domain identifier of the data domain to which the publishing topic belongs according to the second mapping relationship; verifying the domain identifiers corresponding to the subscription topic and the publishing topic to obtain a publishing topic and a subscription topic with consistent domain identifiers, performing a topic matching verification based on the publishing topic and the subscription topic with consistent domain identifiers, and establishing the communication connection; After the communication connection is established, the corresponding service data of the server is obtained based on the service call request to complete the data distribution.

2. The data distribution method according to claim 1, characterized in that: Before performing topic matching verification based on the publishing topic and the subscription topic that are consistent with the domain identifier, it also includes: An identifier is configured for the subscription topic. When the server receives a subscription topic with the identifier, it is assumed that the server matches the topic of the client.

3. The data distribution method according to claim 1, characterized in that: The topic matching verification is performed based on the publishing topic and the subscription topic that are consistent with the domain identifier, including: Obtaining a first hash code of a service provided by a service publisher in the publishing topic and a second hash code of a service required by a service subscriber in the subscription topic; If the first hash code is consistent with the second hash code, the subject matching verification is successful.

4. The data distribution method according to claim 1, characterized in that: The subscription topic of each topic category includes a request topic for requesting message transmission and a reply topic for replying message transmission, and obtaining corresponding service data of the server based on the service call request includes: A request is sent to the server through the request subject, and the reply subject receives reply information corresponding to the request sent by the server based on the request subject; or The request sent by the server is received through the request subject, and the reply subject returns the corresponding reply information, so that the request sent and received by the server is synchronized with the request received and sent and received by the client.

5. The data distribution method according to claim 1, characterized in that: After the communication connection is established, the method further includes: Based on the service required by the client, a preset service quality policy is called to obtain network configuration parameters so as to perform communication data transmission based on the network configuration parameters.

6. The data distribution method according to claim 1, characterized in that: Provides multiple preset data fields, including: A transfer node connecting different data domains is set up, and services or topics in different data domains are pulled through the transfer node to complete cross-domain data transmission.

7. A data distribution system, characterized in that: include: The topic mapping module is used to map the services that the client needs to call to multiple subscription topics of different topic categories, so that one subscription topic can mount multiple services that need to be called; After mapping the services that the client needs to call to multiple topics, the method further includes: mapping the services that the server needs to provide to multiple publishing topics of different topic categories, so that one publishing topic mounts multiple services that need to be provided, and the topic category of the publishing topic corresponds to the topic category of the subscription topic; providing multiple preset data domains; establishing a first mapping relationship between the subscription topics of different topic categories and data domains, so that the data domains to which the subscription topics of different topic categories belong are different; and establishing a second mapping relationship between the publishing topic and the data domain; A communication verification module, used to perform a topic matching verification between the subscription topic and the publishing topic of the server through the client, and establish a communication connection between the client and the server after the verification is passed; including: determining the domain identifier of the data domain to which the subscription topic belongs according to the first mapping relationship; determining the domain identifier of the data domain to which the publishing topic belongs according to the second mapping relationship; verifying the domain identifiers corresponding to the subscription topic and the publishing topic, obtaining the publishing topic and the subscription topic with the same domain identifiers, performing a topic matching verification based on the publishing topic and the subscription topic with the same domain identifiers, and establishing the communication connection; The data transmission module is used to obtain the corresponding service data of the server based on the service call request after establishing the communication connection, and complete the data distribution.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data distribution method according to any one of claims 1 to 6 when executing the computer program.

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