CN115277882A - CAN message database establishing method and device, vehicle-mounted electronic equipment and storage medium - Google Patents

CAN message database establishing method and device, vehicle-mounted electronic equipment and storage medium Download PDF

Info

Publication number
CN115277882A
CN115277882A CN202210712372.1A CN202210712372A CN115277882A CN 115277882 A CN115277882 A CN 115277882A CN 202210712372 A CN202210712372 A CN 202210712372A CN 115277882 A CN115277882 A CN 115277882A
Authority
CN
China
Prior art keywords
field
mapping
message
target
database
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.)
Granted
Application number
CN202210712372.1A
Other languages
Chinese (zh)
Other versions
CN115277882B (en
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.)
Dongfeng Motor Corp
Original Assignee
Dongfeng Motor Corp
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 Dongfeng Motor Corp filed Critical Dongfeng Motor Corp
Priority to CN202210712372.1A priority Critical patent/CN115277882B/en
Publication of CN115277882A publication Critical patent/CN115277882A/en
Application granted granted Critical
Publication of CN115277882B publication Critical patent/CN115277882B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The embodiment of the invention provides a method and a device for establishing a CAN message database, vehicle-mounted electronic equipment and a storage medium. The CAN message database establishing method comprises the following steps: the method comprises the steps of obtaining a mapping field in a communication matrix which is pre-established by a vehicle, establishing a first mapping relation between the mapping field and a preset target field, and carrying out system conversion on a CAN message corresponding to the mapping field to obtain a target CAN message. And mapping the target CAN message into a target field based on the first mapping relation, and establishing a CAN message database by using the target field obtained by converting and mapping at least one mapping field in the communication matrix. The communication matrix comprises at least one mapping field, and each mapping field corresponds to a respective CAN message, so that the CAN message database CAN be applied to CAN analysis of the vehicle, the working efficiency of CAN message analysis of the vehicle is improved, and the error probability of CAN analysis based on the communication matrix is reduced.

Description

