CN112148867A - Law recommendation method based on law relation - Google Patents

Law recommendation method based on law relation Download PDF

Info

Publication number
CN112148867A
CN112148867A CN202011036946.5A CN202011036946A CN112148867A CN 112148867 A CN112148867 A CN 112148867A CN 202011036946 A CN202011036946 A CN 202011036946A CN 112148867 A CN112148867 A CN 112148867A
Authority
CN
China
Prior art keywords
law
task
recommendation
training
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011036946.5A
Other languages
Chinese (zh)
Inventor
李传艺
葛季栋
冯奕
黄云云
周筱羽
骆斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University
Original Assignee
Nanjing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University filed Critical Nanjing University
Priority to CN202011036946.5A priority Critical patent/CN112148867A/en
Publication of CN112148867A publication Critical patent/CN112148867A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Strategic Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Evolutionary Biology (AREA)
  • Databases & Information Systems (AREA)
  • Game Theory and Decision Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a law enforcement recommendation method based on a law enforcement relation, which comprises the following steps: collecting referee documents from a Chinese referee document network to form training corpora; preprocessing the training corpus, including different processing of case facts, instruction and control of criminal names and reference of law rules; preprocessing user input; dividing a data set, training a joint generation model based on a law rule relation, wherein the model is used for assisting a law rule recommendation task to learn based on a criminal name prediction task; extracting a recommended law set according to the trained joint generation model; and outputting the recommended rule set. The invention designs a brand-new joint generation model by utilizing an encoder-decoder framework and combining deep association among case facts, accustomed names and quoting law rules based on the law relation. The implementation shows that the model improves the prediction effect of the law enforcement recommendation task and is suitable for the law enforcement recommendation task in a real scene.

Description

