CN111460763A - Method, device and equipment for marking file differences and computer-readable storage medium - Google Patents

Method, device and equipment for marking file differences and computer-readable storage medium Download PDF

Info

Publication number
CN111460763A
CN111460763A CN202010136312.0A CN202010136312A CN111460763A CN 111460763 A CN111460763 A CN 111460763A CN 202010136312 A CN202010136312 A CN 202010136312A CN 111460763 A CN111460763 A CN 111460763A
Authority
CN
China
Prior art keywords
page
file
target
difference
labeled
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010136312.0A
Other languages
Chinese (zh)
Inventor
谭林丰
陈宏君
张磊
刘坤
文继峰
王翔
黄志岭
曾凯
洪礼鑫
赵奎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering 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 NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN202010136312.0A priority Critical patent/CN111460763A/en
Publication of CN111460763A publication Critical patent/CN111460763A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the application provides a method, a device, equipment and a computer readable storage medium for labeling file differences, wherein the method comprises the following steps: acquiring a file to be labeled and a reference file corresponding to the file to be labeled, and respectively extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a feature value of each page and a feature value of each reference page; determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page; and marking the target page by adopting a preset marking mode.

Description

Method, device and equipment for marking file differences and computer-readable storage medium
Technical Field
The application relates to the field of power grids, and relates to but is not limited to a method, a device, equipment and a computer-readable storage medium for marking file differences.
Background
In the visual programming technology of the power grid, a technology for comparing consistency before and after modification of a visual page is disclosed at present. However, the comparison of the visualized pages in the related art cannot realize the automatic identification and labeling functions of the difference contents.
Therefore, a method and an apparatus for automatically identifying the difference between the files and labeling the difference content of the files are needed by the user, so that the user can view the difference content of the two files more intuitively from a macroscopic view, a microscopic view, and the like.
Disclosure of Invention
In view of the above, embodiments of the present application provide a method, an apparatus, a device, and a computer-readable storage medium for annotating file differences.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a method for comparing file differences, including:
acquiring a file to be marked and a reference file corresponding to the file to be marked;
respectively extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a feature value of each page and a feature value of each reference page;
determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page;
and marking the target page by adopting a preset marking mode.
In a second aspect, an embodiment of the present application provides a device for labeling file differences, including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a file to be annotated and a reference file corresponding to the file to be annotated;
the first processing module is used for respectively extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a feature value of each page and a feature value of each reference page;
the first determining module is used for determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page;
and the marking module is used for marking the target page in a preset marking mode.
In a third aspect, an embodiment of the present application provides a device for annotating file differences, including:
a memory for storing executable instructions; and the processor is used for realizing the method when executing the executable instructions stored in the memory.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing executable instructions for causing a processor to implement the above-mentioned method when executed.
The embodiment of the application provides a method, a device and equipment for labeling file differences and a computer-readable storage medium, and a file to be labeled and a reference file corresponding to the file to be labeled are obtained, and because at least one page of the file to be labeled and a corresponding reference page of the reference file can be respectively subjected to feature extraction, a feature value of each page and a feature value of each reference page are obtained; therefore, the target page to be marked in the at least one page can be determined according to the characteristic value of the page and the characteristic value of the reference page, the target page is marked by adopting a preset marking mode, automatic identification and automatic marking of the difference content are achieved, the difference content can be conveniently checked by a user, and the experience of the user is greatly improved.
Drawings
In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views. Like reference numerals having different letter suffixes may represent different examples of similar components. The drawings illustrate generally, by way of example, but not by way of limitation, various embodiments discussed herein.
Fig. 1 is a schematic flow chart illustrating an implementation of an optional file difference annotation method according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating an implementation of an optional file difference annotation method according to an embodiment of the present application;
fig. 3 is a schematic flow chart illustrating an implementation of an optional file difference annotation method according to an embodiment of the present application;
fig. 4 is a schematic flow chart illustrating an implementation of an optional file difference annotation method according to an embodiment of the present application;
fig. 5A is a schematic flow chart illustrating an implementation of an optional file difference annotation method according to an embodiment of the present application;
FIG. 5B is a diagram of an alternative document bookmark structure provided by embodiments of the present application;
fig. 5C is a schematic view of an optional overview browsing view of the page crc values provided in the embodiment of the present application;
FIG. 5D is a diagram illustrating an alternative difference overview annotation view for a single pair of pages provided by an embodiment of the present application;
FIG. 5E is a diagram illustrating an alternative annotated view of the item-by-item differentiated content of a page provided by an embodiment of the present application;
FIG. 6 is a schematic structural diagram of an optional document difference annotation device provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a component of an optional document difference annotation device according to an embodiment of the present application.
Detailed Description
In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in further detail with reference to the accompanying drawings, the described embodiments should not be considered as limiting the embodiments of the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the embodiments of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of the present application belong. The terminology used in the embodiments of the present application is for the purpose of describing the embodiments of the present application only and is not intended to be limiting of the present application.
Example one
The embodiment of the present application provides a method for annotating file differences, where functions implemented by the method for annotating file differences in this embodiment can be implemented by invoking program codes by a processor in a device for annotating file differences, and certainly, the program codes can be stored in a computer-readable storage medium, and as can be seen, the device for annotating file differences at least includes a processor and a computer-readable storage medium.
Fig. 1 is a schematic flow chart of an implementation of a selectable file difference labeling method provided in an embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
step S101, a file to be annotated and a reference file corresponding to the file to be annotated are obtained.
In some embodiments, the file to be annotated may be a modified file, or may be a file before modification, and correspondingly, the reference file corresponding to the file to be annotated may also be a file before modification or a file after modification.
In some embodiments, the reference file corresponding to the file to be annotated may also be a standard file, and correspondingly, the file to be annotated may be a comparison file compared with the standard file.
In the embodiment of the present application, formats of a file to be annotated and a reference file of the file to be annotated are not limited, for example, the file to be annotated and the reference file may both be in a Word format, an Excel format, or an Txt format.
Here, the specific content of the file to be annotated and the reference file of the file to be annotated is also not limited, and may include, for example, symbols, text, pictures, or formulas.
Step S102, respectively extracting characteristics of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a characteristic value of each page and a characteristic value of each reference page.
In some embodiments, the feature text of each page of the file to be labeled is extracted, and the feature value of each page of the file to be labeled is obtained.
In some embodiments, feature texts of corresponding reference pages of the reference file are respectively extracted, and a feature value of each reference page of the reference file is obtained.
Step S103, determining a target page to be labeled in the at least one page according to the characteristic value of the page and the characteristic value of the reference page.
In some embodiments, comparing the feature value of each page obtained in the step S102 with the feature value of the corresponding reference page, if the feature value of a specific page in the pages is different from the feature value of the corresponding reference page, determining that the specific page is the target page to be labeled.
In some embodiments, if the feature value of a specific page in the above pages is equal to the feature value of the corresponding reference page, it indicates that the specific page is not different from the corresponding reference page, and no labeling is required.
And step S104, labeling the target page by adopting a preset labeling mode.
In some embodiments, the preset labeling manner may be any one of labeling manners, for example, underlining, a dashed box, adding a bookmark, highlighting a page number, and the like, and the labeling manner is not limited in this embodiment.
The marking of the target page by using a preset marking mode means that any one of the marking modes can be used for marking the target page so as to distinguish the target page from other pages.
The embodiment of the application provides a method for labeling file differences, which comprises the steps of obtaining a file to be labeled and a reference file corresponding to the file to be labeled, and extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file respectively to obtain a feature value of each page and a feature value of each reference page; therefore, the target page to be marked in the at least one page can be determined according to the characteristic value of the page and the characteristic value of the reference page, the target page is marked by adopting a preset marking mode, automatic identification and automatic marking of the difference content are achieved, the difference content can be conveniently checked by a user, and the experience of the user is greatly improved.
Example two
The embodiment of the present application provides a method for annotating file differences, where functions implemented by the method for annotating file differences in this embodiment can be implemented by invoking program codes by a processor in a device for annotating file differences, and certainly, the program codes can be stored in a computer-readable storage medium, and as can be seen, the device for annotating file differences at least includes a processor and a computer-readable storage medium.
Fig. 2 is a schematic flow chart of an implementation of a selectable file difference labeling method provided in an embodiment of the present application, and as shown in fig. 2, the method includes the following steps:
step S201, a file to be annotated and a reference file corresponding to the file to be annotated are obtained.
Step S202, respectively extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a feature value of each page and a feature value of each reference page.
Step S203, determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page.
Steps S201 to S203 are the same as the processes and functions implemented in steps S101 to S103 in the above-described embodiment.
Step S204, obtaining the pixel of at least one region in the target page and the pixel of a reference region corresponding to the region in the reference page.
In some embodiments, after determining the target page, in order to determine which part of the content of the target page is different from the reference page, the target page and the reference page corresponding to the target page are subjected to pixel analysis.
In the embodiment of the application, the pixels of each region of the target page and the pixels of the corresponding region of the reference page are obtained. Here, the size of the area is not limited, and the user may manually set the size of the area according to actual needs.
In the embodiment of the present application, the pixel includes both position information and color value information, for example, the color value information may be RGB information.
Step S205, determining a target area to be labeled in the at least one area according to the pixels of the area and the pixels of the reference area.
In some embodiments, it is determined whether the pixel of each region in step S204 is consistent with the pixel of the corresponding reference region, and the target region to be labeled is determined according to the determination result.
And S206, labeling the target area in the target page by adopting the preset labeling mode.
In some embodiments, the predetermined labeling manner may be any labeling manner, such as underlining, dashed-line frame, bookmarking, highlighting, and the like. The labeling manner is not limited in the embodiment of the application.
Here, the marking of the target area by using a preset marking method means that the target area can be marked by using any one of the above marking methods to distinguish the target area from other areas.
Step S207, adding a primary label to each labeled target page, and adding a secondary label to each labeled target area.
In some embodiments, after the target page and the target area are labeled, a primary label and a secondary label are added to the target page and the target area, respectively, so that a user can directly view difference content to be viewed according to the labels.
And S208, generating a labeling catalog of the file to be labeled according to the primary label and the secondary label.
In some embodiments, a callout catalog containing both difference pages and difference content may be generated after adding a level one tag to the target page and after adding a level two tag to the target area.
Step S209, according to the labeling catalogue, checking the target area in the target page or any target page.
In some embodiments, the annotation catalog generated in step S208 is used to refer to the difference page and the difference content that need to be viewed as needed.
The embodiment of the application provides a method for labeling file differences, and after a target page is determined, labeling of the target area in the target page is realized according to pixels in the area and pixels in a reference area, and a labeling directory is generated by adding a primary label to the target page and adding a secondary label to the target area for each labeled target area, so that a user can visually look up the difference content of two files at any time according to the labeled directory, and the experience of the user is greatly improved.
EXAMPLE III
The embodiment of the present application provides a method for annotating file differences, where functions implemented by the method for annotating file differences in this embodiment can be implemented by invoking program codes by a processor in a device for annotating file differences, and certainly, the program codes can be stored in a computer-readable storage medium, and as can be seen, the device for annotating file differences at least includes a processor and a computer-readable storage medium.
Fig. 3 is a schematic flow chart of an implementation of a selectable file difference labeling method provided in an embodiment of the present application, and as shown in fig. 3, the method includes the following steps:
step S301, a file to be annotated and a reference file corresponding to the file to be annotated are obtained.
Step S302, respectively extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a feature value of each page and a feature value of each reference page.
Step S303, determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page.
Step S304, obtaining the pixel of at least one region in the target page and the pixel of a reference region corresponding to the region in the reference page.
Steps S301 to S304 are the same as the processes and functions realized in steps S201 to S204 in the above-described embodiment.
Step S305, when the pixel of any one of the regions is different from the pixel of the corresponding reference region, determining the corresponding region as the target region to be labeled.
In some embodiments, the pixels of each region of the target page and the pixels of each corresponding region of the reference page acquired in step S304 are determined, and when the pixels of any one of the regions are different from the pixels of the corresponding reference region, it indicates that the contents of the regions in the two documents are different, and the region is determined to be the target region to be labeled.
And S306, adding an identifier to the target area to form a page difference identification chart.
In some embodiments, the identifier comprises: oval, rectangular dotted outline frame, circular frame, etc. of different colors.
In some embodiments, the page difference identifier map comprises: the labeled target page and the corresponding reference page form a labeled graph.
In some embodiments, the page difference identifier map further comprises: the labeled target area and the corresponding reference area constitute a labeled graph.
Step S307, acquiring difference description information corresponding to the target area.
In some embodiments, the difference description information comprises: type of difference, number of differences, and text description of differences.
In some embodiments, after a target area is determined and labeled, the difference type of the target area is judged, the difference number corresponding to the different difference types of the target area is counted, and the difference content is formed into a text description.
In some embodiments, the difference types include: types such as new, delete, connection modification, attribute modification, etc. in the embodiment of the present application, the difference types are not limited to the difference types described above, and include any types that may actually occur.
In some embodiments, the difference description information includes a difference type, a difference number, and/or a textual description of the difference.
Step S308, adding the difference description information to the page difference identification chart to form a labeled target page.
In some embodiments, the text description of the difference type, the difference number and/or the difference is added to the page difference representation to form a labeled target page.
Step S309, displaying the page difference identifier map or the labeled target page in a page difference overview view mode.
In some embodiments, the displaying the page difference identifier map in a page difference overview view includes: and displaying the marked target page and the corresponding reference page in a mode of a difference overview view.
In some embodiments, the displaying the labeled target page in a page difference overview view further includes: and displaying the marked target page, the corresponding reference page and the difference description information in a difference overview view mode.
In some embodiments, the displaying the page difference identifier map or the annotated target page in a page difference overview view further includes displaying difference description information in a page difference overview.
Step S310, displaying the page difference identification chart or the labeled target page in a page item-by-item difference view mode.
In some embodiments, the displaying the page difference identifier map in a page item-by-item difference view includes displaying the target area and the corresponding reference area which have been marked in a page item-by-item difference view.
In some embodiments, the displaying the labeled target page in a page item-by-item difference view manner further includes displaying the labeled target area, the corresponding reference area, and the text description of the difference in a page item-by-item difference view manner.
In some embodiments, the displaying the page difference identifier map or the labeled target page in a page item-by-item difference view further includes displaying a text description of the difference in a page difference overview.
The embodiment of the application provides a method for labeling file differences, and after a target area is determined, an identifier can be added to the target area to form a page difference identification graph, and difference description information corresponding to the target area is obtained, so that a labeled target page can be generated, and the labeled page can be displayed in a page difference overview view or page item-by-item difference view mode, so that a user can conveniently and visually look up the difference content of two files at any time, and the experience of the user is greatly improved.
Example four
The embodiment of the present application provides a method for annotating file differences, where functions implemented by the method for annotating file differences in this embodiment can be implemented by invoking program codes by a processor in a device for annotating file differences, and certainly, the program codes can be stored in a computer-readable storage medium, and as can be seen, the device for annotating file differences at least includes a processor and a computer-readable storage medium.
Fig. 4 is a schematic flow chart of an implementation of a selectable file difference labeling method provided in an embodiment of the present application, and as shown in fig. 4, the method includes the following steps:
step S401, a file to be annotated and a reference file corresponding to the file to be annotated are obtained.
Step S401 is the same as the procedure and function realized by step S101 in the above-described embodiment.
And S402, extracting the first characteristic text of each page and the second characteristic text of the corresponding reference page.
In some embodiments, the first feature text refers to a symbol, a word, a picture, a formula, or the like with specificity in a page.
In some embodiments, the second feature text refers to a symbol, a word, a picture, a formula, or the like with specificity in the reference page.
In the embodiment of the present application, the types of the first feature text and the second feature text are not limited.
Step S403, respectively performing binary conversion on the first feature text and the second feature text to obtain first binary data corresponding to the first feature text and second binary data corresponding to the second feature text.
In some embodiments, the binary converting the first feature text and the second feature text respectively to obtain first binary data corresponding to the first feature text and second binary data corresponding to the second feature text includes: a first American Standard Code for Information Interchange (ASCII) Code corresponding to the first feature text and a second ASCII Code corresponding to the second feature text are found out in terms of a character set.
In some embodiments, the binary converting the first feature text and the second feature text respectively to obtain first binary data corresponding to the first feature text and second binary data corresponding to the second feature text further includes: the first ASCII code is converted into first binary data, and the second ASCII code is converted into second binary data.
Step S404, performing logical operation processing on the first binary data and the second binary data respectively to obtain a feature value of the page and a feature value of the reference page.
In some embodiments, the logical operation processing includes at least: and (4) carrying out exclusive-or operation.
In some embodiments, the performing a logical operation on the first binary data and the second binary data to obtain the feature value of the page and the feature value of the reference page respectively includes: and respectively carrying out one or more times of XOR operation processing on the first binary data and the second binary data to obtain the characteristic value of the page and the characteristic value of the reference page.
Step S405, determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page.
And S406, labeling the target page by adopting a preset labeling mode.
Steps S405 and S406 are the same as the procedure and the function realized by steps S103 and S104 in the above-described embodiment.
The embodiment of the application provides a method for labeling file differences, which comprises the steps of obtaining a file to be labeled and a reference file corresponding to the file to be labeled, extracting feature texts respectively from at least one page of the file to be labeled and the corresponding reference page of the reference file, and performing binary conversion processing and logical operation processing on the feature texts to obtain a feature value of each page and a feature value of each reference page; therefore, the target page to be marked in the at least one page can be determined according to the characteristic value of the page and the characteristic value of the reference page, and the target page is marked by adopting a preset marking mode, so that the difference page can be conveniently judged by calculating the characteristic value, a user can quickly position the difference page, and the experience of the user is greatly improved.
EXAMPLE five
Fig. 5A is a schematic flow chart illustrating an implementation process of an optional file difference labeling method provided in an embodiment of the present application, and as shown in fig. 5A, the method includes the following steps:
step S501, two visual program files to be compared are obtained, the feature text of the visual page is calculated, the visual page is analyzed and compared, and the difference content and the corresponding graphic symbols are obtained.
Here, the visualization program file (corresponding to the file to be annotated described above) is organized in a hierarchical structure of device-plug-in-processor-element-page. In the embodiment of the application, a Cyclic Redundancy Code (CRC) of a feature text of a visualized page in each visualized program file may be calculated, where a page with a consistent CRC is an unmodified page, and a page with a same name and a different CRC and a same layer structure is a single pair of matched modified pages. And the page with the difference and the difference information list can be obtained through the comparative analysis of visual comparison software.
And step S502, forming document bookmark contents in a portable document format according to the difference pages and the difference information list.
Fig. 5B is a schematic diagram of an optional Document bookmark structure provided in the embodiment of the present application, and as shown in fig. 5B, a Document bookmark structure in a Portable Document Format (PDF) includes: the page CRC summary browsing view node, the single-pair page difference overview annotation view node and the single-pair page item-by-item difference content annotation view node display the difference document structure through the layering node.
For example: xx file 51 includes: a CRC view 52, a page overview callout 53 and a page detail difference callout 54. Wherein, the page overview callout view 53 includes: page 1, page 2 …, page n, and other differential pages; the page detail difference annotation graph comprises each difference view in the page.
A user adds a bookmark to a document by calling an operation interface of a development library (PDFlib library) for creating a PDF document, firstly, an action handle goto _ action for jumping to a pagenum target page is created, then an option character string for creating a new label is generated, the option character string comprises an action event, an action handle, bold text and a label color which are black and are used for triggering operation, and finally, the bookmark is created through a function create _ bookmark (str1, str 2).
The code to add bookmarks is as follows:
String optlist="destination={page pagenum}";
action=p.create_action("GoTo",optlist);
optlist=
"action={activate"+action+"}fontstyle=bold textcolor={rgb 0 0 0}";
catalog _ bookmark ═ p.create _ bookmark ("CRC view", openlist).
Step S503, forming a page CRC summary browsing view of the PDF document by counting the page information with the difference.
Fig. 5C is a schematic view of an optional page CRC summary view according to an embodiment of the present disclosure, as shown in fig. 5C, the page CRC summary view is a tabular view, the table has 5 columns, which are respectively a serial number, a page name, CRC1, CRC2, and a page number, and in some embodiments, the table can be automatically split into multiple pages.
The page number in the page CRC summary browsing view is a jump link in the PDF document, and the jump to the associated single-pair page difference overview annotation view can be realized by clicking the link. The method comprises the steps of adding jump links to jump pages by calling a PDFlib library operation interface, firstly, matching jump page text, adding underlines to strip pages, obtaining a matching area named as kraxi, then creating jump action of jumping to a target page, and finally creating a jump link type annotation in the kraxi area. The code to add bookmarks is as follows:
String optlist="matchbox={name=kraxi}fillcolor={rgb 0 0 1}underline";
p.fit_textline("pagenun",2,20,optlist);
optlist="destination={page pagenum}";
action=p.create_action("GoTo",optlist);
optlist="action={activate"+action+"}linewidth=0matchbox={kraxi}";
p.create_annotation(0,0,0,0,"Link",optlist)。
step S504, generating the difference overview annotation view and the summary description information of the single pair of pages of the PDF document through the bookmark content of the portable document.
Fig. 5D is a schematic diagram of an optional difference overview annotation view for a single pair of pages provided in the embodiment of the present application, and as shown in fig. 5D, the difference overview annotation view for the single pair of pages is composed of three parts, including a page graphic region before modification, a page graphic region after modification, and a difference description text region. And marking the area surrounded by the graphic symbol corresponding to each difference item by adopting a colored oval or rectangular dotted outline frame. The difference description text area mainly comprises summary description information including difference item number, new symbol difference overview annotation view number, deleted symbol difference overview annotation view number, data connection modification difference overview annotation view number and symbol attribute modification total number. And drawing a difference symbol, a marked dotted line frame connected with data and a view statistical information text in the view based on a page comparison view of visual comparison software, and finally generating a PDF document page.
And step S505, generating a label view and description information of the item-by-item difference content of a single pair of pages of the PDF document according to the bookmark content of the portable document.
Fig. 5E is a schematic diagram of an optional annotation view for item-by-item difference content of a page provided in an embodiment of the present application, and as shown in fig. 5E, the annotation view for item-by-item difference content is based on a difference overview annotation view, but only displays a standard area of 1 difference item and a corresponding difference description, including: newly-built single symbol, deleted single symbol, data connection line modification information of single symbol, and single symbol attribute modification content. And drawing a marked dotted line frame of the difference item and a detailed information text of the difference description in the view based on a page comparison view of visual comparison software, and finally generating a PDF document page.
For the newly-built page, only a difference overview annotation view of a single pair of pages is provided, the view only displays the newly-built page, and the page before modification is empty; or for a deleted page, the view only displays the deleted page, with the modified page empty.
EXAMPLE six
The embodiment provides a device for annotating file differences, which comprises modules and sub-modules, and can be implemented by a processor in the device for annotating file differences; of course, it may also be implemented by logic circuitry; in implementation, the processor may be a Central Processing Unit (CPU), a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 6 is a schematic structural diagram of an optional apparatus for annotating document differences according to an embodiment of the present application, and as shown in fig. 6, the apparatus 60 for annotating document differences includes:
the first obtaining module 61 is configured to obtain a file to be annotated and a reference file corresponding to the file to be annotated.
The first processing module 62 is configured to perform feature extraction on at least one page of the document to be labeled and a corresponding reference page of the reference document, respectively, to obtain a feature value of each page and a feature value of each reference page.
A first determining module 63, configured to determine, according to the feature value of the page and the feature value of the reference page, a target page to be labeled in the at least one page.
And the labeling module 64 is configured to label the target page in a preset labeling manner.
In some embodiments, the apparatus further comprises: a second obtaining module, configured to obtain pixels of at least one region in the target page and pixels of a reference region corresponding to the region in the reference page; a second determining module, configured to determine, according to the pixels of the region and the pixels of the reference region, a target region to be labeled in the at least one region; the marking module is further used for marking the target area in the target page by adopting the preset marking mode.
In some embodiments, the first determining module is further configured to determine a corresponding region as the target region to be labeled when a pixel of any one of the regions is different from a pixel of the corresponding reference region.
In some embodiments, the labeling module is further configured to add an identifier to the target area to form a page difference identifier map; acquiring difference description information corresponding to the target area; adding the difference description information to the page difference identification graph to form a labeled target page; and displaying the page difference identification graph or the labeled target page.
In some embodiments, the labeling module is further configured to display the page difference identifier map or the labeled target page in a page difference overview view; or displaying the page difference identifier map or the labeled target page in a page item-by-item difference view mode.
In some embodiments, the first processing module is further configured to extract a first feature text of each page and a second feature text of a corresponding reference page; binary conversion is respectively carried out on the first characteristic text and the second characteristic text, and first binary data corresponding to the first characteristic text and second binary data corresponding to the second characteristic text are obtained; and respectively carrying out logic operation processing on the first binary data and the second binary data to obtain the characteristic value of the page and the characteristic value of the reference page.
In some embodiments, the apparatus further comprises: the tag adding module is used for adding a primary tag to each marked target page and adding a secondary tag to each marked target area; the third generation module is used for generating a labeling catalogue of the file to be labeled according to the primary label and the secondary label; and the viewing module is used for viewing the target page or the target area in any target page according to the labeling catalogue.
It should be noted that the description of the apparatus in the embodiment of the present application is similar to the description of the method embodiment, and has similar beneficial effects to the method embodiment, and therefore, the description is not repeated. For technical details not disclosed in the embodiments of the present apparatus, reference is made to the description of the method embodiments of the present application for understanding.
EXAMPLE seven
In the embodiment of the present application, if the method for labeling document differences is implemented in the form of software functional modules, and is sold or used as an independent product, the method may also be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium and includes several instructions for causing a terminal to execute all or part of the methods according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Correspondingly, an embodiment of the present application provides a device for labeling file differences, including: a memory for storing executable instructions; and the processor is used for realizing the file difference labeling method provided by the embodiment when executing the executable instructions stored in the memory.
The embodiment of the present application provides a computer-readable storage medium, which stores executable instructions for causing a processor to implement the method for annotating file differences provided in the foregoing embodiment when executed.
Fig. 7 is a schematic structural diagram of a component of an optional document difference annotation device provided in an embodiment of the present application, and as shown in fig. 7, the document difference annotation device 70 at least includes: a processor 71, a communication interface 72, and a computer-readable storage medium 73 configured to store executable instructions, wherein: the processor 71 generally controls the overall operation of the annotation device 70 for differences in documents.
The communication interface 72 may enable the annotating device of the file differencing to communicate with other devices over a network.
The computer-readable storage medium 73 is configured to store instructions and applications executable by the processor 71, and may also buffer data to be processed or processed by each module in the annotation device 70 for differences between the processor 71 and files, and may be implemented by a flash Memory (F L ASH) or a Random Access Memory (RAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, so that a process, a method or an apparatus including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned computer-readable storage media comprise: various media that can store program code, such as removable storage devices, read-only memories, magnetic or optical disks, etc. Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium and includes several instructions for causing a terminal to execute all or part of the methods according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: a removable storage device, a ROM, a magnetic or optical disk, or other various media that can store program code.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present invention, and all such changes or substitutions are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The methods disclosed in the several method embodiments provided in the embodiments of the present application can be combined arbitrarily without conflict to obtain a new method embodiment.
Features disclosed in several product embodiments provided in the embodiments of the present application may be combined arbitrarily without conflict, to obtain a new product embodiment.
The features disclosed in several of the method or apparatus embodiments provided in the embodiments of the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for labeling file differences is characterized by comprising the following steps:
acquiring a file to be marked and a reference file corresponding to the file to be marked;
respectively extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a feature value of each page and a feature value of each reference page;
determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page;
and marking the target page by adopting a preset marking mode.
2. The method of claim 1, further comprising:
acquiring pixels of at least one region in the target page and pixels of a reference region corresponding to the region in the reference page;
determining a target area to be marked in the at least one area according to the pixels of the area and the pixels of the reference area;
correspondingly, the marking the target page by adopting a preset marking mode comprises the following steps:
and marking the target area in the target page by adopting the preset marking mode.
3. The method according to claim 2, wherein the determining a target region to be labeled in the at least one region according to the pixels of the region and the pixels of the reference region comprises:
and when the pixel of any one region is different from the pixel of the corresponding reference region, determining the corresponding region as the target region to be labeled.
4. The method according to claim 2, wherein the labeling the target area in the target page in the preset labeling manner includes:
adding an identifier to the target area to form a page difference identification graph;
acquiring difference description information corresponding to the target area;
adding the difference description information to the page difference identification graph to form a labeled target page;
the method further comprises the following steps: and displaying the page difference identification graph or the labeled target page.
5. The method according to claim 4, wherein said displaying the page difference identifier map or the labeled target page comprises:
displaying the page difference identification diagram or the labeled target page in a page difference overview view mode; alternatively, the first and second electrodes may be,
and displaying the page difference identification graph or the labeled target page in a page item-by-item difference view mode.
6. The method according to any one of claims 1 to 5, wherein the performing feature extraction on at least one page of the document to be labeled and a corresponding reference page of the reference document respectively to obtain a feature value of each page and a feature value of each reference page comprises:
extracting a first feature text of each page and a second feature text of a corresponding reference page;
binary conversion is respectively carried out on the first characteristic text and the second characteristic text, and first binary data corresponding to the first characteristic text and second binary data corresponding to the second characteristic text are obtained;
and respectively carrying out logic operation processing on the first binary data and the second binary data to obtain the characteristic value of the page and the characteristic value of the reference page.
7. The method according to any one of claims 2 to 5, further comprising:
adding a primary label to each marked target page, and adding a secondary label to each marked target area;
generating a labeling catalog of the file to be labeled according to the primary label and the secondary label;
and viewing the target area in the target page or any target page according to the labeling catalog.
8. A device for marking document differences is characterized by comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a file to be annotated and a reference file corresponding to the file to be annotated;
the first processing module is used for respectively extracting features of at least one page of the file to be labeled and a corresponding reference page of the reference file to obtain a feature value of each page and a feature value of each reference page;
the first determining module is used for determining a target page to be marked in the at least one page according to the characteristic value of the page and the characteristic value of the reference page;
and the marking module is used for marking the target page in a preset marking mode.
9. A device for marking document differences is characterized by comprising:
a memory for storing executable instructions; a processor for implementing the method of any one of claims 1 to 7 when executing executable instructions stored in the memory.
10. A computer-readable storage medium having stored thereon executable instructions for causing a processor, when executed, to implement the method of any one of claims 1 to 7.
CN202010136312.0A 2020-03-02 2020-03-02 Method, device and equipment for marking file differences and computer-readable storage medium Pending CN111460763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010136312.0A CN111460763A (en) 2020-03-02 2020-03-02 Method, device and equipment for marking file differences and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010136312.0A CN111460763A (en) 2020-03-02 2020-03-02 Method, device and equipment for marking file differences and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN111460763A true CN111460763A (en) 2020-07-28

Family

ID=71685112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010136312.0A Pending CN111460763A (en) 2020-03-02 2020-03-02 Method, device and equipment for marking file differences and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111460763A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632952A (en) * 2020-12-08 2021-04-09 中国建设银行股份有限公司 Method and device for comparing files
CN113836096A (en) * 2021-09-27 2021-12-24 北京来也网络科技有限公司 File comparison method, device, equipment, medium and system based on RPA and AI
CN113836092A (en) * 2021-09-27 2021-12-24 北京来也网络科技有限公司 File comparison method, device, equipment and storage medium based on RPA and AI
CN113900853A (en) * 2021-11-03 2022-01-07 中国南方电网有限责任公司超高压输电公司昆明局 Method, device and equipment for checking direct current control protection program and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294535A (en) * 2016-07-19 2017-01-04 百度在线网络技术(北京)有限公司 The recognition methods of website and device
CN109815426A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Page info detection method and device, terminal and computer readable storage medium
CN110619103A (en) * 2019-09-18 2019-12-27 珠海格力电器股份有限公司 Webpage image-text detection method and device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294535A (en) * 2016-07-19 2017-01-04 百度在线网络技术(北京)有限公司 The recognition methods of website and device
CN109815426A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Page info detection method and device, terminal and computer readable storage medium
CN110619103A (en) * 2019-09-18 2019-12-27 珠海格力电器股份有限公司 Webpage image-text detection method and device and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632952A (en) * 2020-12-08 2021-04-09 中国建设银行股份有限公司 Method and device for comparing files
CN113836096A (en) * 2021-09-27 2021-12-24 北京来也网络科技有限公司 File comparison method, device, equipment, medium and system based on RPA and AI
CN113836092A (en) * 2021-09-27 2021-12-24 北京来也网络科技有限公司 File comparison method, device, equipment and storage medium based on RPA and AI
CN113900853A (en) * 2021-11-03 2022-01-07 中国南方电网有限责任公司超高压输电公司昆明局 Method, device and equipment for checking direct current control protection program and storage medium

Similar Documents

Publication Publication Date Title
CN111460763A (en) Method, device and equipment for marking file differences and computer-readable storage medium
US10929449B2 (en) Generating a structured document guiding view
US9411790B2 (en) Systems, methods, and media for generating structured documents
US8494287B2 (en) Character identification through glyph data matching
CN110738037B (en) Method, apparatus, device and storage medium for automatically generating electronic form
US9449031B2 (en) Sorting and filtering a table with image data and symbolic data in a single cell
CN106021394A (en) Website construction method and apparatus
CN113515928B (en) Electronic text generation method, device, equipment and medium
US10817651B2 (en) Method for referring to specific content on a web page and web browsing system
CN111797594B (en) Character string processing method based on artificial intelligence and related equipment
CN103593378A (en) Terminal and method for determining type of input method editor
CN109948518B (en) Neural network-based PDF document content text paragraph aggregation method
CN110956023B (en) Annotation display method and device
CN106970913A (en) The extracting method and device of a kind of time
CN111813929A (en) Information processing method and device and electronic equipment
Apostolova et al. Combining visual and textual features for information extraction from online flyers
CN107562450A (en) A kind of cross-platform method for visualizing of local chronicle resource
CN112579937A (en) Character highlight display method and device
CN113515221A (en) Picture and character comparison display method and device based on electronic document
CN104216868A (en) Adaptation method and device for document display format
CN108170838B (en) Topic evolution visualization display method, application server and computer readable storage medium
CN115983202A (en) Data processing method, device, equipment and storage medium
CN110807298B (en) Method and system for processing marking information
CN110597980B (en) Data processing method and device and computer readable storage medium
CN106776489B (en) Electronic document display method and system of display device

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