CAN message database establishing method and device, vehicle-mounted electronic equipment and storage medium
Technical Field
The invention relates to the technical field of vehicle data acquisition, in particular to a method and a device for establishing a CAN message database, vehicle-mounted electronic equipment and a storage medium.
Background
Sky test and control system software is a set of integrated debugging and development software for data acquisition, analysis, display and storage, and CAN also realize integrated debugging and development work of data acquisition, analysis, display and storage such as real vehicle debugging and the like, and follows a CAN (Controller Area Network) Network communication protocol.
The software stores specific CAN messages and signal data in an ACCESS database, the CAN messages and signals of different vehicle types have differences, and the CAN messages and signals of one vehicle type correspond to a specific ACCESS database file. The ACCESS database file is an indispensable file for debugging, data acquisition, analysis, display and storage of the whole vehicle by using the software.
The messages and signals of the whole vehicle controller of a complete vehicle type are at least hundreds, and meanwhile, one signal relates to more than twenty signal attribute signals, so that database information corresponding to the complete messages and signals of the vehicle type is established, the current ACCESS database is manually established by engineers, and therefore the method is a very large project, and meanwhile, the establishing process is easy to make mistakes.
Disclosure of Invention
The embodiment of the invention provides a method and a device for establishing a CAN message database, vehicle-mounted electronic equipment and a storage medium, thereby reducing the complexity and the error rate of the process of establishing the CAN analysis database for a vehicle.
In a first aspect, the present invention provides a method for establishing a CAN packet database according to an embodiment of the present invention, including: acquiring mapping fields in a communication matrix pre-established by a vehicle, wherein the communication matrix is established based on the configuration of the vehicle, the communication matrix comprises at least one mapping field, and each mapping field corresponds to a respective CAN message; establishing a first mapping relation between the mapping field and a preset target field; carrying out scale conversion on the CAN message corresponding to the mapping field to obtain a target CAN message, and mapping the target CAN message into the target field based on the first mapping relation; and establishing the CAN message database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix, wherein the CAN message database is applied to CAN analysis of vehicles.
Preferably, the communication matrix is established based on a configuration of the vehicle, including: and acquiring communication signals among the parts of the vehicle, the electronic appliance wiring harness, the electronic appliance network architecture and the vehicle control unit to establish the communication matrix.
Preferably, the performing a binary conversion on the CAN packet corresponding to the mapping field to obtain a target CAN packet includes: determining a target system according to the mapping field, wherein the target system is decimal or binary; and converting the system of the CAN message corresponding to the mapping field into the target system to obtain the target CAN message.
Preferably, mapping the target CAN packet into the target field based on the first mapping relationship includes: disassembling the first CAN message corresponding to the minimum field in the mapping field by using a disassembling function, and deleting the head null character and the tail null character of the disassembled first CAN message by using a deleting function to obtain a first CAN message field; the second CAN message corresponding to the maximum field in the mapping field is disassembled by utilizing the disassembling function, deleting the head null character and the tail null character of the disassembled second CAN message by using the deletion function to obtain a second CAN message field; and assigning the first CAN message field to a minimum value parameter field in the target field, and assigning the second CAN message field to a maximum value parameter field in the target field.
Preferably, the method further comprises: and establishing a second mapping relation between the equipment field in the target field and a plurality of target CAN messages, and storing the second mapping relation.
Preferably, the establishing the CAN packet database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix includes: creating a bat file by using a Command Command; creating a CAN protocol database and a device list database by operating the bat file; and importing a target field comprising the target CAN message into the CAN protocol database and the equipment list database to obtain the CAN message database.
In a second aspect, an embodiment of the present invention provides a device for establishing a CAN packet database, including:
the communication matrix creating unit is used for acquiring mapping fields in a communication matrix pre-established by a vehicle, the communication matrix is established based on the configuration of the vehicle, the communication matrix comprises at least one mapping field, and each mapping field corresponds to a respective CAN message;
the field mapping unit is used for establishing a first mapping relation between the mapping field and a preset target field;
the CAN message conversion unit is used for carrying out scale conversion on the CAN message corresponding to the mapping field to obtain a target CAN message and mapping the target CAN message into the target field based on the first mapping relation;
and the database creating unit is used for creating the CAN message database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix, and the CAN message database is applied to CAN analysis of vehicles.
Preferably, the field mapping unit is further configured to: and establishing a second mapping relation between the equipment field in the target field and a plurality of target CAN messages, and storing the second mapping relation.
In a third aspect, the present invention provides a vehicle-mounted electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements any one of the implementation manners of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements any of the embodiments of the first aspect.
One or more technical schemes provided in the embodiments of the present invention have at least the following technical effects or advantages:
firstly, mapping fields in a communication matrix pre-established by a vehicle are obtained, the communication matrix is established based on the configuration of the vehicle, the communication matrix comprises at least one mapping field, and each mapping field corresponds to a respective CAN message. And then, establishing a first mapping relation between the mapping field and a preset target field, carrying out scale conversion on the CAN message corresponding to the mapping field to obtain a target CAN message, and mapping the target CAN message into the target field based on the first mapping relation. And finally, a CAN message database is established by utilizing a target field obtained by converting and mapping at least one mapping field in the communication matrix, and the CAN message database CAN be applied to CAN analysis of the vehicle, so that the working efficiency of the CAN message analysis of the vehicle is improved, and the error probability of the CAN analysis based on the communication matrix is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flow chart of a method for establishing a CAN message database in the embodiment of the invention;
FIG. 2 is a schematic diagram of a structure of a CAN message database establishing device in the embodiment of the present invention;
FIG. 3 is a schematic diagram of a vehicle-mounted electronic device according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a structure of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a CAN message database establishing method and device, vehicle-mounted electronic equipment and a storage medium, thereby reducing the complexity and error rate of the process of establishing the CAN message database for the vehicle.
In order to solve the technical problems, the embodiment of the invention provides the following general ideas:
the method comprises the steps of obtaining mapping fields in a communication matrix which is established in advance by a vehicle, wherein the communication matrix is established based on the configuration of the vehicle and comprises at least one mapping field, and each mapping field corresponds to a respective CAN message. And then, establishing a first mapping relation between the mapping field and a preset target field, carrying out scale conversion on the CAN message corresponding to the mapping field to obtain a target CAN message, and mapping the target CAN message into the target field based on the first mapping relation. And finally, establishing a CAN message database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or otherwise described herein.
In a first aspect, the present invention provides a method for establishing a CAN packet database, which CAN automatically establish a CAN packet database for CAN parsing, as shown in fig. 1, where the method may include the following steps S101 to S104:
step S101: the method comprises the steps of obtaining mapping fields in a communication matrix which is established in advance by a vehicle, wherein the communication matrix is established based on the configuration of the vehicle and comprises at least one mapping field, and each mapping field corresponds to a respective CAN message.
Specifically, communication signals among parts of the vehicle, the electronic appliance wiring harness, the electronic appliance network architecture and the vehicle control unit can be collected to establish a communication matrix.
In a specific implementation process, the communication matrix may include a vehicle part communication sub-matrix, an electronic appliance wiring harness communication sub-matrix, an electronic appliance network architecture communication sub-matrix, and a vehicle control unit communication sub-matrix. The vehicle part communication sub-matrix comprises part communication signals, the electronic appliance wiring harness communication sub-matrix comprises electronic appliance wiring harness communication signals, the electronic appliance network architecture communication sub-matrix comprises electronic appliance network architecture communication signals, and the vehicle controller communication sub-matrix comprises vehicle controller communication signals.
It should be noted that the communication signals in the communication matrix may be manually input by a corresponding engineer, or may be directly read by the vehicle controller.
For example, the communication matrix may include one mapping field or may include a plurality of mapping fields. For example, the mapping field may include: msg ID (hex), msg Cycle Time (ms), signal Name, signal Description, byte Order, signal Length, start Bit Position, resolution, offset, signal Unit, min-Max (hex), msg Name. The Msg Name is the CAN message Name.
Step S102: and establishing a first mapping relation between the mapping field and a preset target field.
In particular, the number of target fields may be less than or equal to the number of mapping fields. The first mapping relation CAN be established according to the actual situation of CAN analysis, the same first mapping relation exists in the same communication matrix, and the unique first mapping relation exists between the mapping field and the preset target field.
For example, the target field may include: var _ Name, period, CAN _ ID, bsEND, start _ bit, bit _ length, offset, bit resolution, unit, max _ Value, min _ Value, comment, and device.
It should be noted that the Msg Name mapping fields may include a plurality of Msg Name mapping fields, the device target field may also include a device target field, and one device target field may be mapped with a plurality of Msg Name mapping fields.
In one embodiment, the first mapping relationship may be shown with reference to the following mapping relationship:
establishing mapping between the Msg ID (hex) and the CAN _ ID; establishing a mapping between the Msg Cycle Time (ms) and Period; establishing mapping between the Signal Name and var _ Name; establishing mapping between the Signal Description and the Comment; establishing mapping between the Byte Order and the bsEND; establishing mapping between the Signal Length and the bit _ Length; establishing mapping between the Start Bit Position and the Start _ Bit; establishing mapping between Resolution and bitresolution; mapping is established between Offset and Offset; establishing mapping between the Signal Unit and the Unit; min (hex) and Min _ Value establish mapping; max (hex) maps with Max _ Value.
Step S103: and carrying out scale conversion on the CAN message corresponding to the mapping field to obtain a target CAN message, and mapping the target CAN message into the target field based on the first mapping relation.
Specifically, a target binary system is determined according to the mapping field, and the binary system of the CAN message corresponding to the mapping field is converted into the target binary system to obtain the target CAN message.
For example, if the mapping field is Msg ID (hex), the target CAN may be decimal, and it is necessary to convert the hexadecimal CAN packet in Msg ID (hex) into a decimal target CAN packet.
If the mapping field is Byte Order, the target bin may be binary, corresponding to: if (Motorola) then 0; if (Intel) the 1.
Specifically, how to map the target CAN packet into the target field based on the first mapping relationship may include: disassembling the first CAN message corresponding to the minimum field in the mapping fields by utilizing a disassembling function, and deleting the head null character and the tail null character of the disassembled first CAN message by utilizing a deleting function to obtain a first CAN message field; disassembling a second CAN message corresponding to the largest field in the mapping fields by utilizing a disassembling function, and deleting head null characters and tail null characters of the disassembled second CAN message by utilizing a deleting function to obtain a second CAN message field; and assigning the first CAN message field to a minimum value parameter field in the target field, and assigning the second CAN message field to a maximum value parameter field in the target field.
For example, a first CAN message corresponding to Min () in the mapping field may be disassembled by using a split () function, and a head null character and a tail null character of the disassembled first CAN message may be deleted by using a trim () function, so as to obtain a first CAN message field. And disassembling the second CAN message corresponding to Max () in the mapping field by using a split () function, and deleting the head null character and the tail null character of the disassembled second CAN message by using a trim () function to obtain a second CAN message field. And then, assigning the first CAN message field to a minimum Value parameter field (min _ Value) in the target field, and assigning the second CAN message field to a maximum Value parameter field (max _ Value) in the target field.
In order to prevent the communication matrix from having mapping fields for which the first mapping relationship is not established, as an alternative embodiment, before performing step S104, it may be detected whether all mapping fields in the communication matrix are all imported into the destination field, and if mapping fields for which mapping is not completed exist, the step of converting mapping fields for which mapping is not completed is executed again until all mapping fields in the communication matrix are converted.
In addition, the data field type of the CAN message corresponding to the mapping field in the communication matrix CAN be checked; if the CAN message data type of a certain mapping field is an unsigned data type, converting the CAN message into a target CAN message of 0; and if the CAN message data type of a certain mapping field is a signed data type, converting the CAN message into a target CAN message of 1.
Step S104: and establishing a CAN message database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix, wherein the CAN message database is applied to CAN analysis of the vehicle.
Specifically, a bat file may be created by using a Command, a CAN protocol database and an equipment list database may be created by running the bat file, and a target field including a target CAN packet may be introduced into the CAN protocol database and the equipment list database to obtain the CAN packet database.
In the specific implementation process, var _ Name, period, CAN _ ID, bsEND, start _ bit, bit _ length, offset, bit resolution, unit, max _ Value, min _ Value, and Comment target fields CAN be imported into a CAN protocol database; and importing the device target field into a device list database.
As an optional implementation manner, a second mapping relationship may be established between a device field (device) in the target field and the plurality of target CAN messages, and the second mapping relationship is stored.
Specifically, one device target field may include a plurality of CAN messages, a plurality of signals of one CAN message belong to the CAN protocol database, and the second mapping relationship may be stored in the CAN message database.
At present, people have higher and higher functional requirements on electronic control equipment of a pure electric vehicle, the electronic control equipment is uniformly controlled by a vehicle control unit, and the vehicle control unit follows a CAN network communication protocol. The CAN messages of the whole vehicle controller comprise hundreds, each CAN message comprises 20 attribute fields, and if a database is manually established, the workload is large, the working efficiency is low, errors are easy to occur, and the error correction is difficult. The CAN message database establishing method provided by the embodiment of the invention CAN automatically establish the CAN message database required by analysis, effectively improve the efficiency of establishing the database, and is not easy to make mistakes and has no error correction step.
In a specific implementation process, a code capable of executing the method for establishing the CAN message database provided by the embodiment of the invention CAN be written by means of a Visual Studio C # programming tool, and the communication matrix CAN be converted into the CAN message database by running the code. The communication matrix may be in a spreadsheet format, such as the EXCEL format. The CAN message database may be a database in ACCESS software format.
In a second aspect, the present invention provides a device for establishing a CAN message database according to an embodiment of the present invention, please refer to fig. 2, where the device may include:
the communication matrix creating unit 201 is configured to obtain mapping fields in a communication matrix pre-established by the vehicle, where the communication matrix is established based on configuration of the vehicle, and the communication matrix includes at least one mapping field, and each mapping field corresponds to a respective CAN message.
The field mapping unit 202 is configured to establish a first mapping relationship between the mapped field and a preset target field.
The CAN message conversion unit 203 is configured to perform binary conversion on the CAN message corresponding to the mapping field to obtain a target CAN message, and map the target CAN message into the target field based on the first mapping relationship.
And the database creating unit 204 is configured to create a CAN message database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix, where the CAN message database is applied to CAN analysis of the vehicle.
As an optional implementation manner, the communication matrix establishing unit 201 is specifically configured to: and acquiring communication signals among parts of the vehicle, the electronic appliance wiring harness, the electronic appliance network architecture and the vehicle control unit to establish a communication matrix.
As an optional implementation manner, the CAN message conversion unit 203 includes:
a binary system conversion subunit, configured to determine a target binary system according to the mapping field, where the target binary system is a decimal system or a binary system; converting the system of the CAN message corresponding to the mapping field into a target system to obtain a target CAN message;
the assignment subunit is used for utilizing a disassembly function to disassemble the first CAN message corresponding to the minimum field in the mapping field, and utilizing a deletion function to delete the head null character and the tail null character of the disassembled first CAN message to obtain a first CAN message field; disassembling a second CAN message corresponding to the largest field in the mapping fields by utilizing a disassembling function, and deleting head null characters and tail null characters of the disassembled second CAN message by utilizing a deleting function to obtain a second CAN message field; and assigning the first CAN message field to the minimum value parameter field in the target field, and assigning the second CAN message field to the maximum value parameter field in the target field.
As an optional implementation manner, the field mapping unit 202 may further be configured to: and establishing a second mapping relation between the equipment field in the target field and the plurality of target CAN messages, and storing the second mapping relation.
As an optional implementation manner, the database creating unit 204 is specifically configured to:
creating a bat file by using a Command Command; creating a CAN protocol database and an equipment list database by operating a bat file; and importing a target field comprising a target CAN message into the CAN protocol database and the equipment list database to obtain a CAN message database.
Since the CAN message database establishing apparatus described in this embodiment is an electronic device used for implementing the method for establishing a CAN message database in the embodiment of the present invention, based on the method for establishing a CAN message database described in the embodiment of the present invention, a person skilled in the art CAN understand the specific implementation manner and various variations of the electronic device in this embodiment, and therefore, how to implement the method in the embodiment of the present invention by the electronic device is not described in detail here. As long as those skilled in the art implement the electronic device used in the method for establishing the CAN message database in the embodiment of the present invention, the electronic device is within the scope of the present invention.
In a third aspect, based on the same inventive concept, an embodiment of the present invention provides a vehicle-mounted electronic device, and referring to fig. 3, the vehicle-mounted electronic device provided in the embodiment of the present invention includes: a memory 301, a processor 302, and code stored on the memory and executable on the processor 302, the processor 302 implementing any one of the embodiments of the foregoing CAN message database establishment method when executing the code.
Where in fig. 3 a bus architecture (represented by bus 300), bus 300 may include any number of interconnected buses and bridges, bus 300 linking together various circuits including one or more processors, represented by processor 302, and memory, represented by memory 301. The bus 300 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 305 provides an interface between the bus 300 and the receiver 303 and transmitter 304. The receiver 303 and the transmitter 304 may be the same element, i.e. a transceiver, providing a unit for communicating with various other apparatus over a transmission medium. The processor 302 is responsible for managing the bus 300 and general processing, while the memory 301 may be used for storing data used by the processor 302 in performing operations.
In a fourth aspect, as shown in fig. 4, based on the same inventive concept, the present invention provides a computer-readable storage medium 400, in which a computer program 401 is stored, and when the computer program 401 is executed by a processor, the computer program 401 implements any implementation manner of the foregoing CAN message database establishment method.
The technical scheme in the embodiment of the invention at least has the following technical effects or advantages:
and establishing a first mapping relation between the mapping field and a preset target field, and carrying out system conversion on the CAN message corresponding to the mapping field to obtain the target CAN message. And then based on the first mapping relation, mapping the target CAN message into a target field, and establishing a CAN message database by using the target field obtained by converting and mapping at least one mapping field in the communication matrix, wherein the CAN message database CAN be applied to CAN analysis of the vehicle, so that the working efficiency of CAN message analysis of the vehicle is improved, and the error probability of CAN analysis based on the communication matrix is reduced.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer instructions. These computer instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such 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 such modifications and variations.

