Graph knowledge enhanced interpretation generation method and system for legal documents

By constructing a semantic association network of legal documents, the semantic information of the clauses to be interpreted is obtained, and a graph knowledge-enhanced interpretation of legal documents is generated, which solves the problem of insufficiently accurate interpretations in the existing technology and achieves higher accuracy and professionalism.

CN118552358BActive Publication Date: 2024-09-24贵州中汇科技发展有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411000972.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-09-24
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

Existing legal document interpretation technology is difficult to generate personalized interpretations for specific contexts, and lacks an overall grasp of legal logic, resulting in inaccurate interpretations.

Method used

The graph knowledge-enhanced paraphrase generation method for legal documents is used to construct a semantic association network to represent the connection between legal concepts and clauses, obtain the semantic information of the clauses to be paraphrased, generate paraphrase text based on the semantic information, and adjust the paraphrase text to improve accuracy.

Benefits of technology

It improves the accuracy of the interpretation of legal documents, can consider the internal connections between legal concepts and clauses, and generates more comprehensive and professional interpretations that are in line with legal logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552358B
    Figure CN118552358B
Patent Text Reader

Abstract

The present disclosure provides a graph knowledge enhanced interpretation generation method and system for legal documents, wherein the generation method includes: constructing a semantic association network based on the knowledge graph of the legal document, wherein the semantic association network is used to characterize the connection between legal concepts and legal clauses in the legal document; mapping the legal clauses to be interpreted to corresponding nodes in the semantic association network, and obtaining the semantic information of the legal clauses to be interpreted; and generating the interpretation text of the legal clauses according to the semantic information of the legal clauses to be interpreted. The above technical solution can improve the accuracy of the interpretation of legal documents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of text processing technology, and in particular to a graph knowledge-enhanced interpretation generation method and system for legal documents. Background Art

[0002] With the continuous development of the rule of law society, the number of legal documents has increased rapidly, bringing a huge workload of reading and analysis to legal workers. For example, legal documents contain a large amount of important key information such as case information, case trial information, and court judgment information. It is of great significance to interpret these legal documents and clarify the meaning of the legal documents.

[0003] There are two main problems with existing legal document interpretation technology: the first is that it only interprets a single clause and lacks an overall grasp of legal logic; the second is that most of them use traditional template-based or retrieval methods to generate interpretations, which makes it difficult to generate personalized explanations for specific contexts.

[0004] In this context, how to provide a technical solution to improve the accuracy of interpretation of legal documents has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0005] In view of this, the embodiments of the present disclosure provide a graph knowledge enhanced interpretation generation method and system for legal documents, which can improve the accuracy of legal document interpretation.

[0006] The present disclosure provides a graph knowledge enhanced interpretation generation method for legal documents, including:

[0007] Based on the knowledge graph of legal documents, a semantic association network is constructed, wherein the semantic association network is used to represent the connection between legal concepts and legal clauses in legal documents;

[0008] Mapping the legal clause to be interpreted to the corresponding node in the semantic association network, and obtaining the semantic information of the legal clause to be interpreted;

[0009] Generate a legal clause interpretation text according to the semantic information of the legal clause to be interpreted;

[0010] Adjust the interpretation text of the legal provisions;

[0011] Wherein, the adjustment of the interpretation text of the legal terms includes at least one of the following:

[0012] The generation process of the interpretation text of the legal clause is traced back to form a reasoning chain including clause-concept-interpretation; the reasoning chain is matched with the interpretation text of the legal clause, and according to the matching operation result, the concept corresponding to the reasoning chain is marked in the legal knowledge map to form an interpretable interpretation text of the legal clause;

[0013] Perform structural analysis on the legal clause interpretation text, and determine the score of the legal clause interpretation text according to a preset evaluation model; when it is determined that the score of the legal clause interpretation text is lower than the set score, reconstruct the legal clause interpretation text.

[0014] Optionally, the knowledge graph based on legal documents to construct a semantic association network includes:

[0015] Acquire a legal concept entity from the legal document, wherein the legal concept entity includes at least one of a legal subject entity, a legal object entity, a legal fact entity, and a legal consequence entity;

[0016] Determine the multiple semantic relationships between entities in the legal concept entity and between each entity and the legal clause, wherein the multiple semantic relationships include at least one of: a hierarchical relationship, a causal relationship, a sequential relationship, and an inclusion relationship;

[0017] The semantic association network is constructed based on the multiple semantic relationships contained in each entity in the legal concept entity, between each entity, and between each entity and the legal terms, including: constructing the semantic association network with each entity in the legal concept entity as a node and the multiple semantic relationships as an edge.

[0018] Optionally, mapping the legal clause to be interpreted to a corresponding node in the semantic association network and acquiring semantic information of the legal clause to be interpreted includes:

[0019] Extracting keyword features of the legal clause to be interpreted; determining the semantic similarity between the keyword features and the legal concept nodes in the semantic association network, and generating a plurality of candidate mapping nodes;

[0020] Determining the co-occurrence frequency of the keyword feature and the legal concept corresponding to the legal concept node in the legal corpus;

[0021] Based on the semantic similarity and the co-occurrence frequency, selecting a mapping node from a plurality of candidate mapping nodes as the node where the legal clause is located in the semantic association network; including: selecting a legal concept node with the highest semantic similarity and the greatest co-occurrence frequency as the mapping node of the legal clause to be interpreted in the semantic association network;

[0022] Taking the mapping node of the legal clause to be interpreted in the semantic association network as the target node, the context nodes within a preset range with the target node and the semantic relations corresponding to each mapping node are obtained as the semantic information of the legal clause to be interpreted.

[0023] Optionally, generating a legal clause interpretation text according to the semantic information of the legal clause to be interpreted includes:

[0024] Generate a joint semantic vector between the legal clause to be interpreted and the semantic information of the legal clause; including: segmenting and transforming the legal clause to be interpreted to generate a corresponding word embedding vector sequence; and encoding the semantic information of the legal clause to form a semantic tensor; determining the correlation weight between each word in the word embedding vector sequence and the semantic tensor, and selecting a semantic tensor whose correlation weight is greater than a set weight; fusing the word embedding vector sequence and the selected semantic tensor to form a joint semantic vector;

[0025] The combined semantic vector and the legal clause to be interpreted are input into a preset text processing model to generate the interpretation text of the legal clause; including: inputting the combined semantic vector and the legal clause to be interpreted into the text processing model to generate a plurality of candidate text sequences; scoring and sorting the plurality of candidate text sequences to screen out a target text sequence; splicing the target text sequences to generate the interpretation text of the legal clause.

[0026] Optionally, generating a legal clause interpretation text according to the semantic information of the legal clause to be interpreted includes:

[0027] Dividing the knowledge graph of the legal document into a plurality of sub-graphs; wherein one sub-graph corresponds to one legal concept; comprising: identifying key legal concepts from the knowledge graph of the legal document; based on the key legal concepts, selecting legal concept entities and multi-semantic relationships related to the key legal concepts, and generating a sub-graph containing at least the key legal concepts;

[0028] Retrievers corresponding to each sub-graph are established respectively, and multiple retriever sets are generated, each retriever set is used to characterize the semantic association between the legal document and each sub-graph; wherein, the generation of multiple retriever sets includes: constructing training samples based on the legal document corpus corresponding to each sub-graph; using the training samples of each sub-graph to train the corresponding retriever, and taking the trained retriever and the corresponding sub-graph as a retriever set; based on the training samples, determining the confidence of each retriever set, and adjusting the parameters of the retrievers in the retriever set with lower confidence, so that the confidence of each retriever set tends to be consistent;

[0029] Generate a graph knowledge enhanced representation based on the semantic information of the legal clause to be interpreted and multiple searcher sets; including: construct a legal question based on the semantic information of the legal clause to be interpreted; extract key information elements in the legal question to generate a structured legal question; input the structured legal question into each searcher set respectively, obtain the confidence of each searcher set, and select a searcher set with a confidence greater than a set confidence to form a knowledge search result set; generate a knowledge enhanced semantic vector of the structured legal question through the knowledge search result set; fuse the knowledge enhanced semantic vector of the structured legal question with the original semantic vector of the structured legal question to form a graph knowledge enhanced representation of the structured legal question;

[0030] Based on the graph knowledge enhanced representation, the legal clause interpretation text is generated; including: taking the semantic vector of the graph knowledge enhanced representation as input, and taking the concept nodes and tuples in the knowledge retrieval result set as input text sequence; inputting the semantic vector of the knowledge enhanced representation and the input text sequence into the decoder to generate the legal clause interpretation text.

[0031] Optionally, the adjusting the interpretation text of the legal terms includes:

[0032] Constructing a legal entity tracking dataset, including: defining entity types of the legal clause interpretation text; annotating the entity types; aligning entity annotations pointing to the same thing in different sentences in the legal clause interpretation text;

[0033] Generating a pre-trained language model according to the legal entity tracking dataset includes: converting the format of the legal entity tracking dataset to form a coded formal expression; constructing an embedding vector for each parameter in the coded formal expression; concatenating the embedding vector of each parameter with the adjacent text of the legal entity tracking dataset in the legal clause interpretation text to form a code embedding representation of the legal entity; inputting the code embedding representation of the legal entity into a neural network model to generate the pre-trained language model;

[0034] Generate an interpretable legal clause interpretation text according to the legal clause interpretation text and the pre-trained language model; including: inputting the legal clause interpretation text into the pre-trained language model to identify all first legal entities contained in the legal clause interpretation text; and determining the second legal entity based on the question text constructed based on the legal clause interpretation text; aligning the first legal entity with the second legal entity to determine the entity pairs referring to the same thing in the legal clause interpretation text and the question text, wherein the entity pairs include question entities and interpretation entities; for each entity pair, obtain the neighbor information of each entity pair from the knowledge graph of the legal document, and determine the relationship between each entity in each entity pair; merge the alignment relationship of each entity pair and the relationship between each entity in each entity pair into the legal clause interpretation text to generate an interpretable legal clause interpretation text;

