Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

File differentiation comparison method and device, storage medium and electronic device

A document, difference technology, applied in the computer field, can solve problems such as poor accuracy and readability, and achieve the effect of improving accuracy and scalability

Active Publication Date: 2019-11-19
BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a file differentiation comparison method and device, a storage medium, and an electronic device to at least solve the problem of finding a longest common subsequence of two character sequences in the related art, or equivalently find the The symbol of converting one sequence into another sequence leads to the problem of poor accuracy and readability of differential alignment results through the minimal way of deleting or inserting operands

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
  • File differentiation comparison method and device, storage medium and electronic device
  • File differentiation comparison method and device, storage medium and electronic device
  • File differentiation comparison method and device, storage medium and electronic device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0018] The method embodiment provided in Embodiment 1 of the present application may be executed in a terminal, a computer terminal, or a similar computing device. Take running on the terminal as an example, figure 1 It is a block diagram of the hardware structure of a terminal of a method for file differential comparison in an embodiment of the present invention. Such as figure 1 As shown, the terminal 10 may include one or more ( figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but not limited to processing devices such as microprocessor MCU or programmable logic device FPGA) and memory 104 for storing data. Optionally, the above-mentioned terminal can also be A transmission device 106 for communication functions and an input and output device 108 are included. Those of ordinary skill in the art can understand that, figure 1 The shown structure is only for illustration, and does not limit the structure of the above-mentioned terminal. F...

Embodiment 2

[0069] This embodiment also provides a device for file differential comparison, which is used to implement the above embodiments and preferred implementation modes, and what has already been described will not be repeated. As used below, the term "module" may be a combination of software and / or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.

[0070] image 3 is a structural block diagram of a device for file differential comparison according to an embodiment of the present invention, such as image 3 As shown, the device includes: a comparison module 32, which is used to compare the first file with the second file according to the ordering of the symbol sequence in the file; a division module 34, which is coupled with the comparison module 32, and is used to The same li...

Embodiment 3

[0077] An embodiment of the present invention also provides a storage medium, in which a computer program is stored, wherein the computer program is set to execute the steps in any one of the above method embodiments when running.

[0078] Optionally, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:

[0079] S1, comparing the first file with the second file according to the sorting of symbol sequences in the files;

[0080] S2. Divide the symbol sequences in the first file and the second file into multiple sub-ranges according to the same row symbols appearing in the comparison result;

[0081] S3. According to the plurality of subranges, perform longest common subsequence LCS on unmatched symbol sequences in the first file and the second file to obtain an alignment difference result.

[0082] Optionally, in this embodiment, the above-mentioned storage medium may include but not limited to...

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 provides a file differentiation comparison method and device, a storage medium and an electronic device. The method comprises: comparing a first file with a second file according to thesequence of symbol sequences in the files; dividing symbol sequences in the first file and the second file into a plurality of sub-ranges according to the same row of symbols appearing in a comparisonresult; and executing the longest common subsequence LCS on the unmatched symbol sequences in the first file and the second file according to the plurality of subranges to obtain a comparison difference result. By means of the invention, the problem of poor accuracy and readability of differentiated comparison results due to the fact that a longest common subsequence of two character sequences isfound in related technologies or, the minimum mode of deleting or inserting operands of the symbols for converting one sequence into the other sequence is solved. The accuracy and expandability of file difference are improved.

Description

technical field [0001] The present invention relates to the field of computers, in particular to a file differentiation comparison method and device, a storage medium and an electronic device. Background technique [0002] Differential comparison of files is one of the underlying steps of the function realization of many applications, and the realization of the function of differential comparison of files is based on the content of each line in the file, and one line is a string or symbol sequence, so The problem, which reduces to determining the difference between two sequences of symbols, has been extensively studied, and algorithms for this problem have many applications, including spelling correction systems, file comparison tools, and the study of genetic evolution. [0003] The method used in the prior art is: find a longest common subsequence (Longest Common Subsequence, abbreviated as LCS) of two character sequences, or equivalently find a symbol that converts one se...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/22G06F16/17
CPCG06F16/17Y02D10/00
Inventor 于阳
Owner BEIJING MININGLAMP SOFTWARE SYST CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products