CN111475221A - CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library - Google Patents

CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library Download PDF

Info

Publication number
CN111475221A
CN111475221A CN202010202153.XA CN202010202153A CN111475221A CN 111475221 A CN111475221 A CN 111475221A CN 202010202153 A CN202010202153 A CN 202010202153A CN 111475221 A CN111475221 A CN 111475221A
Authority
CN
China
Prior art keywords
data
dynamic link
link library
electric vehicle
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010202153.XA
Other languages
Chinese (zh)
Inventor
颜宇杰
袁春海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chuangqu Shanghai New Energy Technology Co ltd
Original Assignee
Chuangqu Shanghai New Energy Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chuangqu Shanghai New Energy Technology Co ltd filed Critical Chuangqu Shanghai New Energy Technology Co ltd
Priority to CN202010202153.XA priority Critical patent/CN111475221A/en
Publication of CN111475221A publication Critical patent/CN111475221A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C5/00Registering or indicating the working of vehicles
    • G07C5/08Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
    • G07C5/0808Diagnosing performance data

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Vehicle Cleaning, Maintenance, Repair, Refitting, And Outriggers (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a CAN data analysis method for dynamically adapting to various electric vehicle types by using a dynamic link library, which comprises the following steps of 1, advancing the dynamic link library D LL with multiple versions, 2, obtaining CAN data of an electric vehicle, 3, obtaining vehicle type information of the electric vehicle needing diagnosis detection and calling the dynamic link library D LL, 4, analyzing and storing the CAN data by using the dynamic link library D LL, 5, polling the analyzed data stored in a cache region through an API (application program interface) interface and judging whether the variable name of the analyzed data is consistent with the DBC (database control) variable name, 6, if so, taking out the updated data in the dynamic link library D LL obtained by calling through reflection of the variable name and assigning the data, then displaying the assigned data on a UI interface, and 7, if not, displaying a special format on the UI interface.

Description

CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library
Technical Field
The invention relates to the technical field of electric vehicle diagnosis methods, in particular to a CAN data analysis method for dynamically adapting to various electric vehicle types by utilizing a dynamic link library.
Background
The types of the electric vehicles in the market are all eight-door, the CAN contents of development suppliers of each family are different, and the development suppliers have confidentiality and difference, so that the CAN network protocol versions of the whole electric vehicle are too many, the whole vehicle information of after-sale diagnosis and investigation is extremely inconvenient, the development workload of diagnosis software is greatly increased, and the subsequent maintenance is also extremely inconvenient.
The applicant has therefore made an advantageous search and attempt to solve the above-mentioned problems, in the context of which the technical solutions to be described below have been created.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the CAN data analysis method for dynamically adapting to various electric vehicle types by using the dynamic link library is large in application range, reduces development workload and facilitates subsequent maintenance, and overcomes the defects of the prior art.
The technical problem to be solved by the invention can be realized by adopting the following technical scheme:
the CAN data analysis method for dynamically adapting to various electric vehicle types by utilizing the dynamic link library comprises the following steps:
step S10, collecting and storing dynamic link libraries D LL of electric vehicle models of a plurality of versions in advance;
step S20, connecting the electric automobile to be diagnosed and detected through the ODB interface by adopting a CAN transceiver, and acquiring CAN data of the electric automobile;
step S30, obtaining the vehicle type information of the electric vehicle needing diagnosis and detection, and calling a dynamic link library D LL matched with the vehicle type information according to the vehicle type information;
step S40, analyzing the acquired CAN data of the electric automobile by using the called dynamic link library D LL, storing the analyzed data in a cache area, and waiting for interface calling;
step S50, polling the analyzed data stored in the cache region through the API interface, judging whether the variable name of the analyzed data is consistent with the DBC variable name, and if the variable name of the analyzed data is consistent with the DBC variable name, executing step S60; if not, go to step S70;
step S60, the updated data in the called dynamic link library D LL is taken out through variable name reflection and assigned, and then the assigned data is displayed on a UI interface;
in step S70, it is determined that the data is a history obsolete data, and the special format is displayed on the UI interface.
In a preferred embodiment of the present invention, in the step S10, collecting and storing the dynamic link library D LL of a plurality of versions of electric vehicle models in advance, the method comprises the following sub-steps:
step S11, collecting electric vehicle model DBC files of a plurality of versions;
step S12, converting the collected electric vehicle model DBC files of a plurality of versions into a C file and an h file one by one through a script;
step S13, compile the converted C file and h file into one dynamic link library D LL one by one locally, and store the compiled multiple dynamic link libraries D LL into different directories.
In a preferred embodiment of the present invention, the CAN transceiver is a USBCAN or a PACN.
By adopting the technical scheme, the invention has the advantages that different dynamic link libraries D LL are used for dynamically adapting the CAN protocols of different versions of electric vehicle types, so that multi-vehicle type diagnosis adaptation is realized, the development workload of diagnosis software is effectively reduced, and meanwhile, the follow-up maintenance is simple and convenient.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a CAN data analysis method according to the present invention.
Fig. 2 is a schematic diagram of the electric vehicle model DBC file conversion to the dynamic link library D LL of the present invention.
Detailed Description
In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further explained below by combining the specific drawings.
Referring to fig. 1, a CAN data parsing method for dynamically adapting to a plurality of electric vehicle types using a dynamic link library is shown, which includes the steps of:
in step S10, the dynamic link library D LL of a plurality of versions of electric vehicle models is collected and stored in advance.
And step S20, connecting the electric automobile to be diagnosed and detected through the ODB interface by using a CAN transceiver, and acquiring CAN data of the electric automobile. In this embodiment, the CAN transceiver is USBCAN or PACN.
And step S30, obtaining the vehicle type information of the electric vehicle needing diagnosis and detection, and calling a dynamic link library D LL matched with the vehicle type information according to the vehicle type information.
And step S40, analyzing the acquired CAN data of the electric automobile by using the called dynamic link library D LL, storing the analyzed data in a cache area, and waiting for interface calling.
Step S50, polling the analyzed data stored in the cache region through the API interface, judging whether the variable name of the analyzed data is consistent with the DBC variable name, and if the variable name of the analyzed data is consistent with the DBC variable name, executing step S60; if not, the process goes to step S70. In this embodiment, the DBC variable name + a certain format is an interface name, and the acquired value must be acquired through an interface function.
And step S60, taking out the updated data in the dynamic link library D LL through variable name reflection, assigning values, and displaying the assigned data on a UI interface, wherein the UI interface refers to a display graphical interface of an upper computer.
In step S70, it is determined that the data is a history obsolete data, and the special format is displayed on the UI interface. The special format refers to a custom data format. The UI interface refers to a display graphical interface of the upper computer.
In step S10, the dynamic link library D LL of a plurality of versions of electric vehicle models is collected and stored in advance, and referring to fig. 2, the method includes the following sub-steps:
in step S11, a plurality of versions of electric vehicle model DBC files are collected.
And step S12, converting the collected electric vehicle model DBC files of a plurality of versions into a C file and an h file one by one through a script. Wherein, the C file and the h file are C language specific format files.
Step S13, the converted C files and h files are compiled into a dynamic link library D LL through C language, and the compiled dynamic link libraries D LL are stored in different directories.
The invention utilizes different dynamic link libraries D LL to dynamically adapt the CAN protocols of different versions of electric vehicle models, realizes multi-vehicle diagnosis adaptation, effectively reduces the development workload of diagnosis software, and simultaneously has simple and convenient follow-up maintenance.
The foregoing shows and describes the general principles and broad features of the present invention and advantages thereof. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are described in the specification and illustrated only to illustrate the principle of the present invention, but that various changes and modifications may be made therein without departing from the spirit and scope of the present invention, which fall within the scope of the invention as claimed. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (3)

1. The CAN data analysis method for dynamically adapting to various electric vehicle types by utilizing the dynamic link library is characterized by comprising the following steps of:
step S10, collecting and storing dynamic link libraries D LL of electric vehicle models of a plurality of versions in advance;
step S20, connecting the electric automobile to be diagnosed and detected through the ODB interface by adopting a CAN transceiver, and acquiring CAN data of the electric automobile;
step S30, obtaining the vehicle type information of the electric vehicle needing diagnosis and detection, and calling a dynamic link library D LL matched with the vehicle type information according to the vehicle type information;
step S40, analyzing the acquired CAN data of the electric automobile by using the called dynamic link library D LL, storing the analyzed data in a cache area, and waiting for interface calling;
step S50, polling the analyzed data stored in the cache region through the API interface, judging whether the variable name of the analyzed data is consistent with the DBC variable name, and if the variable name of the analyzed data is consistent with the DBC variable name, executing step S60; if not, go to step S70;
step S60, the updated data in the called dynamic link library D LL is taken out through variable name reflection and assigned, and then the assigned data is displayed on a UI interface;
in step S70, it is determined that the data is a history obsolete data, and the special format is displayed on the UI interface.
2. The CAN data parsing method for dynamically adapting to a plurality of electric vehicle types using a dynamic link library as claimed in claim 1, wherein in the step S10, the dynamic link library D LL of a plurality of versions of electric vehicle types is collected and stored in advance, comprising the sub-steps of:
step S11, collecting electric vehicle model DBC files of a plurality of versions;
step S12, converting the collected electric vehicle model DBC files of a plurality of versions into a C file and an h file one by one through a script;
step S13, compile the converted C file and h file into one dynamic link library D LL one by one locally, and store the compiled multiple dynamic link libraries D LL into different directories.
3. The CAN data parsing method for dynamically adapting to a plurality of electric vehicle models using a dynamic link library as claimed in claim 2, wherein the CAN transceiver is USBCAN or PACN.
CN202010202153.XA 2020-03-20 2020-03-20 CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library Pending CN111475221A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010202153.XA CN111475221A (en) 2020-03-20 2020-03-20 CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010202153.XA CN111475221A (en) 2020-03-20 2020-03-20 CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library

Publications (1)

Publication Number Publication Date
CN111475221A true CN111475221A (en) 2020-07-31

Family

ID=71748232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010202153.XA Pending CN111475221A (en) 2020-03-20 2020-03-20 CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library

Country Status (1)

Country Link
CN (1) CN111475221A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110890A (en) * 2021-04-20 2021-07-13 上海华东汽车信息技术有限公司 Dynamic link library calling method and device, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168296A (en) * 2017-06-30 2017-09-15 东南(福建)汽车工业有限公司 A kind of automotive diagnostic installation software systems
CN110069433A (en) * 2019-04-18 2019-07-30 深圳市英博超算科技有限公司 A kind of medium system being compatible with different automobile CAN communication interfaces

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107168296A (en) * 2017-06-30 2017-09-15 东南(福建)汽车工业有限公司 A kind of automotive diagnostic installation software systems
CN110069433A (en) * 2019-04-18 2019-07-30 深圳市英博超算科技有限公司 A kind of medium system being compatible with different automobile CAN communication interfaces

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘婷等: "汽车ECU自动测试***研究", 《测控技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110890A (en) * 2021-04-20 2021-07-13 上海华东汽车信息技术有限公司 Dynamic link library calling method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US8667031B2 (en) Reuse of shared metadata across applications via URL protocol
CN101917286B (en) Web performance analysis system and method for realizing cross-browser in internet application system
CN113282488B (en) Terminal test method and device, storage medium and terminal
CN110716874B (en) Domestic operating system hardware compatibility testing method
CN113360519A (en) Data processing method, device, equipment and storage medium
CN115167831A (en) Software integration method and device based on AUTOSAR and use method
CN110955674A (en) Asynchronous export method and component based on java service
CN114218906B (en) Table data formatting component realization method based on Vue
CN112729868A (en) Vehicle diagnosis method, device, equipment and medium
CN112615758A (en) Application identification method, device, equipment and storage medium
CN111475221A (en) CAN data analysis method for dynamically adapting to various electric vehicle types by using dynamic link library
CN113010359B (en) Bus test system generation method, system, device and storage medium
CN111752916B (en) Data acquisition method and device, computer readable storage medium and electronic equipment
CN112445477A (en) Vue-based component visualization system and method
CN116955154A (en) Method and device for testing application program interface
CN113986954B (en) User event acquisition method and device, intelligent terminal and readable storage medium
JP3942098B2 (en) Information processing system, information registration information processing apparatus, information search information processing apparatus, information registration information processing method, information search information processing method, program, and recording medium
US8321535B2 (en) Web services integration systems and methods
CN113722337B (en) Service data determination method, device, equipment and storage medium
CN115237425A (en) Code viewing method and device, computer equipment and storage medium
CN114547199A (en) Database increment synchronous response method and device and computer readable storage medium
CN113609195A (en) Report generation method, report generation device, electronic equipment and storage medium
JP4903279B2 (en) Operation verification apparatus, operation verification method, and operation verification program
CN111651531A (en) Data import method, device, equipment and computer storage medium
CN110532028B (en) Method for generating interface document based on eclipse

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination