A method and system for adapting CAN signal differences for automotive applications on a platform-based basis.

By generating a unified CAN signal mapping relationship and a custom CAN signal class, the problem of adaptation difficulties caused by the differences in CAN signals between different vehicle models is solved, and efficient adaptation and maintenance across vehicle models is achieved.

CN119182825BActive Publication Date: 2025-11-14CHINA FAW CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411164776.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-11-14
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

Differences in CAN signal definitions between different vehicle models make cross-vehicle adaptation of automotive applications difficult, increasing development costs and maintenance complexity.

Method used

Through data preparation, mapping generation, initialization, and operation and maintenance steps, a unified CAN signal mapping relationship is generated. Custom CAN signal classes are used for dynamic loading and mapping to achieve CAN signal adaptation across vehicle models.

Benefits of technology

It lowers the development threshold, improves development efficiency, and enhances system maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182825B_ABST
    Figure CN119182825B_ABST
Patent Text Reader

Abstract

This invention relates to the field of vehicle technology and discloses a method, tool, system, electronic device, storage medium, and vehicle for platform-based adaptation of CAN signals in in-vehicle applications. The method includes: responding to and organizing CAN signal definitions collected from different vehicle models; generating a unified CAN signal mapping relationship based on preset CAN signal mapping rules, responding to the collected key information; dynamically loading and executing corresponding CAN signal mapping logic according to the current vehicle model, based on the CAN signal mapping relationship, when the application starts; and using the mapped CAN signals for data processing and communication during application operation, based on the CAN signal mapping logic, and updating the CAN signal mapping logic when the vehicle model or the CAN signal definition changes. This invention can lower the development threshold, improve development efficiency, and enhance maintainability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle technology, and in particular to a method, tool, system, electronic device, storage medium, and vehicle for adapting CAN signal differences to an in-vehicle application platform. Background Technology

[0002] Currently, with the rapid development of automotive technology, vehicle communication networks are becoming increasingly complex. In particular, the CAN (Controller Area Network) bus, as a core technology for in-vehicle communication, is undeniably crucial. However, different automakers and vehicle models have variations in the definition and transmission of CAN signals, posing a significant challenge to cross-model adaptation for automotive applications.

[0003] Traditional automotive application adaptation methods typically rely on manual analysis and writing of specific CAN signal parsing code. This approach is not only labor-intensive and time-consuming but also prone to errors. With continuous updates and upgrades to vehicle models, adaptation work needs to be redone with each change, significantly increasing development costs and maintenance complexity.

[0004] Furthermore, due to the differences in CAN signal definitions between different vehicle models, automotive applications often need to adopt different logic and strategies when processing CAN signals from different vehicle models, which further increases code complexity and maintenance difficulty.

[0005] Therefore, this application provides a method for adapting CAN signal differences to an in-vehicle application platform to solve the above-mentioned technical problems. Summary of the Invention

[0006] The purpose of this invention is to provide a method, tool, system, electronic device, storage medium, and vehicle for platform-based adaptation of CAN signals in automotive applications, in order to solve the technical problem that poor CAN signal compatibility between different vehicle models in the prior art leads to increased maintenance difficulty and reduced development efficiency of automotive applications.

[0007] To address the aforementioned technical problems, this invention provides a method for platform-based adaptation of CAN signals in automotive applications, comprising:

[0008] The data preparation steps include responding to and organizing the CAN signal definitions collected from different vehicle models, wherein the CAN signal definitions include key information for parsing and mapping;

[0009] The mapping generation step includes, in response to the collected key information, generating a unified CAN signal mapping relationship based on a preset CAN signal mapping rule, wherein the CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation;

[0010] The initialization steps include, in response to application startup, dynamically loading and executing the corresponding CAN signal mapping logic based on the current vehicle model, according to the CAN signal mapping relationship;

[0011] The operation and maintenance steps include, in response to the operation of the application, using the mapped CAN signal for data processing and communication based on the CAN signal mapping logic, and updating when the vehicle model or the CAN signal definition changes.

[0012] In some specific embodiments, the data preparation step includes responding to and organizing the collected CAN signal definitions from different vehicle models, wherein the CAN signal definitions include key information for parsing and mapping, and further includes:

[0013] The CAN signal definition files for different vehicle models are stored in a designated directory.

