A legal knowledge accurate retrieval system based on a knowledge graph

By constructing a knowledge graph-based legal knowledge precision retrieval system, the problem of insufficient differentiation of case fact states in existing technologies is solved, and the accuracy and stability of legal knowledge retrieval results are improved. The system constructs fact closures and reachable state sets through fact dependency edges and transitive rules for stable sorting.

CN123178640APending Publication Date: 2026-11-27BEIJING XINSHU INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611396425.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing legal knowledge retrieval systems lack accurate differentiation when handling different states of case facts, resulting in insufficient stability and ranking accuracy of retrieval results. They also struggle to identify the logical state-linked changes in case facts and the changes in the applicability of candidate legal knowledge.

Method used

By constructing a knowledge graph-based legal knowledge precision retrieval system, case facts are extracted and fact states are marked. Based on fact dependency edges and transitive rules, fact closures and reachable state sets are constructed, forming closure state combinations and inverse combination sets, which are then stably sorted to improve the accuracy of retrieval results.

Benefits of technology

It achieves accurate determination and stable ranking of the applicability status of candidate legal knowledge, improves the accuracy and stability of legal knowledge retrieval, reduces the combination of factual states that does not conform to fact-dependent logic, and enhances the rationality and reliability of retrieval results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178640A_ABST
    Figure CN123178640A_ABST
Patent Text Reader

Abstract

The application discloses a kind of legal knowledge precision retrieval system based on knowledge graph, it is related to information retrieval technical field, including: atlas acquisition module, for extracting case fact and marking fact state;Closure construction module, for constructing fact closure according to fact dependent edge and transmission rule;Requirement matching module, for generating candidate legal knowledge and first applicable state;State transmission module, for forming accessible state set;State combination module, for forming closure state combination and generating second applicable state;Reverse determination module, for determining reverse combination set;Stable sorting module, for forming stable domain, and according to the number of closure state combination in stable domain and matching result, candidate legal knowledge is sorted and output.The application improves the accuracy and stability of legal knowledge retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information retrieval technology, and in particular to a precise legal knowledge retrieval system based on knowledge graphs. Background Technology

[0002] With the development of legal information digitization and intelligent judicial assistance technologies, legal knowledge retrieval based on knowledge graphs has received widespread attention. Existing legal knowledge retrieval systems mainly rely on keyword matching, semantic similarity calculation, and graph path matching to extract case facts from case texts and return relevant legal knowledge. However, in practical applications, the following problems commonly exist: The facts in a case text may be in different states such as affirmative, negative, disputed, and unstated. Existing technologies often lack accurate distinction of factual states, which can easily affect the matching results of legal elements. There are dependencies and interconnected changes among the facts in a case. Existing technologies often analyze the facts in isolation, making it difficult to exclude state combinations that do not conform to the logic of factual dependencies. Existing technologies mainly rank legal knowledge based on single matching results, lacking analysis of the applicable state after changes in factual states. It is difficult to identify candidate legal knowledge whose applicable state is prone to reversal, resulting in insufficient stability of search results and ranking accuracy.

[0003] Therefore, how to provide a precise legal knowledge retrieval system based on knowledge graphs is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] One objective of this invention is to propose a precise legal knowledge retrieval system based on knowledge graphs. This invention extracts case facts and marks fact states, constructs fact closures and reachable state sets based on fact dependency edges and transitive rules, and forms closure state combinations, inverse combination sets, and stable domains. This solves the problems in existing technologies, such as the lack of state linkage caused by independent matching of case facts, the difficulty in identifying changes in the applicable state of candidate legal knowledge, and insufficient stability of retrieval ranking. It achieves accurate determination and stable ranking of the applicable state of candidate legal knowledge, thereby improving the accuracy of legal knowledge retrieval.

[0005] A knowledge graph-based accurate legal knowledge retrieval system according to an embodiment of the present invention includes: The graph acquisition module is used to acquire legal knowledge graphs and case texts, extract case facts from the case texts, and mark the status of the facts. The closure construction module is used to map case facts to a legal knowledge graph. Based on the fact dependency edges and transit rules in the legal knowledge graph, case facts with linked changes in fact status are grouped into the same fact closure. The element matching module is used to determine the matching results between the factual state of the case facts and the legal elements based on the legal elements and element rules in the legal knowledge graph, and to generate candidate legal knowledge and the first applicable state. The state transfer module is used to change the fact state of the case facts within the fact closure based on the transfer rules, and synchronously change the fact state of the related case facts along the fact dependency edges to form a reachable state set; The state combination module is used to select reachable fact states from multiple reachable state sets to form a closed state combination, and generate a second applicable state based on the matching result of the closed state combination and the legal requirements. The inversion determination module is used to classify closure state combinations whose second applicable state is different from the first applicable state, and whose second applicable state is the same as the first applicable state for any proper subset of the closure state combination, into the inversion combination set. The stable sorting module is used to connect closure state combinations according to the transitive rules. Closure state combinations that are not included in the inverted combination set and whose second applicable state is the same as the first applicable state form a stable domain. Based on the number of closure state combinations in the stable domain and the matching results, the candidate legal knowledge is sorted and output.

[0006] Optionally, the map acquisition module specifically comprises: The case text is divided into sentences, and the legal subject, legal act, object of the act, time of occurrence, result of the act, and disputed statement are extracted from the sentences. The extracted results pointing to the same legal event are then merged according to the legal subject, legal act, and time of occurrence to obtain the facts of the case. Case facts that are clearly stated in the case text are marked as affirmative; case facts that are clearly stated as invalid are marked as negative; and case facts with conflicting statements in the case text are marked as disputed. The facts of the case are mapped to fact items in the legal knowledge graph. Related fact items are determined along the fact dependency edges connected to the fact items. Related fact items whose corresponding content is not recorded in the case text are marked as undescribed. Record the facts of the case according to the legal subject, legal act, time of occurrence, and factual state corresponding to the facts of the case, and form a case fact set.

[0007] Optionally, the closure construction module specifically includes: Based on the fact items corresponding to the facts of the case, determine the fact dependency edges connected to the fact items, and obtain the transit rules corresponding to the fact dependency edges; Based on the factual status and transmission rules of the case, the factual status corresponding to the factual items is changed in sequence, and the related factual items that need to be changed synchronously after the factual status is changed are determined. Continue to determine the next fact item connected to the associated fact item along the fact dependency edge, and determine whether the next fact item changes its fact state synchronously with the associated fact item according to the transitive rules, until there is no next fact item that needs to change its fact state synchronously; The case facts corresponding to the fact items whose factual status changes synchronously are grouped into the same fact closure, and fact closures containing the same case facts are merged to form non-overlapping fact closures.

[0008] Optionally, the element matching module specifically includes: Based on the factual items corresponding to the facts of the case, determine the legal requirements connected to the factual items, obtain the requirement rules corresponding to the legal requirements, and record the factual status, requirement type, and combination method required by the legal requirements. The factual state of the case is compared with the factual state required by the legal requirements. Cases whose factual state meets the legal requirements of the requirements are marked as matched, those whose factual state does not meet the legal requirements of the requirements are marked as mismatched, and the legal requirements corresponding to the disputed state and the unstated state are marked as pending, thus forming a matching result. Based on the matching results, legal knowledge that is connected to legal requirements is filtered from the legal knowledge graph to generate candidate legal knowledge; The matching results are summarized according to the necessary legal requirements and the exclusionary legal requirements. Candidate legal knowledge that is marked as a match for all necessary legal requirements and not marked as a match for all exclusionary legal requirements is marked as applicable. Candidate legal knowledge that is marked as a mismatch for necessary legal requirements is marked as inapplicable. Candidate legal knowledge that is marked as a match for exclusionary legal requirements is marked as inapplicable. The remaining candidate legal knowledge is marked as pending, and the first applicable state is generated.

[0009] Optionally, the status transmission module specifically comprises: Obtain the fact items, fact states, fact dependency edges, and transit rules corresponding to the case facts within the fact closure, and determine the variable fact states corresponding to the fact items; Change the original fact state of the fact item to a variable fact state, determine the related fact items whose fact states need to be changed synchronously based on the transit rules and fact dependency edges, and change the fact state of the related fact items. Continue to determine the next fact item that needs to be synchronously changed along the fact dependency edge, repeat the fact state change until there is no next fact item that needs to be synchronously changed, forming the reachable fact state corresponding to the fact closure; The fact state changes are performed using the variable fact states corresponding to the fact items within the fact closure, the merged reachable fact states are deleted, and reachable fact states with different fact states corresponding to the same fact item are formed into a reachable state set.

[0010] Optionally, the step of selecting reachable fact states from multiple reachable state sets to form a closure state combination specifically involves: Select all reachable state sets from one to all based on the number of fact closures. Select one reachable fact state from each of the selected reachable state sets. The fact closures corresponding to the unselected reachable state sets retain their original fact states. The selected reachable fact states are merged with the fact closures that maintain the original fact states to form candidate closure state combinations; Compare the fact states corresponding to the same fact item in the candidate closure state combinations, and delete the candidate closure state combinations that correspond to different fact states for the same fact item; Based on fact-dependent edges and transit rules, examine the state transit results in candidate closure state combinations, delete candidate closure state combinations with inconsistent state transit results, and record the remaining candidate closure state combinations according to the fact closures involved in fact state changes and their corresponding reachable fact states to form closure state combinations.

[0011] Optionally, the step of generating a second applicable state based on the matching result of the closure state combination and the legal requirements specifically involves: According to the reachable fact states recorded by the closure state combination, the case facts that participate in the fact state change are changed, while the case facts that do not participate in the fact state change remain in their original fact states; The factual state corresponding to the changed case facts is compared with the factual state corresponding to the legal requirements of the candidate legal knowledge. The legal requirements that the factual state meets the requirements rules are marked as matched, the legal requirements that the factual state does not meet the requirements rules are marked as mismatched, and the legal requirements corresponding to the disputed state and the unstated state are marked as pending, forming the matching results corresponding to the closed state combination. The matching results corresponding to the closure state combination are summarized according to the necessary legal requirements and the excluded legal requirements. Candidate legal knowledge that is marked as matching for all necessary legal requirements and not marked as matching for all excluded legal requirements is marked as applicable. Candidate legal knowledge that is marked as not matching for necessary legal requirements is marked as not applicable. Candidate legal knowledge that is marked as matching for excluded legal requirements is marked as not applicable. The remaining candidate legal knowledge is marked as pending, thus generating the second applicable state corresponding to the closure state combination.

[0012] Optionally, the inversion determination module specifically includes: Compare the second applicable state corresponding to the combination of closure states with the first applicable state, and determine the combination of closure states in which the second applicable state is different from the first applicable state as a candidate inversion combination. Select a subset of fact closures and corresponding reachable fact states from the fact closures and corresponding reachable fact states contained in the candidate inversion combination to form a proper subset of the candidate inversion combination; The reachable fact state corresponding to the fact closure within the proper subset is retained, the fact closure not included in the proper subset is restored to its original fact state, and a second applicable state corresponding to the proper subset is generated based on the matching result of the restored fact state and the legal requirements. Candidate inversion combinations whose second applicable state is the same as the first applicable state for any proper subset are included in the inversion combination set.

[0013] Optionally, the connection of closure state combinations according to the transitive rules, and the formation of a stability region for closure state combinations that are not included in the inverse combination set and whose second applicable state is the same as the first applicable state, specifically: Compare the fact closure and reachable fact states recorded for any two combinations of closure states; If a closure state combination can change the reachable fact state of a fact closure according to the transitive rules to obtain another closure state combination, and the fact states of the remaining fact closures are the same, then the two closure state combinations are connected according to the direction of fact state change to form a state path. Remove closure state combinations that belong to the inverted combination set from the state path, and remove closure state combinations that are different from the first applicable state in the second applicable state. The connections between the remaining closure state combinations are preserved, and the stability region is formed by the remaining closure state combinations and the state paths connecting the remaining closure state combinations.

[0014] Optionally, the step of sorting and outputting candidate legal knowledge based on the number of combinations of closure states within the stable domain and the matching results is as follows: The number of closure state combinations within the stable domain corresponding to candidate legal knowledge is counted, and the number of necessary legal elements and excluded legal elements marked as matched are counted based on the matching results. Candidate legal knowledge is arranged in descending order of the number of closure state combinations within the stable domain. If the number of combinations is the same, it is arranged in descending order of the number of necessary legal elements. If the number of necessary legal elements is the same, it is arranged in ascending order of the number of excluded legal elements. The arranged candidate legal knowledge is then output.

[0015] The beneficial effects of this invention are: (1) This invention, by relying on fact-dependent edges and transmission rules, classifies the case facts whose fact states change in linkage into the same fact closure, and synchronously changes the fact states of related case facts along the fact-dependent edges to form a set of reachable states, thereby reducing the combination of fact states that do not conform to the fact-dependent logic and improving the rationality of the case fact state change results; (2) By comparing the first and second applicable states corresponding to the closed state combination and combining the proper subsets of the closed state combination to determine the inverted combination set, it is possible to identify the factual closed combination that causes the change of the applicable state of candidate legal knowledge, thereby improving the accuracy of the analysis of the change of the applicable state of candidate legal knowledge. (3) By connecting the closed state combinations according to the transmission rules, a stable domain is formed, and the candidate legal knowledge is sorted according to the number of closed state combinations in the stable domain and the matching results, so that the sorting results can reflect the stability of the application of candidate legal knowledge under the linkage changes of case facts, and improve the stability and accuracy of legal knowledge retrieval results. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a structural diagram of a knowledge graph-based accurate legal knowledge retrieval system proposed in this invention; Figure 2 A schematic diagram of the rules for fact dependence and transmission in a legal knowledge graph; Figure 3 A schematic diagram illustrating the process of generating and reversing the combination set of closure states; Figure 4 A schematic diagram illustrating the construction of the stable domain and the ranking of candidate legal knowledge output. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0018] refer to Figures 1-4 A knowledge graph-based system for precise retrieval of legal knowledge includes: The graph acquisition module is used to acquire legal knowledge graphs and case texts, extract case facts from the case texts, and mark the status of the facts. The closure construction module is used to map case facts to a legal knowledge graph. Based on the fact dependency edges and transit rules in the legal knowledge graph, case facts with linked changes in fact status are grouped into the same fact closure. The element matching module is used to determine the matching results between the factual state of the case facts and the legal elements based on the legal elements and element rules in the legal knowledge graph, and to generate candidate legal knowledge and the first applicable state. The state transfer module is used to change the fact state of the case facts within the fact closure based on the transfer rules, and synchronously change the fact state of the related case facts along the fact dependency edges to form a reachable state set; The state combination module is used to select reachable fact states from multiple reachable state sets to form a closed state combination, and generate a second applicable state based on the matching result of the closed state combination and the legal requirements. The inversion determination module is used to classify closure state combinations whose second applicable state is different from the first applicable state, and whose second applicable state is the same as the first applicable state for any proper subset of the closure state combination, into the inversion combination set. The stable sorting module is used to connect closure state combinations according to the transitive rules. Closure state combinations that are not included in the inverted combination set and whose second applicable state is the same as the first applicable state form a stable domain. Based on the number of closure state combinations in the stable domain and the matching results, the candidate legal knowledge is sorted and output.

[0019] In this embodiment, the map acquisition module specifically includes: Divide sentences according to paragraph boundaries, sentence punctuation, and enumeration markers in the case text, and record the paragraph position and sentence position of each sentence in the case text; From the statements, identify the names of natural persons, legal persons, unincorporated organizations, and judicial organs to obtain the legal subjects; identify words indicating actions, inactions, expressions of intent, and exercise of rights to obtain the legal acts; identify the people, things, funds, documents, and rights directly addressed by the legal acts to obtain the objects of the acts; identify expressions of date, time, period, and chronological order to obtain the time of occurrence; identify the changes in rights, performance of obligations, damages, and procedural results arising from the legal acts to obtain the results of the acts; identify expressions of denial, defense, objection, rebuttal, and contradictions to obtain the statements of dispute. Record the corresponding legal subjects, legal acts, objects of acts, times of occurrence, and results of acts in the same statement as one fact extraction result; multiple fact extraction results that are the same legal subjects and legal acts, have the same times of occurrence or have an inclusion relationship, and whose objects of acts and results of acts do not conflict, all point to the same legal event; Merge the fact extraction results pointing to the same legal event, retain the legal subject and legal act, merge the object of the act, the time of occurrence and the result of the act from multiple fact extraction results into the same record, delete duplicate records with the same content, and obtain the facts of the case; When the statements corresponding to the facts of a case record the occurrence of a legal act, the existence of the object of the act, or the establishment of the result of the act in an affirmative tone, and there are no negative or disputed statements, the facts of the case are marked as affirmative. When a negative word in a statement corresponding to the facts of a case directly modifies a legal act, the object of the act, or the result of the act, and there is no positive statement that conflicts with the negative statement, the facts of the case are marked as negative. When different statements corresponding to the same facts of a case record whether a legal act has occurred or not, whether the object of the act exists or not, or whether the result of the act is established or not, or when the statements corresponding to the facts of a case contain disputed statements, the facts of the case shall be marked as disputed. Based on the legal acts, objects of acts, and results of acts in the facts of the case, search for fact items with the same name or the same semantic meaning in the legal knowledge graph; when the legal acts, objects of acts, and results of acts all match the same fact item, map the facts of the case to the corresponding fact item; when there are multiple matching fact items, compare the legal acts, objects of acts, results of acts, and types of legal subjects in turn, and select the fact item with the most matching content. Determine related fact items by connecting the fact items corresponding to the facts in the case, and check whether there are legal acts, objects of acts, and results of acts corresponding to the related fact items in the case text; if the corresponding content is not recorded in the case text, mark the related fact items as undescribed. Record the facts of the case according to the legal subject, legal act, object of the act, time of occurrence, result of the act, statement of dispute, state of fact, corresponding fact item, paragraph position and sentence position, delete duplicate case facts with the same corresponding fact item and state of fact, and form a case fact set.

[0020] In this embodiment, the closure construction module is specifically: Based on the fact items corresponding to the facts of the case, determine the fact dependency edges connected to the fact items from the legal knowledge graph, and record the two fact items connected by the fact dependency edges and the state transmission direction; Obtain the transit rules corresponding to the fact dependency edges. The transit rules record the fact items corresponding to the starting point of the state transit direction, the triggering fact states, the associated fact items corresponding to the ending point of the state transit direction, and the changed fact states corresponding to the associated fact items. The original fact status of the fact item corresponding to the facts of the case is changed to an affirmative status, a negative status, a disputed status, or an unstated status, and the changed fact status is compared with the triggering fact status recorded in the transmission rule. When the changed fact state is the same as the triggering fact state, the associated fact item is determined according to the state propagation direction, and the fact state of the associated fact item is changed to the changed fact state recorded in the propagation rule. When the changed fact state differs from the triggering fact state, the original fact state of the associated fact item is maintained; If the same related fact item corresponds to multiple changed fact states, the same changed fact state is retained when the multiple changed fact states are the same, and the related fact item is marked as a disputed state when the multiple changed fact states are different. The associated fact item that has undergone a fact state change is taken as the starting point of the state propagation direction. The fact dependency edge connected to the associated fact item is determined, and the next fact item and the changed fact state corresponding to the next fact item are determined according to the corresponding propagation rules. Determine the next fact item level by level along the fact dependency edge until none of the next fact items connected by the fact dependency edge satisfy the triggering fact state recorded by the transit rule; Record the fact items that change synchronously during a change of fact status, and group the case facts corresponding to the fact items that change synchronously with the initial case facts into the same fact closure; The facts of the case that are in a set of case facts are changed to form a fact closure corresponding to the case facts. The case facts that are not changed in sync with other case facts are formed into a separate fact closure. The fact closures record the facts of the case. Fact closures containing the same facts are merged, and the merged fact closures are compared again until no two fact closures contain the same facts, forming non-overlapping fact closures.

[0021] In this embodiment, the component matching module specifically includes: Based on the factual items corresponding to the facts of the case, the legal elements connected to the factual items are determined from the legal knowledge graph, and the factual items corresponding to the legal elements, the required factual state, the type of elements, and the combination method are recorded; The types of requirements include necessary legal requirements and excluded legal requirements. Necessary legal requirements record the factual state that needs to be met when the candidate legal knowledge is established, while excluded legal requirements record the corresponding factual state when the candidate legal knowledge is not established. Combination methods include joint satisfaction and any satisfaction. Joint satisfaction means that all factual items connected by the legal requirements have reached the required factual state, while any satisfaction means that among the factual items connected by the legal requirements, there is a factual item that has reached the required factual state. When a legal requirement is connected to a factual item, the factual state of the case facts is compared with the factual state required by the legal requirement. If the factual states are the same, the legal requirement is marked as a match; if the factual states are different, the legal requirement is marked as a mismatch; if the case facts are in dispute or unstated, the legal requirement is marked as pending. When a legal requirement connects multiple factual items and the combination is mutually satisfying, if all the facts of the case corresponding to the connected factual items meet the factual state required by the legal requirement, the legal requirement is marked as matched. If there are factual states where the facts of the case do not meet the requirements, the legal requirement is marked as mismatched. In the remaining cases, the legal requirement is marked as pending. When a legal requirement connects multiple factual items and any combination of them satisfies the requirement, and there is a factual state in which the facts of the case meet the requirements of the legal requirement, the legal requirement is marked as matched. If none of the facts corresponding to the connected factual items meet the required factual state, the legal requirement is marked as mismatched. In the remaining cases, the legal requirement is marked as pending. Record the legal elements, element types, combination methods, and corresponding fact items according to the legal element marking results to form a matching result; Identify legal knowledge from the legal knowledge graph that is connected to the legal elements marked as matching or pending, merge duplicate legal knowledge, and generate candidate legal knowledge. Obtain the necessary and excluded legal requirements for candidate legal knowledge connections, and summarize the legal requirement tagging results according to the matching results; When all necessary legal requirements are marked as matched and none of the excluded legal requirements are marked as matched, the candidate legal knowledge is marked as applicable; When necessary legal requirements are marked as mismatched, candidate legal knowledge is marked as inapplicable; when exclusionary legal requirements are marked as matched, candidate legal knowledge is marked as inapplicable. If there is a legal requirement marked as pending among the necessary legal requirements and the excluded legal requirements, and there is no legal requirement that would cause the candidate legal knowledge to be marked as inapplicable, then the candidate legal knowledge will be marked as pending. The first applicable status is generated based on the applicable, inapplicable, and pending flags corresponding to the candidate legal knowledge.

[0022] In this embodiment, the status transmission module specifically includes: Obtain the fact items and original fact states corresponding to the facts of the case within the fact closure, and obtain the fact dependency edges connected to the fact items and the transit rules corresponding to the fact dependency edges; Exclude the original fact states of fact items from the affirmative, negative, disputed, and unstated states, compare the remaining fact states with the triggering fact states recorded in the transmission rules, and determine the fact states that can trigger the transmission of fact states as the variable fact states corresponding to the fact items. Select one fact item and one variable fact state from within the fact closure respectively, change the original fact state of the fact item to the selected variable fact state, and keep the original fact state of the remaining fact items. The starting point of the state propagation direction is determined based on the fact item whose fact state has changed, the associated fact item corresponding to the ending point of the state propagation direction is determined along the fact dependency edge, and the propagation rule is found to be consistent with the content of the propagation rule record, including the starting point of the state propagation direction, the changed fact state, and the associated fact item. Based on the found transit rules, the fact state of the associated fact item is changed to the changed fact state recorded in the transit rule. If no corresponding transit rule is found, the original fact state of the associated fact item is maintained. When the same related fact item corresponds to multiple transit rules and the changed fact status recorded by the multiple transit rules is the same, the same changed fact status shall be retained; when the same related fact item corresponds to multiple transit rules and the changed fact status recorded by the multiple transit rules is different, the related fact item shall be changed to a disputed status. The associated fact item whose fact state has changed is taken as the starting point of the new state propagation direction. The next fact item is determined along the fact dependency edge, and the fact state of the next fact item is changed according to the propagation rules. Repeat the steps of determining the next fact item and changing the fact state of the next fact item along the fact dependency edge until there is no next fact item that satisfies the triggering fact state and state propagation direction of the transit rule record; Record the fact states formed by the fact items within the fact closure after state changes, and combine the fact items and their corresponding fact states into a reachable fact state; Each variable fact state corresponding to a fact item within the fact closure is selected and its fact state is changed to form multiple reachable fact states corresponding to the fact closure. Compare the fact items and fact states of multiple reachable fact state records, merge reachable fact states where the fact items and corresponding fact states are the same, delete records where the same fact item corresponds to different fact states within the same reachable fact state, and group the remaining reachable fact states according to fact closures to form a set of reachable states corresponding to fact closures.

[0023] In this embodiment, reachable fact states are selected from multiple reachable state sets to form closure state combinations, specifically: Record the corresponding content of fact closures and reachable state sets, and count the number of fact closures; According to the selected quantity increasing from one to the total number of fact closures, select the same set of reachable states as the selected quantity from the set of all reachable states to form different combinations of reachable state sets; Select one reachable fact state from each selected reachable state set, and iterate through the different selection results of reachable fact states in the selected reachable state set; Based on the fact closure corresponding to the unselected reachable state set, obtain the original fact state corresponding to the fact item within the fact closure from the case fact set; Based on the reachable fact states selected by merging fact items and the original fact states corresponding to the unselected fact closures, record the fact closures that participate in the fact state change, the reachable fact states corresponding to the fact closures, and the fact closures that maintain the original fact states, forming a candidate closure state combination; If the same fact item in a candidate closure state combination corresponds to the same fact state, retain one fact item and its corresponding fact state; if the same fact item in a candidate closure state combination corresponds to different fact states, delete the candidate closure state combination. Identify the fact items in the candidate closure state combination that have undergone fact state changes, and obtain the fact dependency edges connected to the fact items that have undergone fact state changes and the corresponding transit rules; The fact item whose fact status has changed and its corresponding fact status are compared with the status transmission direction and triggering fact status recorded in the transmission rule to determine the changed fact status that the related fact item needs to reach. If the fact state recorded in the candidate closure state combination of the related fact item is the same as the changed fact state, the candidate closure state combination is retained; if the fact state recorded in the related fact item is different from the changed fact state, the candidate closure state combination is deleted. Compare the fact closures involved in fact state changes and their corresponding reachable fact states among the retained candidate closure state combinations, and delete duplicate candidate closure state combinations with the same record content; A closure state combination is formed by retaining candidate closure state combinations based on the fact closures that participate in the change of fact state, the reachable fact states corresponding to the fact closures, and the fact closure records that do not participate in the change of fact state.

[0024] In this embodiment, a second applicable state is generated based on the matching result between the combination of closure states and the legal requirements, specifically as follows: Read the fact closures involved in the fact state change and the corresponding reachable fact states in the closure state combination, and replace the original fact state of the corresponding fact item in the case fact set according to the fact items and fact states recorded in the reachable fact state records; For factual closures that did not participate in the change of factual status, the original factual status corresponding to the facts of the case is retained. The replaced factual status and the retained original factual status are summarized according to factual items to form the case factual status corresponding to the combination of closure statuses. Based on candidate legal knowledge, determine the legal requirements for connection, and obtain the factual status, requirement type, and combination method required by the legal requirements; When a legal requirement is connected to a fact item, the case fact status corresponding to the closed state combination is compared with the fact status required by the legal requirement. If the fact status is the same, the legal requirement is marked as matched; if the fact status is different, the legal requirement is marked as mismatched; if the fact status is disputed or unstated, the legal requirement is marked as pending. When a legal requirement connects multiple factual items and the combination is mutually satisfying, if all the connected factual items meet the factual state required by the legal requirement, the legal requirement is marked as matched. If there are factual items that do not meet the factual state required by the legal requirement, the legal requirement is marked as mismatched. In the remaining cases, the legal requirement is marked as pending. When a legal requirement connects multiple fact items and any combination of them satisfies the condition, if there is a factual state in which one of the fact items meets the requirements of the legal requirement, the legal requirement is marked as matched. If none of the connected fact items meet the requirements of the legal requirement, the legal requirement is marked as mismatched. In the remaining cases, the legal requirement is marked as pending. Based on the legal elements, element types, and legal element tagging results connected by the candidate legal knowledge, a matching result corresponding to the combination of closure states is formed. When all necessary legal requirements are marked as matched and none of the excluded legal requirements are marked as matched, the second applicable status corresponding to the candidate legal knowledge is marked as applicable. When a necessary legal requirement is marked as mismatched or an exclusionary legal requirement is marked as matched, the second applicable status corresponding to the candidate legal knowledge is marked as inapplicable. If there is no legal requirement that would cause the second applicable state to be marked as inapplicable, and there is a legal requirement marked as pending among the necessary legal requirements or the excluded legal requirements, the second applicable state corresponding to the candidate legal knowledge shall be marked as pending. Record the closure state combination, matching result and second applicable state according to the candidate legal knowledge, and generate the second applicable state corresponding to the closure state combination.

[0025] In this embodiment, the reversal determination module specifically includes: According to the candidate legal knowledge, the second applicable state and the first applicable state corresponding to the closure state combination are read respectively. When the second applicable state is different from the first applicable state, the closure state combination is determined as a candidate inversion combination. When the second applicable state is the same as the first applicable state, the closure state combination is not determined as a candidate inversion combination. Record the fact closures involved in fact state changes and the reachable fact states corresponding to the fact closures in the candidate inversion combinations; The selection quantity is increased from 0 to the number of fact closures contained in the candidate inversion combination minus 1. The corresponding number of fact closures and reachable fact states are selected from the candidate inversion combination. Different selection results are traversed to form a proper subset of the candidate inversion combination. A proper subset preserves the reachable fact state corresponding to the selected fact closure, and fact closures not included in the proper subset restore the original fact state recorded in the case fact set. The reachable factual states and restored original factual states retained by the proper subset of factual items are summarized to form the case factual states corresponding to the proper subset; The case fact status corresponding to the proper subset is compared with the fact status of the legal requirements connected to the candidate legal knowledge, and the matching results corresponding to the proper subset are generated according to the requirement type and combination method. When all necessary legal requirements are marked as matched and none of the excluded legal requirements are marked as matched, the second applicable state corresponding to the proper subset is marked as applicable; When a necessary legal requirement is marked as mismatched, the second applicable state corresponding to the proper subset is marked as inapplicable; when an exclusionary legal requirement is marked as match, the second applicable state corresponding to the proper subset is marked as inapplicable. If there is no legal requirement that would cause the second applicable state to be marked as inapplicable, and there is a legal requirement marked as pending among the legal requirements, then the second applicable state corresponding to the proper subset is marked as pending. Compare the second applicable state corresponding to the proper subset with the first applicable state. If there is a proper subset whose second applicable state is different from the first applicable state, delete the candidate inverted combination. If the second applicable state corresponding to any proper subset is the same as the first applicable state, the candidate inversion combination is assigned to the inversion combination set.

[0026] In this embodiment, closure state combinations are connected according to transitive rules. Closure state combinations that are not included in the inverse combination set and whose second applicable state is the same as the first applicable state form a stability region. Specifically: Read the fact closure, reachable fact state and second applicable state of the closure state combination record according to the candidate legal knowledge; Compare the fact closures recorded by any two closure state combinations. If the two closure state combinations contain the same fact closure and only one fact closure corresponds to a different reachable fact state, the corresponding fact closure is determined to be the fact closure where the fact state has changed. Compare the fact items and fact states recorded in the two closure state combinations of the fact closure where the fact state has changed, and determine the fact items whose fact state has changed, the fact state before the change, and the fact state after the change; Find the fact dependency edges and transit rules based on the fact items whose fact states have changed, compare the fact state before the change with the triggering fact state recorded by the transit rule, and compare the fact state after the change with the changed fact state recorded by the transit rule. If the fact state before the change is the same as the triggering fact state, the fact state after the change is the same as the changing fact state, and the fact state of the associated fact item conforms to the transit rules, then connect the two closure state combinations according to the state transit direction recorded by the transit rules. When a fact closure containing multiple fact items undergoes a fact state change, the fact states before and after the change of each fact item are compared level by level along the fact dependency edges. When all fact state changes conform to the corresponding transitive rules, the two closure state combinations are connected. If the fact items and fact states recorded in the two closure state combinations are the same, the connection between the two closure state combinations is retained; if the remaining fact closures have different fact states, the connection between the two closure state combinations is deleted. Record adjacent closure state combinations according to the connection direction, and arrange the corresponding closure state combinations continuously when the end point of one connection is the same as the start point of another connection to form a state path; Compare the closure state combinations and inverse combination sets in the state path, delete the closure state combinations that are included in the inverse combination set, and delete the state paths connected to the closure state combinations. Compare the second applicable state corresponding to the remaining closure state combinations with the first applicable state, delete closure state combinations whose second applicable state is different from the first applicable state, and delete the state paths connected to the closure state combinations. The closed state combinations that are not included in the inversion combination set and whose second applicable state is the same as the first applicable state, as well as the state paths between the closed state combinations, are retained. The retained closed state combinations and state paths are summarized according to the candidate legal knowledge to form a stable domain.

[0027] In this implementation, candidate legal knowledge is sorted and output based on the number of closure state combinations within the stable domain and the matching results, specifically as follows: Read the closure state combinations recorded in the stable domain according to the candidate legal knowledge, and compare the fact closure and reachable fact state recorded in the closure state combination. If the fact closure and reachable fact states recorded in a closure state combination are the same, retain one closure state combination and delete duplicate records. The number of closure state combinations retained within the stable domain is counted to obtain the number of closure state combinations within the stable domain corresponding to the candidate legal knowledge. Read the matching results corresponding to the candidate legal knowledge, and count the number of necessary legal elements marked as matched and the number of excluded legal elements marked as matched according to the element type; Compare the number of closure state combinations within the stable domain corresponding to the candidate legal knowledge, and rank the candidate legal knowledge in descending order of the number of closure state combinations within the stable domain; When the number of closure state combinations within a stable domain is the same, the number of necessary legal elements marked as matching is compared, and the candidate legal knowledge is arranged in descending order of the number of necessary legal elements. When the number of necessary legal requirements is the same, compare the number of excluded legal requirements marked as matching, and arrange the candidate legal knowledge in ascending order of the number of excluded legal requirements; Record the candidate legal knowledge, first applicable state, number of closure state combinations within the stable domain, number of necessary legal elements, number of excluded legal elements, and matching results in the order of arrangement, and output the arranged candidate legal knowledge.

[0028] Example 1: To verify the feasibility of this invention in practice, it was applied to a civil and commercial legal knowledge auxiliary retrieval platform of a provincial higher people's court. The test data included 200 case texts covering disputes over sales contracts, private lending, housing rentals, and construction contracts. The legal knowledge graph recorded 1842 factual items, 326 legal elements, 618 legal knowledge items, 2975 factual dependency edges, and 1406 transitive rules. Each case text was annotated with relevant legal knowledge by three legal professionals with over five years of experience in judicial assistance. The majority consensus result was used as the evaluation criterion for the retrieval results.

[0029] Taking a sales contract dispute case text as an example, the text records the establishment of the sales contract, the seller's completion of delivery, the buyer's raising of a quality objection, and the buyer's failure to pay the remaining price. There are conflicting statements regarding the validity of the quality objection, and the content of the demand for performance is not recorded. The data acquisition module extracts the legal subject, legal act, object of the act, time of occurrence, result of the act, and disputed statement. It marks the establishment of the contract and completion of delivery as affirmative, the payment of the remaining price as negative, the validity of the quality objection as disputed, and the related factual items corresponding to the demand for performance as undescribed.

[0030] The closure construction module, based on fact-dependent edges and transitive rules, categorizes delivery actions, quality objections, and payment into corresponding fact closures. The element matching module compares the factual state of the case facts with necessary legal elements and exclusionary legal elements, generating candidate legal knowledge and a first applicable state related to payment claims, breach of contract liability, and contract termination. The state transitive module modifies the factual state of the case facts within the fact closure, synchronously modifying the factual state of related case facts along the fact-dependent edges, forming a reachable state set. The state combination module selects reachable factual states from the reachable state set, forming closure state combinations and generating a second applicable state. The inversion determination module compares the first applicable state with the second applicable state, combining the second applicable state corresponding to the proper subset to form an inverted combination set. The stability sorting module forms a stability domain, arranging candidate legal knowledge according to the number of closure state combinations, the number of necessary legal element matches, and the number of exclusionary legal element matches within the stability domain. The technical process of this invention system is consistent with the fact closures, reachable state sets, inverted combination sets, and stability domains defined in the claims.

[0031] Table 1. Comparison of search results for different types of legal disputes.

[0032] Table 1 shows that the first-order accuracy of this invention in all four types of legal disputes is higher than that of existing search solutions, with an improvement of 16.0 to 22.2 percentage points. Construction contract disputes involve many pre-existing and related facts. Existing searches tend to prioritize legal knowledge with high degree of isolated matching. This invention, by restricting the ranking of candidate legal knowledge through fact closure and stable domain, improves the first-order accuracy from 55.6% to 77.8%. The hit rate of the top five items all reached over 88.9%, indicating that the reversed combination set can reduce the erroneous ranking caused by a small number of changes in factual status.

[0033] Table 2 Comparison of State Combinations under Different Case Fact Scales

[0034] Table 2 shows that as the number of case facts increases, the number of combinations resulting from independent changes in factual states grows rapidly, including a large number of state combinations that violate factual dependency edges and transitivity rules. This invention categorizes case facts with linked changes in factual states into factual closures and removes closure state combinations with inconsistent state transitivity results. This reduces the average number of combinations corresponding to 15-18 case facts from 10368 to 487, a reduction of 95.3% in invalid state combinations. The manual consistency rate of reversed combinations remains above 88.6%, and the average retrieval time is controlled within 2 seconds, demonstrating that this invention can balance the accuracy of applicable state analysis with the efficiency of legal knowledge retrieval.

[0035] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A knowledge graph-based system for precise retrieval of legal knowledge, characterized in that, Includes the following steps: The graph acquisition module is used to acquire legal knowledge graphs and case texts, extract case facts from the case texts, and mark the status of the facts. The closure construction module is used to map case facts to a legal knowledge graph. Based on the fact dependency edges and transit rules in the legal knowledge graph, case facts with linked changes in fact status are grouped into the same fact closure. The element matching module is used to determine the matching results between the factual state of the case facts and the legal elements based on the legal elements and element rules in the legal knowledge graph, and to generate candidate legal knowledge and the first applicable state. The state transfer module is used to change the fact state of the case facts within the fact closure based on the transfer rules, and synchronously change the fact state of the related case facts along the fact dependency edges to form a reachable state set; The state combination module is used to select reachable fact states from multiple reachable state sets to form a closed state combination, and generate a second applicable state based on the matching result of the closed state combination and the legal requirements. The inversion determination module is used to classify closure state combinations whose second applicable state is different from the first applicable state, and whose second applicable state is the same as the first applicable state for any proper subset of the closure state combination, into the inversion combination set. The stable sorting module is used to connect closure state combinations according to the transitive rules. Closure state combinations that are not included in the inverted combination set and whose second applicable state is the same as the first applicable state form a stable domain. Based on the number of closure state combinations in the stable domain and the matching results, the candidate legal knowledge is sorted and output.

2. The knowledge graph-based legal knowledge precise retrieval system according to claim 1, characterized in that, The map acquisition module specifically includes: The case text is divided into sentences, and the legal subject, legal act, object of the act, time of occurrence, result of the act, and disputed statement are extracted from the sentences. The extracted results pointing to the same legal event are then merged according to the legal subject, legal act, and time of occurrence to obtain the facts of the case. Case facts that are clearly stated in the case text are marked as affirmative; case facts that are clearly stated as invalid are marked as negative; and case facts with conflicting statements in the case text are marked as disputed. The facts of the case are mapped to fact items in the legal knowledge graph. Related fact items are determined along the fact dependency edges connected to the fact items. Related fact items whose corresponding content is not recorded in the case text are marked as undescribed. Record the facts of the case according to the legal subject, legal act, time of occurrence, and factual state corresponding to the facts of the case, and form a case fact set.

3. The knowledge graph-based legal knowledge precise retrieval system according to claim 1, characterized in that, The closure construction module is specifically as follows: Based on the fact items corresponding to the facts of the case, determine the fact dependency edges connected to the fact items, and obtain the transit rules corresponding to the fact dependency edges; Based on the factual status and transmission rules of the case, the factual status corresponding to the factual items is changed in sequence, and the related factual items that need to be changed synchronously after the factual status is changed are determined. Continue to determine the next fact item connected to the associated fact item along the fact dependency edge, and determine whether the next fact item changes its fact state synchronously with the associated fact item according to the transitive rules, until there is no next fact item that needs to change its fact state synchronously; The case facts corresponding to the fact items whose factual status changes synchronously are grouped into the same fact closure, and fact closures containing the same case facts are merged to form non-overlapping fact closures.

4. The knowledge graph-based legal knowledge precise retrieval system according to claim 1, characterized in that, The element matching module specifically comprises: Based on the factual items corresponding to the facts of the case, determine the legal requirements connected to the factual items, obtain the requirement rules corresponding to the legal requirements, and record the factual status, requirement type, and combination method required by the legal requirements. The factual state of the case is compared with the factual state required by the legal requirements. Cases whose factual state meets the legal requirements of the requirements are marked as matched, those whose factual state does not meet the legal requirements of the requirements are marked as mismatched, and the legal requirements corresponding to the disputed state and the unstated state are marked as pending, thus forming a matching result. Based on the matching results, legal knowledge that is connected to legal requirements is filtered from the legal knowledge graph to generate candidate legal knowledge; The matching results are summarized according to the necessary legal requirements and the exclusionary legal requirements. Candidate legal knowledge that is marked as a match for all necessary legal requirements and not marked as a match for all exclusionary legal requirements is marked as applicable. Candidate legal knowledge that is marked as a mismatch for necessary legal requirements is marked as inapplicable. Candidate legal knowledge that is marked as a match for exclusionary legal requirements is marked as inapplicable. The remaining candidate legal knowledge is marked as pending, generating the first applicable state.

5. The knowledge graph-based legal knowledge precise retrieval system according to claim 1, characterized in that, The status transmission module specifically comprises: Obtain the fact items, fact states, fact dependency edges, and transit rules corresponding to the case facts within the fact closure, and determine the variable fact states corresponding to the fact items; Change the original fact state of the fact item to a variable fact state, determine the related fact items whose fact states need to be changed synchronously based on the transit rules and fact dependency edges, and change the fact state of the related fact items. Continue to determine the next fact item that needs to be synchronously changed along the fact dependency edge, repeat the fact state change until there is no next fact item that needs to be synchronously changed, forming the reachable fact state corresponding to the fact closure; The fact state changes are performed using the variable fact states corresponding to the fact items within the fact closure, the merged reachable fact states are deleted, and reachable fact states with different fact states corresponding to the same fact item are formed into a reachable state set.

6. The knowledge graph-based legal knowledge precise retrieval system according to claim 1, characterized in that, The process of selecting reachable fact states from multiple reachable state sets to form a closure state combination specifically involves: Select all reachable state sets from one to all based on the number of fact closures. Select one reachable fact state from each of the selected reachable state sets. The fact closures corresponding to the unselected reachable state sets retain their original fact states. The selected reachable fact states are merged with the fact closures that maintain the original fact states to form candidate closure state combinations; Compare the fact states corresponding to the same fact item in the candidate closure state combinations, and delete the candidate closure state combinations that correspond to different fact states for the same fact item; Based on fact-dependent edges and transit rules, examine the state transit results in candidate closure state combinations, delete candidate closure state combinations with inconsistent state transit results, and record the remaining candidate closure state combinations according to the fact closures involved in fact state changes and their corresponding reachable fact states to form closure state combinations.

7. The knowledge graph-based legal knowledge precise retrieval system according to claim 1, characterized in that, The second applicable state is generated based on the matching result of the combination of closure states and legal requirements, specifically as follows: According to the reachable fact states recorded by the closure state combination, the case facts that participate in the fact state change are changed, while the case facts that do not participate in the fact state change remain in their original fact states; The factual state corresponding to the changed case facts is compared with the factual state corresponding to the legal requirements of the candidate legal knowledge. The legal requirements that the factual state meets the requirements rules are marked as matched, the legal requirements that the factual state does not meet the requirements rules are marked as mismatched, and the legal requirements corresponding to the disputed state and the unstated state are marked as pending, forming the matching results corresponding to the closed state combination. The matching results corresponding to the closure state combination are summarized according to the necessary legal requirements and the excluded legal requirements. Candidate legal knowledge that is marked as matching for all necessary legal requirements and not marked as matching for all excluded legal requirements is marked as applicable. Candidate legal knowledge that is marked as not matching for necessary legal requirements is marked as not applicable. Candidate legal knowledge that is marked as matching for excluded legal requirements is marked as not applicable. The remaining candidate legal knowledge is marked as pending, thus generating the second applicable state corresponding to the closure state combination.

8. The knowledge graph-based legal knowledge precise retrieval system according to claim 1, characterized in that, The inversion determination module specifically comprises: Compare the second applicable state corresponding to the combination of closure states with the first applicable state, and determine the combination of closure states in which the second applicable state is different from the first applicable state as a candidate inversion combination. Select a subset of fact closures and corresponding reachable fact states from the fact closures and corresponding reachable fact states contained in the candidate inversion combination to form a proper subset of the candidate inversion combination; The reachable fact state corresponding to the fact closure within the proper subset is retained, the fact closure not included in the proper subset is restored to its original fact state, and a second applicable state corresponding to the proper subset is generated based on the matching result of the restored fact state and the legal requirements. Candidate inversion combinations whose second applicable state is the same as the first applicable state for any proper subset are included in the inversion combination set.

9. A knowledge graph-based legal knowledge precision retrieval system according to claim 1, characterized in that, The connection of closure state combinations according to the transitive rules, and the closure state combinations that are not included in the inverse combination set and whose second applicable state is the same as the first applicable state, form a stable region, specifically: Compare the fact closure and reachable fact states recorded for any two combinations of closure states; If a closure state combination can change the reachable fact state of a fact closure according to the transitive rules to obtain another closure state combination, and the fact states of the remaining fact closures are the same, then the two closure state combinations are connected according to the direction of fact state change to form a state path. Remove closure state combinations that belong to the inverted combination set from the state path, and remove closure state combinations that are different from the first applicable state in the second applicable state. The connections between the remaining closure state combinations are preserved, and the stability region is formed by the remaining closure state combinations and the state paths connecting the remaining closure state combinations.

10. A knowledge graph-based legal knowledge precision retrieval system according to claim 1, characterized in that, The process of sorting and outputting candidate legal knowledge based on the number of closure state combinations and matching results within the stable domain is as follows: The number of closure state combinations within the stable domain corresponding to candidate legal knowledge is counted, and the number of necessary legal elements and excluded legal elements marked as matched are counted based on the matching results. Candidate legal knowledge is arranged in descending order of the number of closure state combinations within the stable domain. If the number of combinations is the same, it is arranged in descending order of the number of necessary legal elements. If the number of necessary legal elements is the same, it is arranged in ascending order of the number of excluded legal elements. The arranged candidate legal knowledge is then output.