Policy document revision method, device, medium, and equipment based on graph data

By constructing a policy document revision method based on a graph data structure and utilizing a file association graph and a natural language processing model, the difficult problem of intelligent revision of policy documents is solved, and efficient and intelligent revision of policy documents is achieved.

CN119576856BActive Publication Date: 2025-09-16SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411622628.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-09-16
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Existing intelligent policy processing technology lacks deep connections with policy text corpus, resulting in the inability to support intelligent revision of lower-level policy documents. It relies on human experience and manual search, and the level of intelligent revision is low.

Method used

By constructing a correlation map between document contents and a correlation map between policy documents, the correlation relationship between superior policy documents and subordinate paragraphs is retrieved, and revision suggestions are provided using a natural language processing generative large model.

Benefits of technology

It has improved the intelligence and digitization level of policy document revision, reduced omissions and errors, improved revision efficiency, and reduced human resource costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576856B_ABST
    Figure CN119576856B_ABST
Patent Text Reader

Abstract

The present invention provides a policy document revision method, apparatus, medium, and equipment based on graph data. The method includes: determining the superior policy document that initiates the revision; searching the graph of associations between file contents for each subordinate paragraph that has a strong association relationship with the superior paragraph in the superior policy document; searching the graph of associations between policy documents for the association relationship corresponding to the superior policy document, and judging whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs based on the search results, if so, retaining the subordinate paragraph, otherwise filtering out the subordinate paragraph; using each retained subordinate paragraph as the paragraph to be revised corresponding to the superior paragraph; inputting the superior paragraph and the paragraph to be revised into a natural language processing generative large model to obtain revision suggestions. The present invention can reduce omissions, errors, and oversights, improve the efficiency of revision work, and reduce human resource costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of file processing technology, and in particular to a policy document revision method, apparatus, medium, and equipment based on graph data. Background Art

[0002] Compliance with rules and regulations is not only the basis of operational efficiency, but also the fundamental guarantee for safe operation. National laws and regulations, as well as the relevant regulations of local departments and enterprises, constitute a complete top-down and bottom-up legal and policy system structure. When the superior department issues or revises a new policy document, the subordinate department must promptly update the existing policy. However, how to find the subordinate documents that should be revised among the massive amount of policy documents and locate the specific paragraphs of the subordinate documents is a difficult problem in current intelligent applications. Existing policy intelligent processing technology lacks deep association with policy text corpus. This technical bottleneck makes it difficult to reuse policy text resource knowledge, which in turn makes it impossible to support the functional application of intelligent revision of subordinate policies.

[0003] At present, after the superior agency issues the policy and system documents, the lower-level agencies need to rely heavily on manual experience and manual search in the process of revising the documents. The degree of intelligent revision is relatively low. Therefore, it is particularly important to propose a method that can use modern intelligent processing technology to help revisers quickly locate the documents to be revised and give reasonable revision suggestions. Summary of the Invention

[0004] In response to at least one of the above technical problems, embodiments of the present invention provide a policy document revision method, apparatus, medium, and device based on graph data.

[0005] According to the first aspect, the graph data-based policy document revision method provided by an embodiment of the present invention includes:

[0006] Determine the superior policy document to initiate revision;

[0007] Retrieving each subordinate paragraph having a strong correlation with the superior paragraph in the superior policy document from a pre-constructed document content correlation graph; wherein the document content correlation graph is constructed based on the superior and subordinate paragraphs having a strong correlation in each policy document;

[0008] Searching for the association relationship corresponding to the superior policy document in a pre-constructed policy document association graph, and determining whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs based on the search results; if so, retaining the subordinate paragraph; otherwise, filtering out the subordinate paragraph; wherein the policy document association graph is constructed based on the association relationship between each policy document;

[0009] The remaining subordinate paragraphs are used as the paragraphs to be revised corresponding to the superior paragraphs;

