A vehicle-side service communication configuration method, system, device and storage medium
By building an SOA service model and configuring Domain ID and Topic parameters in the vehicle-side service communication configuration, the problem of insufficient dynamic management of DDS communication function in the existing technology is solved, realizing flexible inter-service communication and efficient software development.
Patent Information
- Application Number
- CN202211535213.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2042-11-30
AI Technical Summary
In existing technologies, during the configuration of vehicle-side service communication based on SOA and DDS, the communication functions of DDS cannot be better utilized through dynamic management, resulting in poor communication performance.
By constructing an SOA service model, configuring domain ID values and topic unit parameters, and generating communication code, dynamic management and flexible communication of service interfaces can be achieved.
It improves the efficiency of vehicle-side software development, enables flexible communication between services and a unified message structure, and completes data transmission and request-response communication under the same topic.
Smart Images

Figure CN115834375B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of automotive software technology, and specifically to a vehicle-side service communication configuration method, system, device and storage medium. Background Art
[0002] "Software-defined cars" is the direction of future cars. With the in-depth advancement of car intelligence and networking, cars are developing from ordinary means of transportation to smart cars, realizing car-cloud integration. Based on the SOA (Service-Oriented Architecture) software architecture design concept, the car software architecture is layered and modularized, so that application layer functions can be reused on different models, hardware platforms, and operating systems, and application functions can be quickly iterated and upgraded through standardized interfaces.
[0003] Data Distribution Service (DDS) is a software design standard and specification issued by the Object Management Group to implement the publish / subscribe communication model and meet real-time requirements. This specification standardizes the interfaces and behaviors of data publishing, transmission and reception in distributed real-time systems.
[0004] There are some existing data communication solutions based on the DDS standard. For example, on the basis of DDS, by defining a unified message structure and filtering it by the message receiver, point-to-point communication transmission under the same topic is realized, and on this basis, a "request-response" communication connection is completed. However, this solution does not propose how to combine SOA with the DDS distributed communication protocol to make DDS a service component, resulting in the inability to better use the communication function of DDS through dynamic management of services.
[0005] There are also some data communication solutions based on the service models of SOA and DDS. For example, data communication is performed using the service models of SOA and DDS, which include service attributes and service interface service model elements. Service attributes include service name, service version, service description, dependency conditions and task mode, etc. The service interface includes a publish / subscribe interface and a functional function interface. And based on the service model, the steps of the distributed data communication method are proposed, mainly including: service registration, service search, topic publishing, topic subscription and topic matching. Also in this type of solution, there is no explanation on how to dynamically associate the Domain ID and Topic unit parameters of DDS with the service interface deployment of SOA, which in turn affects the operation effect of the service model based on SOA and DDS in the data communication solution. Summary of the invention
[0006] In view of the shortcomings of the prior art mentioned above, the present invention provides a vehicle-side service communication configuration method, system, device and storage medium to solve the problem in the prior art that, in the vehicle-side service communication configuration process based on SOA and DDS, the communication function of DDS cannot be better utilized through the dynamic management of the vehicle-side service.
[0007] An embodiment of the present invention provides a vehicle-side service communication configuration method, the method comprising:
[0008] S100, obtaining vehicle demand information to configure the usage scenario and function of the vehicle-side service, and building a service-oriented architecture (SOA) service model of the vehicle-side service based on the vehicle-side service, wherein the SOA service model includes service basic information and service capability information;
[0009] S200, the SOA service model configures a domain identity (Domain ID) value for the service interface of the service capability information based on the data distribution service (DDS) communication protocol, and configures a topic (Topic) unit parameter of the vehicle-side service according to the type of the service interface;
[0010] S300, the SOA service model constructs a plurality of vehicle-side applications for the vehicle-side service content sets, submits the Domain ID value and Topic unit parameters configured by the service interface to each functional domain of the service basic information, and the SOA service model sets the Domain ID value and the Topic unit parameters as communication parameters between the functional domains; and
[0011] S400. The SOA service model detects the communication connectivity between the functional domains of the service basic information based on the communication parameters, and generates a code automatic generation module through a vehicle-side code generator. The code automatic generation module generates a communication code for each functional domain corresponding to the vehicle-side application according to the communication parameters.
[0012] In one embodiment of the present invention, the step S100 includes:
[0013] S110, defining the usage scenario and function of the vehicle-side service according to the vehicle demand information;
[0014] S120, defining the data type structure of the communication parameters required by the vehicle-side service in the usage scenario and function;
[0015] S130, configuring the basic service information in the communication parameters;
[0016] S140, defining service version information of the service capability information in the communication parameters;
[0017] S150, defining the service interface information in the communication parameters of the service capability information;
[0018] S160: Confirm that the dependent services required by the service capability information in the usage scenario and function need to be referenced.
[0019] In one embodiment of the present invention, the step S150 includes:
[0020] If the service interface is a methods interface type, configure the interface code, interface description, one or more input parameters and one output parameter;
[0021] If the service interface is an event interface type, configure the interface code, interface description, one input parameter and one output parameter;
[0022] If the service interface is a field (Fields) interface type, configure the interface code, interface description and parameter attributes, and the parameter attributes include Get, Set, and Notify.
[0023] In one embodiment of the present invention, the step S200 includes:
[0024] Setting a unique Domain ID value for each service interface in the SOA service model;
[0025] If the service interface is of the Methods interface type, a unified reply topic (Reply Topic) and request topic (Request Topic) are configured for each Methods interface;
[0026] If the service interface is of Events interface type, configure a separate Topic for each Event interface;
[0027] If the service interface is a Field interface type, when the parameter attribute is Set / Get, a unified Reply Topic and Request Topic are configured for each Field interface; when the parameter attribute is Notify, a separate Topic is configured for each Notify.
[0028] In one embodiment of the present invention, the step S300 includes:
[0029] Forming a plurality of vehicle-side service contents according to different usage scenarios and functional differences in vehicle use needs, and aggregating the plurality of vehicle-side service contents to form a vehicle-side application based on the SOA service model;
[0030] The SOA service model submits the configured Domain ID value and the Topic unit parameter to the service interface between each functional domain of the plurality of vehicle-side services and the vehicle-side application;
[0031] The SOA service model sets the Domain ID value and the Topic unit parameter of the service interface as communication parameters between the vehicle-side application and the vehicle-side service.
[0032] In one embodiment of the present invention, the step S400 includes:
[0033] S410, the vehicle-side application calls the communication parameters configured by the SOA service model based on the DDS communication deployment to the service interface between the functional domains;
[0034] S420, the automatic code generation module defines the communication code of the vehicle-side application generated according to the communication parameters as a template file to form a communication code file template library;
[0035] S430, the automatic code generation module reads the DDS communication protocol configuration file generated by the vehicle-side SOA service model and the communication code file template library, and renders and generates the communication code file corresponding to the vehicle-side service configuration;
[0036] S440. The SOA service model downloads the communication code file from the communication code file template library to the vehicle-side application for storage.
[0037] In one embodiment of the present invention, in the step S100, the service basic information includes functional domain, service code, service name, service type, communication scope, belonging component, service label and service description; the service capability information includes service version number, service interface and dependent services.
[0038] The embodiment of the present invention further provides a vehicle-side service communication configuration system, characterized in that it includes a code automatic generation module, and the code automatic generation module includes:
[0039] A service management unit, wherein the service management unit obtains information of vehicle-side services and constructs a service-oriented architecture (SOA) service model based on the information of the vehicle-side services;
[0040] A communication management unit, wherein the communication management unit allocates a domain identity (Domain ID) value and a topic (Topic) unit parameter to the vehicle-side service in the SOA service model based on a data distribution service (DDS) communication protocol;
[0041] An interface management unit, wherein the interface management unit submits the Domain ID value and Topic unit parameters set in the communication management unit to the service interface of the vehicle-side service, and the SOA service model sets the Domain ID value and Topic unit parameters as communication parameters of the service interface;
[0042] A code management unit converts the communication parameters in the interface management unit into communication codes, and downloads and saves the communication codes to the vehicle-side service in the SOA service model.
[0043] In one embodiment of the present invention, the service management unit includes:
[0044] A data structure management component, wherein the data structure management component obtains the data type structure of the vehicle-side service and uniformly defines the data type structure of the communication parameters in the service interface of each functional domain of the vehicle-side for building, managing and maintaining; wherein the data structure management component also defines and designs fixed-length arrays, dynamic arrays, structures and enumerations;
[0045] The SOA service model management component obtains the data type structure of different functional domains to define and design the SOA service models of different functional domains.
[0046] In one embodiment of the present invention, the communication management unit includes a DDS communication management component, and the DDS communication management component performs DDS communication protocol configuration on the instance of the communication parameter in the service interface.
[0047] In one embodiment of the present invention, the interface management unit includes:
[0048] A vehicle-side application management component, wherein the vehicle-side application management component assembles the SOA service models of multiple vehicle-side services into the same vehicle-side application program,
[0049] Develop a deployment management component that selects the vehicle-side application to be deployed on the vehicle-side controller based on the vehicle-side service content of different vehicle models.
[0050] In one embodiment of the present invention, the code management unit includes:
[0051] A code management pool component, which manages the communication code based on the DDS communication protocol, wherein the communication code includes the framework code required to configure the communication parameters and the core code resources for specific operation business logic;
[0052] The automatic code generator component generates and downloads the communication code configured by the DDS communication protocol to the vehicle-side application based on the code management pool component after the development and deployment management component completes the configuration of the vehicle-side service content and the vehicle-side application.
[0053] In one embodiment of the present invention, the automatic code generator component also inputs an Automotive Open System Architecture Extensible Markup Language ARXML (Automotive Open System Architecture Extensible Markup Language) configuration file generated by the automatic code generation module into the automatic code generator component, and generates the communication code based on parsing rules, business logic settings and communication code file template library.
[0054] The present invention further provides an electronic device, comprising:
[0055] A memory and a processor, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the method as described above.
[0056] The present invention also provides a computer-readable storage medium, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the method as described above.
[0057] The beneficial effects of the present invention are as follows: through the SOA service modeling of vehicle-side functions, DDS becomes a service component, and the service interface communication is configured, making the communication between services more flexible. On the basis of the DDS standard, a unified message structure is defined and the data transmission under the same topic is achieved through the publish / subscribe communication model, and the "request-response" communication mode is completed on this basis. At the same time, the communication management CM (Communication Management) code deployed by the service interface is automatically generated through the code generator, which improves the efficiency of vehicle-side software development.
[0058] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention, and together with the specification, are used to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0060] Figure 1is a flow chart of a vehicle-side communication service configuration method of the present invention;
[0061] Figure 2 It is a flow chart of the method for constructing a vehicle-side SOA service model of the present invention;
[0062] Figure 3 is a flow chart of a method for generating a vehicle-side communication code according to the present invention;
[0063] Figure 4 It is a schematic diagram of the SOA service model of the present invention;
[0064] Figure 5 It is a schematic diagram of DDS communication deployment of SOA service interface of the present invention;
[0065] Figure 6 It is a schematic diagram of the communication logic of the vehicle-side service communication configuration system of the present invention;
[0066] Figure 7 It is an architecture diagram of the vehicle-side service communication configuration system of the present invention;
[0067] Figure 8 It is a schematic diagram of the working principle of the vehicle-side application code automatic generation system based on SOA&DDS communication of the present invention. DETAILED DESCRIPTION
[0068] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention 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 invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0069] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention 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 arbitrarily, and the component layout may also be more complicated.
[0070] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0071] Over-the-Air Technology (OTA) is currently a good way to solve the problem of online vehicle upgrades and continuously improve the user experience. However, OTA is only a means. If the implementation of a new function does not match or even conflicts with the original system architecture, driving mode or even communication mode of the vehicle, OTA upgrade of the vehicle cannot be achieved. Therefore, the car must be open, connected, even autonomous and self-evolving. Autonomous driving and edge computing are both visible application scenarios. The existing electronic and electrical architecture and corresponding solutions are difficult to correspond to and solve the challenges currently encountered by automobiles. A new methodology is needed to break the deadlock, so the in-vehicle application of service-oriented architecture (SOA) was proposed as a solution. SOA can be understood as an architectural design method that abstracts the capabilities of a system into callable services with standard interfaces, so that the business needs of the system can be met by calling services or a combination of multiple services.
[0072] SOA is an existing technology in the IT industry, but the construction of service-oriented models must be designed according to the technical path of specific fields and enterprises. The SOA service-oriented model of the present invention is the content that needs to be explained in the present invention. Automatic code generation is also an existing technology in the IT industry, but what kind of structure type of code needs to be generated, what content the template library of the code contains, and how the specific parameters in the code are obtained through SOA and DDS vehicle-side service communication configuration are all technical contents that need to be explained in the present invention.
[0073] It should be noted that in the following embodiments, regarding the vehicle-side service communication configuration method, system, electronic device and storage medium, the vehicle-side services are all executed based on SOA and DDS.
[0074] See also Figure 1 , Figure 1 The present invention provides a vehicle-side service communication configuration method, the method comprising:
[0075] S100, obtaining vehicle demand information to configure the usage scenarios and functions of the vehicle-side service, and building a service-oriented architecture (SOA) service model of the vehicle-side service based on the information, wherein the SOA service model includes service basic information 121 and service capability information 122;
[0076] S200, the SOA service model configures a domain ID value for the service interface 123 of the service capability information 122 based on the data distribution service (DDS) communication protocol, and configures a topic unit parameter of the vehicle-side service according to the type of the service interface 123;
[0077] S300, the SOA service model builds a vehicle-side application program of multiple vehicle-side service content sets, submits the Domain ID value and Topic unit parameter configured by the service interface 123 to each functional domain of the service basic information 121, and the SOA service model sets the Domain ID value and Topic unit parameter as communication parameters between functional domains; and
[0078] S400, the SOA service model detects the communication connectivity between the functional domains of the service basic information 121 based on the communication parameters, and generates a code automatic generation module through the vehicle-side code generator. The code automatic generation module generates the communication code of each functional domain corresponding to the vehicle-side application according to the communication parameters.
[0079] The user's usage demand information for the vehicle side is classified according to the service basic information 121 and service capability information 122 of the SOA service model, and the usage scenarios and functions of the vehicle side service are configured accordingly. The service interface 123 between the vehicle side service and the vehicle side application is established through the SOA service model, and the corresponding Domain ID value and Topic unit parameter are used as the communication parameters between them according to the information of the service interface 123. At the same time, the communication code is generated by the code generator based on its communication parameters to realize the communication service of unified message structure between different functional domains of the vehicle side.
[0080] In one embodiment, in step S100, the SOA service model includes service basic information 121 and service capability information 122, wherein the service basic information 121 includes functional domain, service code, service name, service type, communication scope, belonging component, service label and service description; wherein the service capability information 122 includes service version number, service interface 123 and dependent service 124.
[0081] See also Figure 4 ,The SOA service model includes two parts: service basic information 121 and service capabilities.
[0082] The basic service information 121 includes the function domain, service code, service name, service type, communication scope, belonging component, service label and service description. The function domain indicates that the service belongs to a specific business domain for management and definition; the service code indicates the unique identifier of the service in the platform system; the communication scope indicates the scope of service communication, which is divided into two modes: inter-domain communication and intra-domain communication; the service type is divided into five types: atomic service, enhanced service, scenario service, etc.; the service label indicates the personalized attribute of the service, and the service description indicates the auxiliary information description of the service.
[0083] Service capabilities include service version number, service interface 123, and dependent service 124. The service version number consists of major version + minor version + auxiliary version; service interface 123 defines the functions of the current service, which includes three types: Events, Methods, and Fields. The definition of service interface 123 is completely abstract and has nothing to do with the communication protocol. Any two services can use this interface for communication. The design of service interface 123 determines how service consumers use the service; dependent service 124 is other services that the service needs to rely on for correct operation.
[0084] In one embodiment, please also refer to Figure 1 and Figure 2 , step S100 includes:
[0085] S110, defining usage scenarios and functions of vehicle-side services according to vehicle demand information;
[0086] S120, defining the data type structure of the communication parameters required by the vehicle-side service in the usage scenarios and functions;
[0087] S130, configuring the service basic information 121 in the communication parameters;
[0088] S140, defining service version information of the service capability information 122 in the communication parameters;
[0089] S150, defining the service interface 123 information in the communication parameters of the service capability information 122;
[0090] S160 , confirming that the dependent services 124 required in the usage scenarios and functions need to be referenced by the service capability information 122 .
[0091] In one embodiment, see Figure 5 , step S150 further includes:
[0092] If the service interface 123 is a method interface type, configure the interface code, interface description, one or more input parameters and one output parameter;
[0093] If the service interface 123 is an event (Events) interface type, configure the interface code, interface description, an input parameter and an output parameter;
[0094] If the service interface 123 is a field (Fields) interface type, configure the interface code, interface description and parameter attributes, and the parameter attributes include Get, Set, and Notify.
[0095] In one embodiment, see Figure 5, step S200 further includes:
[0096] Set a unique Domain ID value for each service interface 123 in the SOA service model;
[0097] If the service interface 123 is a Methods interface type, a unified reply topic (Reply Topic) and request topic (Request Topic) are configured for each Methods interface;
[0098] If the service interface 123 is of Events interface type, configure a separate Topic for each Event interface;
[0099] If the service interface 123 is a Field interface type, when the parameter attribute is Set / Get, a unified Reply Topic and Request Topic are configured for each Field interface; when the parameter attribute is Notify, a separate Topic is configured for each Notify.
[0100] In the DDS communication protocol, Domain is a logical grouping of a set of applications. Entities in different Domains are independent of each other and cannot access each other. A Domain ID needs to be set to identify a unique Domain ID. TOPIC is the smallest unit of DDS data publishing and has three elements: data type, Topic name, and QoS strategy. If SOA service interface 123 needs to meet the communication capabilities and needs to be bound to the DDS communication protocol, the service interface 123 must be configured with corresponding parameters. When communicating between interfaces, a unified message structure composed of Domain ID and TOPIC will be sent out.
[0101] In one embodiment, step S300 further includes:
[0102] According to different usage scenarios and functional differences in vehicle demand, multiple vehicle-side service contents are formed, and multiple vehicle-side service contents are aggregated to form a vehicle-side application based on the SOA service model;
[0103] The SOA service model submits the configured Domain ID value and Topic unit parameters to the service interface 123 between each functional domain of multiple vehicle-side services and the vehicle-side application;
[0104] The SOA service model sets the Domain ID value and Topic unit parameters of the service interface 123 as communication parameters between the vehicle-side application and the vehicle-side service.
[0105] In one embodiment, see Figure 3, step S400 further includes:
[0106] S410, the vehicle-side application calls the communication parameters configured by the SOA service model based on the DDS communication deployment to the service interface between the functional domains;
[0107] S420, the code automatic generation module defines the communication code of the vehicle-side application generated according to the communication parameters as a template file to form a communication code file template library;
[0108] S430, the code automatic generation module reads the DDS communication protocol configuration file and the communication code file template library generated by the vehicle-side SOA service model, and renders and generates the corresponding communication code file after the vehicle-side service configuration;
[0109] S440. The SOA service model downloads the communication code file from the communication code file template library to the vehicle-side application for storage.
[0110] In order to effectively support SOA service communication under the DDS protocol, it is necessary to configure the service interface 123 (Events, Methods, and Fields) for communication, which involves the configuration of Domain Id and Topic parameters. Domain is a logical grouping of a set of DDS applications. Entities in different Domains are independent of each other and cannot access each other, so they are identified as a unique Domain through Domain Id; Topic is the smallest unit of DDS data publishing. Topic has three elements: data type, Topic name, and Qos strategy, and the same Topic can exist in multiple service instances.
[0111] A specific embodiment of the present invention is described below in conjunction with a specific application scenario of a vehicle-side service communication configuration method based on SOA and DDS, including the following steps:
[0112] 1) In the process of establishing the SOA service model, developers define service usage scenarios and functions according to vehicle use needs. The usage scenarios and functions defined by vehicle use needs may include: for example, defining the off-duty mode, the vehicle-side application starts the car at a scheduled time, adjusts the air conditioning system of the vehicle-side service content, and feeds back the vehicle-side temperature and humidity information values to the user's terminal device application such as the application interface of a smartphone. At the same time, the surround view camera of the vehicle-side service can be called to observe the road conditions around the parking area, such as roadside parking spaces during the rush hour after get off work, and observe the degree of traffic congestion through the vehicle-side camera to help users decide whether to participate in the traffic conditions during the evening rush hour.
[0113] 2) Define the data type structure of communication. Communication between vehicle-side services includes the transmission of command information between different functional domains. For example, the central control operation of the vehicle side needs to communicate from the cockpit domain to the vehicle control domain. During the development stage, different development projects formed due to differences in vehicle-side service content have different communication protocol rules. Therefore, the service interface 123 information of inter-domain communication is defined according to its data type structure to implement a unified message structure for data communication between different functional domains on the vehicle side.
[0114] 3) Configure service basic information 121. According to the content of the vehicle-side service information, it is classified as service basic information 121 according to the SOA service model, and the functional domain, service code, service name, service type, communication scope, belonging component, service label and service description pointed to by the vehicle-side service information are configured as the content required for developing the service defined in the SOA service model.
[0115] 4) Define service version number information. Determine the version number of the communication between the vehicle-side application and the vehicle-side service firmware, and determine the specific content of the vehicle-side service information based on the version number.
[0116] 5) Define the service interface 123. Determine the service interface 123 for communication between the vehicle-side application and the vehicle-side service, and maintain the communication connectivity between the functional domains of the vehicle-side under the unified message structure.
[0117] 5.1) For the Methods interface type, configure the interface code, interface description, one or more input parameters, and one output parameter. Parameter: defined data type.
[0118] 5.2) For the Events interface type, configure the interface code, interface description, and an output parameter.
[0119] 5.3) For the Fields interface type, configure the interface code, interface description, and parameter properties (Get\Set\Notify).
[0120] 6) Confirm the dependent service 124 that needs to be referenced. The dependent service 124 and the firmware that the vehicle-side application relies on to execute the vehicle-side service command (issuing a command action to the execution object), for example, the vehicle-side application issues a window lift command through voice control, which needs to rely on which door's window is opened, and determine whether it is a lift or lower action, so as to send the action signal command information to the window lifter of the corresponding door, so as to realize the execution of the vehicle-side service information content.
[0121] 7) Based on the communication management of the service, configure the DomainId of a single service and the Topic parameters of the interface under the service; based on the communication configuration of the service interface 123, you can configure the DomainId of the DDS communication protocol that a single service interface 123 must have and the Topic parameters of the interface under the service. Even when the business scenario is adjusted, you can re-visualize the DomainId parameters and Topic parameters to achieve dynamic management of the SOA service interface 123 and the DDS communication protocol.
[0122] 7.1) A unique DomainId value needs to be set for the service model.
[0123] 7.2) For the Methods interface type, you need to configure a unified ReplyTopic and RequestTopic.
[0124] 7.3) For the Events interface type, you need to configure a separate Topic for each Event interface.
[0125] 7.4) For the Field interface type, when the attribute value is Set / Get, configure a unified ReplyTopic and RequestTopic; when the attribute value is Notify, configure a separate Topic for each Notify.
[0126] 8) Build a service-based vehicle-side application. Configure a vehicle-side application platform that executes vehicle-side service information content based on the SOA service model, and build a vehicle-side application of the vehicle-side service information content on the vehicle-side application platform, and build an SOA service model and communication parameter configuration with the aforementioned configured service basic information 121, and execute the instruction information of the vehicle-side application in the vehicle-side service.
[0127] 9) Deploy vehicle-side applications based on vehicle model projects. According to the differences between different vehicle models, localize and adapt the contents of vehicle-side applications and vehicle-side service information to avoid differences in vehicle-side service information and vehicle-side firmware execution actions due to differences in vehicle models.
[0128] 10) Automatically detect and generate code based on deployment. The vehicle-side application that communicates with the vehicle-side service automatically generates the communication management code and application code deployed by the service interface 123 through the code generator in the SOA service model according to the adaptation solution in the vehicle model project.
[0129] In the present invention, the vehicle-side SOA service model is designed and an automatic code generator based on service deployment is used to model the vehicle-side functional SOA service, so that DDS becomes a service component, and the communication function of DDS is used more flexibly. On the basis of the DDS standard, a unified message structure is defined and a publish / subscribe communication model is used to achieve data transmission under the same topic, and on this basis, a "request-response" communication mode is completed. At the same time, the CM (Communication Management) code deployed by the service interface 123 is automatically generated by the code generator, which improves the efficiency of vehicle-side software development.
[0130] A specific embodiment of the present invention is described below in conjunction with a specific scenario of a vehicle-side service communication configuration method based on a SOA service model. For example, vehicle-side services can be divided into the following three categories:
[0131] 1. Scene perception services:
[0132] This type of service is mainly used for the perception of vehicle usage scenarios, that is, the perception of time, space and events.
[0133] Time-aware services: For example, vehicles obtain time information through the 4G network.
[0134] Spatial awareness services: For example, vehicles obtain location information through GPS antennas.
[0135] Event perception services: for example, vehicle power-on perception, vehicle gear shift perception, ambient temperature perception, driver expression perception, and driver line of sight perception.
[0136] Scene perception services are mainly implemented based on vehicle hardware configuration.
[0137] From the perspective of the relationship between services and functions, scene perception services are basic services and can be equated with traditional perception functions.
[0138] 2. Control and decision-making services:
[0139] This type of service is the core service that makes smart cars (car side). It analyzes and calculates the various inputs provided by scene perception services and user operations, and ultimately determines how the vehicle should meet the customer's car needs.
[0140] Since the essential attributes of smart cars are proactive and predictive, for control decision-making services, to what extent can they reduce reliance on user operation input, to what extent can they fully utilize scene perception service input, and to what extent can they use powerful computing power to comprehensively analyze and calculate various inputs to complete the final control decision process? This is the basis for judging the degree of intelligence of control decision-making services.
[0141] For example:
[0142] The color of the atmosphere light can be adjusted according to the user's mood.
[0143] The restaurants where users dine can be autonomously recommended in the car-side application based on the user's taste and the latest restaurant discounts.
[0144] Temperature, humidity, and air quality can be adjusted autonomously based on the user's physical condition and current weather conditions.
[0145] Control decision services rely on algorithms and control strategies, and these algorithms and control strategies can also evolve continuously. They are mainly implemented based on software. From the perspective of the relationship between services and functions, control decision services are advanced services. They can be understood as advanced functions with autonomy. They can flexibly call and combine basic services to complete different tasks and meet the needs of different scenarios.
[0146] 3. Action execution services:
[0147] This type of service is mainly used to control the vehicle to perform various actions, including all sounds, texts, images, motor movements, etc. that can be perceived by the user.
[0148] Action execution services are mainly implemented based on the vehicle hardware configuration. From the perspective of the relationship between services and functions, action execution services are also basic services and can be equated with traditional action execution functions.
[0149] The present invention also provides a vehicle-side service communication configuration system, see Figure 6 , 7 , including a code automatic generation module, the code automatic generation module includes:
[0150] The service management unit 1 obtains the information of the vehicle-side service and builds a service-oriented architecture (SOA) service model based on the information of the vehicle-side service;
[0151] The communication management unit 2 allocates a domain ID value and a topic unit parameter to the vehicle-side service in the SOA service model based on the data distribution service (DDS) communication protocol;
[0152] The interface management unit 3 submits the Domain ID value and Topic unit parameters set in the communication management unit 2 to the service interface 123 of the vehicle-side service, and the SOA service model sets the Domain ID value and Topic unit parameters as communication parameters of the service interface 123; and
[0153] The code management unit 4 converts the communication parameters in the interface management unit 3 into communication codes, and downloads and saves the communication codes to the vehicle-side service in the SOA service model.
[0154] In one embodiment of the present invention, please refer to Figure 7 , the service management unit 1 includes:
[0155] The data structure management component 11 obtains the data type structure of the vehicle-side service, and uniformly defines the data type structure of the communication parameters in the service interface 123 of each functional domain of the vehicle-side; wherein the data structure management component 11 also defines and designs fixed-length arrays, dynamic arrays, structures, and enumerations;
[0156] The SOA service model management component 12 obtains data type structures of different functional domains to define and design SOA service models of different functional domains.
[0157] In this embodiment, the data structure management component 11 is used to uniformly define, build, manage and maintain the data structure used for communication between services in the service interface 123, ensuring that the data structure can be correctly parsed and identified. The SOA service model management component 12 is used to define and design vehicle-side functional service models for different functional domains, and supports the definition of basic service information, service version number, service interface 123 design, and dependent service 124 association. Among them, the service type can be defined according to the business scenario and function control requirements: atomic service, enhanced service, scenario service, etc. The design of the service interface 123 determines how the service consumer uses the service, and supports three types of service interfaces 123: Methods, Events, and Fields. The definition of the service interface 123 is completely abstract and has nothing to do with the communication protocol. Any two services can use this interface to communicate.
[0158] In one embodiment of the present invention, please refer to Figure 7 The communication management unit 2 includes a DDS communication management component 21 , and the DDS communication management component 21 performs DDS communication protocol configuration on the instance of the communication parameters in the service interface 123 .
[0159] In this embodiment, the DDS communication management component 21 is used to configure the service interface 123 instance at the communication protocol level. The system supports DDS protocol configuration, and the service model needs to be configured with a unique Domain Id value. For the Methods interface type, a unified Reply Topic and Request Topic need to be configured; for the Events interface type, a separate Topic needs to be configured for each Event interface; for the Field interface type. Based on the attribute value Set / Get, a unified Reply Topic and Request Topic are configured; based on the attribute value Notify, a separate Topic is configured for each Notify.
[0160] In one embodiment of the present invention, please refer to Figure 7 , the interface management unit 3 includes:
[0161] The vehicle-side application management component 31 assembles the SOA service models of multiple vehicle-side services into the same vehicle-side application program.
[0162] A deployment management component 32 is developed, which selects the vehicle-side application to be deployed on the vehicle-side controller according to the vehicle-side service content of different vehicle models.
[0163] In this embodiment, the vehicle-side application management component 31 is used to assemble multiple vehicle-side SOA service models into the same vehicle-mounted software (vehicle-side application) in a configured manner, thereby realizing the construction of a complete vehicle service application, and also supporting rapid adjustment and reconstruction to match actual business changes. The development and deployment management component 32 is used to select the vehicle-side application to be deployed on the controller (MPU deployment / MCU deployment) for the function list of a specific vehicle model project, and supports the configuration of parameters such as status and execution, platform health management, log management, and diagnostic management of the vehicle-side application.
[0164] In one embodiment of the present invention, please refer to Figure 7 , the code management unit 4 includes:
[0165] The code management pool component 41 manages the communication code based on the DDS communication protocol, and the communication code includes the framework code required to configure the communication parameters and the core code resources for running the specific business logic;
[0166] The automatic code generator component 42 generates and downloads the communication code configured by the DDS communication protocol to the vehicle-side application based on the code management pool component 41 after the development and deployment management component 32 completes the configuration of the vehicle-side service content and the vehicle-side application.
[0167] Among them, the code automatic generator component 42 also inputs the Automotive Open System Architecture Extensible Markup Language ARXML (Automotive Open System Architecture Extensible Markup Language) configuration file generated by the code automatic generation module into the code automatic generator component 42, and generates the communication code according to the parsing rules, business logic settings and communication code file template library.
[0168] In this embodiment, the code management pool component 41 is used to manage various code file template libraries, including .c files, .cpp files, .h files, .hpp files and xml files, to facilitate query backtracking and adjustment iteration. The automatic code generator component 42 is used to execute related commands after completing the development deployment configuration. The system can automatically generate ARXML configuration files and input them into the automatic code generator component 42 for parsing. The automatic code generator component 42 automatically generates and downloads the code compression package based on the parsing rules, business logic settings and code template library.
[0169] Please note that Figure 8 The vehicle-side service communication configuration system in this embodiment is executed in a tool chain system mode, wherein the data structure management component 11, the SOA service model management component 12, the DDS communication management component 21, the vehicle-side application management component 31 and the development and deployment management component 32 can be collectively referred to as a configuration module, and the configuration module transmits information to the automatic code generator component 42 through the ARXML configuration file. At the same time, the automatic code generator component 42 calls the code template library in the code management unit 4 to generate the required communication code to perform subsequent work based on the SOA and DDS vehicle-side service communication configuration.
[0170] The present invention further provides an electronic device, comprising: a memory and a processor, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the above-mentioned SOA and DDS-based vehicle-side service communication configuration method.
[0171] Figure 4 The structure diagram of the computer system of the electronic device suitable for implementing the embodiment of the present invention is shown. It should be noted that: Figure 4 The computer system of the electronic device shown is only an example and should not bring any limitation to the functions and application scope of the embodiments of the present invention.
[0172] The present invention also provides a computer-readable storage medium, characterized in that at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the above-mentioned SOA and DDS-based vehicle-side service communication configuration method.
[0173] Another aspect of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the vehicle-side service communication configuration method based on SOA and DDS as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0174] Another aspect of the present invention further provides a computer program product or a computer program, the computer program product or the computer program includes a computer instruction, the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the remote upgrade abnormality cause determination method provided in each of the above embodiments.
[0175] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.
[0176] In summary, the embodiments of the present invention provide a vehicle-side service communication configuration method, system, device and storage medium. Through the vehicle-side functional SOA service modeling, DDS becomes a service component and a service interface communication configuration form, making communication between services more flexible. On the basis of the DDS standard, a unified message structure is defined and a publish / subscribe communication model is used to achieve data transmission under the same topic, and on this basis, a "request-response" communication method is completed. At the same time, the communication management code deployed by the service interface is automatically generated by the code generator, which improves the efficiency of vehicle-side software development.
[0177] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present invention. 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 by the present invention shall still be covered by the claims of the present invention.
Claims
1. A vehicle-side service communication configuration method, characterized in that: The method comprises: S100, obtaining vehicle demand information to configure the usage scenario and function of the vehicle-side service, and constructing a service-oriented architecture SOA service model of the vehicle-side service based on the vehicle-side service, wherein the SOA service model includes service basic information (121) and service capability information (122); S200, the SOA service model configures a domain identity value Domain ID for the service interface (123) of the service capability information (122) based on the data distribution service DDS communication protocol, and configures a topic unit parameter of the vehicle-side service according to the type of the service interface (123); S300, the SOA service model constructs a plurality of vehicle-side application programs of the vehicle-side service content set, submits the Domain ID value and Topic unit parameter configured by the service interface (123) to each functional domain of the service basic information (121), and the SOA service model sets the Domain ID value and the Topic unit parameter as communication parameters between the functional domains; S400, the SOA service model detects the communication connectivity between the functional domains of the service basic information (121) based on the communication parameters, and generates a code automatic generation module through a vehicle-side code generator, and the code automatic generation module generates a communication code for each functional domain corresponding to the vehicle-side application according to the communication parameters; The step S400 includes: S410, the vehicle-side application calls the communication parameters configured by the SOA service model based on the DDS communication deployment to the service interface between the functional domains; S420, the automatic code generation module defines the communication code of the vehicle-side application generated according to the communication parameters as a template file to form a communication code file template library; S430, the automatic code generation module reads the DDS communication protocol configuration file generated by the vehicle-side SOA service model and the communication code file template library, and renders and generates the communication code file corresponding to the vehicle-side service configuration; S440. The SOA service model downloads the communication code file from the communication code file template library to the vehicle-side application for storage.
2. The method according to claim 1, characterized in that: The step S100 includes: S110, defining the usage scenario and function of the vehicle-side service according to the vehicle demand information; S120, defining the data type structure of the communication parameters required by the vehicle-side service in the usage scenario and function; S130, configuring the service basic information (121) in the communication parameters; S140, defining service version information of the service capability information (122) in the communication parameters; S150, defining the service interface (123) information in the communication parameters of the service capability information (122); S160, confirming that the service capability information (122) needs to be referenced and the dependent services (124) required in the usage scenario and function.
3. The method according to claim 2, characterized in that The step S150 includes: If the service interface (123) is a Methods interface type, configure the interface code, interface description, one or more input parameters and one output parameter; If the service interface (123) is of the Events interface type, configure the interface code, interface description, an input parameter and an output parameter; If the service interface (123) is of the Fields interface type, configure the interface code, interface description and parameter attributes, wherein the parameter attributes include Get, Set and Notify.
4. The method according to claim 1, characterized in that The step S200 includes: Setting a unique Domain ID value for each service interface (123) in the SOA service model; If the service interface (123) is of the Methods interface type, a unified Reply Topic and Request Topic are configured for each Methods interface; If the service interface (123) is of Events interface type, a separate Topic is configured for each Event interface; If the service interface (123) is a Field interface type, when the parameter attribute is Set / Get, a unified Reply Topic and Request Topic are configured for each Field interface; when the parameter attribute is Notify, a separate Topic is configured for each Notify.
5. The method according to claim 1, characterized in that The step S300 includes: Forming a plurality of vehicle-side service contents according to different usage scenarios and functional differences in vehicle use needs, and aggregating the plurality of vehicle-side service contents to form a vehicle-side application based on the SOA service model; The SOA service model submits the configured Domain ID value and Topic unit parameter to the service interface (123) between each functional domain of the plurality of vehicle-side services and the vehicle-side application; The SOA service model sets the Domain ID value and the Topic unit parameter of the service interface (123) as communication parameters between the vehicle-side application and the vehicle-side service.
6. The method according to claim 1, characterized in that In the step S100, the service basic information (121) includes functional domain, service code, service name, service type, communication scope, belonging component, service label and service description; the service capability information (122) includes service version number, service interface (123) and dependent service (124).
7. A vehicle-side service communication configuration system, characterized in that: It includes a code automatic generation module, and the code automatic generation module includes: A service management unit (1), wherein the service management unit (1) obtains information about vehicle-side services and constructs a service-oriented architecture (SOA) service model based on the information about the vehicle-side services; A communication management unit (2), wherein the communication management unit (2) allocates a domain ID value and a topic unit parameter to the vehicle-side service in the SOA service model based on a data distribution service DDS communication protocol; An interface management unit (3), wherein the interface management unit (3) submits the Domain ID value and Topic unit parameter set in the communication management unit (2) to the service interface (123) of the vehicle-side service, and the SOA service model sets the Domain ID value and Topic unit parameter as communication parameters of the service interface (123); A code management unit (4), the code management unit (4) converts the communication parameters in the interface management unit (3) into communication codes, and downloads and saves the communication codes to the vehicle-side service in the SOA service model; The code management unit (4) comprises: A code management pool component (41) that manages the communication code based on the DDS communication protocol, wherein the communication code includes a framework code required to configure the communication parameters and a core code resource for running a specific business logic; The automatic code generator component (42) generates and downloads the communication code configured with the DDS communication protocol to the vehicle-side application based on the code management pool component (41) after the development and deployment management component (32) completes the configuration of the vehicle-side service content and the vehicle-side application.
8. The system according to claim 7, characterized in that The service management unit (1) comprises: A data structure management component (11), wherein the data structure management component (11) obtains the data type structure of the vehicle-side service and uniformly defines the data type structure of the communication parameters in the service interface (123) of each functional domain of the vehicle-side; wherein the data structure management component (11) also defines and designs fixed-length arrays, dynamic arrays, structures and enumerations; An SOA service model management component (12) acquires the data type structure of different functional domains to define and design the SOA service models of different functional domains.
9. The system according to claim 7, characterized in that The communication management unit (2) comprises a DDS communication management component (21), and the DDS communication management component (21) performs DDS communication protocol configuration on the instance of the communication parameters in the service interface (123).
10. The system according to claim 7, characterized in that The interface management unit (3) comprises: A vehicle-side application management component (31), wherein the vehicle-side application management component (31) assembles the SOA service models of a plurality of vehicle-side services into a same vehicle-side application program, A deployment management component (32) is developed, which selects the vehicle-side application to be deployed on the vehicle-side controller according to the vehicle-side service content of different vehicle models.
11. The system according to claim 10, characterized in that The automatic code generator component also inputs the Automotive Open System Architecture Extensible Markup Language ARXML configuration file generated by the automatic code generation module into the automatic code generator component (42), and generates the communication code according to the parsing rules, business logic settings and communication code file template library.
12. An electronic device, characterized in that: include: A memory and a processor, wherein at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
13. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
OPCUA and DDS protocol signal conversion device, communication system and communication method
CN107454092A
Service model based on SOA and DDS and distributed data communication method
CN111698308A