Judgment document paragraph classification method and device, electronic equipment and storage medium

By dividing text and extracting the judgment documents, combining the feature enhancement of the feedforward network and the correlation analysis module, and the attribute category division of the conditional random field module, the flexibility and accuracy of the paragraph classification of the judgment documents are solved, and efficient, flexible and accurate paragraph identification and classification are achieved.

CN119807419AInactive Publication Date: 2025-04-11CHINASYS TECH

Patent Information

Application Number
CN202510111587.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has poor flexibility and insufficient accuracy in the classification of paragraphs of judgment documents, making it difficult to effectively deal with complex structured texts.

Method used

The judgment documents are divided by text based on the maximum input dimension of the classification model, and the paragraph sequence is input to the text processing module to extract semantic features. The features are further enhanced through the feedforward network and the association analysis module, and finally the attribute category division is divided using the conditional random field module.

Benefits of technology

It realizes flexible and precise classification of paragraphs of judgment documents, improves the semantic understanding ability of legal texts, ensures accurate capture and analysis of complex legal terms and logical structures, and improves the processing efficiency of paragraph recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807419A_ABST
    Figure CN119807419A_ABST
Patent Text Reader

Abstract

The invention provides a judgment document paragraph classification method and device, electronic equipment and a storage medium, and relates to the technical field of data processing.The method comprises the steps that text division is conducted on paragraphs in a target judgment document according to the maximum input dimension of a classification model, and a paragraph sequence corresponding to the target judgment document is obtained, inputting the paragraph sequence into a text processing module in a classification model to obtain semantic features of each paragraph; inputting the semantic feature of each paragraph into a feedforward network module in a classification model to obtain an enhanced semantic feature of each paragraph; inputting the enhanced semantic features of the paragraphs into a correlation analysis module in a classification model to obtain logic relation features of the paragraphs; and inputting the logic relation characteristics of each paragraph into a conditional random field module in the classification model to obtain an attribute category result of each paragraph. According to the invention, paragraph classification of the judgment document can be flexibly and accurately carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for classifying paragraphs of judicial documents. Background Art

[0002] Automatic classification and identification of different types of paragraphs in judicial documents can effectively achieve in-depth analysis of the structured business paragraph content of judicial documents, thereby improving the efficiency of legal document management and retrieval, and assisting legal workers to quickly locate specific types of information.

[0003] Traditional text classification technology usually relies on keyword matching or statistical feature extraction, treating the entire paragraph as an isolated entity for category determination, or pre-defining a series of rules for specific formats or patterns to achieve preliminary segmentation of paragraphs, and then combining them with a manually set label system to complete the classification task. However, such traditional text classification technology has the defects of poor flexibility or limited processing capabilities for complex structured texts, which makes it difficult to flexibly and accurately implement paragraph classification of judicial documents when processing long documents such as judicial documents with complex internal structures and flexible and changeable grammatical logic. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for classifying paragraphs of judicial documents, so as to solve the defects of poor flexibility and poor precision of paragraph classification of judicial documents in the prior art, and realize flexible and precise paragraph classification of judicial documents.

[0005] The present invention provides a method for classifying paragraphs of judicial documents, comprising: Performing text segmentation on each paragraph in the target judgment document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judgment document, and inputting the paragraph sequence into a text processing module in the classification model to obtain semantic features of each paragraph; Inputting the semantic features of each of the paragraphs into a feedforward network module in the classification model to obtain enhanced semantic features of each of the paragraphs; Inputting the enhanced semantic features of each of the paragraphs into the association analysis module in the classification model to obtain the logical relationship features of each of the paragraphs; Inputting the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph; The classification model is obtained by training based on sample judicial documents and attribute category labels of each paragraph in the sample judicial documents.

[0006] According to a method for classifying paragraphs of judicial documents provided by the present invention, the paragraph sequence is input into a text processing module in the classification model to obtain semantic features of each paragraph, including: Inputting the paragraph sequence corresponding to the target judgment document into the target language model in the text processing module, and using the target language model to perform semantic space feature mapping on the paragraph sequence corresponding to the target judgment document to obtain embedded features of each paragraph in the target judgment document; The embedded features of each paragraph in the target judicial document are input into the convolution layer in the text processing module, and the convolution layer applies multiple different convolution kernels to perform multi-scale feature extraction and feature fusion on the embedded features of each paragraph in the target judicial document to obtain the semantic features of each paragraph in the target judicial document.

[0007] According to a method for classifying paragraphs of judicial documents provided by the present invention, the semantic features of each paragraph are input into a feedforward network module in the classification model to obtain enhanced semantic features of each paragraph, including: Inputting the semantic features of each paragraph in the target judgment document into the feedforward network layer in the feedforward network module to obtain the nonlinear transformation features of each paragraph in the target judgment document; Inputting the nonlinear transformation features of each paragraph in the target judicial document and the semantic features of each paragraph in the target judicial document into the residual layer in the feedforward network module to obtain the first fusion features of each paragraph in the target judicial document; The first fusion features of each paragraph in the target judicial document are input into the normalization layer in the feedforward network module to obtain the standardized semantic features of each paragraph in the target judicial document, and based on the standardized semantic features, the enhanced semantic features of each paragraph in the target judicial document are determined.

[0008] According to a method for classifying paragraphs of judicial documents provided by the present invention, the enhanced semantic features of each paragraph are input into the association analysis module in the classification model to obtain the logical relationship features of each paragraph, including: Inputting the enhanced semantic features of each paragraph in the target judgment document into the first bidirectional long short-term memory network layer in the association analysis module, the first bidirectional long short-term memory network layer performs semantic logical relationship modeling according to the context information, dependency information and enhanced semantic features of each paragraph in the target judgment document, and obtains the first logical relationship features of each paragraph in the target judgment document; Inputting the first logical relationship features of each paragraph in the target judgment document into the second bidirectional long short-term memory network layer in the association analysis module, and using the second bidirectional long short-term memory network layer to perform semantic logical relationship modeling based on the context information, dependency information and first logical relationship features of each paragraph in the target judgment document, to obtain the second logical relationship features of each paragraph in the target judgment document; Inputting the enhanced semantic features and the second logical relationship features of each paragraph in the target judgment document into the residual layer in the association analysis module to obtain the second fusion features of each paragraph in the target judgment document; The second fusion features of each paragraph in the target judicial document are input into the normalization layer in the association analysis module to obtain the logical relationship features of each paragraph in the target judicial document.

