Legal named entity recognition method based on Mixup and BQRNN

Through Mixup data enhancement and BQRNN bidirectional quasi-cyclic neural network, combined with CRF conditional random field, the problem of data scarcity and long training time in legal named entity recognition is solved, the robustness and efficiency of the model are improved, and efficient legal documents are realized Named entity recognition.

CN114372465BActive Publication Date: 2024-09-20WUHAN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111152985.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2024-09-20
Estimated Expiration
2041-09-29

AI Technical Summary

Technical Problem

Existing Chinese named entity recognition methods face problems of data scarcity and insufficient data quality in the legal field, resulting in low model efficiency, and the serial calculation of traditional RNN models results in long training times.

Method used

The Mixup data enhancement method is used to expand the word vector representation, and the BQRNN bidirectional quasi-cyclic neural network is used to extract deep feature vectors, combined with CRF conditional random fields for decoding, to improve the robustness and applicability of the model, and at the same time optimize the training parameters to reduce calculations cost.

Benefits of technology

Without increasing the amount of data, it improves the amount of training data and the robustness of the model, shortens the training time, and improves the efficiency and accuracy of named entity recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114372465B
    Figure CN114372465B
Patent Text Reader

Abstract

The invention discloses a method for named entity recognition of legal documents based on Mixup and BQRNN, comprising the following steps: using a BERT pre-training model to vectorize the legal judgment documents of a training set; using a Mixup data enhancement method to expand the scale of the training set at the word vector representation level; using a BQRNN bidirectional quasi-recurrent neural network to process the enhanced word vector representation, extracting deep feature vectors with context features in the legal text, and outputting corresponding entity label sequences; using CRF conditional random field decoding, and finally outputting the entity label sequence with the highest probability as a training result, and generating a corresponding training model; testing the training model on a test set, adjusting the training model parameter information, until selecting a recognition model with the best indicator performance before stabilization; inputting a Chinese legal document case series, and the recognition model automatically judges and outputs the legal entities in the legal document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Chinese language processing and recognition technology, and in particular to a legal named entity recognition method based on Mixup data enhancement and a BQRNN quasi-recurrent neural network model. Background Art

[0002] Using artificial intelligence technology to build a smart court system can help legal personnel make decisions on similar cases and improve efficiency. To understand the semantics of legal documents, the first thing to solve is the identification of legal entities. NER (Named Entity Recognition) refers to the process of extracting specific named entities from text. It is a sequence labeling classification task that assigns the most likely labeling sequence to each input character.

[0003] Existing Chinese named entity recognition methods are mainly divided into machine learning methods and deep learning methods. Machine learning methods require the pre-design of rule patterns, and then achieve entity recognition through string search and matching. However, they are easily restricted by pre-defined rules, have poor portability, and have poor recognition effects on unregistered words. Deep learning methods have higher accuracy than machine learning methods. These models usually have millions of parameters, so a large amount of data is required for training to avoid overfitting and better model generalization. However, collecting a large number of annotated data samples is time-consuming and expensive. As a special field, the legal field has scarce data corpus, and it is difficult to meet good expectations in terms of data quality and data quantity.

[0004] Data augmentation is a technique that aims to address this data hunger problem. Synthetic data samples are generated as additional training data for regularizing the learning model. Data augmentation has been actively and successfully applied in computer vision and speech recognition. However, most of these methods rely on human knowledge to perform label-invariant data transformations, such as image scaling, flipping, and rotation. Unlike images, there are no simple label-invariant transformation rules in natural language. Often, a slight change in a word in a sentence can significantly change the meaning of the sentence. To this end, popular data augmentation methods in NLP aim to transform text by using hand-crafted ontologies or synonym replacement. However, such synonym-based transformations can only be applied to a portion of the vocabulary, as there are few words with exactly or almost the same meaning. Summary of the invention

[0005] The main purpose of the present invention is to provide a legal named entity recognition method for legal documents based on Mixup and BQRNN. Through a large amount of data, a deep learning empirical model is trained to automatically identify the named entities in the input Chinese legal documents. At the same time, by performing Mixup data enhancement operations on the feature vectors of the legal documents, the above model has higher robustness and applicability while maintaining a low additional computing cost.

[0006] The technical solution adopted by the present invention is:

[0007] A method for named entity recognition of legal documents based on Mixup and BQRNN is provided, comprising the following steps:

[0008] S1. Use the BERT pre-trained model to vectorize the legal judgment documents in the training set and construct word vector representations with contextual semantics;

[0009] S2. Use the Mixup data enhancement method to process the generated word vector representation, expand the training set size at the word vector representation level, and generate an enhanced word vector representation training set;

[0010] S3. Use the BQRNN bidirectional quasi-recurrent neural network to process the enhanced word vector representation, extract the deep feature vector with contextual features in the legal text, and output the corresponding entity label sequence;

[0011] S4. Use the CRF conditional random field to decode the entity label sequence according to the entity attribute rules named in the legal document based on the constraint relationship between the labels, and finally output the entity label sequence with the highest probability as the training result, and generate the corresponding training model;

[0012] S5, testing the training model on the test set, and adjusting the training model parameter information according to the test results, and training again until the index level of the test set tends to be stable, and selecting the recognition model with the best index performance before stabilization;

[0013] S6. Input Chinese legal documents, and the recognition model will automatically judge and output the legal entities in the legal documents.

[0014] Following the above technical solution, after the legal judgment document is vectorized, two input sentences i and j are randomly obtained, and two fragments are obtained from the two sentences respectively through the set fusion parameter λ; the Beta distribution obtains the fusion parameter λ, and a new feature vector embedding and a new label label are generated through the Mixup algorithm, and a character token closest to the new feature vector embedding is selected as the newly generated sentence; finally, the newly generated sentences are replaced back to the initial two sentences respectively, and the sentence perplexity is used to determine which sentence meets the requirements and put it into the training set for training, so as to increase the number of training samples without increasing the amount of data.

[0015] Following the above technical solution, the enhanced data is mixed with the oversampled original data in a 1:1 ratio to generate a new training set.

[0016] Following the above technical solution, in step S5, the Optimizer optimizer is specifically used to adjust the training model parameter information.

[0017] Following the above technical solution, in step S4, the CRF conditional random field is used to decode the entity tag sequence according to the "B, M, E, O" entity rule and "D, T, N, L" attribute rule named in the legal document based on the constraint relationship between the tags.

[0018] The present invention also provides a named entity recognition system for legal documents based on Mixup and BQRNN, comprising:

[0019] The vectorization module is used to vectorize the legal judgment documents in the training set using the BERT pre-trained model and construct word vector representations with contextual semantics;

[0020] The Mixup data enhancement module is used to process the generated word vector representation using the Mixup data enhancement method, expand the training set size at the word vector representation level, and generate an enhanced word vector representation training set;

[0021] The BQRNN processing module is used to process the enhanced word vector representation using the BQRNN bidirectional quasi-recurrent neural network, extract the deep feature vector with contextual features in the legal text, and output the corresponding entity label sequence;

[0022] The CRF decoding module is used to use the CRF conditional random field to decode the entity label sequence according to the entity attribute rules named in the legal document based on the constraint relationship between the labels, and finally output the entity label sequence with the highest probability as the training result and generate the corresponding training model;

[0023] The model training module is used to test the training model on the test set, and adjust the training model parameter information according to the test results, and train again until the index level of the test set tends to be stable, and select the recognition model with the best index performance before stabilization;

[0024] The recognition module is used to input Chinese legal documents. The recognition model automatically judges and outputs the legal entities in the legal documents.

[0025] Following the above technical solution, the Mixup data enhancement module is specifically used to randomly obtain two input sentences i and j after vectorizing the legal judgment documents, and obtain two fragments from the two sentences respectively through the set fusion parameter λ; the Beta distribution obtains the fusion parameter λ, and generates a new feature vector embedding and a new label label through the Mixup algorithm, and selects the character token closest to the new feature vector embedding as the newly generated sentence; finally, the newly generated sentences are replaced back with the initial two sentences respectively, and the sentence perplexity is used to determine which sentence meets the requirements and put it into the training set for training, so as to increase the number of training samples without increasing the amount of data.

[0026] Following the above technical solution, the Mixup data enhancement module specifically mixes the enhanced data with the oversampled original data in a 1:1 ratio to generate a new training set.

[0027] Following the above technical solution, the model training module specifically uses the Optimizer optimizer to adjust the training model parameter information.

[0028] The present invention also provides a computer storage medium, which stores a computer program executable by a processor, and the computer program executes the legal named entity recognition method based on Mixup and BQRNN as described in any one of claims 1-5.

[0029] The beneficial effect of the present invention is that the present invention can increase the amount of training data without increasing the total amount of data and maintaining a low additional computing cost by using the Mixup data enhancement method, so that the trained deep learning model has higher robustness and applicability. In addition, the use of BQRNN to further process the feature vector solves the problem that the traditional RNN model (such as LSTM, GRU) cannot be calculated serially, resulting in a long training time, and improves the efficiency of the NER project. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0031] Figure 1This is a flow chart of a legal named entity recognition method based on Mixup and BQRNN according to an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of common data enhancement in an embodiment of the present invention;

[0033] Figure 3 This is a schematic diagram of Miuxp data enhancement principle according to an embodiment of the present invention;

[0034] Figure 4 is a structural diagram of a model of an embodiment of the present invention;

[0035] Figure 5 This is a schematic diagram of the BQRNN principle of an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0037] The present invention uses the Mixup data enhancement method to solve the problem of low model efficiency caused by insufficient quality and quantity of training samples while maintaining a low additional computing cost; further adopts the BQRNN neural network to optimize the problem of long training time caused by serial calculation in traditional recognition methods, thereby improving training speed and efficiency.

[0038] like Figure 1 As shown, the legal named entity recognition method based on Mixup and BQRNN in the embodiment of the present invention includes the following steps:

[0039] S1. Use the BERT pre-trained model to vectorize the legal judgment documents in the training set and construct word vector representations with contextual semantics;

[0040] S2. Use the Mixup data enhancement method to process the generated word vector representation, expand the training set size at the word vector representation level, and generate an enhanced word vector representation training set;

[0041] S3. Use the BQRNN bidirectional quasi-recurrent neural network to process the enhanced word vector representation, extract the deep feature vector with contextual features in the legal text, and output the corresponding entity label sequence;

[0042] S4. Use the CRF conditional random field to decode the entity label sequence according to the entity attribute rules named in the legal document based on the constraint relationship between the labels, and finally output the entity label sequence with the highest probability as the training result, and generate the corresponding training model;

[0043] S5, testing the training model on the test set, and adjusting the training model parameter information according to the test results, and training again until the index level of the test set tends to be stable, and selecting the recognition model with the best index performance before stabilization;

[0044] S6. Input Chinese legal documents, and the recognition model will automatically judge and output the legal entities in the legal documents.

[0045] In order to solve the problem of lack of legal annotation data, this paper mainly adopts the Mixup data enhancement method to expand the data sample size at the vector representation level. Figure 2 As shown in the figure, common data enhancement methods often process the data itself, where the Null row represents the original data. SR (Synonyms Replace) means that no stop words are considered, and n words are randomly selected in the sentence and replaced with synonyms extracted from the synonym dictionary. RD (RandomlyDelete) means that each word in the sentence is randomly deleted with a probability p. RandomlySwap (RS) means that the position of two words in the sentence is randomly swapped, and the process can be repeated n times. The Label row represents the label linearization data enhancement method. Labels other than O are placed before the entity words for data enhancement.

