Cross-department policy conflict detection method and system based on knowledge graph reasoning
By constructing a cross-departmental policy knowledge graph and the ChainsFormer chain multi-hop reasoning model, combined with a graph-constrained large language model, efficient and accurate automatic detection of cross-departmental policy conflicts is achieved, solving the problems of low efficiency, poor accuracy and insufficient intelligence in existing technologies, and improving the technical level of policy collaborative management and decision support.
Patent Information
- Application Number
- CN202510743067.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies have problems in cross-departmental policy conflict detection, such as low efficiency, poor accuracy, insufficient intelligence, and difficulty in identifying indirect conflicts. In particular, single-hop reasoning models are difficult to identify complex logical relationships with multiple levels and relationships.
Construct a cross-departmental policy knowledge graph, use the ChainsFormer chain multi-hop reasoning model to perform multi-hop logical relationship reasoning, define a set of standardized policy conflict rules, and generate graph structure path constraint rules through the graph constraint large language model reasoning framework to realize the chain multi-hop reasoning path set between policy entities, and combine it with standardized policy conflict rules for automatic detection.
It improves the coverage and accuracy of policy conflict detection, enhances the degree of automation and explainability, solves the problems of data isolation and false paths existing in existing technologies, and significantly improves the efficiency and accuracy of policy conflict detection.
Smart Images