[0014] The completeness, consistency, and accuracy of the collected CAN signal definition files are verified.

[0015] The verified CAN signal definition files are categorized, deduplicated, and sorted according to preset rules to form a unified signal list;

[0016] The signal list is saved in a format that is easy to query and process.

[0017] In some specific embodiments, the mapping generation step includes, in response to the collected key information, generating a unified CAN signal mapping relationship based on a preset CAN signal mapping rule, wherein the CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation, and further includes:

[0018] Create a custom CAN signal class, which includes all the CAN signals that need to be mapped as member variables, and define the corresponding access and modification methods;

[0019] Analyze the CAN signal definitions for different vehicle models to determine the correspondence between the CAN signals and the custom CAN signal class member variables;

[0020] Based on the aforementioned correspondence, mapping logic is written to map the CAN signal values ​​of different vehicle models to the corresponding member variables of the custom CAN signal class;

[0021] Verify the correctness of the mapping logic to ensure that CAN signals from different vehicle models can be correctly mapped.

[0022] In some specific embodiments, the initialization step, including dynamically loading and executing the corresponding CAN signal mapping logic based on the current vehicle model according to the CAN signal mapping relationship in response to application startup, further includes:

[0023] When the application starts, it reads vehicle identification information to determine the current vehicle model, wherein the vehicle identification information includes vehicle ECU information and vehicle VI N code;

[0024] Based on the identified vehicle model, load the corresponding CAN signal mapping logic for that vehicle model;

[0025] The loaded CAN signal mapping logic is executed to map the vehicle-specific CAN signal values ​​to the custom CAN signal class, and the mapping result is verified.

[0026] In some specific embodiments, the operation and maintenance steps, including performing data processing and communication using the mapped CAN signals based on the CAN signal mapping logic in response to the application operation, and updating when the vehicle model or the CAN signal definition changes, further include:

[0027] During the operation of the application, all logic involving CAN signal interaction is performed through the custom CAN signal class;

[0028] Monitor the real-time status of CAN signal interaction, and track the transmission status, abnormal status and changing trends of CAN signals in real time;

[0029] When the vehicle model or CAN signal definition changes, the data preparation and mapping generation steps are re-executed to update the CAN signal mapping relationship.

[0030] The updated CAN signal mapping relationship was tested and verified to ensure that the new vehicle model or new CAN signal definition could be correctly mapped and used.

[0031] Based on the same concept, the present invention also provides an automated tool that applies the above-mentioned method for adapting CAN signal differences to an in-vehicle application platform. The automated tool can automatically execute the data preparation, mapping generation, initialization, and operation and maintenance steps to improve development efficiency.

[0032] Based on the same concept, the present invention also provides a system for adapting to CAN signal differences in automotive applications, comprising:

[0033] The data preparation module is configured to respond to and organize the collected CAN signal definitions from different vehicle models, wherein the CAN signal definitions include key information for parsing and mapping.

[0034] The mapping generation module is configured to generate a unified CAN signal mapping relationship in response to the collected key information, based on a preset CAN signal mapping rule. The CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation.

[0035] The initialization module is configured to dynamically load and execute the corresponding CAN signal mapping logic based on the current vehicle model, according to the CAN signal mapping relationship, in response to application startup.

[0036] The operation and maintenance module is configured to, in response to the operation of the application, use the mapped CAN signal for data processing and communication based on the CAN signal mapping logic, and update it when the vehicle model or the CAN signal definition changes.

[0037] Based on the same concept, the present invention also provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of a method for adapting CAN signal differences to an in-vehicle application platform.

[0038] Based on the same concept, the present invention also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a method for adapting CAN signal differences to an in-vehicle application platform.

[0039] Based on the same concept, the present invention also provides a vehicle equipped with a system for adapting CAN signal differences to an in-vehicle application platform as described above.

[0040] Compared with existing technologies, its advantages are as follows:

[0041] This invention discloses a method, tool, system, electronic device, storage medium, and vehicle for platform-based adaptation of CAN signals in vehicle applications, which can lower the development threshold, improve development efficiency, and enhance maintainability. Attached Figure Description

[0042] Figure 1 This is a flowchart illustrating some specific embodiments of a method for adapting CAN signal differences to an in-vehicle application platform according to the present invention.

