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

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

Info

Publication number
CN116595965A
CN116595965A CN202310473107.7A CN202310473107A CN116595965A CN 116595965 A CN116595965 A CN 116595965A CN 202310473107 A CN202310473107 A CN 202310473107A CN 116595965 A CN116595965 A CN 116595965A
Authority
CN
China
Prior art keywords
document
instance
chapter
target
node
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
CN202310473107.7A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310473107.7A priority Critical patent/CN116595965A/en
Publication of CN116595965A publication Critical patent/CN116595965A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • 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

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application relates to the technical field of data processing, and provides a document merging method, a device, computer equipment, a storage medium and a computer program product, which can be particularly applied to the financial field, the big data field or other related fields. The application can improve the efficiency and accuracy of document merging. The method comprises the following steps: determining a document template of each document instance to be merged; determining a target document template according to the document templates of the document instances to be combined; respectively determining an instance section node matched with the template section node from the instance section nodes of each document instance to be merged as a target instance section node; according to the target instance chapter node, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in each document instance to be merged to obtain fusion contents; and respectively adding the fusion content to the template chapter nodes matched with the chapter nodes of each target example in the initial document example to obtain the target document example.

Description

Document merging method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing technology, and in particular, to a document merging method, a document merging apparatus, a computer device, a storage medium, and a computer program product.
Background
With the development of information technology, digital transformation is advanced in various fields, and many institutions rely on document technology to build an internal online collaborative research and development platform so as to realize structured storage and sharing of mechanism knowledge, such as structured collaborative writing of business requirement books, test schemes and production scheme documents. How to merge written documents becomes an important research direction in order to meet the latest requirements of various fields.
The conventional technology generally performs manual review on each document to be combined, and performs manual splicing on each document to be combined according to the result of manual review; however, the method mainly combines the document contents one by one in a manual splicing mode, so that the document combining efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a document merging method, apparatus, computer device, computer readable storage medium, and computer program product.
In a first aspect, the present application provides a document merging method. The method comprises the following steps:
determining a document template corresponding to each document instance to be combined;
determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node;
Respectively determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged;
according to the target instance chapter nodes of the document instances to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in the document instances to be merged to obtain fusion contents of the target instance chapter nodes;
respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template.
In one embodiment, according to the target instance chapter node of each document instance to be merged, the merging processing is performed on chapter contents belonging to the same target instance chapter node in each document instance to be merged to obtain the merged contents of each target instance chapter node, including:
According to the target instance chapter nodes of the document instances to be combined, determining the similarity between chapter contents belonging to the same target instance chapter node in the document instances to be combined;
and according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, carrying out fusion processing on the chapter contents belonging to the same target instance chapter node in each document instance to be merged, and obtaining the fusion contents of each target instance chapter node.
In one embodiment, according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, the merging processing is performed on the chapter contents belonging to the same target instance chapter node in each document instance to be merged to obtain the merged contents of each target instance chapter node, including:
according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, determining the repeated chapter contents and the non-repeated chapter contents belonging to the same target instance chapter node in each document instance to be merged from the chapter contents belonging to the same target instance chapter node in each document instance to be merged;
Determining the latest repeated chapter content under the same target instance chapter node in each document instance to be merged in the repeated chapter content under the same target instance chapter node in each document instance to be merged;
and carrying out fusion processing on the latest repeated chapter content and the non-repeated chapter content belonging to the same target example chapter node in each document example to be merged to obtain the fusion content of each target example chapter node.
In one embodiment, according to the target instance chapter node of each document instance to be merged, the merging processing is performed on chapter contents belonging to the same target instance chapter node in each document instance to be merged to obtain merged contents of each target instance chapter node, and the method further includes:
according to the target instance chapter node of each document instance to be merged, determining the content type of chapter content under the same target instance chapter node in each document instance to be merged;
determining a fusion model corresponding to the content type from preset fusion models;
and carrying out fusion processing on chapter contents belonging to the same target instance chapter node in each document instance to be merged by utilizing a fusion model corresponding to the content type to obtain fusion contents of each target instance chapter node.
In one embodiment, the determining the target document template according to the document templates corresponding to the document instances to be combined includes:
the version information of the document template corresponding to each document instance to be combined is obtained;
determining a document template with latest version information from the document templates corresponding to the document instances to be combined according to the version information of the document templates corresponding to the document instances to be combined;
and taking the document template with the latest version information as a target document template.
In one embodiment, after adding the fusion content of each target instance chapter node to the template chapter node matched with each target instance chapter node in the initial document instance to obtain the target document instance corresponding to the initial document instance, the method further includes:
generating an online document instance link according to the target document instance;
responding to a triggering instruction for the online document instance link, and displaying the merging abstract information of the target document instance and the target document instance; the merging abstract information is used for representing the document merging record information of the target document instance;
And responding to a trigger instruction aiming at the merging abstract information, and displaying the chapter content of each document instance to be merged.
In one embodiment, the determining the document template corresponding to each document instance to be merged includes:
responding to a document merging instruction, and acquiring each document instance to be merged from a financial system;
determining a document template corresponding to each document instance to be merged from a preset document template library according to the generated information of each document instance to be merged; the document examples to be combined are generated according to the document templates corresponding to the document examples to be combined.
In a second aspect, the application further provides a document merging device. The device comprises:
the document determining module is used for determining a document template corresponding to each document instance to be combined;
the template determining module is used for determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node;
the node determining module is used for determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged respectively as a target instance chapter node of each document instance to be merged;
The content fusion module is used for carrying out fusion processing on chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged to obtain fusion contents of each target instance chapter node;
the content adding module is used for respectively adding the fusion content of each target instance chapter node to the template chapter node matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
determining a document template corresponding to each document instance to be combined; determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node; respectively determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged; according to the target instance chapter nodes of the document instances to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in the document instances to be merged to obtain fusion contents of the target instance chapter nodes; respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
determining a document template corresponding to each document instance to be combined; determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node; respectively determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged; according to the target instance chapter nodes of the document instances to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in the document instances to be merged to obtain fusion contents of the target instance chapter nodes; respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
determining a document template corresponding to each document instance to be combined; determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node; respectively determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged; according to the target instance chapter nodes of the document instances to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in the document instances to be merged to obtain fusion contents of the target instance chapter nodes; respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template.
The document merging method, the device, the computer equipment, the storage medium and the computer program product determine the document template corresponding to each document instance to be merged; determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node; respectively determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged; according to the target instance chapter nodes of the document instances to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in the document instances to be merged to obtain fusion contents of the target instance chapter nodes; respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template. According to the scheme, a target document template is determined according to a document template corresponding to each document instance to be merged, so that a document template for merging the documents is determined, then an instance chapter node matched with the template chapter node contained in the target document template is determined from the instance chapter nodes of each document instance to be merged and is used as a target instance chapter node, chapter nodes needing chapter content merging are automatically determined, then chapter contents belonging to the same target instance chapter node in each document instance to be merged are subjected to fusion processing, fusion contents of each target instance chapter node are obtained, fused chapter contents of each chapter after fusion are automatically obtained, and then the fusion contents of each target instance chapter node are respectively added to template chapter nodes matched with each target instance chapter node in the document instance corresponding to the target document template, so that each target document instance after the document instance to be merged is obtained, and therefore the efficiency and the accuracy of document merging are improved.
Drawings
FIG. 1 is a flow diagram of a method for merging documents in one embodiment;
FIG. 2 is a schematic diagram of a document template and an example document in one embodiment;
FIG. 3 is a flow diagram of the steps for determining fused content in one embodiment;
FIG. 4 is a flowchart illustrating a step of determining a fused content according to another embodiment;
FIG. 5 is a flowchart illustrating the step of determining the fused content in yet another embodiment;
FIG. 6 is a block diagram showing the structure of a file merging device according to one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a document merging method is provided, and the method is applied to a terminal for illustration in this embodiment, and includes the following steps:
step S101, determining a document template corresponding to each document instance to be combined.
In this step, each document instance to be merged may be a document instance generated according to a document template corresponding to each document instance to be merged, and each document instance to be merged may be a document instance in a financial system.
Specifically, the terminal acquires each document instance to be combined, and determines a document template corresponding to each document instance to be combined.
It should be noted that, the number of the document templates may be plural (where each document template may have a different version number), the structure of the document template may be a chapter tree structure (which is simply referred to as a chapter tree, belongs to a tree structure), the tree nodes may be divided into chapter nodes and content nodes, wherein a chapter node may be a branch node, a plurality of sub-chapter nodes and content nodes may be provided below (where a chapter node, a sub-chapter node and a content node may be collectively referred to as a chapter node), a content node may be a leaf node, and a sub-node may not be allowed below, for example, main attributes (node attributes) of a chapter node of the document template are defined as shown in table 1 below:
TABLE 1
Node attributes Description of the invention
Node ID (identification) Node identifier
Node name Node title names, which may be used to generate chapter trees or export document directories
Parent node ID Parent node identifier
Sequence number Display order of order number under the same parent node
Cutting control position Controlling whether document instance chapter energy-saving clipping
Template ID Document template identifier
The main attributes (node attributes) of the content nodes of the document template are defined as shown in the following table 2:
TABLE 2
The first column of tables 1 and 2 is a description of node attributes contained in chapter nodes and content nodes of the document template, and the second column is a detailed description of the meaning of the node attributes.
It should be noted that, each document instance to be merged may be a document instance generated according to a document template, for example, each document instance to be merged is a document instance inheriting a tree structure (chapter tree), a tree node and a value logic of the document template, and in addition, the document instance may be subjected to custom modification (such as adding a tree node, deleting a tree node, etc.) according to a user requirement.
For example, as shown in fig. 2, a document template (a document template a may be a document template corresponding to a document instance to be merged) may include a template top level node T1, a plurality of sub-nodes may be included under the template top level node T1, a content node T2, a first level chapter node T3, a first level chapter node T4 (may be cut) … …, a plurality of sub-nodes may be included under the first level chapter node T3, a content node T5, a second level chapter node T6, and a second level chapter node T7, corresponding document instances (a document instance a may be a document instance to be merged) generated according to the document template may include an instance top level node I1, a plurality of sub-nodes may be included under the instance top level node I1, a content node I2, a first level chapter node I3, a first level chapter node (may be deleted, a first level chapter node I3 may be in a non-visible state) … …, a content node I4, a second level chapter node I5, a second level chapter node I6, and a second level chapter node I7 may be included under the first level chapter node I3, and a new chapter node (a new chapter node) may be cut), where a user may be prompted by executing a control tree node having a corresponding attribute, and a user may be prompted by executing a control tree node; the main attribute definitions of the chapter nodes of the document instance are shown in table 3 below:
TABLE 3 Table 3
The main attribute definitions of the content nodes of the document instance are shown in table 4 below:
TABLE 4 Table 4
Wherein the first column of the above tables 3 and 4 is a description of node attributes contained in chapter nodes and content nodes for document instances, respectively, and the second column is a detailed description of the meaning of the node attributes, respectively.
Step S102, determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template contains template chapter nodes.
In this step, the target document template may be a document template, which may be one of the document templates corresponding to the document instances to be merged, or may be a document template determined according to the document template corresponding to the document instance to be merged; the template chapter node may be a chapter node of the target document template, the chapter node may be a node in a directory, for example, the template chapter node may be a chapter node of the above-described exemplary document template, and the chapter node may be a chapter node, a sub-chapter node, and a content node including the above-described exemplary document template.
Specifically, the terminal determines a document template for merging the document instances to be merged according to the document template corresponding to the document instances to be merged, and takes the document template as a target document template.
Step S103, determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged respectively, and taking the instance chapter node as a target instance chapter node of each document instance to be merged.
In this step, the instance chapter node of each document instance to be merged may refer to a chapter node included in each document instance to be merged.
Specifically, the terminal determines an instance section node matched with the template section node from instance section nodes of each document instance to be merged respectively, and takes the instance section node matched with the template section node as a target instance section node of each document instance to be merged.
The terminal determines an instance section node which is the same as the template section node (for example, the name of the represented section node or the attribute of the section node is the same) from instance section nodes of each document instance to be merged respectively, and takes the instance section node which is the same as the template section node as a target instance section node of each document instance to be merged.
Step S104, according to the target instance chapter nodes of the document instances to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in the document instances to be merged, and obtaining fusion contents of the target instance chapter nodes.
In this step, the chapter content under the chapter node may refer to specific content under the directory represented by the chapter node.
Specifically, the terminal determines chapter contents under the corresponding target instance chapter nodes in each document instance to be merged according to the target instance chapter nodes of each document instance to be merged, and merges (e.g. content merging or content splicing) the chapter contents under the same target instance chapter node in each document instance to be merged to obtain the merged contents of each target instance chapter node.
The terminal extracts the chapter content under the corresponding target instance chapter node from each document instance to be merged according to the target instance chapter node of each document instance to be merged to obtain the chapter content under the target instance chapter node, and fuses the chapter content under the same chapter (belonging to the same target instance chapter node) to obtain the fused content under each chapter (each target instance chapter node) as the fused content of each target instance chapter node.
Step S105, respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from the target document template.
In this step, the template chapter node in the initial document instance that is matched with the chapter node of each target instance may be the same template chapter node in the initial document instance as the chapter node of each target instance, for example, the template chapter node in the initial document instance that is the same as the chapter node name or the chapter node attribute of each target instance chapter node; the relationship between the initial document instance and the target document template may be the relationship between the document instance a and the document template a, for example, the initial document instance is a document instance that inherits the tree structure (chapter tree, or structure between chapter nodes), tree node (or chapter node), and value logic of the target document template.
Specifically, the terminal respectively adds the fusion content of each target instance chapter node to the template chapter node matched (identical) with each target instance chapter node in the initial document instance to obtain the target document instance corresponding to the initial document instance.
Illustratively, the initial document instance contains template chapter nodes, but no specific chapter content exists under each template chapter node; and the terminal respectively adds the fusion content of each target instance chapter node to the template chapter node matched (identical) with each target instance chapter node in the initial document instance, so that the fusion content of each corresponding target instance chapter node exists under the template chapter node in the initial document instance, and the target document instance after the document instances to be merged are merged is obtained.
In the document merging method, determining a document template corresponding to each document instance to be merged; determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node; respectively determining an instance chapter node matched with the template chapter node from instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged; according to the target instance chapter nodes of each document instance to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in each document instance to be merged to obtain fusion contents of each target instance chapter node; respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from the target document template. According to the scheme, a target document template is determined according to a document template corresponding to each document instance to be merged, so that a document template for merging the documents is determined, then an instance chapter node matched with a template chapter node contained in the target document template is determined from the instance chapter nodes of each document instance to be merged and used as a target instance chapter node, chapter nodes needing chapter content merging are automatically determined, chapter contents belonging to the same target instance chapter node in each document instance to be merged are subjected to fusion processing, fusion contents of each target instance chapter node are obtained, chapter contents of each fused chapter are automatically obtained, and then fusion contents of each target instance chapter node are respectively added to the template chapter nodes matched with each target instance node in the document instance corresponding to the target document template, so that each target document instance after the document instance to be merged is obtained, and therefore the efficiency and the accuracy of document merging are improved.
In one embodiment, as shown in fig. 3, in step S104, according to the target instance chapter node of each document instance to be merged, the chapter content under the same target instance chapter node in each document instance to be merged is subjected to fusion processing, so as to obtain the fusion content of each target instance chapter node, which specifically includes the following contents: step S301, determining the similarity between chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged; step S302, according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, the chapter contents belonging to the same target instance chapter node in each document instance to be merged are subjected to fusion processing, so as to obtain the fusion contents of each target instance chapter node.
In this embodiment, the similarity may refer to content similarity, such as text similarity.
Specifically, the terminal determines chapter contents belonging to the same target instance chapter node in each document instance to be merged according to target instance chapter nodes of each document instance to be merged, and identifies similarity among the chapter contents belonging to the same target instance chapter node in each document instance to be merged; and according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, carrying out similarity-based combination processing on the chapter contents belonging to the same target instance chapter node in each document instance to be merged, and obtaining the fusion content of each target instance chapter node.
The terminal determines chapter contents belonging to the same target example chapter node in each document example to be combined according to target example chapter nodes of each document example to be combined, inputs the chapter contents into a Bert (bi-directional encoder representation from a transformer) model to obtain text semantic vectors of the chapter contents, and further calculates Euclidean distances of the text semantic vectors of the chapter contents to obtain similarity among the chapter contents belonging to the same target example chapter node in each document example to be combined; and according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, carrying out similarity-based combination processing on the chapter contents belonging to the same target instance chapter node in each document instance to be merged, and obtaining the fusion content of each target instance chapter node.
According to the technical scheme, the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be combined is determined, the chapter contents belonging to the same target instance chapter node in each document instance to be combined are subjected to similarity-based fusion processing, so that fusion contents of the chapter nodes of each target instance are obtained, more accurate fusion contents are obtained, and further, the accuracy of document combination is improved.
In one embodiment, as shown in fig. 4, in step S104, according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, the chapter contents belonging to the same target instance chapter node in each document instance to be merged are subjected to fusion processing to obtain the fusion contents of each target instance chapter node, which specifically includes the following contents: step S401, determining repeated chapter contents and non-repeated chapter contents under the same target instance chapter node in each document instance to be merged according to the similarity between chapter contents under the same target instance chapter node in each document instance to be merged; step S402, determining the latest repeated chapter content under the same target instance chapter node in each document instance to be merged in the repeated chapter content under the same target instance chapter node in each document instance to be merged; step S403, fusing the latest repeated chapter content and non-repeated chapter content belonging to the same target example chapter node in each document example to be merged to obtain the fused content of each target example chapter node.
In this embodiment, the repeated chapter content may refer to chapter content in which the content is repeated, for example, chapter content in which the similarity exceeds a preset threshold; the non-repeated chapter content may refer to chapter content in which the content is not repeated, for example, chapter content in which the similarity does not exceed a preset threshold; the latest repeated chapter content may refer to the latest edited chapter content among the plurality of repeated chapter contents.
Specifically, the terminal uses, as repeated chapter contents, chapter contents (for example, chapter contents whose corresponding similarity exceeds a preset similarity threshold value) whose corresponding similarity does not satisfy the preset similarity threshold value, as non-repeated chapter contents, according to the similarity between chapter contents belonging to the same target instance chapter node in each document instance to be merged and the preset similarity threshold value condition, among the chapter contents belonging to the same target instance chapter node in each document instance to be merged; in the repeated chapter content under the same target example chapter node in each document example to be combined, according to the latest editing time (or latest modifying time) of the repeated chapter content, taking the latest edited chapter content as the latest repeated chapter content under the same target example chapter node in each document example to be combined; and carrying out fusion processing on the latest repeated chapter content and non-repeated chapter content belonging to the same target example chapter node in each document example to be merged to obtain the fusion content of each target example chapter node.
According to the technical scheme, the repeated chapter content and the non-repeated chapter content belonging to the same target example chapter node in each document example to be combined are determined, the latest repeated chapter content is selected from the repeated chapter content, other non-latest repeated chapter content is not needed (can be deleted), the latest repeated chapter content and the non-repeated chapter content are subjected to fusion processing, fusion content of each target example chapter node is obtained, the fusion content is prevented from containing repeated or wrong content, more accurate fusion content is obtained, and accordingly the accuracy of document combination is improved.
In one embodiment, as shown in fig. 5, in step S104, according to the target instance chapter node of each document instance to be merged, the chapter content under the same target instance chapter node in each document instance to be merged is subjected to fusion processing, so as to obtain the fusion content of each target instance chapter node, which specifically further includes the following contents: step S501, determining the content type of the chapter content under the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged; step S502, determining a fusion model corresponding to the content type from preset fusion models; step S503, fusion processing is carried out on the chapter contents belonging to the same target instance chapter node in each document instance to be merged by utilizing a fusion model corresponding to the content type, so as to obtain the fusion contents of each target instance chapter node.
In this embodiment, the content types may include text, table, built-in attachment, file upload, and other content types; the preset fusion model can be a preset fusion rule; the fusion model corresponding to the content type may be a fusion rule corresponding to the content type, where each content type may have a corresponding one of the fusion rules.
Specifically, the terminal determines chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged, and identifies the content type of the chapter contents; determining a fusion model corresponding to the content type from preset fusion models; and respectively utilizing a fusion model corresponding to the content type to fuse the chapter contents belonging to the same target instance chapter node in each document instance to be merged to obtain the fusion contents of each target instance chapter node.
According to the technical scheme, the fusion model corresponding to the content type of the chapter content is utilized to fuse the chapter content belonging to the same target instance chapter node in each document instance to be merged to obtain the fusion content of each target instance chapter node, so that the fusion processing is carried out by utilizing different fusion models according to different content types, more accurate fusion content of each target instance chapter node is facilitated to be obtained, and further, the accuracy of document merging is facilitated to be improved.
In one embodiment, in step S102, a target document template is determined according to the document templates corresponding to the document instances to be merged, which specifically includes the following contents: version information of a document template corresponding to each document instance to be combined is obtained; determining a document template with latest version information from the document templates corresponding to the document instances to be combined according to the version information of the document templates corresponding to the document instances to be combined; taking the document template with the latest version information as a target document template.
In this embodiment, the version information of the document template may be the version number of the document template; the document template whose version information is latest may be the latest version of the document template.
Specifically, the terminal acquires version information of a document template corresponding to each document instance to be combined; determining a document template with latest version information from the document templates corresponding to the document instances to be combined according to the version information of the document templates corresponding to the document instances to be combined; taking the document template with the latest version information as a target document template.
According to the technical scheme, the document template with the latest version information is selected from the document templates corresponding to the document instances to be combined to serve as the target document template, so that the accurate target document template can be determined more accurately, and the accuracy of document combination can be improved subsequently.
In one embodiment, the step S105 further includes a step of displaying information after the fused content of each target instance chapter node is added to the template chapter node matched with each target instance chapter node in the initial document instance to obtain the target document instance corresponding to the initial document instance, where the step specifically includes the following contents: generating an online document instance link according to the target document instance; responding to a trigger instruction for on-line document instance links, and displaying the merging abstract information of the target document instance and the target document instance; the merging abstract information is used for representing the document merging record information of the target document instance; and responding to a trigger instruction aiming at merging abstract information, and displaying the chapter content of each document instance to be merged.
In this embodiment, the online document instance links may be links for viewing or editing the target document instance in the manner of an online document; the trigger instruction may be a click instruction; the merge abstract information may be information of a document merge process in which the target document instance is recorded.
Specifically, the terminal generates an online document instance link corresponding to the target document instance according to the target document instance; receiving a trigger instruction for the link of the online document instance, and responding to the trigger instruction for the link of the online document instance, and displaying the merging abstract information of the target document instance and the target document instance; and receiving a triggering instruction for merging the abstract information, and responding to the triggering instruction for merging the abstract information, and displaying the chapter content of each document instance to be merged.
According to the technical scheme, the online document instance links are generated so as to display the merging abstract information of the target document instance and the chapter content of each document instance to be merged, so that timeliness and functionality of feedback of document merging are improved.
In one embodiment, in step S101, a document template corresponding to each document instance to be merged is determined, which specifically includes the following contents: responding to a document merging instruction, and acquiring each document instance to be merged from a financial system; according to the generation information of each document instance to be combined, determining a document template corresponding to each document instance to be combined from a preset document template library; the document examples to be combined are generated according to the document templates corresponding to the document examples to be combined.
In this embodiment, the document merging instruction may be a trigger instruction for document merging; the generated information may be information in which an instance of the generated document is recorded; the preset document template library may include a plurality of document templates stored in advance.
Specifically, the terminal receives a document merging instruction, and responds to the document merging instruction to acquire each document instance to be merged from a financial system; according to the generation information of each document instance to be combined, searching a document template corresponding to each document instance to be combined from a preset document template library.
According to the technical scheme, the document templates corresponding to the document instances to be combined are determined from the preset document template library, so that the document templates which are generated by the document instances to be combined are determined, the accuracy of determining the document templates corresponding to the document instances to be combined is improved, and the accuracy of combining the documents is improved.
The document merging method provided by the application is described in the following embodiment, and the embodiment is applied to a terminal for illustration by using the method, and the main steps include:
the method comprises the steps that firstly, a terminal responds to a document merging instruction, and each document instance to be merged is obtained from a financial system; according to the generation information of each document instance to be combined, determining a document template corresponding to each document instance to be combined from a preset document template library; the document examples to be combined are generated according to the document templates corresponding to the document examples to be combined.
The second step, the terminal obtains the version information of the document template corresponding to each document instance to be combined; determining a document template with latest version information from the document templates corresponding to the document instances to be combined according to the version information of the document templates corresponding to the document instances to be combined; taking the document template with the latest version information as a target document template.
And thirdly, the terminal respectively determines an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged.
Fourth, the terminal determines the similarity between chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged; according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, determining the repeated chapter contents and the non-repeated chapter contents belonging to the same target instance chapter node in each document instance to be merged from the chapter contents belonging to the same target instance chapter node in each document instance to be merged; determining the latest repeated chapter content under the same target instance chapter node in each document instance to be merged in the repeated chapter content under the same target instance chapter node in each document instance to be merged; according to the target instance chapter node of each document instance to be merged, determining the content type of chapter content belonging to the same target instance chapter node in each document instance to be merged; determining a fusion model corresponding to the content type from preset fusion models; and carrying out fusion processing on the latest repeated chapter content and non-repeated chapter content belonging to the same target example chapter node in each document example to be merged by utilizing a fusion model corresponding to the content type, so as to obtain the fusion content of each target example chapter node.
Fifthly, the terminal respectively adds the fusion content of each target instance chapter node to the template chapter node matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from the target document template.
Sixthly, the terminal generates an online document instance link according to the target document instance; responding to a trigger instruction for on-line document instance links, and displaying the merging abstract information of the target document instance and the target document instance; the merging abstract information is used for representing the document merging record information of the target document instance; and responding to a trigger instruction aiming at merging abstract information, and displaying the chapter content of each document instance to be merged.
The target document template comprises a template chapter node.
According to the technical scheme of the embodiment, the target document template is determined according to the document template corresponding to each document instance to be merged, so that the document template for merging the document is determined, then the instance chapter node matched with the template chapter node contained in the target document template is determined from the instance chapter nodes of each document instance to be merged and used as the target instance chapter node, so that the chapter node needing to be merged with chapter content is automatically determined, then fusion processing is carried out on chapter content belonging to the same target instance chapter node in each document instance to be merged, fusion content of each target instance chapter node is obtained, fusion content of each chapter after fusion is automatically obtained, and then the fusion content of each target instance chapter node is respectively added to the template chapter nodes matched with each target instance chapter node in the document instance corresponding to the target document template, so that the target document instance after the document instance to be merged is obtained, and the efficiency and the accuracy of the document merging are improved.
The document merging method provided by the application is described below by using an application example, and the application example is applied to a terminal for illustration by using the method, and the main steps include:
the method comprises the steps that a terminal responds to document merging operation triggered by a user through a system operation interface to obtain two or more document instance ID sets to be merged.
And secondly, the terminal acquires templates corresponding to each document and determines a target document template.
Specifically, the terminal retrieves a database according to the document instance ID, and obtains the document template ID and the service attribute corresponding to each document instance; comparing the document template IDs, if the document template IDs are the same, integrating the contents according to the template, and executing the next step; if the document templates are different, prompting the user that the document templates are inconsistent, and selecting a target document template to be used.
The service attributes are generally item research and development mode, item number, demand number/iteration number, application system number and the like, and are used for marking document attribution and defining chapter content value rules; the target document template recommended to the user can be the document template corresponding to the document instance (recommended in reverse order according to the template updating time, ensuring that the user adopts the latest document template to meet the project delivery requirement), can be a preset document template library, and can also support the user to quickly customize by dragging multiplexing of chapters and content nodes based on a blank template or a selected document template.
For example, the document merge scenario may be the merging of the same type of specialized document, e.g., to facilitate management of merging multiple business requirements into one, and correspondingly, multiple business requirement book document instances A, B, C need to be merged into one document instance. The business requirement book template can be provided with a plurality of sets. The document templates generally have partially identical chapter contents (must be filled) such as [ 1-project background, 2-architecture modeling, 5-production time ] and the like; some chapter content supports selection and filling according to a development model (e.g., waterfall, agility, etc.) or other management dimension. When the management requirement changes, the original business requirement book document template (recording the last document version ID) is updated, partial chapter content is added and deleted or the format of partial chapter content is adjusted (such as adjusting from plain text presentation to form), a calculation formula and the like (such as adding a certain filtering condition). Thus, if the document template Z and the document template C are different versions of the same document template (assuming that Z is the latest version), the latest version Z of the document template is automatically recommended so as to be consistent with the latest management requirements. If the document template Z and the document template C are different types of document templates, the selection is given to the user.
For example, the document templates corresponding to the document instances have Y and Z, and the document template Y, Z is not updated itself. The user may not select document template Y or Z, and select a new document template X from the mechanism-level document templates, X and Y, Z may be the same for only a portion of the chapters. Document template customization is a function of document template management, supporting creation from blank templates, and also supporting creation based on some existing document template. The relationship of the document templates depends on whether the user selects "new creation" or "template upgrade" at creation time.
And thirdly, the terminal performs merging of the document instances according to the target document template.
Specifically, the terminal creates a target document instance and a chapter node according to the target document template, and binds service attribute parameters. For example, if multiple business requirement book documents of one project are combined, the project number and multiple requirement numbers are bound, so that the capturing of dynamic chapter contents is facilitated. And the terminal merges the content of each chapter according to the depth-first traversal sequence. Chapter content merge rules are as follows: and when the content type of the content node is 1-text, obtaining the rich text content of the document instance to be merged according to the template node ID. And obtaining a plain text through preprocessing operations such as removing formats, special characters and the like, inputting a Bert model to obtain text semantic vectors, and further calculating Euclidean distance of the text. When the text similarity exceeds a preset threshold, the text similarity is regarded as repeated content, and only the latest edited content is reserved; otherwise, it is combined by means of text application. Record merge digest [ content node ID, operation type ], such as I001, operation type 1 (e.g., add). When the content type of the content node is 2-table and 3-built-in attachment, updating the parameters bound in the calculation formulas such as table value and the like. Record merge digest [ content node ID, operation type ], e.g., I00I, operation type 2. When the content type of the content node is 4-file uploading, the attachment address of the document instance to be combined is obtained according to the template node ID, and duplicate removal is performed.
For example, suppose that the document instance created from the target document template is D. When the document instances A, B, C, D belong to the same document template, the chapter trees of the document instances are mostly consistent, and each chapter content of A, B, C is merged according to rules to serve as chapter content of D. The document instances A, B, C, D (D created based on the latest document template) are mostly identical in their chapter trees when they belong to different versions of the same document template. The chapter tree nodes of the latest version document template are traversed, the chapter content of each node Ti appearing in the document instance A, B, C is extracted, and executed according to chapter content merging rules. If the node Tj is a newly added node in the latest version document template, and the node Tj has no corresponding content in the document instance A, B, C, the node content corresponding to the node Tj in the document instance D automatically calculates the gap filler according to the business attribute parameters such as project numbers and the like and the preset rules of the node template.
And fourthly, after the terminal finishes processing all chapters, returning the combined document instance links and the changed abstracts to the user. The user can enter an online document editing page through a document instance link, and the combined abstract is highlighted in the form of annotation. Clicking the abstract can browse the content of the corresponding chapter of a plurality of source document instances at the same time, thereby facilitating quick check and adjustment.
According to the technical scheme of the application example, the document example inherits the tree structure and the content value logic of the document template, and rules are provided for the rapid merging of the documents of the same type, so that the efficiency and the accuracy of document merging are improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a document merging device for realizing the above-mentioned document merging method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the document merging device provided below may refer to the limitation of the document merging method hereinabove, and will not be repeated herein.
In one embodiment, as shown in FIG. 6, a document merge device is provided, the device 600 may include:
a document determining module 601, configured to determine a document template corresponding to each document instance to be merged;
the template determining module 602 is configured to determine a target document template according to the document templates corresponding to the document instances to be merged; the target document template comprises a template chapter node;
the node determining module 603 is configured to determine, from the instance chapter nodes of each document instance to be merged, an instance chapter node that matches the template chapter node, as a target instance chapter node of each document instance to be merged;
the content fusion module 604 is configured to fuse, according to the target instance chapter nodes of each document instance to be merged, chapter contents belonging to the same target instance chapter node in each document instance to be merged, so as to obtain fused content of each target instance chapter node;
the content adding module 605 is configured to add the fusion content of each target instance chapter node to a template chapter node that is matched with each target instance chapter node in the initial document instance, so as to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from the target document template.
In one embodiment, the content fusion module 604 is further configured to determine, according to the target instance chapter node of each document instance to be merged, a similarity between chapter contents belonging to the same target instance chapter node in each document instance to be merged; and according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, carrying out fusion processing on the chapter contents belonging to the same target instance chapter node in each document instance to be merged, and obtaining the fusion contents of each target instance chapter node.
In one embodiment, the content fusion module 604 is further configured to determine, according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, the repeated chapter contents and the non-repeated chapter contents belonging to the same target instance chapter node in each document instance to be merged in the chapter contents belonging to the same target instance chapter node in each document instance to be merged; determining the latest repeated chapter content under the same target instance chapter node in each document instance to be merged in the repeated chapter content under the same target instance chapter node in each document instance to be merged; and carrying out fusion processing on the latest repeated chapter content and non-repeated chapter content belonging to the same target example chapter node in each document example to be merged to obtain the fusion content of each target example chapter node.
In one embodiment, the content fusion module 604 is further configured to determine, according to the target instance chapter node of each document instance to be merged, a content type of chapter content in each document instance to be merged that belongs to the same target instance chapter node; determining a fusion model corresponding to the content type from preset fusion models; and carrying out fusion processing on chapter contents belonging to the same target instance chapter node in each document instance to be merged by utilizing a fusion model corresponding to the content type to obtain fusion contents of each target instance chapter node.
In one embodiment, the template determining module 602 is further configured to obtain version information of a document template corresponding to each document instance to be merged; determining a document template with latest version information from the document templates corresponding to the document instances to be combined according to the version information of the document templates corresponding to the document instances to be combined; taking the document template with the latest version information as a target document template.
In one embodiment, the apparatus 600 further comprises: the instruction response module is used for generating an online document instance link according to the target document instance; responding to a trigger instruction for on-line document instance links, and displaying the merging abstract information of the target document instance and the target document instance; the merging abstract information is used for representing the document merging record information of the target document instance; and responding to a trigger instruction aiming at merging abstract information, and displaying the chapter content of each document instance to be merged.
In one embodiment, the document determining module 601 is further configured to obtain each document instance to be merged from the financial system in response to a document merging instruction; according to the generation information of each document instance to be combined, determining a document template corresponding to each document instance to be combined from a preset document template library; the document examples to be combined are generated according to the document templates corresponding to the document examples to be combined.
The respective modules in the document merging apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
It should be noted that the method and apparatus for document merging provided by the present application may be used in the application field related to document merging in the financial field, and may also be used in the processing related to document merging in any field other than the financial field.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a document merging method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (11)

1. A method of document merging, the method comprising:
determining a document template corresponding to each document instance to be combined;
determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node;
respectively determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged as a target instance chapter node of each document instance to be merged;
According to the target instance chapter nodes of the document instances to be merged, carrying out fusion processing on chapter contents belonging to the same target instance chapter node in the document instances to be merged to obtain fusion contents of the target instance chapter nodes;
respectively adding the fusion content of each target instance chapter node to the template chapter nodes matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template.
2. The method of claim 1, wherein the fusing the chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged to obtain the fused content of each target instance chapter node includes:
according to the target instance chapter nodes of the document instances to be combined, determining the similarity between chapter contents belonging to the same target instance chapter node in the document instances to be combined;
And according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, carrying out fusion processing on the chapter contents belonging to the same target instance chapter node in each document instance to be merged, and obtaining the fusion contents of each target instance chapter node.
3. The method according to claim 2, wherein the fusing the chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, to obtain the fused content of each target instance chapter node, includes:
according to the similarity between the chapter contents belonging to the same target instance chapter node in each document instance to be merged, determining the repeated chapter contents and the non-repeated chapter contents belonging to the same target instance chapter node in each document instance to be merged from the chapter contents belonging to the same target instance chapter node in each document instance to be merged;
determining the latest repeated chapter content under the same target instance chapter node in each document instance to be merged in the repeated chapter content under the same target instance chapter node in each document instance to be merged;
And carrying out fusion processing on the latest repeated chapter content and the non-repeated chapter content belonging to the same target example chapter node in each document example to be merged to obtain the fusion content of each target example chapter node.
4. The method of claim 1, wherein the fusing the chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged to obtain the fused content of each target instance chapter node, further comprises:
according to the target instance chapter node of each document instance to be merged, determining the content type of chapter content under the same target instance chapter node in each document instance to be merged;
determining a fusion model corresponding to the content type from preset fusion models;
and carrying out fusion processing on chapter contents belonging to the same target instance chapter node in each document instance to be merged by utilizing a fusion model corresponding to the content type to obtain fusion contents of each target instance chapter node.
5. The method according to claim 1, wherein determining a target document template according to the document templates corresponding to the document instances to be merged comprises:
the version information of the document template corresponding to each document instance to be combined is obtained;
determining a document template with latest version information from the document templates corresponding to the document instances to be combined according to the version information of the document templates corresponding to the document instances to be combined;
and taking the document template with the latest version information as a target document template.
6. The method according to any one of claims 1 to 5, wherein after adding the fusion content of each target instance chapter node to a template chapter node matched with each target instance chapter node in an initial document instance to obtain a target document instance corresponding to the initial document instance, further comprises:
generating an online document instance link according to the target document instance;
responding to a triggering instruction for the online document instance link, and displaying the merging abstract information of the target document instance and the target document instance; the merging abstract information is used for representing the document merging record information of the target document instance;
And responding to a trigger instruction aiming at the merging abstract information, and displaying the chapter content of each document instance to be merged.
7. The method of claim 6, wherein determining a document template corresponding to each document instance to be merged comprises:
responding to a document merging instruction, and acquiring each document instance to be merged from a financial system;
determining a document template corresponding to each document instance to be merged from a preset document template library according to the generated information of each document instance to be merged; the document examples to be combined are generated according to the document templates corresponding to the document examples to be combined.
8. A document merge device, the device comprising:
the document determining module is used for determining a document template corresponding to each document instance to be combined;
the template determining module is used for determining a target document template according to the document templates corresponding to the document instances to be combined; the target document template comprises a template chapter node;
the node determining module is used for determining an instance chapter node matched with the template chapter node from the instance chapter nodes of each document instance to be merged respectively as a target instance chapter node of each document instance to be merged;
The content fusion module is used for carrying out fusion processing on chapter contents belonging to the same target instance chapter node in each document instance to be merged according to the target instance chapter node of each document instance to be merged to obtain fusion contents of each target instance chapter node;
the content adding module is used for respectively adding the fusion content of each target instance chapter node to the template chapter node matched with each target instance chapter node in the initial document instance to obtain a target document instance corresponding to the initial document instance; the initial document instance is a document instance generated from a target document template.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202310473107.7A 2023-04-27 2023-04-27 Document merging method, device, computer equipment and storage medium Pending CN116595965A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310473107.7A CN116595965A (en) 2023-04-27 2023-04-27 Document merging method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310473107.7A CN116595965A (en) 2023-04-27 2023-04-27 Document merging method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116595965A true CN116595965A (en) 2023-08-15

Family

ID=87605447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310473107.7A Pending CN116595965A (en) 2023-04-27 2023-04-27 Document merging method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116595965A (en)

Similar Documents

Publication Publication Date Title
US11250209B2 (en) Document collaboration and consolidation tools and methods of use
US7590939B2 (en) Storage and utilization of slide presentation slides
US7546533B2 (en) Storage and utilization of slide presentation slides
US7493561B2 (en) Storage and utilization of slide presentation slides
CA2671284C (en) Generating end-user presentations from structured data
JP4477689B2 (en) Annotating documents in collaborative applications with data from different information systems
US7720885B2 (en) Generating a word-processing document from database content
CN110543303B (en) Visual service platform
US20180018402A1 (en) Dynamic hierarchy generation based on graph data
KR20060070416A (en) File formats, methods, and computer program products for representing workbooks
JPWO2006098031A1 (en) Keyword management device
JP2006172446A (en) Complex data access
CN104252521A (en) Web content management using predetermined project templates
US11556702B2 (en) Orchestration of crud operations for a hierarchical web service data model in a spreadsheet
WO2019109556A1 (en) Cube file creation method, device, storage medium and terminal
CN116383546B (en) File processing method, system, computer device and computer readable storage medium
US20240037325A1 (en) Ability to add non-direct ancestor columns in child spreadsheets
CN116595965A (en) Document merging method, device, computer equipment and storage medium
JP6638053B1 (en) Document creation support system
US8775408B2 (en) Document element indexing system
JPH04211865A (en) Method for supporting routine document preparation
US11687701B1 (en) System, method, and computer program for enabling text editing across multiple content blocks in a system
CN115828857A (en) Document processing method, device, equipment, storage medium and computer program product
CN117033518A (en) Data synchronization method, device, computer equipment and storage medium
CN116756022A (en) Data preparation method, device, computer equipment and storage medium

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