Law recommendation method based on law relation
Technical Field
The invention relates to a law enforcement recommendation method, in particular to a law enforcement recommendation method based on law enforcement relations, and belongs to the field of natural language processing.
Background
The law enforcement recommends the task as a branch of legal decision prediction, which aims at finding a proper law for use as a basis for trial given case fact description. The law enforcement recommendation, as a successful application of natural language processing technology in the field of law, can simultaneously solve the problems encountered by legal experts and the general public in real scenes: for legal experts such as judges and lawyers, in the face of numerous complex cases, the legal experts have to find out a proper criterion from hundreds of candidate bars by analyzing case facts and combining with the view point of a party; for the general public lacking in professional knowledge, legal consultations are required to be searched for cases they involve at a high cost. Along with the popularization of the law recommendation and application, the system can improve the working efficiency of law professionals, give more professional legal suggestions and give corresponding legal guidance and assistance to people without legal background knowledge.
The act of legal recommendation has received considerable attention from researchers in recent years, with numerous research advances. In early work, researchers designed a large number of rules for text pattern detection for this task, and when certain rules were met, relevant results would be generated. Such work is not accurate and not very versatile. With the rise of machine learning, some work tries to solve the law statement prediction problem through classification technologies such as random forests and support vector machines, and some work also searches similar cases from the perspective of text similarity and completes law statement recommendation tasks based on the similar cases. However, the two methods mainly depend on the statistical characteristics of the text and are insufficient in semantic capture. In recent years, researchers have proposed to solve the problem of law and law forecast through a deep learning technology, but most of the existing work only focuses on the relationship between case facts and laws, and considers the laws as separate labels, thereby neglecting the inherent relation between laws.
The legal recommendation task has the following difficulties: firstly, the large number of the conventional law rules increases the difficulty of accurate prediction; secondly, one case can involve a plurality of laws, and the complexity of the law recommendation task is increased. We can note that there is no mutual independence between the french rules, and we can divide this relationship into four categories: containment relationships-violation of one law bar necessarily results in the offender of another law bar; exclusion relationship-after violating a type of law, the corresponding other type of law is no longer applicable to the current case; neutral relationship-there is no inevitable relationship between the two laws; supplementary relationship-two laws are supplementary and complementary in content. Therefore, in the law enforcement recommendation task, not only the applicability of a single law relative to cases but also the mutual relation among laws should be considered, so that laws with inclusion relation can be considered to be cited at the same time, and on the contrary, laws with exclusion relation cannot be pushed at the same time. The invention mainly focuses on taking the relationship existing between the above-mentioned laws into consideration of the law recommendation.
Joint learning is a machine learning method that learns by putting multiple related tasks together based on a shared representation. Considering that only a single model is concerned, potential information which can improve a target task in some related tasks can be ignored, and the generalization of the original task is probably better by sharing parameters among different tasks to a certain extent. Some features may be difficult to learn on the primary task due to the presence of high-order correlations or suppression by other factors, and may be learned by a cognate secondary task. We have observed that in the course of legal judges, the criminal case's judgments are largely supported by criminal law, and similarly, divorce cases may refer to related jurisdictions in the marital law. If the relationship between the criminal name and the law can be extracted, the effect of the law recommendation task can be improved undoubtedly. Obviously, the criminal name prediction task can be used as an auxiliary task of the legal recommendation task, and helps the original task to extract more abundant semantic information implied in the text. Therefore, the invention integrates the criminal name prediction task and the legal item recommendation task into the same frame for joint learning, and captures the relationship between the legal item and between the legal item and the accuratory name through a joint generation model so as to achieve the purpose of improving the recommendation effect of the legal item recommendation task.
Disclosure of Invention
The invention relates to a law recommendation method based on law relation, and provides a method for carrying out law recommendation according to case facts, which comprises the steps of mining the association between laws and the association between laws and cases based on deep learning, and designing a joint generation model for law prediction by regarding law recommendation tasks as sequence generation problems; in addition, the law enforcement recommendation task and the control prediction task are integrated into the same frame, and the completion of the law enforcement recommendation task is assisted by jointly learning implicit information extracted in the process of predicting the control crime through case facts. The method can effectively extract the potential semantic information in case facts, and improves the effect of the law recommendation task by combining the association between the case facts and the law, the case facts and the accustomed names, the association between the law and the law, and the association between the law and the accustomed names, and conforms to the current situation of deep association between the case facts and the law and the accustomed names under the real condition.
The invention relates to a law enforcement recommendation method based on a law enforcement relation, which is characterized by comprising the following steps of:
collecting a referee document from a Chinese referee document network, and constructing a training corpus;
preprocessing the training corpus;
step (3) preprocessing user input;
step (4) training a sequence generation model which is based on the law-rule relation and performs joint learning by taking a criminal name prediction task as an auxiliary task;
step (5), extracting a recommendation law set;
and (6) outputting a recommended legal item list.
2. The french recommendation method according to claim 1, wherein in step (1), the referee documents are collected from a Chinese referee document network to construct the corpus.
3. The french recommendation method based on the french relation according to claim 1, wherein the preprocessing is performed on the corpus in step (2), and the specific substeps include:
step (2.1) extracting case facts, a reference law list and a designated control criminal name from the referee document;
step (2.2) Chinese word segmentation is carried out on case facts, word collections are obtained, and the frequency of occurrence of each word is recorded;
step (2.3) removing low-frequency words and constructing a dictionary of the task training corpus;
step (2.4) combining the control names of all cases, constructing a control name set aiming at the task training corpus, and forming an output space of a criminal name prediction task;
and (2.5) merging the law bars quoted by all cases, constructing a quote law bar set aiming at the task training corpus, and forming an output space of a law bar recommended task.
4. The french recommendation method based on french relations of claim 1, wherein in step (3), case facts input by a user are preprocessed, and the specific sub-steps include:
step (3.1) Chinese word segmentation is carried out on case facts input by a user;
and (3.2) converting each vocabulary into a unique heat vector representation according to the dictionary.
5. The law enforcement recommendation method based on the law enforcement relationship as claimed in claim 1, characterized in that in step (4), a law enforcement relationship based on the design of the present invention is trained, and a criminal name prediction task is used as an auxiliary task to perform learning simultaneously, so as to better realize a joint generation model of the law enforcement recommendation task. Dividing the preprocessed training corpus into a training set, a verification set and a test set, and using the training set to learn a joint generation model; the model is preliminarily evaluated in the training process by using the verification set, so that the training condition of the model can be observed conveniently; and (4) using the test set to evaluate the final generalization capability of the joint generation model. The training objective is to maximize the predictive effect of the two tasks, the criminal name prediction and the law recommendation. And repeating the training process to obtain the optimal legal recommendation generation model. The method comprises the following specific substeps:
step (4.1) dividing a data set into a training set, a verification set and a test set;
and (4.2) training a joint generation model.
6. The law enforcement recommendation method based on law enforcement relations as claimed in claim 1, wherein in step (5), the model is generated according to the combination trained in the previous step, the case convict names are predicted based on case facts input by users, and the recommendation law enforcement sets predicted by the model are sequentially output. The method comprises the following specific substeps:
step (5.1) taking the preprocessed case facts as input, capturing semantic information implicit in the case facts through a self-attention mechanism based on an encoder part in a joint generation model, and encoding the semantic information into a memory unit, wherein the memory unit is used for control prediction on one hand and legal recommendation on the other hand;
and (5.2) according to the obtained memory unit, a decoder part in the combined generation model takes the French output at the previous time step as input, the initial input is a mark < START > ", and the French predicted at the current time step is sequentially output. When the decoder outputs the "< END >" tag, it indicates that the prediction is ended.
7. The French recommendation method based on French relations of claim 1, wherein step (6) outputs a set of recommended French rules. The effectiveness of the legal recommendation is evaluated by accuracy, recall and F1 values.
Compared with the prior art, the invention has the remarkable advantages that: the influence of semantic information of the basic case, the association between the law and the law, and the association between the quoted law and the designated control criminal name on the law recommendation task is comprehensively considered, so that the law recommendation effect is improved; the law statement prediction task is regarded as a sequence generation problem, the law statement relationship is brought into a recommendation basis, and a brand-new joint generation model is provided for law statement prediction and integrates the law statement prediction task and the control prediction task into the same frame for joint learning, so that the aim of carrying out law statement prediction by combining related information of controlling guilt names is fulfilled; experiments show that the joint generation model provided by the invention is suitable for the law enforcement recommendation task in a real scene, and compared with a reference model of the related law enforcement recommendation task, the joint generation model improves various performances of the law enforcement recommendation task.
Drawings
FIG. 1 is a flow chart of a law statement recommendation method based on a law statement relationship
FIG. 2 basic framework diagram of joint generative model
FIG. 3 is a flow chart of a calculation of the self-attention mechanism
FIG. 4 is a table of comparative test results of the joint generative model and 8 reference models
FIG. 5 comparison of exemplary samples of joint generative models and TPP model predictions
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The invention aims to solve the problem of law enforcement recommendation and provides a law enforcement recommendation method based on law enforcement relations. By using a sequence generation model, the law bar output at each time step is used as the input of the next time step, the association existing between the law bars is successfully extracted, and the accuracy of law bar prediction is improved; by integrating the law bar recommendation task and the report criminal name prediction task into the same frame for joint learning, deep association among case facts, reference law bars and report criminal names is deeply excavated, and the handling condition of a real case judging process in a real scene is met; the model is trained by collecting training corpora formed by real cases in the Chinese judge document network, so that the trained model is more suitable for the law enforcement recommendation task in a real scene. The invention mainly comprises the following steps:
collecting a referee document from a Chinese referee document network, and constructing a training corpus;
preprocessing the training corpus;
step (3) preprocessing user input;
step (4) training a sequence generation model which is based on the law-rule relation and performs joint learning by taking a criminal name prediction task as an auxiliary task;
step (5), extracting a recommendation law set;
and (6) outputting a recommended legal item list.
The detailed work flow of the law recommendation method based on the law relation is shown in fig. 1. The above steps will be described in detail herein.
1. In order to improve the applicability of the invention to real cases and simultaneously verify the effectiveness of the law enforcement recommendation method provided by the invention in real scenes, step 1 collects a large number of referee documents of real cases from a Chinese referee document network to form a data set of the task.
2. In order to obtain content paragraphs required by model training from the referee document, remove vocabulary data which do not affect result prediction much, and improve the training effect of the joint generation model, the training corpus needs to be preprocessed in step 2. The method comprises the following specific steps:
and (2.1) extracting case facts, citation law strip lists and instruction control criminal names from the referee document by adopting a regular expression in view of the fact that the referee document belongs to a semi-structured document.
Step (2.2) Chinese word segmentation; because there is no space between the characters of the Chinese text, it needs to process the case basic situation by word segmentation, and at the same time, counts the frequency of each word appearing in turn for all words appearing in the corpus.
Removing low-frequency words; considering that the influence of the words with low frequency of occurrence on the final result is not large, the words with the frequency less than 30 are removed in the step, and a dictionary of the corpus used in the experiment is constructed. In addition, "< UNK >", "< START >", "< END >" flags are added to the dictionary, and represent a vocabulary not existing in the vocabulary set, a START flag in the sequence generation model, and an END flag in the sequence generation model, respectively.
Step (2.4) combining the control names of all cases in the training set, constructing a control name set aiming at the task corpus, and forming an output space of a task for predicting the names of the cases;
and (2.5) merging the cases in the corpus, and constructing a citation law set aiming at the task corpus to form an output space of a law recommendation task.
3. The basic case situation input by the user is preprocessed, and the aim is to remove noise data in the basic case situation input by the user. The concrete steps are basically consistent with the step 2 and comprise:
step (3.1) Chinese word segmentation is carried out on case facts input by a user:
and (3.2) converting each vocabulary into a unique heat vector according to a dictionary obtained by pre-training to represent, wherein words which do not appear in the vocabulary set are low-frequency vocabularies which are represented by a subscript corresponding to the vocabulary set by "< UNK >".
4. The invention focuses on the current situation of deep association of case facts, legal rules and acculation of the names of the crimes in the case auditing process in a real scene, so that a joint generation model is designed, and an acculation name prediction task and a rule recommendation task are integrated into the same frame for learning, and the invention aims to simultaneously mine the specific association between the case facts and the acculation names, between the case facts and the rules, between the acculation names and the rules and between the rules and the rules. The basic framework of the model is shown in fig. 2, where the law prediction is considered as a multi-label classification problem, unlike the existing work which only considers case facts and single mapping relations among laws, the present invention applies the encoder-decoder framework to the problem to generate predicted laws one by one. The encoder converts the vectorized case fact sequence into a distributed memory unit representation containing case fact potential characteristics through an attention mechanism, the memory units are used for predicting the incrimination names on one hand and inputting the incrimination names into the decoder on the other hand, and the generation of each step is combined with the output of the previous step to obtain the current predicted legal case result. The specific steps of the whole training process are as follows:
and (4.1) dividing the preprocessed data set, wherein 80% of the preprocessed data set is used for training, 10% of the preprocessed data set is used for verification, and 10% of the preprocessed data set is used for testing.
Step (4.2) the framework designed by the present invention is first described in detail.At the encoder portion, given the preprocessed case fact text, the one-hot vectors are converted to word-embedded vectors via a word-embedding layer that initializes a dimension dmodelMatrix of X | V |, where dmodelThe dimension of each word corresponding to the word embedded vector, | V | is the size of the word set, and each word gets its own word vector through the matrix. The following is the extraction of text semantic information, and the invention captures semantic information implicit in case facts through a self-attention mechanism. The calculation method of the self-attention mechanism is shown in fig. 3, and can be understood as a mapping process of a query (query) to a series of key-value pairs (key-value), the weight of a value corresponding to each key is obtained by calculating a vector product of the query and each key, and the attention information of the current query is obtained by weighted summation. Due to the nature that the self-attention mechanism can compute in parallel, the attention information of all queries can be computed simultaneously by the following formula:
Figure BSA0000220684140000051
where Q, K, V denotes a set of queries, a set of keys, and a set of values, respectively. However, the above-mentioned attention-free mechanism lacks consideration of position information in the process of extracting semantic information, and therefore, it is necessary to add this part of information, that is, to reflect the relative positions between words in the form of position codes, and each position-corresponding code is calculated as follows:
Figure BSA0000220684140000052
where pos denotes the position code and dim is a subscript corresponding to the dimension. When dim is an even number, it is calculated using a sine function, whereas the even subscripts are calculated using a cosine function. Since the position code and word embedding vectors have the same dimensions, they can be added together as the final case fact vector:
Figure BSA0000220684140000053
wherein wmWord-embedding vector, p, representing the m-th wordmA position code representing the m-th word,
Figure BSA0000220684140000054
representing a term-by-term addition. Then for each emThe calculation is based on the self-attention mechanism, and Q, K, V is E ═ E1,e2,…,em}:
b1,b2,…,bm=Attention(E,E,E)
Attention information b is obtained1,b2,…,bmAfter the encoder is started, the encoder is put into a fully connected forward neural network to calculate and obtain the final result of the encoder part, namely a memory unit:
m1,m2,…,mm=Feedforward(b1,b2,…,bm)
in the forecast part of the accustomed names, the maximum pooling calculation is applied to all the memory units, so that the probability of accustomed names is calculated based on the learning of a multi-class classification model.
Figure BSA0000220684140000055
Wherein
Figure BSA0000220684140000056
F is a multi-class classification equation for the predicted probability distribution of all convict name classes. Through the learning of the auxiliary task of the criminal name prediction, the memory unit comprises the basic semantic information of case facts, and in addition, the characteristic information effective to the criminal name prediction is learned, and the information also has the effect on the prediction of subsequent legal rules.
In order to apply the correlation between the laws to predict the laws, the decoder generates the next laws in turn by means of the predicted recommended laws based on the sequence generation model. The part also uses self-attentionThe decoder also uses two parts of a French strip generated in the previous step and a memory unit generated by the encoder, and particularly applies the two-time self-attention mechanism. When generating predicted French curve s at t time steptThen, the decoder first calculates the first t-1 time step outputs s1,s2,…,st-1Self-attention vector of (1), each s before calculationiWill be embedded into the matrix E via a normaloConversion to vector oiThe dimension of the matrix is dmodelAnd x S, where S is the size of the legal output space. Similarly, position coding is also applied to the vector representation of the normal to obtain the position information p of the normaliAdding the two terms one by one to obtain the final vector representation z of the normal bari
Figure BSA0000220684140000061
This results in the final input Z ═ { Z } for the decoder1,z2,…,zt-1}. The self-attention of the first layer in the decoder is calculated as follows:
l1,l2,…,lt-1=Attention(Z,Z,Z)
here, context vectors of the associations between the respective laws are extracted. Since in one case, not all words have the same contribution when generating the current law, attention mechanism needs to be applied to the memory unit next, and Q corresponds to the first layer of context vector L ═ L obtained from attention mechanism1,l2,…,lt-1K and V are all memory units M ═ M generated by the encoder1,m2,…,mmAnd i.e.:
r1,r2,…,rt-1=Attention(L,M,M)
the process enables the case facts extracted by the encoder to be respectively combined with the semantic information of the criminal names and the legal implication semantic information extracted by the decoder at different positions. Next, the above output attention results are filtered using a fully connected forward neural network:
g1,g2,…,gt-1=Feedforward(r1,r2,…,rt-1)
finally, the matrix E is embedded by a linear projection layer through a normal baroObtaining the probability distribution of the current prediction law relative to the law recommended task output space:
Figure BSA0000220684140000062
calculated to obtain
Figure BSA0000220684140000063
Representing the probability distribution of all candidate rules, and selecting the rule with the maximum probability value as the prediction result s of the current time stept. In addition to the frame structure, the invention also uses residual connection between each self-attention layer and the forward neural network layer to solve the degeneration phenomenon inherent in the neural network frame; before the final prediction results of the criminal name prediction task and the legal recommendation task are calculated, regularization is achieved through a layer normalization technology, and the occurrence of model overfitting is reduced.
For the law bar prediction task, the training objective is to minimize the cross entropy of the prediction probability value of all time step output law bars and the reference situation of the law bars in the real case, namely:
Figure BSA0000220684140000064
for the task of forecasting the accustomed names, the calculation of cross entropy is also used as a loss equation, namely:
Figure BSA0000220684140000065
wherein the content of the first and second substances,
Figure BSA0000220684140000066
and c represents the distribution of the criminal names in the real case. The overall frame loss equation is
Figure BSA0000220684140000067
Wherein lambda is the weight of the criminal name prediction task.
The criminal name prediction task and the legal recommendation task are simultaneously learned by combining the legal relation based on the preprocessed training set for the framework and the training target of the whole joint generation model. And adjusting the model parameters according to the loss of each training step, observing the training effect according to the verification set, and properly adjusting the hyper-parameters to realize better fitting of the model. And finally, evaluating the recommendation effect of the model according to the performance of the model on the test set.
5. And according to the combined generation model trained in the last step, based on case facts input by a user, completing prediction of case crime control names, and sequentially outputting a predicted recommendation law set. The method comprises the following specific substeps:
step (5.1) taking vectorized case facts as input, capturing semantic information implicit in the case facts through a self-attention mechanism on the basis of a coding part in a joint generation model, and coding the semantic information into a memory unit;
and (5.2) according to the obtained memory units, sequentially obtaining a predicted legal item list to be recommended by a memory unit decoding part in a combined generation model by taking the output of more than one time step of each time step as input and a < START >' label as initial input. When the decoder outputs the "< END >" tag, it indicates that the prediction is ended.
6. And extracting a recommended law set.
The method adopts the traditional accuracy, recall rate and F1 to evaluate the prediction effect of the legal recommendation task. During experimental evaluation, 10% of the corpus is selected as a test corpus according to the division method for the corpus, and the joint generation framework based on the French relation provided by the invention predicts the task in the FrenchThe performance of affairs is compared with the predicted effect of 8 reference models, which are respectively: a three-stage multi-label classification model TPP which is based on SVM and combined with text similarity for law prediction; using TF-IDF characteristics, regarding the law as labels, and training a multi-label classification model SE of a plurality of SVM-based binary classifiers for each label; considering each label combination as a single class of SVM-based multi-class classification model LP; from the self-adaptive angle of the algorithm, a multi-label task DT for predicting is established based on the multi-label entropy; a multi-label classification model ML-KNN which is predicted by a KNN method based on text similarity; a sentence level classification model CNN based on CNN; extracting semantics through Bi-GRU, then respectively predicting the names of guilties and the laws by using two fully-connected neural networks, and using an attention mechanism model Bi-GRU + ATT + Joint in the period; LSTM is used as the prediction model LSTM-based Seq2Seq for the decoder and encoder. In order to reflect the objectivity of the experimental results, all experiments were repeated 5 times, and the average value was taken as the final evaluation result. The experimental results are shown in fig. 4, wherein JGM represents a model trained for the above framework of the present invention without combining with the task of predicting the guilt name, and + Charge Prediction represents a complete framework model designed by the present invention; pC,RC,F1CEvaluation value, P, for each caseMi,RMi,F1MiThe evaluation value for each of the french categories. The experimental result shows that the law enforcement recommendation method provided by the invention is superior to all reference models in all indexes, and the effectiveness of the framework is proved; on the other hand, the criminal name prediction task is used as an auxiliary task to be learned in the same frame with the legal recommendation task, so that the legal recommendation effect is improved to a certain extent.
To illustrate the importance of the statute relationship in the framework designed by the present invention, we picked several representative cases to illustrate, and compared the joint generation model proposed by the present invention with the basic TPP model in the ability to predict relevant statutes, as shown in fig. 5. The first case is a traffic accident case, and there is an inclusion relationship between act I6 and I7, i.e., I7 is also applicable in the case of I6. In the third case of theft, C38 and C39 are used to adjudicate theft and robbery, respectively, and thus they are in an exclusive relationship, while the TPP model wrongly references both laws in the same case. In the second case for dangerous driving, D11 and D12 belong to the laws that are often referenced simultaneously, and the degree of association between them is about 0.864, which means that when D11 is referenced, there is a 86.4% probability that D12 will be referenced simultaneously. The comparison result shows that compared with TPP, the joint generation model provided by the invention can make more accurate prediction according to the law relation.
A statute recommendation method based on a statute relationship implemented according to the present invention has been described in detail above with reference to the accompanying drawings. The invention has the following advantages: training the model by adopting real data from a Chinese referee document network, so that a training result is more suitable for a recommendation task in a real scene; compared with the statistical characteristics adopted by various previous methods, the method fully utilizes semantic information for prediction based on deep learning from the linguistic angle, improves the prediction effect, and relatively relieves the imbalance of the prediction result, wherein the imbalance is shown as the phenomenon that the prediction result always tends to the frequent legal provision in the corpus; the method has the advantages that the integrity and the accuracy of a prediction result are improved by regarding the law recommendation task as a sequence generation model and considering semantic association among laws; the method integrates the criminal name prediction task and the legal note recommendation task into the same frame for simultaneous learning, thereby realizing prediction of the legal note by combining the association between the criminal name and the legal note, and being consistent with the actual situation that case facts, accuratory names and quoting the legal notes depend on each other in reality. In conclusion, the invention provides a law statement recommendation model based on law statement relations, which improves the law statement recommendation effect compared with the prior work and is suitable for law statement recommendation tasks in real scenes.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. Also, a detailed description of known process techniques is omitted herein for the sake of brevity. The present embodiments are to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (7)