[0043] Figure 2 This is a schematic diagram of the development process of a method for adapting CAN signal differences to an in-vehicle application platform in some applications according to the present invention.

[0044] Figure 3 This is a schematic diagram of the operational phase of a method for adapting CAN signal differences to an in-vehicle application platform in some applications according to the present invention.

[0045] Figure 4 This is a schematic diagram of the process of adapting a vehicle application platform to CAN signal differences in some applications during the vehicle model change and maintenance phase of this invention.

[0046] Figure 5 This is a schematic diagram of the process for the maintenance phase of CAN signal definition change in some vehicle models in the present invention, which describes a method for adapting CAN signal differences to an in-vehicle application platform.

[0047] Figure 6 This is a schematic diagram of the structure of a system for adapting to CAN signal differences in an in-vehicle application platform according to the present invention in some specific embodiments;

[0048] Figure 7 This is a schematic diagram of the structure of an electronic device according to some specific embodiments of the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0050] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the application. The singular forms “a,” “said,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0051] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0052] It should be understood that although the terms first, second, third, etc., may be used in the embodiments of this application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, first may also be referred to as second without departing from the scope of the embodiments of this application, and similarly, second may also be referred to as first.

[0053] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”

[0054] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.

[0055] It should be noted that any symbols and / or numbers present in the specification that are not marked in the accompanying drawings are not reference numerals.

[0056] Reference Figure 1 A method for adapting CAN signal differences to an in-vehicle application platform includes:

[0057] S101, Data preparation step, including responding to and organizing the CAN signal definitions collected from different vehicle models, wherein the CAN signal definitions include key information for parsing and mapping;

[0058] Understandably, the first step is to clearly define the range of vehicle models that need to be adapted and determine the source of the CAN signal definitions for these models. The CAN signal definition files or data for each vehicle model are then obtained and stored from the identified data source. A dedicated parsing program or script is written to read and parse the stored CAN signal definition files or data. This program should be able to identify and extract key information from the files, such as signal name, ID, data type, length, range, transmitting node, and receiving node.

[0059] In some applications, the data preparation steps include responding to and organizing the collected CAN signal definitions from different vehicle models. The CAN signal definitions include key information for parsing and mapping. The CAN signal definition files of different vehicle models are centrally stored in a designated directory. The completeness, consistency, and accuracy of the collected CAN signal definition files are verified. The verified CAN signal definition files are classified, deduplicated, and sorted according to preset rules to form a unified signal list. The signal list is then saved in a format that is easy to query and process.

[0060] Understandably, a dedicated directory should first be selected as the central storage location for CAN signal definition files. This directory should have robust access control and backup mechanisms to ensure file security and reliability. CAN signal definition files for various vehicle models should be collected through various means (such as those provided by the vehicle manufacturer, downloaded from the network, or shared internally) and copied to the selected directory. Filenames should include vehicle model identification and version numbers for easy identification and management. Each file should be checked for completeness, including the file header, data segments, and file footer. CAN signal definition files from different versions of the same vehicle model should be compared to ensure consistency. Simultaneously, the file format should be checked to ensure it conforms to preset specifications or standards. Key information in the signal definitions (such as signal name, ID, data type, and range) should be verified for accuracy. The verified CAN signal definition files should be categorized based on factors such as signal function, system affiliation, or vehicle model. During the categorization process, duplicate signal definitions should be removed.

[0061] To improve the readability and usability of the signal list, the categorized signal definitions are sorted according to certain rules. These sorting rules can be tailored to specific needs, such as by signal ID value, lexicographical order of signal names, or system priority.

[0062] Choose an easy-to-query and process format to store the unified signal list. Examples include Excel spreadsheets, CSV files, database tables, or custom binary formats. Convert the categorized, deduplicated, and sorted CAN signal definition data to the selected format. During the conversion process, ensure that the integrity and accuracy of the data are not compromised. Store the converted signal list file in an easily accessible location and perform regular backups to prevent data loss. Also, record the time and content of each modification and update for subsequent tracking and auditing.

[0063] S102, the mapping generation step includes, in response to the collected key information, generating a unified CAN signal mapping relationship based on a preset CAN signal mapping rule, wherein the CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation;

