CN106254343A - File comparison method and device - Google Patents

File comparison method and device Download PDF

Info

Publication number
CN106254343A
CN106254343A CN201610630476.2A CN201610630476A CN106254343A CN 106254343 A CN106254343 A CN 106254343A CN 201610630476 A CN201610630476 A CN 201610630476A CN 106254343 A CN106254343 A CN 106254343A
Authority
CN
China
Prior art keywords
file
array
information
assignment
subarray
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610630476.2A
Other languages
Chinese (zh)
Other versions
CN106254343B (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.)
Beijing Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN201610630476.2A priority Critical patent/CN106254343B/en
Publication of CN106254343A publication Critical patent/CN106254343A/en
Application granted granted Critical
Publication of CN106254343B publication Critical patent/CN106254343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention provides a file comparison method and a device, wherein the file comparison method comprises the steps of extracting CAN message information in a first file and a second file to be compared, wherein the CAN message information comprises assignment information and annotation information; generating a first array for marking CAN message information in a first file and a second array for marking CAN message information in a second file, wherein the first array comprises a first sub-array for marking different CAN message information in the first file, and the second array comprises a second sub-array for marking different CAN message information in the second file; and comparing the first file with the second file according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array. The method and the device can quickly and accurately position the change points in the file to be compared, and effectively improve the comparison efficiency.

Description