1. A law enforcement recommendation method based on law enforcement relations is characterized by comprising the following steps:
collecting a referee document from a Chinese referee document network, and constructing a training corpus;
preprocessing the training corpus;
step (3) preprocessing user input;
step (4) training a sequence generation model which is based on the law-rule relation and performs joint learning by taking a criminal name prediction task as an auxiliary task;
step (5), extracting a recommendation law set;
and (6) outputting a recommended legal item list.
2. The french recommendation method according to claim 1, wherein in step (1), the referee documents are collected from a Chinese referee document network to construct the corpus.
3. The french recommendation method based on the french relation according to claim 1, wherein the preprocessing is performed on the corpus in step (2), and the specific substeps include:
step (2.1) extracting case facts, a reference law list and a designated control criminal name from the referee document;
step (2.2) Chinese word segmentation is carried out on case facts, word collections are obtained, and the frequency of occurrence of each word is recorded;
step (2.3) removing low-frequency words and constructing a dictionary of the task training corpus;
step (2.4) combining the control names of all cases, constructing a control name set aiming at the task training corpus, and forming an output space of a criminal name prediction task;
and (2.5) merging the law bars quoted by all cases, constructing a quote law bar set aiming at the task training corpus, and forming an output space of a law bar recommended task.
4. The french recommendation method based on french relations of claim 1, wherein in step (3), case facts input by a user are preprocessed, and the specific sub-steps include:
step (3.1) Chinese word segmentation is carried out on case facts input by a user;
and (3.2) converting each vocabulary into a unique heat vector representation according to the dictionary.
5. The law enforcement recommendation method based on the law enforcement relationship as claimed in claim 1, characterized in that in step (4), a law enforcement relationship based on the design of the present invention is trained, and a criminal name prediction task is used as an auxiliary task to perform learning simultaneously, so as to better realize a joint generation model of the law enforcement recommendation task. Dividing the preprocessed training corpus into a training set, a verification set and a test set, and using the training set to learn a joint generation model; the model is preliminarily evaluated in the training process by using the verification set, so that the training condition of the model can be observed conveniently; and (4) using the test set to evaluate the final generalization capability of the joint generation model. The training objective is to maximize the predictive effect of the two tasks, the criminal name prediction and the law recommendation. And repeating the training process to obtain the optimal legal recommendation generation model. The method comprises the following specific substeps:
step (4.1) dividing a data set into a training set, a verification set and a test set;
and (4.2) training a joint generation model.
6. The law enforcement recommendation method based on law enforcement relations as claimed in claim 1, wherein in step (5), the model is generated according to the combination trained in the previous step, the case convict names are predicted based on case facts input by users, and the recommendation law enforcement sets predicted by the model are sequentially output. The method comprises the following specific substeps:
step (5.1) taking the preprocessed case facts as input, capturing semantic information implicit in the case facts through a self-attention mechanism based on an encoder part in a joint generation model, and encoding the semantic information into a memory unit, wherein the memory unit is used for control prediction on one hand and legal recommendation on the other hand;
and (5.2) according to the obtained memory unit, a decoder part in the combined generation model takes the French output at the previous time step as input, the initial input is a mark < START > ", and the French predicted at the current time step is sequentially output. When the decoder outputs the "< END >" tag, it indicates that the prediction is ended.
7. The French recommendation method based on French relations of claim 1, wherein step (6) outputs a set of recommended French rules. The effectiveness of the legal recommendation is evaluated by accuracy, recall and F1 values.
CN202011036946.5A 2020-09-27 2020-09-27 Law recommendation method based on law relation Pending CN112148867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011036946.5A CN112148867A (en) 2020-09-27 2020-09-27 Law recommendation method based on law relation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011036946.5A CN112148867A (en) 2020-09-27 2020-09-27 Law recommendation method based on law relation

Publications (1)

Publication Number Publication Date
CN112148867A true CN112148867A (en) 2020-12-29

Family

ID=73894608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011036946.5A Pending CN112148867A (en) 2020-09-27 2020-09-27 Law recommendation method based on law relation

Country Status (1)

Country Link
CN (1) CN112148867A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112614024A (en) * 2020-12-30 2021-04-06 成都数之联科技有限公司 Case fact based intelligent law strip recommendation method, system, device and medium
CN113076089A (en) * 2021-04-15 2021-07-06 南京大学 API completion method based on object type

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763484A (en) * 2018-05-25 2018-11-06 南京大学 A kind of law article recommendation method based on LDA topic models
CN110717843A (en) * 2019-10-21 2020-01-21 南京大学 Reusable law strip recommendation framework
CN110750635A (en) * 2019-10-21 2020-02-04 南京大学 Joint deep learning model-based law enforcement recommendation method
CN110991694A (en) * 2019-10-30 2020-04-10 南京大学 Sentencing prediction method based on deep learning

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763484A (en) * 2018-05-25 2018-11-06 南京大学 A kind of law article recommendation method based on LDA topic models
CN110717843A (en) * 2019-10-21 2020-01-21 南京大学 Reusable law strip recommendation framework
CN110750635A (en) * 2019-10-21 2020-02-04 南京大学 Joint deep learning model-based law enforcement recommendation method
CN110991694A (en) * 2019-10-30 2020-04-10 南京大学 Sentencing prediction method based on deep learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YI FENG等: "Improving Statute Prediction via Mining Correlations between Statutes", 《ACML 2019》, pages 710 - 725 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112614024A (en) * 2020-12-30 2021-04-06 成都数之联科技有限公司 Case fact based intelligent law strip recommendation method, system, device and medium
CN112614024B (en) * 2020-12-30 2024-03-08 成都数之联科技股份有限公司 Legal intelligent recommendation method, system, device and medium based on case facts
CN113076089A (en) * 2021-04-15 2021-07-06 南京大学 API completion method based on object type
CN113076089B (en) * 2021-04-15 2023-11-21 南京大学 API (application program interface) completion method based on object type