[0064] Understandably, CAN signal mapping rules are formulated according to corresponding requirements, clearly specifying how to map CAN signal values ​​specific to different vehicle models to standardized CAN signal representations. This includes mapping signal IDs, standardizing data types and lengths, adjusting signal ranges, and standardizing signal units. For example, for engine speed signals, it can be stipulated that all vehicle models use unsigned 16-bit integers, with a unified range of 0-10000 rpm and a unified unit of rpm. The formulated mapping rules are stored in the form of files, databases, or program code for reference in the mapping generation step. Based on the collected key information, the specific attributes of the CAN signals for each vehicle model are parsed. Based on the preset CAN signal mapping rules, the CAN signal values ​​specific to each vehicle model are mapped to standardized CAN signal representations, including:

[0065] Signal ID mapping: If different vehicle models use different signal IDs to represent the same function, these different IDs are mapped to a unified ID according to the mapping rules.

[0066] Unified data types and lengths: Based on the mapping rules, the data types and lengths of signals with the same function in different vehicle models are unified into a standardized format.

[0067] Signal range adjustment: If the representation range of the same signal is different in different vehicle models, it will be adjusted to a unified range according to the mapping rules.

[0068] Signal unit standardization: Ensure that signals with the same function are represented using a uniform unit across all vehicle models.

[0069] Generate a mapping table: Record the mapping relationship between the normalized representation and the original representation of each signal generated during the mapping process, forming a mapping table. This table contains key information such as the original signal ID, normalized signal ID, data type, length, range, and unit.

[0070] Verify the mapping relationships: Verify the generated mapping relationship table to ensure that all mapping relationships are correct and that there are no omissions or errors.

[0071] In some applications, the mapping generation step includes, in response to collected key information, generating a unified CAN signal mapping relationship based on preset CAN signal mapping rules. These rules map CAN signal values ​​specific to different vehicle models to standardized CAN signal representations. A custom CAN signal class is created, containing all CAN signals to be mapped as member variables, and defining corresponding access and modification methods. The CAN signal definitions for different vehicle models are analyzed to determine the correspondence between CAN signals and the custom CAN signal class member variables. Based on this correspondence, mapping logic is written to map CAN signal values ​​from different vehicle models to the corresponding member variables of the custom CAN signal class. The correctness of the mapping logic is verified to ensure that CAN signals from different vehicle models are correctly mapped.

[0072] Understandably, a custom CAN signal class (e.g., named CustomCanSignal) can be defined according to the corresponding requirements. In this class, a member variable can be defined for each CAN signal that needs to be mapped, and its data type and access modifier (such as public or private) can be set.

[0073] Add access and modification methods: Write corresponding getter and setter methods for each member variable. This allows external code to safely obtain and set the values ​​of the CAN signal.

[0074] For example,

[0075] public class CustomCanSignal{

[0076] private int engineSpeed;

[0077] private boolean brakeStatus;

[0078] public int getEngineSpeed(){

[0079] Return engine speed;

[0080] }

[0081] public void setEngineSpeed(int engineSpeed){

[0082] this.engineSpeed=engineSpeed;

[0083] }

[0084] public boolean getBrakeStatus(){

[0085] return brakeStatus;

[0086] }

[0087] public void setBrakeStatus(boolean brakeStatus){

[0088] this.brakeStatus=brakeStatus;

[0089] }

[0090] }

[0091] Detailed information about CAN signals, including signal name, ID, data type, and range, is collected from the technical manuals or CAN signal definition files of each vehicle model. Based on the collected information, the correspondence between the CAN signals of each vehicle model and the member variables of a custom CAN signal class is analyzed and determined. Based on the determined correspondence, a mapping algorithm is designed that can map CAN signal values ​​from different vehicle models to the corresponding member variables of the custom CAN signal class. The mapping function is implemented in the custom CAN signal class or related utility classes. This function receives CAN signal values ​​from different vehicle models as input and calls the setter method of the custom CAN signal class to set the values ​​to the corresponding member variables.

[0092] For example,