[0009] According to a method for classifying paragraphs in judicial documents provided by the present invention, the text segmentation of each paragraph in the target judicial document is performed according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judicial document, including: According to the maximum input dimension, segment each paragraph in the target judgment document to obtain a plurality of initial text segments; Dividing the plurality of initial text segments into a first text segment and a second text segment according to the maximum input dimension; the length of the first text segment is less than the maximum input dimension, and the length of the second text segment is equal to the maximum input dimension; Filling each of the first text segments with data according to preset tag information and the maximum input dimension; Based on each of the second text segments and each of the filled first text segments, a paragraph sequence corresponding to the target judicial document is constructed.

[0010] According to a method for classifying paragraphs of judicial documents provided by the present invention, the classification model is trained based on the following steps: According to the sample judicial documents, unsupervised training is performed on the pre-trained language model of the initial text processing module in the initialization model to obtain a domain language model; The initialization model is updated according to the domain language model to obtain a model to be trained; According to the paragraph sequence corresponding to the sample judicial document and the attribute classification label of each paragraph in the sample judicial document, the model to be trained is supervisedly trained to obtain the classification model.

[0011] According to a method for classifying paragraphs of judicial documents provided by the present invention, the pre-trained language model of the initial text processing module in the initialization model is unsupervisedly trained based on the sample judicial documents to obtain a domain language model, including: Masking each target word in the sample judgment document to obtain a sample masked document corresponding to each target word; The pre-trained language model is trained according to the sample masked document and each of the target words to obtain the domain language model.

[0012] The present invention also provides a device for classifying paragraphs of judicial documents, comprising: A first feature extraction unit is used to perform text segmentation on each paragraph in the target judgment document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judgment document, and input the paragraph sequence into a text processing module in the classification model to obtain semantic features of each paragraph; A second feature extraction unit, used for inputting the semantic features of each paragraph into a feedforward network module in the classification model to obtain enhanced semantic features of each paragraph; A third feature extraction unit is used to input the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain the logical relationship features of each paragraph; A classification unit, used for inputting the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph; The classification model is obtained by training based on sample judicial documents and attribute category labels of each paragraph in the sample judicial documents.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for classifying paragraphs of judicial documents as described above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for classifying paragraphs of judicial documents.

[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for classifying paragraphs of judicial documents.

[0016] The judicial document paragraph classification method, device, electronic device and storage medium provided by the present invention accurately capture and extract the deep semantic features of the entire text through a text processing module, and map these features to a high-dimensional space to form semantic features. On this basis, the semantic features are deeply enhanced and deeply analyzed through a feedforward network module and an association analysis module, thereby effectively modeling the semantic logical relationship within the text. Then, in order to further improve the processing accuracy of the model for sequence labeling tasks, the conditional random field module is used to divide the attribute categories of the text paragraphs based on the logical relationship features of the text paragraphs. Not only does it achieve higher classification accuracy in the judicial document paragraph classification task, it also greatly improves the semantic understanding ability of the legal text, ensures the accurate capture and analysis of complex and changeable legal terms and logical structures, and, by optimizing the feature representation and processing flow, significantly enhances the processing efficiency of paragraph recognition, and can quickly respond to the needs of large-scale data while ensuring high accuracy, thereby effectively realizing efficient, flexible and accurate recognition and classification of each paragraph in the entire judicial document. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 It is a flow chart of the method for classifying paragraphs of judicial documents provided by the present invention.

[0019] Figure 2 It is a structural schematic diagram of the classification model provided by the present invention.

[0020] Figure 3 It is a structural schematic diagram of the judgment document paragraph classification device provided by the present invention.

[0021] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] Automatic classification and identification of different types of paragraphs in judicial documents can effectively achieve in-depth analysis of the structured business paragraph content of judicial documents, provide support for subsequent legal text mining and analysis, thereby improving legal document management and retrieval efficiency, and assisting legal workers to quickly locate specific types of information.

[0024] Some traditional text classification technologies usually rely on keyword matching or statistical feature extraction, treating the entire paragraph as an isolated entity for category determination. Although this method can meet the needs to a certain extent, it lacks accuracy and efficiency when processing long documents with complex internal structures, especially when faced with diverse legal terms and complex logical relationships.

[0025] Some traditional text classification technologies are rule-based paragraph segmentation algorithms. This type of algorithm predefines a series of rules for specific formats or patterns to achieve preliminary segmentation of paragraphs, and then combines them with a manually set label system to complete the classification task. However, as the laws and writing habits in judicial documents evolve over time, fixed rules are difficult to adapt to all changes in situations, resulting in certain limitations on the scope of application of such methods.

[0026] In summary, although the above traditional text classification technologies have solved some problems to a certain extent, they are either inflexible or have limited processing capabilities for complex structured texts, which makes it difficult to flexibly and accurately classify paragraphs of judicial documents when processing long documents such as judicial documents with complex internal structures and flexible and changeable grammatical logic. Therefore, a more intelligent and efficient solution is urgently needed to cope with the growing demand for automated processing of judicial documents.

[0027] In this regard, in order to solve the defects of poor flexibility and poor precision in paragraph classification of judicial documents in the prior art, this application provides a method for paragraph classification of judicial documents with higher accuracy and stronger adaptability. This method accurately captures and extracts the deep semantic features of the entire text through a text processing module, and maps these features to a high-dimensional space to form semantic features. On this basis, the semantic features are deeply enhanced and deeply analyzed through a feedforward network module and an association analysis module, thereby effectively modeling the semantic logical relationship within the text. In order to further improve the processing accuracy of the model for sequence labeling tasks, the conditional random field module is used to divide the attribute categories of text paragraphs, thereby efficiently, flexibly and accurately identifying and classifying each paragraph in the entire judicial document, providing a solid foundation for the automated processing of multiple types of legal documents (such as litigation texts, transcripts, review reports, etc.), promoting deeper text mining and information extraction, and providing strong technical support for intelligent legal services.

[0028] Figure 1FIG. 1 is a flow chart of the method for classifying paragraphs of judicial documents provided by the present invention, which is a method for classifying paragraphs of sequence annotation. Figure 1 As shown, the method includes step 110 , step 120 , step 130 and step 140 .

[0029] Step 110, performing text segmentation on each paragraph in the target judicial document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judicial document, and inputting the paragraph sequence into a text processing module in the classification model to obtain semantic features of each paragraph; wherein the classification model is trained based on sample judicial documents and attribute category labels of each paragraph in the sample judicial documents.

[0030] Optionally, before executing step 110, a classification model needs to be pre-trained. Specifically, an initialization model can be constructed first; the initialization model here includes but is not limited to an initial text processing module, an initial feedforward network module, an initial association analysis module, and an initial conditional random field module; wherein each network layer in the initial text processing module, the initial feedforward network module, the initial association analysis module, and the initial conditional random field module can be a network layer prepared for each required function after parameter initialization, or a pre-trained network layer with functions required to be implemented in advance, and this embodiment does not specifically limit this.

[0031] In addition, sample judicial documents of various lengths and in various scenarios may be collected, as well as attribute category labels of each paragraph in the sample judicial documents; the attribute category labels here may be formed by class sequence labeling of each paragraph in the sample judicial documents according to the attribute category; the attribute categories here include but are not limited to litigation subject information, trial process information, litigation and defense information, factual statement information, dispute focus information, applicable legal information, court opinion information, and judgment result information, which are not specifically limited in this embodiment.

[0032] Subsequently, the initialization model can be jointly trained in an unsupervised and supervised manner based on the sample judicial documents and the attribute category labels of each paragraph in the sample judicial documents, so as to obtain a classification model that can efficiently and accurately identify and classify the attribute category results of each paragraph based on the judicial documents; the training here can be staged frozen training, or overall dynamic adjustment training, etc., which is not specifically limited in this embodiment.

[0033] After the classification model is trained according to the above steps, in order to ensure that the target judicial documents whose sequence length exceeds the maximum input dimension of the classification model can be fully included in the calculation and maintain the integrity of the paragraph structure, the paragraphs in the target judicial documents can be divided into text according to the maximum input dimension of the classification model, so as to divide the paragraphs in the target judicial documents into multiple text segments that match the maximum input dimension of the classification model, thereby forming a paragraph sequence corresponding to the target judicial document. The division here can be sliding window division according to a fixed window size, or division according to sentences, or division according to a model with text segmentation, etc. This embodiment does not specifically limit this.

[0034] After segmenting to obtain the paragraph sequence corresponding to the target judgment document, the paragraph sequence corresponding to the target judgment document may be input as a whole into the text processing module in the classification model, so that the text processing module applies the paragraph sequence to extract the semantic features of each paragraph, thereby obtaining the semantic features of each paragraph. The semantic feature extraction here includes but is not limited to semantic space mapping, and the association capture between local semantic features and global semantic features, which is not specifically limited in this embodiment.

[0035] The text processing module here can be constructed based on one or more network layers that can extract semantic features, such as a target speech model, or a fusion of a target speech model and a convolutional layer. This embodiment does not specifically limit this.

[0036] Step 120: inputting the semantic features of each of the paragraphs into the feedforward network module in the classification model to obtain enhanced semantic features of each of the paragraphs.

[0037] Optionally, after obtaining the semantic features of each paragraph, in order to enable the classification model to more effectively capture complex feature patterns and enhance its expressiveness, the semantic features of each paragraph can be input into a feed-forward network (FFN) module in the classification model, so that the semantic features of each paragraph can be applied by the feed-forward network to perform nonlinear feature changes, so as to further refine the feature representation and ensure the coherence and stability of the information flow, thereby enhancing the semantic features of each paragraph and obtaining the enhanced semantic features of each paragraph, thereby improving the learning ability and generalization performance of the classification model.

[0038] The feedforward network module here can be formed by constructing a feedforward network layer based on a multi-layer feedforward network, or it can be formed by jointly constructing the feedforward network layer with other network layers, such as a residual network layer and / or a normalized network. This embodiment does not make specific limitations on this and can be adaptively set according to actual needs.

[0039] Step 130: input the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain the logical relationship features of each paragraph.

[0040] Optionally, after obtaining the enhanced semantic features of each paragraph, in order to more deeply explore the complex semantic logical relationships within the text, the enhanced semantic features of each paragraph can be input into the association analysis module in the classification model, so that the association analysis module can apply the enhanced semantic features of each paragraph to perform in-depth association analysis, thereby effectively modeling the semantic logical relationships within the text, thereby obtaining the logical relationship characteristics of each paragraph.

[0041] The association analysis here can be achieved by combining the context information and / or dependency information of each paragraph to perform complex semantic logical relationship analysis between paragraphs.

[0042] The association analysis module here can be constructed based on one or more layers of time series models, such as a bidirectional long short-term memory network (Bi-directional Long Short-Term Memory, BiLSTM), etc., or it can be jointly constructed on the basis of one or more layers of time series models in combination with other network layers, such as a residual network layer, a normalized network, etc. This embodiment does not specifically limit this.

[0043] Step 140: Input the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph.

[0044] Optionally, after obtaining the logical relationship features of each paragraph, in order to further improve the performance of the classification model on the task of classifying paragraphs in judicial documents, the Conditional Random Field (CRF) module set at the top level of the classification model architecture can be used as a probabilistic graph model to capture the dependency relationship between the attribute classification information of each paragraph. By optimizing the consistency of the global attribute classification sequence, the sequence labeling task of the attribute category of each paragraph in the target judicial document is performed, thereby obtaining accurate attribute category results for each paragraph.

[0045] The method provided in this embodiment accurately captures and extracts the deep semantic features of the entire text through a text processing module, and maps these features to a high-dimensional space to form semantic features. On this basis, the semantic features are deeply enhanced and deeply analyzed through a feedforward network module and an association analysis module, thereby effectively modeling the semantic logical relationship within the text. Then, in order to further improve the processing accuracy of the model for sequence labeling tasks, the conditional random field module is used to divide the attribute categories of the text paragraphs based on the logical relationship features of the text paragraphs. This not only achieves higher classification accuracy in the task of classifying paragraphs in judicial documents, but also greatly improves the semantic understanding ability of legal texts, ensuring the accurate capture and analysis of complex and changeable legal terms and logical structures. Moreover, by optimizing feature representation and processing procedures, the processing efficiency of paragraph recognition is significantly enhanced, and it is possible to quickly respond to the needs of large-scale data while ensuring high accuracy, thereby effectively realizing efficient, flexible and accurate recognition and classification of each paragraph in the entire judicial document.

[0046] In some embodiments, step 110 specifically includes: Inputting the paragraph sequence corresponding to the target judgment document into the target language model in the text processing module, and using the target language model to perform semantic space feature mapping on the paragraph sequence corresponding to the target judgment document to obtain embedded features of each paragraph in the target judgment document; The embedded features of each paragraph in the target judicial document are input into the convolution layer in the text processing module, and the convolution layer applies multiple different convolution kernels to perform multi-scale feature extraction and feature fusion on the embedded features of each paragraph in the target judicial document to obtain the semantic features of each paragraph in the target judicial document.

[0047] Figure 2 It is a structural diagram of the classification model provided by the present invention; Figure 2 As shown, the text processing module in the classification model includes a target language model and a convolutional layer connected sequentially.

[0048] Among them, the target speech model can be other language models such as the RoBERTa (Robustly OptimizedBERT Approach) model trained with sample data. The following takes the RoBERTa model trained with sample data as an example to describe the method provided in this embodiment.

[0049] Optionally, in the actual semantic feature extraction process, the paragraph sequence corresponding to the target judicial document may be first input into the RoBERTa module trained with sample data in the text processing module, so that the RoBERTa module can gradually map and embed each text segment in the paragraph sequence corresponding to the target judicial document into a more compact and information-concentrated semantic space through the powerful language understanding ability of the continuous multi-layer Transformer encoder trained with sample data, thereby reducing the computational complexity caused by the dimensionality curse and enhancing the generalization ability and semantic consistency of the feature representation, thereby obtaining the embedded features of each paragraph in the target judicial document. Here, each element in the embedded feature is a low-dimensional feature vector rich in semantic information mapped from a high-dimensional space.

[0050] For example, for each text segment in the paragraph sequence corresponding to each target judicial document, the RoBERTa module trained with sample data can be used to gradually map and embed its 512-dimensional token sequence into a more compact and information-concentrated 128-dimensional feature space, thereby obtaining a series of 128-dimensional feature vectors to reduce the computational complexity caused by the dimensionality curse and enhance the generalization ability and semantic consistency of feature representation. Assume that each paragraph can be represented as a 4×5124×512 matrix, in which each row corresponds to a text segment of 512 tokens; after being embedded by the RoBERTa module trained with sample data, it can be converted into a 4×1284×128 embedded feature, in which each element is a low-dimensional feature vector mapped from a high-dimensional space and rich in semantic information.

[0051] In addition, in order to further refine the embedded features of each paragraph in the target judicial document, the embedded features of each paragraph in the target judicial document can be input into the convolutional layer, and the convolutional layer can use multiple different convolution kernels to perform multi-scale feature extraction and feature fusion on the embedded features of each paragraph to obtain the semantic features of each paragraph in the target judicial document.

[0052] The multi-scale feature extraction and feature fusion here can capture the association between local patterns and global structures at different levels through sliding scanning of convolution kernels, thereby generating a comprehensive feature vector to form the semantic features of each paragraph in the target judicial document. The semantic features here condense the core semantic information of the entire text paragraph, which not only retains the integrity of the text, but also enhances the attention to details, providing high-quality input representation for subsequent sequence annotation and other advanced analysis tasks.

[0053] The method provided in this embodiment fully utilizes the powerful semantic understanding ability of the language model that has been pre-trained on a large-scale text dataset and the correlation ability between the local pattern and the global structure of the convolutional layer, and introduces a highly adaptive data processing mechanism to accurately capture and extract the deep semantic features of the entire text, and map these features into the semantic space to form semantic features, thereby greatly improving the semantic understanding ability of judicial documents, providing high-quality input representation for subsequent sequence annotation, and thus improving the accuracy and efficiency of judicial document paragraph classification.

[0054] In some embodiments, step 120 specifically includes: Inputting the semantic features of each paragraph in the target judgment document into the feedforward network layer in the feedforward network module to obtain the nonlinear transformation features of each paragraph in the target judgment document; Inputting the nonlinear transformation features of each paragraph in the target judicial document and the semantic features of each paragraph in the target judicial document into the residual layer in the feedforward network module to obtain the first fusion features of each paragraph in the target judicial document; The first fusion features of each paragraph in the target judicial document are input into the normalization layer in the feedforward network module to obtain the standardized semantic features of each paragraph in the target judicial document, and based on the standardized semantic features, the enhanced semantic features of each paragraph in the target judicial document are determined.

[0055] like Figure 2 As shown, the feedforward network module includes a feedforward network layer, a residual layer and a normalization layer (LayerNormalization, LN); wherein the residual layer is used to establish a residual connection between the input end and the output end of the feedforward network layer. The normalization layer is set after the residual layer.

[0056] Optionally, after obtaining the semantic features of each paragraph in the target judicial document through step 110, the semantic features of each paragraph in the target judicial document can be first input into the feedforward network layer, so that the feedforward network layer can apply the semantic features of each paragraph to perform nonlinear transformation to further refine the feature representation and ensure the coherence and stability of the information flow, thereby obtaining the nonlinear transformation features of each paragraph in the target judicial document.

[0057] The feedforward network layer consists of two parts: the first is the fully connected layer (FC), and the second is the activation function layer, such as the linear rectifier function (ReLU). The specific calculation formula of the fully connected layer is as follows: FFN(x)=max(0,xW1+b1)W2+b2; Among them, x represents the semantic features of the feedforward network layer input (such as a 128-dimensional feature vector); W1 and W2 are the weight matrices of the first and second fully connected layers, respectively, and b1 and b2 are the corresponding bias terms.

[0058] The ReLU activation function is used to introduce nonlinearity, allowing the model to capture complex relationships in the data during the learning process, rather than just linear transformations.

[0059] In addition, in order to keep the information transmission path of the model clear and avoid the problem of gradient disappearance or explosion, the semantic features of each paragraph in the target judgment document input by the feedforward network module and the nonlinear transformation features of each paragraph in the target judgment document processed and output by the feedforward network layer can also be added and fused through residual connection (RC) to obtain the first fusion features of each paragraph in the target judgment document. Therefore, the feature fusion of the semantic features of each paragraph in the target judgment document input by the residual connection feedforward network module and the nonlinear transformation features of each paragraph in the target judgment document processed and output by the feedforward network layer not only helps to alleviate the degradation problem that may occur during deep network training, but also promotes fast information flow, ensuring that the original input features are directly involved in the final output, thereby improving the overall performance of the model. Specifically, for a given input feature vector x, the transformed feature vector y=FFN(x) is first processed by the feedforward network layer, and then the residual is added to the original input x to obtain the first fusion feature z, and the specific calculation formula is z=x+y. This operation ensures that effective signal propagation is maintained even in deep networks, while enhancing the learning ability and generalization performance of the model.

[0060] In addition, in order to stabilize the model training process and improve the convergence speed, the first fusion features of each paragraph in the target judicial document output by the residual layer can also be input into the normalization layer, so that the normalization layer can obtain the standardized semantic features of each paragraph in the target judicial document after standardizing the activation values ​​of each layer, and use the standardized semantic features as the enhanced semantic features of each paragraph in the target judicial document. Thus, through the standardization of the normalization layer, the internal covariate shift is reduced, making the model more robust on different batches of data. In addition, it also helps to speed up the training process because the standardized activation value distribution is more consistent, which helps the optimization algorithm find the global optimal solution faster.

[0061] The method provided in this embodiment introduces a feedforward neural network layer, a residual connection, and a normalization layer to perform nonlinear feature transformation, feature fusion, and feature normalization processing to further refine the feature representation and maintain the coherence and stability of the information flow, thereby improving the learning ability and generalization performance of the model, thereby effectively achieving feature enhancement and stabilization, and further optimizing the classification effect of the judicial document paragraphs.

[0062] In some embodiments, step 130 specifically includes: Inputting the enhanced semantic features of each paragraph in the target judgment document into the first bidirectional long short-term memory network layer in the association analysis module, the first bidirectional long short-term memory network layer performs semantic logical relationship modeling according to the context information, dependency information and enhanced semantic features of each paragraph in the target judgment document, and obtains the first logical relationship features of each paragraph in the target judgment document; Inputting the first logical relationship features of each paragraph in the target judgment document into the second bidirectional long short-term memory network layer in the association analysis module, and using the second bidirectional long short-term memory network layer to perform semantic logical relationship modeling based on the context information, dependency information and first logical relationship features of each paragraph in the target judgment document, to obtain the second logical relationship features of each paragraph in the target judgment document; Inputting the enhanced semantic features and the second logical relationship features of each paragraph in the target judgment document into the residual layer in the association analysis module to obtain the second fusion features of each paragraph in the target judgment document; The second fusion features of each paragraph in the target judicial document are input into the normalization layer in the association analysis module to obtain the logical relationship features of each paragraph in the target judicial document.

[0063] like Figure 2 As shown, the association analysis module includes two layers of bidirectional long short-term memory network layers, namely the first bidirectional long short-term memory network layer (also the first layer of BiLSTM) and the second bidirectional long short-term memory network layer (also the second layer of BiLSTM), and also includes a residual layer and a normalization layer. Among them, the residual layer here is used to establish a residual connection between the input of the association analysis module and the output of the second bidirectional long short-term memory network layer, and the normalization layer is set after the residual layer.

[0064] Among them, BiLSTM is a variant of Recurrent Neural Network (RNN), which can capture richer time-dependent information and contextual information by simultaneously considering forward and reverse information flows in time series data. It is widely used in processing text data with long-term dependencies, such as multi-paragraph structures in legal documents.

[0065] Optionally, after the enhanced semantic features of each paragraph in the target judgment document are obtained through step 120, in order to more deeply explore the complex semantic logical relationships within the text, the enhanced semantic features of each paragraph in the target judgment document (such as a 128-dimensional enhanced semantic feature vector) can be first input into the first layer of BiLSTM, so that the first layer of BiLSTM can use its two independent long short-term memory networks (LSTM) units to obtain relevant information of the context of each paragraph at the same time, so as to obtain the context information and dependency information of each paragraph, and use the context information, dependency information and enhanced semantic features of each paragraph in the target judgment document to perform semantic logical relationship modeling, so as to obtain the first logical relationship features of each paragraph in the target judgment document.

[0066] There are two independent LSTM units in the first layer of BiLSTM: one is used to process sequence information from left to right (i.e., from front to back), and the other is responsible for processing sequence information from right to left (i.e., from back to front). This bidirectional design enables the model to obtain relevant information of the context at the same time, so as to better understand the position of each paragraph in the entire document and its relationship with other paragraphs. The output of each layer not only contains the information of the current time step, but also integrates the contextual information from the past and future time steps, which greatly enhances the model's ability to understand the text structure.

[0067] Next, the first logical relationship features of each paragraph in the target judgment document output by the first layer of BiLSTM are passed to the second layer of BiLSTM for deeper modeling, that is, the second bidirectional long short-term memory network layer performs semantic logical relationship modeling based on the context information, dependency information and first logical relationship features of each paragraph in the target judgment document to obtain the second logical relationship features of each paragraph in the target judgment document.

[0068] It should be noted that the second-layer BiLSTM has the same structure as the first-layer BiLSTM and also adopts a bidirectional architecture, but its main purpose is to integrate and abstract information at a higher level and capture more complex semantic patterns and logical relationships.

[0069] In summary, through the stacked two-layer BiLSTM, the classification model can gradually build a hierarchical semantic representation system, in which each layer focuses on information extraction at different granularity levels. This hierarchical structure helps the model grasp the overall context and pay attention to local details when facing complex texts, thereby achieving more accurate semantic analysis.

[0070] In addition, in order to ensure the effective transmission of information and prevent the gradient vanishing problem during the deep network training process, the second logical relationship features of each paragraph in the target judgment document output by the second layer BiLSTM and the enhanced semantic features of each paragraph in the target judgment document input by the association analysis module can also be input into the residual layer in the association analysis module, so that the residual layer can perform residual fusion on the second logical relationship features of each paragraph in the target judgment document and the enhanced semantic features of each paragraph in the target judgment document to obtain the second fused features of each paragraph in the target judgment document. Here, the residual connection allows information to be directly transmitted from one layer to the next layer without passing through all the intermediate layers, which not only stabilizes the training process, but also improves the learning efficiency of the model.

[0071] In addition, in order to promote the stability of model training and accelerate convergence, the second fusion features of each paragraph in the target judicial document output by the residual layer can also be input into the normalization layer, so that the normalization layer can apply the second fusion features of each paragraph in the target judicial document to standardize the activation values ​​of each layer, and obtain the logical relationship features of each paragraph in the target judicial document. Thus, through the standardization of the normalization layer, the internal covariate shift is reduced, making the model more robust on different batches of data. In addition, it also helps to speed up the training process, because the distribution of activation values ​​after standardization is more consistent, which helps the optimization algorithm find the global optimal solution faster.

[0072] The method provided in this embodiment introduces a two-layer bidirectional long short-term memory network to model the complex semantic logical relationship between paragraphs, captures the relevant information of the context through a bidirectional design, achieves more accurate semantic analysis, and applies residual connection and layer normalization to promote deep information transmission and model stability, so as to effectively achieve deep-level semantic logical relationship modeling, thereby effectively modeling the semantic logical relationship within the text, thereby ensuring the accurate capture and analysis of complex and changeable legal terms and logical structures, and effectively achieving efficient, flexible and accurate recognition and classification of each paragraph in the entire judicial document.

[0073] In some embodiments, step 110 further includes: According to the maximum input dimension, segment each paragraph in the target judgment document to obtain a plurality of initial text segments; Dividing the plurality of initial text segments into a first text segment and a second text segment according to the maximum input dimension; the length of the first text segment is less than the maximum input dimension, and the length of the second text segment is equal to the maximum input dimension; Filling each of the first text segments with data according to preset tag information and the maximum input dimension; Based on each of the second text segments and each of the filled first text segments, a paragraph sequence corresponding to the target judicial document is constructed.

[0074] It should be noted that when processing long texts such as judicial documents, due to the limitation of the maximum input dimension of the classification model (such as 512 tokens), information truncation will occur, which will affect the complete understanding of the semantics of the entire paragraph. Given that long paragraphs exceeding this limit often appear in legal documents, directly inputting the original judicial documents into the model for processing will inevitably lose a lot of key information, thus affecting the accuracy of the sequence labeling task.

[0075] In order to overcome this challenge, the present application embodiment proposes an improved strategy based on fixed window size segmentation to ensure that all text information can be fully included in the model calculation. The specific implementation steps are as follows: First, each paragraph in the target judicial document that exceeds the maximum input dimension is segmented according to the fixed window size corresponding to the maximum input dimension, so that each paragraph is evenly divided into multiple initial text segments; then, the multiple initial text segments whose length is less than the maximum input dimension are padded according to the preset tag information and the maximum input dimension, so that the length of the padded first text segment is equal to the maximum input dimension, and each second text segment and each padded first text segment are combined to construct a paragraph sequence corresponding to the target judicial document, thereby not only ensuring that each text segment in the paragraph sequence can adapt to the maximum input limit of the maximum input dimension of the classification model, but also maintaining the integrity of the paragraph structure through the padding mark. In the actual calculation process, the padding mark will be masked, so it will not interfere with the model's understanding and learning of effective information, thereby effectively improving the accuracy and efficiency of the model's classification of judicial document paragraphs.

[0076] For example, when the maximum input dimension of the classification model is 512 tokens, each text paragraph with more than 512 tokens can be segmented according to a fixed window size of 512 tokens, and each paragraph is evenly divided into 4 parts, and the missing parts are filled with special markers [UNK].

[0077] The method provided in this embodiment ensures that the complete information of long-text judicial documents is included in the classification model through fixed window size segmentation and filling strategy, thereby effectively improving the accuracy and efficiency of paragraph classification.

[0078] In some embodiments, the classification model is trained based on the following steps: According to the sample judicial documents, unsupervised training is performed on the pre-trained language model of the initial text processing module in the initialization model to obtain a domain language model; The initialization model is updated according to the domain language model to obtain a model to be trained; According to the paragraph sequence corresponding to the sample judicial document and the attribute classification label of each paragraph in the sample judicial document, the model to be trained is supervisedly trained to obtain the classification model.

[0079] The pre-trained language model here can be a RoBERTa model obtained by pre-training through a masked language modeling task on a large-scale corpus. The following describes the method provided in this embodiment using the pre-trained language model as an example.

[0080] Among them, RoBERTa is a bidirectional encoder representation model based on the Transformer architecture, which is pre-trained on a large-scale corpus through masked language modeling tasks, thereby gaining powerful language understanding capabilities. After training it with sample data, this embodiment can not only effectively utilize its excellent context-aware feature extraction capabilities and self-attention mechanism, but also adapt it to the unique semantic structure and expression mode of legal texts.

[0081] Optionally, the steps of training the classification model specifically include: First, unsupervised training samples are constructed based on sample judicial documents; the unsupervised training samples here can be samples corresponding to context prediction tasks formed based on mask processing, etc.

[0082] After obtaining the unsupervised training samples, the pre-trained language model can be unsupervisedly trained based on the unsupervised training samples, so as to obtain a domain language model that inherits the powerful language understanding ability of the RoBERTa model and has domain knowledge understanding of the content of judicial documents through unsupervised parameter fine-tuning for specific fields, thereby improving the understanding accuracy and classification accuracy of judicial documents.

[0083] After obtaining the domain language model, the pre-trained language model of the initial text processing module in the initialization model can be updated to obtain the model to be trained. The paragraph sequence corresponding to the sample judicial document is used as a sample, and the attribute classification label of each paragraph in the sample judicial document is used as a label to construct a supervised training sample; the paragraph sequence corresponding to the sample judicial document is input into each network layer in the model to be trained for forward propagation to obtain the attribute classification result of each paragraph in the sample judicial document; the loss function is constructed based on the error between the attribute classification result of each paragraph in the sample judicial document and the attribute classification label of each paragraph in the sample judicial document, and the loss function is back-propagated to iteratively update each network layer in the model to be trained, thereby obtaining a classification model that can accurately output the corresponding paragraph attribute classification result based on the judicial document.

[0084] The method provided in this embodiment combines the characteristics of legal texts to perform unsupervised and supervised training on the initialization model, so that the classification model obtained by the training can be used to classify judicial documents, which can effectively improve the accuracy of understanding judicial documents and the accuracy of paragraph attribute classification.

[0085] In some embodiments, the unsupervised training of the pre-trained language model of the initial text processing module in the initialization model according to the sample judgment document to obtain the domain language model includes: Masking each target word in the sample judgment document to obtain a sample masked document corresponding to each target word; The pre-trained language model is trained according to the sample masked document and each of the target words to obtain the domain language model.

[0086] Optionally, in the unsupervised training stage, a domain-adapted data source may be constructed using a plain text data set formed by sample judicial documents; the construction of the domain-adapted data source here may be to mask each target word in the sample judicial documents to obtain a sample masked document corresponding to each target word, and construct a domain-adapted data source based on each target word and the sample masked document corresponding to each target word.

[0087] After obtaining the domain-adapted data source, the sample masked documents corresponding to each target word in the domain-adapted data source can be input into the pre-trained model, so that the pre-trained model can predict the masked field based on the context information of the sample masked documents corresponding to each target word to obtain the predicted word; by iteratively updating the pre-trained model based on the deviation between the predicted word and the corresponding target word, a domain language model that can accurately understand the unique semantic structure and expression pattern of the legal text is obtained. Thus, through the dynamic word vector mechanism, that is, the vector representation of each word is dynamically adjusted according to the specific context in which it appears, rather than being static and unchanged, the pre-trained model is dynamically adjusted so that the model can capture the subtle differences of words in different contexts, and enhance the domain language model's understanding of the unique semantic structure and expression pattern of the legal text.

[0088] The method provided in this embodiment significantly enhances the domain language model's ability to understand the unique semantic structure and expression pattern of legal texts through unsupervised parameter fine-tuning for specific legal fields and the introduction of a dynamic word vector mechanism. This not only improves the accuracy and adaptability of the model when processing legal texts, but also enables the model to better capture the subtle differences between words in different legal contexts, thereby achieving a deeper and more accurate understanding and analysis of legal texts, and further realizing flexible and accurate paragraph classification of judicial documents.

[0089] The following is a description of the judicial document paragraph classification device provided by the present invention. The judicial document paragraph classification device described below and the judicial document paragraph classification method described above can be referenced to each other.

[0090] Figure 3 Schematic diagram of the structure of the judgment document paragraph classification device provided by the present invention; Figure 3 As shown, the device comprises: The first feature extraction unit 310 is used to perform text segmentation on each paragraph in the target judgment document according to the maximum input dimension of the classification model, obtain a paragraph sequence corresponding to the target judgment document, and input the paragraph sequence into the text processing module in the classification model to obtain the semantic features of each paragraph; The second feature extraction unit 320 is used to input the semantic features of each paragraph into the feedforward network module in the classification model to obtain enhanced semantic features of each paragraph; The third feature extraction unit 330 is used to input the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain the logical relationship features of each paragraph; The classification unit 340 is used to input the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph; The classification model is obtained by training based on sample judicial documents and attribute category labels of each paragraph in the sample judicial documents.

[0091] The device provided in this embodiment accurately captures and extracts the deep semantic features of the entire text through the text processing module, and maps these features to the high-dimensional space to form semantic features. On this basis, the semantic features are deeply enhanced and deeply analyzed through the feedforward network module and the association analysis module, so as to effectively model the semantic logical relationship within the text. Then, in order to further improve the processing accuracy of the model for the sequence labeling task, the conditional random field module is used to divide the attribute categories of the text paragraphs based on the logical relationship features of the text paragraphs. Not only does it achieve higher classification accuracy in the task of classifying paragraphs in judicial documents, it also greatly improves the semantic understanding ability of legal texts, ensures the accurate capture and analysis of complex and changeable legal terms and logical structures, and, by optimizing the feature representation and processing flow, the processing efficiency of paragraph recognition is significantly enhanced, and it can quickly respond to the needs of large-scale data while ensuring high accuracy, thereby effectively realizing efficient, flexible and accurate recognition and classification of each paragraph in the entire judicial document.

[0092] The device provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.

[0093] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor (processor) 410 , a communication interface (Communications Interface) 420 , a memory (memory) 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other through the communication bus 440 . The processor 410 can call the logic instructions in the memory 430 to execute the judicial document paragraph classification method, which includes: performing text division on each paragraph in the target judicial document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judicial document, and inputting the paragraph sequence into the text processing module in the classification model to obtain the semantic features of each paragraph; inputting the semantic features of each paragraph into the feedforward network module in the classification model to obtain the enhanced semantic features of each paragraph; inputting the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain the logical relationship features of each paragraph; inputting the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph; wherein the classification model is trained based on the sample judicial document and the attribute category labels of each paragraph in the sample judicial document.

[0094] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0095] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the judicial document paragraph classification method provided by the above-mentioned methods, which method includes: performing text division on each paragraph in the target judicial document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judicial document, and inputting the paragraph sequence into the text processing module in the classification model to obtain the semantic features of each paragraph; inputting the semantic features of each paragraph into the feedforward network module in the classification model to obtain the enhanced semantic features of each paragraph; inputting the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain the logical relationship features of each paragraph; inputting the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph; wherein, the classification model is trained based on sample judicial documents and the attribute category labels of each paragraph in the sample judicial documents.

[0096] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the judicial document paragraph classification method provided by the above-mentioned methods, the method comprising: performing text division on each paragraph in the target judicial document according to the maximum input dimension of the classification model, obtaining a paragraph sequence corresponding to the target judicial document, and inputting the paragraph sequence into the text processing module in the classification model to obtain semantic features of each paragraph; inputting the semantic features of each paragraph into the feedforward network module in the classification model to obtain enhanced semantic features of each paragraph; inputting the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain logical relationship features of each paragraph; inputting the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain attribute category results of each paragraph; wherein, the classification model is trained based on sample judicial documents and attribute category labels of each paragraph in the sample judicial documents.

[0097] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for classifying paragraphs of judicial documents, characterized in that: include: Performing text segmentation on each paragraph in the target judgment document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judgment document, and inputting the paragraph sequence into a text processing module in the classification model to obtain semantic features of each paragraph; Inputting the semantic features of each of the paragraphs into a feedforward network module in the classification model to obtain enhanced semantic features of each of the paragraphs; Inputting the enhanced semantic features of each of the paragraphs into the association analysis module in the classification model to obtain the logical relationship features of each of the paragraphs; Inputting the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph; The classification model is obtained by training based on sample judicial documents and attribute category labels of each paragraph in the sample judicial documents.

2. The method for classifying paragraphs of judicial documents according to claim 1, characterized in that: The step of inputting the paragraph sequence into the text processing module in the classification model to obtain the semantic features of each paragraph includes: Inputting the paragraph sequence corresponding to the target judgment document into the target language model in the text processing module, and using the target language model to perform semantic space feature mapping on the paragraph sequence corresponding to the target judgment document to obtain embedded features of each paragraph in the target judgment document; The embedded features of each paragraph in the target judicial document are input into the convolution layer in the text processing module, and the convolution layer applies multiple different convolution kernels to perform multi-scale feature extraction and feature fusion on the embedded features of each paragraph in the target judicial document to obtain the semantic features of each paragraph in the target judicial document.

3. The method for classifying paragraphs of judicial documents according to claim 1, characterized in that: The step of inputting the semantic features of each paragraph into the feedforward network module in the classification model to obtain enhanced semantic features of each paragraph includes: Inputting the semantic features of each paragraph in the target judgment document into the feedforward network layer in the feedforward network module to obtain the nonlinear transformation features of each paragraph in the target judgment document; Inputting the nonlinear transformation features of each paragraph in the target judicial document and the semantic features of each paragraph in the target judicial document into the residual layer in the feedforward network module to obtain the first fusion features of each paragraph in the target judicial document; The first fusion features of each paragraph in the target judicial document are input into the normalization layer in the feedforward network module to obtain the standardized semantic features of each paragraph in the target judicial document, and based on the standardized semantic features, the enhanced semantic features of each paragraph in the target judicial document are determined.

4. The method for classifying paragraphs of judicial documents according to claim 1, characterized in that: The step of inputting the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain the logical relationship features of each paragraph includes: Inputting the enhanced semantic features of each paragraph in the target judgment document into the first bidirectional long short-term memory network layer in the association analysis module, the first bidirectional long short-term memory network layer performs semantic logical relationship modeling according to the context information, dependency information and enhanced semantic features of each paragraph in the target judgment document, and obtains the first logical relationship features of each paragraph in the target judgment document; Inputting the first logical relationship features of each paragraph in the target judgment document into the second bidirectional long short-term memory network layer in the association analysis module, and using the second bidirectional long short-term memory network layer to perform semantic logical relationship modeling based on the context information, dependency information and first logical relationship features of each paragraph in the target judgment document, to obtain the second logical relationship features of each paragraph in the target judgment document; Inputting the enhanced semantic features and the second logical relationship features of each paragraph in the target judgment document into the residual layer in the association analysis module to obtain the second fusion features of each paragraph in the target judgment document; The second fusion features of each paragraph in the target judicial document are input into the normalization layer in the association analysis module to obtain the logical relationship features of each paragraph in the target judicial document.

5. The method for classifying paragraphs of judicial documents according to any one of claims 1 to 4, characterized in that: The text segmentation of each paragraph in the target judgment document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judgment document includes: According to the maximum input dimension, segment each paragraph in the target judgment document to obtain a plurality of initial text segments; Dividing the plurality of initial text segments into a first text segment and a second text segment according to the maximum input dimension; the length of the first text segment is less than the maximum input dimension, and the length of the second text segment is equal to the maximum input dimension; Filling each of the first text segments with data according to preset tag information and the maximum input dimension; Based on each of the second text segments and each of the filled first text segments, a paragraph sequence corresponding to the target judicial document is constructed.

6. The method for classifying paragraphs of judicial documents according to any one of claims 1 to 4, characterized in that: The classification model is trained based on the following steps: According to the sample judicial documents, unsupervised training is performed on the pre-trained language model of the initial text processing module in the initialization model to obtain a domain language model; The initialization model is updated according to the domain language model to obtain a model to be trained; According to the paragraph sequence corresponding to the sample judicial document and the attribute classification label of each paragraph in the sample judicial document, the model to be trained is supervisedly trained to obtain the classification model.

7. The method for classifying paragraphs of judicial documents according to claim 6, characterized in that: The method of performing unsupervised training on the pre-trained language model of the initial text processing module in the initialization model according to the sample judicial document to obtain a domain language model includes: Masking each target word in the sample judgment document to obtain a sample masked document corresponding to each target word; The pre-trained language model is trained according to the sample masked document and each of the target words to obtain the domain language model.

8. A device for classifying paragraphs of judicial documents, characterized in that: include: A first feature extraction unit is used to perform text segmentation on each paragraph in the target judgment document according to the maximum input dimension of the classification model to obtain a paragraph sequence corresponding to the target judgment document, and input the paragraph sequence into a text processing module in the classification model to obtain semantic features of each paragraph; A second feature extraction unit, used for inputting the semantic features of each paragraph into a feedforward network module in the classification model to obtain enhanced semantic features of each paragraph; A third feature extraction unit is used to input the enhanced semantic features of each paragraph into the association analysis module in the classification model to obtain the logical relationship features of each paragraph; A classification unit, used for inputting the logical relationship features of each paragraph into the conditional random field module in the classification model to obtain the attribute category results of each paragraph; The classification model is obtained by training based on sample judicial documents and attribute category labels of each paragraph in the sample judicial documents.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the method for classifying paragraphs of judicial documents as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the method for classifying paragraphs of judicial documents as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Complex PDF structure analysis method and device based on neural network

    CN110598191A

  • Judicial document paragraph classification method and device, computer equipment and storage medium

    CN111428485A

  • Scientific and technical literature category automatic mapping model training and predicting method

    CN117688945A

  • Method and apparatus for generating judgment document abstract, and electronic device and readable storage medium

    WO2022078308A1

Cited By

  • Text processing method and system based on semantic density

    CN120235162A