Legal text information extraction enhancement method and system based on artificial intelligence

Through a joint framework of semantic segmentation reconstruction, text logic perception and dynamic knowledge fusion, the problem of information extraction in the multi-level nested structure of legal text is solved, and the accurate hierarchical recognition and logical relationship extraction of legal text is realized, which improves the accuracy and completeness of legal information extraction.

CN120258001AActive Publication Date: 2025-07-04湖南工商大学

Patent Information

Application Number
CN202510745441.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-07-04
Estimated Expiration
2045-06-05

AI Technical Summary

Technical Problem

Existing legal text information extraction methods are difficult to accurately identify the hierarchical information and logical structures of multi-level nested structures. Traditional methods rely on fixed text formats or static rules, making it difficult to adapt to non-standardized text and complex legal logical relationships, resulting in inaccurate information extraction and affecting the effectiveness of intelligent tasks.

Method used

A joint framework of semantic segmentation reconstruction, text logic perception and dynamic knowledge fusion is adopted, combined with the conditional random field two-way long and short-term memory model improved by hierarchical label inference and the causal graph convolutional inference neural network, hierarchical recognition of legal texts and logical relationship extraction are carried out, and knowledge of different legal documents is dynamically fused.

Benefits of technology

It realizes the precise identification and logical correlation of the legal text structure level, improves the accuracy and completeness of legal information extraction, supports cross-reference and intelligent application across legal texts, avoids misjudgment across chapters and clauses, and provides more reliable logical reasoning support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258001A_ABST
    Figure CN120258001A_ABST
Patent Text Reader

Abstract

The invention discloses a legal text information extraction and enhancement method and system based on artificial intelligence. The method comprises the steps of data acquisition and processing, semantic segmentation and reconstruction, text logic perception, dynamic knowledge fusion and information extraction and enhancement. The invention relates to the technical field of text information extraction, in particular to a legal text information extraction enhancement method and system based on artificial intelligence, which adopts a joint frame of semantic segmentation reconstruction, text logic perception and dynamic knowledge fusion to realize more accurate recognition of the structural level of a legal text. Understanding of logic association of legal clauses is enhanced, and meanwhile, knowledge among different legal documents is dynamically fused, so that cross reference and intelligent application among different laws and regulations are facilitated; semantic segmentation reconstruction is carried out by adopting a conditional random field bidirectional long-short-term memory model improved by combining hierarchical label reasoning; and carrying out text logic perception by adopting a causal graph convolutional reasoning neural network enhanced by combining a dual-channel logic unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text information extraction, and specifically refers to a method and system for enhancing legal text information extraction based on artificial intelligence. Background Art

[0002] The method for enhancing legal text information extraction based on artificial intelligence refers to a method that uses technologies such as natural language processing (NLP), knowledge graphs, and machine learning to automatically identify key elements (such as clauses, subjects, obligation relationships, etc.) in legal documents, and improves the extraction accuracy through semantic understanding, logical reasoning, and dynamic knowledge fusion. Its role is to efficiently process a large amount of legal text, solve the problem of low efficiency of traditional manual review, and at the same time reduce clause omissions or misjudgments caused by subjective negligence, provide structured and analyzable data support for legal intelligent retrieval and contract review, and promote the intelligence and standardization of legal services.

[0003] However, in the existing legal text information extraction process, there are technical problems as follows: in the process of processing legal texts, a core difficulty lies in how to accurately extract the hierarchical information and logical structure in the text. Different from general texts, legal documents usually have a multi-level nested structure, such as laws, regulations, implementation rules, case analyses, etc., with cross-references and logical associations between different levels, resulting in the difficulty of existing information extraction methods to accurately divide clause relationships and affecting the effectiveness of subsequent intelligent tasks; in the existing semantic segmentation and reconstruction methods, there is a technical problem that the main goal of semantic segmentation is to disassemble complex legal documents according to their internal logical structure, but traditional methods usually rely on fixed text formats (such as titles, numbers) during processing and perform poorly on non-standardized texts; in the existing text logic perception methods, there is a technical problem that traditional text analysis methods mainly rely on keyword matching or reasoning models based on static rules, but these methods are difficult to accurately describe complex legal logic relationships; in the existing dynamic knowledge fusion methods, there is a technical problem that traditional knowledge extraction methods mainly rely on static rules or predefined templates and are difficult to adapt to the changing role relationships in legal texts. Summary of the Invention

[0004] In view of the above situation, to overcome the defects of the prior art, the present invention provides a method and system for enhancing the extraction of legal text information based on artificial intelligence. In the existing process of legal text information extraction, there is a core difficulty in accurately extracting the hierarchical information and logical structure in the text during the processing of legal texts. Different from general texts, legal documents usually have a multi-level nested structure, such as laws, regulations, implementation rules, case analyses, etc., with cross-references and logical associations between different levels, resulting in the difficulty of accurately dividing the clause relationships by existing information extraction methods and affecting the effectiveness of subsequent intelligent tasks. This solution creatively adopts a joint framework of semantic segmentation reconstruction, text logic perception, and dynamic knowledge fusion, achieving more accurate identification of the structural hierarchy of legal texts, enhancing the understanding of the logical associations between legal clauses, and dynamically fusing the knowledge between different legal documents to construct a knowledge network across legal texts, facilitating cross-references and intelligent application between different regulations; in the existing semantic segmentation reconstruction methods, the main goal of semantic segmentation is to disassemble complex legal documents according to their internal logical structure, but traditional methods usually rely on fixed text formats (such as titles, numbers) during processing and perform poorly on non-standardized texts. This solution creatively adopts a conditional random field bidirectional long short-term memory model improved by combining hierarchical label inference for semantic segmentation reconstruction. By combining conditional random fields and bidirectional long short-term memory networks, the accuracy of identifying hierarchical boundaries is improved, avoiding misjudgments across chapters and clauses, and realizing intelligent inference of the hierarchical relationships of clauses. Even in the face of legal texts with non-standard formats, the hierarchical structure of different clauses can be accurately identified; in the existing text logic perception methods, the traditional text analysis methods mainly rely on keyword matching or reasoning models based on static rules, but these methods are difficult to accurately depict complex legal logical relationships. This solution creatively adopts a causal graph convolutional inference neural network enhanced by combining dual-channel logic units for text logic perception, achieving dual-channel modeling based on semantic understanding and logical reasoning. It not only considers the literal relationships on the surface of the text but also infers the implicit logic between legal clauses by combining context information, helping to automatically determine which clauses are related to each other and providing more reliable logical reasoning support for regulation application; in the existing dynamic knowledge fusion methods, the traditional knowledge extraction methods mainly rely on static rules or predefined templates and are difficult to adapt to the changing role relationships in legal texts. This solution creatively adopts a role-aware enhanced triple extraction method for dynamic knowledge fusion, enhancing the knowledge fusion ability between regulations, automatically integrating relevant content in multiple legal texts, and improving the accuracy and integrity of legal information retrieval.

[0005] The technical solution adopted by the present invention is as follows: A method for enhancing legal text information extraction based on artificial intelligence provided by the present invention includes the following steps: Step S1: Data collection and processing; Step S2: Semantic segmentation and reconstruction; Step S3: Text logic perception; Step S4: Dynamic knowledge fusion; Step S5: Information extraction enhancement.

[0006] Further, in step S1, the data collection and processing is used to construct a multi-source heterogeneous legal text corpus and perform adaptive preprocessing. Specifically, through multi-modal data collection, an original dataset for legal text information extraction is obtained, and the original dataset for legal text information extraction is subjected to data optimization processing to obtain an optimized legal text dataset; The original dataset for legal text information extraction includes legislative texts, case texts, contract template texts, legal service material texts, legal code book texts, and annotation material texts; The data structure of the original dataset for legal text information extraction includes structured texts, unstructured texts, layout information, and scanned image reference data; The steps of the data optimization processing include: Step S11: Adversarial data cleaning. Specifically, by introducing a noise detection model based on a generative adversarial network and combining the structured text and the scanned image reference data, text typesetting errors and non-standard layout interferences are identified, and cleaned and optimized text data is obtained; Step S12: Layout structure enhancement. Specifically, by introducing a structural information analysis method based on layout rule recognition and according to the cleaned and optimized text data, the recognition of titles, clause numbers, paragraph numbers, and icon information is performed, and layout structure enhancement label annotation data is generated; Step S13: Enhanced word segmentation. Specifically, according to the layout structure enhancement label annotation data, a domain-optimized word segmentation tool is used for enhanced word segmentation to obtain word segmentation reference data; The domain-optimized word segmentation tool specifically refers to a word segmentation tool that combines standard SentencePiece extension and Spacy extension for legal format self-defined rule optimization; Step S14: Data optimization processing. Specifically, through the adversarial data cleaning, the layout structure enhancement, and the enhanced word segmentation, data optimization processing is performed to obtain an optimized legal text dataset; The optimized legal text dataset includes text information data, structural feature data, and logical label data.

[0007] Further, in step S2, the semantic segmentation and reconstruction is used for hierarchical legal document content recognition. Specifically, based on the optimized legal text dataset, a conditional random field bidirectional long short-term memory model improved by combining hierarchical label inference is adopted to perform semantic segmentation and reconstruction, obtaining hierarchical legal text content recognition data, including the following steps: Step S21: Joint feature extraction. Specifically, through text vectorization and dependency syntactic analysis, multi-channel feature extraction is performed to obtain syntactic, semantic, and structural information of the legal text, obtaining sentence-level legal text feature data; Step S22: Gated fusion feature embedding. Specifically, a gated mechanism is constructed, and based on the sentence-level legal text feature data, semantic information, syntactic information, and structural information are integrated to obtain fused feature data; Step S23: Feature segmentation. Specifically, a multi-scale window segmentation strategy is adopted to perform sentence-level, clause-level, and chapter-level feature extraction, and by constructing a bidirectional long short-term memory model, the sentence-level segmentation boundary of legal clauses is predicted to obtain initial segmentation data; Step S24: Hierarchical label inference. Specifically, by constructing an improved conditional random field model, hierarchical label inference is performed based on the initial segmentation data to obtain sentence-level label data; The improved conditional random field model is specifically calculated through inference layer conditional probability calculation and hierarchical consistency correction optimization; Step S25: Structure tree generation. Specifically, based on the sentence-level label data and the initial segmentation data, a logical hierarchical tree is constructed using the recursive nesting method, and the logical hierarchical tree is corrected through structural consistency verification to obtain tree-like hierarchical structure data; Step S26: Semantic segmentation and reconstruction. Specifically, the initial segmentation data is formatted and standardized according to the tree-like hierarchical structure data to obtain standard format segmentation data, and the first legal clause of the standard format segmentation data is automatically extracted as a hierarchical summary, constructing hierarchical legal text content recognition data.

[0008] Further, in step S3, the text logic perception is used for legal document logical relationship extraction. Specifically, based on the hierarchical legal text content recognition data, a causal graph convolutional inference neural network enhanced by combining dual-channel logic units is adopted to perform text logic perception, obtaining a legal text logical relationship dataset, including the following steps: Step S31: Logical unit annotation. Specifically, based on the hierarchical legal text content recognition data, legal logic forms are defined and logical unit annotation is performed to obtain logical annotation text content data, and based on the logical annotation text content data, a dual-channel pointer network is constructed to perform logical boundary recognition, obtaining legal text content logical recognition data; The dual-channel pointer network includes a text channel and a logical label channel; Step S32: Causal graph convolutional reasoning, specifically constructing a multi-source dynamic causal graph through node definition and variable generation; the node definition is specifically taking the logical units in the logical recognition data of the legal text content as nodes, constructing multi-source edges, building a temporal-aware graph attention network, and obtaining causal graph convolutional reasoning data through time-dependent modeling; The multi-source edges include explicit logical edges, implicit logical edges, and entity alignment edges; The explicit logical edge indicates the explicit logical relationship of the keywords "shall", "prohibit", and "unless"; the implicit logical edge indicates the implicit logical relationship with cross-clause references; the entity alignment edge indicates the entity alignment relationship of multiple clauses involving the same legal object; Step S33: Logical verification, specifically generating interference samples by randomly deleting conditions and randomly replacing the subject based on the causal graph convolutional reasoning data, and evaluating its logical consistency by constructing an adversarial logic, obtaining logical consistency evaluation data; the logical consistency evaluation data is used to reflect the logical perception performance; Step S34: Text logical perception, specifically training and using a text logical perception model through the logical unit annotation, the causal graph convolutional reasoning, and the logical verification to perform text logical perception and obtain a legal text logical relationship dataset.

[0009] Furthermore, in step S4, the knowledge fusion is used for obligation graph construction, specifically, based on the legal text logical relationship dataset and the hierarchical legal text content recognition data, adopting a role-aware enhanced triple extraction method to perform knowledge fusion and obtain legal text structured information data, including the following steps: Step S41: Construct a legal knowledge base, specifically constructing a legal knowledge memory bank based on the legal text logical relationship dataset, and performing legal article feature embedding through a pre-trained model to obtain an initial legal text information knowledge base; Step S42: Differential knowledge update, specifically constructing a differential knowledge update algorithm, and when the legal text is updated, only fine-tuning the legal features corresponding to the affected keywords to optimize the maintainability of the legal knowledge base; Step S43: Construct a role-constrained triple extraction model, specifically adopting a generative sequence-to-relationship model and introducing a role-aware mechanism to perform legal role embedding and legal obligation classification to obtain role logic reference data, and performing role and legal obligation extraction based on the role logic reference data to obtain role obligation triple data; The said role obligation triple data includes a subject, an action, and an object; The said subject and object are used to represent roles; the said action is used to represent legal obligations; Step S44: Adversarial negative sampling enhancement. Specifically, based on the said role obligation triple data, through negative sample generation, contrast sample data is obtained, and an adversarial margin distance is introduced as a loss function to perform adversarial negative sampling enhancement, optimizing the accuracy of the legal obligations in the said role obligation triple data to obtain obligation-optimized triple data; Step S45: Triple calibration. Specifically, based on the said obligation-optimized triple data, through obligation type query analysis, consistency detection is performed to obtain role-optimized triple data; Step S46: Knowledge fusion. Specifically, through the said construction of a legal knowledge base, the said differential knowledge update, the said construction of a triple extraction model with role constraints, the said adversarial negative sampling enhancement, and the said triple calibration, knowledge fusion is performed to obtain legal text structured information data.

[0010] Furthermore, in step S5, the said information extraction enhancement is used for the comprehensive enhancement of legal text information extraction. Specifically, by combining the said hierarchical legal text content recognition data, the said legal text logical relationship dataset, and the said legal text structured information data, information extraction enhancement is performed to obtain legal text comprehensive information extraction reference data.

[0011] An artificial intelligence-based legal text information extraction enhancement system provided by the present invention includes an input processing module, an enhancement extraction module, and an inference output module; The said input processing module is used for data acquisition and processing. Through data acquisition and processing, an optimized legal text dataset is obtained, and the said optimized legal text dataset is sent to the enhancement extraction module; The said enhancement extraction module is used for semantic segmentation reconstruction, text logic perception, and dynamic knowledge fusion. Through semantic segmentation reconstruction, text logic perception, and dynamic knowledge fusion, hierarchical legal text content recognition data, legal text logical relationship datasets, and legal text structured information data are obtained, and the said hierarchical legal text content recognition data, legal text logical relationship datasets, and legal text structured information data are sent to the inference output module; The said inference output module is used for information extraction enhancement. Through information extraction enhancement, legal text comprehensive information extraction reference data is obtained.

[0012] The beneficial effects achieved by the present invention using the above solution are as follows: (1)In the process of extracting existing legal text information, there is a core difficulty in the process of processing legal texts, which lies in how to accurately extract the hierarchical information and logical structure in the text. Different from general texts, legal documents usually have a multi-level nested structure, such as laws, regulations, implementation rules, case analyses, etc. There are cross-references and logical associations between different levels, resulting in the difficulty of accurately dividing the clause relationships by existing information extraction methods, which affects the effectiveness of subsequent intelligent tasks. This solution creatively adopts a joint framework of semantic segmentation reconstruction, text logic perception, and dynamic knowledge fusion, achieving more accurate identification of the structural hierarchy of legal texts, enhancing the understanding of the logical associations between legal clauses, and at the same time dynamically fusing the knowledge between different legal documents to construct a knowledge network across legal texts, facilitating cross-references and intelligent application between different regulations; (2)In the existing semantic segmentation reconstruction methods, there is a technical problem that the main goal of semantic segmentation is to disassemble complex legal documents according to their internal logical structure, but traditional methods usually rely on fixed text formats (such as titles, numbers) during processing and perform poorly on non-standardized texts. This solution creatively uses a conditional random field bidirectional long short-term memory model improved by combining hierarchical label inference for semantic segmentation reconstruction. By combining conditional random fields and bidirectional long short-term memory networks, the accuracy of hierarchical boundary recognition is improved, avoiding misjudgments across chapters and clauses, and realizing intelligent inference of the hierarchical relationships between clauses. Even in the face of legal texts with non-standard formats, the hierarchical structure of different clauses can be accurately identified; (3)In the existing text logic perception methods, there is a technical problem that traditional text analysis methods mainly rely on keyword matching or static rule-based inference models, but these methods are difficult to accurately depict complex legal logical relationships. This solution creatively uses a causal graph convolutional inference neural network enhanced by combining dual-channel logic units for text logic perception, achieving dual-channel modeling based on semantic understanding and logical reasoning. It not only considers the literal relationships on the surface of the text but also combines context information to infer the implicit logic between legal clauses, helping to automatically determine which clauses are related to each other and providing more reliable logical reasoning support for regulation application; (4)In the existing dynamic knowledge fusion methods, there is a technical problem that traditional knowledge extraction methods mainly rely on static rules or predefined templates and are difficult to adapt to the changing role relationships in legal texts. This solution creatively uses a role-aware enhanced triple extraction method for dynamic knowledge fusion, enhancing the knowledge fusion ability between regulations, automatically integrating relevant content in multiple legal texts, and improving the accuracy and integrity of legal information retrieval. Description of the Drawings

[0013] Figure 1Flow schematic diagram of an enhanced method for extracting legal text information based on artificial intelligence provided by the present invention; Figure 2 Schematic diagram of a system for enhancing legal text information extraction based on artificial intelligence provided by the present invention; Figure 3 Flow schematic diagram of step S1 data acquisition and processing; Figure 4 Flow schematic diagram of step S2 semantic segmentation and reconstruction; Figure 5 Flow schematic diagram of step S3 text logic perception; Figure 6 Flow schematic diagram of step S4 dynamic knowledge fusion.

[0014] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation to the present invention. Specific embodiments

[0015] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the scope of protection of the present invention.

[0016] Example 1, refer to Figure 1 , an enhanced method for extracting legal text information based on artificial intelligence provided by the present invention, the method includes the following steps: Step S1: Data acquisition and processing; Step S2: Semantic segmentation and reconstruction; Step S3: Text logic perception; Step S4: Dynamic knowledge fusion; Step S5: Information extraction enhancement.

[0017] By performing the above operations, in the process of extracting existing legal text information, there is a core difficulty in the process of processing legal texts, that is, how to accurately extract the hierarchical information and logical structure in the text. Different from general texts, legal documents usually have a multi-level nested structure, such as laws, regulations, implementation rules, case analyses, etc. There are cross-references and logical associations between different levels, resulting in the difficulty of accurately dividing the clause relationships by existing information extraction methods, which affects the effectiveness of subsequent intelligent tasks. This solution creatively adopts a joint framework of semantic segmentation reconstruction, text logic perception, and dynamic knowledge fusion, realizing more accurate identification of the structural hierarchy of legal texts, enhancing the understanding of the logical associations between legal clauses, and at the same time dynamically fusing the knowledge between different legal documents to construct a knowledge network across legal texts, facilitating cross-references and intelligent application between different regulations.

[0018] Example 2, refer to Figure 1 、 Figure 2 and Figure 3 In step S1, the data collection and processing is used to construct a multi-source heterogeneous legal text corpus and perform adaptive preprocessing. Specifically, through multi-modal data collection, an original dataset for legal text information extraction is obtained, and the original dataset for legal text information extraction is subjected to data optimization processing to obtain an optimized legal text dataset; The original dataset for legal text information extraction includes legislative texts, case texts, contract template texts, legal service material texts, legal code book texts, and annotation material texts; The data structure of the original dataset for legal text information extraction includes structured texts, unstructured texts, layout information, and scanned image reference data; The steps of the data optimization processing include: Step S11: Adversarial data cleaning. Specifically, by introducing a noise detection model based on a generative adversarial network and combining the structured text and the scanned image reference data, text typesetting errors and non-standard typesetting interferences are identified, and cleaned and optimized text data is obtained; Step S12: Layout structure enhancement. Specifically, by introducing a structure information analysis method based on layout rule recognition and according to the cleaned and optimized text data, the identification of titles, clause numbers, paragraph numbers, and icon information is carried out, and label annotation data with enhanced layout structure is generated; Step S13: Enhanced word segmentation. Specifically, according to the label annotation data with enhanced layout structure, a domain-optimized word segmentation tool is used for enhanced word segmentation to obtain word segmentation reference data; The domain-optimized word segmentation tool specifically refers to a word segmentation tool that combines standard SentencePiece extension and Spacy extension for self-defined rule optimization of legal formats; Step S14: Data optimization processing, specifically, through the adversarial data cleaning, the layout structure enhancement, and the enhanced word segmentation, perform data optimization processing to obtain an optimized legal text dataset; The optimized legal text dataset includes text information data, structural feature data, and logical label data.

[0019] Embodiment 3, refer to Figure 1 、 Figure 2 and Figure 4 Based on the above embodiments, in step S2, the semantic segmentation and reconstruction is used for hierarchical legal document content recognition. Specifically, according to the optimized legal text dataset, a conditional random field bidirectional long short-term memory model improved by combining hierarchical label inference is adopted to perform semantic segmentation and reconstruction to obtain hierarchical legal text content recognition data, including the following steps: Step S21: Joint feature extraction, specifically, through text vectorization and dependency syntactic analysis, perform multi-channel feature extraction to obtain the syntactic, semantic, and structural information of the legal text, and obtain sentence-level legal text feature data; The calculation formula for the joint feature extraction is: ; In the formula, F i is the sentence-level legal text feature data, Concat(·) is the joint feature extraction operation, W i is the word vector in the sentence, where i is the sentence index, D i is the syntactic node feature of the sentence, and S i is the structural position encoding feature; Step S22: Gated fusion feature embedding, specifically, construct a gated mechanism, and according to the sentence-level legal text feature data, perform the integration of semantic information, syntactic information, and structural information to obtain fused feature data. The calculation formula is: ; In the formula, is the fused feature data, is the activation function, specifically the Sigmoid function, W g is the gated weight, F i is the sentence-level legal text feature data, b g is the gated bias term, is the element-wise multiplication representation function; Step S23: Feature segmentation, specifically, adopt a multi-scale window segmentation strategy to perform sentence-level, clause-level, and chapter-level feature extraction, and through constructing a bidirectional long short-term memory model, perform the prediction of the sentence-level segmentation boundary of legal clauses to obtain initial segmentation data. The calculation formula is: ; where H i is the initial segmentation data, BiLSTM(·) is the representation function of the bidirectional long short-term memory model, Win k (·) is the sliding window operation function, k is the sentence-level window index, is the fused feature data within the range from the (i - k)-th sentence-level window to the (i + k)-th sentence-level window; Step S24: Hierarchical label inference, specifically, by constructing an improved conditional random field model, hierarchical label inference is performed based on the initial segmentation data to obtain sentence-level label data; For the improved conditional random field model, the calculation is specifically performed through inference layer conditional probability calculation and hierarchical consistency correction optimization, and the calculation formula is: ; where P(Y|H) is the output probability of the improved conditional random field model, used to represent the probability of outputting the sentence-level label Y under the condition of the given feature sequence H, Z(·) is the partition function, used as a normalization factor, H is the feature sequence input, used to represent the initial segmentation data, exp(·) is the natural base function, The whole is the label feature compatibility degree scoring function, used to represent the compatibility degree between the current sentence-level label y i and the initial segmentation feature H i , The whole is the hierarchical perception transfer scoring function, used to represent the rationality of the transfer from the previous sentence-level label y i-1 to the current sentence-level label y i , and L is the transfer structure information parameter between hierarchical labels; Step S25: Structure tree generation, specifically, by constructing a logical hierarchy tree using the recursive nesting method based on the sentence-level label data and the initial segmentation data, and correcting the logical hierarchy tree through structure consistency verification to obtain tree-like hierarchical structure data, and the calculation formula is: ; where T is the tree-like hierarchical structure data, RecGen(·) is the recursive tree construction function, Y is the sentence-level label data, n is the total number of labels in the sentence-level label data, y1 is the first sentence-level label, and y n is the n-th sentence-level label; Step S26: Semantic segmentation reconstruction, specifically, standardizing the format of the initial segmentation data according to the tree-like hierarchical structure data to obtain standard format segmentation data, and automatically extracting the first legal clause of the standard format segmentation data as the hierarchical summary to construct hierarchical legal text content recognition data; The hierarchical legal text content recognition data includes standard format segmentation data and hierarchical summaries, and the calculation formula is: ; In the formula, is the standard format segmentation data, Format(·) is the standardization function, T is the tree - like hierarchical structure data, S is the original structure format segmentation data, which is used to represent the structural position encoding feature in the sentence - level legal text feature data, Summary is the hierarchical summary, and Head(·) is the summary extraction function.

[0020] By performing the above operations, in the existing semantic segmentation and reconstruction methods, the main goal of semantic segmentation is to disassemble complex legal documents according to their internal logical structures. However, traditional methods usually rely on fixed text formats (such as titles, numbers) during processing and perform poorly on non - standardized texts. In view of this technical problem, this solution creatively uses a conditional random field bidirectional long - short - term memory model improved by combining hierarchical label inference for semantic segmentation and reconstruction. By combining conditional random fields and bidirectional long - short - term memory networks, the recognition accuracy of hierarchical boundaries is improved, avoiding misjudgments across chapters and articles, and realizing the intelligent inference of the hierarchical relationship of articles. Even when facing legal texts with non - standard formats, the hierarchical structure of different articles can be accurately recognized.

[0021] Example 4, referring to Figure 1 , Figure 2 and Figure 5 , based on the above - mentioned example, in step S3, the text logic perception is used for extracting the logical relationship of legal documents. Specifically, according to the hierarchical legal text content recognition data, a causal graph convolutional inference neural network enhanced by combining dual - channel logic units is used for text logic perception to obtain a legal text logical relationship data set, including the following steps: Step S31: Logic unit annotation. Specifically, according to the hierarchical legal text content recognition data, define the legal logic form and perform logic unit annotation to obtain logical annotation text content data, and based on the logical annotation text content data, construct a dual - channel pointer network for logical boundary recognition to obtain legal text content logical recognition data; The dual - channel pointer network includes a text channel and a logic label channel; The calculation formula for the logic unit annotation is: ; In the formula, U j is the logic unit embedding vector, j is the logical perception sentence vector index, is the multi - layer perceptron function for defining the legal logic form, E jis the semantic vector corresponding to the j-th sentence vector in the hierarchical legal text content recognition data, T j is the label type corresponding to the j-th sentence vector in the hierarchical legal text content recognition data; The calculation formula of the dual-channel pointer network is: ; In the formula, is the output of the text channel, is the output of the logical label channel, softmax(·) is the classifier function, q is the text pointer query vector, r is the logical pointer query vector, E i is the semantic vector of the i-th sentence, T i is the label type of the i-th sentence, b i is the logical boundary recognition output, argmax(·) is the function to find the maximum value, is the dual-channel weight; Preferably, the specific value of the dual-channel weight is 0.6; Step S32: Causal graph convolutional reasoning, specifically constructing a multi-source dynamic causal graph through node definition and edge generation; the node definition is specifically taking the logical units in the legal text content logical recognition data as nodes, constructing multi-source edges, constructing a temporal-aware graph attention network, and obtaining causal graph convolutional reasoning data through time-dependent modeling; The multi-source edges include explicit logical edges, implicit logical edges, and entity alignment edges; The explicit logical edge refers to the explicit logical relationship with the keywords of "shall", "prohibit", and "unless"; the implicit logical edge refers to the implicit logical relationship with cross-clause references; the entity alignment edge refers to the entity alignment relationship of multiple clauses involving the same legal object; The calculation formula for constructing the multi-source dynamic causal graph is: ; In the formula, G is the multi-source dynamic causal graph, V is the node parameter, E is the edge parameter, v j is the node index, U j is the logical unit embedding vector, E exp is the explicit logical edge, E imp is the implicit logical edge, E ent is the entity alignment edge; The calculation formula for constructing the temporal-aware graph attention network is: ; In the formula, is the output hidden state of the (l + 1)-th layer of the temporal-aware graph attention network, which is used to represent the causal graph convolution inference data. ReLU(·) is a non-linear activation function, t is the multi-source edge type index. is the adjacency matrix of the t-th type of edge. is the output hidden state of the l-th layer of the temporal-aware graph attention network. is the graph convolution weight of the t-th type of edge. Step S33: Logic verification. Specifically, based on the causal graph convolution inference data, interference samples are generated by randomly deleting conditions and randomly replacing the subject, and the adversarial logic evaluation loss is constructed to perform logic verification on the interference samples, obtaining logic consistency evaluation data; the logic consistency evaluation data is used to reflect the logic perception performance. The calculation formula of the adversarial logic evaluation loss is: ; In the formula, is the adversarial logic evaluation loss. is the expectation calculation function for the original legal logic pair where the whole is the original legal logic pair, is the probability of judging the original legal logic pair as true, where is the identifier of the logic consistency discriminator, y is the pairing judgment result. ab is the probability of judging the generated adversarial sample pair as false, where is the generated adversarial sample pair; is the generated adversarial sample pair; Step S34: Text logic perception. Specifically, through the logic unit annotation, the causal graph convolution inference, and the logic verification, the text logic perception model is trained and used to perform text logic perception, obtaining a legal text logic relationship dataset.

[0022] By performing the above operations, for the technical problem that in the existing text logic perception methods, traditional text analysis methods mainly rely on keyword matching or inference models based on static rules, but these methods are difficult to accurately depict complex legal logic relationships, this solution creatively uses a causal graph convolution inference neural network enhanced by a dual-channel logic unit for text logic perception, realizing dual-channel modeling based on semantic understanding and logical reasoning. It not only considers the literal relationship on the surface of the text, but also combines context information to infer the implicit logic between legal provisions, which helps to automatically identify which provisions are related to each other and provides more reliable logical reasoning support for the application of regulations.

[0023] Example 5, refer to Figure 1 、 Figure 2 andFigure 6 , in step S4, the dynamic knowledge fusion is used for obligation graph construction. Specifically, based on the legal text logical relationship dataset and the hierarchical legal text content recognition data, a role-aware enhanced triple extraction method is adopted to perform dynamic knowledge fusion to obtain legal text structured information data, including the following steps: Step S41: Construct a legal knowledge base. Specifically, based on the legal text logical relationship dataset, a legal knowledge memory bank is constructed, and through a pre-trained model, legal article feature embedding is performed to obtain an initial knowledge base of legal text information. The calculation formula is: ; In the formula, K i is the legal knowledge vector corresponding to the i-th sentence of the legal article, which is used to represent the result of legal article feature embedding and construct the initial knowledge base of legal text information. i is the sentence index, is the pre-trained legal language model function, which is used to represent the pre-trained model. Specifically, the LegalBERT model is adopted as the basic model, and L i is the original text data of the i-th sentence of the legal article, PosEnc(·) is the position encoding function, and Section i is the chapter position parameter; Step S42: Differential knowledge update. Specifically, a differential knowledge update algorithm is constructed. When the legal text is updated, only the legal features corresponding to the affected keywords are fine-tuned to optimize the maintainability of the legal knowledge base. The calculation formula is: ; In the formula, is the updated legal knowledge vector, Update(·) is the incremental learning parameter, K i is the legal knowledge vector corresponding to the i-th sentence of the legal article, is the model parameter of the pre-trained model, Sim(·) is the cosine similarity metric function, L i is the original text data of the i-th sentence of the legal article, is the original text data of the updated new legal article, is the change threshold; Step S43: Construct a role-constrained triple extraction model. Specifically, a generative sequence-to-relation model is adopted, and a role-aware mechanism is introduced to perform legal role embedding and legal obligation classification to obtain role logic reference data. Then, based on the role logic reference data, role and legal obligation extraction are performed to obtain role obligation triple data; The calculation formula for the legal role embedding is: ; In the formula, R kis legal role-embedded data, RoleEnc(·) is the role encoding function, r k is the legal role name, k is the legal role index, Attn(·) is the attention matching function, C k is the contextual content information of the legal role, and K is the legal knowledge vector in the legal knowledge base; The calculation formula of the said role obligation triple is: ; In the formula, (s, a, o) is the role obligation triple, Gen(·) is the Seq2Rel generation model function, R k is the legal role-embedded data, H t is the contextual feature vector data; The said role obligation triple data includes the subject, the behavior, and the object; The said subject and object are used to represent the role; the said behavior is used to represent the legal obligation; Step S44: Adversarial negative sampling enhancement, specifically, based on the said role obligation triple data, through negative sample generation, obtain the contrast sample data, and introduce the adversarial margin distance as the loss function to perform adversarial negative sampling enhancement, optimize the accuracy of the legal obligation in the said role obligation triple data, and obtain the obligation-optimized triple data; The calculation formula of the said adversarial negative sampling enhancement is: ; In the formula, is the adversarial negative sampling loss, is the set of triple positive samples, max(·) is the function to find the maximum value, is the margin distance safety boundary parameter, is the semantic distance of the triple, is the semantic distance of the generated and constructed negative sample; Step S45: Triple calibration, specifically, based on the said obligation-optimized triple data, through obligation type query analysis, perform consistency detection to obtain the role-optimized triple data, and the calculation formula is: ; In the formula, is the role-optimized triple data, Query(a) is the obligation type abstracted from the behavior, and LegalClass(s, o) is the set of legal behaviors of the behavior role in the legal knowledge base; Step S46: Knowledge fusion, specifically, through the said construction of the legal knowledge base, the differential knowledge update, the construction of the triple extraction model with role constraints, the adversarial negative sampling enhancement, and the triple calibration, perform knowledge fusion to obtain the legal text structured information data.

[0024] By performing the above operations, in view of the technical problem in the existing dynamic knowledge fusion method that the traditional knowledge extraction method mainly relies on static rules or predefined templates and is difficult to adapt to the changing role relationships in legal texts, this solution creatively adopts a role-aware enhanced triple extraction method for dynamic knowledge fusion, enhances the knowledge fusion ability between regulations, automatically integrates relevant content in multiple legal texts, and improves the accuracy and integrity of legal information retrieval.

[0025] Example 6, refer to Figure 1 and Figure 2 In this example, based on the above example, in step S5, the information extraction enhancement is used for the comprehensive enhancement of legal text information extraction. Specifically, by combining the hierarchical legal text content recognition data, the legal text logical relationship data set, and the legal text structured information data, information extraction enhancement is performed to obtain the legal text comprehensive information extraction reference data.

[0026] Example 7, refer to Figure 1 and Figure 2 In this example, based on the above example, an artificial intelligence-based legal text information extraction enhancement system provided by the present invention includes an input processing module, an enhancement extraction module, and an inference output module; The input processing module is used for data acquisition and processing. Through data acquisition and processing, an optimized legal text data set is obtained, and the optimized legal text data set is sent to the enhancement extraction module; The enhancement extraction module is used for semantic segmentation and reconstruction, text logic perception, and dynamic knowledge fusion. Through semantic segmentation and reconstruction, text logic perception, and dynamic knowledge fusion, hierarchical legal text content recognition data, legal text logical relationship data sets, and legal text structured information data are obtained, and the hierarchical legal text content recognition data, legal text logical relationship data sets, and legal text structured information data are sent to the inference output module; The inference output module is used for information extraction enhancement. Through information extraction enhancement, legal text comprehensive information extraction reference data is obtained.

[0027] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device.

[0028] Although embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the invention.

[0029] The above describes the present invention and its embodiments. Such description is not restrictive. What is shown in the drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. In summary, if those of ordinary skill in the art are inspired by it and, without departing from the purpose of the present invention, design similar structural modes and embodiments to this technical solution without creative efforts, they shall fall within the protection scope of the present invention.

Claims

1. An enhanced method for extracting legal text information based on artificial intelligence, characterized in that: The method includes the following steps: Step S1: Data collection and processing to obtain an optimized legal text dataset; Step S2: Semantic segmentation and reconstruction. Using a conditional random field bidirectional long short-term memory model improved by combining hierarchical label inference to perform semantic segmentation and reconstruction to obtain hierarchical legal text content recognition data, including the following steps: Step S21: Joint feature extraction; Step S22: Gated fusion feature embedding; Step S23: Feature segmentation; Step S24: Hierarchical label inference; Step S25: Structure tree generation; Step S26: Semantic segmentation and reconstruction; Step S3: Text logic perception. Using a causal graph convolutional inference neural network enhanced by combining dual-channel logic units to perform text logic perception to obtain a legal text logical relationship dataset, including the following steps: Step S31: Logic unit annotation; Step S32: Causal graph convolutional inference; Step S33: Logic verification; Step S34: Text logic perception; Step S4: Dynamic knowledge fusion. Using a role-aware enhanced triple extraction method to perform dynamic knowledge fusion to obtain legal text structured information data, including the following steps: Step S41: Construct a legal knowledge base; Step S42: Differential knowledge update; Step S43: Construct a triple extraction model with role constraints; Step S44: Adversarial negative sampling enhancement; Step S45: Triple calibration; Step S46: Dynamic knowledge fusion; Step S5: Information extraction enhancement to obtain reference data for comprehensive information extraction of legal texts.

2. An enhanced method for extracting legal text information based on artificial intelligence according to claim 1, characterized in that: In step S1, the data collection and processing is used to construct a multi-source heterogeneous legal text corpus and perform adaptive preprocessing. Specifically, through multi-modal data collection, an original dataset for legal text information extraction is obtained, and the original dataset for legal text information extraction is subjected to data optimization processing to obtain an optimized legal text dataset; The original dataset for legal text information extraction includes legislative texts, case texts, contract template texts, legal service material texts, legal code book texts, and annotation material texts; The steps of the data optimization processing include: Step S11: Adversarial data cleaning. Specifically, by introducing a noise detection model based on a generative adversarial network and combining structured text and scanned image reference data, text typesetting errors and non-standard typesetting interference are identified, and cleaned and optimized text data is obtained; Step S12: Layout structure enhancement. Specifically, by introducing a structure information analysis method based on layout rule recognition and according to the cleaned and optimized text data, the recognition of titles, clause numbers, paragraph numbers, and icon information is performed, and layout structure enhancement label annotation data is generated; Step S13: Enhanced word segmentation. Specifically, based on the layout structure enhancement label annotation data, an enhanced word segmentation is performed using a domain-optimized word segmentation tool to obtain word segmentation reference data; The domain-optimized word segmentation tool specifically refers to a word segmentation tool that combines standard SentencePiece extension and Spacy extension for legal format self-defined rule optimization; Step S14: Data optimization processing, specifically, through the adversarial data cleaning, the layout structure enhancement, and the enhanced word segmentation, perform data optimization processing to obtain an optimized legal text dataset; The optimized legal text dataset includes text information data, structural feature data, and logical label data.

3. An enhanced method for extracting legal text information based on artificial intelligence according to claim 2, characterized in that: In step S2, the semantic segmentation and reconstruction is used for hierarchical legal document content recognition. Specifically, based on the optimized legal text dataset, adopt a conditional random field bidirectional long short-term memory model combined with hierarchical label inference improvement to perform semantic segmentation and reconstruction to obtain hierarchical legal text content recognition data, including the following steps: Step S21: Joint feature extraction, specifically, through text vectorization and dependency syntactic analysis, perform multi-channel feature extraction to obtain syntactic, semantic, and structural information of the legal text, and obtain sentence-level legal text feature data; Step S22: Gated fusion feature embedding, specifically, construct a gated mechanism, and based on the sentence-level legal text feature data, integrate semantic information, syntactic information, and structural information to obtain fused feature data; Step S23: Feature segmentation, specifically, adopt a multi-scale window segmentation strategy to perform sentence-level, clause-level, and chapter-level feature extraction, and through constructing a bidirectional long short-term memory model, predict the sentence-level segmentation boundary of legal clauses to obtain initial segmentation data; Step S24: Hierarchical label inference, specifically, through constructing an improved conditional random field model, perform hierarchical label inference based on the initial segmentation data to obtain sentence-level label data; The improved conditional random field model is specifically calculated through inference layer conditional probability calculation and hierarchical consistency correction optimization; Step S25: Structure tree generation, specifically, based on the sentence-level label data and the initial segmentation data, adopt a recursive nesting method to construct a logical hierarchy tree, and correct the logical hierarchy tree through structural consistency verification to obtain tree-like hierarchical structure data; Step S26: Semantic segmentation and reconstruction, specifically, standardize the format of the initial segmentation data according to the tree-like hierarchical structure data to obtain standard format segmentation data, and automatically extract the first legal clause of the standard format segmentation data as a hierarchical summary to construct hierarchical legal text content recognition data.

4. An enhanced method for extracting legal text information based on artificial intelligence according to claim 3, characterized in that: In step S3, the text logic perception is used for legal document logical relationship extraction. Specifically, based on the hierarchical legal text content recognition data, adopt a causal graph convolutional inference neural network combined with dual-channel logic unit enhancement to perform text logic perception to obtain a legal text logical relationship dataset, including the following steps: Step S31: Logical unit annotation, specifically, based on the hierarchical legal text content recognition data, define legal logic forms and perform logical unit annotation to obtain logically annotated text content data, and based on the logically annotated text content data, construct a dual-channel pointer network to perform logical boundary recognition to obtain legal text content logical recognition data; The dual-channel pointer network includes a text channel and a logical label channel; Step S32: Causal graph convolutional reasoning, specifically constructing a multi-source dynamic causal graph through node definition and edge generation. The node definition is specifically to use the logical units in the logical recognition data of the legal text content as nodes, construct multi-source edges, build a temporal-aware graph attention network, and obtain causal graph convolutional reasoning data through time-dependent modeling. The multi-source edges include explicit logical edges, implicit logical edges, and entity alignment edges. Step S33: Logical verification, specifically generating interference samples by randomly deleting conditions and randomly replacing the subject based on the causal graph convolutional reasoning data, and evaluating them by constructing adversarial logic to perform logical verification of the interference samples to obtain logical consistency evaluation data. The logical consistency evaluation data is used to reflect the logical perception performance. Step S34: Text logical perception, specifically training and using a text logical perception model through the logical unit annotation, the causal graph convolutional reasoning, and the logical verification to perform text logical perception and obtain a legal text logical relationship dataset.

5. An enhanced method for extracting legal text information based on artificial intelligence according to claim 4, characterized in that: In step S4, the dynamic knowledge fusion is used for obligation graph construction. Specifically, based on the legal text logical relationship dataset and the hierarchical legal text content recognition data, a role-aware enhanced triple extraction method is used to perform dynamic knowledge fusion to obtain legal text structured information data, including the following steps: Step S41: Construct a legal knowledge base, specifically constructing a legal knowledge memory bank based on the legal text logical relationship dataset, and performing legal provision feature embedding through a pre-trained model to obtain an initial legal text information knowledge base. Step S42: Differential knowledge update, specifically constructing a differential knowledge update algorithm. When the legal text is updated, only the legal features corresponding to the affected keywords are fine-tuned to optimize the maintainability of the legal knowledge base. Step S43: Construct a role-constrained triple extraction model, specifically using a generative sequence-to-relation model and introducing a role-aware mechanism to perform legal role embedding and legal obligation classification to obtain role logic reference data, and performing role and legal obligation extraction based on the role logic reference data to obtain role obligation triple data. The role obligation triple data includes a subject, an action, and an object. The subject and the object are used to represent roles; the action is used to represent legal obligations. Step S44: Adversarial negative sampling enhancement, specifically obtaining comparison sample data through negative sample generation based on the role obligation triple data, and introducing an adversarial margin distance as a loss function to perform adversarial negative sampling enhancement to optimize the accuracy of the legal obligations in the role obligation triple data to obtain obligation-optimized triple data. Step S45: Triple calibration, specifically performing consistency detection through obligation type query analysis based on the obligation-optimized triple data to obtain role-optimized triple data. Step S46: Knowledge fusion, specifically, through the construction of the legal knowledge base, the differential knowledge update, the construction of the triple extraction model with role constraints, the adversarial negative sampling enhancement, and the triple calibration, knowledge fusion is performed to obtain the legal text structured information data.

6. An enhanced method for extracting legal text information based on artificial intelligence according to claim 5, characterized in that: In step S5, the information extraction enhancement is used for the comprehensive enhancement of legal text information extraction. Specifically, by combining the hierarchical legal text content recognition data, the legal text logical relationship data set, and the legal text structured information data, information extraction enhancement is performed to obtain the legal text comprehensive information extraction reference data.

7. An enhanced system for extracting legal text information based on artificial intelligence, which is used to implement an enhanced method for extracting legal text information based on artificial intelligence as described in any one of claims 1-6, characterized in that: It includes an input processing module, an enhanced extraction module, and an inference output module.

8. An enhanced system for extracting legal text information based on artificial intelligence according to claim 7, characterized in that: The input processing module is used for data acquisition and processing. Through data acquisition and processing, an optimized legal text data set is obtained, and the optimized legal text data set is sent to the enhanced extraction module. The enhanced extraction module is used for semantic segmentation reconstruction, text logic perception, and dynamic knowledge fusion. Through semantic segmentation reconstruction, text logic perception, and dynamic knowledge fusion, hierarchical legal text content recognition data, legal text logical relationship data sets, and legal text structured information data are obtained, and the hierarchical legal text content recognition data, legal text logical relationship data sets, and legal text structured information data are sent to the inference output module. The inference output module is used for information extraction enhancement. Through information extraction enhancement, the legal text comprehensive information extraction reference data is obtained.

Citation Information

Patent Citations

  • Network security information mapping system and method based on hierarchical perception

    CN118300809A

  • Text sentiment analysis method and system of M-BiLSTM model

    CN119129576A

  • Recommendation method and device based on knowledge graph, equipment and storage medium

    CN119149697A

  • Case evidence logic deduction method based on graph neural network

    CN119721117A

  • Intelligent law data processing method and system based on big data

    CN120031040A

Cited By

  • Multi-modal case database construction method and device, electronic equipment and medium

    CN120656630A

  • Big data-based regulation applicability monitoring method and system

    CN120974217A

  • Method for constructing original text reference library based on improved reinforcement learning

    CN121326978A

  • Optimal transmission method based on structure tree logic and semantic hybrid constraint

    CN122414331A

  • Optimal transmission method based on structural tree logic and semantic hybrid constraint

    CN122414331B