[0093] public class CanSignalMapper{

[0094] public static void mapToCustomSignal(CustomCanSignalcustomSignal,Map<String,Object> rawSignals){

[0095] if(rawSignals.containsKey("EngineSpeed")){

[0096] customSignal.setEngineSpeed((Integer)

[0097] rawSignals.get("EngineSpeed"));

[0098] }

[0099] if(rawSignals.containsKey("BrakeStatus")){

[0100] customSignal.setBrakeStatus(Boolean.parseBoolean((String)

[0101] rawSignals.get("BrakeStatus")));

[0102] }

[0103] }

[0104] }

[0105] Write test cases for the mapping logic, covering the CAN signal definitions and possible boundary conditions for different vehicle models. The test cases ensure that all signals are correctly mapped to the member variables of the custom CAN signal class. Run the test cases and check if the test results meet expectations. If errors or inconsistencies are found, go back and modify the mapping logic, and re-execute the tests until all tests pass. Perform integration testing to verify the correctness and stability of the mapping logic in real-world applications.

[0106] S103, initialization step, including, in response to application startup, dynamically loading and executing the corresponding CAN signal mapping logic based on the current vehicle model according to the CAN signal mapping relationship;

[0107] In some applications, the initialization steps include dynamically loading and executing the corresponding CAN signal mapping logic based on the current vehicle model, in response to application startup. When the application starts, the vehicle identification information is read to determine the current vehicle model, which includes vehicle ECU information and vehicle VIN code; based on the identified vehicle model, the corresponding vehicle model's CAN signal mapping logic is loaded; the loaded CAN signal mapping logic is executed to map vehicle-specific CAN signal values ​​to a custom CAN signal class, and the mapping result is verified.

[0108] Understandably, the system communicates with the vehicle's Electronic Control Unit (ECU) via an onboard network interface (such as an OBD-II interface) to read ECU information, including the ECU version number and manufacturer identifier, to initially determine the vehicle type. Simultaneously, it reads the Vehicle Identification Number (VIN). The VIN is a unique identifier for the vehicle, containing detailed information such as the manufacturer, year, and model. Combining the read ECU information and the VIN, the system uses a preset algorithm or queries a database to determine the current vehicle model. A database containing CAN signal mapping relationships for different vehicle models is maintained. Each vehicle model's mapping relationship is uniquely identified and associated with the vehicle model. Based on the determined vehicle model, the corresponding CAN signal mapping logic is retrieved from the mapping relationship database.

[0109] The loaded CAN signal mapping logic is executed by first instantiating a custom CAN signal class, which contains all the CAN signals that need to be mapped as member variables. The loaded CAN signal mapping logic is then applied to the actual CAN signal values ​​of the current vehicle model. The mapping results are statically validated using preset test cases or rules, including checking whether the mapped data is within a reasonable range and whether the data type is correct.

[0110] S104, Operation and maintenance steps, including responding to the application operation process by using the mapped CAN signal for data processing and communication based on the CAN signal mapping logic, and updating when the vehicle model or the CAN signal definition changes.

[0111] In some applications, the operation and maintenance steps include responding to the application's operation by using mapped CAN signals for data processing and communication based on CAN signal mapping logic, and updating the process when the vehicle model or CAN signal definition changes. During application operation, all logic involving CAN signal interaction is performed through a custom CAN signal class; real-time monitoring of CAN signal interaction is conducted, tracking the transmission status, abnormal states, and trends of CAN signals; when the vehicle model or CAN signal definition changes, the data preparation and mapping generation steps are re-executed to update the CAN signal mapping relationship; and the updated CAN signal mapping relationship is tested and verified to ensure that the new vehicle model or new CAN signal definition can be correctly mapped and used.

[0112] Understandably, during application operation, all logic involving CAN signal interaction is handled through a custom CAN signal class. Whether reading vehicle status, sending control commands, or performing data analysis, the mapped CAN signal values ​​are accessed first through this class. Real-time monitoring of CAN signal transmission, abnormal states, and trends is implemented, including monitoring key indicators such as signal transmission frequency, reception delay, and the number of error frames. When a CAN signal abnormality is detected (e.g., signal loss, excessive error frames), the abnormal information is recorded and corresponding processing mechanisms are triggered, including retrying transmission, logging, and issuing warning notifications. To facilitate user monitoring and diagnostics, a visual interface is provided, displaying real-time CAN signal waveforms, status indicators, and other information.

[0113] Updates and verification in response to changes:

[0114] Vehicle model or CAN signal definition change: When the vehicle model changes or the CAN signal definition changes (such as vehicle upgrade, configuration change, etc.), the data is prepared again and the mapping relationship is generated.

[0115] Re-execute data preparation and mapping generation: First, collect detailed information on the new vehicle model or new CAN signal definition, including signal name, ID, data type, range, etc. Then, based on this information, re-execute the data preparation steps, including updating the database and generating the mapping configuration file. Finally, reload the CAN signal mapping logic using the new mapping relationship.

[0116] Testing and Verification: The updated CAN signal mapping relationship needs to be tested and verified to ensure that the new vehicle model or new CAN signal definition can be correctly mapped and used. Testing and verification includes multiple levels such as unit testing, integration testing, and system testing, covering scenarios such as normal operation and anomaly handling.

[0117] For example, taking the engine speed signal of a new vehicle model as an example, the correctness of the mapping logic is first verified through unit testing to ensure that the engine speed value can be correctly read and mapped. Then, integration testing is used to verify whether the transmission and processing flow of this signal in the whole vehicle system is smooth. Finally, system testing is conducted to simulate signal interaction in real driving scenarios to ensure stable system operation.

[0118] The following is combined Figures 2 to 5 This invention illustrates embodiments of the method for adapting CAN signal differences to an in-vehicle application platform in some applications:

[0119] In this embodiment, all system-layer CAN signal definition values ​​are mapped to the same set of application-layer CAN signal definition values ​​to ensure that a single automotive application can function correctly on different automotive systems. Developers only need to maintain one set of code, regenerating the mapping relationship only when the CAN signal definitions are updated; all other functions remain unaffected, reducing development costs.

[0120] like Figure 2 As shown,

[0121] Development phase:

[0122] 1. Place the CAN signal definition classes of all vehicle models in the designated directory: This directory serves as the data source for the signals and contains the CAN signal definition classes of all vehicle models that need to be adapted and compatible.

[0123] 2. Develop a script to obtain the union of CAN signal constant definitions for all vehicle models: Read all CAN signal definition classes from step 1 and summarize all CAN signals; any programming language can be used as long as the function can be completed.

[0124] 3. Develop scripts to generate CAN signal mapping and conversion methods for each vehicle model: generate custom classes and corresponding CAN signal mapping and conversion methods for each vehicle model;

[0125] For example, the CAN signal class is defined as follows. The definition is not restricted. The reading logic can be changed according to different CAN signal definition methods.

[0126]

[0127] Generate styles such as:

[0128] This is a custom signal class; only CAN signal variables of this class are used during development.

[0129]

[0130]

[0131] This is the CAN signal conversion class for the corresponding vehicle model.

[0132]

[0133] 4. Responsible for the service initialization phase of processing CAN signals, loading different CAN signal mapping logic according to different vehicle models; vehicle model differentiation methods are not within the scope of this patent discussion, and can be achieved through EOL, part number, system attributes, etc.

[0134] 5. All logic using CAN signals should use a custom CAN signal class for CAN signal interaction: all CAN signals in the project can use variables of the custom signal class.

[0135] like Figure 3 As shown,

[0136] Operation phase:

[0137] 1. Obtain the current vehicle model: The current vehicle model can be obtained at runtime through system properties, EOL, part number, etc.

[0138] 2. Responsible for initializing the CAN signal processing service and executing the CAN signal mapping and conversion method for the corresponding vehicle model;

[0139] 3. When sending and receiving CAN signals, the CAN signal definition value corresponding to the vehicle model is used to ensure correct data interaction with the vehicle system: After completing the above steps, the CAN signal value called is consistent with the CAN signal definition in the current vehicle system, ensuring the normal operation of the function.

[0140] like Figure 4 As shown,

[0141] Maintenance phase:

[0142] Vehicle model change: After completing step 1 of the development phase, run the script and then complete step 3.

[0143] like Figure 5 As shown,

[0144] Maintenance phase:

[0145] Changes to the CAN signal definition for the vehicle model: Simply run the script after completing step 1 of the development phase.

[0146] For the purpose of simplicity, the method steps disclosed in the above embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0147] The present invention also provides an automated tool that applies the above-mentioned method for adapting CAN signal differences to an in-vehicle application platform. The automated tool can automatically execute the data preparation, mapping generation, initialization, and operation and maintenance steps to improve development efficiency.