Claims (10)

1. A CAN message database establishing method is characterized by comprising the following steps:
acquiring mapping fields in a communication matrix pre-established by a vehicle, wherein the communication matrix is established based on the configuration of the vehicle, the communication matrix comprises at least one mapping field, and each mapping field corresponds to a respective CAN message;
establishing a first mapping relation between the mapping field and a preset target field;
carrying out scale conversion on the CAN message corresponding to the mapping field to obtain a target CAN message, and mapping the target CAN message into the target field based on the first mapping relation;
and establishing the CAN message database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix, wherein the CAN message database is applied to CAN analysis of vehicles.
2. The method of claim 1, wherein the communication matrix is established based on a configuration of the vehicle, comprising:
and acquiring communication signals among the parts of the vehicle, the electronic appliance wiring harness, the electronic appliance network architecture and the vehicle control unit to establish the communication matrix.
3. The method according to claim 1, wherein said performing a binary conversion on the CAN packet corresponding to the mapping field to obtain a target CAN packet comprises:
determining a target system according to the mapping field, wherein the target system is decimal or binary;
and converting the system of the CAN message corresponding to the mapping field into the target system to obtain the target CAN message.
4. The method of claim 1, wherein said mapping the target CAN packet into the target field based on the first mapping relationship comprises:
disassembling a first CAN message corresponding to the minimum field in the mapping fields by using a disassembling function, and deleting head null characters and tail null characters of the disassembled first CAN message by using a deleting function to obtain a first CAN message field;
disassembling a second CAN message corresponding to the maximum field in the mapping field by using the disassembling function, and deleting the head null character and the tail null character of the disassembled second CAN message by using the deleting function to obtain a second CAN message field;
and assigning the first CAN message field to a minimum value parameter field in the target field, and assigning the second CAN message field to a maximum value parameter field in the target field.
5. The method of claim 1, further comprising:
and establishing a second mapping relation between the equipment field in the target field and a plurality of target CAN messages, and storing the second mapping relation.
6. The method of claim 1, wherein said building the CAN message database using the target field converted and mapped by at least one of the mapping fields in the communication matrix comprises:
creating a bat file by using a Command Command;
creating a CAN protocol database and an equipment list database by operating the bat file;
and importing a target field comprising the target CAN message into the CAN protocol database and the equipment list database to obtain the CAN message database.
7. A CAN message database establishing device is characterized by comprising:
the communication matrix creating unit is used for acquiring mapping fields in a communication matrix pre-established by a vehicle, the communication matrix is established based on the configuration of the vehicle, the communication matrix comprises at least one mapping field, and each mapping field corresponds to a respective CAN message;
the field mapping unit is used for establishing a first mapping relation between the mapping field and a preset target field;
the CAN message conversion unit is used for carrying out scale conversion on the CAN message corresponding to the mapping field to obtain a target CAN message and mapping the target CAN message into the target field based on the first mapping relation;
and the database creating unit is used for creating the CAN message database by using a target field obtained by converting and mapping at least one mapping field in the communication matrix, and the CAN message database is applied to CAN analysis of vehicles.
8. The apparatus of claim 7, wherein the field mapping unit is further configured to:
and establishing a second mapping relation between the equipment field in the target field and a plurality of target CAN messages, and storing the second mapping relation.
9. An in-vehicle electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1-6 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 6.
CN202210712372.1A 2022-06-22 2022-06-22 CAN message database establishment method and device, vehicle-mounted electronic equipment and storage medium Active CN115277882B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210712372.1A CN115277882B (en) 2022-06-22 2022-06-22 CAN message database establishment method and device, vehicle-mounted electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210712372.1A CN115277882B (en) 2022-06-22 2022-06-22 CAN message database establishment method and device, vehicle-mounted electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115277882A true CN115277882A (en) 2022-11-01
CN115277882B CN115277882B (en) 2023-08-29

