CN118611826A - CAN message verification method, device, equipment, medium and program product - Google Patents

CAN message verification method, device, equipment, medium and program product Download PDF

Info

Publication number
CN118611826A
CN118611826A CN202410753260.XA CN202410753260A CN118611826A CN 118611826 A CN118611826 A CN 118611826A CN 202410753260 A CN202410753260 A CN 202410753260A CN 118611826 A CN118611826 A CN 118611826A
Authority
CN
China
Prior art keywords
message
checked
configuration file
verification
determining
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
CN202410753260.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.)
FAW Group Corp
Original Assignee
FAW Group 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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN202410753260.XA priority Critical patent/CN118611826A/en
Publication of CN118611826A publication Critical patent/CN118611826A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The technical scheme of the embodiment of the invention comprises the following steps: determining a project number of a target project to be detected and a corresponding CAN communication message table; determining a corresponding DBC file according to the item number, and determining at least one CAN message to be checked from the CAN communication message table according to the DBC file; and checking each CAN message to be checked based on a preset configuration file library, wherein the configuration file library comprises at least one configuration file, and each configuration file corresponds to a CRC check algorithm and at least one characteristic parameter of the CRC check algorithm. The invention CAN automatically obtain the result of message checking detection by providing the researched and developed project number and CAN communication message, CAN omit the step of configuring CRC checking characteristic parameters, automatically extract the CAN message to be checked in the message table, realize automatic CAN message checking, reduce manual operation, save time cost, reduce error rate and improve working efficiency.

Description

CAN message verification method, device, equipment, medium and program product
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for verifying a CAN packet.
Background
CAN communication is a communication protocol commonly used in automobiles, and in order to ensure the accuracy of message transmission, messages are checked when the messages are transmitted, and the messages are checked and detected when the messages are received. In research and development engineering, to ensure the integrity and accuracy of data in the transmission process, it is often necessary to determine whether a message adopts a certain preset verification algorithm.
The CAN report Wen Jiaoyan of the automobile is usually subjected to CRC (cyclic redundancy check), different CRC checks require different characteristic parameters to be configured, and the method for generating the data to be checked is also different. At present, the means generally adopted in the process of checking and detecting the messages are to check the manual operation of a single message, the manual operation flow is longer, the time cost is relatively higher, and the accuracy cannot be ensured.
Based on the defects of the prior art, a CAN message verification method is needed to improve the efficiency and accuracy of CAN message verification.
Disclosure of Invention
The invention provides a CAN message verification method, a device, equipment, a medium and a program product, so as to improve the efficiency and accuracy of CAN message verification.
According to an aspect of the present invention, there is provided a CAN packet verification method, including:
determining a project number of a target project to be detected and a corresponding CAN communication message table;
Determining a corresponding DBC file according to the item number, and determining at least one CAN message to be checked from the CAN communication message table according to the DBC file;
And checking each CAN message to be checked based on a preset configuration file library, wherein the configuration file library comprises at least one configuration file, and each configuration file corresponds to a CRC check algorithm and at least one characteristic parameter of the CRC check algorithm.
Optionally, the determining at least one CAN message to be checked from the CAN communication message table according to the DBC file includes:
Determining a message ID (identity) included in the DBC file, wherein each message ID corresponds to at least one CAN message;
and determining whether each message ID comprises a verification identifier which characterizes the need to be verified, if so, taking the CAN message corresponding to the message ID comprising the verification identifier as the CAN message to be verified.
Optionally, the verifying each CAN message to be verified based on a preset configuration file library includes:
Determining the CAN message to be checked with a corresponding first configuration file according to the item number and the message ID of each CAN message to be checked, wherein each configuration file corresponds to at least one item and at least one message ID under the item, and represents a preset checking algorithm when the CAN message is checked by the message ID under the item;
And checking the corresponding CAN message to be checked according to the first configuration file.
Optionally, the method further comprises:
And for the CAN message to be checked, which does not have the corresponding first configuration file, the checking result is that the CAN message to be checked does not pass.
Optionally, the verifying, according to the first configuration file, each CAN message to be verified includes:
executing, for each to-be-checked CAN message:
Determining the first configuration file corresponding to the CAN message to be checked currently;
calculating a first verification calculated value of the current CAN message to be verified through a verification algorithm corresponding to the first configuration file;
and determining whether the first check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, determining that the check result of the current CAN message to be checked is passed.
Optionally, the method further comprises:
Determining whether the check calculated value is the same as the value of the message check bit of the CAN message to be checked currently, if not, switching other unused second configuration files in the configuration file library;
calculating a second check calculation value of the current CAN message to be checked through a check algorithm corresponding to the second configuration file;
Determining whether the second check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, the check result of the current CAN message to be checked is passed; if not, switching other unused third configuration files in the configuration file library to perform verification calculation until the verification calculation value is the same as the value of the message verification bit of the current CAN message to be verified, and the verification result of the current CAN message to be verified is passed;
If the verification calculated values obtained by calculating all the configuration files in the configuration file library are different from the value of the message verification bit of the current CAN message to be verified, the verification result of the current CAN message to be verified is not passed.
Optionally, the method further comprises:
Extracting information corresponding to the attribute from the verification result of each CAN message to be verified according to at least one attribute included in a preset recording template, wherein the attribute comprises a project number, a message ID, the CAN message and the verification result;
And filling each CAN message to be checked and the information corresponding to the attribute into the file template to obtain the checking detection record of the target item.
According to another aspect of the present invention, there is provided a CAN packet inspection apparatus, including:
the first determining unit is used for determining the item number of the target item to be detected and the corresponding CAN communication message table;
The second determining unit is used for determining a corresponding DBC file according to the project number, and determining at least one CAN message to be checked from the CAN communication message table according to the DBC file;
The processing unit is used for checking each CAN message to be checked based on a preset configuration file library, wherein the configuration file library comprises at least one configuration file, and each configuration file corresponds to one CRC check algorithm and at least one characteristic parameter of the CRC check algorithm.
According to another aspect of the present invention, there is provided an electronic apparatus including:
At least one processor; and a memory communicatively coupled to the at least one processor; the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor CAN execute the CAN message verification method according to any embodiment of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the CAN message verification method according to any one of the embodiments of the present invention when executed.
According to the technical scheme, the project number of the target project to be detected and the corresponding CAN communication message list are determined; determining a corresponding DBC file according to the item number, and determining at least one CAN message to be checked from the CAN communication message table according to the DBC file; and checking each CAN message to be checked based on a preset configuration file library, wherein the configuration file library comprises at least one configuration file, and each configuration file corresponds to a CRC check algorithm and at least one characteristic parameter of the CRC check algorithm. According to the scheme provided by the embodiment of the invention, the result of message checking and detecting CAN be automatically obtained by providing the researched and developed project number and CAN communication message, the step of configuring CRC characteristic parameters CAN be omitted, the CAN message to be checked and detected in the message table is automatically extracted, the automatic CAN message checking is realized, the manual operation is reduced, the time cost is saved, the error rate is reduced, and the working efficiency is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for checking CAN messages according to a first embodiment of the invention;
FIG. 2 is a schematic diagram illustrating an implementation of a CAN message check method according to an embodiment of the invention;
Fig. 3 is a schematic structural diagram of a CAN message checking device according to a second embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an electronic device implementing a method for verifying a CAN packet according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a CAN message verification method provided in an embodiment of the present invention, where the embodiment may be suitable for a case of verifying a CAN communication message in automobile development, the method may be performed by a CAN message verification device, the CAN message verification device may be implemented in a form of hardware and/or software, and the CAN message verification device may be configured in an electronic device. As shown in fig. 1, the method includes:
S110, determining the item number of the target item to be detected and a corresponding CAN communication message table.
The target item may be a research and development item in a heuristic research and development process, and the item number is a unique identifier of the target item. The CAN communication message table is a set of a plurality of CAN messages, such as a plurality of CAN messages generated in the research and development process of a target project. For example, the CAN communication message may be read by CANape and a message table may be generated.
S120, determining a corresponding DBC file according to the project number, and determining at least one CAN message to be checked from the CAN communication message table according to the DBC file.
The DBC file is a database file specially used for describing the CAN bus communication protocol, and is an XML format file used for defining the CAN bus communication protocol in the CAN bus diagnostic tool. The DBC file contains information such as signals, message IDs, data lengths, periods and the like of CAN communication, and CAN help developers develop, test, diagnose and analyze CAN communication protocols. DBC files are typically written by CAN bus diagnostic tool vendors or developers and CAN be imported and exported by the CAN bus diagnostic tool.
The DBC file corresponding to the project number is a set of CAN bus data definition files corresponding to the target project, the information identity (MESSAGE ID) of the CAN message CAN be extracted through the DBC file, and the message to be checked and detected in the CAN communication message table CAN be extracted through the information identity.
In the embodiment of the invention, determining at least one CAN message to be checked from the CAN communication message table according to the DBC file comprises the following steps:
Determining a message ID (identity) included in the DBC file, wherein each message ID corresponds to at least one CAN message;
and determining whether each message ID comprises a verification identifier which characterizes the need to be verified, if so, taking the CAN message corresponding to the message ID comprising the verification identifier as the CAN message to be verified.
Specifically, the DBC file includes a plurality of message IDs, each message ID corresponds to at least one CAN message, when verification is performed, some CAN messages need to be verified, and some CAN messages do not need to be verified, in general, CAN messages needing to be verified are usually determined in the DBC file by including a specific verification identifier, that is, CAN messages including the verification identifier are CAN messages needing to be verified. By the method, the number of CAN message verification CAN be reduced, verification processing of all CAN messages is not needed, and verification efficiency is further improved.
S130, checking each CAN message to be checked based on a preset configuration file library, wherein the configuration file library comprises at least one configuration file, and each configuration file corresponds to a CRC check algorithm and at least one characteristic parameter of the CRC check algorithm.
Cyclic redundancy check (CRC, cyclic Redundancy Check) is an algorithm for detecting errors that may occur during data transmission or storage, and is mainly used to detect or check errors that may occur after data transmission or storage. CRC uses the principle of division and remainder to realize the function of error detection, and has the advantages of clear principle, simple realization and the like.
The configuration file library is a set of configuration files and comprises a plurality of CRC (cyclic redundancy check) algorithms and characteristic parameters, different configuration files correspond to different check algorithms, namely one configuration file comprises a CRC algorithm and a plurality of characteristic parameters corresponding to the CRC algorithm, and the characteristic parameters of the same CRC algorithm comprise, but are not limited to, polynomial, initial value, input inversion mark, result inversion mark, exclusive-or value and other information. And switching different configuration files, namely switching different verification algorithms to verify the CAN message.
In the embodiment of the invention, the verification of each CAN message to be verified based on the preset configuration file library comprises the following steps:
Determining the CAN message to be checked with a corresponding first configuration file according to the item number and the message ID of each CAN message to be checked, wherein each configuration file corresponds to at least one item and at least one message ID under the item, and represents a preset checking algorithm when the CAN message is checked by the message ID under the item;
And checking the corresponding CAN message to be checked according to the first configuration file.
Different projects and different message IDs correspond to different configuration algorithms, for example, a configuration algorithm corresponding to a CAN message with the A project message ID of B is a configuration algorithm 1. Therefore, for each CAN message to be checked, it is necessary to determine whether the profile library includes the corresponding first profile, and check the CAN message to be checked through the first profile.
In an embodiment of the present invention, the method may further include:
And for the CAN message to be checked, which does not have the corresponding first configuration file, the checking result is that the CAN message to be checked does not pass.
If all the configuration files in the configuration file library correspond to a certain CAN message to be checked, the CAN message to be checked cannot be checked, and the checking result of the CAN message to be checked is that the checking result is not passed.
In the embodiment of the present invention, the verifying according to each to-be-verified CAN message of the first configuration file includes:
executing, for each to-be-checked CAN message:
Determining the first configuration file corresponding to the CAN message to be checked currently;
calculating a first verification calculated value of the current CAN message to be verified through a verification algorithm corresponding to the first configuration file;
and determining whether the first check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, determining that the check result of the current CAN message to be checked is passed.
And calculating a first check calculated value of the current CAN message to be checked through a CRC (cyclic redundancy check) algorithm corresponding to the first configuration file, and if the first check calculated value is the same as a value of a check bit (the message check bit is an inherent attribute of the CAN message) of the current CAN message to be checked, determining that the check result is passed.
In an embodiment of the present invention, the method may further include:
Determining whether the check calculated value is the same as the value of the message check bit of the CAN message to be checked currently, if not, switching other unused second configuration files in the configuration file library;
calculating a second check calculation value of the current CAN message to be checked through a check algorithm corresponding to the second configuration file;
Determining whether the second check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, the check result of the current CAN message to be checked is passed; if not, switching other unused third configuration files in the configuration file library to perform verification calculation until the verification calculation value is the same as the value of the message verification bit of the current CAN message to be verified, and the verification result of the current CAN message to be verified is passed;
If the verification calculated values obtained by calculating all the configuration files in the configuration file library are different from the value of the message verification bit of the current CAN message to be verified, the verification result of the current CAN message to be verified is not passed.
Specifically, for the current CAN message to be checked, if the first check calculated value calculated by the corresponding first configuration file is different from the value of the message check bit, stopping checking and judging whether the frame message adopts other check algorithms or not, selecting other configuration files to change the check algorithm, calculating the second check calculated value again through the check algorithm, and if the second check calculated value still is different from the value of the message check bit, repeating the steps until the check calculated values obtained by the check algorithm corresponding to all the configuration files are different from the value of the message check bit, and if the check result of the current CAN message to be checked is not passed.
In an embodiment of the present invention, the method may further include: extracting information corresponding to the attribute from the verification result of each CAN message to be verified according to at least one attribute included in a preset recording template, wherein the attribute comprises a project number, a message ID, the CAN message and the verification result;
And filling each CAN message to be checked and the information corresponding to the attribute into the file template to obtain the checking detection record of the target item.
The recording templates CAN be word, excel and other text templates, the recording templates are Excel examples, the included attributes CAN be item numbers, message IDs, CAN messages and verification results, and the verification results and related information of each message to be verified are filled into the corresponding attributes to obtain verification detection records of the target item.
The following describes the invention in detail by way of a specific example:
Fig. 2 is a schematic diagram illustrating an execution of a CAN packet verification method according to an embodiment of the present invention. And inputting a project number and a CAN communication message list to perform automatic message verification and detection. The DBC file CAN be determined according to the project number, and is a database file specially used for describing the CAN bus communication protocol, the information identity (MESSAGE ID) of the CAN message CAN be extracted through the DBC file, and the message to be checked and detected in the CAN communication message table CAN be extracted through the information identity. The configuration file library is provided with a plurality of CRC check algorithms and characteristic parameters, wherein the characteristic parameters comprise information such as polynomials, initial values, input inversion marks, result inversion marks, exclusive or values and the like, and different check algorithms can be selected by switching different configuration files. Under different preset items in the code, checking algorithms of different information identities are adopted, and a preset configuration file is selected according to the item numbers and the information identities of the messages. When checking, a preset configuration file is selected, if the value of the check bit of the message is consistent with the check calculation value, the check passes, if the value of the check bit of the message is inconsistent with the check calculation value, the check algorithm used by the current message is searched by switching the configuration file until the check of all the messages is finished, and a record file of the check is output.
The invention CAN automatically obtain the result of message check detection by providing the project number and the CAN communication message developed by the automobile, CAN omit the step of configuring CRC check characteristic parameters, automatically extract the message to be checked in the message table, automatically generate the data to be checked, and CAN process a plurality of messages at one time. The automatic check and detection reduces manual operation, saves time cost, reduces error rate and improves working efficiency.
Example two
Fig. 3 is a schematic structural diagram of a CAN message checking device according to a second embodiment of the present invention.
As shown in fig. 3, the apparatus includes:
A first determining unit 310, configured to determine a project number of a target project to be detected and a corresponding CAN communication message table;
A second determining unit 320, configured to determine a corresponding DBC file according to the item number, and determine at least one CAN message to be checked from the CAN communication message table according to the DBC file;
And the processing unit 330 is configured to perform verification on each CAN message to be verified based on a preset configuration file library, where the configuration file library includes at least one configuration file, and each configuration file corresponds to a CRC algorithm and at least one feature parameter of the CRC algorithm.
Optionally, the second determining unit 320 performs, when determining at least one CAN message to be checked from the CAN communication message table according to the DBC file,:
Determining a message ID (identity) included in the DBC file, wherein each message ID corresponds to at least one CAN message;
and determining whether each message ID comprises a verification identifier which characterizes the need to be verified, if so, taking the CAN message corresponding to the message ID comprising the verification identifier as the CAN message to be verified.
Optionally, when executing verification on each CAN message to be verified based on a preset configuration file library, the processing unit 330 specifically executes:
Determining the CAN message to be checked with a corresponding first configuration file according to the item number and the message ID of each CAN message to be checked, wherein each configuration file corresponds to at least one item and at least one message ID under the item, and represents a preset checking algorithm when the CAN message is checked by the message ID under the item;
And checking the corresponding CAN message to be checked according to the first configuration file.
Optionally, the processing unit 330 is further configured to perform:
And for the CAN message to be checked, which does not have the corresponding first configuration file, the checking result is that the CAN message to be checked does not pass.
Optionally, when performing verification according to each CAN message to be verified in the first configuration file, the processing unit 330 performs:
Determining the first configuration file corresponding to the CAN message to be checked currently;
calculating a first verification calculated value of the current CAN message to be verified through a verification algorithm corresponding to the first configuration file;
and determining whether the first check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, determining that the check result of the current CAN message to be checked is passed.
Optionally, the processing unit 330 is further configured to perform:
Determining whether the check calculated value is the same as the value of the message check bit of the CAN message to be checked currently, if not, switching other unused second configuration files in the configuration file library;
calculating a second check calculation value of the current CAN message to be checked through a check algorithm corresponding to the second configuration file;
Determining whether the second check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, the check result of the current CAN message to be checked is passed; if not, switching other unused third configuration files in the configuration file library to perform verification calculation until the verification calculation value is the same as the value of the message verification bit of the current CAN message to be verified, and the verification result of the current CAN message to be verified is passed;
If the verification calculated values obtained by calculating all the configuration files in the configuration file library are different from the value of the message verification bit of the current CAN message to be verified, the verification result of the current CAN message to be verified is not passed.
Optionally, the processing unit 330 is further configured to perform:
Extracting information corresponding to the attribute from the verification result of each CAN message to be verified according to at least one attribute included in a preset recording template, wherein the attribute comprises a project number, a message ID, the CAN message and the verification result;
And filling each CAN message to be checked and the information corresponding to the attribute into the file template to obtain the checking detection record of the target item.
The CAN message verification device provided by the embodiment of the invention CAN execute the CAN message verification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example III
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as CAN message check means methods.
In some embodiments, the CAN message check apparatus method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the CAN message check apparatus method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the CAN message check means method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (11)

  1. The CAN message verification method is characterized by comprising the following steps:
    determining a project number of a target project to be detected and a corresponding CAN communication message table;
    Determining a corresponding DBC file according to the item number, and determining at least one CAN message to be checked from the CAN communication message table according to the DBC file;
    And checking each CAN message to be checked based on a preset configuration file library, wherein the configuration file library comprises at least one configuration file, and each configuration file corresponds to a CRC check algorithm and at least one characteristic parameter of the CRC check algorithm.
  2. 2. The method of claim 1, wherein the determining at least one CAN message to be verified from the CAN communication message table according to the DBC file comprises:
    Determining a message ID (identity) included in the DBC file, wherein each message ID corresponds to at least one CAN message;
    and determining whether each message ID comprises a verification identifier which characterizes the need to be verified, if so, taking the CAN message corresponding to the message ID comprising the verification identifier as the CAN message to be verified.
  3. 3. The method of claim 1, wherein the verifying each CAN message to be verified based on the preset profile library comprises:
    Determining the CAN message to be checked with a corresponding first configuration file according to the item number and the message ID of each CAN message to be checked, wherein each configuration file corresponds to at least one item and at least one message ID under the item, and represents a preset checking algorithm when the CAN message is checked by the message ID under the item;
    And checking the corresponding CAN message to be checked according to the first configuration file.
  4. 4. A method as claimed in claim 3, further comprising:
    And for the CAN message to be checked, which does not have the corresponding first configuration file, the checking result is that the CAN message to be checked does not pass.
  5. 5. The method of claim 3, wherein the verifying each CAN message to be verified according to the first configuration file comprises:
    executing, for each to-be-checked CAN message:
    Determining the first configuration file corresponding to the CAN message to be checked currently;
    calculating a first verification calculated value of the current CAN message to be verified through a verification algorithm corresponding to the first configuration file;
    and determining whether the first check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, determining that the check result of the current CAN message to be checked is passed.
  6. 6. The method as recited in claim 5, further comprising:
    Determining whether the check calculated value is the same as the value of the message check bit of the CAN message to be checked currently, if not, switching other unused second configuration files in the configuration file library;
    calculating a second check calculation value of the current CAN message to be checked through a check algorithm corresponding to the second configuration file;
    Determining whether the second check calculated value is the same as the value of the message check bit of the current CAN message to be checked, if so, the check result of the current CAN message to be checked is passed; if not, switching other unused third configuration files in the configuration file library to perform verification calculation until the verification calculation value is the same as the value of the message verification bit of the current CAN message to be verified, and the verification result of the current CAN message to be verified is passed;
    If the verification calculated values obtained by calculating all the configuration files in the configuration file library are different from the value of the message verification bit of the current CAN message to be verified, the verification result of the current CAN message to be verified is not passed.
  7. 7. The method as recited in claim 1, further comprising:
    Extracting information corresponding to the attribute from the verification result of each CAN message to be verified according to at least one attribute included in a preset recording template, wherein the attribute comprises a project number, a message ID, the CAN message and the verification result;
    And filling each CAN message to be checked and the information corresponding to the attribute into the file template to obtain the checking detection record of the target item.
  8. CAN message verification device, its characterized in that includes:
    the first determining unit is used for determining the item number of the target item to be detected and the corresponding CAN communication message table;
    The second determining unit is used for determining a corresponding DBC file according to the project number, and determining at least one CAN message to be checked from the CAN communication message table according to the DBC file;
    The processing unit is used for checking each CAN message to be checked based on a preset configuration file library, wherein the configuration file library comprises at least one configuration file, and each configuration file corresponds to one CRC check algorithm and at least one characteristic parameter of the CRC check algorithm.
  9. 9. An electronic device, characterized in that the electronic device comprises:
    At least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the CAN message check method of any one of claims 1-7.
  10. 10. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the CAN message verification method of any one of claims 1-7 when executed.
  11. 11. Computer program product, characterized in that it comprises a computer program which, when executed by a processor, implements the CAN message checking method according to any of claims 1-7.
CN202410753260.XA 2024-06-12 2024-06-12 CAN message verification method, device, equipment, medium and program product Pending CN118611826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410753260.XA CN118611826A (en) 2024-06-12 2024-06-12 CAN message verification method, device, equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410753260.XA CN118611826A (en) 2024-06-12 2024-06-12 CAN message verification method, device, equipment, medium and program product

Publications (1)

Publication Number Publication Date
CN118611826A true CN118611826A (en) 2024-09-06

Family

ID=92565613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410753260.XA Pending CN118611826A (en) 2024-06-12 2024-06-12 CAN message verification method, device, equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN118611826A (en)

Similar Documents

Publication Publication Date Title
CN115757483A (en) Automatic testing method and device, electronic equipment and storage medium
CN116136950B (en) Chip verification method, device, system, electronic equipment and storage medium
CN114024884B (en) Test method, test device, electronic equipment and storage medium
CN117724980A (en) Method and device for testing software framework performance, electronic equipment and storage medium
CN116775634A (en) Quality inspection method, device, equipment and medium for power generation engineering data
CN118611826A (en) CAN message verification method, device, equipment, medium and program product
CN115482869A (en) Error injection testing method and device, electronic equipment and storage medium
CN114443493A (en) Test case generation method and device, electronic equipment and storage medium
CN114546799A (en) Point burying log checking method and device, electronic equipment, storage medium and product
CN117492822B (en) Change contrast method, device, electronic equipment and storage medium
CN114611155B (en) Data management node verification method, device, equipment and medium
CN116001705B (en) Vehicle data monitoring method, device, equipment and storage medium
CN117395071B (en) Abnormality detection method, abnormality detection device, abnormality detection equipment and storage medium
CN116578555A (en) Data verification method, system, electronic equipment and storage medium
CN118277275A (en) Interface testing method and device, electronic equipment and storage medium
CN116383058A (en) Conversion method and device of software system model, electronic equipment and medium
CN116991825A (en) Database flashback method, device, equipment and storage medium
CN115567624A (en) Message processing method and device, electronic equipment and medium
CN117667693A (en) Automatic message testing method, device, equipment and storage medium
CN117520396A (en) Method, device, equipment and storage medium for identifying abnormal association relation
CN117312168A (en) Interface test case generation method, device, equipment and storage medium
CN115794609A (en) Script sharing method and device, electronic equipment and storage medium
CN114238075A (en) Method, device, equipment, medium and product for testing program component
CN117033227A (en) Distributed database testing method, device, equipment and medium
CN114238149A (en) Batch testing method of accounting system, electronic device and storage medium

Legal Events

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