[0148] like Figure 6 As shown, the present invention also provides a system for adapting CAN signal differences for automotive applications, comprising:

[0149] The data preparation module 201 is configured to respond to and organize the collected CAN signal definitions of different vehicle models, wherein the CAN signal definitions include key information for parsing and mapping.

[0150] The mapping generation module 202 is configured to generate a unified CAN signal mapping relationship based on a preset CAN signal mapping rule in response to the collected key information. The CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation.

[0151] The initialization module 203 is configured to dynamically load and execute the corresponding CAN signal mapping logic based on the current vehicle model when the application starts, according to the CAN signal mapping relationship.

[0152] The operation and maintenance module 204 is configured to, in response to the operation of the application, use the mapped CAN signal for data processing and communication based on the CAN signal mapping logic, and update it when the vehicle model or the CAN signal definition changes.

[0153] It is worth noting that although only some basic functional modules are disclosed in the embodiments of this invention, it does not mean that the composition of this system is limited to the above-mentioned basic functional modules. On the contrary, what this embodiment intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. The fact that this embodiment only discloses a few basic functional modules should not be considered as the scope of protection of the claims of this invention being limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above device is described separately according to its functions as various units and modules. Of course, in implementing this invention, the functions of each unit and module can be implemented in one or more software and / or hardware.

[0154] like Figure 7 As shown, the present invention also provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of a method for adapting CAN signal differences to an in-vehicle application platform.

[0155] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. For example... Figure 7 The structure shown in this embodiment of the invention includes an electronic device comprising one or more processors 710 and a storage device 720; the processors 710 in this electronic device may be one or more. Figure 7 Taking a processor 710 as an example; a storage device 720 is used to store one or more programs; the one or more programs are executed by the one or more processors 710, so that the one or more processors 710 implement the method of adapting CAN signal differences for vehicle application platform as described in any one embodiment of the present invention.

[0156] The electronic device may also include an input device 730 and an output device 740.

[0157] The processor 710, storage device 720, input device 730, and output device 740 in this electronic device can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.

[0158] The storage device 720 in this electronic device serves as a computer-readable storage medium, capable of storing one or more programs. These programs can be software programs, computer-executable programs, or modules, such as the program instructions / modules corresponding to the method for adapting CAN signal differences to a vehicle application platform provided in this embodiment of the invention. The processor 710 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the storage device 720, thereby implementing the method for adapting CAN signal differences to a vehicle application platform as described in the above embodiment.

[0159] Storage device 720 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device. Furthermore, storage device 720 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, storage device 720 may further include memory remotely located relative to processor 710, which can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0160] Input device 730 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 740 may include display devices such as a display screen.

[0161] The present invention also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a method for adapting CAN signal differences to an in-vehicle application platform.

[0162] Specifically, the computer storage medium in this embodiment of the invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0163] The present invention also provides a vehicle equipped with a system for adapting to CAN signal differences in an in-vehicle application platform as described above.

