DBC service processing method and device, electronic equipment and storage medium
By converting DBC files into library files and loading with model configuration files, real-time updates and remote queries of DBC services in SOA architecture are achieved, and the problem of low efficiency of DBC file processing in cross-ECU and vehicle cloud communication is solved, improving the Real-time and communication efficiency of the system.
Patent Information
- Application Number
- CN202411158861.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-10
Smart Images

Figure CN119109969A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle-domain communication and vehicle-cloud communication, and in particular to a DBC service processing method, device, electronic device and storage medium. Background Art
[0002] SOA (Service Oriented Architecture) is a software architecture design method. The architecture design includes multiple services, which provide a series of functions through mutual dependence. Each service usually exists in an independent form in the operating system process, and each service is called through the network.
[0003] DBC files are CAN (Controller Area Network) database files, which are usually used to describe messages and signals in the network. These files are used to describe the communication protocol between ECUs (Electronic Control Units) on the CAN network, including the format of messages, signal properties, data types, ranges, etc.
[0004] The existing DBC parsing implementation solution is to convert the DBC file into static code and compile it together with the business program and import it into the ECU system. At the same time, after receiving the CAN message in the business process, the signal value in the DBC database is updated in real time, and logical processing is performed according to the signal value in the business process based on the parsed value. This can meet the needs in the traditional centralized development model, but it is not advantageous for the development of SOA software architecture.
[0005] In the SOA architecture, each service may communicate across ECUs, across the entire vehicle domain, or even across the vehicle-cloud. How can so many microservices achieve dependence on DBC services? The original in-process parsing and processing method cannot meet this business requirement. Summary of the invention
[0006] In order to solve the deficiencies of the prior art, the present invention provides a DBC service processing method, device, electronic device and storage medium, which fully utilizes the characteristics of each business in the SOA architecture as an independent process program, converts the DBC file into static code and compiles it into a library file. There can be multiple library files in the system, that is, dynamic library files generated by multiple different DBC files. The DBC service selects to load the corresponding dynamic library file by reading the vehicle model configuration file, and the status broadcast is performed only when the signal value is updated, and remote real-time query is supported.
[0007] The embodiment of the present invention provides the following solution:
[0008] In a first aspect, an embodiment of the present invention provides a DBC service processing method based on an automobile SOA architecture, the method comprising:
[0009] Step 1: Convert each DBC file into static code and compile the static code into a library file;
[0010] Step 2: The DBC service module reads the vehicle model configuration file and loads the library file corresponding to the vehicle model according to the vehicle model configuration file;
[0011] Step 3: Obtain the signal index ID and signal value by remote calling or subscribing to broadcast, and perform business processing according to the signal index ID and signal value.
[0012] In an optional embodiment, obtaining a signal index ID and a signal value by remote calling, and performing service processing according to the signal index ID and the signal value includes the following process:
[0013] Step a1, after the DBC service module loads the library file, an index relationship is established between the signal name and the signal index ID of each signal, and an association list is generated;
[0014] Step a2: The DBC service module receives the vehicle CAN data and / or CANFD data in real time, performs data analysis, and updates the local signal value in real time;
[0015] Step a3: other business service modules call to obtain the association list generated in step a1, obtain the latest signal value through the signal index ID, and perform corresponding business processing.
[0016] In an optional embodiment, obtaining a signal index ID and a signal value by subscribing to a broadcast, and performing service processing according to the signal index ID and the signal value includes the following process:
[0017] Step b1, after the DBC service module loads the library file, an index relationship is established between the signal name and the signal index ID of each signal, and an association list is generated;
[0018] Step b2: The DBC service module receives the vehicle CAN data and / or CANFD data in real time, performs data analysis, and updates the local signal value in real time;
[0019] Step b3: other business service modules call to obtain the association list generated in step b1, and obtain the signal value of the latest state through the signal index ID;
[0020] Step b4, other business service modules subscribe to DBC services;
[0021] Step b5: When the DBC service module detects that the signal value is updated, it actively broadcasts the signal ID and signal value to the corresponding subscriber;
[0022] Step b6: Other business service modules subscribing to the DBC service obtain the update information of the signal index ID and the signal value, and then perform corresponding business processing.
[0023] In a second aspect, an embodiment of the present invention further provides a DBC service processing device based on an automobile SOA architecture, the device comprising:
[0024] A compilation module is used to convert each DBC file into static code and compile the static code into a library file;
[0025] DBC service module, used to read vehicle configuration files, load the library files of the corresponding vehicle according to the vehicle configuration files, and obtain the signal index ID and signal value by actively querying or subscribing to broadcasts;
[0026] The business process module is used to perform logical processing based on the signal index ID and signal value.
[0027] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory is coupled to the processor, and the memory stores instructions, which, when executed by the processor, enable the electronic device to perform the steps of any one of the aforementioned methods.
[0028] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the aforementioned methods when executed by a processor.
[0029] The beneficial effects of the present invention based on its technical solution are:
[0030] (1) The DBC service processing method, device, electronic device and storage medium provided by the present invention can load library files by reading configuration files, convert one or more DBC files into static codes by using a code automation conversion tool, compile the static codes into library files and pre-set them to the system, and select and load the library required by the current system through the configuration file, thereby solving the problem that DBC service needs to be updated again when DBC is changed;
[0031] (2) The present invention provides a DBC service processing method, device, electronic device and storage medium. When the business process is initialized, a signal index ID is established through a remote call interface. The mapping relationship of the signal name, that is, the signal value corresponding to the signal name, can be obtained through the index ID, avoiding dependence on the signal name. In inter-service communication and intra-service traversal search, 4-byte integer data is more efficient than character string data of indefinite length, solving the inefficient development method in which the business process needs to be changed when the DBC is changed;
[0032] (3) The present invention provides a DBC service processing method, device, electronic device and storage medium. The status is broadcast only when the signal value is updated, and real-time query is supported. When the DBC service detects a change in the signal value, it actively broadcasts the update information (including the index ID and the signal value), and supports the business process to obtain all information (including the index ID and the signal value) through the remote call interface, thereby solving the call dependency problem of distributed service applications, solving the timeliness problem of the remote call query interface of the business process period, and effectively reducing the communication pressure between processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 This is the vehicle hardware architecture used in the embodiments of the present invention. DETAILED DESCRIPTION
[0035] The following is a clear and complete description of the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention belong to the scope of protection of the embodiments of the present invention.
[0036] The embodiment of the present invention adopts Figure 1 The vehicle hardware architecture shown uses TBOX (on-board terminal) to collect and analyze the vehicle CAN. Other ETH ECU (Ethernet Electronic Control Unit) and TSP (Telematics Service Provider) platforms can obtain the data processed by TBOX through wireless network communication (4G / 5G) communication, subscription / broadcasting, and remote calling.
[0037] The embodiment of the present invention provides the following solution:
[0038] A DBC service processing method based on an automobile SOA architecture is provided, the method comprising:
[0039] Step 1: Convert each DBC file into static code and compile the static code into a library file.
[0040] The library file generated by compiling the DBC file can parse n signals. The external information of each signal includes signal name, signal index ID, and signal value. There is a one-to-one correlation between the signal name and the signal index ID. The signal value can be queried through the corresponding index ID.
[0041] Step 2: The DBC service module reads the vehicle model configuration file and loads the library file of the corresponding vehicle model according to the vehicle model configuration file.
[0042] Step 3: Obtain the signal index ID and signal value by remote calling or subscribing to broadcast, and perform business processing according to the signal index ID and signal value.
[0043] The signal index ID and signal value are obtained by remote calling, and the business processing according to the signal index ID and signal value includes the following process:
[0044] Step a1: After the DBC service module loads the library file, it creates an index relationship between the signal name and the signal index ID of each signal and generates an associated list. For example, if there are 1,000 signals, the signal names are "vehicle speed", "gear position", "remaining battery", "range", etc. The signal index IDs are 1, 2, 3, 4, etc.
[0045] Step a2: The DBC service module receives the vehicle CAN data and / or CANFD data in real time, performs data analysis, and updates the local signal value in real time;
[0046] Step a3: other business service modules call to obtain the association list generated in step a1, obtain the latest signal value through the signal index ID, and perform corresponding business processing.
[0047] Obtaining the signal index ID and signal value by subscribing to broadcasts, and performing business processing based on the signal index ID and signal value includes the following process:
[0048] Step b1, after the DBC service module loads the library file, an index relationship is established between the signal name and the signal index ID of each signal, and an association list is generated;
[0049] Step b2: The DBC service module receives the vehicle CAN data and / or CANFD data in real time, performs data analysis, and updates the local signal value in real time;
[0050] Step b3, other business service modules (the service and the DBC service may be in the same ECU, or in different ECUs, or in the cloud) call to obtain the association list generated in step b1, and obtain the latest signal value through the signal index ID;
[0051] Step b4, other business service modules subscribe to DBC services;
[0052] Step b5: When the DBC service module detects that the signal value is updated, it actively broadcasts the signal ID and signal value to the corresponding subscriber;
[0053] Step b6: Other business service modules subscribing to the DBC service obtain the update information of the signal index ID and the signal value, and then perform corresponding business processing.
[0054] The embodiment of the present invention further provides a DBC service processing device based on the automobile SOA architecture, the device comprising:
[0055] A compilation module is used to convert each DBC file into static code and compile the static code into a library file;
[0056] DBC service module, used to read vehicle configuration files, load the library files of the corresponding vehicle according to the vehicle configuration files, and obtain the signal index ID and signal value by actively querying or subscribing to broadcasts;
[0057] The business process module is used to perform logical processing based on the signal index ID and signal value.
[0058] An embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of any one of the aforementioned methods.
[0059] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of any of the aforementioned methods are implemented.
[0060] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0061] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (modules, systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0062] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0063] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0064] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0065] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A DBC service processing method based on automobile SOA architecture, characterized in that: The method comprises: Step 1: Convert each DBC file into static code and compile the static code into a library file; Step 2: The DBC service module reads the vehicle model configuration file and loads the library file corresponding to the vehicle model according to the vehicle model configuration file; Step 3: Obtain the signal index ID and signal value by remote calling or subscribing to broadcast, and perform business processing according to the signal index ID and signal value.
2. The DBC service processing method based on automobile SOA architecture according to claim 1 is characterized in that: The signal index ID and signal value are obtained by remote calling, and the business processing according to the signal index ID and signal value includes the following process: Step a1, after the DBC service module loads the library file, an index relationship is established between the signal name and the signal index ID of each signal, and an association list is generated; Step a2: The DBC service module receives the vehicle CAN data and / or CANFD data in real time, performs data analysis, and updates the local signal value in real time; Step a3: other business service modules call to obtain the association list generated in step a1, obtain the latest signal value through the signal index ID, and perform corresponding business processing.
3. The DBC service processing method based on automobile SOA architecture according to claim 1 is characterized in that: Obtaining the signal index ID and signal value by subscribing to broadcasts, and performing business processing based on the signal index ID and signal value includes the following process: Step b1, after the DBC service module loads the library file, an index relationship is established between the signal name and the signal index ID of each signal, and an association list is generated; Step b2: The DBC service module receives the vehicle CAN data and / or CANFD data in real time, performs data analysis, and updates the local signal value in real time; Step b3: other business service modules call to obtain the association list generated in step b1, and obtain the signal value of the latest state through the signal index ID; Step b4, other business service modules subscribe to DBC services; Step b5: When the DBC service module detects that the signal value is updated, it actively broadcasts the signal ID and signal value to the corresponding subscriber; Step b6: Other business service modules subscribing to the DBC service obtain the update information of the signal index ID and the signal value, and then perform corresponding business processing.
4. A DBC service processing device based on automobile SOA architecture, characterized in that: The device comprises: A compilation module is used to convert each DBC file into static code and compile the static code into a library file; DBC service module, used to read vehicle configuration files, load the library files of the corresponding vehicle according to the vehicle configuration files, and obtain the signal index ID and signal value by actively querying or subscribing to broadcasts; The business process module is used to perform logical processing based on the signal index ID and signal value.
5. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is coupled to the processor and stores instructions, and when the instructions are executed by the processor, the electronic device executes the steps of the method according to any one of claims 1 to 3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 3 are implemented.