Figure CN120633856A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of administrative management technology, and in particular to a cross-departmental policy conflict detection method and system based on knowledge graph reasoning. Background Art
[0002] At this stage, with the gradual improvement of the national governance system, the number of policy documents issued by various government departments is increasing, and the correlation and interdependence between various policies are constantly improving. However, due to the decentralized and independent nature of cross-departmental policy making, departments often lack effective coordination and unified management mechanisms in the policy issuance process, which makes the policy documents between different departments often have implicit or explicit logical conflicts, conflicts in scope of application, and inconsistent implementation standards. Logical conflicts and conflicts in scope of application not only reduce the efficiency and accuracy of policy implementation, but also increase the uncertainty in the policy implementation process, affecting the coordination of government decision-making and the effectiveness of implementation.
[0003] To solve the above problems, the current policy conflict detection method mainly relies on manual expert review. Manual expert review usually starts with policy experts identifying possible conflicts between policy documents by reading, analyzing and comparing policy texts from different departments one by one, and then further confirming the type and degree of policy conflicts through manual seminars or special meetings. However, the manual review model has significant shortcomings and bottlenecks: on the one hand, the number of policy documents is huge and constantly updated, and the workload of pure manual review is extremely high and the efficiency is low, making it difficult to ensure the timeliness and systematicness of the review. On the other hand, manual identification and confirmation of conflicts are highly subjective and easy to miss, which can easily lead to misjudgments or omissions, resulting in the conflict problem not being effectively resolved for a long time.
[0004] In order to improve the efficiency and accuracy of policy conflict detection, some studies have proposed automatic policy conflict detection technologies based on natural language processing and simple knowledge graph methods. For example, natural language processing methods are used to preliminarily discover conflicts between policies through simple keyword matching or similarity analysis. However, natural language processing methods only stay on the surface of the text and lack the understanding and reasoning of the deep logical relationship of the policy content, which easily leads to the omission of indirect or implicit policy conflicts. In addition, the generalization ability of relying solely on keyword matching methods is weak, and it cannot effectively handle policy texts with complex semantic structures and obvious semantic differences.
[0005] In recent years, some studies have explored single-hop reasoning technology based on knowledge graphs to solve the above problems. Single-hop reasoning technology represents policy texts as entity nodes and their associations by constructing a policy knowledge graph, and uses a single-hop query mechanism to check the direct conflict relationships between policy entities. Although it realizes the structured representation of policy texts, policy conflicts are often complex logical relationships formed under multi-department, multi-level, and multi-relationship conditions. The ability of the single-hop reasoning model is limited to the relationship judgment of directly adjacent nodes, and it is difficult to identify deep-level or indirect conflicts with multiple logical steps, which restricts the effectiveness of its practical application.
[0006] Therefore, how to provide a cross-departmental policy conflict detection method and system based on knowledge graph reasoning is an urgent problem that technical personnel in this field need to solve. Summary of the Invention
[0007] One purpose of the present invention is to propose a cross-departmental policy conflict detection method and system based on knowledge graph reasoning. The present invention constructs a cross-departmental policy knowledge graph and defines structural constraints, uses the ChainsFormer chain multi-hop reasoning model to perform chain reasoning on the multi-hop logical relationship between policy entities to generate a multi-hop reasoning path between policy entities, defines a standardized policy conflict rule set to clarify the policy conflict type and conflict conditions, constructs a graph constraint large language model reasoning framework and explicitly embeds the knowledge graph structural constraints into it to generate graph structure path constraint rules, obtains a chain multi-hop reasoning path set between policy entities through model fusion and constraint reasoning process, and finally automatically performs cross-departmental policy conflict detection based on the path set and the standardized policy conflict rule set to generate a policy conflict identification result, thereby effectively solving the problems of data isolation, low intelligence, insufficient detection efficiency and difficulty in identifying indirect conflicts in existing policy conflict detection methods, and has the advantages of high conflict detection accuracy, high degree of automation, strong interpretability and significantly improved detection efficiency.
[0008] A cross-departmental policy conflict detection method based on knowledge graph reasoning according to an embodiment of the present invention includes the following steps:
[0009] S1. Obtain a collection of cross-departmental policy documents, use natural language processing technology to identify and extract policy entities and the relationships between entities in the policy documents, form a cross-departmental policy knowledge graph, and define structural constraints based on the entities and relationships in the cross-departmental policy knowledge graph;
[0010] S2. Based on the cross-departmental policy knowledge graph, a ChainsFormer chain multi-hop reasoning model is constructed to perform chain reasoning on the multi-hop logical relationships between policy entities and generate multi-hop reasoning paths between policy entities;
[0011] S3. Based on the cross-departmental policy knowledge graph, define cross-departmental policy conflict identification rules and form a standardized policy conflict rule set including conflict types and conflict conditions;
[0012] S4. Based on the cross-departmental policy knowledge graph, a graph-constrained large language model reasoning framework is constructed. The structural constraints of the policy knowledge graph are explicitly embedded in the graph-constrained large language model reasoning framework to generate graph structure path constraint rules for constraining the reasoning path generation process.
[0013] S5. Based on the multi-hop reasoning paths between policy entities and the graph structure path constraint rules, the model is integrated and the reasoning process is constrained to obtain a set of chained multi-hop reasoning paths between policy entities;
[0014] S6. Based on the chain multi-hop reasoning path set, the standardized policy conflict rule set is used to perform automatic cross-departmental policy conflict detection and obtain the policy conflict identification results.
[0015] Optionally, the ChainsFormer chained multi-hop reasoning model specifically includes:
[0016] Based on the policy entity node set E and the inter-entity relationship set R defined in the cross-departmental policy knowledge graph, each policy entity node is represented as a vector v with dimension d i ,in,
[0017] Based on the logical relationship between policy entity nodes in the cross-departmental policy knowledge graph, the chain path constraint attention is calculated:
[0018]
[0019] Among them, Attention(e i ,e j ) represents the policy entity node e i To policy entity node e j The attention calculation result, W q 、W k are the parameter matrices of dimension d×d obtained in advance, α ij is the path constraint gating factor, when the policy entity node e j Able to undertake policy entity node e in logical relationship i When it is, the value is 0, otherwise it is -∞;
[0020] Based on the calculated attention calculation results, the selection probability of the next policy entity node in each step of the reasoning path is determined:
[0021] P(e t+1 |e t)=Attention(e t ,e t+1 );
[0022] Among them, e t Indicates the current policy entity node, e t+1 The policy entity node representing the next step of reasoning selection;
[0023] Based on the selection probability of the next policy entity node, the subsequent policy entity nodes in the multi-hop reasoning path are determined in sequence using a chain iteration method until the reasoning path length reaches an integer between the numerical range of 2 and the numerical range of 5. Then, the subsequent chain iteration path selection is stopped, and a multi-hop reasoning path with a length between the numerical range of 2 and the numerical range of 5 is obtained;
[0024] After each multi-hop reasoning path is determined, the historical reasoning path set is updated:
[0025] H t+1 =H t ∪{(e t ,r t,t+1 ,e t+1 )};
[0026] Among them, H t represents the set of historical reasoning paths before step t, r t,t+1 Indicates that from the policy entity node e t To the policy entity node e t+1 The relationship between entities, H t+1 Represents the updated set of historical reasoning paths;
[0027] Define the reward function for the reasoning path:
[0028] R(Path)=γ1·Correctness(Path)-γ2·Length(Path);
[0029] Among them, Correctness(Path) is the path correctness parameter, which takes the value of 1 when the path correctly identifies the policy conflict relationship in the training set, otherwise it takes the value of 0; Length(Path) is the path length, which takes an integer between 2 and 5; γ1 and γ2 are weight coefficients;
[0030] The REINFORCE algorithm is used to optimize the parameters of the ChainsFormer chain multi-hop reasoning model with the expectation maximization of the reward function as the optimization goal.
[0031] Optionally, the S2 specifically includes:
[0032] S21. Based on the policy entity node set E and the inter-entity relationship set R defined in the cross-departmental policy knowledge graph, select the initial policy entity node e0 from the policy entity node set E as the starting node of the chain reasoning path;
[0033] S22, record the vector representation of the initial policy entity node e0 as a vector v0 of dimension d;
[0034] S23, for the policy entity node e in the current reasoning path t , based on the chain path constraint attention calculation method, calculate the node e t With the candidate next step policy entity node e t+1 The chain path between them constrains the attention value;
[0035] S24, based on the chain path constraint attention value, adopt the next step policy entity node selection probability determination method to determine the policy entity node e t Go to the next policy entity node e t+1 The probability of selection;
[0036] S25. According to the probability of selecting the next policy entity node, a chain iteration method is used to determine the next policy entity node e of the current reasoning path. t+1 , and determine the policy entity node e t+1 Add to the current multi-hop reasoning path to form a reasoning path sequence:
[0037]
[0038] Among them, r t,t+1 Indicates that from the policy entity node e t To the policy entity node e t+1 The relationship between entities, and r t,t+1 ∈R;
[0039] S26. When the path length of the determined multi-hop reasoning path reaches an integer in the numerical range of 2 to the numerical range of 5, stop selecting the next policy entity node for further chain iteration, and finally obtain a multi-hop reasoning path between policy entities with a length in the numerical range of 2 to the numerical range of 5.
[0040] Optionally, the S3 specifically includes:
[0041] S31. Based on the set of policy entity nodes and the set of relationships between entities defined in the cross-departmental policy knowledge graph, determine the policy entity node pairs involved in cross-departmental policy conflict identification;
[0042] S32. For each policy entity node pair, define the association relationship category between the policy entity nodes, and divide the association relationship category into mutually exclusive relationships and conditional conflict relationships:
[0043] The conflict condition of the mutually exclusive relationship is defined as the existence of two policy entity nodes at the same time, which constitutes a mutual exclusion conflict;
[0044] The conflict condition that defines the conditional conflict relationship is that a conditional policy conflict occurs between two policy entity nodes when any one or more of the following preset conditions are met simultaneously. The preset conditions specifically include:
[0045] The scope of objects to which the policies corresponding to the policy entity nodes apply overlap;
[0046] The time limits of the policies corresponding to the policy entity nodes overlap;
[0047] The geographical or regional scopes of the policies corresponding to the policy entity nodes overlap;
[0048] The policies corresponding to the policy entity nodes have obvious differences or contradictions in the requirements or restrictions on the same behavior;
[0049] The policies corresponding to the policy entity nodes have clear hierarchical conflicts in terms of legal effect or hierarchy;
[0050] S33. Based on the cross-departmental policy knowledge graph, a structured semantic parsing method is used to extract the semantic information of the association relationship between policy entity nodes in the cross-departmental policy document and determine the specific conflict conditions corresponding to each association relationship;
[0051] S34. Based on the association relationship categories and specific conflict conditions, map the policy entity nodes to the corresponding association relationship categories and conflict conditions one by one to form standardized policy conflict rules;
[0052] S35. Based on the standardized policy conflict rules, combine all standardized policy conflict rules to form a standardized policy conflict rule set, wherein the standardized policy conflict rule set includes a policy entity node pair identifier, an association relationship category identifier, and a corresponding specific conflict condition identifier.
[0053] Optionally, the construction of a graph-constrained large language model reasoning framework specifically includes:
[0054] Based on the policy entity node set E defined in the cross-departmental policy knowledge graph, a structural constraint adjacency matrix A is constructed. The structural constraint adjacency matrix A∈{0,1} |E|×|E| , where A i,j The value 1 indicates the policy entity node e i With policy entity node e j There is an inter-entity relationship, otherwise A i,j Take the value 0;
[0055] For the current policy entity node e t , based on the structural constraint adjacency matrix A, determine the next step candidate policy entity node set
[0056]
[0057] Among them, e j Indicates the next candidate policy entity node, A t,j Represents the current policy entity node e t and the next step candidate policy entity node e j The structural constraints between the adjacency matrix values;
[0058] For the current policy entity node e t And the next candidate policy entity node e j , calculate the initial probability value p of the next node selection under unconstrained conditions through the large language model LLM (e j |e t );
[0059] Based on the structural constraint adjacency matrix A and the initial probability value p LLM (e j |e t ), determine the next node selection probability value p after the structural constraint condition correction C (e j |e t ):
[0060]
[0061] Among them, p C (e j |e t ) represents the slave policy entity node e after being modified by the structural constraints t To candidate node e j The probability value, p LLM (e j |e t ) represents the policy entity node e under unconstrained conditions t To candidate node e j The initial probability value of ;
[0062] For the determined next step policy entity node e t+1 , based on the structural constraint adjacency matrix A, real-time verification from the current policy entity node e t To node e t+1 The effectiveness of the structure constraint adjacency matrix value A t,t+1 =1, confirm that the current path is valid. When the structure constraint adjacency matrix value A t,t+1=0, confirm that the current path is invalid and re-select the next policy entity node;
[0063] Define the structural constraint loss function L SC :
[0064] L SC =-∑ t log(p C (e t+1 |e t ));
[0065] Among them, L SC represents the structural constraint loss function, p C (e t+1 |e t ) represents the slave policy entity node e after being modified by the structural constraints t To node e t+1 The probability of selection;
[0066] Based on the structural constraint loss function L SC , using gradient descent to constrain the large language model parameters θ LLM Perform optimization training:
[0067]
[0068] Among them, θ LLM Represents all trainable parameters of the graph-constrained large language model, Represents the optimized graph-constrained large language model parameters.
[0069] Optionally, the S4 specifically includes:
[0070] S41, based on the structural constraint adjacency matrix A, a matrix decomposition method is used to obtain a node relationship constraint embedding matrix M, wherein the node relationship constraint embedding matrix Among them, each row vector in the matrix M corresponds to the relational structure constraint representation of the policy entity node, and the parameter d takes an integer ranging from 64 to 512;
[0071] S42, for the current policy entity node e t , extract the node corresponding to node e t The relational structure constraint embedding vector m t , the relational structure constrains the embedding vector is the matrix M corresponding to node e t The row vector of ;
[0072] S43, for the candidate next step policy entity node e j , extract the node corresponding to node e j The relational structure constraint embedding vector mj , the relational structure constrains the embedding vector is the matrix M corresponding to node e j The row vector of ;
[0073] S44, based on the current node e t The relational structure constraint embedding vector m t and candidate node e j The relational structure constraint embedding vector m j , calculate the structural constraint similarity value S(e t ,e j );
[0074] S45, set the structural constraint similarity threshold δ, when the structural constraint similarity value S(e t ,e j )≥δ, confirm that the slave node e t To node e j The reasoning path complies with the graph structure constraint rules. When the structure constraint similarity value S(e t ,e j )<δ, confirm from node e t To node e j The reasoning path does not conform to the graph structure constraint rules;
[0075] S46, based on the structural constraint similarity value S(e t ,e j ) and threshold δ, determine all node pairs that meet the graph structure constraint rules (e t ,e j ), forming graph structure path constraint rules.
[0076] Optionally, the S5 specifically includes:
[0077] S51. Based on the multi-hop reasoning paths between policy entities, obtain an initial multi-hop reasoning path set between policy entities, wherein the initial multi-hop reasoning path set between policy entities includes multiple initial reasoning path sequences, and the length of each path sequence is an integer in a numerical range of 2 to 5;
[0078] S52, based on the graph structure path constraint rule, calculating the structural constraint similarity value for each pair of adjacent nodes of each reasoning path in the initial multi-hop reasoning path set between policy entities one by one;
[0079] S53, based on the structural constraint similarity threshold, determining whether the path between each pair of adjacent nodes in the reasoning path is valid; when the structural constraint similarity value of the adjacent nodes is greater than or equal to the structural constraint similarity threshold, the path between the adjacent nodes is confirmed to be valid; otherwise, the path between the adjacent nodes is confirmed to be invalid;
[0080] S54. For each reasoning path, if any pair of paths between adjacent nodes is invalid, the corresponding reasoning path is deleted; if all paths between adjacent nodes are valid, the corresponding reasoning path is retained;
[0081] S55. For all retained reasoning paths, calculate the path constraint confidence value of each reasoning path, where the path constraint confidence value is the average value of the structural constraint similarity values of all adjacent node pairs in the path;
[0082] S56. Setting a path constraint confidence threshold, screening the reasoning paths based on the path constraint confidence value, retaining the corresponding reasoning path when the path constraint confidence value of the reasoning path is greater than or equal to the path constraint confidence threshold, and deleting the corresponding reasoning path when the path constraint confidence value of the reasoning path is less than the path constraint confidence threshold;
[0083] S57. Based on all reasoning paths, a set of chained multi-hop reasoning paths between policy entities is formed.
[0084] Optionally, the S6 specifically includes:
[0085] S61. Obtain candidate policy entity node pairs for policy conflict detection based on a set of chained multi-hop reasoning paths between policy entities;
[0086] S62. Based on the standardized policy conflict rule set, extract the policy entity node pair identifiers and the association relationship category identifiers one by one, and establish a mapping relationship between the policy entity node pair and the association relationship category;
[0087] S63. For each candidate policy entity node pair, determine whether the candidate policy entity node pair exists in the standardized policy conflict rule set.
[0088] S64. When the candidate policy entity node pair exists in the standardized policy conflict rule set, compare the actual reasoning path of the candidate policy entity node pair with the specific conflict conditions defined in the standardized policy conflict rule set;
[0089] S65. For each candidate policy entity node pair, compare the correspondence between the actual reasoning path and the specific conflict condition to see if they satisfy any of the following conditions:
[0090] The first case is a mutually exclusive relationship, where the reasoning path of the candidate policy entity node pair contains both policy entity nodes;
[0091] The second case is a conditional conflict relationship, where the reasoning path of the candidate policy entity node pair satisfies the preset conditions defined in the standardized policy conflict rule set;
[0092] S66. For each candidate policy entity node pair that satisfies any of the conditions, determining whether a policy conflict exists between the corresponding candidate policy entity node pairs;
[0093] S67. Generate cross-departmental policy conflict identification results for all candidate policy entity node pairs that are determined to have policy conflicts.
[0094] A cross-departmental policy conflict detection system based on knowledge graph reasoning, specifically including:
[0095] The policy knowledge graph construction module is used to obtain a set of cross-departmental policy documents, identify and extract policy entities and the relationships between entities in the policy documents, form a cross-departmental policy knowledge graph, and define structural constraints;
[0096] The ChainsFormer chain multi-hop reasoning module is used to build the ChainsFormer chain multi-hop reasoning model based on the cross-departmental policy knowledge graph, and perform chain reasoning on the multi-hop logical relationships between policy entities to generate multi-hop reasoning paths between policy entities;
[0097] A standardized policy conflict rule definition module is used to define cross-departmental policy conflict identification rules based on the cross-departmental policy knowledge graph, forming a standardized policy conflict rule set including conflict types and conflict conditions;
[0098] A graph-constrained large language model construction module is used to build a cross-departmental policy knowledge graph and explicitly embed structural constraints into the graph-constrained large language model reasoning framework to generate graph structure path constraint rules for constraining the reasoning path generation process;
[0099] The chained reasoning path constraint fusion module is used to fuse models and constrain the reasoning process based on the multi-hop reasoning paths between policy entities and the graph structure path constraint rules, and obtain a set of chained multi-hop reasoning paths between policy entities;
[0100] The policy conflict automatic detection module is used to perform automatic cross-departmental policy conflict detection based on a set of chained multi-hop reasoning paths between policy entities and a set of standardized policy conflict rules to obtain policy conflict identification results.
[0101] The beneficial effects of the present invention are:
[0102] (1) The present invention constructs a ChainsFormer chain multi-hop reasoning model to perform chain reasoning on the multi-hop logical relationship between policy entities and generate a multi-hop reasoning path between policy entities. This breaks through the bottleneck of the existing technology that single-hop reasoning is difficult to accurately identify complex or indirect policy conflicts, effectively improves the coverage and detection accuracy of cross-departmental policy conflict detection, and enhances the comprehensiveness and accuracy of policy conflict detection.
[0103] (2) The present invention constructs a graph-constrained large language model reasoning framework and explicitly embeds the structural constraints of the knowledge graph to generate graph structure path constraint rules for constraining the reasoning path, which significantly improves the effectiveness and credibility of the large language model reasoning process and shows better reasoning stability and explainability in the process of intelligent automatic conflict detection of cross-departmental policies.
[0104] (3) In the automatic detection of cross-departmental policy conflicts, the present invention effectively solves the problems of insufficient intelligence of policy conflict detection, data isolation, and false paths that are prone to appear in the reasoning process in the existing technology by integrating the multi-hop reasoning path between policy entities generated by the ChainsFormer chain multi-hop reasoning model with the graph structure path constraint rules. It breaks through the technical limitations of the existing policy conflict detection methods such as low efficiency, poor accuracy, and difficulty in automation, and achieves a significant improvement in the automatic detection capability of policy conflicts, thereby effectively improving the technical level and application capabilities in the field of policy collaborative management and decision support. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0106] Figure 1 This is the overall technical flow chart of a cross-departmental policy conflict detection method and system based on knowledge graph reasoning proposed by the present invention;
[0107] Figure 2 This is a flowchart of the ChainsFormer chain multi-hop reasoning model of a cross-departmental policy conflict detection method and system based on knowledge graph reasoning proposed by the present invention;
[0108] Figure 3 This is a schematic diagram of the graph-constrained large language model reasoning framework of a cross-departmental policy conflict detection method and system based on knowledge graph reasoning proposed in the present invention. DETAILED DESCRIPTION
[0109] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0110] refer to Figure 1-3 , a cross-departmental policy conflict detection method and system based on knowledge graph reasoning, including the following steps:
[0111] S1. Obtain a collection of cross-departmental policy documents, use natural language processing technology to identify and extract policy entities and the relationships between entities in the policy documents, form a cross-departmental policy knowledge graph, and define structural constraints based on the entities and relationships in the cross-departmental policy knowledge graph;
[0112] First, a comprehensive collection of cross-departmental policy documents is conducted to form a cross-departmental policy document collection. Specifically, this collection includes policy documents such as policies, regulations, management methods, notices, rules, and guidelines issued by various government departments and related agencies. Natural language processing techniques are then used to analyze and process the textual information within the collected policy document collection. Specifically, the natural language processing techniques include sentence segmentation, word segmentation, part-of-speech tagging, stop word removal, policy entity identification, and relationship extraction between policy entities. Policy entity identification is used to automatically identify and extract key entity information from policy documents, including but not limited to the policy's subjects, geographical scope, applicable circumstances, implementing entities, and policy duration. Entity relationship extraction is used to determine the logical relationships between policy entities, including but not limited to mutually exclusive, inclusive, conditional, and dependent relationships. Once these policy entities and their relationships are identified and extracted, a knowledge graph construction method is used to define the identified policy entities as nodes within the knowledge graph, and the extracted relationships between policy entities as edges within the knowledge graph, ultimately constructing a cross-departmental policy knowledge graph. Furthermore, based on the logical structural relationships between the nodes and edges of the constructed policy knowledge graph, the structural constraints of the knowledge graph are further clearly defined to limit the validity of the connections between policy entities within the knowledge graph, thereby forming the structural foundation for the subsequent cross-departmental policy conflict detection process. The above implementation steps ensure the integrity and standardization of the construction of the cross-departmental policy knowledge graph, providing clear and unambiguous basic data support for subsequent policy conflict identification and analysis, and effectively improving the accuracy and reliability of subsequent policy conflict detection.
[0113] S2. Based on the cross-departmental policy knowledge graph, a ChainsFormer chain multi-hop reasoning model is constructed to perform chain reasoning on the multi-hop logical relationships between policy entities and generate multi-hop reasoning paths between policy entities;
[0114] S3. Based on the cross-departmental policy knowledge graph, define cross-departmental policy conflict identification rules and form a standardized policy conflict rule set including conflict types and conflict conditions;
[0115] S4. Based on the cross-departmental policy knowledge graph, a graph-constrained large language model reasoning framework is constructed. The structural constraints of the policy knowledge graph are explicitly embedded in the graph-constrained large language model reasoning framework to generate graph structure path constraint rules for constraining the reasoning path generation process.
[0116] S5. Based on the multi-hop reasoning paths between policy entities and the graph structure path constraint rules, the model is integrated and the reasoning process is constrained to obtain a set of chained multi-hop reasoning paths between policy entities;
[0117] S6. Based on the chain multi-hop reasoning path set, the standardized policy conflict rule set is used to perform automatic cross-departmental policy conflict detection and obtain the policy conflict identification results.
[0118] By constructing the ChainsFormer chain multi-hop reasoning model, the present invention effectively solves the problem that the single-hop reasoning method in the existing technology is difficult to detect complex or indirect logical conflicts between policies, and significantly improves the coverage and accuracy of policy conflict detection; by constructing a graph-constrained large language model reasoning framework and explicitly embedding the structural constraints of the knowledge graph, it avoids the generation of false paths in the reasoning process and improves the authenticity and reliability of the reasoning path; in addition, through the model fusion of chain multi-hop reasoning paths and graph structure path constraint rules, it effectively realizes the automation and intelligence of policy conflict detection, improves the efficiency of policy conflict detection, and significantly improves the execution effect of policy collaborative decision-making.
[0119] In this embodiment, the ChainsFormer chain multi-hop reasoning model specifically includes:
[0120] Based on the policy entity node set E and the inter-entity relationship set R defined in the cross-departmental policy knowledge graph, each policy entity node is represented as a vector v with dimension d i ,in,
[0121] Based on the logical relationship between policy entity nodes in the cross-departmental policy knowledge graph, the chain path constraint attention is calculated:
[0122]
[0123] Among them, Attention(e i ,e j ) represents the policy entity node e i To policy entity node e j The attention calculation result, W q 、W k are the parameter matrices of dimension d×d obtained in advance, α ij is the path constraint gating factor, when the policy entity node e j Able to undertake policy entity node e in logical relationship i When it is, the value is 0, otherwise it is -∞;
[0124] Based on the calculated attention calculation results, the selection probability of the next policy entity node in each step of the reasoning path is determined:
[0125] P(e t+1 |e t )=Attention(e t ,e t+1 );
[0126] Among them, e t Indicates the current policy entity node, e t+1 The policy entity node representing the next step of reasoning selection;
[0127] Based on the selection probability of the next policy entity node, the subsequent policy entity nodes in the multi-hop reasoning path are determined in sequence using a chain iteration method until the reasoning path length reaches an integer between the numerical range of 2 and the numerical range of 5. Then, the subsequent chain iteration path selection is stopped, and a multi-hop reasoning path with a length between the numerical range of 2 and the numerical range of 5 is obtained;
[0128] After each multi-hop reasoning path is determined, the historical reasoning path set is updated:
[0129] H t+1 =H t ∪{(e t ,r t,t+1 ,e t+1 )};
[0130] Among them, H t represents the set of historical reasoning paths before step t, r t,t+1 Indicates that from the policy entity node e t To the policy entity node e t+1 The relationship between entities, H t+1 Represents the updated set of historical reasoning paths;
[0131] Define the reward function for the reasoning path:
[0132] R(Path)=γ1·Correctness(Path)-γ2·Length(Path);
[0133] Among them, Correctness(Path) is the path correctness parameter, which takes the value of 1 when the path correctly identifies the policy conflict relationship in the training set, otherwise it takes the value of 0; Length(Path) is the path length, which takes an integer between 2 and 5; γ1 and γ2 are weight coefficients;
[0134] The REINFORCE algorithm is used to optimize the parameters of the ChainsFormer chain multi-hop reasoning model with the expectation maximization of the reward function as the optimization goal.
[0135] This paper constructs a ChainsFormer chain multi-hop reasoning model and adopts a chain path constraint attention mechanism to achieve accurate reasoning of multi-hop logical relationships between policy entities, significantly improving the accuracy of logical reasoning in the policy conflict detection process and effectively avoiding the problem that traditional single-hop reasoning methods are difficult to accurately identify complex or indirect conflicts; in addition, by combining the inference path selection probability mechanism and the path reward function with a reinforcement learning algorithm, automatic optimization of the inference path is achieved, further enhancing the generalization and stability of the policy conflict detection method, and improving the degree of automation and reliability of policy conflict identification.
[0136] In this embodiment, S2 specifically includes:
[0137] S21. Based on the policy entity node set E and the inter-entity relationship set R defined in the cross-departmental policy knowledge graph, select the initial policy entity node e0 from the policy entity node set E as the starting node of the chain reasoning path;
[0138] S22, record the vector representation of the initial policy entity node e0 as a vector v0 of dimension d;
[0139] S23, for the policy entity node e in the current reasoning path t , based on the chain path constraint attention calculation method, calculate the node e t With the candidate next step policy entity node e t+1 The chain path between them constrains the attention value;
[0140] S24, based on the chain path constraint attention value, adopt the next step policy entity node selection probability determination method to determine the policy entity node e t Go to the next policy entity node e t+1 The probability of selection;
[0141] S25. According to the probability of selecting the next policy entity node, a chain iteration method is used to determine the next policy entity node e of the current reasoning path. t+1 , and determine the policy entity node e t+1 Add to the current multi-hop reasoning path to form a reasoning path sequence:
[0142]
[0143] Among them, r t,t+1 Indicates that from the policy entity node e t To the policy entity node e t+1The relationship between entities, and r t,t+1 ∈R;
[0144] S26. When the path length of the determined multi-hop reasoning path reaches an integer in the numerical range of 2 to the numerical range of 5, stop selecting the next policy entity node for further chain iteration, and finally obtain a multi-hop reasoning path between policy entities with a length in the numerical range of 2 to the numerical range of 5.
[0145] The present invention effectively realizes the accurate generation of multi-hop logical reasoning paths between policy entities by precisely defining the chain path constraint attention calculation method and the next step policy entity node selection probability determination method, thereby solving the problem that the existing single-hop reasoning method cannot effectively identify deep-level or indirect policy conflicts; in addition, by determining the multi-hop reasoning path in a chain iterative manner and strictly setting the termination condition of the reasoning path length, the automation and structural rigor of the reasoning process are further improved, and the overall accuracy and detection efficiency of cross-departmental policy conflict detection are significantly improved.
[0146] In this embodiment, S3 specifically includes:
[0147] S31. Based on the set of policy entity nodes and the set of relationships between entities defined in the cross-departmental policy knowledge graph, determine the policy entity node pairs involved in cross-departmental policy conflict identification;
[0148] S32. For each policy entity node pair, define the association relationship category between the policy entity nodes, and divide the association relationship category into mutually exclusive relationships and conditional conflict relationships:
[0149] The conflict condition of the mutually exclusive relationship is defined as the existence of two policy entity nodes at the same time, which constitutes a mutual exclusion conflict;
[0150] The conflict condition that defines the conditional conflict relationship is that a conditional policy conflict occurs between two policy entity nodes when any one or more of the following preset conditions are met simultaneously. The preset conditions specifically include:
[0151] The scope of objects to which the policies corresponding to the policy entity nodes apply overlap;
[0152] The time limits of the policies corresponding to the policy entity nodes overlap;
[0153] The geographical or regional scopes of the policies corresponding to the policy entity nodes overlap;
[0154] The policies corresponding to the policy entity nodes have obvious differences or contradictions in the requirements or restrictions on the same behavior;
[0155] The policies corresponding to the policy entity nodes have clear hierarchical conflicts in terms of legal effect or hierarchy;
[0156] S33. Based on the cross-departmental policy knowledge graph, a structured semantic parsing method is used to extract the semantic information of the association relationship between policy entity nodes in the cross-departmental policy document and determine the specific conflict conditions corresponding to each association relationship;
[0157] S34. Based on the association relationship categories and specific conflict conditions, map the policy entity nodes to the corresponding association relationship categories and conflict conditions one by one to form standardized policy conflict rules;
[0158] S35. Based on the standardized policy conflict rules, combine all standardized policy conflict rules to form a standardized policy conflict rule set, wherein the standardized policy conflict rule set includes a policy entity node pair identifier, an association relationship category identifier, and a corresponding specific conflict condition identifier.
[0159] The present invention forms a standardized policy conflict rule set by clearly defining mutually exclusive relationships and conditional conflict relationships between policy entity nodes, and based on specific conditions such as the scope of policy application objects, time scope, geographical scope, behavioral requirements and legal effect, thereby overcoming the problems of unclear policy conflict identification rules and unsystematic detection rules in the existing technology; in addition, the semantic information of the association relationship is extracted through the structured semantic parsing method, the specific conditions of the policy conflict are accurately determined, and the degree of refinement of the policy conflict detection rules is improved, thereby significantly improving the accuracy, applicability and operability of cross-departmental policy conflict detection.
[0160] In this embodiment, the construction of a graph-constrained large language model reasoning framework specifically includes:
[0161] Based on the policy entity node set E defined in the cross-departmental policy knowledge graph, a structural constraint adjacency matrix A is constructed. The structural constraint adjacency matrix A∈{0,1} |E|×|E| , where A i,j The value 1 indicates the policy entity node e i With policy entity node e j There is an inter-entity relationship, otherwise A i,j Take the value 0;
[0162] For the current policy entity node e t , based on the structural constraint adjacency matrix A, determine the next step candidate policy entity node set
[0163]
[0164] Among them, e j Indicates the next candidate policy entity node, A t,j Represents the current policy entity node e tand the next step candidate policy entity node e j The structural constraints between the adjacency matrix values;
[0165] For the current policy entity node e t And the next candidate policy entity node e j , calculate the initial probability value p of the next node selection under unconstrained conditions through the large language model LLM (e j |e t );
[0166] Based on the structural constraint adjacency matrix A and the initial probability value p LLM (e j |e t ), determine the next node selection probability value p after the structural constraint condition correction C (e j |e t ):
[0167]
[0168] Among them, p C (e j |e t ) represents the slave policy entity node e after being modified by the structural constraints t To candidate node e j The probability value, p LLM (e j |e t ) represents the policy entity node e under unconstrained conditions t To candidate node e j The initial probability value of ;
[0169] For the determined next step policy entity node e t+1 , based on the structural constraint adjacency matrix A, real-time verification from the current policy entity node e t To node e t+1 The effectiveness of the structure constraint adjacency matrix value A t,t+1 =1, confirm that the current path is valid. When the structure constraint adjacency matrix value A t,t+1 =0, confirm that the current path is invalid and re-select the next policy entity node;
[0170] Define the structural constraint loss function L SC :
[0171] L SC =-∑ t log(p C (e t+1 |e t ));
[0172] Among them, L SC represents the structural constraint loss function, p C (e t+1 |e t ) represents the slave policy entity node e after being modified by the structural constraints t To node e t+1 The probability of selection;
[0173] Based on the structural constraint loss function L SC , using gradient descent to constrain the large language model parameters θ LLM Perform optimization training:
[0174]
[0175] Among them, θ LLM Represents all trainable parameters of the graph-constrained large language model, Represents the optimized graph-constrained large language model parameters.
[0176] The present invention explicitly embeds the structural constraints in the policy knowledge graph into the reasoning process by constructing a graph-constrained large language model reasoning framework, thereby realizing the structured constraint correction of the selection probability of candidate policy entity nodes in the next step, effectively avoiding the false paths that are prone to appear in the traditional large language model reasoning process and do not conform to the actual knowledge graph structure, and significantly improving the authenticity and effectiveness of the reasoning path; in addition, the structural constraint loss function is used and the gradient descent method is adopted to optimize the model training, which further improves the stability and reliability of the model reasoning, thereby enhancing the accuracy and credibility of the automatic detection of cross-departmental policy conflicts.
[0177] In this embodiment, the S4 specifically includes:
[0178] S41, based on the structural constraint adjacency matrix A, a matrix decomposition method is used to obtain a node relationship constraint embedding matrix M, wherein the node relationship constraint embedding matrix Among them, each row vector in the matrix M corresponds to the relational structure constraint representation of the policy entity node, and the parameter d takes an integer ranging from 64 to 512;
[0179] S42, for the current policy entity node e t , extract the node corresponding to node e t The relational structure constraint embedding vector m t , the relational structure constrains the embedding vector is the matrix M corresponding to node e t The row vector of ;
[0180] S43, for the candidate next step policy entity node e j , extract the node corresponding to node ej The relational structure constraint embedding vector m j , the relational structure constrains the embedding vector is the matrix M corresponding to node e j The row vector of ;
[0181] S44, based on the current node e t The relational structure constraint embedding vector m t and candidate node e j The relational structure constraint embedding vector m j , calculate the structural constraint similarity value S(e t ,e j );
[0182] S45, set the structural constraint similarity threshold δ, when the structural constraint similarity value S(e t ,e j )≥δ, confirm that the slave node e t To node e j The reasoning path complies with the graph structure constraint rules. When the structure constraint similarity value S(e t ,e j )<δ, confirm from node e t To node e j The reasoning path does not conform to the graph structure constraint rules;
[0183] S46, based on the structural constraint similarity value S(e t ,e j ) and threshold δ, determine all node pairs that meet the graph structure constraint rules (e t ,e j ), forming graph structure path constraint rules.
[0184] The present invention generates a node relationship structural constraint embedding matrix by adopting a matrix decomposition method, and explicitly calculates the structural constraint similarity value between the current node and the candidate node, thereby realizing an accurate measurement of the effectiveness of the reasoning path between policy entity nodes; by setting a structural constraint similarity threshold, the reasoning path generation process is strictly controlled, thereby avoiding the generation of paths that do not conform to the actual policy graph structure during the path reasoning process, effectively improving the authenticity and compliance of the reasoning path, and significantly improving the accuracy and reliability of the automatic detection of cross-departmental policy conflicts.
[0185] In this embodiment, the S5 specifically includes:
[0186] S51. Based on the multi-hop reasoning paths between policy entities, obtain an initial multi-hop reasoning path set between policy entities, wherein the initial multi-hop reasoning path set between policy entities includes multiple initial reasoning path sequences, and the length of each path sequence is an integer in a numerical range of 2 to 5;
[0187] S52, based on the graph structure path constraint rule, calculating the structural constraint similarity value for each pair of adjacent nodes of each reasoning path in the initial multi-hop reasoning path set between policy entities one by one;
[0188] S53, based on the structural constraint similarity threshold, determining whether the path between each pair of adjacent nodes in the reasoning path is valid; when the structural constraint similarity value of the adjacent nodes is greater than or equal to the structural constraint similarity threshold, the path between the adjacent nodes is confirmed to be valid; otherwise, the path between the adjacent nodes is confirmed to be invalid;
[0189] S54. For each reasoning path, if any pair of paths between adjacent nodes is invalid, the corresponding reasoning path is deleted; if all paths between adjacent nodes are valid, the corresponding reasoning path is retained;
[0190] S55. For all retained reasoning paths, calculate the path constraint confidence value of each reasoning path, where the path constraint confidence value is the average value of the structural constraint similarity values of all adjacent node pairs in the path;
[0191] S56. Setting a path constraint confidence threshold, screening the reasoning paths based on the path constraint confidence value, retaining the corresponding reasoning path when the path constraint confidence value of the reasoning path is greater than or equal to the path constraint confidence threshold, and deleting the corresponding reasoning path when the path constraint confidence value of the reasoning path is less than the path constraint confidence threshold;
[0192] S57. Based on all reasoning paths, a set of chained multi-hop reasoning paths between policy entities is formed.
[0193] The present invention integrates the chain multi-hop reasoning path set with the graph structure path constraint rules, calculates the structural constraint similarity between path nodes one by one, clarifies the judgment criteria for valid paths, effectively avoids the generation of invalid paths or paths that do not conform to actual structural constraints, and improves the authenticity and reliability of the reasoning path; by further calculating the path constraint confidence and setting the corresponding confidence threshold, the reasoning path is refined and screened, which significantly improves the overall accuracy and credibility of the reasoning path set, and ensures the high accuracy and stability of the automatic detection results of cross-departmental policy conflicts.
[0194] In this embodiment, S6 specifically includes:
[0195] S61. Obtain candidate policy entity node pairs for policy conflict detection based on a set of chained multi-hop reasoning paths between policy entities;
[0196] S62. Based on the standardized policy conflict rule set, extract the policy entity node pair identifiers and the association relationship category identifiers one by one, and establish a mapping relationship between the policy entity node pair and the association relationship category;
[0197] S63. For each candidate policy entity node pair, determine whether the candidate policy entity node pair exists in the standardized policy conflict rule set.
[0198] S64. When the candidate policy entity node pair exists in the standardized policy conflict rule set, compare the actual reasoning path of the candidate policy entity node pair with the specific conflict conditions defined in the standardized policy conflict rule set;
[0199] S65. For each candidate policy entity node pair, compare the correspondence between the actual reasoning path and the specific conflict condition to see if they satisfy any of the following conditions:
[0200] The first case is a mutually exclusive relationship, where the reasoning path of the candidate policy entity node pair contains both policy entity nodes;
[0201] The second case is a conditional conflict relationship, where the reasoning path of the candidate policy entity node pair satisfies the preset conditions defined in the standardized policy conflict rule set;
[0202] S66. For each candidate policy entity node pair that satisfies any of the conditions, determining whether a policy conflict exists between the corresponding candidate policy entity node pairs;
[0203] S67. Generate cross-departmental policy conflict identification results for all candidate policy entity node pairs that are determined to have policy conflicts.
[0204] The present invention constructs a mapping relationship between candidate policy entity node pairs and standardized policy conflict rule sets, and compares the actual reasoning path with the specific conflict conditions in the standardized rules one by one, thereby clarifying the detection standards for mutually exclusive relationships and conditional conflict relationships between policy entity node pairs, effectively avoiding the subjective misjudgment and omission problems that are prone to occur in existing manual detection methods; further, by automatically confirming policy conflicts that meet the conditions and generating accurate cross-departmental policy conflict identification results, the present invention realizes the intelligence and automation of policy conflict detection, greatly improves the accuracy and efficiency of cross-departmental policy conflict identification, and significantly enhances the coordination and reliability of government decision-making and management.
[0205] A cross-departmental policy conflict detection system based on knowledge graph reasoning, specifically including:
[0206] The policy knowledge graph construction module is used to obtain a set of cross-departmental policy documents, identify and extract policy entities and the relationships between entities in the policy documents, form a cross-departmental policy knowledge graph, and define structural constraints;
[0207] The ChainsFormer chain multi-hop reasoning module is used to build the ChainsFormer chain multi-hop reasoning model based on the cross-departmental policy knowledge graph, and perform chain reasoning on the multi-hop logical relationships between policy entities to generate multi-hop reasoning paths between policy entities;
[0208] A standardized policy conflict rule definition module is used to define cross-departmental policy conflict identification rules based on the cross-departmental policy knowledge graph, forming a standardized policy conflict rule set including conflict types and conflict conditions;
[0209] A graph-constrained large language model construction module is used to build a cross-departmental policy knowledge graph and explicitly embed structural constraints into the graph-constrained large language model reasoning framework to generate graph structure path constraint rules for constraining the reasoning path generation process;
[0210] The chained reasoning path constraint fusion module is used to fuse models and constrain the reasoning process based on the multi-hop reasoning paths between policy entities and the graph structure path constraint rules, and obtain a set of chained multi-hop reasoning paths between policy entities;
[0211] The policy conflict automatic detection module is used to perform automatic cross-departmental policy conflict detection based on a set of chained multi-hop reasoning paths between policy entities and a set of standardized policy conflict rules to obtain policy conflict identification results.
[0212] The present invention constructs a complete policy conflict automatic detection system by setting up a systematic structure of policy knowledge graph construction module, ChainsFormer chain multi-hop reasoning module, standardized policy conflict rule definition module, graph constraint large language model construction module, chain reasoning path constraint fusion module and policy conflict automatic detection module, and realizes the close coordination of policy document collection and processing, chain multi-hop reasoning path generation, structured semantic parsing and standardized policy conflict rule definition, graph constraint path rule generation and path fusion reasoning, comprehensively improving the automation level, detection accuracy and operation efficiency of cross-departmental policy conflict detection, and significantly improving the coordination and reliability of policy decision-making and implementation process.
[0213] Example 1:
[0214] In order to verify the feasibility of the present invention, the present invention was applied to a medium-sized government service management agency. The agency is responsible for the overall management and issuance of policy documents of multiple government departments, covering a number of important areas including people's livelihood services, public health, safety supervision, urban management and environmental protection. Recently, with the surge in the number of policy documents issued by various departments, policy documents issued by different departments have frequently encountered conflicts in policy objectives, contradictions in standards or overlapping scopes of application, resulting in confusion and inefficiency in actual implementation. Due to the long-term reliance on manual methods for the review and conflict resolution of policy documents, the policy review department of the agency has been burdened with a huge workload. At the same time, manual review has low accuracy, a long identification cycle and is prone to omissions, resulting in a large number of problems in the policy implementation process, which seriously affects the effectiveness of policy implementation and the overall efficiency of government services.
[0215] In order to solve the above problems, the agency deployed the cross-departmental policy conflict detection system based on knowledge graph reasoning of the present invention. In actual application, the policy documents, regulations, guidelines and other documents issued by various departments within the management scope of the agency were first collected and sorted out to form a cross-departmental policy document set. Subsequently, the system automatically extracted key policy entity information in the policy documents through natural language processing technology, including policy implementation objects, regional scope, effective time limit, management measures, executive agencies, etc., and automatically identified the logical relationships between policy entities, such as mutual dependence, mutual exclusion, conditional constraints, etc., and finally formed a detailed cross-departmental policy knowledge graph.
[0216] After the policy knowledge graph was constructed, the system built a ChainsFormer chain multi-hop reasoning model. Based on this model, it automatically performs chain reasoning on the multi-level logical relationships between policy entity nodes in the policy knowledge graph, forming a clear multi-hop reasoning path between policy entities. At the same time, the system defines a set of standardized policy conflict rules based on the scope of policy applicability, time overlap, regional intersection, differences in implementation standards, and the hierarchical relationship of legal effectiveness, ensuring the clarity and operability of policy conflict identification rules. In addition, the system also builds a graph-constrained large language model reasoning framework. By embedding knowledge graph structural constraints, it automatically corrects the probability of reasoning path selection, ensuring the compliance and authenticity of the model reasoning path.
[0217] Through these technical measures, the system deeply integrates the generated chained multi-hop reasoning paths of policy entities with the defined graph structure path constraint rules. The system then screens the validity of the reasoning paths by calculating the structural constraint similarity and path constraint confidence values, ultimately obtaining a highly reliable set of chained multi-hop reasoning paths between policy entities. Once the reasoning paths are determined, the system automatically determines conflicts between policy entities based on standardized policy conflict rules, automatically generates cross-departmental policy conflict identification results, and provides real-time feedback and push notifications to the policy review department.
[0218] In order to intuitively demonstrate the technical advantages of the present invention, a three-month comparative evaluation of actual application effects was conducted, and specific data records are provided, as shown in Table 1 below:
[0219] Table 1: Comparison of policy conflict detection effects before and after implementation of the present invention
[0220]
[0221] It is clear from the data in Table 1 above that before the deployment of the system of the present invention, the agency manually reviewed approximately 120 policy documents per month. Due to the low efficiency of manual detection, only 8 policy conflicts were effectively identified and confirmed each month, and the policy conflict omission rate was as high as 29%. The policy conflict identification accuracy rate was only 72%. The average processing time for a single policy conflict identification reached 3 working days, and feedback on problems caused by conflicts was frequently received during the policy implementation stage. Since the deployment of the cross-departmental policy conflict detection system of the present invention, the number of policy documents automatically reviewed each month has increased to 560, the number of policy conflicts effectively identified each month has increased to 37, the policy conflict omission rate has been significantly reduced to 3%, the policy conflict identification accuracy rate has been significantly improved to 96.5%, the average processing time for a single policy conflict identification has been reduced to 45 minutes, and the automatic identification rate of policy conflicts has reached 95%, significantly reducing the need for manual intervention. The workload of manual review has also been significantly reduced, from 260 hours per month to 24 hours per month. At the same time, the number of feedback on problems caused by policy conflicts during policy implementation has dropped from an average of 26 per month before deployment to an average of 2 per month, effectively improving the stability and efficiency of policy implementation.
[0222] It can be clearly seen from the above specific data and actual application effects that the cross-departmental policy conflict detection method and system based on knowledge graph reasoning proposed in the present invention has obvious improvements in efficiency, accuracy, degree of automation and policy implementation effect of policy conflict detection compared with the traditional manual review method. It significantly improves the shortcomings of high labor cost, high missed detection rate, low recognition accuracy and long response cycle in the policy conflict detection process, and effectively supports the smooth, efficient and coordinated development of the implementation of various policies of the organization.
[0223] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A cross-departmental policy conflict detection method based on knowledge graph reasoning, including the following steps: S1. Obtain a collection of cross-departmental policy documents, use natural language processing technology to identify and extract policy entities and the relationships between entities in the policy documents, form a cross-departmental policy knowledge graph, and define structural constraints based on the entities and relationships in the cross-departmental policy knowledge graph; S2. Based on the cross-departmental policy knowledge graph, a ChainsFormer chain multi-hop reasoning model is constructed to perform chain reasoning on the multi-hop logical relationships between policy entities and generate multi-hop reasoning paths between policy entities; S3. Based on the cross-departmental policy knowledge graph, define cross-departmental policy conflict identification rules and form a standardized policy conflict rule set including conflict types and conflict conditions; S4. Based on the cross-departmental policy knowledge graph, a graph-constrained large language model reasoning framework is constructed. The structural constraints of the policy knowledge graph are explicitly embedded in the graph-constrained large language model reasoning framework to generate graph structure path constraint rules for constraining the reasoning path generation process. S5. Based on the multi-hop reasoning paths between policy entities and the graph structure path constraint rules, the model is integrated and the reasoning process is constrained to obtain a set of chained multi-hop reasoning paths between policy entities; S6. Based on the chain multi-hop reasoning path set, the standardized policy conflict rule set is used to perform automatic cross-departmental policy conflict detection and obtain the policy conflict identification results.
2. The cross-departmental policy conflict detection method based on knowledge graph reasoning according to claim 1 is characterized in that: The ChainsFormer chain multi-hop reasoning model specifically includes: Based on the policy entity node set E and the inter-entity relationship set R defined in the cross-departmental policy knowledge graph, each policy entity node is represented as a vector v with dimension d i ,in, Based on the logical relationship between policy entity nodes in the cross-departmental policy knowledge graph, the chain path constraint attention is calculated: Among them, Attention(e i ,e j ) represents the policy entity node e i To policy entity node e j The attention calculation result, W q 、W k are the parameter matrices of dimension d×d obtained in advance, α ij is the path constraint gating factor, when the policy entity node e j Able to undertake policy entity node e in logical relationship i When it is, the value is 0, otherwise it is -∞; Based on the calculated attention calculation results, the selection probability of the next policy entity node in each step of the reasoning path is determined: P(e t+1 |and t )=Attention(e t ,And t+1 ); Among them, e t Indicates the current policy entity node, e t+1 The policy entity node representing the next step of reasoning selection; Based on the selection probability of the next policy entity node, the subsequent policy entity nodes in the multi-hop reasoning path are determined in sequence using a chain iteration method until the reasoning path length reaches an integer between the numerical range of 2 and the numerical range of 5. Then, the subsequent chain iteration path selection is stopped, and a multi-hop reasoning path with a length between the numerical range of 2 and the numerical range of 5 is obtained; After each multi-hop reasoning path is determined, the historical reasoning path set is updated: H t+1 =H t ∪{(e t ,r t,t+1 ,e t+1 )}; Among them, H t represents the set of historical reasoning paths before step t, r t,t+1 Indicates that from the policy entity node e t To the policy entity node e t+1 The relationship between entities, H t+1 Represents the updated set of historical reasoning paths; Define the reward function for the reasoning path: R(Path)=γ1·Correctness(Path)-γ2·Length(Path); Among them, Correctness(Path) is the path correctness parameter, which takes the value of 1 when the path correctly identifies the policy conflict relationship in the training set, otherwise it takes the value of 0; Length(Path) is the path length, which takes an integer between 2 and 5; γ1 and γ2 are weight coefficients; The REINFORCE algorithm is used to optimize the parameters of the ChainsFormer chain multi-hop reasoning model with the expectation maximization of the reward function as the optimization goal.
3. The cross-departmental policy conflict detection method based on knowledge graph reasoning according to claim 1 is characterized in that: The S2 specifically includes: S21. Based on the policy entity node set E and the inter-entity relationship set R defined in the cross-departmental policy knowledge graph, select the initial policy entity node e0 from the policy entity node set E as the starting node of the chain reasoning path; S22, record the vector representation of the initial policy entity node e0 as a vector v0 of dimension d; S23, for the policy entity node e in the current reasoning path t , based on the chain path constraint attention calculation method, calculate the node e t With the candidate next step policy entity node e t+1 The chain path between them constrains the attention value; S24, based on the chain path constraint attention value, adopt the next step policy entity node selection probability determination method to determine the policy entity node e t Go to the next policy entity node e t+1 The probability of selection; S25. According to the probability of selecting the next policy entity node, a chain iteration method is used to determine the next policy entity node e of the current reasoning path. t+1 , and determine the policy entity node e t+1 Add to the current multi-hop reasoning path to form a reasoning path sequence: Among them, r t,t+1 Indicates that from the policy entity node e t To the policy entity node e t+1 The relationship between entities, and r t,t+1 ∈R; S26. When the path length of the determined multi-hop reasoning path reaches an integer in the numerical range of 2 to the numerical range of 5, stop selecting the next policy entity node for further chain iteration, and finally obtain a multi-hop reasoning path between policy entities with a length in the numerical range of 2 to the numerical range of 5.
4. The cross-departmental policy conflict detection method based on knowledge graph reasoning according to claim 1 is characterized in that: The S3 specifically includes: S31. Based on the set of policy entity nodes and the set of relationships between entities defined in the cross-departmental policy knowledge graph, determine the policy entity node pairs involved in cross-departmental policy conflict identification; S32. For each policy entity node pair, define the association relationship category between the policy entity nodes, and divide the association relationship category into mutually exclusive relationships and conditional conflict relationships: The conflict condition of the mutually exclusive relationship is defined as the existence of two policy entity nodes at the same time, which constitutes a mutual exclusion conflict; The conflict condition that defines the conditional conflict relationship is that a conditional policy conflict occurs between two policy entity nodes when any one or more of the following preset conditions are met simultaneously. The preset conditions specifically include: The scope of objects to which the policies corresponding to the policy entity nodes apply overlap; The time limits of the policies corresponding to the policy entity nodes overlap; The geographical or regional scopes of the policies corresponding to the policy entity nodes overlap; The policies corresponding to the policy entity nodes have obvious differences or contradictions in the requirements or restrictions on the same behavior; The policies corresponding to the policy entity nodes have clear hierarchical conflicts in terms of legal effect or hierarchy; S33. Based on the cross-departmental policy knowledge graph, a structured semantic parsing method is used to extract the semantic information of the association relationship between policy entity nodes in the cross-departmental policy document and determine the specific conflict conditions corresponding to each association relationship; S34. Based on the association relationship categories and specific conflict conditions, map the policy entity nodes to the corresponding association relationship categories and conflict conditions one by one to form standardized policy conflict rules; S35. Based on the standardized policy conflict rules, combine all standardized policy conflict rules to form a standardized policy conflict rule set, wherein the standardized policy conflict rule set includes a policy entity node pair identifier, an association relationship category identifier, and a corresponding specific conflict condition identifier.
5. The cross-departmental policy conflict detection method based on knowledge graph reasoning according to claim 1 is characterized in that: The construction of the graph-constrained large language model reasoning framework specifically includes: Based on the policy entity node set E defined in the cross-departmental policy knowledge graph, a structural constraint adjacency matrix A is constructed. The structural constraint adjacency matrix A∈{0,1} |E|×|E| , where A i,j The value 1 indicates the policy entity node e i With policy entity node e j There is an inter-entity relationship, otherwise A i,j Take the value 0; For the current policy entity node e t , based on the structural constraint adjacency matrix A, determine the next step candidate policy entity node set Among them, e j Indicates the next candidate policy entity node, A t,j Represents the current policy entity node e t and the next step candidate policy entity node e j The structural constraints between the adjacency matrix values; For the current policy entity node e t And the next candidate policy entity node e j , calculate the initial probability value p of the next node selection under unconstrained conditions through the large language model LLM (e j |e t ); Based on the structural constraint adjacency matrix A and the initial probability value p LLM (e j |e t ), determine the next node selection probability value p after the structural constraint condition correction C (e j |e t ): Among them, p C (e j |e t ) represents the slave policy entity node e after being modified by the structural constraints t To candidate node e j The probability value, p LLM (e j |e t ) represents the policy entity node e under unconstrained conditions t To candidate node e j The initial probability value of ; For the determined next step policy entity node e t+1 , based on the structural constraint adjacency matrix A, real-time verification from the current policy entity node e t To node e t+1 The effectiveness of the structure constraint adjacency matrix value A t,t+1 =1, confirm that the current path is valid. When the structure constraint adjacency matrix value A t,t+1 =0, confirm that the current path is invalid and re-select the next policy entity node; Define the structural constraint loss function L SC : L SC =-∑ t log(p C (have been t+1 i.e t )); Among them, L SC represents the structural constraint loss function, p C (e t+1 |e t ) represents the slave policy entity node e after being modified by the structural constraints t To node e t+1 The probability of selection; Based on the structural constraint loss function L SC , using gradient descent to constrain the large language model parameters θ LLM Perform optimization training: Among them, θ LLM Represents all trainable parameters of the graph-constrained large language model, Represents the optimized graph-constrained large language model parameters.
6. The cross-departmental policy conflict detection method based on knowledge graph reasoning according to claim 1 is characterized in that: The S4 specifically includes: S41, based on the structural constraint adjacency matrix A, a matrix decomposition method is used to obtain a node relationship constraint embedding matrix M, wherein the node relationship constraint embedding matrix Among them, each row vector in the matrix M corresponds to the relational structure constraint representation of the policy entity node, and the parameter d takes an integer ranging from 64 to 512; S42, for the current policy entity node e t , extract the node corresponding to node e t The relational structure constraint embedding vector m t , the relational structure constrains the embedding vector is the matrix M corresponding to node e t The row vector of ; S43, for the candidate next step policy entity node e j , extract the node corresponding to node e j The relational structure constraint embedding vector m j , the relational structure constrains the embedding vector is the matrix M corresponding to node e j The row vector of ; S44, based on the current node e t The relational structure constraint embedding vector m t and candidate node e j The relational structure constraint embedding vector m j , calculate the structural constraint similarity value S(e t ,e j ); S45, set the structural constraint similarity threshold δ, when the structural constraint similarity value S(e t ,e j )≥δ, confirm that the slave node e t To node e j The reasoning path complies with the graph structure constraint rules. When the structure constraint similarity value S(e t ,e j )<δ, confirm from node e t To node e j The reasoning path does not conform to the graph structure constraint rules; S46, based on the structural constraint similarity value S(e t ,e j ) and threshold δ, determine all node pairs that meet the graph structure constraint rules (e t ,e j ), forming graph structure path constraint rules.
7. The cross-departmental policy conflict detection method based on knowledge graph reasoning according to claim 1 is characterized in that: The S5 specifically includes: S51. Based on the multi-hop reasoning paths between policy entities, obtain an initial multi-hop reasoning path set between policy entities, wherein the initial multi-hop reasoning path set between policy entities includes multiple initial reasoning path sequences, and the length of each path sequence is an integer in a numerical range of 2 to 5; S52, based on the graph structure path constraint rule, calculating the structural constraint similarity value for each pair of adjacent nodes of each reasoning path in the initial multi-hop reasoning path set between policy entities one by one; S53, based on the structural constraint similarity threshold, determining whether the path between each pair of adjacent nodes in the reasoning path is valid; when the structural constraint similarity value of the adjacent nodes is greater than or equal to the structural constraint similarity threshold, the path between the adjacent nodes is confirmed to be valid; otherwise, the path between the adjacent nodes is confirmed to be invalid; S54. For each reasoning path, if any pair of paths between adjacent nodes is invalid, the corresponding reasoning path is deleted; if all paths between adjacent nodes are valid, the corresponding reasoning path is retained; S55. For all retained reasoning paths, calculate the path constraint confidence value of each reasoning path, where the path constraint confidence value is the average value of the structural constraint similarity values of all adjacent node pairs in the path; S56. Setting a path constraint confidence threshold, screening the reasoning paths based on the path constraint confidence value, retaining the corresponding reasoning path when the path constraint confidence value of the reasoning path is greater than or equal to the path constraint confidence threshold, and deleting the corresponding reasoning path when the path constraint confidence value of the reasoning path is less than the path constraint confidence threshold; S57. Based on all reasoning paths, a set of chained multi-hop reasoning paths between policy entities is formed.
8. The cross-departmental policy conflict detection method based on knowledge graph reasoning according to claim 1 is characterized in that: The S6 specifically includes: S61. Obtain candidate policy entity node pairs for policy conflict detection based on a set of chained multi-hop reasoning paths between policy entities; S62. Based on the standardized policy conflict rule set, extract the policy entity node pair identifiers and the association relationship category identifiers one by one, and establish a mapping relationship between the policy entity node pair and the association relationship category; S63. For each candidate policy entity node pair, determine whether the candidate policy entity node pair exists in the standardized policy conflict rule set. S64. When the candidate policy entity node pair exists in the standardized policy conflict rule set, compare the actual reasoning path of the candidate policy entity node pair with the specific conflict conditions defined in the standardized policy conflict rule set; S65. For each candidate policy entity node pair, compare the correspondence between the actual reasoning path and the specific conflict condition to see if they satisfy any of the following conditions: The first case is a mutually exclusive relationship, where the reasoning path of the candidate policy entity node pair contains both policy entity nodes; The second case is a conditional conflict relationship, where the reasoning path of the candidate policy entity node pair satisfies the preset conditions defined in the standardized policy conflict rule set; S66. For each candidate policy entity node pair that satisfies any of the conditions, determining whether a policy conflict exists between the corresponding candidate policy entity node pairs; S67. Generate cross-departmental policy conflict identification results for all candidate policy entity node pairs that are determined to have policy conflicts.
9. A cross-departmental policy conflict detection system based on knowledge graph reasoning according to any one of claims 1 to 8, comprising: The policy knowledge graph construction module is used to obtain a set of cross-departmental policy documents, identify and extract policy entities and the relationships between entities in the policy documents, form a cross-departmental policy knowledge graph, and define structural constraints; The ChainsFormer chain multi-hop reasoning module is used to build the ChainsFormer chain multi-hop reasoning model based on the cross-departmental policy knowledge graph, and perform chain reasoning on the multi-hop logical relationships between policy entities to generate multi-hop reasoning paths between policy entities; A standardized policy conflict rule definition module is used to define cross-departmental policy conflict identification rules based on the cross-departmental policy knowledge graph, forming a standardized policy conflict rule set including conflict types and conflict conditions; A graph-constrained large language model construction module is used to build a cross-departmental policy knowledge graph and explicitly embed structural constraints into the graph-constrained large language model reasoning framework to generate graph structure path constraint rules for constraining the reasoning path generation process; The chained reasoning path constraint fusion module is used to fuse models and constrain the reasoning process based on the multi-hop reasoning paths between policy entities and the graph structure path constraint rules, and obtain a set of chained multi-hop reasoning paths between policy entities; The policy conflict automatic detection module is used to perform automatic cross-departmental policy conflict detection based on a set of chained multi-hop reasoning paths between policy entities and a set of standardized policy conflict rules to obtain policy conflict identification results.
Citation Information
Cited By
Tax policy document processing method based on multi-modal analysis
CN120808378A
Intelligent reasoning knowledge base construction method based on knowledge graph
CN121119092A
An intelligent reasoning knowledge base construction method based on a knowledge graph
CN121119092B
Policy field-oriented reasoning generation method, apparatus and device, and storage medium
CN121279459A