[0035] According to the legal clause interpretation text and the pre-trained language model, the legal clause interpretation text is reconstructed, including: inputting the legal clause interpretation text into the pre-trained language model to identify all first legal entities contained in the legal clause interpretation text; and determining the second legal entity based on the question text constructed based on the legal clause interpretation text; aligning the first legal entity with the second legal entity to determine entity pairs in the legal clause interpretation text and the question text that refer to the same thing, wherein the entity pairs include question entities and interpretation entities; and replacing the interpretation entities in the legal clause interpretation text with question entities.

[0036] Optionally, the adjusting the legal clause interpretation text includes at least one of the following:

[0037] Constructing an interpretation quality evaluation function and a first evaluation function; constructing a corresponding question text based on the legal clause interpretation text and generating a plurality of candidate interpretations; determining the score corresponding to each candidate interpretation according to the interpretation quality evaluation function; determining a first objective function according to the first evaluation function, the score corresponding to each candidate interpretation and the interpretation quality evaluation function; iterating the first objective function, and when it is determined that the solution of the first objective function satisfies the set solution, using the corresponding candidate interpretation as an interpretable legal clause interpretation text;

[0038] Construct an interpretation quality evaluation function and a second evaluation function; construct a corresponding question text based on the legal clause interpretation text, and generate multiple candidate interpretations; determine the score corresponding to each candidate interpretation according to the interpretation quality evaluation function; determine the second objective function according to the second evaluation function, the score corresponding to each candidate interpretation and the first objective function; iterate the second objective function, and when it is determined that the solution of the second objective function satisfies the set solution, add the corresponding candidate interpretation to the legal clause interpretation text to reconstruct the legal clause interpretation text.

[0039] Accordingly, the disclosed embodiment also provides a graph knowledge enhanced interpretation generation system for legal documents, including:

[0040] A construction unit is configured to construct a semantic association network based on a knowledge graph of a legal document, wherein the semantic association network is used to represent the connection between legal concepts and legal clauses in the legal document;

[0041] A processing unit is configured to map the legal clause to be interpreted to a corresponding node in the semantic association network, and obtain semantic information of the legal clause to be interpreted; and adjust the interpretation text of the legal clause;

[0042] A generating unit, configured to generate a legal clause interpretation text according to the semantic information of the legal clause to be interpreted;

[0043] Wherein, the adjustment of the interpretation text of the legal terms includes at least one of the following:

[0044] The generation process of the interpretation text of the legal clause is traced back to form a reasoning chain including clause-concept-interpretation; the reasoning chain is matched with the interpretation text of the legal clause, and according to the matching operation result, the concept corresponding to the reasoning chain is marked in the legal knowledge map to form an interpretable interpretation text of the legal clause;

[0045] Perform structural analysis on the legal clause interpretation text, and determine the score of the legal clause interpretation text according to a preset evaluation model; when it is determined that the score of the legal clause interpretation text is lower than the set score, reconstruct the legal clause interpretation text.

[0046] Compared with the prior art, the technical solution of the embodiment of the present disclosure has the following advantages:

[0047] The graph knowledge enhanced interpretation generation method for legal documents provided by the embodiment of the present disclosure can construct a semantic association network based on the knowledge graph of the legal document, and then after obtaining the legal clauses to be interpreted, the legal clauses to be interpreted can be mapped to the corresponding nodes in the semantic association network, and the semantic information of the legal clauses to be interpreted can be obtained, so that the interpretation text of the legal clauses can be generated according to the semantic information of the legal clauses to be interpreted. Since the semantic association network can be used to characterize the connection between legal concepts and legal clauses in legal documents, in the process of generating the interpretation text of the legal clauses according to the semantic information of the legal clauses to be interpreted, the internal connection between legal concepts and legal clauses can be considered, thereby improving the accuracy of the interpretation of the legal document. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments of the present disclosure or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 A flowchart of a graph knowledge enhanced interpretation generation method for legal documents in some embodiments of the present disclosure is shown;

[0050] Figure 2 A flowchart of constructing a semantic association network in an embodiment of the present disclosure is shown;

[0051] Figure 3 A flowchart of obtaining semantic information of a legal clause to be interpreted in an embodiment of the present disclosure is shown;

[0052] Figure 4 A flow chart showing a method for generating a legal clause interpretation text in an embodiment of the present disclosure is shown;

[0053] Figure 5 A flowchart showing another method for generating a legal clause interpretation text in an embodiment of the present disclosure is shown;

[0054] Figure 6 A flowchart of forming an interpretable legal clause interpretation text in an embodiment of the present disclosure is shown;

[0055] Figure 7 A flowchart of reconstructing a legal clause interpretation text in an embodiment of the present disclosure is shown;

[0056] Figure 8 A schematic diagram of the structure of a graph knowledge enhanced interpretation generation system for legal documents in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0057] As described in the background technology, existing legal document interpretation technologies are difficult to provide personalized explanations for specific contexts, and the resulting interpretations of legal documents are inconsistent with the actual meanings.

[0058] In order to solve the above technical problems, the embodiments of the present disclosure provide a graph knowledge enhanced interpretation generation method for legal documents, including: constructing a semantic association network based on the knowledge graph of the legal document, wherein the semantic association network is used to characterize the relationship between legal concepts and legal clauses in the legal document; mapping the legal clauses to be interpreted to corresponding nodes in the semantic association network, and obtaining the semantic information of the legal clauses to be interpreted; and generating a legal clause interpretation text according to the semantic information of the legal clauses to be interpreted.

[0059] By adopting the above interpretation generation method, since the semantic association network can be used to represent the relationship between legal concepts and legal clauses in legal documents, in the process of generating the interpretation text of legal clauses according to the semantic information of the legal clauses to be interpreted, the internal relationship between legal concepts and legal clauses can be considered, thereby improving the accuracy of the interpretation of legal documents.

[0060] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention is described below with reference to the accompanying drawings.

[0061] See also Figure 1 A flowchart of a graph knowledge enhanced interpretation generation method for legal documents in an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the following steps can be performed:

[0062] S11, constructs a semantic association network based on the knowledge graph of legal documents.

[0063] Among them, knowledge graph refers to a graphical data model used to store and represent knowledge. The knowledge graph consists of entities, relationships, and attributes, and is used to simulate human knowledge representation and reasoning methods.

[0064] Specifically, the knowledge graph of legal documents includes the knowledge representation and reasoning methods of legal documents. Therefore, the semantic association network constructed based on the knowledge graph of legal documents can better reflect the internal connection of legal elements at all levels, so that the subsequent interpretation process can be based on a global perspective, fully understand the semantics of the clauses, and produce explanations that conform to legal logic.

[0065] In some examples, semantic association networks can be used to characterize the connections between legal concepts and legal clauses in legal documents.

[0066] S12, mapping the legal clause to be interpreted to the corresponding node in the semantic association network, and obtaining the semantic information of the legal clause to be interpreted.

[0067] Specifically, the semantic vector contains the deep semantic information of the legal clauses. By mapping the legal clauses to the semantic association network, it is possible to extract rich contextual information of the legal clauses within a certain range, so that the subsequent interpretation process can be based on a broader semantic space, deeply understand the legal logical connections behind the terms and sentences, and thus produce high-quality interpretations covering the conceptual connotation, conceptual extension, and legal basis.

[0068] At the same time, closely integrating interpretation generation with knowledge graphs can also improve the interpretability and traceability of interpretation results, providing users with transparent and reliable legal interpretation services.

[0069] S13, generating a legal clause interpretation text according to the semantic information of the legal clause to be interpreted.

[0070] Specifically, the contextual information expanded from the knowledge graph of legal documents can provide richer background semantics for legal clauses, enhance the professionalism and comprehensiveness of the interpretation, and thus improve the accuracy of the interpretation of legal documents.

[0071] In short, the disclosed embodiments use graph knowledge enhancement technology to construct a semantic association network for characterizing the connection between legal concepts and legal clauses in legal documents. When generating interpretations, not only the semantics of the clauses themselves are considered, but also the relevance of the clauses under the entire legal framework is captured with the help of the semantic relationships in the graph, and the inherent graph structure information of the legal document is fully mined. This can improve the accuracy of the interpretation of legal documents, thereby providing relevant users with more comprehensive, systematic and legally logical interpretation services in scenarios such as legal consultation and judicial interpretation.

[0072] In some embodiments of the present disclosure, the core of constructing a semantic association network of legal documents lies in extracting legal knowledge elements, mining the semantic relationships between elements, and forming a global association perspective.

[0073] For some examples, see Figure 2 The flowchart of constructing a semantic association network in the embodiment of the present disclosure shown in the figure mainly implements the following steps:

[0074] S21, obtaining a legal concept entity from the legal document.

[0075] Specifically, legal concept entities can be obtained from legal documents in multiple dimensions.

[0076] In some examples, a legal concept entity may include at least one of the following:

[0077] Legal subject entities, such as natural persons, legal persons, and unincorporated organizations, are the parties involved in legal relations. Named entity recognition technology (such as the BiLSTM-CRF model) can be used to extract various types of legal subject entities from legal texts.

[0078] Legal object entities, such as subject matter, intellectual property rights, debts, etc., are the objects of legal relations. Among them, techniques such as part-of-speech analysis and dependency analysis can be used to identify relevant noun phrases as candidates, and legal object entities can be screened out from the candidates.

[0079] Legal fact entities, such as breach of contract, criminal behavior, etc., are triggering conditions for legal consequences. Among them, fact description fragments can be extracted from legal documents through template matching, rule matching, etc.

[0080] Legal consequence entities, such as civil liability, criminal liability, administrative liability, etc., are sanctions inferred from legal facts. Among them, predicate analysis technology can be used to identify predicate structures centered on "should", "must", "undertake", etc. as legal consequence entities.

[0081] S22, determining the multiple semantic relationships between the entities in the legal concept entity, and between the entities and the legal clauses.

[0082] Specifically, after obtaining various types of legal entities, these legal entities often have associations. By analyzing these legal entities, multiple semantic relationships can be determined.

[0083] In some examples, a polynomial semantic relationship may include at least one of the following:

[0084] Hyponym-hypernym relationship, for example, "sales contract" is a subordinate concept of "contract". Among them, the hyponym-hypernym relationship classifier trained by the legal corpus can be used to determine whether the concept-legal entity pair constitutes a hyponym-hypernym relationship.

[0085] Causal relationship, such as "breach of contract" is the cause of "breach of contract liability", where the causal relationship extraction model (such as PA-LSTM) can be used to extract the causal relationship between concept entity pairs from the legal text.

[0086] Sequential relationships, such as "conclude a contract" precedes "perform a contract" in time sequence. Among them, the temporal relationship of legal fact entities can be annotated through a sequence annotation model (such as conditional random field CRF).

[0087] Inclusion relationship, for example, "sales contract" contains "delivery" and "payment". Dependency analysis and semantic role labeling technology can be used to analyze the argument structure between legal fact entities and determine the inclusion relationship.

[0088] S23, constructing the semantic association network according to the multiple semantic relationships contained in each entity in the legal concept entity, between each entity, and between each entity and the legal terms.

[0089] Specifically, a semantic association network can be constructed with each entity in the legal concept entity as a node and multiple semantic relationships as edges.

[0090] As an example, it specifically includes: using the extracted entities as nodes and the semantic relationships mined between entities as edges to form a heterogeneous knowledge graph in the legal field with multiple relationship types; using text embedding technology (such as Doc2Vec) to embed the text descriptions of legal clauses and legal concepts into a low-dimensional semantic space; finally, comprehensively considering the content information and structural information of legal documents, constructing a global semantic association network to provide a basis for subsequent interpretation tasks.

[0091] To facilitate understanding, a contract law clause is taken as an example to intuitively demonstrate the process of constructing a semantic association network.

[0092] Sample clause: The seller shall deliver the subject matter within the agreed period. If the seller violates the agreement, the buyer may require it to bear the liability for breach of contract.

[0093] Concept entity extraction: Identify core legal concepts such as "seller", "buyer", "subject matter", and "liability for breach of contract".

[0094] Relationship mining: Obtain the sequential relationship of "seller-delivery-subject matter", and the causal relationship of "seller breaches the agreement-assumes-liability for breach of contract", etc.

[0095] Semantic network construction: conceptual entities are used as nodes, semantic relations are used as edges, and text embedding information is integrated to form a closely related directed graph structure.

[0096] In short, this step extracts legal concept entities and explores semantic relationships such as concept-concept and concept-clause to form a semantic association network with legal clauses as nodes and semantic relationships as edges. This allows the internal connections of legal elements to be described from the perspective of vocabulary, phrases, sentences, and chapters, so that subsequent interpretation work can be based on a global perspective, fully understand the semantics of the clauses, and produce explanations that conform to legal logic.

[0097] For example, when explaining the concept of "liability for breach of contract", it is not limited to the surface information of the text, but can also capture the deep semantic connections such as its premise requirements (breach of contract), subject (seller), specific measures (continued performance, compensation for losses), and dig out richer and more systematic interpretation information.

[0098] Therefore, after the above steps, a semantic association network can be constructed, so that when any legal clause to be interpreted is obtained, the semantic information of the legal clause to be interpreted can be obtained based on the semantic association network.

[0099] See also Figure 3 The flowchart of obtaining semantic information of a legal clause to be interpreted in the embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the following steps can be performed:

[0100] S31, extracting keyword features of the legal clause to be interpreted.

[0101] Specifically, keyword features can better represent the meaning of the legal clauses to be interpreted. By extracting the keyword features of the legal clauses to be interpreted, it is helpful to subsequently determine the semantic information of the legal clauses to be interpreted.

[0102] S32, determining the semantic similarity between the keyword feature and the legal concept node in the semantic association network, and generating a plurality of candidate mapping nodes.

[0103] Specifically, word vector technology (such as Word2Vec) can be used to calculate the semantic similarity between keyword features and legal concept nodes, and then multiple candidate mapping nodes can be obtained.

[0104] S33, determining the co-occurrence frequency of the keyword feature and the legal concept corresponding to the legal concept node in the legal corpus.

[0105] Among them, co-occurrence frequency refers to the number of times two or more words appear at the same time in a text or corpus.

[0106] By determining the co-occurrence frequency of the keyword features and the legal concepts corresponding to the legal concept nodes in the legal corpus, the matching degree between the keyword features and the legal concept nodes can be determined.

[0107] In some examples, the candidate mapping nodes may be ranked according to the co-occurrence frequency of the keyword features and the legal concepts corresponding to the legal concept nodes in the legal corpus.

[0108] For example, the higher the co-occurrence frequency, the higher the candidate mapping node is ranked.

[0109] S34, based on the semantic similarity and the co-occurrence frequency, selecting a mapping node from a plurality of candidate mapping nodes as the node where the legal clause is located in the semantic association network.

[0110] In some examples, the legal concept node with the highest semantic similarity and the greatest co-occurrence frequency is selected as the mapping node of the legal clause to be interpreted in the semantic association network.

[0111] As an example, for steps S31 to S34, assume that the legal clause to be interpreted is: If a party fails to perform its contractual obligations or performs its contractual obligations inconsistent with the agreement, it shall bear the liability for breach of contract such as continuing to perform, taking remedial measures or compensating for losses.

[0112] Extracted keyword features: parties, non-performance, contractual obligations, and liability for breach of contract.

[0113] Through semantic similarity calculation and co-occurrence analysis, the legal clause to be interpreted is mapped to the "breach of contract liability" node in the semantic network.

[0114] S35, taking the mapping node of the legal clause to be interpreted in the semantic association network as the target node, obtaining the context nodes within a preset range with respect to the target node, and the semantic relations corresponding to the mapping nodes, as the semantic information of the legal clause to be interpreted.

[0115] Specifically, when interpreting a legal provision to be interpreted, in addition to considering the legal provision itself, one can also take into account the contextual statements to improve the accuracy of the interpretation.

[0116] In an example, the following steps may be performed:

[0117] With the target node as the center, define a node range that is reachable in N steps, and the shortest path between these nodes and the target node in the semantic network is ≤N, where the N value can be set according to the field characteristics of the legal concept and practical experience; through a graph traversal algorithm (such as breadth-first search), with the target node as the starting point, extract all nodes within the N-hop range of the target node as its context nodes; extract various semantic relationships between the target node and the context nodes (such as hierarchical relationships, causal relationships, sequential relationships, etc.) to describe the conceptual semantic environment; finally, the text description and semantic relationship of the context node are structured as an extended feature of the target node to obtain the semantic information of the legal clause to be interpreted.

[0118] In a specific embodiment, the "default liability" node is used as the target node, and the value of N is 2.

[0119] Perform a 2-hop traversal on the semantic association network to obtain contextual concept nodes, such as "reason for breach of contract", "breaching party", "liquidated damages", "continue to perform", and "compensation for losses".

[0120] Through semantic relationship mining, it is found that "cause of breach of contract" is the premise of "liability for breach of contract", "breaching party" is the subject of "liability for breach of contract", and "liability for breach of contract" includes "continued performance" and "compensation for losses".

[0121] The textual semantics and structural semantics of nodes are integrated to expand the feature representation of the "breach of contract liability" node so that it covers more comprehensive conceptual connotation and extension information.

[0122] Therefore, by embedding the legal clauses to be interpreted into the semantic association network and extracting rich contextual information within a certain range, the semantic information dimension of the legal clauses to be interpreted can be enriched, so that the subsequent interpretation process can be based on a broader semantic space and deeply understand the legal logical associations behind the terms and sentences, thereby generating high-quality interpretations covering conceptual connotations, conceptual extensions, and legal basis.

[0123] When the semantic information of the legal clause to be interpreted is determined, a legal clause interpretation text can be generated.

[0124] See also Figure 4 The flowchart of a method for generating a legal clause interpretation text in an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the following steps can be performed:

[0125] S41, generating a joint semantic vector between the legal clause to be interpreted and the semantic information of the legal clause.

[0126] In one example, the step of generating a joint semantic vector includes: S411, segmenting and transforming the legal terms to be interpreted to generate a corresponding word embedding vector sequence; S412, encoding the semantic information of the legal terms to form a semantic tensor; S413, determining the correlation weight between each word in the word embedding vector sequence and the semantic tensor, and selecting a semantic tensor whose correlation weight is greater than a set weight; S414, fusing the word embedding vector sequence and the selected semantic tensor to form a joint semantic vector.

[0127] In a specific embodiment, assume that a legal clause is to be interpreted: If a party fails to perform its contractual obligations or performs its contractual obligations inconsistent with the agreement, it shall bear the liability for breach of contract such as continuing to perform, taking remedial measures or compensating for losses.

[0128] The context nodes of "reason for breach of contract", "defaulting party" and their relationships are embedded into the semantic tensor space; and the legal clauses to be interpreted are converted into word vector sequences to extract local semantic information.

[0129] The attention mechanism is used to calculate the relevance between the legal terms to be interpreted and the context nodes, such as the high correlation between "non-performance" and "reason for breach of contract".

[0130] The word embedding vector sequence and the weight-modulated semantic tensor are fused to generate the graph knowledge enhanced semantic vector of the legal clause to be interpreted.

[0131] S42, inputting the joint semantic vector and the legal clause to be interpreted into a preset text processing model to generate the legal clause interpretation text.

[0132] In one example, the step of generating the interpretation text of the legal terms includes: S421, inputting the joint semantic vector and the legal terms to be interpreted into the text processing model to generate multiple candidate text sequences; S422, scoring and sorting the multiple candidate text sequences to screen out the target text sequence; and splicing the target text sequences to generate the interpretation text of the legal terms.

[0133] Specifically, a text processing model pre-trained on a large-scale legal corpus (such as GPT, BERT and other transformer series models) is used to obtain the long-distance dependencies and deep semantics of the legal language; the joint semantic vector generated in step S41 is used as an additional feature input and input into the text processing model together with the legal clause to be interpreted; then based on interpretation decoding technology (such as top-k sampling, beam search), a candidate text sequence of the legal clause to be interpreted is obtained; based on the fusion of semantic similarity, logical consistency, readability and other indicators, the candidate text sequences are scored and ranked to screen out the optimal interpretation results, and the interpretation text of the legal clause is generated through splicing operations, that is, the graph knowledge is fully utilized to guide the interpretation generation.

[0134] In a specific embodiment, the graph knowledge enhanced semantic vector of "If a party fails to perform its contractual obligations or performs its contractual obligations inconsistent with the agreement, it shall bear the liability for breach of contract such as continuing to perform, taking remedial measures or compensating for losses" is input into the text processing model.

[0135] The text processing model uses graph knowledge enhanced semantic vectors as context information, combined with the original text of the legal clause to be interpreted, and begins to iteratively generate interpretation text.

[0136] During the decoding stage, legal knowledge guidance is incorporated, and interpretation fragments containing contextual concepts are output first, such as the sentence "One party's failure to perform its contractual obligations constitutes a breach of contract, and the breaching party shall bear the corresponding liability for breach of contract."

[0137] Afterwards, the candidate interpretations are evaluated for quality and a high-quality interpretation is output that covers the elements of breach of contract, the subject of breach, and the content of liability for breach of contract: "During the performance of the contract, if one party fails to perform its obligations in accordance with the contract, such as delayed delivery of goods, quality of goods not meeting the requirements, etc., it constitutes a breach of contract. The breaching party shall bear the liability for breach of contract such as continuing to perform, taking remedial measures or compensating the party for losses. The injured party has the right to request the court to order the breaching party to bear the corresponding civil liability", thus completing the interpretation process.

[0138] Therefore, based on the above method, by combining the knowledge graph with the large language model, the generated interpretation not only conforms to the norms of natural language text, but also adds the guidance of legal field knowledge. Among them, the contextual information expanded from the graph nodes provides richer background semantics for the interpretation of the clauses, such as incorporating the composition of breach of contract, the effect of breach of contract, etc., thereby enhancing the professionalism and comprehensiveness of the interpretation.

[0139] At the same time, incorporating contextual semantic tensors into the interpretation decoding process makes the interpretation text of legal clauses more in line with the specific context of the clauses, improves the pertinence and accuracy of the interpretation, and thus greatly improves the quality and intelligent generation level of the interpretation of legal clauses.

[0140] In some embodiments of the present disclosure, see Figure 5 FIG. 1 is a flowchart of another method for generating a legal clause interpretation text in an embodiment of the present disclosure, as shown in FIG. Figure 5 As shown, you can perform the following steps

[0141] S51, dividing the knowledge graph of the legal document into multiple sub-graphs; wherein one sub-graph corresponds to one legal concept.

[0142] Specifically, by dividing the knowledge graph of legal documents into multiple sub-graphs, we can adopt a "divide and conquer" strategy, first processing each legal concept and then reconstructing the interpretation text of the legal clauses. This not only reduces the amount of calculation, but also takes into account the integrity of the interpretation text.

[0143] In some examples, the step of dividing the knowledge graph of a legal document into multiple sub-graphs includes: S511, identifying key legal concepts from the knowledge graph of the legal document; S512, based on the key legal concepts, selecting legal concept entities and multi-semantic relationships related to the key legal concepts, and generating a sub-graph that at least includes the key legal concepts.

[0144] In a specific embodiment, taking the contract law knowledge graph as an example, the following steps can be performed:

[0145] Analyze the contract law knowledge graph and identify key legal concepts, such as "contract entry into force", "contract termination" and "liability for breach of contract", etc.; center on key legal concepts, extract entities and relationships directly related to key legal concepts, and form a knowledge subgraph focusing on the concept. For example, the "liability for breach of contract" subgraph contains concepts such as "liquidated damages" and "actual losses", and relationships such as "breach of contract leads to liability for breach of contract" and "liability for breach of contract includes payment of liquidated damages". Traverse the contract law knowledge graph and extract a series of legal knowledge subgraphs with moderate granularity and relatively independent content through the above method to form a set of retrieval units.

[0146] In an optional example, for each sub-graph, the importance and universality of the knowledge within it are further analyzed. For example, general knowledge such as "liability for breach of contract includes continued performance" can be retained in the sub-graph; overly detailed knowledge such as "common grounds for breach of contract in electrical industry contracts" can be removed to control the size of the sub-graph.

[0147] It should be noted that the granularity of sub-graph division can be flexibly set according to the importance and universality of the concept.

[0148] S52, respectively establish a search engine corresponding to each sub-graph to generate multiple search engine sets, each search engine set is used to represent the semantic association between the legal document and each sub-graph.

[0149] Specifically, by constructing search engines corresponding to each sub-graph, we can achieve "divide and conquer" between search engines, so that the search engine set can better understand the semantic relationship between legal documents and each sub-graph.

[0150] In one example, generating multiple retriever sets includes: S521, constructing training samples based on the legal document corpus corresponding to each sub-graph; S522, using the training samples of each sub-graph to train the corresponding retriever, and taking the trained retriever and the corresponding sub-graph as a retriever set; S523, determining the confidence of each retriever set based on the training samples, and adjusting the parameters of the retrievers in the retriever set with lower confidence, so that the confidence of each retriever set tends to be consistent.

[0151] In a specific embodiment, for the sub-spectrum of "liability for breach of contract", the positive samples are legal questions involving the concept of "liability for breach of contract" and their corresponding knowledge triples, such as "Question: If the lessor in a lease contract delays the delivery of the house for one month, how can the lessee assert his rights?", then the positive sample is "the defaulting party (lessor) - needs to bear - liability for breach of contract"; the negative samples are legal questions unrelated to "liability for breach of contract", such as "how to deal with ambiguity in the interpretation of the contract".

[0152] The BERT model is pre-trained on a large-scale legal document corpus to learn legal language knowledge. Then BERT is fine-tuned on the retriever training sample of "breach of contract liability" so that it can judge the relevance between the question and the "breach of contract liability" sub-graph. In particular, the contrast learning objective is introduced during fine-tuning to increase the distance between positive samples and negative samples in the semantic space.

[0153] Optionally, the model performance is evaluated on the "default liability" retriever test set. If it does not meet the standard, the characteristics of the error samples are analyzed, and the training sample construction strategy is adjusted, such as adding positive samples covering more language variants, and repeating the training until an "expert" retriever with excellent performance for "default liability" is obtained.

[0154] At the same time, the same process is used to train search engines for other sub-graphs, such as the "contract effectiveness" search engine, the "contract effectiveness" search engine, the "contract termination" search engine, etc., so that each search engine focuses on its corresponding sub-graph, forming a "division and conquest" of knowledge retrieval.

[0155] Next, each searcher and the sub-graph corresponding to each searcher are organized into a searcher set, so as to evaluate the relevance confidence distribution given by different searchers on the question library in the field of contract law.

[0156] For example, we observe that the confidence of the “liability for breach of contract” searcher is generally high, while the confidence of the “contract termination” searcher is generally low, indicating that the two have inconsistent judgment criteria for relevance. At this time, we can use knowledge distillation technology to let the searcher with biased confidence scores learn from the searcher with accurate scores.

[0157] Specifically, the output logits of the "liability for breach of contract" retriever and other search engines are used as soft labels, and the KL divergence loss is introduced to guide the training of the "contract termination" retriever, so that the output distribution of the "contract termination" retriever is close to the "liability for breach of contract" retriever. Therefore, through the above tuning, the confidence scoring scales of different retrievers tend to be consistent, forming a synergistic and complementary retriever set, so that the output of the set comprehensively considers the knowledge relevance of different legal sub-fields.

[0158] Therefore, through steps S51 and S52, we first start from the legal knowledge graph and extract independent knowledge sub-graphs centered on key concepts as retrieval units. Then, for each sub-graph, a retriever with strong semantic matching capabilities is trained to be responsible for the knowledge retrieval task in this sub-field. Finally, the confidence consistency between different retrievers is optimized through techniques such as knowledge distillation, so that they can collaboratively retrieve the most relevant legal knowledge and provide explainable and high-quality knowledge support for subsequent question interpretation.

[0159] S53, generating a graph knowledge enhanced representation according to the semantic information of the legal clause to be interpreted and a plurality of searcher sets.

[0160] In one example, generating a graph knowledge enhanced representation includes: S531, constructing a legal question based on the semantic information of the legal clause to be interpreted; S532, extracting key information elements in the legal question to generate a structured legal question; S533, inputting the structured legal question into each retriever set respectively, and obtaining the confidence of each retriever set, and selecting a retriever set with a confidence greater than a set confidence to form a knowledge retrieval result set; S534, generating a knowledge enhanced semantic vector of the structured legal question through the knowledge retrieval result set; S535 fusing the knowledge enhanced semantic vector of the structured legal question with the original semantic vector of the structured legal question to form a graph knowledge enhanced representation of the structured legal question.

[0161] In a specific example, it specifically includes: constructing a legal question Q for the input semantic information of the legal clause to be interpreted, and extracting key information elements in the legal question Q, such as the legal subjects involved, legal facts, legal consequences, etc., to form a structured representation Q'.

[0162] Q' is input into each retriever set, and each retriever retrieves its corresponding legal sub-image respectively to obtain the most relevant N concept nodes and their confidences, which are summarized to form the knowledge retrieval result set K of Q'.

[0163] Using the concept nodes in the knowledge retrieval result set K, the knowledge-enhanced semantic vector of Q' is generated through knowledge graph representation learning technology (such as TransE), and then the knowledge-enhanced semantic vector of Q' is fused with the original semantic vector of Q' to form a graph knowledge-enhanced representation of Q'.

[0164] To facilitate understanding, let’s take the legal question Q as an example: “In a lease contract, if the lessor delays the delivery of the house for one month, how can the lessee assert his rights?”

[0165] The named entity recognition model is used to extract the legal entities in the legal question Q: lessor and lessee.

[0166] Use the keyword extraction model to identify the legal facts in the legal question Q: The house was delayed in delivery for one month.

[0167] Using the intention recognition model, it is determined that the legal question Q is asking about the lessee’s asserted rights, that is, the legal consequences.

[0168] The extracted structured information is organized into a structured representation Q' of the legal question Q: <Subject: Lessor, Tenant><Fact: Delay in delivering the house for one month><Intention: Consult the Tenant to assert his rights>.

[0169] Input Q' into each searcher set and activate the searchers such as "liability for breach of contract" and "housing lease contract". Among them, in the sub-graph of "liability for breach of contract", the searcher recognizes that "delayed delivery" in Q' corresponds to the ontological concept "delayed performance" with a confidence of 0.9; "claiming rights" corresponds to the concept "relief for breach of contract" with a confidence of 0.8; in the sub-graph of "housing lease contract", the searcher recognizes that "housing" in Q' corresponds to the ontological concept "rented property" with a confidence of 0.95.

[0170] Based on the comprehensive relevance confidence, the top 3 concept nodes with confidence are selected from the two sub-graphs: delayed performance (0.9), leased property (0.95), and breach of contract remedies (0.8), forming the knowledge retrieval result set K for question Q'.

[0171] Next, the knowledge representation learning model TransE is pre-trained on the legal knowledge graph to learn the low-dimensional vector representation of each ontology concept, so that semantically similar concepts are closer in the vector space; and the concept nodes "delayed performance", "lease", and "relief for breach of contract" in the knowledge retrieval result set K are mapped to TransE to obtain representation vectors V1, V2, and V3, and the weighted average V of the vectors is calculated to obtain the vector representation V that integrates the semantic information of the concepts:

[0172] V=(0.9*V1+0.95*V2+0.8*V3) / (0.9+0.95+0.8)

[0173] Determine the original semantic vector U of the legal question Q. For example, a word vector model in the legal field (such as Law2Vec) can be used to determine the original semantic vector U.

[0174] Finally, the weighted sum W = a*U + b*V of the original semantic vector U and the vector weighted average V is taken as the graph knowledge enhanced semantic vector of Q', where a and b are the fusion ratio coefficients.

[0175] S54, generating the legal clause interpretation text based on the graph knowledge enhanced representation.

[0176] Among them, the step of generating the interpretation text of the legal terms may include: S541, taking the semantic vector of the graph knowledge enhanced representation as input, and the concept nodes and tuples in the knowledge retrieval result set as input text sequences; S542, inputting the semantic vector of the knowledge enhanced representation and the input text sequence into the decoder to generate the interpretation text of the legal terms.

[0177] In a specific embodiment, the graph knowledge enhanced semantic vector W of Q' is used as the input Query, and the text sequence consisting of the concept nodes and triples (subject, predicate, object) in the knowledge retrieval result set K is used as the input Key-Value sequence. W and K are fused at the same time to form a knowledge-aware hidden layer representation H; H is input into the decoder (wherein the decoder can be generated by a model such as GPT pre-trained with large-scale legal document corpus), so as to autoregressively generate an interpretation text sequence Z: "According to Article 162 of the Contract Law, in a house lease contract, the lessor shall deliver the leased house to the lessee at the agreed time. In this case, the lessor delayed delivery for one month, constituting a breach of contract. The lessee may claim to continue to perform or terminate the contract and claim damages."

[0178] In some examples, in order to facilitate users to interpret the interpretation reasoning process, conceptual phrases corresponding to graph knowledge nodes can be marked in the interpretation text sequence Z, such as "delayed delivery" -> "delayed fulfillment", to form an interpretation text rich in structural knowledge information.

[0179] Therefore, by conducting a structured analysis of the question, the key legal elements can be extracted, and then the searcher can be used to retrieve the concept nodes in the legal knowledge graph that are highly relevant to the question. Then, through knowledge learning, the retrieved structured knowledge can be integrated into the semantic representation of the question, and the enhanced representation that integrates the original semantics of the question and the semantics of the graph structure can be input into the pre-trained legal field GPT-4 model to generate knowledge-aware question interpretation text. Therefore, by starting from semantic understanding, knowledge retrieval, semantic fusion, text generation and other links, rich structured knowledge can be injected into the legal big model, which can generate more reliable, explainable, and legally logical interpretation responses.

[0180] In some examples, the parameters of the retriever can also be dynamically adjusted according to the paraphrase text sequence Z.

[0181] For example, evaluate the knowledge relevance, semantic rationality, logical consistency and other quality indicators of the paraphrase text sequence Z. For low-quality paraphrases, analyze their error types, such as incomplete knowledge, redundant knowledge, concept shift, etc., to determine which retriever made the mistake, and then fine-tune the retriever with the wrong paraphrase using new positive and negative samples, and adjust the relevant parameters of the retriever; at the same time, update the confidence calibration parameters of different retriever outputs.

[0182] Finally, the optimized retriever is reincorporated into the retriever collection to continuously improve the breadth, accuracy, and confidence discrimination of the knowledge retrieval of the retriever collection.

[0183] In summary, this solution can adaptively retrieve knowledge concepts that are highly relevant to the question from the massive legal knowledge graph, and integrate them into the pre-trained large language model to form graph knowledge-aware interpretation generation. In this process, the multi-granular, modular searcher can model the knowledge of different legal sub-fields in a fine-grained manner, reducing the retrieval uncertainty caused by factors such as incomplete knowledge coverage and field differences.

[0184] At the same time, dynamic tuning can also continuously improve the results of knowledge retrieval and interpretation generation, continuously learn from user feedback, and adaptively expand and refine retrieval knowledge sources.

[0185] In the above example, a legal clause interpretation text can be generated, and in order to improve the interpretability and readability of the legal clause interpretation text, the legal clause interpretation text can be adjusted.

[0186] In some embodiments of the present disclosure, adjusting the legal clause interpretation text may include: forming an interpretable legal clause interpretation text and reconstructing at least one of the legal clause interpretation text.

[0187] In one example, see Figure 6 A flowchart of forming an interpretable legal clause interpretation text in an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the following steps can be performed:

[0188] S61, trace back the generation process of the interpretation text of the legal clause to form a reasoning chain including clause-concept-interpretation.

[0189] Specifically, graph visualization technology can be used to visualize the key graph nodes used to generate interpretations and the relationships between nodes, intuitively showing the reasoning basis of the interpretations. The interpretation generation process can then be traced back, and the key intermediate states can be extracted as interpretation reasoning steps, forming a clause-concept-interpretation reasoning chain.

[0190] S62, matching the reasoning chain with the legal clause interpretation text, and marking the concepts corresponding to the reasoning chain in the legal knowledge graph according to the matching operation result to form an interpretable legal clause interpretation text.

[0191] That is, by constructing the reasoning chain of clause-concept-interpretation, the reasoning logic and conceptual basis of interpretation generation can be clearly revealed.

[0192] In a specific embodiment, assume that the legal text to be interpreted is: "The seller shall deliver the subject matter within the agreed period. If the seller violates the agreement, the buyer may require it to bear the liability for breach of contract." The interpretation text is "In the sales contract relationship, the seller has the obligation to deliver the subject matter on time. If the seller fails to complete the delivery within the agreed period, it constitutes a breach of contract, and the buyer has the right to require it to bear the liability for breach of contract, including continuing to perform, compensating for losses, etc."

[0193] Key node visualization: highlight key concept nodes such as "seller", "delivery", "liability for breach of contract" and the semantic connections between key concept nodes.

[0194] Reasoning chain construction: forming the reasoning chain of "seller-delivery obligation-breach of agreement-liability for breach of contract".

[0195] The explanation of the cause is generated: "The seller has the obligation to deliver" because of the "sales contract relationship", "failure to deliver as agreed" leads to "breach of contract", and "breach of contract" causes "liability for breach of contract".

[0196] Interpretation basis annotation: It is noted in the interpretation that the "delivery obligation" originates from the content of the sales contract, and the basis of the "liability for breach of contract" is the relevant provisions of the Contract Law.

[0197] In one example, see Figure 7 A flowchart of reconstructing the interpretation text of legal terms in an embodiment of the present disclosure is shown in FIG. Figure 7 As shown, the following steps can be performed:

[0198] S71, performing a structural analysis on the legal clause interpretation text, and determining the score of the legal clause interpretation text according to a preset evaluation model.

[0199] S72, when it is determined that the score of the legal clause interpretation text is lower than the set score, reconstruct the legal clause interpretation text.

[0200] Specifically, the greater the score of the legal clause interpretation text, the more accurate and readable the legal clause interpretation text is. Therefore, when it is determined that the score of the legal clause interpretation text is lower than the set score, text optimization techniques such as text simplification, synonym replacement, and word order adjustment are used to reconstruct the legal clause interpretation text to improve the readability and understanding of the interpretation expression.

[0201] It is understandable that in the process of reconstructing the interpretation text of legal terms, users are allowed to make modification suggestions to the interpretation text, and the feedback information is added to the iterative optimization process of the interpretation to improve the acceptability of the interpretation.

[0202] Therefore, the readability dimension enhances the fluency and comprehensibility of the interpretation text of legal clauses through interpretation text analysis, readability scoring, text optimization, human-computer interaction and other means, narrows the distance between ordinary users and legal knowledge, and truly realizes the original intention of "interpretation for the people".

[0203] In a specific embodiment, for example, for texts with obscure terms and complex long sentences, such as "the buyer has the right to require the seller to bear the liability for breach of contract, including continuing to perform and compensating for losses", the interpretation text can be optimized in a targeted manner, using more easy-to-understand expressions, such as "the buyer can require the seller to complete the delivery and compensate for the losses caused thereby", and then generate a modified interpretation text.

[0204] Optionally, the user further proposes adjustments, ultimately forming a more readable interpretation: "If the seller fails to deliver the goods to the buyer within the agreed time, it constitutes a breach of contract. The buyer can require the seller to deliver the goods as agreed and compensate the buyer for any losses caused."

[0205] In some embodiments, other methods may be used to adjust the legal terms interpretation text.

[0206] For example, constructing a legal entity tracking dataset includes: defining entity types of the legal clause interpretation text; annotating the entity types; aligning entity annotations pointing to the same thing in different sentences in the legal clause interpretation text;

[0207] Generating a pre-trained language model according to the legal entity tracking dataset includes: converting the format of the legal entity tracking dataset to form a coded formal expression; constructing an embedding vector for each parameter in the coded formal expression; concatenating the embedding vector of each parameter with the adjacent text of the legal entity tracking dataset in the legal clause interpretation text to form a code embedding representation of the legal entity; inputting the code embedding representation of the legal entity into a neural network model to generate the pre-trained language model;

[0208] According to the legal clause interpretation text and the pre-trained language model, an interpretable legal clause interpretation text is generated; including: inputting the legal clause interpretation text into the pre-trained language model to identify all first legal entities contained in the legal clause interpretation text; and determining the second legal entity based on the question text constructed based on the legal clause interpretation text; aligning the first legal entity with the determined second legal entity to determine the entity pairs referring to the same thing in the legal clause interpretation text and the question text, wherein the entity pairs include question entities and interpretation entities; for each entity pair, obtaining the neighbor information of each entity pair from the knowledge graph of the legal document, and determining the relationship between each entity in each entity pair; integrating the alignment relationship of each entity pair and the relationship between each entity in each entity pair into the legal clause interpretation text to generate an interpretable legal clause interpretation text.

[0209] And, based on the legal clause interpretation text and the pre-trained language model, reconstructing the legal clause interpretation text, including: inputting the legal clause interpretation text into the pre-trained language model to identify all first legal entities contained in the legal clause interpretation text; and determining the second legal entity based on the question text constructed based on the legal clause interpretation text; aligning the first legal entity with the second legal entity to determine entity pairs in the legal clause interpretation text and the question text that refer to the same thing, wherein the entity pairs include question entities and interpretation entities; and replacing the interpretation entities in the legal clause interpretation text with question entities.

[0210] As a specific example, generating an interpretable legal clause interpretation text includes the following steps:

[0211] Firstly, according to the characteristics of the legal field, key entity types are defined, such as legal subjects, legal concepts, legal facts, legal consequences, etc.; in the large-scale legal document corpus, named entity recognition, term extraction and other technologies are used to identify and type the legal entities in each sentence; at the paragraph level, entity annotations pointing to the same thing in different sentences are aligned through reference resolution, coreference resolution and other technologies to construct a paragraph-level entity chain; then, data enhancement methods such as entity replacement and sentence rewriting are used to expand the scale and diversity of the entity tracking dataset while maintaining the original entity alignment relationship, so as to generate a legal entity tracking dataset.

[0212] Secondly, each legal entity tracking dataset is regarded as a tracking task, and a code representation scheme is designed to convert the legal entity tracking dataset into a formal representation similar to a programming language, such as <legal subject 1>+<legal fact 1>→<legal consequence 1>; referencing the token embedding method in code pre-training, an independent embedding vector is designed for each legal entity type and relationship type in the legal entity tracking dataset, and the embedding vector is concatenated with the token embedding of the context to form a code embedding representation of the legal entity; some entities are randomly masked, and the model is allowed to predict the type and position of the masked entity based on the context. At the same time, an entity alignment task is designed to allow the model to determine whether entities in different sentences refer to the same thing; on the basis of the Transformer structure, entity type embedding, relationship embedding, and the output layer corresponding to the entity tracking task are added, and a multi-task learning framework is adopted to jointly optimize the entity recovery and entity alignment tasks to obtain a pre-trained language model for legal entity perception.

[0213] Furthermore, the legal terms interpretation text is input into the entity-aware language model to identify all the legal entities e1, e2, ..., en contained therein, and the legal entities q1, q2, ..., qk in the legal question are cross-text aligned with the legal entities e1, e2, ..., en to find the entity pairs (qi, ej) representing the same thing.

[0214] Then, for each entity pair (qi, ej), the neighbor information of the corresponding nodes of the knowledge graph qi and ej is extracted, and the relationship between them is explained in natural language, such as ej is a subordinate concept of qi, ej is the legal consequence of qi, etc.

[0215] Finally, the alignment relationship and neighbor relationship interpretation between the question entity qi and the interpretation entity ej are integrated into the interpretation text of the legal terms to form an interpretable interpretation with rich entities and clear relationships.

[0216] As a specific example, reconstructing the interpretation text of legal clauses includes the following steps:

[0217] Ensure that the aligned entity pairs (qi, ej) have consistent reference in the legal terms interpretation text, and use the reference resolution technology to replace all the pronouns, synonyms, etc. of ej in the legal terms interpretation text with qi.

[0218] Optionally, analyze the correlation between each sentence in the legal clause interpretation text and its central entity ej, cut and merge sentences with low correlation, and highlight the main line of interpretation; and count the proportion of different types of entities in the legal clause interpretation text, and supplement key entity types with low frequency of occurrence, such as supplementing relevant breach of contract facts when interpreting breach of contract liability; finally, control the number and density of entities in the legal clause interpretation text to avoid overly dense entities that reduce text readability. At the same time, use page layouts such as entity highlighting and entity sidebar to facilitate users to quickly locate and understand key entities.

[0219] Therefore, code pre-training technology is used to optimize the interpretability and readability of legal question-and-answer interpretations. Through code pre-training for entity tracking, the language model can learn stronger entity perception and cross-sentence entity alignment capabilities. Then, when generating interpretations, through the fusion of entity alignment and entity neighbor information, the interpretations are not only easy to understand in literal expression, but also can be traced back to specific legal facts and legal basis in deep logic, answering the question of "why".

[0220] At the same time, it automatically optimizes the performance of the interpretation text in terms of entity consistency, relevance, richness, readability, etc., to enhance the user's reading experience. This entity-enhanced interpretation optimization technology breaks through the traditional "black box" language model and makes the machine-generated legal text more in line with human understanding and decision-making ideas.

[0221] In some embodiments, other methods may be used to adjust the legal terms interpretation text.

[0222] For example, construct an interpretation quality evaluation function and a first evaluation function; construct a corresponding question text based on the legal clause interpretation text, and generate multiple candidate interpretations; determine the score corresponding to each candidate interpretation according to the interpretation quality evaluation function; determine a first objective function according to the first evaluation function, the score corresponding to each candidate interpretation, and the interpretation quality evaluation function; iterate the first objective function, and when it is determined that the solution of the first objective function satisfies the set solution, use the corresponding candidate interpretation as an interpretable legal clause interpretation text;

[0223] Construct an interpretation quality evaluation function and a second evaluation function; construct a corresponding question text based on the legal clause interpretation text, and generate multiple candidate interpretations; determine the score corresponding to each candidate interpretation according to the interpretation quality evaluation function; determine the second objective function according to the second evaluation function, the score corresponding to each candidate interpretation and the first objective function; iterate the second objective function, and when it is determined that the solution of the second objective function satisfies the set solution, add the corresponding candidate interpretation to the legal clause interpretation text to reconstruct the legal clause interpretation text.

[0224] As a specific example, generating an interpretable legal clause interpretation text includes the following steps:

[0225] Define a set of quality assessment indicators for legal interpretation from the dimensions of language fluency, concept accuracy, logical consistency, knowledge richness, structural clarity, etc.; collect a small number of manually annotated high-quality interpretation samples, train the interpretation quality assessment model, and learn to map the interpretation text to the scores of various indicators. For example, semantic encoding models such as BERT, as well as structured representation methods such as attention mechanisms and graph networks can be used; assign weights to various indicators to form a comprehensive quality assessment function P, where the weights can be set based on manual experience or dynamically adjusted by learning manual feedback.

[0226] Next, a series of candidate interpretations Z1, Z2, ..., Zn are generated for the legal question. Optionally, a sample of candidate interpretations is displayed to the user, and the user's subjective ratings and feedback on the quality, interpretability, and readability of the interpretations are collected. Human feedback is used as a reward signal, and a gradient algorithm (such as REINFORCE) is used to optimize interpretation generation, so that it tends to generate high-quality, highly interpretable, and highly readable interpretations; the above steps are repeated, and the interpretation strategy is continuously updated based on new human feedback until the strategy converges.

[0227] Furthermore, the quality evaluation function P is used to determine the comprehensive quality P*(Zi) of each candidate interpretation Zi, and an interpretability evaluation function E is established to comprehensively consider the score E(Zi) of the interpretation Zi in terms of concept alignment, logical reasoning, knowledge traceability, etc.

[0228] Finally, the optimization objective function O(Zi)=αP*(Zi)+βE(Zi) of the candidate interpretation Zi with respect to P* and E is constructed, where α and β are balance coefficients; the optimal solution of the objective function O(Zi) is found in the candidate interpretation space by using heuristic search methods such as gradient boosting and evolutionary algorithms to obtain the interpretation Z* with enhanced interpretability.

[0229] As a specific example, reconstructing the interpretation text of legal clauses includes the following steps:

[0230] Design a readability evaluation function R, taking into account the scores R(Zi) of each candidate interpretation Zi in terms of language fluency, clear structure, and moderate length; construct the target O'(Zi)=α'Q*(Zi)+β'R(Zi) for each candidate interpretation Zi with respect to P* and R, where α' and β' are balance coefficients; perform a weighted combination of O'(Zi) and O(Zi) to form the target function O*(Zi)=λO(Zi)+(1-λ)O'(Zi), where λ is the combination coefficient.

[0231] Among them, in the step of reconstructing the interpretation text of the legal terms, the steps of forming O(Zi) can refer to the description of the above example.

[0232] The above method has the following advantages:

[0233] 1) Generalize manual feedback through the quality assessment function P; reduce the reliance on large-scale manually labeled data and improve sample efficiency;

[0234] 2) Using objective functions O and O' to characterize the interpretability and readability of the interpretation, respectively, to achieve independent modeling and flexible trade-off between the two objectives;

[0235] 3) A heuristic search algorithm is used to perform end-to-end candidate interpretation optimization, avoiding the difficulty of gradient-based discrete optimization while taking into account multiple dimensions such as quality, interpretability, and readability.

[0236] To facilitate understanding, an example is provided for explanation.

[0237] Assume that the legal question Q input by the user is: "What are the constituent elements of contract fraud?".

[0238] By constructing the interpretation quality evaluation function, we get the scores of each indicator. For example, the annotated interpretation sample is: "The elements of contract fraud include: 1. One party intentionally informs the other party of false information, or intentionally conceals the truth; 2. Causing the other party to express its intention based on a wrong understanding; 3. Causing the other party to suffer property loss or personal injury."; the corresponding quality indicator scores are {relevance: 5, accuracy: 5, completeness: 4, fluency: 4, clarity: 5}.

[0239] The weighted average of each indicator score is used to obtain the comprehensive quality evaluation function P of the interpretation. For example, P(Z) = 0.3*relevance + 0.3*accuracy + 0.2*completeness + 0.1*fluency + 0.1*clarity.

[0240] For the legal question Q, a fine-tuned GPT model was used to generate 10 candidate interpretations Z1 to Z10, and 3 of them were sampled and displayed to users to collect feedback. For example, the user gave Z1 a score of 4, commenting that it was "accurate but not complete"; gave Z2 a score of 2, commenting that it was "logically incorrect"; and gave Z3 a score of 5, commenting that it was "accurate, complete, and well-organized."

[0241] Using feedback scores as rewards, the REINFORCE algorithm is used to update the interpretation generation strategy of the GPT model, making it tend to generate high-scoring interpretations. For example, the probability of generating paths with Z3 is increased, and the probability of generating paths with Z2 is reduced. Repeat the above process, collect more feedback, and optimize the interpretation strategy until the strategy converges.

[0242] Next, we use the interpretation comprehensive quality evaluation function P to score the candidate interpretations Z1 to Z10 and obtain their comprehensive quality estimates P*(Z1) to P*(Z10), and design the interpretation explainability evaluation function E, taking into account the interpretation's scores in terms of concept alignment (such as "informing of false circumstances" corresponds to "deception" in the original question), reasoning steps (such as "misconception leads to erroneous expression of intention" reflects causal logic), and knowledge traceability (such as "property loss" corresponds to Article 58 of the Contract Law).

[0243] Furthermore, we construct the objective function O(Z)=0.6*Q*(Z)+0.4*E(Z), comprehensively consider the overall quality and interpretability of the interpretation, and use the simulated annealing algorithm to search for the maximum value of O(Z) to obtain the interpretative optimal interpretation Q*. For example, "Contract fraud requires the simultaneous satisfaction of three conditions: first, one party has committed fraud, that is, informed false information or concealed the truth; second, the other party has made an expression of intent based on a misunderstanding, that is, was deceived and made a wrong decision; third, the other party has suffered property or personal damage as a result. This provision is reflected in Article 58 of the Contract Law."

[0244] Similarly, the interpretation readability evaluation function R is designed to consider the interpretation's scores in terms of language fluency (such as average sentence length, vocabulary richness), structural clarity (such as whether the discussion is divided into points, and whether there are hierarchical numbers), etc.

[0245] The implicit optimization goal O'(Z)=0.5*Q*(Z)+0.5*R(Z) is constructed, taking into account the overall quality and readability of the interpretation.

[0246] Finally, O(Z) and O'(Z) are weighted and combined into the ultimate optimization goal O*(Z)=0.7*O(Z)+0.3*O'(Z). The genetic algorithm is used to search for the maximum value of O*(Z) to obtain the optimal interpretation Z** that is both interpretable, readable, and high-quality. For example, "The elements of contract fraud include three points: 1. One party deceives the other party, including informing false information or concealing the truth; 2. The other party has a wrong understanding due to the deception and expresses his intention based on the wrong understanding; 3. The deception causes the other party to suffer property or personal loss. The above provisions can be found in Article 58 of the Contract Law."

[0247] In summary, the disclosed embodiment introduces domain graph knowledge enhancement technology, uses the legal knowledge graph to build a semantic association network of clauses-concepts-clauses, and not only considers the semantics of the clauses themselves when generating interpretations, but also uses the semantic relationships in the graph to capture the relevance of the clauses under the entire legal framework, mines the inherent graph structure information of legal documents, and combines the large language model to achieve context-aware high-quality interpretation generation. The present invention can be applied to scenarios such as legal consultation and judicial interpretation, providing relevant users with more comprehensive, systematic and legally logical clause interpretation services.

[0248] The disclosed embodiment also provides a generation system for a graph knowledge enhanced interpretation generation method for legal documents, such as Figure 8 The structure diagram of a graph knowledge enhanced interpretation generation system for legal documents in an embodiment of the present disclosure is shown in FIG. Figure 8 As shown, the graph knowledge enhanced interpretation generation system 100 for legal documents may include:

[0249] A construction unit 110 is configured to construct a semantic association network based on a knowledge graph of a legal document, wherein the semantic association network is used to represent the relationship between legal concepts and legal clauses in the legal document;

[0250] The processing unit 120 is configured to map the legal clause to be interpreted to a corresponding node in the semantic association network, and obtain semantic information of the legal clause to be interpreted;

[0251] The generating unit 130 is configured to generate a legal clause interpretation text according to the semantic information of the legal clause to be interpreted.

[0252] The specific working process and principle of the construction unit 110, the processing unit 120 and the generation unit 130 may refer to the relevant description of the aforementioned example.

[0253] The graph knowledge enhanced interpretation generation system 100 for legal documents in the disclosed embodiment is adopted. Since the semantic association network can be used to characterize the connection between legal concepts and legal clauses in legal documents, the generation unit 130 can consider the intrinsic connection between legal concepts and legal clauses in the process of generating the interpretation text of the legal clauses according to the semantic information of the legal clauses to be interpreted, thereby improving the accuracy of the interpretation of the legal document.

[0254] The present disclosure also provides a computer system suitable for implementing a graph knowledge enhanced interpretation generation method for legal documents, wherein the computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage part to a random access memory (RAM), such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM. The CPU, ROM, and RAM are connected to each other via a bus. The input / output (I / O) interface is also connected to the bus.

[0255] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. The drive 310 is also connected to the I / O interface as needed. Removable media, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive as needed so that the computer program read therefrom can be installed into the storage part as needed.

[0256] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the system of the present application are executed.

[0257] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0258] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0259] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0260] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0261] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.

[0262] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.

[0263] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0264] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solution according to the implementation method of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation method of the present application.

[0265] Although the embodiments of the present disclosure are disclosed as above, the present invention is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. A graph knowledge-enhanced interpretation generation method for legal documents, characterized in that: include: Based on the knowledge graph of legal documents, a semantic association network is constructed, wherein the semantic association network is used to represent the connection between legal concepts and legal clauses in legal documents; Mapping the legal clause to be interpreted to the corresponding node in the semantic association network, and obtaining the semantic information of the legal clause to be interpreted; Generate a legal clause interpretation text according to the semantic information of the legal clause to be interpreted; Adjust the interpretation text of the legal provisions; Wherein, the adjustment of the interpretation text of the legal terms includes at least one of the following: The generation process of the interpretation text of the legal clause is traced back to form a reasoning chain including clause-concept-interpretation; the reasoning chain is matched with the interpretation text of the legal clause, and according to the matching operation result, the concept corresponding to the reasoning chain is marked in the legal knowledge map to form an interpretable interpretation text of the legal clause; Performing structural analysis on the legal clause interpretation text, and determining the score of the legal clause interpretation text according to a preset evaluation model; when it is determined that the score of the legal clause interpretation text is lower than the set score, reconstructing the legal clause interpretation text; The step of mapping the legal clause to be interpreted to the corresponding node in the semantic association network and obtaining the semantic information of the legal clause to be interpreted includes: Extracting keyword features of the legal clause to be interpreted; Determine the semantic similarity between the keyword feature and the legal concept node in the semantic association network, and generate a plurality of candidate mapping nodes; Determining the co-occurrence frequency of the keyword feature and the legal concept corresponding to the legal concept node in the legal corpus; Based on the semantic similarity and the co-occurrence frequency, selecting a mapping node from a plurality of candidate mapping nodes as the node where the legal clause is located in the semantic association network; including: selecting a legal concept node with the highest semantic similarity and the greatest co-occurrence frequency as the mapping node of the legal clause to be interpreted in the semantic association network; Taking the mapping node of the legal clause to be interpreted in the semantic association network as the target node, obtaining the context nodes within a preset range with the target node and the semantic relations corresponding to the mapping nodes as the semantic information of the legal clause to be interpreted; The step of generating the interpretation text of the legal clause according to the semantic information of the legal clause to be interpreted includes: Generate a joint semantic vector between the legal clause to be interpreted and the semantic information of the legal clause; including: segmenting and transforming the legal clause to be interpreted to generate a corresponding word embedding vector sequence; and encoding the semantic information of the legal clause to form a semantic tensor; determining the correlation weight between each word in the word embedding vector sequence and the semantic tensor, and selecting a semantic tensor whose correlation weight is greater than a set weight; fusing the word embedding vector sequence and the selected semantic tensor to form a joint semantic vector; Inputting the joint semantic vector and the legal clause to be interpreted into a preset text processing model to generate the legal clause interpretation text; including: inputting the joint semantic vector and the legal clause to be interpreted into the text processing model to generate a plurality of candidate text sequences; scoring and sorting the plurality of candidate text sequences to screen out a target text sequence; splicing the target text sequences to generate the legal clause interpretation text; Or, generating the legal clause interpretation text according to the semantic information of the legal clause to be interpreted includes: Dividing the knowledge graph of the legal document into a plurality of sub-graphs; wherein one sub-graph corresponds to one legal concept; comprising: identifying key legal concepts from the knowledge graph of the legal document; based on the key legal concepts, selecting legal concept entities and multi-semantic relationships related to the key legal concepts, and generating a sub-graph containing at least the key legal concepts; Retrievers corresponding to each sub-graph are established respectively, and multiple retriever sets are generated, each retriever set is used to characterize the semantic association between the legal document and each sub-graph; wherein, the generation of multiple retriever sets includes: constructing training samples based on the legal document corpus corresponding to each sub-graph; using the training samples of each sub-graph to train the corresponding retriever, and taking the trained retriever and the corresponding sub-graph as a retriever set; based on the training samples, determining the confidence of each retriever set, and adjusting the parameters of the retrievers in the retriever set with lower confidence, so that the confidence of each retriever set tends to be consistent; Generate a graph knowledge enhanced representation based on the semantic information of the legal clause to be interpreted and multiple searcher sets; including: construct a legal question based on the semantic information of the legal clause to be interpreted; extract key information elements in the legal question to generate a structured legal question; input the structured legal question into each searcher set respectively, obtain the confidence of each searcher set, and select a searcher set with a confidence greater than a set confidence to form a knowledge search result set; generate a knowledge enhanced semantic vector of the structured legal question through the knowledge search result set; fuse the knowledge enhanced semantic vector of the structured legal question with the original semantic vector of the structured legal question to form a graph knowledge enhanced representation of the structured legal question; Based on the graph knowledge enhanced representation, the legal clause interpretation text is generated; including: taking the semantic vector of the graph knowledge enhanced representation as input, and taking the concept nodes and tuples in the knowledge retrieval result set as input text sequence; inputting the semantic vector of the knowledge enhanced representation and the input text sequence into the decoder to generate the legal clause interpretation text.

2. The graph knowledge enhanced interpretation generation method for legal documents according to claim 1 is characterized in that: The knowledge graph based on legal documents is used to construct a semantic association network, including: Acquire a legal concept entity from the legal document, wherein the legal concept entity includes at least one of a legal subject entity, a legal object entity, a legal fact entity, and a legal consequence entity; Determine the multiple semantic relationships between entities in the legal concept entity and between each entity and the legal clause, wherein the multiple semantic relationships include at least one of: a hierarchical relationship, a causal relationship, a sequential relationship, and an inclusion relationship; The semantic association network is constructed based on the multiple semantic relationships contained in each entity in the legal concept entity, between each entity, and between each entity and the legal terms, including: constructing the semantic association network with each entity in the legal concept entity as a node and the multiple semantic relationships as an edge.

3. A graph knowledge-enhanced interpretation generation system for legal documents, characterized by: include: A construction unit is configured to construct a semantic association network based on a knowledge graph of a legal document, wherein the semantic association network is used to represent the connection between legal concepts and legal clauses in the legal document; A processing unit configured to map the legal clause to be interpreted to a corresponding node in the semantic association network and obtain semantic information of the legal clause to be interpreted; and, adjusting the interpretation text of legal provisions; A generating unit, configured to generate a legal clause interpretation text according to the semantic information of the legal clause to be interpreted; Wherein, the adjustment of the interpretation text of the legal terms includes at least one of the following: The generation process of the interpretation text of the legal clause is traced back to form a reasoning chain including clause-concept-interpretation; the reasoning chain is matched with the interpretation text of the legal clause, and according to the matching operation result, the concept corresponding to the reasoning chain is marked in the legal knowledge map to form an interpretable interpretation text of the legal clause; Performing structural analysis on the legal clause interpretation text, and determining the score of the legal clause interpretation text according to a preset evaluation model; when it is determined that the score of the legal clause interpretation text is lower than the set score, reconstructing the legal clause interpretation text; The processing unit is configured to map the legal clause to be interpreted to the corresponding node in the semantic association network and obtain the semantic information of the legal clause to be interpreted, including: Extracting keyword features of the legal clause to be interpreted; Determine the semantic similarity between the keyword feature and the legal concept node in the semantic association network, and generate a plurality of candidate mapping nodes; Determining the co-occurrence frequency of the keyword feature and the legal concept corresponding to the legal concept node in the legal corpus; Based on the semantic similarity and the co-occurrence frequency, selecting a mapping node from a plurality of candidate mapping nodes as the node where the legal clause is located in the semantic association network; including: selecting a legal concept node with the highest semantic similarity and the greatest co-occurrence frequency as the mapping node of the legal clause to be interpreted in the semantic association network; Taking the mapping node of the legal clause to be interpreted in the semantic association network as the target node, obtaining the context nodes within a preset range with the target node and the semantic relations corresponding to the mapping nodes as the semantic information of the legal clause to be interpreted; The generating unit is configured to generate a legal clause interpretation text according to the semantic information of the legal clause to be interpreted, including: Generate a joint semantic vector between the legal clause to be interpreted and the semantic information of the legal clause; including: segmenting and transforming the legal clause to be interpreted to generate a corresponding word embedding vector sequence; and encoding the semantic information of the legal clause to form a semantic tensor; determining the correlation weight between each word in the word embedding vector sequence and the semantic tensor, and selecting a semantic tensor whose correlation weight is greater than a set weight; fusing the word embedding vector sequence and the selected semantic tensor to form a joint semantic vector; Inputting the joint semantic vector and the legal clause to be interpreted into a preset text processing model to generate the legal clause interpretation text; including: inputting the joint semantic vector and the legal clause to be interpreted into the text processing model to generate a plurality of candidate text sequences; scoring and sorting the plurality of candidate text sequences to screen out a target text sequence; splicing the target text sequences to generate the legal clause interpretation text; Or, generating the legal clause interpretation text according to the semantic information of the legal clause to be interpreted includes: Dividing the knowledge graph of the legal document into a plurality of sub-graphs; wherein one sub-graph corresponds to one legal concept; comprising: identifying key legal concepts from the knowledge graph of the legal document; based on the key legal concepts, selecting legal concept entities and multi-semantic relationships related to the key legal concepts, and generating a sub-graph containing at least the key legal concepts; Retrievers corresponding to each sub-graph are established respectively, and multiple retriever sets are generated, each retriever set is used to characterize the semantic association between the legal document and each sub-graph; wherein, the generation of multiple retriever sets includes: constructing training samples based on the legal document corpus corresponding to each sub-graph; using the training samples of each sub-graph to train the corresponding retriever, and taking the trained retriever and the corresponding sub-graph as a retriever set; based on the training samples, determining the confidence of each retriever set, and adjusting the parameters of the retrievers in the retriever set with lower confidence, so that the confidence of each retriever set tends to be consistent; Generate a graph knowledge enhanced representation based on the semantic information of the legal clause to be interpreted and multiple searcher sets; including: construct a legal question based on the semantic information of the legal clause to be interpreted; extract key information elements in the legal question to generate a structured legal question; input the structured legal question into each searcher set respectively, obtain the confidence of each searcher set, and select a searcher set with a confidence greater than a set confidence to form a knowledge search result set; generate a knowledge enhanced semantic vector of the structured legal question through the knowledge search result set; fuse the knowledge enhanced semantic vector of the structured legal question with the original semantic vector of the structured legal question to form a graph knowledge enhanced representation of the structured legal question; Based on the graph knowledge enhanced representation, the legal clause interpretation text is generated; including: taking the semantic vector of the graph knowledge enhanced representation as input, and taking the concept nodes and tuples in the knowledge retrieval result set as input text sequence; inputting the semantic vector of the knowledge enhanced representation and the input text sequence into the decoder to generate the legal clause interpretation text.