File comparison method and device
Technical Field
The invention relates to the technical field of file processing, in particular to a file comparison method and device.
Background
In a modern vehicle network system, each node transmits signals through a CAN network, and the controllers of ECU, TCU, EPS and the like are defined through CAN message protocol files to receive and transmit signals, for example, the ECU transmits signals of an accelerator, a rotating speed and a torque, and the TCU transmits signals of a gear and a torque reduction request and the like. The CAN message protocol file mainly defines the length, type, precision, offset, signal name and the like of bytes. In the process of developing the vehicle control strategy, when the CAN message protocol file is changed, the vehicle control strategy is influenced, so that the condition of test input change often occurs in the same test period. In the related technology, the difference of one CAN message protocol file relative to the other CAN message protocol file is listed through a commercial software comparison tool, and a tester compares the modification points of the two CAN message protocol files.
In this way, the procurement cost of the commercial software is expensive, the workload is large, and the efficiency of locating the change point is not high.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, an object of the present invention is to provide a file comparison method, which can quickly and accurately locate a change point in a file to be compared, and effectively improve comparison efficiency.
Another objective of the present invention is to provide a file comparison apparatus.
In order to achieve the above object, an embodiment of the first aspect of the present invention provides a method for storing a controller area network CAN packet in a file, including: extracting CAN message information in a first file and a second file to be compared, wherein the CAN message information comprises assignment information and annotation information; generating a first array for marking CAN message information in the first file and a second array for marking CAN message information in the second file, wherein the first array comprises a first sub-array for marking different CAN message information in the first file, and the second array comprises a second sub-array for marking different CAN message information in the second file; and comparing the first file with the second file according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array.
According to the file comparison method provided by the embodiment of the first aspect of the invention, the first array used for marking the CAN message information in the first file and the second array used for marking the CAN message information in the second file are generated, and the first file and the second file are compared according to the first sub-array marked with different CAN message information in the first array and the second sub-array marked with different CAN message information in the second array, so that the change points in the files to be compared CAN be quickly and accurately positioned, and the comparison efficiency is effectively improved.
In order to achieve the above object, a file comparison apparatus according to an embodiment of a second aspect of the present invention, where a controller area network CAN packet is stored in a file, includes: the extracting module is used for extracting CAN message information in a first file and a second file to be compared, wherein the CAN message information comprises assignment information and annotation information; the generating module is used for generating a first array for marking the CAN message information in the first file and a second array for marking the CAN message information in the second file, wherein the first array comprises a first sub-array for marking different CAN message information in the first file, and the second array comprises a second sub-array for marking different CAN message information in the second file; and the comparison module is used for comparing the first file with the second file according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array.
The file comparison device provided by the embodiment of the second aspect of the invention CAN quickly and accurately position the change point in the file to be compared by generating the first array for marking the CAN message information in the first file and the second array for marking the CAN message information in the second file, and comparing the first file with the second file according to the first sub-array marked with different CAN message information in the first array and the second sub-array marked with different CAN message information in the second array, thereby effectively improving the comparison efficiency.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a file comparison method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a file comparison method according to another embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a file comparison apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a file comparison device according to another embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention. On the contrary, the embodiments of the invention include all changes, modifications and equivalents coming within the spirit and terms of the claims appended hereto.
Fig. 1 is a flowchart illustrating a file comparison method according to an embodiment of the present invention. The document matching method is exemplified by being configured as a document matching device. The file comparison method can be applied to the development and test processes of the automobile control strategy.
Referring to fig. 1, the file comparison method may include:
s11: and extracting CAN message information in the first file and the second file to be compared, wherein the CAN message information comprises assignment information and annotation information.
In the embodiment of the present invention, the CAN message protocol file includes, for example, the following fields: the message ID, the byte length, and the numerical range corresponding to the message ID, wherein the annotation information is, for example, the chinese meaning of the message ID, and the assignment information is, for example: the 0 flag is off and the 1 flag is on.
Optionally, the CAN message information in the first file and the second file to be compared is extracted, wherein the CAN message information includes assignment information and annotation information, so that a first array for marking the CAN message information in the first file is generated according to the extracted assignment information and annotation information of the first file, and a second array for marking the CAN message information in the second file is generated according to the extracted assignment information and annotation information of the second file.
Furthermore, assignment information and annotation information in CAN message information in a first file to be compared CAN be respectively extracted, assignment information and annotation information in CAN message information in a second file CAN be extracted, the assignment information in the first file and the assignment information in the second file CAN be compared by respectively extracting the assignment information and the annotation information in the first file and the second file to be compared, subsequent targeted hierarchical comparison is realized, retrieval steps in a comparison process are simplified, a tester does not need to retrieve and compare all message information in two CAN message protocol files, and comparison efficiency is effectively improved.
S12: and generating a first array for marking the CAN message information in the first file and a second array for marking the CAN message information in the second file.
The first array comprises a first sub array for marking different CAN message information in the first file, and the second array comprises a second sub array for marking different CAN message information in the second file.
Optionally, a first array for marking the CAN message information in the first file and a second array for marking the CAN message information in the second file are used, so as to compare the first file with the second file according to a first sub-array for marking different CAN message information of the first file in the first array and a second sub-array for marking different CAN message information of the second file in the second array.
S13: and comparing the first file with the second file according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array.
In an embodiment of the present invention, the first subarray includes a first evaluation subarray and a first comment subarray, where the first evaluation subarray is used to mark evaluation information of a CAN packet in the first file, and the first comment subarray is used to mark comment information of the CAN packet in the first file, for example, the first comment subarray note _ data1 is generated according to extracted comment information of the first file, and the first evaluation subarray assignment _ data1 is generated according to extracted evaluation information of the first file. The second subarray comprises a second assignment subarray and a second comment subarray, wherein the second assignment subarray is used for marking assignment information of the CAN messages in the second file, the second comment subarray is used for marking comment information of the CAN messages in the second file, for example, the second comment subarray note _ data2 is generated according to the extracted comment information of the second file, and the second assignment subarray assignment _ data2 is generated according to the extracted assignment information of the second file.
Optionally, the first file and the second file are compared according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array, for example, comparing the comment information in the first comment sub-array node _ data1 with the comment information in the second comment sub-array node _ data2, and comparing the assignment information in the first assignment sub-array assignment _ data1 with the assignment information in the second assignment sub-array assignment _ data2 to obtain a comparison result.
In some embodiments, referring to fig. 2, step S13 specifically includes:
s21: and comparing the assignment information in the first assignment sub-array with the assignment information in the second assignment sub-array to obtain a first comparison result.
In the embodiment of the present invention, assignment information satisfying a preset condition in the first assignment sub-array and the second assignment sub-array may be extracted as the first comparison result.
Wherein the preset conditions are as follows: CAN message information which does not exist in different arrays simultaneously.
For example, the assignment information in first assignment sub-array assignment _ data1 and the assignment information in second assignment sub-array assignment _ data2 may be compared row by row with assignment information in second assignment sub-array assignment _ data2 as a comparison reference, if assignment information a is present in assignment _ data1 and assignment information a is not present in assignment _ data2, then assignment information a may be present in first assignment sub-array assignment _ data1 and the result with second assignment sub-array assignment _ data2 is not present as a first comparison result, which identifies the difference of the first file compared to the second file, it CAN be understood that since the CAN message protocol information in the first file and the second file is stored in a 16-ary or a two-ary character computer, the assignment information in the first assignment sub-array 1 CAN be obtained by comparing the assignment information in the second assignment sub-array assignment _ data2 as a comparison reference. And the result which does not exist in the second assignment sub-array assignment _ data2 is correspondingly compared row by row with the assignment information in the second assignment sub-array assignment _ data2 and the assignment information in the first assignment sub-array assignment _ data1 by taking the first assignment sub-array assignment _ data1 as a comparison reference, so that the result which exists in the second assignment sub-array assignment _ data2 and does not exist in the first assignment sub-array assignment _ data1 can be obtained as a first comparison result, the first comparison result identifies the difference of the second file compared with the first file, and the comparison result identifies the difference of the first file and the second file and compares the difference of the second file and the first file, so that the comparison result is complete in coverage, strong in intuition and convenient for a user to view.
As an example, the assignment information in the first assignment sub array assignment _ data1 is 0, 1, 2, and the assignment information in the second assignment sub array assignment _ data2 is 1, 2, 3, and the first assignment sub array assignment _ data1 and the second assignment sub array assignment _ data2 are compared to obtain a first comparison result: assignment information 0 exists in first assignment sub array assignment _ data1 but does not exist in second assignment sub array assignment _ data2, and assignment information 3 exists in second assignment sub array assignment _ data2 but does not exist in first assignment sub array assignment _ data 1.
S22: and comparing the annotation information in the first annotation subarray with the annotation information in the second annotation subarray to obtain a second comparison result.
In the embodiment of the present invention, annotation information meeting a preset condition in the first annotation subarray and the second annotation subarray may be extracted as the second comparison result.
Wherein the preset conditions are as follows: CAN message information which does not exist in different arrays simultaneously.
For example, the comment information in the first comment sub array no _ data1 and the comment information in the second comment sub array no _ data2 may be compared row by row and column by column with the comment information in the second comment sub array no _ data2 as a comparison reference, and if there is comment information B in the no _ data1 and there is no comment information B in the no _ data2, the comment information B may be present in the first comment sub array no _ data1 and there is no result in the second comment sub array no _ data2 as a second comparison result which identifies a difference of the first file from the second file, it being understood that since the CAN message protocol information in the first file and the second file is stored in the computer in 16 or two-system characters, by comparing the comment information in the second comment sub array no _ data2, it is possible to obtain 1 that the comment information B exists in the first comment sub array no _ data1, and the result which does not exist in the second annotation subarray no _ data2 corresponds to the result which exists in the second annotation subarray no _ data2 and does not exist in the first annotation subarray no _ data1 by comparing the annotation information in the second annotation subarray no _ data2 with the annotation information in the first annotation subarray no _ data1 row by row with the first annotation subarray no _ data1 as a comparison reference, and the second comparison result identifies the difference of the second file compared with the first file, and by comparing the difference of the first file and the second file and comparing the difference of the second file and the first file, the comparison result covers a complete surface, is high in intuitiveness, and is convenient for a user to view.
As an example, the annotation information in the first annotation subarray note _ data1 is: the packet ID is 0x0cf10500, 0x0cf10501, 0x0cf10502, that is, the packet ID is 16-system number 0x0cf10500, 0cf10501, 0x0cf10502, and the comment information in the second comment sub-array note _ data2 is: the message IDs are 0x0cf10501, 0x0cf10502 and 0x0cf10503, that is, the message IDs are 16-system numbers 0x0cf10501, 0cf10502 and 0x0cf10503, the first annotation subarray note _ data1 and the second annotation subarray note _ data2 are compared, and the obtained second comparison result is: and (4) annotation information: the message ID of 0x0cf10500 exists in the first comment subarray no _ data1 but does not exist in the second comment subarray no _ data2, and the comment information is: the packet ID 0x0cf10503 exists in the second comment sub array node _ data2, but does not exist in the first comment sub array node _ data 1.
S23: and outputting the first comparison result and the second comparison result to a result file so as to display the result file to a user.
The file comparison method in the present invention can be implemented based on the m language in MATLAB, and can also be based on other languages, which is not limited herein.
Optionally, the first alignment result and the second alignment result may be output to the result file by using the m language in MATLAB, which is not limited.
For example, the first comparison Result and the second comparison Result are written into an Excel table by using the m language in MATLAB, so that the intuition is strong, the Excel table is convenient for a user to view, and the Excel table is named, for example, Result so as to display a Result file to the user. For example, the result file result.xls is displayed in a command window of the MATLAB software, and because the MATLAB is simple to use and expensive commercial software does not need to be purchased, the change point can be quickly and accurately positioned, and the comparison efficiency is effectively improved.
In the embodiment, the first comparison result and the second comparison result are output to the result file, so that the result file is displayed to a user, the result file can be viewed visually, the change point in the file to be compared can be quickly and accurately positioned, and the comparison efficiency is effectively improved.
In this embodiment, by generating a first array for marking the CAN message information in the first file and a second array for marking the CAN message information in the second file, and comparing the first file and the second file according to a first sub-array for marking different CAN message information in the first array and a second sub-array for marking different CAN message information in the second array, the change point in the file to be compared CAN be quickly and accurately located, and the comparison efficiency is effectively improved.
Fig. 3 is a schematic structural diagram of a file comparison device according to an embodiment of the present invention. The file alignment apparatus 300 can be implemented by software, hardware or a combination of both.
Referring to fig. 3, the file comparison apparatus 300 may include: an extraction module 310, a generation module 320, and a comparison module 330. Wherein,
the extracting module 310 is configured to extract CAN message information in the first file and the second file to be compared, where the CAN message information includes assignment information and annotation information.
The generating module 320 is configured to generate a first array for marking the CAN packet information in the first file and a second array for marking the CAN packet information in the second file, where the first array includes a first sub-array for marking different CAN packet information in the first file, and the second array includes a second sub-array for marking different CAN packet information in the second file.
The comparison module 330 is configured to compare the first file with the second file according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array.
Optionally, the first sub-array includes a first assignment sub-array and a first comment sub-array, and the second sub-array includes a second assignment sub-array and a second comment sub-array, where the first assignment sub-array is used to mark assignment information of a CAN packet in the first file, the first comment sub-array is used to mark comment information of the CAN packet in the first file, the second assignment sub-array is used to mark assignment information of a CAN packet in the second file, and the second comment sub-array is used to mark comment information of the CAN packet in the second file.
In some embodiments, referring to fig. 4, the file comparison apparatus 300 may further include:
optionally, the alignment module 330 includes:
the first comparison sub-module 331 is configured to compare the assignment information in the first assignment sub-array with the assignment information in the second assignment sub-array to obtain a first comparison result.
Optionally, the first comparison sub-module 331 is further configured to: and extracting assignment information meeting preset conditions in the first assignment sub-array and the second assignment sub-array as a first comparison result.
Wherein the preset conditions are as follows: CAN message information which does not exist in different arrays simultaneously.
The second comparison sub-module 332 is configured to compare the annotation information in the first annotation subarray with the annotation information in the second annotation subarray to obtain a second comparison result.
Optionally, the second comparison sub-module 332 is further configured to: and extracting the annotation information meeting the preset condition in the first annotation subarray and the second annotation subarray to serve as a second comparison result.
Wherein the preset conditions are as follows: CAN message information which does not exist in different arrays simultaneously.
The output sub-module 333 is configured to output the first comparison result and the second comparison result to a result file, so as to display the result file to a user.
It should be noted that the explanation of the embodiment of the file comparison method in the foregoing embodiments of fig. 1-2 is also applicable to the file comparison apparatus, and the implementation principle thereof is similar and will not be described herein again.
In this embodiment, by generating a first array for marking the CAN message information in the first file and a second array for marking the CAN message information in the second file, and comparing the first file and the second file according to a first sub-array for marking different CAN message information in the first array and a second sub-array for marking different CAN message information in the second array, the change point in the file to be compared CAN be quickly and accurately located, and the comparison efficiency is effectively improved.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (12)

