CN113569106B - CAN data identification method, device and equipment - Google Patents

CAN data identification method, device and equipment Download PDF

Info

Publication number
CN113569106B
CN113569106B CN202110665241.8A CN202110665241A CN113569106B CN 113569106 B CN113569106 B CN 113569106B CN 202110665241 A CN202110665241 A CN 202110665241A CN 113569106 B CN113569106 B CN 113569106B
Authority
CN
China
Prior art keywords
message
target
data
character string
identified
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.)
Active
Application number
CN202110665241.8A
Other languages
Chinese (zh)
Other versions
CN113569106A (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 CN202110665241.8A priority Critical patent/CN113569106B/en
Publication of CN113569106A publication Critical patent/CN113569106A/en
Application granted granted Critical
Publication of CN113569106B publication Critical patent/CN113569106B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • 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
    • 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

Abstract

The application discloses a CAN data identification method, a device and equipment, comprising the following steps: converting the data format of the acquired original CAN data into a target data format to obtain target CAN data; when the target parameters of the target working conditions are obtained, converting the data format of the target parameters into a target data format to obtain a target character string; screening a message to be selected containing a target character string from target CAN data; and determining the message type of the message to be selected as the message type of the target character string. The application converts the data format of the original CAN data into the target data format to obtain the target CAN data, and also converts the data format of the target parameters of the target working condition into the target data format to obtain the target character string, so that the message to be selected comprising the target character string CAN be inquired from the target CAN data, and all messages belonging to the same message type as the target character string CAN be acquired from the target CAN data, the messages CAN be classified with high efficiency, and the recognition efficiency of the CAN data is improved.

Description

CAN data identification method, device and equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for identifying CAN data.
Background
In the design and development of modern automobiles, the use requirement of CAN (Controller Area Network, CAN, controller area network) signals is continuously increased, and the operations of performance test analysis, control strategy standard alignment analysis, network matching analysis and the like CAN be realized by collecting and analyzing CAN data.
In the related art, when a vehicle research and development engineer analyzes signals of a controller related to a CAN network, a network cable needs to be led out from a vehicle fault diagnosis system of the whole vehicle or a CAN network harness of the controller, CAN data is recorded by using a CAN card (or the CAN data is collected online), and a target signal is locked by a mode of independently testing independent change so as to identify the target signal in the CAN data. However, the recognition efficiency of the method is low, so that the analysis period of the CAN data is long, and the development progress of the vehicle is easy to slow.
Disclosure of Invention
The embodiment of the application solves the technical problem of low recognition efficiency of CAN data in the prior art by providing the CAN data recognition method, the device and the equipment, and achieves the technical effect of improving the recognition efficiency of the CAN data.
In a first aspect, the present application provides a CAN data identification method, the method comprising:
converting the data format of the acquired original CAN data into a target data format to obtain target CAN data;
when the target parameters of the target working conditions are obtained, converting the data format of the target parameters into a target data format to obtain a target character string;
screening a message to be selected containing a target character string from target CAN data;
and determining the message type of the message to be selected as the message type of the target character string.
Further, determining the message type of the message to be selected as the message type of the target character string includes:
determining a first character string selection direction according to a data coding mode of a message to be selected;
according to the first starting bit, the first ending bit and the first character string selection direction, a first data segment to be identified is intercepted from the message to be selected;
drawing a first data curve according to the first precision, the first offset and the first data segment to be identified;
determining a first parameter to be identified according to the first data curve;
determining a first matching degree between a first characteristic parameter of a message type of the target character string and a first parameter to be identified;
and when the first matching degree exceeds the first preset matching degree, determining the message type of the message to be selected as the message type of the target character string.
Further, when the target parameter of the target working condition is not acquired, the method further comprises:
determining a message to be identified from the target CAN data;
determining a second character string selection direction according to the data coding mode of the message to be identified;
according to the second start bit, the second end bit and the second character string, a second data segment to be recognized is intercepted from the message to be recognized;
drawing a second data curve according to the second precision, the second offset and the second data segment to be identified;
determining a second to-be-identified parameter according to the second data curve;
and determining the message type of the message to be identified according to the second matching degree between the second characteristic parameter and the second parameter to be identified of each message type in the plurality of message types.
Further, when the second matching degree between the second characteristic parameter and the second parameter to be identified of each of the plurality of message types is smaller than the second preset matching degree, the method further includes:
updating the second starting bit and the second ending bit, and intercepting a third data segment to be identified from the message to be identified according to the second character string selection direction, the updated second starting bit and the updated second ending bit;
updating the second precision and the second offset, and drawing a third data curve according to the third data segment to be identified, the updated second precision and the updated second offset;
determining a third to-be-identified parameter according to the third data curve;
and determining the message type of the message to be identified according to the third matching degree between the second characteristic parameter and the third parameter to be identified of each message type in the plurality of message types.
Further, when the message type of the target character string is a continuous signal, screening the message to be selected containing the target character string from the target CAN data includes:
obtaining a plurality of third offsets according to the basic offset, wherein the third offsets are multiples of the basic offset;
for each third offset, determining an extended string according to the third offset, the base precision and the target string;
screening a first message to be selected containing the extended character string from the target CAN data;
and screening a second message to be selected containing the target character string from the target CAN data, wherein the message to be selected comprises a first message to be selected and a second message to be selected.
Further, when the message type of the target character string is a status signal, screening the message to be selected containing the target character string from the target CAN data includes:
classifying the messages with the same message identifier in the target CAN data to obtain a plurality of groups of similar message sets;
screening a set of which the number of times that the target character string continuously appears in the same data bit exceeds a preset number of times from a plurality of groups of similar message sets to obtain a first similar message set;
and taking the message containing the target character string in the first similar message set as a message to be selected.
Further, when the message type of the target character string is a rolling counting signal, screening the message to be selected containing the target character string from the target CAN data, including:
screening sets of which at least two target character strings appear in the same data bit cycle from a plurality of groups of similar message sets to obtain a second similar message set;
and taking the messages in the second same-class message set as the messages to be selected.
Further, screening the message to be selected containing the target character string from the target CAN data comprises the following steps:
and taking the message with all characters in the target character string continuously appearing in the target CAN data as a message to be selected.
In a second aspect, the present application provides a CAN data recognition apparatus, the apparatus comprising:
the first conversion module is used for converting the data format of the acquired original CAN data into a target data format to obtain target CAN data;
the second conversion module is used for converting the data format of the target parameters into the target data format when the target parameters of the target working conditions are acquired, so as to obtain a target character string;
the first screening module is used for screening the message to be selected containing the target character string from the target CAN data;
and the first determining module is used for determining the message type of the message to be selected as the message type of the target character string.
In a third aspect, the present application provides an electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to execute to implement a CAN data recognition method.
One or more technical solutions provided in the embodiments of the present application at least have the following technical effects or advantages:
according to the application, the data format of the original CAN data is converted into the target data format to obtain the target CAN data, the data format of the target parameters of the target working condition is also converted into the target data format to obtain the target character string, and then the message to be selected comprising the target character string CAN be inquired from the target CAN data, so that all messages belonging to the same message type as the target character string CAN be obtained from the target CAN data, and further various messages in the target CAN data CAN be classified with high efficiency, the recognition efficiency of the CAN data is improved, and the analysis period of the CAN data is shortened.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a CAN data identification method provided by the application;
fig. 2 is a schematic structural diagram of a CAN data recognition device provided by the present application;
fig. 3 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
The embodiment of the application solves the technical problem of low recognition efficiency of CAN data in the prior art by providing the CAN data recognition method.
The technical scheme of the embodiment of the application aims to solve the technical problems, and the overall thought is as follows:
a CAN data identification method comprises the following steps: converting the data format of the acquired original CAN data into a target data format to obtain target CAN data; when the target parameters of the target working conditions are obtained, converting the data format of the target parameters into a target data format to obtain a target character string;
screening a message to be selected containing a target character string from target CAN data; and determining the message type of the message to be selected as the message type of the target character string.
According to the application, the data format of the original CAN data is converted into the target data format to obtain the target CAN data, the data format of the target parameters of the target working condition is also converted into the target data format to obtain the target character string, and then the message to be selected comprising the target character string CAN be inquired from the target CAN data, so that all messages belonging to the same message type as the target character string CAN be obtained from the target CAN data, and further various messages in the target CAN data CAN be classified with high efficiency, the recognition efficiency of the CAN data is improved, and the analysis period of the CAN data is shortened.
In order to better understand the above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
First, the term "and/or" appearing herein is merely an association relationship describing associated objects, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The embodiment provides a CAN data identification method as shown in figure 1, which comprises the following steps:
step S11, converting the data format of the acquired original CAN data into a target data format to obtain target CAN data;
step S12, when the target parameters of the target working conditions are obtained, converting the data format of the target parameters into a target data format to obtain a target character string;
step S13, screening a message to be selected containing a target character string from target CAN data;
step S14, determining the message type of the message to be selected as the message type of the target character string.
The raw CAN data may be obtained directly from a vehicle fault diagnosis system or controller of the vehicle, or may be obtained from a memory device loaded with the raw CAN data. After the original CAN data is acquired, converting the format of the original CAN data into a target data format to obtain target CAN data. The target data format may be set according to the specific situation.
When a vehicle engineer performs recognition analysis on the CAN signal, the vehicle engineer usually performs analysis according to specific parameters under specific working conditions. For example, when the engine is in neutral, the throttle is stepped on to the bottom and the engine speed is about 4000rpm. After the target working condition and the target parameters are determined, converting the data format of the target parameters into a target data format, and further obtaining the target character string. For example, the target data format may be 16, and then 4000rpm is converted into the target data format, i.e., FA0.
Typically, the target CAN data contains most, and possibly all, of the control signals of the vehicle. In order to know the related signals of the target character strings, characters in the target character strings CAN be compared with characters of all messages in the target CAN data one by one, and the messages with all the characters in the target character strings continuously appearing in the target CAN data are used as messages to be selected.
TABLE 1
A first part Two (II) Three kinds of Fourth, fourth Five kinds of Six kinds of Seven pieces of Eight (eight) Nine pieces
F F 0 0 0 F A 0 C
For example, as shown in table 1, when the target character string is FA0, part of the characters of a certain message of the second behavior target CAN data are sequentially matched with the characters in the target CAN data from the first character of the target character string, the first character is F, the first character is matched with the target character string, the a of the target character string is compared with the characters in the second column, the a of the target character string is found to be not matched with the character F in the second column, and the first character of the target character string is compared with the characters in the second column, and the steps are sequentially circulated. It can be found that the sixth, seventh, and eighth columns of characters in table 1 are matched with the target character string, and then the message can be determined to be the candidate message.
Further, there may be a wild card (the wild card is replaced by X) in the target string, for example, the target string may be FA3X, which means that, as long as the character of FA3 is satisfied in the target CAN data, the corresponding message is considered as the message to be selected no matter what the character of the following data bit of FA3 in the target CAN data is.
In summary, the embodiment converts the data format of the original CAN data into the target data format to obtain the target CAN data, and also converts the data format of the target parameter of the target working condition into the target data format to obtain the target character string, so that the message to be selected including the target character string CAN be queried from the target CAN data, and all messages belonging to the same message type as the target character string CAN be acquired from the target CAN data, so that various messages in the target CAN data CAN be classified with high efficiency, the recognition efficiency of the CAN data is improved, and the analysis period of the CAN data is shortened.
According to different target working conditions, the target parameters are different, the complexity of the target parameters is also different, if the message type of the message to be selected containing the target character string in the target CAN data is directly determined as the message type of the target character string, the accuracy is lower, and in order to solve the problem, the embodiment provides the following optimization scheme:
determining the message type of the message to be selected as the message type of the target character string, including:
step S21, determining a first character string selection direction according to a data coding mode of a message to be selected;
step S22, according to the first start bit, the first end bit and the first character string selection direction, a first data segment to be identified is intercepted from the message to be selected;
step S23, drawing a first data curve according to the first precision, the first offset and the first data segment to be identified;
step S24, determining a first parameter to be identified according to the first data curve;
step S25, determining a first matching degree between a first characteristic parameter of a message type of a target character string and a first parameter to be identified;
step S26, when the first matching degree exceeds the first preset matching degree, determining the message type of the message to be selected as the message type of the target character string.
The data coding mode of the message comprises an Intel data coding format and a Motorola data coding format, and the direction of selecting the character strings from the message is different according to the different data coding modes, so that the first character string selecting direction can be determined according to the data coding mode of the message to be selected.
The start bit and the end bit are used for identifying the character string distribution to be selected, and the start bit and the end bit can be determined according to actual conditions. According to the first start bit, the first end bit and the first character string selection direction, a first data segment to be identified can be intercepted from the message to be selected.
The precision and the offset represent the relation between the character string and the actual physical parameters, and can be determined according to working conditions and specific parameters. According to the first precision and the first offset, the first data segment to be identified may be converted into a physical parameter, for example, when the character string is FA0, the precision is taken to be 1, and the offset is FA0, so that the finally obtained physical parameter is 8000 (i.e. physical parameter=character string×precision+offset). The first data segment to be identified comprises a plurality of character strings, and a first data curve representing the physical parameter can be drawn according to the first data segment to be identified, the first precision and the first offset.
The first to-be-identified parameter (the first to-be-identified parameter CAN be a related physical characteristic value) CAN be obtained from the first data curve, the matching degree between the first to-be-identified parameter and the first characteristic parameter of the message type of the target character string is determined, whether the message type of the message to be selected is the message type of the target character string CAN be determined through the matching degree, and further the accuracy of the message type of the target character string is improved on the basis of improving the identification efficiency of the CAN signal.
When the vehicle engineer does not analyze the CAN data for a specific working condition, that is, when the target parameter of the target working condition is not acquired, the CAN data may be classified as follows:
step S31, determining a message to be identified from target CAN data;
step S32, determining a second character string selection direction according to the data coding mode of the message to be identified;
step S33, according to the second start bit, the second end bit and the second character string selection direction, intercepting a second data segment to be identified from the message to be identified;
step S34, drawing a second data curve according to the second precision, the second offset and the second data segment to be identified;
step S35, determining a second parameter to be identified according to a second data curve;
step S36, determining the message type of the message to be identified according to the second matching degree between the second characteristic parameter and the second parameter to be identified of each of the message types.
The principle of step S31 to step S36 is similar to that of step S21 to step S26, and the description thereof will not be repeated here for the same contents. It should be noted that the message to be identified may be any message in the target CAN data, and may be determined according to a specific situation. The execution of step S21-step S26 needs to identify the type of the message containing the target character string under the condition that the target working condition and the target parameter are known. The step S31-step S36 may be performed to identify the type of the message to be identified without knowing the target working condition or the target parameter.
In step S36, the message type with the second matching degree exceeding the second preset matching degree may be used as the message type of the message to be identified, or the message type with the second matching degree exceeding the second preset matching degree and the largest second matching degree may be used as the message type of the message to be identified.
When the second matching degree between the second characteristic parameter and the second to-be-identified parameter of each message type in the plurality of message types is smaller than the second preset matching degree, the method further comprises:
step S41, updating a second start bit and a second end bit, and intercepting a third data segment to be identified from the message to be identified according to the second character string selection direction, the updated second start bit and the updated second end bit;
step S42, updating the second precision and the second offset, and drawing a third data curve according to the third data segment to be identified, the updated second precision and the updated second offset;
step S43, determining a third to-be-identified parameter according to a third data curve;
step S44, determining the message type of the message to be identified according to the third matching degree between the second characteristic parameter and the third parameter to be identified of each of the multiple message types.
When the second matching degree between the second characteristic parameter and the second parameter to be identified of each of the plurality of message types is smaller than the second preset matching degree, the selection of the start bit and the end bit may be inappropriate, or the selection of the precision and the offset may be inappropriate, so that the start bit, the end bit, the precision and the offset may be adjusted, and then the message type of the message to be identified is determined in the manner of step S41-step S44. The principle of step S41 to step S44 is similar to that of step S33 to step S36, and will not be described here again.
Specifically, when the message type of the target character string is a continuous signal, screening the message to be selected containing the target character string from the target CAN data includes:
step S51, obtaining a plurality of third offsets according to the basic offset, wherein the third offsets are multiples of the basic offset;
step S52, aiming at each third offset, determining an extended character string according to the third offset, the basic precision and the target character string;
step S53, a first message to be selected containing the extended character string is screened from the target CAN data;
step S54, a second message to be selected containing the target character string is selected from the target CAN data, wherein the message to be selected comprises a first message to be selected and a second message to be selected.
The continuous signal, also called discrete signal of continuous variable, such as engine speed signal, which varies between 0-7000rpm on a normal vehicle, the physical value and the character value of the message are in linear correlation, and the continuous signal can be recorded as a straight line with slope, and the equation is y=kx+b, where y is the physical value, x is the character value, k is the precision, and b is the offset. For example, when the rotation speed signal is controlled in a stable section under a specific working condition, a character string with a corresponding hexadecimal value of a certain sequence has certain precision and offset compared with a physical value.
For example, the physical rotation speed corresponding to the rotation speed of the engine under the specific working condition is 4000rpm, assuming that the hexadecimal value of the rotation speed is FA0 under the condition of the precision of 1, and the characteristic character string starting character is similar as a whole when searching according to the searched character string under the condition of assuming that the rotation speed fluctuates around 4000rpm according to the character string and the physical value offset information to form a table to be matched (shown in a table 2). Therefore, the string matching search is performed using the character string and the message data character string, and the string to be matched is continuously adjusted along with the offset until a highly similar data sequence is found by the return value of string matching (the illustrated increment table offset is increased by FA0 each time, i.e. the basic offset is FA 0).
In table 2, the basic offset is FA0 (the phase difference between FA0 and FA0, and the phase difference between FA0 and 1F40 is FA0, and so on), the basic precision is 1, the corresponding character string is F35 when the offset is 0 at 3893rpm, the corresponding character string is 1ED5 when the offset is FA0, the corresponding character string is 2E75 when the offset is 1F40, and the corresponding character string is 3E15 when the offset is 2EE 0. Wherein, F35 in the first column is a target string of the current message, 1ED5 in the second column, 2E75 in the third column, 3E15 in the fourth column, and 4DB5 in the fifth column are expansion strings.
TABLE 2
When the message type of the target character string is a state signal, screening the message to be selected containing the target character string from the target CAN data, wherein the method comprises the following steps:
step S61, classifying the messages with the same message identifier in the target CAN data to obtain a plurality of groups of similar message sets;
step S62, screening a set of which the number of times that the target character string continuously appears in the same data bit exceeds a preset number of times from a plurality of groups of similar message sets to obtain a first similar message set;
step S63, the message containing the target character string in the first similar message set is used as the message to be selected.
TABLE 3 Table 3
TIME ID DAT1 DAT2 DAT3 DAT4 DAT5 DAT6 DAT7 DAT8
T0 ID1 FF 00 00 7A 60 8D 62 87
T1 ID1 00 00 00 7A 19 00 00 20
T2 ID3 1A 0F 00 7A XX XX XX XX
T3 ID1 FF 00 00 7A 60 8D 64 65
T4 ID1 00 00 00 0B 8C 00 00 40
The status signal is related to the input of the driver, and when the same character appears in the same message continuously in different time periods, the message type of the message is considered as the status signal. As shown in table 3, DAT4 continuously appears 7A at times T0-T4, and the message shown in table 3 can be considered as a statistical message.
When the message type of the target character string is a rolling counting signal, screening the message to be selected containing the target character string from the target CAN data, wherein the method comprises the following steps:
step S71, screening sets of at least two target character strings which appear in the same data bit cycle from a plurality of groups of similar message sets to obtain a second similar message set;
step S72, the message in the second same-class message set is used as the message to be selected.
The change of the rolling counting signal is related to the period of the message, the character string of the same data bit shows periodic change, and the numerical value is circularly changed. DAT8, as in table 4, is cycled through for strings 6 and 26.
TABLE 4 Table 4
TIME ID DAT1 DAT2 DAT3 DAT4 DAT5 DAT6 DAT7 DAT8
T0 ID2 FF 00 00 00 60 8D 62 6
T1 ID2 00 00 00 00 19 00 00 26
T2 ID2 1A 0F 00 00 XX XX XX 6
T3 ID2 FF 00 00 00 60 8D 64 26
T4 ID2 00 00 00 0B 8C 00 00 6
T5 ID2 00 00 00 0B 8C 00 00 26
T6 ID2 00 00 00 0B 8C 00 00 6
T7 ID2 00 00 00 0B 8C 00 00 26
In summary, the embodiment can pertinently identify various messages according to the characteristics of different types of messages, so that on one hand, the identification efficiency of the message type is improved, and on the other hand, the identification accuracy of the specific message type is also improved.
In the specific operation of this embodiment, the above technical solution may be developed by using c++/MFC, and ID data packets are performed from CAN data files having a target data format according to digits corresponding to a message ID (i.e., a message identifier); selecting an interested ID and a data bit, extracting a character string of a corresponding number according to whether the ID is the same as the interested ID, performing binary conversion on the character string, and storing the character string in a memory space; dynamically adjusting and setting the precision and offset, and outputting the precision and offset in a graphical form on a display window; the selection of the digital character strings CAN also be carried out according to the manually input numerical values, the character strings are matched in the message file according to a matching algorithm, the character strings close to the numerical values are fed back, the messages CAN be classified efficiently, and the CAN data recognition efficiency is improved.
Based on the same inventive concept, this embodiment provides a CAN data recognition device as shown in fig. 2, where the device includes:
a first conversion module 21, configured to convert a data format of the obtained raw CAN data into a target data format, so as to obtain target CAN data;
the second conversion module 22 is configured to convert a data format of the target parameter into a target data format when the target parameter of the target working condition is acquired, so as to obtain a target character string;
a first screening module 23, configured to screen a message to be selected that contains a target character string from the target CAN data;
the first determining module 24 is configured to determine a message type of the message to be selected as a message type of the target string.
Further, the first determining module 24 includes:
the first direction determining submodule is used for determining a first character string selection direction according to the data coding mode of the message to be selected;
the first interception sub-module is used for intercepting a first data segment to be identified from the message to be selected according to the first starting bit, the first ending bit and the first character string selection direction;
the first drawing submodule is used for drawing a first data curve according to the first precision, the first offset and the first data segment to be identified;
the first parameter determination submodule is used for determining a first parameter to be determined according to the first data curve;
the first matching degree determination submodule is used for determining a first matching degree between a first characteristic parameter of the message type of the target character string and a first parameter to be identified;
and the first determining submodule is used for determining the message type of the message to be selected as the message type of the target character string when the first matching degree exceeds the first preset matching degree.
Further, the apparatus further comprises:
the second determining module is used for determining a message to be identified from the target CAN data;
the second direction determining module is used for determining a second character string selection direction according to the data coding mode of the message to be identified;
the second intercepting module is used for intercepting a second data segment to be recognized from the message to be recognized according to the second starting bit, the second ending bit and the second character string selecting direction;
the second drawing module is used for drawing a second data curve according to the second precision, the second offset and the second data segment to be identified;
the second parameter determining module is used for determining a second parameter to be identified according to a second data curve;
and the third determining module is used for determining the message type of the message to be identified according to the second matching degree between the second characteristic parameter and the second parameter to be identified of each message type in the plurality of message types.
Further, the apparatus further comprises:
the third intercepting module is used for updating the second starting bit and the second ending bit, and intercepting a third data segment to be recognized from the message to be recognized according to the second character string selection direction, the updated second starting bit and the updated second ending bit;
the third drawing module is used for updating the second precision and the second offset and drawing a third data curve according to the third data segment to be identified, the updated second precision and the updated second offset;
the third parameter determining module is used for determining a third to-be-identified parameter according to a third data curve;
and the fourth determining module is used for determining the message type of the message to be identified according to the third matching degree between the second characteristic parameter and the third parameter to be identified of each message type in the plurality of message types.
Further, the first screening module 23 includes:
the obtaining submodule is used for obtaining a plurality of third offsets according to the basic offset, and the third offsets are multiples of the basic offset;
the extended character string determining submodule is used for determining an extended character string according to the third offset, the basic precision and the target character string aiming at each third offset;
the first message screening submodule is used for screening the first message containing the extended character string from the target CAN data;
and the second message to be selected screening submodule is used for screening the second message to be selected containing the target character string from the target CAN data, wherein the message to be selected comprises the first message to be selected and the second message to be selected.
Further, the first screening module 23 includes:
the classification module is used for classifying the messages with the same message identifier in the target CAN data to obtain a plurality of groups of similar message sets;
the first similar message set screening module is used for screening a set of which the number of times that the same data bit continuously appears a target character string exceeds a preset number of times from a plurality of groups of similar message sets to obtain a first similar message set;
and a fifth determining module, configured to use a message including the target character string in the first similar message set as a message to be selected.
Further, the first screening module 23 includes:
the second similar message set screening module is used for screening sets of at least two target character strings which appear in the same data bit in a circulating way from a plurality of groups of similar message sets to obtain a second similar message set;
and the sixth determining module is used for taking the messages in the second similar message set as the messages to be selected.
Further, the first screening module 23 includes:
and the first screening submodule is used for taking the messages of which all characters in the target character string continuously appear in the target CAN data as the messages to be selected.
Based on the same inventive concept, this embodiment provides an electronic device as shown in fig. 3, including:
a processor 31;
a memory 32 for storing instructions executable by the processor 31;
wherein the processor 31 is configured to execute to implement a CAN data recognition method.
Since the electronic device described in this embodiment is an electronic device used to implement the method for processing information in the embodiment of the present application, those skilled in the art will be able to understand the specific implementation of the electronic device in this embodiment and various modifications thereof based on the method for processing information described in the embodiment of the present application, so how the method in the embodiment of the present application is implemented in this electronic device will not be described in detail herein. Any electronic device used by those skilled in the art to implement the information processing method in the embodiment of the present application is within the scope of the present application.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program 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 program 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 program 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 application 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. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (7)

1. A CAN data identification method, the method comprising:
converting the data format of the acquired original CAN data into a target data format to obtain target CAN data;
when a target parameter of a target working condition is obtained, converting a data format of the target parameter into the target data format to obtain a target character string;
screening a message to be selected containing the target character string from the target CAN data;
determining the message type of the message to be selected as the message type of the target character string;
the determining the message type of the message to be selected as the message type of the target character string includes:
determining a first character string selection direction according to the data coding mode of the message to be selected;
intercepting a first data segment to be identified from the message to be selected according to a first starting bit, a first ending bit and the first character string selection direction;
drawing a first data curve representing the physical parameter according to the first precision, the first offset and the first data segment to be identified;
determining a first to-be-identified parameter according to the first data curve, wherein the first to-be-identified parameter is a physical characteristic value in the first data curve;
determining a first matching degree between a first characteristic parameter of the message type of the target character string and the first parameter to be identified;
when the first matching degree exceeds a first preset matching degree, determining the message type of the message to be selected as the message type of the target character string;
when the message type of the target character string is a continuous signal, screening the message to be selected containing the target character string from the target CAN data, wherein the method comprises the following steps:
obtaining a plurality of third offsets according to the basic offset, wherein the third offsets are multiples of the basic offset;
for each third offset, determining an extended string according to the third offset, the base precision and the target string;
screening a first message to be selected containing the extended character string from the target CAN data;
and screening a second message to be selected containing the target character string from the target CAN data, wherein the message to be selected comprises the first message to be selected and the second message to be selected.
2. The method of claim 1, wherein when the target parameter for the target operating condition is not obtained, the method further comprises:
determining a message to be identified from the target CAN data;
determining a second character string selection direction according to the data coding mode of the message to be identified;
intercepting a second data segment to be identified from the message to be identified according to a second start bit, a second end bit and the second character string selection direction;
drawing a second data curve according to the second precision, the second offset and the second data segment to be identified;
determining a second to-be-identified parameter according to the second data curve;
and determining the message type of the message to be identified according to the second matching degree between the second characteristic parameter of each message type in the plurality of message types and the second parameter to be identified.
3. The method of claim 2, wherein when the second degree of match between the second characteristic parameter and the second to-be-identified parameter for each of the plurality of message types is less than a second predetermined degree of match, the method further comprises:
updating the second starting bit and the second ending bit, and intercepting a third data segment to be identified from the message to be identified according to the second character string selection direction, the updated second starting bit and the updated second ending bit;
updating the second precision and the second offset, and drawing a third data curve according to the third data segment to be identified, the updated second precision and the updated second offset;
determining a third to-be-identified parameter according to the third data curve;
and determining the message type of the message to be identified according to the third matching degree between the second characteristic parameter and the third parameter to be identified of each message type in the plurality of message types.
4. The method of claim 1, wherein when the message type of the target string is a status signal, selecting the message to be selected from the target CAN data that contains the target string comprises:
classifying the messages with the same message identifier in the target CAN data to obtain a plurality of groups of similar message sets;
screening a set of which the number of times that the target character string continuously appears in the same data bit exceeds a preset number of times from the plurality of groups of similar message sets to obtain a first similar message set;
and taking the message containing the target character string in the first similar message set as the message to be selected.
5. The method of claim 4 wherein when the message type of the target string is a rolling count signal, selecting the message to be selected from the target CAN data that contains the target string comprises:
screening sets of which at least two target character strings appear in the same data bit cycle from the multiple groups of similar message sets to obtain a second similar message set;
and taking the message in the second similar message set as the message to be selected.
6. A CAN data recognition device, the device comprising:
the first conversion module is used for converting the data format of the acquired original CAN data into a target data format to obtain target CAN data;
the second conversion module is used for converting the data format of the target parameters into the target data format when the target parameters of the target working conditions are acquired, so as to obtain a target character string;
the first screening module is used for screening the message to be selected containing the target character string from the target CAN data;
the first determining module is used for determining the message type of the message to be selected as the message type of the target character string;
the first determining module includes:
the first direction determining submodule is used for determining a first character string selection direction according to the data coding mode of the message to be selected;
the first interception sub-module is used for intercepting a first data segment to be identified from the message to be selected according to the first starting bit, the first ending bit and the first character string selection direction;
the first drawing submodule is used for drawing a first data curve representing the physical parameter according to the first precision, the first offset and the first data segment to be identified;
the first parameter determination submodule is used for determining a first parameter to be determined according to a first data curve, wherein the first parameter to be determined is a physical characteristic value in the first data curve;
the first matching degree determination submodule is used for determining a first matching degree between a first characteristic parameter of the message type of the target character string and a first parameter to be identified;
the first determining submodule is used for determining the message type of the message to be selected as the message type of the target character string when the first matching degree exceeds a first preset matching degree;
a first screening module comprising:
the obtaining submodule is used for obtaining a plurality of third offsets according to the basic offset, and the third offsets are multiples of the basic offset;
the extended character string determining submodule is used for determining an extended character string according to the third offset, the basic precision and the target character string aiming at each third offset;
the first message screening submodule is used for screening the first message containing the extended character string from the target CAN data;
and the second message to be selected screening submodule is used for screening the second message to be selected containing the target character string from the target CAN data, wherein the message to be selected comprises the first message to be selected and the second message to be selected.
7. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute to implement a CAN data recognition method as claimed in any one of claims 1 to 5.
CN202110665241.8A 2021-06-16 2021-06-16 CAN data identification method, device and equipment Active CN113569106B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110665241.8A CN113569106B (en) 2021-06-16 2021-06-16 CAN data identification method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110665241.8A CN113569106B (en) 2021-06-16 2021-06-16 CAN data identification method, device and equipment

Publications (2)

Publication Number Publication Date
CN113569106A CN113569106A (en) 2021-10-29
CN113569106B true CN113569106B (en) 2023-10-13

Family

ID=78162193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110665241.8A Active CN113569106B (en) 2021-06-16 2021-06-16 CAN data identification method, device and equipment

Country Status (1)

Country Link
CN (1) CN113569106B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825784A (en) * 2014-03-24 2014-05-28 中国人民解放军信息工程大学 Non-public protocol field identification method and system
CN106559431A (en) * 2016-12-02 2017-04-05 北京奇虎科技有限公司 A kind of visual analysis method and device for automotive safety detection
CN106789358A (en) * 2017-02-15 2017-05-31 北京浩瀚深度信息技术股份有限公司 Business recognition method and system based on DPI
CN107450510A (en) * 2017-06-28 2017-12-08 中国汽车工程研究院股份有限公司 A kind of signal resolution method using diagnostic signal fast positioning CAN signal
CN108965293A (en) * 2018-07-13 2018-12-07 智车优行科技(北京)有限公司 Message parsing method and device, electronic equipment
CN109933712A (en) * 2019-03-06 2019-06-25 北京思特奇信息技术股份有限公司 A kind of extracting method and system of message data
US10439923B1 (en) * 2016-09-22 2019-10-08 Amazon Technologies, Inc. Deserialization service
CN111865744A (en) * 2020-07-08 2020-10-30 北京软安科技有限公司 Vehicle CAN bus data classification method and device
CN112069005A (en) * 2020-08-28 2020-12-11 东风汽车集团有限公司 Method for detecting CAN communication function of whole vehicle
CN112559824A (en) * 2020-12-24 2021-03-26 北京嘀嘀无限科技发展有限公司 Message processing method, device and equipment
CN112751810A (en) * 2019-10-31 2021-05-04 杭州海康汽车技术有限公司 CAN message analysis method, device and terminal
CN112784112A (en) * 2021-01-29 2021-05-11 银清科技有限公司 Message checking method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8510026B2 (en) * 2011-06-13 2013-08-13 General Electric Company Data conversion system and method for converting data that is distributed in a vehicle
US9031967B2 (en) * 2012-02-27 2015-05-12 Truecar, Inc. Natural language processing system, method and computer program product useful for automotive data mapping
WO2014097305A1 (en) * 2012-12-23 2014-06-26 Orpak Systems Ltd Method and system for retrieving vehicular parameters from a vehicle data bus
JP2014186395A (en) * 2013-03-21 2014-10-02 Toshiba Corp Document preparation support device, method, and program
US9967097B2 (en) * 2015-08-25 2018-05-08 Brillio LLC Method and system for converting data in an electronic device
US11055615B2 (en) * 2016-12-07 2021-07-06 Arilou Information Security Technologies Ltd. System and method for using signal waveform analysis for detecting a change in a wired network
KR102360168B1 (en) * 2017-11-01 2022-02-09 현대자동차주식회사 Apparatus and method for converting protocol with type of data

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103825784A (en) * 2014-03-24 2014-05-28 中国人民解放军信息工程大学 Non-public protocol field identification method and system
US10439923B1 (en) * 2016-09-22 2019-10-08 Amazon Technologies, Inc. Deserialization service
CN106559431A (en) * 2016-12-02 2017-04-05 北京奇虎科技有限公司 A kind of visual analysis method and device for automotive safety detection
CN106789358A (en) * 2017-02-15 2017-05-31 北京浩瀚深度信息技术股份有限公司 Business recognition method and system based on DPI
CN107450510A (en) * 2017-06-28 2017-12-08 中国汽车工程研究院股份有限公司 A kind of signal resolution method using diagnostic signal fast positioning CAN signal
CN108965293A (en) * 2018-07-13 2018-12-07 智车优行科技(北京)有限公司 Message parsing method and device, electronic equipment
CN109933712A (en) * 2019-03-06 2019-06-25 北京思特奇信息技术股份有限公司 A kind of extracting method and system of message data
CN112751810A (en) * 2019-10-31 2021-05-04 杭州海康汽车技术有限公司 CAN message analysis method, device and terminal
CN111865744A (en) * 2020-07-08 2020-10-30 北京软安科技有限公司 Vehicle CAN bus data classification method and device
CN112069005A (en) * 2020-08-28 2020-12-11 东风汽车集团有限公司 Method for detecting CAN communication function of whole vehicle
CN112559824A (en) * 2020-12-24 2021-03-26 北京嘀嘀无限科技发展有限公司 Message processing method, device and equipment
CN112784112A (en) * 2021-01-29 2021-05-11 银清科技有限公司 Message checking method and device

Also Published As

Publication number Publication date
CN113569106A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
US6507669B1 (en) Method of selecting clusters of items using a fuzzy histogram analysis
CN105786860B (en) Data processing method and device in data modeling
CN112269818B (en) Equipment parameter root cause positioning method, system, device and medium
JP2013250809A (en) Multi-class discrimination device, method and program
Thomas et al. Automatic gradient boosting
US20070299835A1 (en) Search engine for software components and a search program for software components
US20180307743A1 (en) Mapping method and device
CN110188196A (en) A kind of text increment dimension reduction method based on random forest
CN111353062A (en) Image retrieval method, device and equipment
CN112364014A (en) Data query method, device, server and storage medium
WO2018142816A1 (en) Assistance device and assistance method
CN113569106B (en) CAN data identification method, device and equipment
CN111104476A (en) Archive data generation method, archive data generation device, and readable storage medium
CN114153839A (en) Integration method, device, equipment and storage medium of multi-source heterogeneous data
CN112232290B (en) Data clustering method, server, system and computer readable storage medium
CN112580825A (en) Unsupervised data binning method and unsupervised data binning device
CN113297185A (en) Feature derivation method and device
CN108092670A (en) Coding method and device
US10311084B2 (en) Method and system for constructing a classifier
CN110348509B (en) Method, device and equipment for adjusting data augmentation parameters and storage medium
CN112988797A (en) Space-time adjoint query method based on p-stable lsh
CN113988670A (en) Comprehensive enterprise credit risk early warning method and system
CN108846083B (en) Frequent pattern mining method and device
CN110990349A (en) Unbalanced log oversampling method in intelligent system security system
Rajeswari et al. Chi-Square MapReduce Model for Agricultural Data.

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