Family

ID=83761979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210712372.1A Active CN115277882B (en) 2022-06-22 2022-06-22 CAN message database establishment method and device, vehicle-mounted electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115277882B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745330A (en) * 2022-04-08 2022-07-12 北京航天发射技术研究所 Data processing method and device
CN116847004A (en) * 2023-08-30 2023-10-03 江铃汽车股份有限公司 Analysis method, system and computer equipment for automobile CAN signals

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660437A (en) * 2018-12-26 2019-04-19 洛阳智能农业装备研究院有限公司 A kind of CAN message analytic method based on Matlab
CN110336795A (en) * 2019-06-12 2019-10-15 浙江吉利控股集团有限公司 A kind of vehicle data distribution method, device and electronic equipment
US20200106826A1 (en) * 2018-10-02 2020-04-02 Hyundai Motor Company Controlling can communication in a vehicle using shifting can message reference
CN111108725A (en) * 2017-09-22 2020-05-05 大众汽车有限公司 Method for monitoring communication on a communication bus and electronic device for connection to a communication bus
DE102018221961A1 (en) * 2018-12-17 2020-06-18 Robert Bosch Gmbh Subscriber station for a serial bus system and method for communication in a serial bus system
CN111917692A (en) * 2019-05-10 2020-11-10 北京车和家信息技术有限公司 Fuzzy test method, device, equipment and computer readable storage medium
CN112995172A (en) * 2021-02-24 2021-06-18 合肥优尔电子科技有限公司 Communication method and communication system for butt joint between Internet of things equipment and Internet of things platform
CN113438211A (en) * 2021-06-07 2021-09-24 杭州鸿泉物联网技术股份有限公司 DBC format analysis and message analysis method, device, electronic equipment and medium
CN114282519A (en) * 2021-12-13 2022-04-05 经纬恒润(天津)研究开发有限公司 CAN data analysis method and device
CN114338129A (en) * 2021-12-24 2022-04-12 中汽创智科技有限公司 Message anomaly detection method, device, equipment and medium
CN114500690A (en) * 2022-02-15 2022-05-13 平安科技(深圳)有限公司 Interface data processing method and device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111108725A (en) * 2017-09-22 2020-05-05 大众汽车有限公司 Method for monitoring communication on a communication bus and electronic device for connection to a communication bus
US20200106826A1 (en) * 2018-10-02 2020-04-02 Hyundai Motor Company Controlling can communication in a vehicle using shifting can message reference
DE102018221961A1 (en) * 2018-12-17 2020-06-18 Robert Bosch Gmbh Subscriber station for a serial bus system and method for communication in a serial bus system
CN109660437A (en) * 2018-12-26 2019-04-19 洛阳智能农业装备研究院有限公司 A kind of CAN message analytic method based on Matlab
CN111917692A (en) * 2019-05-10 2020-11-10 北京车和家信息技术有限公司 Fuzzy test method, device, equipment and computer readable storage medium
CN110336795A (en) * 2019-06-12 2019-10-15 浙江吉利控股集团有限公司 A kind of vehicle data distribution method, device and electronic equipment
CN112995172A (en) * 2021-02-24 2021-06-18 合肥优尔电子科技有限公司 Communication method and communication system for butt joint between Internet of things equipment and Internet of things platform
CN113438211A (en) * 2021-06-07 2021-09-24 杭州鸿泉物联网技术股份有限公司 DBC format analysis and message analysis method, device, electronic equipment and medium
CN114282519A (en) * 2021-12-13 2022-04-05 经纬恒润(天津)研究开发有限公司 CAN data analysis method and device
CN114338129A (en) * 2021-12-24 2022-04-12 中汽创智科技有限公司 Message anomaly detection method, device, equipment and medium
CN114500690A (en) * 2022-02-15 2022-05-13 平安科技(深圳)有限公司 Interface data processing method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745330A (en) * 2022-04-08 2022-07-12 北京航天发射技术研究所 Data processing method and device
CN114745330B (en) * 2022-04-08 2024-01-16 北京航天发射技术研究所 Data processing method and device
CN116847004A (en) * 2023-08-30 2023-10-03 江铃汽车股份有限公司 Analysis method, system and computer equipment for automobile CAN signals
CN116847004B (en) * 2023-08-30 2023-11-17 江铃汽车股份有限公司 Analysis method, system and computer equipment for automobile CAN signals