[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for adapting CAN signal differences to an in-vehicle application platform, characterized in that, include: The data preparation steps include responding to and organizing the CAN signal definitions collected from different vehicle models, wherein the CAN signal definitions include key information for parsing and mapping; The mapping generation step includes, in response to the collected key information, generating a unified CAN signal mapping relationship based on a preset CAN signal mapping rule, wherein the CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation; The initialization steps include, in response to application startup, dynamically loading and executing the corresponding CAN signal mapping logic based on the current vehicle model, according to the CAN signal mapping relationship; The operation and maintenance steps include, in response to the operation of the application, using the mapped CAN signal for data processing and communication based on the CAN signal mapping logic, and updating when the vehicle model or the CAN signal definition changes; The mapping generation step includes, in response to the collected key information, generating a unified CAN signal mapping relationship based on a preset CAN signal mapping rule, wherein the CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation, and further includes: Create a custom CAN signal class, which includes all the CAN signals that need to be mapped as member variables, and define the corresponding access and modification methods; Analyze the CAN signal definitions for different vehicle models to determine the correspondence between the CAN signals and the custom CAN signal class member variables; Based on the aforementioned correspondence, mapping logic is written to map the CAN signal values ​​of different vehicle models to the corresponding member variables of the custom CAN signal class; Verify the correctness of the mapping logic to ensure that CAN signals from different vehicle models can be correctly mapped.

2. The method for adapting CAN signal differences to an in-vehicle application platform according to claim 1, characterized in that, The data preparation steps include responding to and organizing the collected CAN signal definitions from different vehicle models. The CAN signal definitions include key information for parsing and mapping, and further include: The CAN signal definition files for different vehicle models are stored in a designated directory. The completeness, consistency, and accuracy of the collected CAN signal definition files are verified. The verified CAN signal definition files are categorized, deduplicated, and sorted according to preset rules to form a unified signal list; The signal list is saved in a format that is easy to query and process.

3. The method for adapting CAN signal differences to an in-vehicle application platform according to claim 1, characterized in that, The initialization steps, including dynamically loading and executing the corresponding CAN signal mapping logic based on the current vehicle model according to the CAN signal mapping relationship in response to application startup, further include: When the application starts, it reads vehicle identification information to determine the current vehicle model, wherein the vehicle identification information includes vehicle ECU information and vehicle VIN code; Based on the identified vehicle model, load the corresponding CAN signal mapping logic for that vehicle model; The loaded CAN signal mapping logic is executed to map the vehicle-specific CAN signal values ​​to the custom CAN signal class, and the mapping result is verified.

4. The method for adapting CAN signal differences to an in-vehicle application platform according to claim 3, characterized in that, The operation and maintenance steps, including responding to the application's operation by using the mapped CAN signals for data processing and communication based on the CAN signal mapping logic, and updating them when the vehicle model or the CAN signal definition changes, further include: During the operation of the application, all logic involving CAN signal interaction is performed through the custom CAN signal class; Monitor the real-time status of CAN signal interaction, and track the transmission status, abnormal status and changing trends of CAN signals in real time; When the vehicle model or CAN signal definition changes, the data preparation and mapping generation steps are re-executed to update the CAN signal mapping relationship. The updated CAN signal mapping relationship was tested and verified to ensure that the new vehicle model or new CAN signal definition could be correctly mapped and used.

5. An automation tool, characterized in that, The automated tool applies the method for adapting CAN signal differences to an in-vehicle application platform as described in claim 1. The automated tool can automatically execute the data preparation, mapping generation, initialization, and operation and maintenance steps to improve development efficiency.

6. A system for adapting to CAN signal differences in vehicle applications, characterized in that, include: The data preparation module is configured to respond to and organize the collected CAN signal definitions from different vehicle models, wherein the CAN signal definitions include key information for parsing and mapping. The mapping generation module is configured to generate a unified CAN signal mapping relationship in response to the collected key information, based on a preset CAN signal mapping rule. The CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation. The initialization module is configured to dynamically load and execute the corresponding CAN signal mapping logic based on the current vehicle model, according to the CAN signal mapping relationship, in response to application startup. The operation and maintenance module is configured to, in response to the operation of the application, use the mapped CAN signal for data processing and communication based on the CAN signal mapping logic, and update it when the vehicle model or the CAN signal definition changes; The CAN signal mapping rule is used to map CAN signal values ​​specific to different vehicle models to a standardized CAN signal representation, and further includes: Create a custom CAN signal class, which includes all the CAN signals that need to be mapped as member variables, and define the corresponding access and modification methods; Analyze the CAN signal definitions for different vehicle models to determine the correspondence between the CAN signals and the custom CAN signal class member variables; Based on the aforementioned correspondence, mapping logic is written to map the CAN signal values ​​of different vehicle models to the corresponding member variables of the custom CAN signal class; Verify the correctness of the mapping logic to ensure that CAN signals from different vehicle models can be correctly mapped.

7. An electronic device, characterized in that, include: The system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; the memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 4.

8. A computer-readable storage medium, characterized in that, It stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the method according to any one of claims 1 to 4.

9. A vehicle, characterized in that, The vehicle is equipped with a system for adapting to CAN signal differences as described in claim 6.

Citation Information

Patent Citations

  • CAN signal adaptation device, system, method and equipment and storage medium

    CN114422291A

  • Vehicle data processing method and device, electronic equipment and medium

    CN118337863A