[0046] These popular data augmentation methods aim to transform text by using synonym replacement in hand-crafted ontologies or word similarity. However, such synonym-based transformation can only be applied to a part of the vocabulary because there are few words with exactly or almost the same meaning. Unlike traditional data augmentation in NLP, the augmentation strategy of Mixup method is domain-independent, does not contain human knowledge for data transformation, and has low additional computational cost.

[0047] The algorithm for Mixup data enhancement to obtain new data is as follows: Figure 3 As shown:

[0048] Step 1: Randomly select two input sentence sequences, i and j;

[0049] Step 2: Get two segments from two sentence sequences respectively through the set hyperparameters;

[0050] Step 3: Obtain the value of the fusion parameter λ through Beta distribution, and generate a new word vector embedding and the label sequence label corresponding to the word vector through equations (1) and (2);

[0051]

[0052]

[0053] Step 4: Select the character token closest to the new word vector embedding as the newly generated sentence sequence;

[0054] Step 5: Replace the newly generated sentence sequence with the initial two sentence sequences, determine which sentence meets the requirements through sentence perplexity, and put it into the training set for training, thereby increasing the amount of data. The sentence perplexity calculation formula is as follows:

[0055] P=P(w1,w2,...w n )......(3)

[0056] The present invention solves the problem of low model efficiency caused by insufficient quality and quantity of training samples by using the Mixup data enhancement method while maintaining low additional computing costs.

[0057] In the embodiment of the present invention, the enhanced data is mixed with the oversampled original data in a 1:1 ratio for the next training step. The model training part is performed as follows Figure 4 The deep learning model shown is trained, and after continuous optimization, a deep learning model that can realize legal document entity recognition is obtained, thereby solving the problem of named entity recognition in legal documents.

[0058] Given a sentence S, S = {c1, c2, ..., c n}, for input S, BERT’s input module converts each input c into i Encoded into vector e i , we get the input sequence S = {e1, e2, ..., e n}, and then used as the input word representation of the Transformer encoding network inside BERT, and further calculated the character-level vector representation of the input sequence L = {v1, v2, ..., v n}. Among them, E token Represents word embedding, E seg represents sentence embedding, E pos Represents positional embedding.

[0059] e i =E token (c i )+E seg (c i )+E pos (c i )(4)

[0060] The obtained vector L is subjected to data enhancement through Mixup. Two input sentence sequences are randomly selected, i and j. Two fragments are obtained from the two sentence sequences respectively through the set fusion parameter λ. Then the value of the fusion parameter λ is obtained through Beta distribution, and a new word vector embedding and a label sequence label corresponding to the word vector are generated through equations (1) and (2). The character token closest to the new word vector embedding is selected as the newly generated sentence sequence. The newly generated sentence sequences are replaced with the initial two sentence sequences respectively, and the sentence perplexity is used to determine which sentence meets the requirements and put them into the training set for training, thereby achieving the effect of increasing the amount of data.

[0061] The vector after Mixup is sent to BQRNN for processing (5) to (12) to obtain a feature vector with internal feature information. The feature of BQRNN is that it can obtain a feature vector with contextual features. The weights and proportions between these vectors can reflect the reference information of each other in Chinese. For example, "Apple is red." The vectors generated by BQRNN for apple and red will show correlation after numerical or weighted addition. This is a feature vector with contextual information.

[0062] The QRNN network consists of two parts: the convolution layer and the pooling layer. Assume that the convolution layer of the QRNN network uses m filters for convolution operations. For an input sequence L = {v1, v2, ..., v n}, the sequence is obtained through convolution operation The dimension of each vector in sequence X is n, and the dimension of each vector in sequence Z is m. If the width of the filter is k at time t, the range of the convolution is x. t-k+1 To ′. The convolutional layer is shown in equations (5) to (7):

[0063] Z = tanh(W z *X)(5)

[0064] F=σ(W f *X)(6)

[0065] O=σ(W o *X)(7)

[0066] Where: W z , W f , W ois a convolution filter, σ is an activation function, and * represents the convolution operation in time order. When the width k of the filter increases, the model can calculate more n-gram features. The present invention selects a setting of k as 2. At this time, the convolution layer of QRNN is shown in equations (8) to (10):