Also Published As

Publication number Publication date
CN115277882B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
CN115277882B (en) CAN message database establishment method and device, vehicle-mounted electronic equipment and storage medium
CN112799321B (en) DBC file rapid creating method following CAN bus communication protocol
CN108683636B (en) Charging pile communication method and system
CN108319549B (en) Test system and test method
CN110290166B (en) Cross-cluster data interaction method, system and device and readable storage medium
US11262733B2 (en) Method, device, and computer program for configuring an intelligent electronic device
WO2023103248A1 (en) Automatic device commissioning method, apparatus, device, system, and storage medium
CN107247827B (en) Virtual terminal model modeling and automatic wiring method based on machine learning
CN114647519A (en) Data transmission method and device between native platform and Flutter platform and storage medium
CN111291443B (en) Automatic generation method, device and equipment for I/O module model of vehicle control unit software
CN114201346A (en) HIL (hardware-in-the-loop) testing method and device of CAN (controller area network) communication interface and electronic equipment
CN110661873B (en) Internet of things platform parameter conversion method, device, equipment, medium and system
CN101426220A (en) Method, apparatus and system for base station cutover
CN105162645A (en) Interoperability test method based on PIIF configuration
CN115186321A (en) Traction power supply and utilization integrated simulation method and system
CN109918353B (en) Method for automatically processing information and terminal equipment
CN110765655B (en) Dispatching automation simulation system and construction method and device of SCADA model thereof
CN117421872A (en) SYSML modeling-based system simulation system and method for automatically generating semi-physical test cases
CN113096269B (en) Information acquisition method and device, electronic equipment and storage medium
CN112702247B (en) Hybrid control method and device for FF field bus system and storage medium
CN110943880B (en) Equipment management method and device
CN112395460A (en) Vehicle configuration file generation method and device, configuration method and system
CN117474306A (en) Production flow control method and device, electronic equipment and readable storage medium
CN116614325A (en) Method and system for vehicle LIN node scheduling configuration and vehicle
Chang et al. CAN calibration system design and transfer mechanism optimization

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
GR01 Patent grant
GR01 Patent grant