CN115688711B - Document merging method, device, equipment and storage medium - Google Patents

Document merging method, device, equipment and storage medium Download PDF

Info

Publication number
CN115688711B
CN115688711B CN202211713778.8A CN202211713778A CN115688711B CN 115688711 B CN115688711 B CN 115688711B CN 202211713778 A CN202211713778 A CN 202211713778A CN 115688711 B CN115688711 B CN 115688711B
Authority
CN
China
Prior art keywords
document
information
annotation
set information
merged
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211713778.8A
Other languages
Chinese (zh)
Other versions
CN115688711A (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.)
Sinochem Agriculture Holdings
Original Assignee
Sinochem Agriculture Holdings
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 Sinochem Agriculture Holdings filed Critical Sinochem Agriculture Holdings
Priority to CN202211713778.8A priority Critical patent/CN115688711B/en
Publication of CN115688711A publication Critical patent/CN115688711A/en
Application granted granted Critical
Publication of CN115688711B publication Critical patent/CN115688711B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The invention provides a document merging method, a device, equipment and a storage medium, which relate to the technical field of computers and comprise the following steps: acquiring first annotation set information of a first document and second annotation set information of a second document; determining an operation enumeration type and a first position sequence number according to the first batch aggregation information; merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information; and updating the first document by utilizing the merged data set information to obtain a target merged document. According to the method and the device, the operation enumeration type and the first position sequence number are determined according to the annotations in the documents, so that the data information in each document is merged based on the operation enumeration type and the first position sequence number to obtain the target merged document, a user can conveniently search and compare data in the target merged document, the technical problem of complex file searching and management is solved, and the cost of manual management is reduced.

Description