1. A file comparison method is provided, wherein a Controller Area Network (CAN) message is stored in a file, and the method is characterized by comprising the following steps:
extracting CAN message information in a first file and a second file to be compared, wherein the CAN message information comprises assignment information and annotation information;
generating a first array for marking CAN message information in the first file and a second array for marking CAN message information in the second file, wherein the first array comprises a first sub-array for marking different CAN message information in the first file, and the second array comprises a second sub-array for marking different CAN message information in the second file;
and comparing the first file with the second file according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array.
2. The method of file alignment of claim 1 wherein the first subarray comprises a first assigned subarray and a first annotated subarray, and the second subarray comprises a second assigned subarray and a second annotated subarray, wherein,
the first assignment subarray is used for marking assignment information of the CAN messages in the first file, the first comment subarray is used for marking comment information of the CAN messages in the first file, the second assignment subarray is used for marking assignment information of the CAN messages in the second file, and the second comment subarray is used for marking comment information of the CAN messages in the second file.
3. The method of claim 2, wherein comparing the first file and the second file according to a first sub-array of the first array labeled with different CAN message information and a second sub-array of the second array labeled with different CAN message information comprises:
comparing the assignment information in the first assignment subarray with the assignment information in the second assignment subarray to obtain a first comparison result;
comparing the annotation information in the first annotation subarray with the annotation information in the second annotation subarray to obtain a second comparison result;
and outputting the first comparison result and the second comparison result to a result file so as to display the result file to a user.
4. The file comparison method of claim 3, wherein comparing the assignment information in the first assignment subarray with the assignment information in the second assignment subarray to obtain a first comparison result comprises:
and extracting assignment information meeting preset conditions in the first assignment sub-array and the second assignment sub-array as a first comparison result.
5. The file comparison method of claim 3, wherein comparing the annotation information in the first annotation subarray with the annotation information in the second annotation subarray to obtain a second comparison result comprises:
and extracting annotation information meeting preset conditions in the first annotation subarray and the second annotation subarray to serve as a second comparison result.
6. The method for comparing files according to claim 4 or 5, wherein the predetermined conditions are: CAN message information which does not exist in different arrays simultaneously.
7. A file comparison device, wherein a Controller Area Network (CAN) message is stored in a file, is characterized by comprising:
the extracting module is used for extracting CAN message information in a first file and a second file to be compared, wherein the CAN message information comprises assignment information and annotation information;
the generating module is used for generating a first array for marking the CAN message information in the first file and a second array for marking the CAN message information in the second file, wherein the first array comprises a first sub-array for marking different CAN message information in the first file, and the second array comprises a second sub-array for marking different CAN message information in the second file;
and the comparison module is used for comparing the first file with the second file according to a first sub-array marked with different CAN message information in the first array and a second sub-array marked with different CAN message information in the second array.
8. The file comparison apparatus of claim 7 wherein said first subarray comprises a first assigned subarray and a first annotated subarray, and said second subarray comprises a second assigned subarray and a second annotated subarray, wherein,
the first assignment subarray is used for marking assignment information of the CAN messages in the first file, the first comment subarray is used for marking comment information of the CAN messages in the first file, the second assignment subarray is used for marking assignment information of the CAN messages in the second file, and the second comment subarray is used for marking comment information of the CAN messages in the second file.
9. The apparatus of claim 8, wherein the alignment module comprises:
the first comparison sub-module is used for comparing the assignment information in the first assignment sub-array with the assignment information in the second assignment sub-array to obtain a first comparison result;
the second comparison sub-module is used for comparing the annotation information in the first annotation subarray with the annotation information in the second annotation subarray to obtain a second comparison result;
and the output submodule is used for outputting the first comparison result and the second comparison result to a result file so as to display the result file to a user.
10. The file comparison apparatus of claim 9, wherein the first comparison sub-module is further configured to:
and extracting assignment information meeting preset conditions in the first assignment sub-array and the second assignment sub-array as a first comparison result.
11. The file alignment apparatus of claim 9 wherein the second alignment submodule is further configured to:
and extracting annotation information meeting preset conditions in the first annotation subarray and the second annotation subarray to serve as a second comparison result.
12. The apparatus according to claim 10 or 11, wherein the predetermined condition is: CAN message information which does not exist in different arrays simultaneously.
CN201610630476.2A 2016-08-03 2016-08-03 File comparison method and device Active CN106254343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610630476.2A CN106254343B (en) 2016-08-03 2016-08-03 File comparison method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610630476.2A CN106254343B (en) 2016-08-03 2016-08-03 File comparison method and device