Similar Documents

Publication Publication Date Title
CN110298037B (en) Convolutional neural network matching text recognition method based on enhanced attention mechanism
CN111897913B (en) Semantic tree enhancement based cross-modal retrieval method for searching video from complex text
CN110490946B (en) Text image generation method based on cross-modal similarity and antagonism network generation
CN110119765A (en) A kind of keyword extracting method based on Seq2seq frame
CN110188346B (en) Intelligent research and judgment method for network security law case based on information extraction
CN110647612A (en) Visual conversation generation method based on double-visual attention network
CN110717843A (en) Reusable law strip recommendation framework
CN112001162B (en) Intelligent trial system based on small sample learning
CN112926303A (en) Malicious URL detection method based on BERT-BiGRU
CN111400494B (en) Emotion analysis method based on GCN-Attention
CN112148867A (en) Law recommendation method based on law relation
CN112612871A (en) Multi-event detection method based on sequence generation model
CN111753058A (en) Text viewpoint mining method and system
CN113255366B (en) Aspect-level text emotion analysis method based on heterogeneous graph neural network
CN111831783B (en) Method for extracting chapter-level relation
CN113806494A (en) Named entity recognition method based on pre-training language model
CN112148868A (en) Law recommendation method based on law co-occurrence
CN114254645A (en) Artificial intelligence auxiliary writing system
CN113239663A (en) Multi-meaning word Chinese entity relation identification method based on Hopkinson
CN113704396A (en) Short text classification method, device, equipment and storage medium
CN114356990A (en) Base named entity recognition system and method based on transfer learning
CN112989830B (en) Named entity identification method based on multiple features and machine learning
CN114582448A (en) Epidemic case information extraction framework construction method based on pre-training language model
Liu et al. Shengyan at VQA-Med 2020: An Encoder-Decoder Model for Medical Domain Visual Question Answering Task.
Bhuiyan et al. An approach for bengali automatic question answering system using attention mechanism

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination