Jurisdictional entity relationship reasoning method, apparatus, device, medium, and product
By constructing a multidimensional heterogeneous judicial knowledge graph and a path search agent, the problems of single-dimensional knowledge graphs and insufficient reasoning capabilities in the judicial field are solved. This enables multi-hop reasoning and interpretable path generation for implicit relationships in judicial cases, thereby improving the efficiency and accuracy of judicial reasoning.
Patent Information
- Application Number
- CN202610808022.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies in the judicial field suffer from problems such as single knowledge graph dimension, weak reasoning ability, lack of multi-hop and cross-type implicit relationship mining capabilities, inability to construct causal evidence chains, and opaque reasoning process.
A multidimensional heterogeneous judicial knowledge graph is constructed. Through a heterogeneous graph attention network and a reinforcement learning-driven path search agent, multi-hop implicit relationship paths are identified, and interpretable reasoning paths are generated.
It improves the completeness of the characterization of judicial information, enhances the ability to discover hidden clues, realizes the leap from static knowledge graphs to dynamic and explorable judicial reasoning, ensures the judicial logic interpretability of the path, and is suitable for the deployment of large-scale judicial knowledge graphs.
Smart Images

Figure CN122635554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, medium, and product for reasoning about judicial entity relationships. Background Technology
[0002] With the development of artificial intelligence technology, its application in the judicial field is becoming increasingly widespread. Currently, the mainstream solutions mainly include legal information retrieval and question-answering systems based on knowledge graphs, and judgment prediction models based on graph neural networks.
[0003] However, existing technologies still have significant limitations: First, knowledge graphs are limited in dimension and fail to integrate multi-dimensional judicial entities, making it difficult to fully depict the complexity of cases; second, their reasoning ability is weak, mainly limited to predicting direct relationships and lacking the ability to uncover multi-hop and cross-type implicit relationships; third, they generally neglect causal logic, only conducting correlation analysis and failing to construct a causal evidence chain from evidence to facts to legal conclusions; and fourth, the reasoning process lacks interpretability, with model decision-making being a black box, making it difficult to meet the judicial field's requirements for logical rigor and procedural transparency. Summary of the Invention
[0004] This invention provides a method, apparatus, equipment, medium, and product for reasoning about implied entity relationships in judicial cases, in order to solve the problem of low reasoning ability regarding implicit entity relationships in judicial cases.
[0005] According to one aspect of the present invention, a method for reasoning about judicial entity relationships is provided, comprising: A multidimensional heterogeneous judicial knowledge graph is constructed based on judicial data; the multidimensional heterogeneous judicial knowledge graph includes five types of entity nodes: people, events, evidence, places, and legal concepts, as well as cross-type relationship edges; By combining a heterogeneous graph attention network with multiple pre-determined meta-paths, the entity characteristics of each entity node in the multidimensional heterogeneous judicial knowledge graph are determined; where the meta-path is a semantic path template formed by connecting different types of entity nodes in a pre-defined judicial logical order. By configuring a reinforcement learning-driven path search agent to identify entity features, the system performs multi-hop traversal in a multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine the implicit relationship path connecting to the target entity node. Generate interpretable reasoning paths based on implicit relational paths.
[0006] According to another aspect of the present invention, a judicial entity relationship reasoning apparatus is provided, comprising: The heterogeneous graph construction module is used to construct a multidimensional heterogeneous judicial knowledge graph based on judicial data; wherein, the multidimensional heterogeneous judicial knowledge graph includes five types of entity nodes: people, events, evidence, places and legal concepts, as well as cross-type relationship edges; The entity feature determination module is used to determine the entity features of each entity node in the multidimensional heterogeneous judicial knowledge graph by combining a heterogeneous graph attention network with multiple pre-determined meta-paths; wherein, the meta-path is a semantic path template formed by connecting different types of entity nodes in a preset judicial logic order. The implicit path identification module is used to identify the entity features by configuring a reinforcement learning-driven path search agent, and to perform multi-hop traversal in the multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine the implicit relationship path connecting to the target entity node. A reasoning path generation module is used to generate an interpretable reasoning path based on the implicit relationship path. According to another aspect of the present invention, an electronic device is provided, comprising: At least one processor; and A memory that is communicatively connected to at least one processor; wherein, The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to execute the judicial entity relationship reasoning method of any embodiment of the present invention.
[0007] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the judicial entity relationship reasoning method of any embodiment of the present invention.
[0008] According to another aspect of this application, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the judicial entity relationship reasoning method of any embodiment of this application.
[0009] The technical solution of this invention improves the completeness of the characterization of judicial information by constructing a multi-dimensional heterogeneous judicial knowledge graph, and conducts multi-hop implicit relationship path reasoning through meta-path guidance. This enables the implicit relationship path to not only reveal the indirect connection between cross-type entities, but also ensure the judicial logical interpretability of the path. The whole process realizes the leap from static knowledge graph to dynamic and explorable judicial reasoning ability, significantly improves the ability to discover implicit clues in complex cases, and has high computational efficiency, making it particularly suitable for deployment scenarios of large-scale judicial knowledge graphs.
[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of a judicial entity relationship reasoning method provided by an embodiment of the present invention; Figure 2 This is a flowchart illustrating the construction process of a multidimensional heterogeneous judicial knowledge graph according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a multidimensional heterogeneous judicial knowledge graph provided in an embodiment of the present invention; Figure 4 This is a flowchart of another judicial entity relationship reasoning method provided by an embodiment of the present invention; Figure 5 This is a schematic diagram illustrating the generation process of an interpretable reasoning path according to an embodiment of the present invention; Figure 6 This is a schematic diagram of a judicial entity relationship reasoning framework provided by an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a judicial entity relationship reasoning device provided in an embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of an electronic device that implements the judicial entity relationship reasoning method of the present invention. Detailed Implementation
[0013] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0014] It should be noted that the terms "candidate," "target," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0015] Figure 1 This invention provides a flowchart of a judicial entity relationship reasoning method. This embodiment is applicable to optimizing the reasoning of implicit logical evidence chains in the judicial field. The method can be executed by a judicial entity relationship reasoning device, which can be implemented in hardware and / or software and can be configured in a server. Figure 1 As shown, the method includes: S110. Construct a multidimensional heterogeneous judicial knowledge graph based on judicial data.
[0016] The multidimensional heterogeneous judicial knowledge graph includes five types of entity nodes: people, events, evidence, locations, and legal concepts, as well as cross-type relationship edges. It is a semantic network graph built upon massive amounts of structured and unstructured judicial data to comprehensively depict various core elements in judicial scenarios and their interrelationships. Judicial data includes, but is not limited to: case files, court records, judgments, legal provisions databases, and information related to involved parties.
[0017] The multidimensional heterogeneous judicial knowledge graph contains five predefined types of entity nodes. Specifically, people include parties such as plaintiffs, defendants, criminal suspects, litigation participants such as witnesses, agents, and expert witnesses, and judicial personnel such as judges and prosecutors; events refer to legally significant acts or states, such as criminal acts, civil legal acts, and procedural events; evidence covers legally recognized forms of evidence such as physical evidence, documentary evidence, audiovisual materials, electronic data, and witness testimony; locations include the place of the crime, residence, workplace, court, detention center, and other geographical or institutional locations related to the case; and legal concepts include abstract legal elements such as charges, legal provisions, legal principles, elements of a crime, and sentencing factors. Semantic connections are established between these different types of entity nodes through cross-type relational edges. These edges have clear legal meanings and directions. For example, the types of relational edges include, but are not limited to: participation, proof, occurrence, cause, and satisfaction; person – [participation] → event, event – [occurrence] → location, evidence – [proof] → event, event – [satisfaction] → legal concept, etc. These relationships not only reflect factual connections but also implicitly contain legal logical structures.
[0018] This multidimensional heterogeneous judicial knowledge graph is persistently managed using a graph database or distributed graph storage system, supporting efficient relation queries, path traversal, and graph neural network computation, providing a structured knowledge foundation for subsequent intelligent reasoning, case matching, and evidence chain generation.
[0019] In one feasible embodiment, S110 includes: Natural language processing is performed on judicial data, and a named entity recognition model is used to identify five types of entities: people, events, evidence, places, and legal concepts. Relationship extraction algorithms are also applied to extract the relationships between entities from the judicial data. The entities are normalized to form triples with the same structure; The triples are stored in a graph database to create a heterogeneous graph composed of nodes and edges of different types, serving as a multidimensional heterogeneous judicial knowledge graph; where nodes represent entities and edges represent the relationships between entities.
[0020] The forms of judicial data are diverse, including unstructured text and structured data. Unstructured text includes case files and judgments, while structured data includes legal provisions and information on involved parties. The process begins with data preprocessing and information extraction of the raw judicial data. For example, the collected judicial data undergoes NLP preprocessing such as cleaning, word segmentation, and part-of-speech tagging. Then, a joint extraction model based on deep learning is used, such as BERT+CRF for entity recognition and BERT+Biaffine for relation classification, to simultaneously identify five categories of entities and their relationships from the preprocessed judicial text: people, events, evidence, locations, and legal concepts. The extracted entities are then normalized and disambiguated; for example, "Zhang Mou" and "Zhang San" are mapped to the same entity ID, and "entity-relationship-entity" triples forming the same structure are stored in a graph database, such as Neo4j, ultimately constructing a multidimensional heterogeneous judicial knowledge graph.
[0021] like Figure 2 The diagram shows the flowchart of the construction process of a multidimensional heterogeneous judicial knowledge graph. The overall process includes data collection, entity and relation extraction, entity alignment and fusion, triple generation, graph storage, and quality assessment. First, raw text is collected from judicial data such as judgments, legal provisions, and case files, and preprocessed, including word segmentation, part-of-speech tagging, and named entity recognition, to extract potential semantic information. Then, the process enters a parallel processing stage: on one hand, BERT-based sequence labeling models, such as BiLSTM-CRF, are used to identify five core entities in the text; on the other hand, a BERT-based relation classification model combined with the Biaffine attention mechanism is used to determine the semantic relationships between entity pairs, such as implementation, proof, and occurrence. After completing entity recognition and relation extraction, the extracted entities undergo unification and disambiguation processing. Entity linking technology is used to distinguish entities with the same name but different identities, and different representations of the same entity are merged into a unique identifier. Next, knowledge fusion is performed to deduplicate and merge duplicate triples from multiple sources or the same document, forming a unified structured "head entity-relationship-tail entity" triple. These triples are then batch-written into a graph database, such as Neo4j or JanusGraph, to construct a multidimensional heterogeneous judicial knowledge graph containing cross-type nodes and semantic edges. Finally, the graph undergoes quality assessment, including checks on completeness, consistency, and logical correctness. If the assessment results do not meet preset standards, a manual review and correction process is triggered; if the quality is satisfactory, the graph construction is complete. Figure 3 The diagram shown is a schematic of a multidimensional heterogeneous judicial knowledge graph.
[0022] This embodiment realizes the automated conversion from unstructured judicial texts to computable and reasonable knowledge graphs, improves the relational integrity and accuracy of multidimensional heterogeneous judicial knowledge graph construction, and thus improves the accuracy of subsequent judicial reasoning.
[0023] S120. By combining a heterogeneous graph attention network with pre-determined multiple meta-paths, the entity characteristics of each entity node in the multidimensional heterogeneous judicial knowledge graph are determined.
[0024] Meta-paths are semantic path templates formed by connecting different types of entity nodes in a pre-defined legal logical order. Meta-paths refer to predefined semantic path templates in a multi-dimensional heterogeneous legal knowledge graph, formed by connecting different types of entity nodes in a specific legal logical order, used to represent legally significant association patterns in judicial scenarios.
[0025] In this embodiment, in order to effectively characterize the semantic and structural characteristics of various entities in a multidimensional heterogeneous judicial knowledge graph, a heterogeneous graph attention network (HGAT) is used to learn the vector representation of entity nodes in the graph. The core of the heterogeneous graph attention network is to combine multiple pre-determined meta-paths in the judicial domain to guide the reasonable propagation and aggregation of information among different types of nodes.
[0026] Metapaths are semantic path templates formed by connecting different types of entity nodes according to a pre-defined legal logic order. They are used to explicitly model common legal relationship patterns in judicial reasoning. During the representation learning process, the heterogeneous graph attention network first extracts the induced isomorphic subgraph for each metapath, and then executes a node-level attention mechanism within this subgraph to output the entity feature vector of each entity node.
[0027] For example, for each predefined meta-path (e.g., person-event-evidence, event-location-legal concept), the meta-path is used to perform semantic projection on the multi-dimensional heterogeneous judicial knowledge graph, generating a corresponding isomorphic semantic subgraph. In this subgraph, only pairs of entities of the same or different classes that can be connected through the meta-path are retained, and multi-hop relationships are compressed into single-hop edges, thereby transforming complex heterogeneous relationships into a computable graph structure. For each semantic subgraph, a standardized graph convolutional network (GCN) or graph isomorphic network (GIN) is independently applied for feature propagation. During this process, each entity node aggregates information from its neighbors in its own semantic subgraph. After several layers of convolution operations, the semantic channel embedding of the entity under the meta-path is obtained. Since different meta-paths represent different legal logic perspectives, such as fact-finding, legal application, and spatial association, each channel embedding captures the contextual representation of the entity under a specific judicial semantic. The embedding vectors obtained by the same entity under all meta-path channels are concatenated or weighted and summed, where the weights can be set to fixed values or dynamically generated through a lightweight gating mechanism to form the final entity features of the entity. This entity feature integrates structural and semantic information from multiple legal logic paths. It does not require explicit calculation of attention weights between nodes or paths. Instead, it relies on the semantic constraints of the meta-path itself and the local smoothness of graph convolution to achieve effective representation, ensuring the accuracy of the entity feature's learning of the legal logic reflected in the meta-path.
[0028] In one feasible embodiment, the metapath includes at least one of the following: a first metapath consisting of person entity nodes, event entity nodes, and evidence entity nodes connected in sequence; a second metapath consisting of event entity nodes, location entity nodes, and legal concept entity nodes connected in sequence; and a third metapath consisting of evidence entity nodes, event entity nodes, and legal concept entity nodes connected in sequence.
[0029] Specifically, the first-dimensional path, consisting of person nodes, event nodes, and evidence nodes connected sequentially (person → event → evidence), depicts the factual logic of a person generating evidence through a certain action, representing the legal fact chain of a subject generating evidence through action. The second-dimensional path, consisting of event nodes, location nodes, and legal concept nodes connected sequentially (event → location → legal concept), expresses the applicable legal norms for an event occurring at a specific location, representing the applicable legal norms for an event occurring at a specific location. The third-dimensional path, consisting of evidence nodes, event nodes, and legal provision nodes connected sequentially (evidence → event → legal provision), represents the judgment logic chain where evidence points to facts and corresponds to legal basis. These meta-paths are pre-designed by legal experts based on the elements of a crime, rules of proof, and judicial practice experience in substantive laws such as criminal law and civil law, as well as procedural law, and are embedded as prior knowledge within the model architecture. This embodiment pre-constructs meta-paths based on legal elements, rules of evidence, or typical reasoning patterns in judicial practice to guide the graph neural network in semantic aggregation of relationships between cross-type entities, thereby improving the accuracy of entity feature determination.
[0030] In one feasible embodiment, the method further includes: In response to the addition of new judicial data, identify new entities and their corresponding relationships from the new judicial data; The newly added entities and their corresponding relationships are incrementally integrated into a multidimensional heterogeneous judicial knowledge graph. A K-order neighborhood incremental learning strategy is used to update the entity features of the newly added entity nodes corresponding to the newly added entities and the entity nodes in the K-hop neighborhoods corresponding to the newly added entity nodes.
[0031] Since case details in judicial practice are often constantly changing, resulting in new judicial data, this embodiment designs an incremental graph maintenance and embedding update mechanism to support the continuous evolution and real-time updates of the judicial knowledge system. When new judicial data is input, such as newly published judgments, revised laws and regulations, or supplementary investigation materials, the new judicial data first undergoes the same natural language processing flow as the initial construction phase. For example, a named entity recognition model is used to extract new entities such as people, events, evidence, locations, and legal concepts, and a relation extraction model is used to identify the relationships between these entities and between them and existing entities, forming a structured set of triples. Then, the new entities and their corresponding relationships are incrementally integrated into the existing multidimensional heterogeneous judicial knowledge graph. For example, new entities are added to the graph database as new nodes, and new relationships are connected to the corresponding nodes as new cross-type edges. If a new entity and an existing entity in the graph point to the same real-world object, such as Zhang Moumou mentioned in the new entity actually being Zhang San, they are merged through entity linking and disambiguation modules to avoid redundancy.
[0032] To avoid the high computational cost of full-graph retraining, a K-order neighborhood incremental learning strategy is adopted to efficiently update entity features. Specifically, entity features are recalculated only for the newly added entity node itself and all its neighboring nodes within a K-hop range in the graph; the features of nodes in the newly added region far from the newly added entity node remain unchanged. Here, K is a preset positive integer, usually 1 or 2, but can also be set to other positive integers according to the actual needs of the scenario. The specific value of K is not limited in this embodiment of the invention.
[0033] For example, the feature update process reuses the aforementioned heterogeneous graph attention network or graph convolution module, but only runs on its local subgraph. That is, with the newly added node as the center, it expands outward to the neighborhood of K layers to form a local computation subgraph, where information is aggregated and the updated feature vector is generated.
[0034] For example, when a new relationship is added between witness Li and defendant Wang, the entity features of Li and Wang in the graph will be updated, and the one-hop neighbors directly connected to Wang, such as events and evidence, will be updated (when K=1), or further extended to the neighbors of these neighbors (when K=2). This local update mechanism ensures the effective dissemination of new knowledge while significantly reducing computational complexity, meeting the dual requirements of timeliness and consistency in judicial scenarios.
[0035] To adapt to the constantly changing nature of cases in judicial practice, this embodiment supports dynamic graph updates. New judicial data is extracted into new entity and relation triples and added to the graph. An incremental learning strategy is adopted to update only the affected nodes and their K-order neighborhood node embeddings, without having to train the entire graph neural network from scratch, thereby achieving fast response and efficient computation.
[0036] S130. By configuring a reinforcement learning-driven path search agent to identify entity features, the system performs multi-hop traversal in the multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine the implicit relationship path connecting to the target entity node.
[0037] Implicit relation reasoning is modeled as a link prediction task in a knowledge graph. A path search agent based on reinforcement learning, such as a pre-trained agent, is employed. This agent starts from a source entity node and traverses the multidimensional heterogeneous judicial knowledge graph. By learning a policy network, it selects the optimal next-step relation and node, thereby discovering meaningful, multi-hop implicit relation paths connecting the source and target entity nodes. Here, multi-hop means that the implicit relation path includes at least two connecting entity nodes between the source and target entity nodes.
[0038] In this embodiment, to uncover unlabeled deep relationships between source entity nodes and target entity nodes in a multidimensional heterogeneous judicial knowledge graph, a reinforcement learning-driven path search agent is configured to perform multi-hop reasoning tasks. This agent starts with a source entity node as its initial state, such as a criminal suspect, specific evidence, or legal provisions. It then progressively selects the next hop relationship-entity pair in the multidimensional heterogeneous judicial knowledge graph, performing a sequential traversal until it reaches the target entity node, such as another person involved in the case, a charge, or the location of the crime, or reaches a preset maximum number of hops.
[0039] Specifically, the state space of the path search agent consists of the entity features of the current entity node, namely the vector representation generated by combining the heterogeneous graph attention network with the judicial meta-path, and the entity features of the target entity node; the action space is defined as all legal outgoing edges from the current entity, namely the relation types connected to it and their corresponding neighboring entities. The agent's policy network is implemented using a deep neural network, such as a multilayer perceptron or a graph-augmented policy network, whose input is the current state and output is the probability distribution of each possible action.
[0040] During the training phase of the path search agent, the agent continuously optimizes its strategy through interaction with the graph environment to maximize the cumulative reward. The reward function comprehensively considers the following factors: when the agent successfully reaches a node that is highly semantically related to the target entity, a positive reward is given, namely a semantic relevance score calculated based on the cosine similarity of entity features.
[0041] Through the above mechanism, the path search agent can autonomously discover the implicit relationship path connecting the source entity and the target entity. For example, Defendant A → [Employed] → Witness B → [Appeared] → Crime scene C → [Associated] → Another case D → [Satisfies] → Legal provision E.
[0042] S140. Generate an interpretable reasoning path based on the implicit relational path.
[0043] After obtaining one or more implicit relationship paths connecting source entity nodes and target entity nodes through a reinforcement learning path search agent, the implicit relationship paths are further subjected to semantic parsing, logical verification, and structured reorganization to generate interpretable reasoning paths with judicial logic.
[0044] Specifically, implicit relationship paths are typically represented as a series of ordered triple sequences, such as: Defendant A – [participation] → Theft B – [occurred at] → Location C – [related to] → Surveillance evidence D. To improve its comprehensibility and legal applicability, each relation edge in the path is first mapped using natural language templates. For example, a pre-defined judicial semantic template library converts technical relational tags, such as participation, occurrence at, proof, and violation, into phrases that conform to legal expression habits, such as replacing proof with provable and violation with suspected violation. Subsequently, the entire path is sentence-integrated to generate coherent natural language reasoning statements, such as: Defendant A participated in theft B that occurred at location C, a fact that can be proven by surveillance evidence D. Furthermore, to enhance the rigor of reasoning, a logical consistency check is performed on the generated reasoning path: verifying whether the time sequence is reasonable, such as the time of evidence formation must not be later than the time of the event; checking whether the subject's qualifications are appropriate, such as minors cannot constitute certain specific criminal subjects; and excluding obviously contradictory relationship combinations, such as alibis and eyewitness testimony pointing to the same point in time and space.
[0045] Furthermore, for paths that pass the verification, an overall confidence score is calculated and labeled. This confidence score comprehensively considers the original extraction confidence scores of each relation edge in the path, the entity link accuracy, and the cumulative reward value during the reinforcement learning search process. The final output of the interpretable reasoning path is presented in a structured form, including: a visualized graph path; natural language description text; semantic explanation and confidence score of each relation; and an overall logical validity indicator for the path.
[0046] This reasoning path not only reveals the implicit connections between entities, but also presents the reasoning basis in a way that is understandable, reviewable, and traceable by judicial personnel. It effectively bridges the interpretation gap between artificial intelligence models and judicial practice, and meets the judicial principles of procedural justice and openness of subjective judgment.
[0047] The technical solution of this embodiment improves the completeness of the characterization of judicial information by constructing a multi-dimensional heterogeneous judicial knowledge graph, and conducts multi-hop implicit relationship path reasoning through meta-path guidance. This enables the implicit relationship path to not only reveal the indirect connection between cross-type entities, but also ensure the judicial logical interpretability of the path. The whole process realizes the leap from static knowledge graph to dynamic and explorable judicial reasoning ability, which significantly improves the ability to discover implicit clues in complex cases and has high computational efficiency, making it particularly suitable for deployment scenarios of large-scale judicial knowledge graphs.
[0048] Figure 4 This is a flowchart illustrating another judicial entity relationship reasoning method provided by an embodiment of the present invention. This embodiment further refines the process of determining entity features in the above embodiments. For example... Figure 4 As shown, the method includes: S410. Construct a multidimensional heterogeneous judicial knowledge graph based on judicial data.
[0049] S420. Use a heterogeneous graph attention network to perform attention aggregation on the neighboring entity nodes of each entity node under each meta-path to determine the intermediate features of each entity node under each meta-path.
[0050] To fully explore the contextual information of various entities in the multidimensional heterogeneous judicial knowledge graph from different legal semantic perspectives, a heterogeneous graph attention network is used to perform feature aggregation operations on each entity node along different paths. Specifically, for each predefined meta-path in the judicial domain, the multidimensional heterogeneous judicial knowledge graph is first semantically constrained based on the meta-path, and the entity subsets connected by the meta-path and their topological structures are extracted to form a semantic neighborhood view corresponding to the meta-path, thereby limiting the aggregation scope.
[0051] In this semantic neighborhood view, for each target entity node, all its neighboring entity nodes that can be reached directly or indirectly through the meta-path are identified. For example, under the person-event-evidence meta-path, the neighbors of a person node may include all the events it has participated in, as well as the evidence associated with these events; while under the event-place-legal concept path, the neighbors of the same event node may include the place where it occurred and the applicable legal provisions.
[0052] The heterogeneous graph attention network performs attention aggregation on these neighboring entity nodes. First, it maps the entity features of the target entity and its neighbors to a unified semantic space through a meta-path-specific linear transformation. Next, it calculates the attention coefficient between the target entity and each neighbor, which reflects the importance of that neighbor to the target entity under the current meta-path semantics. Then, it normalizes the attention coefficient using the softmax function and aggregates the transformed features of all neighbors in a weighted summation. Finally, this weighted aggregation result serves as the intermediate feature of the target entity node under that meta-path.
[0053] S430. Weighted fusion of the intermediate features of each entity node under all meta-paths is performed to obtain the entity features of each entity node.
[0054] The weight of each meta-path is determined based on its semantic relevance to the current inference task.
[0055] Since different meta-paths represent different dimensions of judicial logic, such as fact-finding, spatial correlation, and application of law, each entity node corresponds to multiple intermediate features, each characterizing its semantic role in different legal contexts. All intermediate features of each entity node will serve as the basic input for further semantic fusion or path reasoning, effectively supporting the refined modeling of complex judicial relationships.
[0056] Specifically, after obtaining the intermediate features of each entity node under each meta-path through the heterogeneous graph attention network, these intermediate features are further weighted and fused to generate the final entity features that can comprehensively reflect the semantic role of the entity in a multi-dimensional legal context.
[0057] Since different meta-paths represent different perspectives of judicial logic—for example, the "person-event-evidence" path focuses on fact-finding, the "event-location-legal concept" path focuses on legal application, and the "evidence-event-legal provision" path focuses on the basis for judgment—each path contributes differently to the current reasoning task. Therefore, a semantic relevance assessment mechanism dynamically determines the fusion weight of each meta-path. For instance, firstly, the contextual information of the current reasoning task is obtained. For example, if the task is to determine whether the defendant has committed theft, the task context can be characterized by the embedding vector of the target crime "theft" or the feature representation of relevant legal provisions. If the task is to find the individuals involved in a case associated with certain evidence, the task context can be defined by the features of that evidence node and its subgraph structure. Subsequently, the semantic similarity between the intermediate features obtained under each meta-path and the task context is calculated, such as through cosine similarity or a learnable matching function. This similarity is used as the initial relevance score for that meta-path. Then, the relevance scores of all meta-paths are normalized to obtain a set of fusion weights that sum to 1. This weight reflects the importance ranking of each judicial logic path in the current reasoning scenario. For example, in the task of determining the charge, the "event-legal concept" path may receive a higher weight; while in the task of tracing the source of evidence, the weight of the "evidence-event-person" path is significantly increased.
[0058] Finally, the intermediate features under each meta-path are weighted and summed according to their corresponding weights to generate the final entity feature of the entity node. This entity feature not only integrates multi-hop and cross-type structural information, but also adaptively focuses on the legal semantic dimension most relevant to the current task, thus providing a highly discriminative and interpretable representation basis for subsequent path search, causal inference, or judgment prediction.
[0059] S440. By configuring a reinforcement learning-driven path search agent to identify entity features, the system performs multi-hop traversal in the multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine the implicit relationship path connecting to the target entity node.
[0060] In a feasible embodiment, the reward function of the path search agent during the path search process is determined based on a combination of the following factors: The semantic relevance score between the path endpoint and the target entity node, the penalty for the path length, and the positive novelty incentive for accessing low-frequency or unexplored relation edges.
[0061] This embodiment guides a reinforcement learning-driven path search agent to efficiently and rationally explore implicit relationship paths from source entity nodes to target entity nodes in a multi-dimensional heterogeneous judicial knowledge graph through a multi-objective composite reward function. The reward function is dynamically calculated after each action selection, i.e., each step of path expansion, and is used to guide the optimization of the agent strategy.
[0062] Specifically, the reward function comprehensively considers the following three key factors: First, the semantic relevance score measures the degree of semantic matching between the entity node reached at the current path endpoint and the preset target entity node. Specifically, using the entity feature vectors generated by the aforementioned heterogeneous graph attention network, the similarity between the path endpoint entity and the target entity is calculated, for example, through cosine similarity or a learnable bilinear matching function. If the two are highly similar in the legal semantic space, a higher positive reward is given; conversely, if the semantic deviation is large, the reward tends to be close to zero or negative. This mechanism ensures that the agent tends to move in the semantically relevant direction, improving the effectiveness of the path.
[0063] The path length penalty is used to suppress the generation of lengthy and inefficient reasoning chains. Specifically, a fixed negative reward is applied to each additional hop in the path, for example, deducting 0.1 points per step, so that the total reward decays as the path length increases. This design encourages agents to prioritize simpler and more direct reasoning paths while ensuring semantic relevance, which aligns with the logical requirement in judicial practice that the chain of evidence should be concise and to the point.
[0064] Novelty incentives are used to encourage the agent to actively explore low-frequency or underexplored relation edges in the graph. A global relation access frequency statistics table is maintained to record the number of times each type of relation is used in historical searches. When the agent selects a relation edge with an access frequency below a preset threshold, or traverses an edge for the first time in the current session, a positive reward is triggered, such as +0.2 points. This mechanism effectively alleviates the premature convergence problem common in reinforcement learning, avoiding the agent from repeating high-frequency but potentially suboptimal common paths, such as defendant → participation → case, thereby improving the ability to discover implicit and novel judicial connections. The above three reward components are linearly combined according to preset weights, which can be dynamically adjusted according to the task type, constituting the agent's immediate reward at each decision step.
[0065] Through this composite reward mechanism, the path search agent can achieve a balance between accuracy (semantic relevance), simplicity (short path), and exploration (discovering new paths), ultimately outputting a high-confidence reasoning path that is both legally logical and innovative.
[0066] S450. Generate interpretable reasoning paths based on implicit relational paths.
[0067] In one feasible embodiment, generating an interpretable reasoning path based on implicit relational paths includes: A causal inference algorithm is used to determine the causal direction in the implicit relationship path and to construct a causal evidence chain based on the causal direction. The logical flow order in the causal evidence chain is from evidence to facts and then to legal conclusions. The causal inference algorithm includes conditional independence testing and / or structural causal modeling. An interpretable reasoning path is generated based on the causal evidence chain.
[0068] After obtaining a latent relationship path generated by a reinforcement learning path search agent, a pre-defined causal inference algorithm is invoked to perform causal analysis on the relationships represented by each adjacent triple in the path. The causal inference algorithm includes, but is not limited to, conditional independence testing methods (such as statistical tests based on PC or FCI algorithms) and / or structural causal models (SCM). Conditional independence testing analyzes the statistical dependencies between variables in a large number of historical judicial cases to determine whether there is a direct causal relationship between two entities; structural causal models, based on pre-defined causal graph priors or causal structures learned from data, use computational tools to infer intervention effects, thereby determining the directionality of the relationship (e.g., whether evidence A leads to the determination of fact B, or whether the two are merely accompanying phenomena under a common cause C).
[0069] Based on the causal inference results, causal direction arrows are marked on the edges of implicit relationship paths, and edges that are only related but lack causal support are removed. Then, according to the basic logic of judicial proof—the three-part structure of evidence → fact → legal conclusion—the remaining causal edges are sorted and reorganized. For example, surveillance video → (causation) → defendant's presence is classified as evidence; defendant's presence + act → (causation) → constituting theft is classified as fact; and theft → (causation) → conforming to criminal law is classified as legal conclusion. The resulting causal evidence chain not only has a clear logical flow but also satisfies the adjudication principle of being based on evidence, mediated by facts, and guided by law.
[0070] Among them, the causal evidence chain refers to the proof path in judicial reasoning, which is a series of legal facts and evidentiary elements with a clear causal direction connected in a logical order. Its core feature is that there is not only a correlation between each link, but also a causal dependence relationship. It can deduce the facts to be proved layer by layer from objective evidence and ultimately support the establishment of the legal conclusion. The causal evidence chain follows the basic logical flow of evidence → facts → legal conclusion.
[0071] Finally, an interpretable reasoning path is generated based on this causal evidence chain: on the one hand, structured statements are output in natural language form, such as surveillance video as objective evidence proving that the defendant appeared at the crime scene; combined with his subsequent behavior, it can be determined that he committed theft; this behavior meets the constituent elements of theft in the Criminal Law and should be legally identified as theft; on the other hand, causal edges are highlighted in the visualization interface, and the confidence level of each causal relationship and the causal inference method used are marked, such as p<0.01 after conditional independence test.
[0072] Optionally, by configuring a reinforcement learning-driven path search agent to identify entity features, the system performs multi-hop traversal in a multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine multiple implicit relationship paths connecting to the target entity node. A causal inference algorithm is used to determine the causal direction in the implicit relationship path, and a causal evidence chain is constructed based on the causal direction. The target relationship path is then selected from the multiple implicit relationship paths based on the causal evidence chain, and an interpretable reasoning path is generated based on the causal evidence chain of the target relationship path.
[0073] This embodiment introduces a causal inference mechanism to identify the causal direction of the relation edges in the implicit relation path, revealing the deep causal relationship between entities. This ensures that the implicit relation paths discovered from the multidimensional heterogeneous judicial knowledge graph have the rigor and credibility of legal logic, thereby providing an intelligent auxiliary basis that is reviewable, verifiable, and traceable, significantly improving the credibility and practicality of artificial intelligence in judicial scenarios.
[0074] like Figure 5The diagram illustrates the generation process of interpretable reasoning paths. The overall process includes meta-path definition, node-level attention aggregation, semantic-level attention fusion, entity embedding learning, multi-hop path search, causal relationship discovery, and interpretable reasoning path generation. First, a pre-defined set of meta-paths in the legal domain is input, such as person → participation → event → occurrence → location, evidence → proof → event → satisfaction → legal concept, etc., to guide information dissemination within the graph structure. Then, for each meta-path, the attention weights of each entity node under that meta-path are calculated using a node-level attention mechanism. Specifically, for each entity node, the attention score between it and its neighboring nodes is calculated using the LeakyReLU activation function combined with a linear transformation matrix and attention parameters. A weighting coefficient is obtained through softmax normalization, and then neighbor features are aggregated to generate the intermediate feature representation of the entity node under that meta-path. Based on this, a semantic-level attention mechanism is introduced to perform cross-path fusion of the intermediate feature representations generated by different meta-paths. By calculating the relevance score between the intermediate feature representations corresponding to each meta-path and the current reasoning task context, fusion weights are dynamically allocated, ultimately generating a comprehensive entity feature vector for each entity node. The entity feature vector serves as input for subsequent inference, and is further learned via a graph neural network to form a highly expressive entity representation. Subsequently, a reinforcement learning-driven path search agent is deployed to perform multi-hop traversals in the graph starting from the source entity node. The reward function guides policy optimization to discover implicit relationship paths connecting to the target entity. After obtaining these implicit relationship paths, the causal inference module is invoked. Conditional independence tests or structural causal models are used to determine the causal direction of each relation edge in the implicit relationship path, and a causal evidence chain is constructed according to the logical order of "evidence → fact → legal conclusion." Finally, a causal directed acyclic graph is constructed using techniques such as time series analysis and PC / ICE algorithms, and confidence scores are combined to generate the final inference result and an interpretable inference path represented in natural language.
[0075] The technical solution of this embodiment determines entity features that not only integrate the structural information of multi-hop neighborhoods but also retain the legal semantic associations between cross-type entities. These entity features are then used as high-quality input representations for subsequent tasks such as path search, significantly improving the reasoning ability and domain adaptability of judicial entity relationships.
[0076] like Figure 6The diagram illustrates the structure of a judicial entity relationship reasoning architecture. The system's overall architecture comprises four layers: a data layer, a knowledge layer, a model layer, and an application layer. The data layer, as the system's input source, is responsible for integrating diverse judicial data, including unstructured text (case files, judgments, etc.) and structured data (legal text databases, information on involved parties, etc.). The knowledge layer transforms the raw data into a structured, multi-dimensional, heterogeneous judicial knowledge graph. This graph contains five core entities: people, events, evidence, locations, and legal concepts, along with their rich relationships. The model layer is responsible for learning and reasoning from the knowledge graph, comprising four modules: heterogeneous graph representation learning, multi-hop relationship reasoning, causal chain reasoning, and dynamic graph updating. Based on the reasoning results from the model layer, the application layer provides intelligent auxiliary functions such as case concatenation analysis, clue tracking and recommendation, and evidence logic verification, and offers interpretable reasoning paths.
[0077] This embodiment constructs a multi-dimensional heterogeneous judicial knowledge graph containing "people – events – evidence – locations – legal concepts," and utilizes heterogeneous graph neural networks for deep representation learning and multi-hop relationship reasoning, aiming to automatically discover implicit relationship chains and causal chains between cases, evidence, and subjects. Compared with existing technologies, this disclosure has the following significant technical advantages: With a more comprehensive knowledge representation and a more solid foundation for reasoning, the five-in-one multidimensional heterogeneous judicial knowledge graph constructed in this embodiment can more completely and accurately reflect the real-world judicial case scenarios than the graphs with relatively single dimensions in the prior art. This comprehensive knowledge representation provides a solid foundation for subsequent deep reasoning and can capture key information that the prior art ignores due to model simplification.
[0078] With enhanced reasoning capabilities, this method can uncover deep, implicit relationships. Compared to existing technologies that primarily perform single-step link prediction, the multi-hop path search method based on reinforcement learning employed in this disclosure can proactively explore and discover complex, implicit relationship chains between entities that can extend for several steps. This has groundbreaking value for judicial tasks requiring a macro-level perspective, such as case linkage and in-depth investigation of criminal gangs.
[0079] By introducing causal reasoning, the logical rigor of the reasoning is enhanced. This disclosure explicitly integrates the causal inference mechanism into judicial relationship reasoning, enabling the distinction between relevance and causation, and constructing a true chain of evidence. This makes the reasoning results not only a data correlation but also logically persuasive, greatly improving the reliability and usability of the reasoning results in judicial practice, and overcoming the limitations of existing technologies that only focus on relevance analysis.
[0080] With strong interpretability and in line with the core requirements of the judicial field, the interpretable reasoning path generation mechanism designed in this disclosure transforms the "black box" reasoning process into a sequence of steps that users can understand and review. Each reasoning conclusion has a clear path and supporting evidence, fully meeting the core requirements of procedural justice and logical transparency in the judicial field, and solving the key obstacle that makes it difficult for existing deep learning methods to be applied in the judicial field.
[0081] Possessing dynamic adaptability and being more closely aligned with real-world needs, this system introduces an incremental learning mechanism that enables rapid response and model updates to dynamically changing case details, avoiding the significant overhead and delays associated with the periodic retraining required by traditional models. This dynamic adaptability allows the system to be better integrated into real, ongoing judicial case-handling processes.
[0082] Figure 7 This is a schematic diagram of the structure of a judicial entity relationship reasoning device provided in an embodiment of the present invention. Figure 7 As shown, the device includes: The heterogeneous graph construction module 710 is used to construct a multidimensional heterogeneous judicial knowledge graph based on judicial data. The multidimensional heterogeneous judicial knowledge graph includes five types of entity nodes: people, events, evidence, places, and legal concepts, as well as cross-type relationship edges. The entity feature determination module 720 is used to determine the entity features of each entity node in the multidimensional heterogeneous judicial knowledge graph by combining a heterogeneous graph attention network with multiple pre-determined meta-paths; wherein, the meta-path is a semantic path template formed by connecting different types of entity nodes in a pre-determined judicial logic order. The implicit path identification module 730 is used to identify entity features by configuring a reinforcement learning-driven path search agent, and to perform multi-hop traversal in the multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine the implicit relationship path connecting to the target entity node. The reasoning path generation module 740 is used to generate interpretable reasoning paths based on implicit relational paths.
[0083] The technical solution of this embodiment improves the completeness of the characterization of judicial information by constructing a multi-dimensional heterogeneous judicial knowledge graph, and conducts multi-hop implicit relationship path reasoning through meta-path guidance. This enables the implicit relationship path to not only reveal the indirect connection between cross-type entities, but also ensure the judicial logical interpretability of the path. The whole process realizes the leap from static knowledge graph to dynamic and explorable judicial reasoning ability, which significantly improves the ability to discover implicit clues in complex cases and has high computational efficiency, making it particularly suitable for deployment scenarios of large-scale judicial knowledge graphs.
[0084] Optional, the entity feature determination module includes: By using a heterogeneous graph attention network, attention aggregation is performed on the neighboring entity nodes of each entity node under each meta-path to determine the intermediate features of each entity node under each meta-path. The intermediate features of each entity node under all meta-paths are weighted and fused to obtain the entity features of each entity node; the weight of each meta-path is determined according to its semantic relevance to the current inference task.
[0085] Optionally, the meta-path includes at least one of the following: a first meta-path consisting of person entity nodes, event entity nodes, and evidence entity nodes connected in sequence; a second meta-path consisting of event entity nodes, location entity nodes, and legal concept entity nodes connected in sequence; and a third meta-path consisting of evidence entity nodes, event entity nodes, and legal concept entity nodes connected in sequence.
[0086] Optional, the inference path generation module is specifically used for: A causal inference algorithm is used to determine the causal direction in the implicit relationship path, and a causal evidence chain is constructed based on the causal direction; the logical flow order in the causal evidence chain is from evidence to facts and then to legal conclusion; the causal inference algorithm includes conditional independence test and / or structural causal model; Generate interpretable reasoning paths based on causal evidence chains.
[0087] Optional, heterogeneous map construction module, specifically used for: Natural language processing is performed on judicial data, and a named entity recognition model is used to identify five types of entities: people, events, evidence, places, and legal concepts. Relationship extraction algorithms are also applied to extract the relationships between entities from the judicial data. The entities are normalized to form triples with the same structure; The triples are stored in a graph database to create a heterogeneous graph composed of nodes and edges of different types, serving as a multidimensional heterogeneous judicial knowledge graph; where nodes represent entities and edges represent the relationships between entities.
[0088] Optionally, the device also includes a map updating module, specifically used for: In response to the addition of new judicial data, identify new entities and their corresponding relationships from the new judicial data; The newly added entities and their corresponding relationships are incrementally integrated into a multidimensional heterogeneous judicial knowledge graph. A K-order neighborhood incremental learning strategy is used to update the entity features of the newly added entity nodes corresponding to the newly added entities and the entity nodes in the K-hop neighborhoods corresponding to the newly added entity nodes.
[0089] Optionally, the reward function of the path search agent during the path search process is determined based on a combination of the following factors: The semantic relevance score between the path endpoint and the target entity node, the penalty for the path length, and the positive novelty incentive for accessing low-frequency or unexplored relation edges.
[0090] The judicial entity relationship reasoning device provided in the embodiments of the present invention can execute the judicial entity relationship reasoning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0091] The acquisition, storage, use, and processing of data in this application comply with relevant national laws and regulations and do not violate public order and good morals.
[0092] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0093] Figure 8 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0094] like Figure 8 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0095] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0096] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods described above, such as judicial entity relationship reasoning methods.
[0097] In some embodiments, the judicial entity relationship reasoning method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the judicial entity relationship reasoning method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the judicial entity relationship reasoning method by any other suitable means (e.g., by means of firmware).
[0098] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific reference products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0100] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0101] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0102] The systems and technologies described herein can be implemented in computing systems that include back-end components (e.g., as data servers), or computing systems that include switching components (e.g., application servers), or computing systems that include front-end components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such back-end, switching, or front-end components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0103] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0104] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0105] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the judicial entity relationship reasoning method provided in any embodiment of this application.
[0106] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for reasoning about substantive legal relationships, characterized in that, The method includes: A multidimensional heterogeneous judicial knowledge graph is constructed based on judicial data; wherein, the multidimensional heterogeneous judicial knowledge graph includes five types of entity nodes: people, events, evidence, places and legal concepts, as well as cross-type relationship edges; The entity features of each entity node in the multidimensional heterogeneous judicial knowledge graph are determined by combining a heterogeneous graph attention network with multiple pre-determined meta-paths; wherein, the meta-path is a semantic path template formed by connecting different types of entity nodes in a preset judicial logical order. By configuring a reinforcement learning-driven path search agent to identify the entity features, the system performs a multi-hop traversal of the multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine the implicit relationship path connecting to the target entity node. An interpretable reasoning path is generated based on the implicit relational path.
2. The method according to claim 1, characterized in that, The process of determining the entity features of each entity node in the multidimensional heterogeneous judicial knowledge graph by combining a heterogeneous graph attention network with pre-determined multiple meta-paths includes: The heterogeneous graph attention network is used to perform attention aggregation on the neighboring entity nodes of each entity node under each meta-path to determine the intermediate features of each entity node under each meta-path. The intermediate features of each entity node under all meta-paths are weighted and fused to obtain the entity features of each entity node; wherein, the weight of each meta-path is determined according to its semantic relevance to the current inference task.
3. The method according to claim 1 or 2, characterized in that, in, The meta-path includes at least one of the following: a first meta-path consisting of person entity nodes, event entity nodes, and evidence entity nodes connected in sequence; a second meta-path consisting of event entity nodes, location entity nodes, and legal concept entity nodes connected in sequence; and a third meta-path consisting of evidence entity nodes, event entity nodes, and legal concept entity nodes connected in sequence.
4. The method according to claim 1, characterized in that, The step of generating an interpretable reasoning path based on the implicit relational path includes: A causal inference algorithm is used to determine the causal direction in the implicit relationship path, and a causal evidence chain is constructed based on the causal direction; wherein, the logical flow order in the causal evidence chain is from evidence to facts and then to legal conclusion; the causal inference algorithm includes conditional independence testing and / or structural causal modeling; An interpretable reasoning path is generated based on the causal evidence chain.
5. The method according to claim 1, characterized in that, The construction of a multidimensional heterogeneous judicial knowledge graph based on judicial data includes: The judicial data is subjected to natural language processing, and a named entity recognition model is used to identify five types of entities: people, events, evidence, places, and legal concepts. A relation extraction algorithm is applied to extract the relationships between the entities from the judicial data. The entities are normalized to form triples with the same structure; The triples are stored in a graph database to create a heterogeneous graph composed of nodes and edges of different types, which serves as the multidimensional heterogeneous judicial knowledge graph; wherein, the nodes represent the entities and the edges represent the relationships between the entities.
6. The method according to claim 1, characterized in that, The method further includes: In response to the addition of new judicial data, new entities and corresponding relationships are identified from the new judicial data; The newly added entities and their corresponding incremental relationships are integrated into the multidimensional heterogeneous judicial knowledge graph, and the entity features of the newly added entity nodes corresponding to the newly added entities and the entity nodes in the K-hop neighborhoods corresponding to the newly added entity nodes are updated using a K-order neighborhood incremental learning strategy.
7. The method according to claim 1, characterized in that, in, The reward function of the path search agent during the path search process is determined based on the following factors: The semantic relevance score between the path endpoint and the target entity node, the penalty for the path length, and the positive novelty incentive for accessing low-frequency or unexplored relation edges.
8. A judicial substantive relationship reasoning device, characterized in that, The device includes: The heterogeneous graph construction module is used to construct a multidimensional heterogeneous judicial knowledge graph based on judicial data; wherein, the multidimensional heterogeneous judicial knowledge graph includes five types of entity nodes: people, events, evidence, places and legal concepts, as well as cross-type relationship edges; The entity feature determination module is used to determine the entity features of each entity node in the multidimensional heterogeneous judicial knowledge graph by combining a heterogeneous graph attention network with multiple pre-determined meta-paths; wherein, the meta-path is a semantic path template formed by connecting different types of entity nodes in a preset judicial logic order. The implicit path identification module is used to identify the entity features by configuring a reinforcement learning-driven path search agent, and to perform multi-hop traversal in the multidimensional heterogeneous judicial knowledge graph starting from the source entity node to determine the implicit relationship path connecting to the target entity node. The reasoning path generation module is used to generate an interpretable reasoning path based on the implicit relationship path.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the judicial entity relationship reasoning method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the judicial entity relationship reasoning method of any one of claims 1-7.
11. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the judicial entity relationship reasoning method according to any one of claims 1-7.