Data comparison method and device

A technology of data comparison and data information, applied in the field of communication, can solve the problem of high memory usage, achieve the effect of reducing execution time and improving processing efficiency

Inactive Publication Date: 2011-01-26
ZTE CORP
View PDF4 Cites 29 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The present invention is proposed in view of the problem of high memory usage caused by the data comparison method in the prior art. The

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data comparison method and device
  • Data comparison method and device
  • Data comparison method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] figure 1 It is a preferred flowchart of the data comparison method according to the embodiment of the present invention, which includes:

[0032] S102, comparing the first HASH information of the source file with the second HASH information of the target file;

[0033] S104. Generate a comparison result between the above-mentioned source file and the above-mentioned target file according to the comparison result.

[0034] This embodiment solves the problem of high memory usage caused by the data comparison method in the prior art by comparing the HASH information of the source file and the target file instead of the data itself, thereby reducing execution time and improving processing efficiency Effect.

[0035] Preferably, comparing the first hash HASH information of the source file with the second HASH information of the target file includes: establishing a memory index table corresponding to the source file in the memory, wherein the memory index table includes the...

Embodiment 2

[0042] figure 2 It is another preferred flow chart of the data comparison method according to the embodiment of the present invention, which includes:

[0043] Step S201: Obtain the system configuration parameters provided by the user and perform corresponding analysis. If an exception occurs, go to step S203, otherwise go to step S202.

[0044] Step S202: read the source file into memory, and store the HASH value information and file offset information of the source file data. If there is abnormal data, go to step S203; otherwise, go to step S204.

[0045] Step S203: Write abnormal data into the log, and then jump to step S201.

[0046] Step S204: Establish an in-memory index model for source file information, mainly including three-layer HASH indexes and corresponding conflict lists. If abnormality occurs, go to step S205, otherwise go to step S206.

[0047] Step S205: Write the failure of the memory model into the log, and jump to step S214.

[0048] Step S206: extra...

Embodiment 3

[0060] The present embodiment provides source file a.txt and object file b.txt, and wherein a.txt contains following two records:

[0061] 2013|950112345|13012345678

[0062] 2013|950112345|13098765432

[0063] b.txt contains the following two records:

[0064] 2013|950112345|13012345678

[0065] 2014|950112345|13098765432

[0066] The user specifies to compare by all fields respectively.

[0067] According to the above steps S201 to S214, firstly, a.txt is loaded into the memory, and a corresponding memory model is established. Then read the b.txt file, calculate the HASH value, search in the memory model, and then read the corresponding records in the a.txt file for comparison. Generate result files.

[0068] Unique record of a.txt: 2013|950112345|13098765432

[0069] Unique record of b.txt: 2014|950112345|13098765432

[0070] Records shared by a.txt and b.txt files: 2013|950112345|13012345678

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a data comparison method and a device. The method comprises the steps of: comparing the first HASH information of a source file with the second HASH information of a target file; and creating a comparison result of the source file and the target file on the basis of a comparison result. The invention solves the problem of higher memory occupancy rate caused by a data comparison method in the prior art, and achieves the effects of reducing execution time and enhancing processing efficiency.

Description

technical field [0001] The present invention relates to the communication field, in particular to a data comparison method and device. Background technique [0002] With the continuous development of the current communication industry, related software systems are becoming more and more complex. These systems generally contain many subsystems and peripheral systems. In order to ensure the consistency of data in these systems, it is often necessary to compare similar data between systems. , to keep it consistent to ensure the normal operation of the entire system. [0003] Because in the communication industry, the amount of such data to be compared is usually very large, and it is easy to make mistakes when using general text comparison tools. At present, there are various comparison methods in the industry: [0004] 1) Use third-party tools, such as ue, merge and other tools and software, for comparison; [0005] 2) In the database, use the cursor mode to compare through ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/30
CPCG06F17/30619G06F17/30G06F16/316
Inventor 高水波华国栋黎楚兵史美康
Owner ZTE CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products