Document merging method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for merging documents.
Background
In B2B (Business to Business), the signing of the cooperation agreement is often involved, and in order to ensure the legal effect of the cooperation, the generation of an online contract and the authentication of the online contract are performed in the stage of signing.
After the subscription authentication, there may be a case where the service is adjusted or the customer demand is changed, and the supplementary agreement needs to be signed again. However, when the number of signatures of the supplementary agreement is excessive, review, storage, and management of the respective cooperation agreement files become complicated, resulting in high costs of manual management.
Disclosure of Invention
The invention provides a document merging method, a device, equipment and a storage medium, aiming at solving the technical problem of complex protocol file lookup, storage and management and reducing the cost of manual management.
The invention provides a document merging method, which comprises the following steps:
acquiring first annotation set information of a first document and second annotation set information of a second document;
determining an operation enumeration type and a first position sequence number according to the first batch aggregation information;
merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information;
and updating the first document by using the merged data set information to obtain a target merged document.
According to the document merging method provided by the invention, the first comment set information comprises first comment information and first to-be-processed data information, and the first comment information comprises a comment type label and a first position sequence number; the second annotation set information comprises second annotation information and second to-be-processed data information, and the second annotation information comprises a second position sequence number.
According to a document merging method provided by the present invention, determining an operation enumeration type and a first position order according to the first batch aggregation information includes:
extracting the first position serial number and the annotation type label from the first annotation collection information;
and determining an operation enumeration type corresponding to the annotation type label according to a preset operation type constraint rule, wherein the operation type constraint rule represents a mapping rule between the annotation type label and the operation enumeration type.
According to a document merging method provided by the present invention, merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position number to obtain merged data set information, includes:
inquiring a target position serial number which is the same as the first position serial number in a second position serial number of the second annotation set information;
merging the first to-be-processed data information and the second to-be-processed data information of the target position serial number based on the operation enumeration type corresponding to the first position serial number to obtain target processing data information;
and forming the merged data set information based on the first position sequence number, the operation enumeration type and the target processing data information.
According to a document merging method provided by the present invention, the updating the first document by using the merged data set information to obtain a target merged document includes:
and replacing the first to-be-processed data information corresponding to the first position sequence number in the first document with the target processing data information in the merged data set information to obtain the target merged document.
According to a document merging method provided by the present invention, the acquiring first comment set information of a first document and second comment set information of a second document includes:
acquiring a first document and a second document;
reading first comment information in the first document and first to-be-processed data information corresponding to the first comment information;
forming the first batch collection information based on the first batch information and first to-be-processed data information corresponding to the first batch information;
reading second annotation information in the second document and second to-be-processed data information corresponding to the second annotation information;
and forming the second annotation set information based on the second annotation information and second to-be-processed data information corresponding to the second annotation information.
According to a document merging method provided by the present invention, the obtaining the first document and the second document includes:
acquiring each incoming document;
reading a file name of each incoming document to divide each incoming document into the first document and the second document based on the file name.
The present invention also provides a document merging apparatus, comprising:
the acquisition module is used for acquiring first comment set information of a first document and second comment set information of a second document;
the determining module is used for determining an operation enumeration type and a first position sequence number according to the first batch set information;
the processing module is used for merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information;
and the updating module is used for updating the first document by utilizing the merged data set information to obtain a target merged document.
The present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-mentioned document merging methods.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a document merging method as described in any of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a document merging method as described in any one of the above.
According to the document merging method, the device, the equipment and the storage medium, the operation enumeration type and the first position sequence number are determined according to the annotation information in the first document, so that the data information in each document is merged based on the operation enumeration type and the first position sequence number to obtain the target merged document, a user can conveniently search and compare data in the target merged document, the technical problem that the protocol file is complex to look up, store and manage is solved, and the cost of manual management is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart diagram of a document merging method provided by the present invention;
FIG. 2 is a schematic structural diagram of a document merging apparatus provided in the present invention;
fig. 3 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the one or more embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the invention. As used in one or more embodiments of the present invention, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present invention refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that, although the terms first, second, etc. may be used herein to describe various information in one or more embodiments of the present invention, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present invention. Depending on the context, the word "if" as used herein may be interpreted as "at" \8230; … "when" or "when 8230; \8230"; "when".
FIG. 1 is a flowchart illustrating a document merging method according to the present invention. As shown in fig. 1, the document merging method includes:
step 11, acquiring first comment set information of a first document and second comment set information of a second document;
it should be noted that the first document represents an original protocol file, the second document is a supplementary protocol file that is modified and supplemented to the original protocol file, the format of the first document may be the same as the format of the second document, or may be different from the format of the second document, and preferably, when the formats of the first document and the second document are different, the format of the second document may be converted according to the format of the first document. For example: the format of the first document and the second document can be any document format such as Word, PPT, excel and the like.
It should be further noted that the first comment set information includes first comment information and first to-be-processed data information, where the first comment information includes a comment type tag annotated by a user in a first document and a first position number, for example, the first comment information is A1, where a represents the comment type tag, and 1 represents the first position number. The second annotation set information includes second annotation information and second to-be-processed data information, the second annotation information includes a second position sequence number, the first annotation information and the second annotation information are annotation information manually annotated in the document before the document is merged, the first to-be-processed data information is content data information corresponding to operations such as merging or deletion replacement required to be performed in the document, for example: adding an annotation to a certain word in a document, wherein the word is first to-be-processed data information, a first position sequence number and a second position sequence number represent position identifiers corresponding to operations of merging or deleting replacement and the like in the document, the annotation type tag, the first position sequence number and the first to-be-processed data information have an association relationship, the second to-be-processed data information and the second position sequence number have an association relationship, the same first position sequence number does not exist in the first document, and the same second position sequence number does not exist in the second document.
Specifically, as an implementable manner, incoming documents are acquired, file names corresponding to the documents are extracted, a first document is determined according to the file names corresponding to the documents, and the documents except the first document are used as the second document. For example, the name naming rule of the document is contract name + date + version number, and after the file name is identified, the first document may be determined according to the version number in the file name, or the text related to the main contract may be set in the name naming of the original agreement file in advance, so that the document with the main contract text in the file name is used as the first document according to the identified file name.
As another implementable manner, the first document may also be identified according to a file order, for example, the original protocol file is imported first, then the supplementary protocol file is imported, then the first identified document is used as the first document, and the later acquired document is used as the second document, where each document transmitted into the system includes one first document and at least one second document.
Further, reading, through a document reading interface, first comment information in the first document and first to-be-processed data information corresponding to the first comment information, so as to form the first comment set information based on the first comment information and the first to-be-processed data information corresponding to the first comment information, additionally, reading second comment information in the second document and second to-be-processed data information corresponding to the second comment information, and further forming the second comment set information based on the second comment information and the second to-be-processed data information corresponding to the second comment information. The Apache POI open source project provides an API interface to a Java program to perform reading and writing functions on Microsoft Office format documents.
Step 12, determining an operation enumeration type and a first position sequence number according to the first batch set information;
specifically, because the first comment set information includes a comment type tag and a first position order, in the first comment set information, a comment type tag and a first position order corresponding to the first comment information in the first comment set information are extracted, and then, based on the comment type tag, an operation enumeration type corresponding to the comment type tag is determined according to a preset operation type constraint rule, where it is to be noted that the operation type constraint rule represents a mapping rule between the preset comment type tag and the operation enumeration type, and the operation type constraint rule may set a series of mapping rules according to actual situations, for example, a comment type tag a is set to represent merge addition, that is, a second to-be-processed data information is added to the first to-be-processed data information of the first document, and a comment type tag B represents deletion.
Step 13, merging the first comment set information and the second comment set information based on the operation enumeration type and the first position sequence number to obtain merged data set information;
specifically, in the second position sequence number of the second annotation information, a target position sequence number that is the same as the first position sequence number is queried, and further, based on an operation enumeration type corresponding to the first position sequence number, the first to-be-processed data information corresponding to the first position sequence number and the second to-be-processed data information of the target position sequence number are processed according to the operation enumeration type to obtain target processed data information, and then based on the first position sequence number, the operation enumeration type, and the target processed data information, the merged data set information is formed.
And step 14, updating the first document by using the merged data set information to obtain a target merged document.
Specifically, according to the first position order in the merged data set information, replacing the first to-be-processed data information corresponding to the first position order in the first document with the target processed data information corresponding to the first position order in the merged data set information, so as to obtain an updated first document, and taking the updated first document as the target merged document.
In addition, after the target merged document is obtained, the target merged document is stored in a service, and a new document is regenerated for the user to download to the page, wherein in the new document, the first to-be-processed data information in the original first document and the second to-be-processed data information in the second document can be distinguished and displayed according to different colors, so that the user can conveniently search and compare data in the target merged document.
According to the embodiment of the invention, the operation enumeration type and the first position sequence number are determined according to the annotations in the first document, so that the data information in each document is merged based on the operation enumeration type and the first position sequence number to obtain the target merged document, a user can conveniently search and compare data in the target merged document, the technical problem of complex consulting, storing and managing of protocol files is solved, and the cost of manual management is reduced.
In an embodiment of the present invention, the step 13: merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information, wherein the merging includes:
inquiring a target position serial number which is the same as the first position serial number in a second position serial number of the second annotation set information; merging the first to-be-processed data information and the second to-be-processed data information of the target position serial number based on the operation enumeration type corresponding to the first position serial number to obtain target processing data information; and forming the merged data set information based on the first position sequence number, the operation enumeration type and the target processing data information.
Specifically, a target position sequence number identical to the first position sequence number is queried in a second position sequence number of the second annotation set information, and further, the first to-be-processed data information corresponding to the first position sequence number and the second to-be-processed data information corresponding to the target position sequence number are processed according to the operation enumeration type corresponding to the first position sequence number, so as to obtain target processing data information corresponding to the first position sequence number.
Additionally, when the first annotation set information has a plurality of associated first to-be-processed data information, annotation type tags and first position sequence numbers, and the second annotation set information includes a plurality of associated second to-be-processed data information and second position sequence numbers, the following steps are performed for any one first position sequence number: and matching and inquiring position serial numbers which are the same as the first position serial numbers in each second position serial number in the second annotation set information, further processing the first to-be-processed data information associated with the first position serial numbers and the second to-be-processed data information associated with the position serial numbers according to the operation enumeration type corresponding to the first position serial numbers to obtain target processing data information, and further forming the merged data set information based on all the first position serial numbers, the operation enumeration type and the target processing data information.
It is to be understood that the first wager set information is expressed as: masterList [ { num:1, type: a, data: demonstration one }, { num:2, type: b, data: demonstration two }, { num:3, type: c, data: demonstration three } ]; the second annotation set information is expressed as: elseList [ { num:1, data: exemplary four }, { num:2, data: demonstration five }, { num:3, data: example six } ], wherein num represents a position serial number (i.e., a first position serial number and a second position serial number in the embodiment), type represents an annotation type tag, and data represents to-be-processed data information corresponding to the annotation (i.e., first to-be-processed data information corresponding to the first annotation information and second to-be-processed data information corresponding to the second annotation information in the invention). Then, for a first position sequence number where num is 1 in first annotation set information, respectively querying a target position sequence number which is the same as the first position sequence number in the first annotation set information from a second position sequence number of second annotation set information, assuming that an annotation type tag a represents merging and appending, an annotation type tag B represents a deletion line of first to-be-processed data information in a first document, appending second to-be-processed data information of a second document, and an annotation type tag C represents second to-be-processed data information of the second document to directly replace the first to-be-processed data information in the first document, and further determining that an operation enumeration type is merging and appending based on the annotation type tag a corresponding to the first position sequence number, merging the first to-be-processed data information and the second to-be-processed data information of the target position sequence number, to obtain a processing procedure where the target processed data information is represented as demonstration one, a fourth, where num is 2 and 3, and the processing procedure where num is 1 are basically the same, and finally forming a merged data set information: mList [ { num:1, type: a, data: demonstration one, demonstration four, { num:2, type: b, data: demonstration five }, { num:3, type: b, data: demonstration six } ].
According to the embodiment of the invention, the first position sequence number of the first document is matched with the second position sequence number of the second document, so that the first data information to be processed and the second data information to be processed are processed according to the corresponding operation enumeration type to obtain the merged data set information, and therefore, the target merged document can be obtained according to the merged data set information and the first document, and a user can conveniently search and compare data in the target merged document.
In one embodiment of the present invention, the step 14: updating the first document by using the merged data set information to obtain a target merged document, wherein the target merged document comprises:
and replacing the first to-be-processed data information corresponding to the first position sequence number in the first document with the target processed data information in the merged data set information to obtain the target merged document.
Specifically, based on the first position order in the merged data set information, replacing the first to-be-processed data information corresponding to the first position order in the first document with the target processed data information corresponding to the first position order in the merged data set information, so as to obtain the target merged document.
It will be appreciated that the first batch set information is assumed to be represented as: masterList [ { num:1, type: a, data: demonstration one }, { num:2, type: b, data: demonstration two } ]; the consolidated data set information is represented as: mList [ { num:1, type: a, data: demonstration one, demonstration four, { num:2, type: b, data: demonstration five), the first to-be-processed data information (demonstration one) corresponding to the first position sequence number 1 in the first document is replaced by demonstration one, and the first to-be-processed data information (demonstration two) corresponding to the first position sequence number 2 is replaced by demonstration five.
According to the embodiment of the invention, the target processing data information in the merged data set information is backfilled to the first document according to the first position sequence number to obtain the target merged document, so that a user can conveniently search and compare data in the target merged document, and the cost of manual management is effectively reduced.
In an embodiment of the present invention, the step 11: acquiring first annotation set information of a first document and second annotation set information of a second document, wherein the acquiring comprises the following steps:
acquiring a first document and a second document; reading first batch comment information in the first document and first to-be-processed data information corresponding to the first batch comment information; forming the first batch set information based on the first batch information and first to-be-processed data information corresponding to the first batch information; reading second annotation information in the second document and second to-be-processed data information corresponding to the second annotation information; and forming the second annotation set information based on the second annotation information and second to-be-processed data information corresponding to the second annotation information.
Specifically, the user makes annotations in the document in advance before importing the document into the system. Further, the embodiment of the present invention provides a document import interface, where a user may directly import a document into a document through document selection, document copying, or dragging, so as to obtain each incoming document, further read a file name of each incoming document, divide each incoming document into the first document and the second document based on the file name, further read first file data information in the first document, further extract all first comment information annotated by the user and first to-be-processed data information corresponding to the first comment information from the first file data information, further store each first comment information and first to-be-processed data corresponding to the first comment information into a data set, form the first comment set information, and additionally read second file data information in the second document, further extract all second comment information annotated by the user and second to-be-processed data information corresponding to the second comment information from the second file data information, further store the second comment information and the second to-be-processed data set. When the number of the second documents is two or more, the set identifier of the second annotation set information may be set to distinguish the second annotation set information corresponding to different second documents, that is, the identifiers of the second annotation set information corresponding to different second documents are different, for example, there are two second documents, where the second annotation set information of one second document may be represented as elseList1, and the second annotation set information of another second document may be represented as elseList2.
It should be noted that, preferably, each first position order in the first comment information in the first document is different, and a second position order that is the same as the first position order exists in the second comment information in the second document, and preferably, for effective document merging, at least one second position order that is the same as the first position order may be obtained by querying in the second comment information corresponding to all the second documents.
According to the embodiment of the invention, the first endorsement set information and the second endorsement set information are formed by reading the endorsement information in the incoming document and the to-be-processed data information corresponding to the endorsement information, and a foundation is laid for merging the first endorsement set information and the second endorsement set information subsequently to obtain the target merged document.
The document merging device provided by the present invention is described below, and the document merging device described below and the document merging method described above may be referred to in correspondence with each other.
Fig. 2 is a schematic structural diagram of a document merging device provided by the present invention, and as shown in fig. 2, the document merging device according to an embodiment of the present invention includes:
the acquiring module 21 is configured to acquire first annotation set information of a first document and second annotation set information of a second document;
a determining module 22, configured to determine an operation enumeration type and a first position sequence number according to the first batch set information;
a processing module 23, configured to perform merging processing on the first annotation set information and the second annotation set information based on the operation enumeration type and the first position number, to obtain merged data set information;
and the updating module 24 is configured to update the first document by using the merged data set information to obtain a target merged document.
The document merging apparatus includes:
the first comment set information comprises first comment information and first to-be-processed data information, and the first comment information comprises a comment type label and a first position sequence number;
the second annotation set information comprises second annotation information and second to-be-processed data information, and the second annotation information comprises a second position sequence number.
The determination module 22 is further configured to:
determining an operation enumeration type and a first position sequence number according to the first batch aggregation information, including:
extracting the first position serial number and the annotation type label from the first annotation collection information;
and determining an operation enumeration type corresponding to the annotation type label according to a preset operation type constraint rule, wherein the operation type constraint rule represents a mapping rule between the annotation type label and the operation enumeration type.
The processing module 23 is further configured to:
inquiring a target position serial number which is the same as the first position serial number in a second position serial number of the second annotation set information;
merging the first to-be-processed data information and the second to-be-processed data information of the target position serial number based on the operation enumeration type corresponding to the first position serial number to obtain target processing data information;
and forming the merged data set information based on the first position sequence number, the operation enumeration type and the target processing data information.
The update module 24 is further configured to:
and replacing the first to-be-processed data information corresponding to the first position sequence number in the first document with the target processing data information in the merged data set information to obtain the target merged document.
The obtaining module 21 is further configured to:
acquiring a first document and a second document;
reading first batch comment information in the first document and first to-be-processed data information corresponding to the first batch comment information;
forming the first batch collection information based on the first batch information and first to-be-processed data information corresponding to the first batch information;
reading second annotation information in the second document and second to-be-processed data information corresponding to the second annotation information;
and forming the second annotation set information based on the second annotation information and second to-be-processed data information corresponding to the second annotation information.
The obtaining module 21 is further configured to:
acquiring each incoming document;
reading a file name of each incoming document to divide each incoming document into the first document and the second document based on the file name.
It should be noted that, the apparatus provided in the embodiment of the present invention can implement all the method steps implemented by the method embodiment and achieve the same technical effect, and detailed descriptions of the same parts and beneficial effects as the method embodiment in this embodiment are omitted here.
Fig. 3 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 3, the electronic device may include: a processor (processor) 310, a memory (memory) 320, a communication Interface (Communications Interface) 330 and a communication bus 340, wherein the processor 310, the memory 320 and the communication Interface 330 communicate with each other via the communication bus 340. The processor 310 may invoke logic instructions in the memory 320 to perform a document merge method comprising: acquiring first annotation set information of a first document and second annotation set information of a second document; determining an operation enumeration type and a first position sequence number according to the first batch aggregation information; merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information; and updating the first document by using the merged data set information to obtain a target merged document.
In addition, the logic instructions in the memory 320 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention or a part thereof which substantially contributes to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, 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.
In still another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to perform the document merging method provided by the above methods, the method including: acquiring first annotation set information of a first document and second annotation set information of a second document; determining an operation enumeration type and a first position sequence number according to the first batch aggregation information; merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information; and updating the first document by using the merged data set information to obtain a target merged document.
In another aspect, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, when the computer program is executed by a processor, a computer can execute the document merging method provided by the above methods, the method includes: acquiring first annotation set information of a first document and second annotation set information of a second document; determining an operation enumeration type and a first position sequence number according to the first batch set information; merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information; and updating the first document by using the merged data set information to obtain a target merged document.
The above-described embodiments of the apparatus are merely illustrative, and 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, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for merging documents, comprising:
acquiring first annotation set information of a first document and second annotation set information of a second document;
determining an operation enumeration type and a first position sequence number according to the first batch set information;
merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information;
updating the first document by utilizing the merged data set information to obtain a target merged document;
the first document represents an original protocol file, and the second document is a supplementary protocol file for modifying and supplementing the original protocol file;
the first comment set information comprises first comment information and first to-be-processed data information, and the first comment information comprises a comment type label and a first position sequence number;
the second annotation set information comprises second annotation information and second data information to be processed, and the second annotation information has a second position serial number which is the same as the first position serial number.
2. The document merging method according to claim 1, wherein the determining an operation enumeration type and a first position order according to the first annotation set information comprises:
extracting the first position serial number and the annotation type label from the first annotation collection information;
and determining an operation enumeration type corresponding to the annotation type label according to a preset operation type constraint rule, wherein the operation type constraint rule represents a mapping rule between the annotation type label and the operation enumeration type.
3. The method according to claim 1, wherein the merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position number to obtain merged data set information includes:
inquiring a target position serial number which is the same as the first position serial number in a second position serial number of the second annotation set information;
merging the first to-be-processed data information and the second to-be-processed data information of the target position serial number based on the operation enumeration type corresponding to the first position serial number to obtain target processing data information;
and forming the merged data set information based on the first position sequence number, the operation enumeration type and the target processing data information.
4. The document merging method according to claim 3, wherein the updating the first document with the merged data set information to obtain a target merged document includes:
and replacing the first to-be-processed data information corresponding to the first position sequence number in the first document with the target processing data information in the merged data set information to obtain the target merged document.
5. The document merging method according to claim 1, wherein the obtaining first annotation set information of the first document and second annotation set information of the second document includes:
acquiring a first document and a second document;
reading first batch comment information in the first document and first to-be-processed data information corresponding to the first batch comment information;
forming the first batch set information based on the first batch information and first to-be-processed data information corresponding to the first batch information;
reading second annotation information in the second document and second to-be-processed data information corresponding to the second annotation information;
and forming the second annotation set information based on the second annotation information and second to-be-processed data information corresponding to the second annotation information.
6. The method for merging documents according to claim 5, wherein said obtaining the first document and the second document comprises:
acquiring each incoming document;
reading a file name of each incoming document to divide each incoming document into the first document and the second document based on the file name.
7. A document merge apparatus, comprising:
the acquisition module is used for acquiring first comment set information of a first document and second comment set information of a second document;
the determining module is used for determining an operation enumeration type and a first position sequence number according to the first batch set information;
the processing module is used for merging the first annotation set information and the second annotation set information based on the operation enumeration type and the first position sequence number to obtain merged data set information;
the updating module is used for updating the first document by utilizing the merged data set information to obtain a target merged document;
the first document represents an original protocol file, and the second document is a supplementary protocol file for modifying and supplementing the original protocol file;
the first comment set information comprises first comment information and first to-be-processed data information, and the first comment information comprises a comment type label and a first position sequence number;
the second annotation set information comprises second annotation information and second data information to be processed, and the second annotation information has a second position serial number which is the same as the first position serial number.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements the document merging method according to any one of claims 1 to 6 when executing the program.
9. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the document merging method according to any one of claims 1 to 6.
CN202211713778.8A 2022-12-30 2022-12-30 Document merging method, device, equipment and storage medium Active CN115688711B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211713778.8A CN115688711B (en) 2022-12-30 2022-12-30 Document merging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211713778.8A CN115688711B (en) 2022-12-30 2022-12-30 Document merging method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115688711A CN115688711A (en) 2023-02-03
CN115688711B true CN115688711B (en) 2023-04-07

Family

ID=85055307

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211713778.8A Active CN115688711B (en) 2022-12-30 2022-12-30 Document merging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115688711B (en)

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7472341B2 (en) * 2004-11-08 2008-12-30 International Business Machines Corporation Multi-user, multi-timed collaborative annotation
US11157149B2 (en) * 2017-12-08 2021-10-26 Google Llc Managing comments in a cloud-based environment
CN109299452A (en) * 2018-11-26 2019-02-01 深圳龙图腾创新设计有限公司 A kind of document combination method, device and equipment
CN113254815B (en) * 2020-02-08 2023-11-10 钉钉控股(开曼)有限公司 Document processing method and device and page processing method and device
CN113971392A (en) * 2020-07-23 2022-01-25 腾讯科技(深圳)有限公司 Document editing method, device, equipment and medium
CN112784527B (en) * 2020-09-30 2024-06-25 北京金山办公软件股份有限公司 Document merging method and device and electronic equipment
CN112799718A (en) * 2021-01-15 2021-05-14 亿企赢网络科技有限公司 Enumerated document generation method and device, electronic equipment and storage medium
CN115169298A (en) * 2022-07-08 2022-10-11 北京幂律智能科技有限责任公司 Cross-browser Word programmed annotation method

Also Published As

Publication number Publication date
CN115688711A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US10545981B2 (en) Virtual repository management
JP5502745B2 (en) Merging documents
CN110020086B (en) User portrait query method and device
WO2019134340A1 (en) Salary calculation method, application server, and computer readable storage medium
US20200279004A1 (en) Building lineages of documents
CN112329419A (en) Document editing method, device, server, terminal and storage medium
US20170228356A1 (en) System Generator Module for Electronic Document and Electronic File
JP6582277B1 (en) Block chain history storage system and block chain history storage method
US10037370B2 (en) Method, a server, a system and a computer program product for copying data from a source server to a target server
CN111026753A (en) Label storage method and device based on tree structure
CN113626223A (en) Interface calling method and device
US10984184B2 (en) Maintenance of a metafile using spreadsheet software
CN115470191A (en) Database updating system, method and corresponding computer equipment and storage medium
US20140006345A1 (en) Method, a Server, a System and a Computer Program Product for Copying Data From a Source Server to a Target Server
CN115688711B (en) Document merging method, device, equipment and storage medium
CN114218256B (en) Access statement processing method, device, equipment and storage medium
CN112204527A (en) Method and system for processing engineering data in a multi-engineering system environment
CN114118944A (en) Forensic laboratory grading management method, terminal device and storage medium
CN113656466A (en) Policy data query method, device, equipment and storage medium
CN112733939A (en) Similarity feature vector construction method and device, electronic equipment and storage medium
CN114553954B (en) Information pushing method, nonvolatile storage medium and electronic equipment
CN112464099B (en) Method, device, electronic equipment and medium for generating document based on query data
JP2023533453A (en) Multi-stage data sniffer for data extraction
CN117170776A (en) Service logic execution method and device
JP2009003780A (en) Module management method, module management device, module management system, and module management program

Legal Events

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