[0067]

[0068]

[0069]

[0070] The pooling layer of QRNN is used to extract feature information from the output of the convolutional layer and reduce the number of features. The calculation of the pooling layer is based on dynamic average pooling, with the addition of an output gate and a forget gate. This structure is very similar to the gate structure of LSTM. The calculation process is shown in equations (11) and (12):

[0071] c t =f t ⊙c t-1 +i t ⊙z t (11)

[0072] h t =o t ⊙c t (12)

[0073] Where f, i, o represent the forget gate, input gate, and output gate respectively, and c t represents the cell state at time t, the states of h and c are initialized to 0, and ⊙ represents the dot multiplication operation between vectors. At each moment of text sequence processing, the pooling function needs to be operated, but the operation process is parallel, so for longer text sequences, the additional time of the operation is negligible. The structure of QRNN during pooling is as follows Figure 5 shown.

[0074] After being processed by BQRNN, CRF decodes the result of the upper layer through formula (13), where A is the transformation matrix, Indicates that the character is i The score of the label label. Softmax is used to obtain the normalized probability, as shown in formula (14):

[0075]

[0076]

[0077] After completing the above operations, we get the entity label sequence W = {w1, w2, ..., w n}. According to the label correspondence, the final output can be obtained.

[0078] In summary, after simplifying the above steps, the steps of the model training part are:

[0079] Step 1: Use the BERT pre-trained model to vectorize the data, complete the vectorization of Chinese text, and build a character-level vector representation with contextual semantics

[0080] Step 2: Use Mixup data enhancement technology to c according to Figure 3 The method shown performs the processing of equations (1)-(3), thereby increasing the training data and generating a vector representation L;

[0081] Step 3: Use the BQRNN bidirectional quasi-recurrent neural network to process the feature vector L and extract the deep features of the text;

[0082] Step 4: Use the CRF conditional random field to decode according to the named entity attribute rules to obtain the entity sequence W, and then you can get the final prediction result;

[0083] Step 5: Compare the predicted results with the correct results, use the Optimizer to adjust the model parameter information, and train again;

[0084] Step 6: Repeat the above operation until the evaluation indicators P, R, and F tend to be stable;

[0085] Step 7: Select the model with the best performance as the model for practical application;

[0086] Step 8: Input the Chinese legal document case "Yu Mouyang smokes HLY", the model automatically judges and outputs the label sequence corresponding to each character "BN, MN, EN, O, O, BD, MD, ED", and parses the legal entities "Yu Mouyang (name attribute entity)" and "HLY (item attribute entity)" in the sentence by labeling the corresponding meanings.

[0087] Implementation example:

[0088] 1. Scenario Description

[0089] Input: Yu Mouyang is suspected of taking 10.2g of the drug HLY.

[0090] Output: Yu Mouyang (name attribute entity), HLY (item attribute entity), 10.2g (mass attribute entity).

[0091] 2. Specific steps

[0092] This paper proposes a method to solve the problem of legal named entity recognition

[0093] Step 1: Use the BERT pre-trained model to vectorize the data, complete the vectorization of Chinese text, and build a character-level vector representation with contextual semantics

[0094] Step 2: Use Mixup data enhancement technology to c according to Figure 3 The method shown performs the processing of equations (1)-(3), thereby increasing the training data and generating a vector representation L;

[0095] Step 3: Use the BQRNN bidirectional quasi-recurrent neural network to process the feature vector L and extract the deep features of the text;

[0096] Step 4: Use the CRF conditional random field to decode according to the named entity attribute rules to obtain the entity sequence W, and then you can get the final prediction result;

[0097] Step 5: Compare the predicted results with the correct results, use the Optimizer to adjust the model parameter information, and train again;

[0098] Step 6: Repeat the above operation until the evaluation indicators P, R, and F tend to be stable;

[0099] Step 7: Select the model with the best performance as the model for practical application;

[0100] Step 8: Input the Chinese legal document case "Yu Mouyang smokes HLY", the model automatically judges and outputs the label sequence corresponding to each character "BN, MN, EN, O, O, BD, MD, ED", and parses the legal entities "Yu Mouyang (name attribute entity)" and "HLY (item attribute entity)" in the sentence by labeling the corresponding meanings.

[0101] The system runs on Python in Win10 environment, and the deep learning framework used is TensorFlow, version 1.1.2. The experimental results show that the method proposed in the present invention is superior to the traditional method in the named entity recognition of legal documents (items).

[0102] The present invention also provides a legal named entity recognition system based on Mixup and BQRNN, comprising:

[0103] The vectorization module is used to vectorize the legal judgment documents in the training set using the BERT pre-trained model and construct word vector representations with contextual semantics;

[0104] The Mixup data enhancement module is used to process the generated word vector representation using the Mixup data enhancement method, expand the training set size at the word vector representation level, and generate an enhanced word vector representation training set;

[0105] The BQRNN processing module is used to process the enhanced word vector representation using the BQRNN bidirectional quasi-recurrent neural network, extract the deep feature vector with contextual features in the legal text, and output the corresponding entity label sequence;

[0106] The CRF decoding module is used to use the CRF conditional random field to decode the entity label sequence according to the entity attribute rules named in the legal document based on the constraint relationship between the labels, and finally output the entity label sequence with the highest probability as the training result and generate the corresponding training model;

[0107] The model training module is used to test the training model on the test set, and adjust the training model parameter information according to the test results, and train again until the index level of the test set tends to be stable, and select the recognition model with the best index performance before stabilization;

[0108] The recognition module is used to input Chinese legal documents. The recognition model automatically judges and outputs the legal entities in the legal documents.

[0109] The system of the above embodiment is mainly used to implement the legal named entity recognition method embodiment based on Mixup and BQRNN. The functions of each module refer to the above method embodiment and will not be described one by one here.

[0110] The present application also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and the program implements the corresponding function when executed by the processor. The computer-readable storage medium of this embodiment is used in a legal named entity recognition system based on Mixup and BQRNN, and when executed by the processor, implements the legal named entity recognition method based on Mixup and BQRNN of the method embodiment.

[0111] In summary, the innovation of the present invention lies in:

[0112] 1. There is no standard annotated data set for named entity recognition in the legal field, and the quality and quantity of manually collected and processed legal document data sets are often not ideal. The deep learning method is to automatically identify legal named entities by training an empirical model on a large amount of data. The better the data quality and quantity, the better the model effect. By increasing the amount of training data and maintaining a low additional computing cost through the Mixup data enhancement method, the trained deep learning model has higher robustness and applicability.

[0113] 2. Traditional named entity recognition often uses LSTM long short-term memory neural networks, GRU and other neural networks to extract deep text features. However, due to its own structure, feature extraction is often performed serially from left to right, which not only greatly increases training time, but also leads to phenomena such as gradient explosion. Using the BQRNN bidirectional quasi-recurrent neural network can parallelize the originally serial tasks, thereby saving the time required for training and improving model training efficiency.

[0114] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.

Claims

1. A named entity recognition method for legal documents based on Mixup and BQRNN, characterized in that: The following steps are involved: S1. Use the BERT pre-trained model to vectorize the legal judgment documents in the training set and construct word vector representations with contextual semantics; S2. Use the Mixup data enhancement method to process the generated word vector representation, expand the training set size at the word vector representation level, and generate an enhanced word vector representation training set; S3. Use the BQRNN bidirectional quasi-recurrent neural network to process the enhanced word vector representation, extract the deep feature vector with contextual features in the legal text, and output the corresponding entity label sequence; S4. Use the CRF conditional random field to decode the entity label sequence according to the entity attribute rules named in the legal document based on the constraint relationship between the labels, and finally output the entity label sequence with the highest probability as the training result, and generate the corresponding training model; S5, testing the training model on the test set, and adjusting the training model parameter information according to the test results, and training again until the index level of the test set tends to be stable, and selecting the recognition model with the best index performance before stabilization; S6. Input Chinese legal documents, and the recognition model will automatically judge and output the legal entities in the legal documents.

2. The method for named entity recognition of legal documents based on Mixup and BQRNN according to claim 1, characterized in that: After vectorizing the legal judgment documents, two input sentences i and j are randomly obtained, and two fragments are obtained from the two sentences respectively through the set fusion parameter λ; the Beta distribution obtains the fusion parameter λ, and generates a new feature vector embedding and a new label label through the Mixup algorithm, and selects the character token closest to the new feature vector embedding as the newly generated sentence; finally, the newly generated sentences are replaced back with the initial two sentences, and the sentence perplexity is used to determine which sentence meets the requirements and put it into the training set for training, so as to increase the number of training samples without increasing the amount of data.

3. The method for named entity recognition of legal documents based on Mixup and BQRNN according to claim 1, characterized in that: The augmented data is mixed 1:1 with the oversampled original data to generate a new training set.

4. The method for named entity recognition of legal documents based on Mixup and BQRNN according to claim 1, characterized in that: In step S5, the Optimizer optimizer is specifically used to adjust the training model parameter information.

5. The method for named entity recognition of legal documents based on Mixup and BQRNN according to claim 1, characterized in that: In step S4, the CRF conditional random field is used to decode the entity tag sequence according to the "B, M, E, O" entity rule and "D, T, N, L" attribute rule named in the legal document based on the constraint relationship between the tags.

6. A named entity recognition system for legal documents based on Mixup and BQRNN, characterized in that: include: The vectorization module is used to vectorize the legal judgment documents in the training set using the BERT pre-trained model and construct word vector representations with contextual semantics; The Mixup data enhancement module is used to process the generated word vector representation using the Mixup data enhancement method, expand the training set size at the word vector representation level, and generate an enhanced word vector representation training set; The BQRNN processing module is used to process the enhanced word vector representation using the BQRNN bidirectional quasi-recurrent neural network, extract the deep feature vector with contextual features in the legal text, and output the corresponding entity label sequence; The CRF decoding module is used to use the CRF conditional random field to decode the entity label sequence according to the entity attribute rules named in the legal document based on the constraint relationship between the labels, and finally output the entity label sequence with the highest probability as the training result and generate the corresponding training model; The model training module is used to test the training model on the test set, and adjust the training model parameter information according to the test results, and train again until the index level of the test set tends to be stable, and select the recognition model with the best index performance before stabilization; The recognition module is used to input Chinese legal documents. The recognition model automatically judges and outputs the legal entities in the legal documents.

7. The named entity recognition system for legal documents based on Mixup and BQRNN according to claim 6, characterized in that: The Mixup data enhancement module is specifically used to randomly obtain two input sentences i and j after vectorizing the legal judgment documents, and obtain two fragments from the two sentences respectively through the set fusion parameter λ; the Beta distribution obtains the fusion parameter λ, and generates a new feature vector embedding and a new label label through the Mixup algorithm, and selects the character token closest to the new feature vector embedding as the newly generated sentence; finally, the newly generated sentences are replaced back with the initial two sentences, and the sentence perplexity is used to determine which sentence meets the requirements and put it into the training set for training, so as to increase the number of training samples without increasing the amount of data.

8. The named entity recognition system for legal documents based on Mixup and BQRNN according to claim 6, characterized in that: The Mixup data enhancement module specifically mixes the enhanced data with the oversampled original data in a 1:1 ratio to generate a new training set.

9. The named entity recognition system for legal documents based on Mixup and BQRNN according to claim 6, characterized in that: The model training module specifically uses the Optimizer optimizer to adjust the training model parameter information.

10. A computer storage medium, characterized in that: A computer program executable by a processor is stored therein, and the computer program executes the legal named entity recognition method based on Mixup and BQRNN as described in any one of claims 1-5.