Publications (2)

Publication Number Publication Date
CN106254343A true CN106254343A (en) 2016-12-21
CN106254343B CN106254343B (en) 2019-11-22

Family

ID=57606603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610630476.2A Active CN106254343B (en) 2016-08-03 2016-08-03 File comparison method and device

Country Status (1)

Country Link
CN (1) CN106254343B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622080A (en) * 2017-07-28 2018-01-23 阿里巴巴集团控股有限公司 A kind of data processing method and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120259618A1 (en) * 2011-04-06 2012-10-11 Hon Hai Precision Industry Co., Ltd. Computing device and method for comparing text data
CN103970776A (en) * 2013-01-30 2014-08-06 广州汽车集团股份有限公司 Method and system for creating CAN hierarchy tree
CN104424194A (en) * 2013-08-20 2015-03-18 广州汽车集团股份有限公司 Method and system for comparing similarities and differences of CANdb (Controller Area Network) network file
CN105787041A (en) * 2016-02-26 2016-07-20 中国银联股份有限公司 Large file comparison method and comparison system based on data characteristic codes

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120259618A1 (en) * 2011-04-06 2012-10-11 Hon Hai Precision Industry Co., Ltd. Computing device and method for comparing text data
CN103970776A (en) * 2013-01-30 2014-08-06 广州汽车集团股份有限公司 Method and system for creating CAN hierarchy tree
CN104424194A (en) * 2013-08-20 2015-03-18 广州汽车集团股份有限公司 Method and system for comparing similarities and differences of CANdb (Controller Area Network) network file
CN105787041A (en) * 2016-02-26 2016-07-20 中国银联股份有限公司 Large file comparison method and comparison system based on data characteristic codes

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107622080A (en) * 2017-07-28 2018-01-23 阿里巴巴集团控股有限公司 A kind of data processing method and equipment

Also Published As

Publication number Publication date
CN106254343B (en) 2019-11-22

Similar Documents

Publication Publication Date Title
JP6567169B2 (en) Cyber attack detection method and detection apparatus
CN100524232C (en) System to accelerate identification of hardware platform classes
CN109060370B (en) Method and device for vehicle testing of automatically driven vehicle
CN109766793B (en) Data processing method and device
CN108829647A (en) A kind of data transfer device and device
CN100596338C (en) Air Traffic Control radar data automatic identification method
CN104850502A (en) Method, apparatus and device for accessing data
CN109710439B (en) Fault processing method and device
WO2014157056A1 (en) Source program analysis system, source program analysis method, and recording medium on which program is recorded
US9009532B2 (en) Communication test apparatus and method
CN103116621A (en) Method and system for detecting temperature of computer hardware and method for identifying hardware type
CN111967234A (en) Visual report generation method and device, terminal equipment and storage medium
CN103353858A (en) Automatic testing method and device based on action touch simulation
CN106254343B (en) File comparison method and device
US9965344B2 (en) Method and apparatus for transmitting data in a robot operating system
CN104021075A (en) Method and device for evaluating program codes
CN112241355B (en) Link tracking method, system, computer readable storage medium and electronic device
CN106484847B (en) Electronic map labeling method and device
WO2020119551A1 (en) Log file-based service performance analysis method and apparatus, and electronic device
US10372849B2 (en) Performing and communicating sheet metal simulations employing a combination of factors
CN115543809A (en) Method and device for constructing test scene library of automatic driving function
US11210267B2 (en) Electronic control unit comparison
CN112668194B (en) Automatic driving scene library information display method, device and equipment based on page
JP2007133603A (en) Computer system, basic software and monitoring program
CN113485859A (en) Fault positioning method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant