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

By constructing a method of generating revision suggestions for graph retrieval and natural language processing generative big model, the problem of insufficient deep correlation of policy text corpus in the existing technology is solved, and the efficiency and intelligence of policy document revision is achieved.

CN119576856AActive Publication Date: 2025-03-07SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing intelligent policy processing technology lacks deep correlation with the policy text corpus, which leads to the difficulty of reusing the knowledge of policy text resources and is unable to support the intelligent revision of subordinate policies.

Method used

Using a graph-based method, by constructing a correlation map between file content and a correlation map between policy files, the subordinate paragraphs with strong correlation relationships with superior policy files are retrieved, and revision suggestions are generated through natural language processing generative big model.

Benefits of technology

It has improved the comprehensiveness and intelligence of policy document revisions, reduced omissions, errors and negligence, improved the efficiency of revision work, and reduced human resources costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576856A_ABST
    Figure CN119576856A_ABST
Patent Text Reader

Abstract

The invention provides a policy document revision method and device based on graph data, a medium and equipment. The method comprises the following steps: determining a superior policy file initiating revision; retrieving each subordinate paragraph having a strong association relationship with the superior paragraph in the superior policy file in a file content association graph; retrieving an association relationship corresponding to the superior policy file in an association map between policy files, judging whether the superior policy file has an association relationship with a subordinate policy file to which each subordinate paragraph belongs according to a retrieval result, if so, retaining the subordinate paragraph, otherwise, filtering the subordinate paragraph; taking each reserved lower-level paragraph as a to-be-revised paragraph corresponding to the upper-level paragraph; and inputting the superior paragraph and the to-be-revised paragraph into a natural language processing generative large model to obtain a revision suggestion. The conditions of omission, errors and negligence can be reduced, the efficiency of revision work is improved, and the human resource cost is reduced.
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 file revision method based on graph data, a device, a medium, and a device. Background Art

[0002] Compliance with rules and regulations is not only the basis of operational efficiency, but also the fundamental guarantee for safe operation. The relevant national laws and regulations and 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 new policy documents, the subordinate department must update the existing policies in a timely manner. However, how to find the subordinate documents that should be revised in the massive policy documents and locate the specific paragraphs of the subordinate documents is a difficult problem in the current intelligent application. The existing policy intelligent processing technology lacks deep association with the policy text corpus. This technical bottleneck makes it difficult to reuse the policy text resource knowledge, which in turn leads to the inability 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 subordinate agencies need to rely heavily on manual experience and manual search in the process of document revision, and the degree of intelligent revision is 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, an embodiment of the present invention provides a policy document revision method, device, medium, and equipment based on graph data.

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

[0006] Identify the superior policy document that initiates the revision;

[0007] Retrieving each subordinate paragraph having a strong correlation with the superior paragraph in the superior policy file in 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 file;

[0008] Retrieve the association relationship corresponding to the superior policy document in the pre-constructed policy document association graph, and determine whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs according to the search result; if so, retain the subordinate paragraph, otherwise filter 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 paragraph;

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

[0011] In one embodiment, the upper and lower level paragraphs with a strong association relationship are determined according to the semantic similarity between the paragraphs of the policy documents and the upper and lower level relationship between the policy documents.

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

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

[0014] Each paragraph obtained after the splitting 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 similarities 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, wherein the triple includes the first paragraph, the similar paragraph and the strongly related attribute label.

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

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

[0019] Determine the file information of the policy file to which each remaining paragraph after the paragraphs are screened 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 includes 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 includes 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 file 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 txt text format is split into paragraphs according to the paragraph line breaks to obtain the various paragraphs of the policy file.

[0024] In one embodiment, the association relationship between the various policy documents is determined based on the hierarchical relationship of the institutions 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 the various policy documents;

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

[0028] Calculate the paragraph similarity between each pair of policy documents that have a direct hierarchical relationship between the affiliated institutions;

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

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

[0031] According to the second aspect, the policy document revision device based on graph data provided by an embodiment of the present invention includes:

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

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

[0034] The second search module is used to search for the association relationship corresponding to the superior policy document in the pre-constructed policy document association graph, and judge whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs according to the search result, and if so, retain the subordinate paragraph, otherwise filter out the subordinate paragraph; wherein the policy document association graph is constructed based on the association relationship between each policy document;

[0035] A second determination module is used 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, enables 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, including 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 policy document revision method and device based on graph data provided by the embodiment of the present invention determines the superior policy document that initiates the revision, then retrieves each subordinate paragraph that has a strong correlation with the superior paragraph in the superior policy document in the association map between the file contents, then retrieves the correlation relationship corresponding to the superior policy document in the association map between policy documents, and judges whether the superior policy document has a correlation relationship 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 revision work, reduce human resource costs, and improve the intelligence and digitalization level of policy document revision work. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of a process of a policy document revision method based on graph data in one embodiment of the present invention;

[0041] Figure 2 It 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 a first aspect, an embodiment of the present invention provides a policy document revision method based on graph data, see Figure 1 The method comprises the following steps S110 to S150:

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

[0044] S120, searching for each subordinate paragraph having a strong correlation with the superior paragraph in the superior policy file in the pre-constructed document content correlation map; wherein the document content correlation map is constructed based on the superior and subordinate paragraphs having a strong correlation in each policy file;

[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 that have 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 association relationship may be determined based on the semantic similarity between the paragraphs of the policy documents and the upper and lower level relationship 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 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 into a vector database;

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

[0053] It can be seen that in order to achieve paragraph comparison in policy documents, it is necessary to split the policy documents into paragraphs. Here is a relatively simple splitting method. First, the format of the file needs to be unified. For policy documents in word, pdf and other formats, use a format conversion tool to convert them into txt text format. The conversion tool can use programming languages ​​such as python and JAVA. The toolkit is not discussed in detail here. After converting to txt text format, the content in the policy file 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. Each paragraph obtained after the splitting is recorded as the first paragraph, and 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 similarities lower than a preset value are removed 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, wherein the triple includes the first paragraph, the similar paragraph and the strongly related attribute label.

[0057] For example, for paragraph a in the superior policy document A, paragraph a is retrieved for similarity in the vector database through 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 a similarity less than a preset value. The preset value can be determined based on the actual situation of the policy document and the model effect; 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 start and end entities of the triple are the specific contents of paragraph a and paragraph b. The attribute label can be defined as "strongly related" 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 the paragraphs with less than the preset number of words and the paragraphs used as titles from the paragraphs obtained after splitting;

[0060] 6. Determine the file information of the policy file to which each remaining paragraph after the paragraphs are screened 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 includes 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 includes 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 in 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 in 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 location information of the paragraph in the policy file, and then form two tables: a file paragraph table and an 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 location 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 the association relationship corresponding to the superior policy file in the pre-constructed policy file association graph, and judging whether the superior policy file has an association relationship with the subordinate policy file to which each subordinate paragraph belongs according to the search result, if so, retaining the subordinate paragraph, otherwise filtering out the subordinate paragraph; wherein the policy file association graph is constructed based on the association relationship between each policy file;

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

[0065] Furthermore, the process of constructing the association 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. According to the hierarchical relationship between various institutions, determine the policy documents with direct superior-subordinate relationship between the institutions;

[0068] 3. Calculate the paragraph similarity between each pair of policy documents that have a direct hierarchical relationship between the affiliated institutions;

[0069] 4. Eliminate policy document pairs with paragraph similarity lower than a preset value from the policy document pairs with direct superior-subordinate relationships of the affiliated institutions, and treat each of the remaining policy document pairs 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, wherein the triplet includes the policy document pair with an associated relationship and the paragraph similarity between the two policy documents.

[0071] It is understandable that for each policy file, the information of the institution to which the policy file belongs is stored as an attribute, and the superior-subordinate relationship of different institutions can be distinguished based on this attribute. Here, the institution to which the policy file belongs can be constructed in the form of a hierarchical directory, with the superior institution as the outer main directory and the subordinate institution as the subdirectory. Different policy files are imported into different institution directories, and by judging the hierarchical directory to which different files belong, it is preliminarily determined whether there is a correlation between policy files. For the policy revision scenario, policy revisions are often only revised for policy files with direct superior-subordinate relationships. Therefore, policy files with direct superior-subordinate relationships can be associated through the hierarchical directory relationship of the institution, and policy files without direct superior-subordinate relationships are not associated. At this point, multiple policy file pairs with direct superior-subordinate relationships can be obtained, and each policy file pair includes a superior policy file and a subordinate policy file. Next, for policy file pairs with direct superior-subordinate relationships, there may not be a correlation in the file content, so further screening is required. Here, further screening is considered by the similarity of file content. 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, then 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 entity and the ending entity of the triple, and the paragraph similarity between the policies as the associated attribute of the triple. Then the triple is persisted in the associated graph between policy documents to obtain the associated graph between policy documents.

[0072] S140, taking each of the retained subordinate paragraphs as the paragraphs to be revised corresponding to the superior paragraph;

[0073] S150, inputting the parent paragraph and the paragraph to be revised into a pre-trained natural language processing generative large 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, search for paragraph b that is strongly related to paragraph a in the file content association map. Then determine the policy document B to which paragraph b belongs. Search the policy document association map for subordinate policy documents that are associated with the superior policy document A, and determine whether policy document B exists in the retrieved subordinate policy documents. If it exists, paragraph b is used 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 big model, i.e., the NLP generative big model, to obtain a revision suggestion for paragraph b.

[0075] Specifically, paragraph a and paragraph b can be sent to the NLP generative big model as prompt words, and the names of the superior policy file A and the subordinate file B, the hierarchical relationship between the two policy files, and the basic logic of file revision can be informed to the NLP generative big model. In this way, the NLP generative big 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 in the form of nodes and edges, where nodes represent entities and edges represent relationships between entities. This data structure is very suitable for processing data sets with complex relationships, such as social networks, recommendation systems, knowledge graphs, etc. Graph databases provide efficient graph traversal and query functions, allowing high performance to be maintained even with large amounts of data. Common graph databases include Neo4j, OrientDB, Amazon Neptune, etc.

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

[0079] The BGE model is an advanced Chinese and English semantic vector model developed by the Zhiyuan Research Institute to improve the accuracy of semantic retrieval and overall semantic representation capabilities. The BGE-M3 model supports semantic representation and retrieval tasks in more than 100 languages, has the ability to process input texts up to 8192 tokens, and integrates three major functions: dense retrieval, sparse retrieval, and multi-vector retrieval. This one-stop support for different semantic retrieval scenarios has greatly improved the model's usability and flexibility in real-world applications.

[0080] NLP large models are models with large-scale parameters and data training in the field of natural language processing. They have shown remarkable capabilities in understanding and generating human language. The architecture of large models is mainly based on the Transformer model, which effectively processes sequence data through a large number of attention mechanisms. Its characteristic is that it can capture long-distance dependencies in text, which makes the model perform well in understanding the context of language.

[0081] The embodiment of the present invention involves two parts: one is the construction of the graph, that is, firstly, the association relationship between policy documents is constructed through a series of logics, and the associated data is stored in the graph as the underlying data architecture to support policy revision. The other part is based on the constructed graph, and two searches are performed for different revision scenarios such as newly issued policies and newly revised policies, and the paragraphs to be revised are determined based on the search results, and then reasonable revision suggestions for the paragraphs to be revised are given using the big model.

[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 solve the technical deficiencies in the current policy document revision process. Compared with the traditional revision method that relies on manual experience and simple search engine retrieval, this method can increase the comprehensiveness of the revised documents, reduce omissions, errors and negligence, improve the efficiency of the revision work, and reduce human resource costs. The embodiment of the present invention can improve the intelligence and digitization 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 device 100 comprises:

[0084] A first determination module 110 is used to determine the superior policy document for initiating revision;

[0085] The first search module 120 is used to search for each subordinate paragraph having a strong correlation with the superior paragraph in the superior policy file in the pre-constructed document content correlation map; wherein the document content correlation map is constructed based on the superior and subordinate paragraphs having a strong correlation in each policy file;

[0086] The second search module 130 is used to search the association relationship corresponding to the superior policy document in the pre-constructed policy document association graph, and determine whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs according to the search result, and if so, retain the subordinate paragraph, otherwise filter out the subordinate paragraph; wherein the policy document association graph is constructed based on the association relationship between each policy document;

[0087] The second determining module 140 is used to use each retained subordinate paragraph as a paragraph to be revised corresponding to the superior 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 association relationship are determined according to the semantic similarity between the paragraphs of the policy documents and the upper and lower level relationship 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 remove similar paragraphs with a similarity lower than a preset value from the multiple similar paragraphs; for each similar paragraph remaining after the removal 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 association map between file contents, 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 also used to: filter out paragraphs with less than a preset number of words and paragraphs serving as titles from each paragraph obtained after the splitting; determine the file information of the policy file to which each remaining paragraph after the paragraphs are filtered out 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, converting the policy file into a txt text format using a conversion tool; 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 of the institutions 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; determine the policy document pairs with direct superior-subordinate relationships among the institutions based on the hierarchical relationship among the institutions; calculate the paragraph similarity between each policy document pair with direct superior-subordinate relationships among 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 among 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 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.

[0098] In a third aspect, an embodiment of the present invention provides a computer-readable medium, on which computer instructions are stored. 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 code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code 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 a part of the present invention.

[0101] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

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

[0103] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to 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-mentioned 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 the present specification provides a computing device, including 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 embodiment of the specification.

[0106] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device 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.

[0107] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0108] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, widgets, or any combination thereof. When implemented by software, these functions can 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 substitutions, 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: Identify the superior policy document that initiates the revision; Retrieving each subordinate paragraph having a strong correlation with the superior paragraph in the superior policy file in 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 file; Retrieve the association relationship corresponding to the superior policy document in the pre-constructed policy document association graph, and determine whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs according to the search result; if so, retain the subordinate paragraph, otherwise filter 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 paragraph; The parent paragraph and the paragraph to be revised are input into a pre-trained natural language processing generative large 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 according to the semantic similarity between the paragraphs of each policy document and the upper and lower level relationship between each policy document.

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 divided into paragraphs, and each paragraph obtained by the division is stored in a vector database; Each paragraph obtained after the splitting 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 similarities 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, wherein the triple includes the first paragraph, the similar paragraph and the strongly related 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 the paragraphs with less than a preset number of words and the paragraphs used as titles from the paragraphs obtained after the splitting; Determine the file information of the policy file to which each remaining paragraph after the paragraphs are screened 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 includes 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 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 in the entity paragraph table are updated.

5. The method according to claim 3, characterized in that: The above-mentioned process of dividing 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 text format is split into paragraphs according to the paragraph line breaks to obtain the various paragraphs of the policy file.

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

7. The method according to claim 6, characterized in that The process of constructing the association map between the policy documents includes: Determine the hierarchical relationship between the agencies that own the various policy documents; According to the hierarchical relationship between various institutions, determine the policy documents with direct superior-subordinate relationship between the institutions; Calculate the paragraph similarity between each pair of policy documents that have a direct hierarchical relationship between the affiliated institutions; Eliminate policy document pairs with paragraph similarity lower than a preset value from the policy document pairs with direct superior-subordinate relationships of the affiliated institutions, and treat each of the remaining policy document pairs as a policy document pair with an associated relationship; A triple corresponding to each policy document pair having an associated relationship is added to the policy document association graph, wherein the triple 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 used to search for each subordinate paragraph having a strong correlation with the superior paragraph in the superior policy file in a pre-constructed document content correlation map; wherein the document content correlation map is constructed based on the superior and subordinate paragraphs having a strong correlation in each policy file; The second search module is used to search for the association relationship corresponding to the superior policy document in the pre-constructed policy document association graph, and judge whether the superior policy document has an association relationship with the subordinate policy document to which each subordinate paragraph belongs according to the search result, and if so, retain the subordinate paragraph, otherwise filter out the subordinate paragraph; wherein the policy document association graph is constructed based on the association relationship between each policy document; A second determination module is used 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 codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Document comparison method and device

    CN108268884A

  • Paragraph hierarchy construction method and device, electronic equipment and storage medium

    CN110427614A

  • Paragraph extraction method and device and electronic equipment

    CN114861676A

  • Text data information mining method, device and equipment

    CN115374781A

  • Knowledge recall method based on semantic cohesion discrimination model and application thereof

    CN118070814A