[0010] The parent paragraph and the paragraph to be revised are input into a pre-trained natural language processing generative model to obtain revision suggestions for the paragraph to be revised.

[0011] In one embodiment, the upper and lower level paragraphs with a strong correlation relationship are determined based on the semantic similarity between the paragraphs of the policy documents and the upper and lower level relationships between the policy documents.

[0012] In one embodiment, the process of constructing the association graph between file contents includes:

[0013] Each policy document is split into paragraphs, and each paragraph obtained by the split is stored in the vector database;

[0014] Each paragraph obtained after the split is recorded as a first paragraph, similarity matching is performed in the vector database using a semantic matching model to obtain multiple similar paragraphs corresponding to the first paragraph, and similar paragraphs with similarity lower than a preset value are removed from the multiple similar paragraphs;

[0015] For each similar paragraph remaining after the elimination operation, determine whether the policy document to which the similar paragraph belongs is a direct subordinate document of the policy document to which the first paragraph belongs;

[0016] If so, it is determined that the similar paragraph has a strong correlation with the first paragraph, and the corresponding triple is added to the file content correlation map, where the triple includes the first paragraph, the similar paragraph, and the strongly correlated attribute label.

[0017] In one embodiment, the process of constructing the association graph between file contents further includes:

[0018] Filter out paragraphs with less than a preset number of words and paragraphs used as titles from the paragraphs obtained after splitting;

[0019] Determine the file information of the policy file to which each paragraph remaining after paragraph screening belongs and the location information of the paragraph in the policy file to which it belongs, and form a file paragraph table and an entity paragraph table; wherein the file paragraph table includes first record information corresponding to each paragraph, the first record information including an ID, the file information, and the location information; the entity paragraph table includes second record information corresponding to each paragraph, the second record information including the file information and the ID of the first record information corresponding to the file paragraph table;

[0020] When each policy file is updated, the first record information of the policy file in the file paragraph table and the second record information in the entity paragraph table are updated.

[0021] In one embodiment, the step of dividing each policy document into paragraphs includes:

[0022] If the policy document is in word or pdf format, use a conversion tool to convert the policy document into txt text format;

[0023] The content of the policy file in the txt text format is split into paragraphs according to the paragraph line breaks to obtain the individual paragraphs of the policy file.

[0024] In one embodiment, the association relationship between the various policy documents is determined based on the hierarchical relationship between the organizations to which the various policy documents belong.

[0025] In one embodiment, the process of constructing the policy document association graph includes:

[0026] Determine the hierarchical relationship between the agencies that own each policy document;

[0027] According to the hierarchical relationship between various institutions, determine the policy documents with direct superior-subordinate relationship among the affiliated institutions;

[0028] Calculate the paragraph similarity between each pair of policy documents with direct hierarchical relationships between the affiliated institutions;

[0029] Eliminate policy document pairs with paragraph similarity lower than a preset value from the policy document pairs with direct hierarchical relationships between affiliated institutions, and treat each remaining policy document pair as a policy document pair with an associated relationship;

[0030] A triplet corresponding to each policy document pair having an associated relationship is added to the policy document association graph, where the triplet includes the policy document pair having an associated relationship and the paragraph similarity between the two policy documents.

[0031] According to a second aspect, an embodiment of the present invention provides a policy document revision device based on graph data, including:

[0032] The first determination module is used to determine the superior policy document that initiates the revision;

[0033] A first search module is configured to search a pre-constructed document content association graph for each subordinate paragraph having a strong association relationship with a superior paragraph in the superior policy document; wherein the document content association graph is constructed based on the superior and subordinate paragraphs having a strong association relationship in each policy document;

[0034] A second search module is configured to search a pre-constructed policy document association graph for associations corresponding to the superior policy document, and determine, based on the search results, whether the superior policy document has an association with the subordinate policy document to which each subordinate paragraph belongs. If so, the subordinate paragraph is retained; otherwise, the subordinate paragraph is filtered out. The policy document association graph is constructed based on the associations between the various policy documents.

[0035] A second determining module is configured to use each retained subordinate paragraph as a paragraph to be revised corresponding to the superior paragraph;

[0036] The suggestion generation module is used to input the parent paragraph and the paragraph to be revised into a pre-trained natural language processing generative model to obtain revision suggestions for the paragraph to be revised.

[0037] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method provided in the first aspect.

[0038] According to a fourth aspect, an embodiment of the present invention provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.

[0039] The embodiment of the present invention provides a graph-based policy document revision method, apparatus, medium, and device, which determine the superior policy document that initiates the revision, and then retrieve each subordinate paragraph that has a strong correlation with the superior paragraph in the superior policy document in the document content correlation map, and then retrieve the correlation corresponding to the superior policy document in the policy document correlation map, and judge whether the superior policy document has a correlation with the subordinate policy document to which each subordinate paragraph belongs according to the search results. If so, the subordinate paragraph is retained, otherwise the subordinate paragraph is filtered out; each retained subordinate paragraph is used as the paragraph to be revised corresponding to the superior paragraph, and finally the superior paragraph and the paragraph to be revised are input into the natural language processing generative large model to obtain revision suggestions for the paragraph to be revised. Compared with the traditional revision method that relies on manual experience and simple search engine retrieval, the embodiment of the present invention can increase the comprehensiveness of the revised document, reduce omissions, errors and negligence, improve the efficiency of the revision work, reduce human resource costs, and improve the intelligence and digitalization level of the policy document revision work. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 Schematic diagram of a flow chart of a policy document revision method based on graph data in one embodiment of the present invention;

[0041] Figure 2 This is a structural block diagram of a policy document revision device based on graph data in one embodiment of the present invention. DETAILED DESCRIPTION

[0042] In the first aspect, an embodiment of the present invention provides a policy document revision method based on graph data, see Figure 1 The method includes the following steps S110 to S150:

[0043] S110. Determine the superior policy document to initiate revision;

[0044] S120: Retrieving, from a pre-constructed document content association graph, each subordinate paragraph having a strong association relationship with the superior paragraph in the superior policy document; wherein the document content association graph is constructed based on the superior and subordinate paragraphs having a strong association relationship in each policy document;

[0045] Among them, the paragraph in the superior policy document is called the superior paragraph.

[0046] It is understandable that S120 is executed for each paragraph in the superior policy document that has more than a preset number of words and is not a title.

[0047] It is understandable that the association map between file contents is constructed based on the upper and lower paragraphs with strong association relationships in the upper paragraph in the upper policy file and in the lower paragraph in the lower policy file.

[0048] In one embodiment, the upper and lower level paragraphs with a strong correlation relationship may be determined based on the semantic similarity between the paragraphs of the policy documents and the upper and lower level relationships between the policy documents.

[0049] It can be seen that when determining the strong correlation between paragraphs, it is not only based on the hierarchical relationship between policy documents, but also based on the semantic similarity between the superior paragraph and the subordinate paragraph.

[0050] Furthermore, in one embodiment, the process of constructing the association graph between file contents may include the following four steps:

[0051] 1. Split each policy document into paragraphs and store the resulting paragraphs in a vector database;

[0052] Among them, splitting each policy document into paragraphs can include: if the format of the policy document is word or pdf, using a conversion tool to convert the policy document into txt text format; splitting the content in the policy file in txt text format into paragraphs according to paragraph line breaks to obtain the paragraphs of the policy document.

[0053] It can be seen that in order to achieve paragraph comparison in policy documents, policy documents need to be split into paragraphs. Here is a relatively simple splitting method. First, it is necessary to unify the file format. For policy documents in formats such as Word and PDF, use a format conversion tool to convert them into txt text format. The conversion tool can use toolkits provided by programming languages ​​such as Python and JAVA, which will not be discussed in detail here. After conversion to txt text format, the content in the policy document is split into paragraphs according to the paragraph line breaks. After the split is completed, the split paragraphs are stored in the vector database.

[0054] 2. Record each paragraph obtained after the split as the first paragraph, perform similarity matching in the vector database using a semantic matching model to obtain multiple similar paragraphs corresponding to the first paragraph, and remove similar paragraphs with similarity lower than a preset value from the multiple similar paragraphs;

[0055] 3. For each similar paragraph remaining after the elimination operation, determine whether the policy document to which the similar paragraph belongs is a direct subordinate document of the policy document to which the first paragraph belongs;

[0056] 4. If so, determine that the similar paragraph has a strong correlation with the first paragraph, and add the corresponding triple to the file content correlation map, where the triple includes the first paragraph, the similar paragraph, and the strongly correlated attribute label.

[0057] For example, for paragraph a in the superior policy document A, paragraph a is searched for similarity in the vector database using a semantic matching model. Here, the open source semantic matching model BGE can be used for retrieval to retrieve several similar paragraphs b. Similar paragraphs b are preliminarily screened to exclude paragraphs with similarity less than a preset value. The preset value can be determined based on the actual situation of the policy document and the effect of the model. The screened similar paragraphs b are further screened to determine whether the institution to which the policy document to which similar paragraph b belongs is a direct subordinate institution of the institution to which policy document A belongs. If not, skip it and determine the next similar paragraph b. If so, paragraph a is associated with similar paragraph b to form a triple. The starting and ending entities of the triple are the specific contents of paragraphs a and b. The attribute label can be defined as "strongly correlated", and the triple is added to the association map between file contents.

[0058] In one embodiment, the process of constructing the association graph between file contents may further include steps 5, 6, and 7:

[0059] 5. Filter out paragraphs with less than the preset number of words and paragraphs used as titles from the paragraphs obtained after splitting;

[0060] 6. Determine the file information of the policy document to which each paragraph remaining after paragraph screening belongs, as well as the location information of the paragraph in the policy document to which it belongs, and form a file paragraph table and an entity paragraph table; wherein the file paragraph table includes first record information corresponding to each paragraph, the first record information including an ID, the file information, and the location information; and the entity paragraph table includes second record information corresponding to each paragraph, the second record information including the file information and the ID of the first record information corresponding to the file paragraph table;

[0061] 7. When each policy file is updated, the first record information of the policy file in the file paragraph table and the second record information of the entity paragraph table are updated.

[0062] It can be seen that after splitting the paragraphs, the paragraphs with too few words and the paragraphs that should be used as titles are filtered out. These paragraphs are likely to become interference items during the policy revision process, so they need to be screened and filtered. The filtering method can be processed using regular expressions. Then, it is necessary to determine the file information of the policy file where each paragraph is located and the position information of the paragraph in the policy file, and then form two tables: the file paragraph table and the entity paragraph table. The file paragraph table contains the first record information corresponding to each paragraph, and the entity paragraph table contains the second record information corresponding to each paragraph. The first record information includes the ID of the record information, the file information and the position information, and the second record information includes the file information and the ID of the corresponding first record information. In this way, the record information in the file paragraph table and the entity paragraph table can be matched one by one. When the file information changes, the file paragraph table and the entity paragraph table need to be updated at the same time.

[0063] S130: searching a pre-constructed policy document association graph for association relationships corresponding to the superior policy document, and determining, based on the search results, whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs; if so, retaining the subordinate paragraph; otherwise, filtering out the subordinate paragraph; wherein the policy document association graph is constructed based on the association relationships between the respective policy documents;

[0064] In one embodiment, the association relationship between the various policy documents may be determined based on the hierarchical relationship between the organizations to which the various policy documents belong.

[0065] Furthermore, the process of constructing the relationship map between policy documents may include the following five steps:

[0066] 1. Determine the hierarchical relationship between the agencies to which each policy document belongs;

[0067] 2. Based on the hierarchical relationship between various institutions, determine the policy documents of the institutions that have a direct superior-subordinate relationship;

[0068] 3. Calculate the paragraph similarity between each pair of policy documents with direct hierarchical relationships between affiliated institutions;

[0069] 4. Eliminate policy document pairs with paragraph similarity lower than a preset value from the policy document pairs with direct hierarchical relationships between affiliated institutions, and treat each remaining policy document pair as a policy document pair with an associated relationship;

[0070] 5. Add the triplet corresponding to each policy document pair with an associated relationship to the policy document association graph, where the triplet includes the policy document pair with an associated relationship and the paragraph similarity between the two policy documents.

[0071] It's understandable that for each policy document, information about the organization to which it belongs is stored as an attribute. This attribute allows for distinguishing the hierarchical relationships between different organizations. Here, the organizations to which policy documents belong can be structured as hierarchical directories, with the superior organization serving as the outer main directory and the subordinate organizations serving as subdirectories. Different policy documents are imported into different organization directories, and by determining the hierarchical directories to which they belong, a preliminary determination can be made as to whether there are any relationships between the policy documents. In policy revision scenarios, policy revisions often only apply to policy documents with direct hierarchical relationships. Therefore, policy documents with direct hierarchical relationships can be linked using the hierarchical directory relationships of the organizations, while those without direct hierarchical relationships remain unlinked. This results in multiple pairs of policy documents with direct hierarchical relationships between organizations. Each pair consists of a superior policy document and a subordinate policy document. However, for pairs of policy documents with direct hierarchical relationships, content may not necessarily be related, so further screening is required. Here, we consider using content similarity as a method for further screening. Assume that policy document A in a policy document pair has 100 paragraphs, and there are 60 paragraphs associated with policy document B in the policy document pair. The similarity between A and B is considered to be 60%, that is, the paragraph similarity of the policy document pair is 60%. The default value is set to 50%, and the policy document pairs with paragraph similarity lower than 50% are filtered out. Each of the remaining policy document pairs is a policy document pair with an associated relationship. For each policy document pair with an associated relationship, a corresponding triple is constructed, with the identifiers of the two policy documents as the starting and ending entities of the triple, and the paragraph similarity between the policies as the associated attribute of the triple. The triple is then persisted in the policy document association map to obtain the policy document association map.

[0072] S140, taking each retained lower-level paragraph as a paragraph to be revised corresponding to the upper-level paragraph;

[0073] S150: Input the parent paragraph and the paragraph to be revised into a pre-trained natural language processing generative model to obtain revision suggestions for the paragraph to be revised.

[0074] For example, after an update of a superior policy document A, the superior policy document A is used as the superior policy document to initiate revision. For each paragraph a in the superior policy document A that exists in the entity paragraph table, the paragraph b that is strongly related to the paragraph a is retrieved in the association map between file contents. Then determine the policy document B to which paragraph b belongs. The subordinate policy documents that are associated with the superior policy document A are retrieved in the association map between policy documents, and it is determined whether policy document B exists in the retrieved subordinate policy documents. If it exists, paragraph b is treated as a paragraph to be revised. If it does not exist, paragraph b is excluded. If it exists, paragraph a and paragraph b are input into the natural language processing generative model, i.e., the NLP generative model, to obtain a revision suggestion for paragraph b.

[0075] Specifically, paragraphs a and b can be sent to the NLP generative model as prompt words, and the names of the superior policy document A and the subordinate document B, the hierarchical relationship between the two policy documents, and the basic logic of file revision can be informed to the NLP generative model. In this way, the NLP generative model will output revision suggestions for paragraph b.

[0076] The technologies involved in the embodiments of the present invention are introduced as follows:

[0077] A graph database is a database system specifically designed to store and manage graph-structured data. It represents data using nodes and edges, where nodes represent entities and edges represent relationships between entities. This data structure is well-suited for processing datasets with complex relationships, such as social networks, recommender systems, and knowledge graphs. Graph databases provide efficient graph traversal and query capabilities, maintaining high performance even with large data volumes. Common graph databases include Neo4j, OrientDB, and Amazon Neptune.

[0078] Semantic matching is a natural language processing technique that compares the similarities between two or more texts by understanding their meaning and context. This technique focuses not only on the literal meaning of text but also on its underlying meaning, including factors such as word meaning, syntax, and context. Semantic matching has applications in many fields, such as information retrieval, text mining, and machine translation. For example, search engines use semantic matching to understand and respond to user queries, recommendation systems use it to recommend items related to user interests, and natural language understanding systems use it to understand user intent.

[0079] The BGE model is an advanced Chinese-English semantic vector model developed by the Zhiyuan Research Institute, designed to improve semantic retrieval accuracy and overall semantic representation capabilities. The BGE-M3 model supports semantic representation and retrieval tasks in over 100 languages, capable of processing input texts up to 8,192 tokens, and integrating dense, sparse, and multi-vector retrieval capabilities. This one-stop support for diverse semantic retrieval scenarios significantly enhances the model's usability and flexibility in real-world applications.

[0080] Large NLP models are models in the field of natural language processing that have large parameters and large amounts of training data. They demonstrate remarkable capabilities in understanding and generating human language. The architecture of these large models is primarily based on the Transformer model, which utilizes a large number of attention mechanisms to effectively process sequential data. Their unique ability to capture long-range dependencies in text excels at understanding language context.

[0081] This embodiment of the present invention involves two parts: one is the construction of a graph, which first uses a series of logical processes to construct the relationships between policy documents and store these relationships in the graph, serving as the underlying data architecture for supporting policy revisions. The other part, based on the constructed graph, conducts two searches for different revision scenarios, such as newly issued policies and newly revised policies. Based on the search results, the sections to be revised are determined, and then, using a large model, reasonable revision suggestions are provided for these sections.

[0082] It can be seen that the embodiment of the present invention proposes a policy document revision method based on a graph data structure to address the technical deficiencies in the current policy document revision process. Compared with traditional revision methods that rely on manual experience and simple search engine retrieval, this method can increase the comprehensiveness of revised documents, reduce omissions, errors and negligence, improve the efficiency of revision work, and reduce human resource costs. The embodiment of the present invention can improve the intelligence and digitalization level of policy document revision work.

[0083] In a second aspect, an embodiment of the present invention provides a policy document revision device based on graph data, see Figure 2, the apparatus 100 comprises:

[0084] A first determining module 110 is used to determine the superior policy document to initiate revision;

[0085] A first search module 120 is configured to search a pre-constructed document content association graph for each subordinate paragraph having a strong association relationship with the superior paragraph in the superior policy document; wherein the document content association graph is constructed based on the superior and subordinate paragraphs having a strong association relationship in each policy document;

[0086] The second search module 130 is configured to search the pre-constructed policy document association graph for the association relationship corresponding to the superior policy document, and determine, based on the search results, whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs. If so, the subordinate paragraph is retained; otherwise, the subordinate paragraph is filtered out. The policy document association graph is constructed based on the association relationships between the various policy documents.

[0087] The second determining module 140 is configured to use each retained lower-level paragraph as a paragraph to be revised corresponding to the upper-level paragraph;

[0088] The suggestion generation module 150 is used to input the parent paragraph and the paragraph to be revised into a pre-trained natural language processing generative model to obtain revision suggestions for the paragraph to be revised.

[0089] In one embodiment, the upper and lower level paragraphs with a strong correlation relationship are determined based on the semantic similarity between the paragraphs of the policy documents and the upper and lower level relationships between the policy documents.

[0090] In one embodiment, the apparatus further comprises:

[0091] The first construction module is used to: split each policy document into paragraphs respectively, and store each paragraph obtained by the split into a vector database; record each paragraph obtained after the split as a first paragraph, perform similarity matching through a semantic matching model in the vector database to obtain multiple similar paragraphs corresponding to the first paragraph, and eliminate similar paragraphs with a similarity lower than a preset value from the multiple similar paragraphs; for each similar paragraph remaining after the elimination operation, determine whether the policy document to which the similar paragraph belongs is a direct subordinate file of the policy document to which the first paragraph belongs; if so, determine that the similar paragraph has a strong correlation with the first paragraph, and add the corresponding triple to the file content correlation map, wherein the triple includes the first paragraph, the similar paragraph and a strongly related attribute label.

[0092] In one embodiment, the first construction module is further used to: filter out paragraphs with less than a preset number of words and paragraphs serving as titles from the paragraphs obtained after the splitting; determine the file information of the policy file to which each paragraph remaining after the paragraph screening belongs and the position information of the paragraph in the policy file to which it belongs, and form a file paragraph table and an entity paragraph table; wherein the file paragraph table includes first record information corresponding to each paragraph, the first record information includes an ID, the file information and the position information; the entity paragraph table includes second record information corresponding to each paragraph, the second record information includes the file information and the ID of the first record information corresponding to the file paragraph table; when each policy file is updated, the first record information of the policy file in the file paragraph table and the second record information of the entity paragraph table are updated.

[0093] In one embodiment, the first construction module splits each policy file into paragraphs, including: if the policy file is in word or pdf format, using a conversion tool to convert the policy file into txt text format; splitting the content in the policy file in txt text format into paragraphs according to paragraph line breaks to obtain the paragraphs of the policy file.

[0094] In one embodiment, the association relationship between the various policy documents is determined based on the hierarchical relationship between the organizations to which the various policy documents belong.

[0095] In one embodiment, the apparatus further comprises:

[0096] The second construction module is used to determine the hierarchical relationship between the institutions to which each policy document belongs; based on the hierarchical relationship between the institutions, determine the policy document pairs with direct superior-subordinate relationships between the institutions; calculate the paragraph similarity between each policy document pair with direct superior-subordinate relationships between the institutions; eliminate the policy document pairs with paragraph similarity lower than a preset value from the policy document pairs with direct superior-subordinate relationships between the institutions, and treat each remaining policy document pair as a policy document pair with an associated relationship; add the triple corresponding to each policy document pair with an associated relationship to the policy document association map, and the triple includes the policy document pair with an associated relationship and the paragraph similarity between the two policy documents.

[0097] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided by the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0098] In a third aspect, an embodiment of the present invention provides a computer-readable medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.

[0099] Specifically, a system or device equipped with a storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program codes stored in the storage medium.

[0100] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.

[0101] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.

[0102] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.

[0103] In addition, it can be understood that the program code read from the storage medium is written into a memory provided in an expansion board inserted into the computer or into a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.

[0104] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0105] In a fourth aspect, an embodiment of this specification provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any one of the embodiments in the specification.

[0106] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided by the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0107] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0108] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention may be implemented using hardware, software, widgets, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0109] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A policy document revision method based on graph data, characterized in that: include: Determine the superior policy document to initiate revision; Retrieving each subordinate paragraph having a strong correlation with the superior paragraph in the superior policy document from a pre-constructed document content correlation graph; wherein the document content correlation graph is constructed based on the superior and subordinate paragraphs having a strong correlation in each policy document; Searching for the association relationship corresponding to the superior policy document in a pre-constructed policy document association graph, and determining whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs based on the search results; if so, retaining the subordinate paragraph; otherwise, filtering out the subordinate paragraph; wherein the policy document association graph is constructed based on the association relationship between each policy document; The remaining subordinate paragraphs are used as the paragraphs to be revised corresponding to the superior paragraphs; The parent paragraph and the paragraph to be revised are input into a pre-trained natural language processing generative model to obtain revision suggestions for the paragraph to be revised.

2. The method according to claim 1, characterized in that The upper and lower level paragraphs with strong correlation are determined based on the semantic similarity between the paragraphs of each policy document and the upper and lower level relationships between the policy documents.

3. The method according to claim 2, characterized in that The process of constructing the association graph between the file contents includes: Each policy document is split into paragraphs, and each paragraph obtained by the split is stored in the vector database; Each paragraph obtained after the split is recorded as a first paragraph, similarity matching is performed in the vector database using a semantic matching model to obtain multiple similar paragraphs corresponding to the first paragraph, and similar paragraphs with similarity lower than a preset value are removed from the multiple similar paragraphs; For each similar paragraph remaining after the elimination operation, determine whether the policy document to which the similar paragraph belongs is a direct subordinate document of the policy document to which the first paragraph belongs; If so, it is determined that the similar paragraph has a strong correlation with the first paragraph, and the corresponding triple is added to the file content correlation map, where the triple includes the first paragraph, the similar paragraph, and the strongly correlated attribute label.

4. The method according to claim 3, characterized in that The process of constructing the association graph between the file contents also includes: Filter out paragraphs with less than a preset number of words and paragraphs used as titles from the paragraphs obtained after splitting; Determine the file information of the policy file to which each paragraph remaining after paragraph screening belongs and the location information of the paragraph in the policy file to which it belongs, and form a file paragraph table and an entity paragraph table; wherein the file paragraph table includes first record information corresponding to each paragraph, the first record information including an ID, the file information, and the location information; the entity paragraph table includes second record information corresponding to each paragraph, the second record information including the file information and the ID of the first record information corresponding to the file paragraph table; When each policy file is updated, the first record information of the policy file in the file paragraph table and the second record information in the entity paragraph table are updated.

5. The method according to claim 3, characterized in that The above-mentioned splitting of each policy document into paragraphs includes: If the policy document is in word or pdf format, use a conversion tool to convert the policy document into txt text format; The content of the policy file in txt format is split into paragraphs according to the paragraph line breaks to obtain the individual paragraphs of the policy file.

6. The method according to claim 1, wherein The relationship between various policy documents is determined based on the hierarchical relationship between the institutions to which each policy document belongs.

7. The method according to claim 6, characterized in that The process of constructing the relationship map between policy documents includes: Determine the hierarchical relationship between the agencies that own each policy document; According to the hierarchical relationship between various institutions, determine the policy documents with direct superior-subordinate relationship among the institutions; Calculate the paragraph similarity between each pair of policy documents with direct hierarchical relationships between the affiliated institutions; Eliminate policy document pairs with paragraph similarity lower than a preset value from the policy document pairs with direct hierarchical relationships between affiliated institutions, and treat each remaining policy document pair as a policy document pair with an associated relationship; A triplet corresponding to each policy document pair having an associated relationship is added to the policy document association graph, where the triplet includes the policy document pair having an associated relationship and the paragraph similarity between the two policy documents.

8. A policy document revision device based on graph data, characterized in that: include: The first determination module is used to determine the superior policy document that initiates the revision; A first search module is configured to search a pre-constructed document content association graph for each subordinate paragraph having a strong association relationship with a superior paragraph in the superior policy document; wherein the document content association graph is constructed based on the superior and subordinate paragraphs having a strong association relationship in each policy document; A second search module is configured to search a pre-constructed policy document association graph for associations corresponding to the superior policy document, and determine, based on the search results, whether the superior policy document has an association with the subordinate policy document to which each subordinate paragraph belongs. If so, the subordinate paragraph is retained; otherwise, the subordinate paragraph is filtered out. The policy document association graph is constructed based on the associations between the various policy documents. A second determining module is configured to use each retained subordinate paragraph as a paragraph to be revised corresponding to the superior paragraph; The suggestion generation module is used to input the parent paragraph and the paragraph to be revised into a pre-trained natural language processing generative model to obtain revision suggestions for the paragraph to be revised.

9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Document processing method, system and equipment and storage medium

    CN118245574A

  • Document revision method and device, electronic equipment and storage medium

    CN118747494A