CN109376964B - Criminal case criminal name prediction method based on memory neural network - Google Patents
Criminal case criminal name prediction method based on memory neural network Download PDFInfo
- Publication number
- CN109376964B CN109376964B CN201811505665.2A CN201811505665A CN109376964B CN 109376964 B CN109376964 B CN 109376964B CN 201811505665 A CN201811505665 A CN 201811505665A CN 109376964 B CN109376964 B CN 109376964B
- Authority
- CN
- China
- Prior art keywords
- criminal
- name
- neural network
- case
- key
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q50/00—Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
- G06Q50/10—Services
- G06Q50/18—Legal services; Handling legal documents
Abstract
The invention discloses a criminal case criminal name prediction method based on a memory neural network, which comprises the following steps: step one, constructing a training data set, and acquiring case description and a criminal name as training data; step two, constructing a memory neural network model and training through training data; memorizing key-value pairs stored in a neural network model, namely 'case description feature vector' - 'criminal name coding' pairs; thirdly, judging the criminal case criminal names through the trained memory neural network model. The model of the invention can well predict the low-frequency criminal names, and the invention provides a set of end-to-end criminal name prediction framework, which can provide powerful reference for judges and improve the degree of judicial automation and intellectualization.
Description
Technical Field
The invention relates to the field of judicial intellectualization, in particular to a criminal case criminal name prediction method based on a memory neural network.
Background
At present, criminal case criminal name prediction is generally seen as a text classification problem: the case description is used as a text to be classified, the corresponding criminal name is used as a corresponding classification label, and then an SVM or neural network model is trained for classification.
Existing generic text classification systems rely on a sufficient training data and training data set with a balanced number of classes, however, the distribution of cases of different classes is naturally unbalanced, e.g. the "steal" crime may have thousands of cases in the database, while the "hide the foreign deposit crime" may have only a few cases in the database, and its frequency distribution is a long tail distribution, i.e. high frequency crimes are actually few, while most of them are of a lower frequency. The insufficient model learning is caused by too small amount of class data, and the imbalance of data distribution causes the model to tend to predict classes with large number of samples, so that the current mainstream text classification method can only obtain considerable effect on a small number of high-frequency crime names under the situation.
Disclosure of Invention
The invention aims to provide a criminal case criminal name forecasting method based on a memory neural network aiming at the problems in the prior art, so that low-frequency criminal names can be well forecasted, and the judicial automation and intelligence degree can be improved.
In order to achieve the purpose, the technical scheme adopted by the invention comprises the following steps:
step one, constructing a training data set, and acquiring case description and a criminal name as training data;
step two, constructing a memory neural network model and training through training data;
memorizing key-value pairs stored in a neural network model, namely 'case description feature vector' - 'criminal name coding' pairs;
thirdly, judging the criminal case criminal names through the trained memory neural network model.
Step one, crawling criminal referee from the Chinese referee document network, and acquiring case description and criminal name as training data.
The concrete steps of constructing the memory neural network model in the second step comprise:
step 2-1) segmenting words for case description, and mapping the words into word vector sequences;
step 2-2) performing one-dimensional convolution neural network extraction on the word vector sequence to obtain a feature vector q of case description;
step 2-3) inputting the characteristic vector q into a key-value memory module for K-neighbor matching, respectively calculating cosine similarity of q and each key, selecting K keys with the largest cosine similarity, taking coded values of the keys, and selecting the value with the largest number of K values;
and 2-4) converting the obtained code value into a corresponding guilty name.
The vocabulary in the step 2-1) adopts the Qinghua university sourcing tool (socket), and the mapping directly follows the model training.
When training is carried out through training data in the second step, for a training sample, if the predicted crime name is inconsistent with the standard crime name, the characteristic vector of the training sample is used as a key, and the crime name code is used as a value to be inserted into the key-value memory module; if the predicted guilty name is consistent with the standard guilty name, averaging the characteristic vector of the guilty name and the key corresponding to the same guilty name most similar to the characteristic vector, and inserting the key back to the original position.
And in the second step, when training is carried out through training data, when a new feature vector needs to be inserted, but the memory module is full, the position which is not updated for the longest time in the memory module is selected to be discarded, and the position is replaced by a new key-value pair.
Compared with the prior art, the technical scheme adopted by the invention is as follows: the method comprises the steps of establishing a training data set by taking standard case description and criminal names thereof as training data, training a constructed memory neural network model through the training data set, converting a case description feature vector-criminal name code into a key-value pair stored in the memory neural network model, and judging the criminal case criminal names by adopting a multi-layer perceptron classifier.
Drawings
FIG. 1 is a schematic flow chart of a criminal case criminal name forecasting method.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
Referring to fig. 1, the criminal case criminal name prediction method based on the memory neural network comprises the following steps:
step 1) constructing a training data set;
climbing criminal referee from a Chinese referee document network to obtain case description and criminal names as training data; if the corresponding criminal names of the case description have multiple items, the main criminal names are selected, and then each criminal name is mapped into a unique integer as the code of the criminal name.
Step 2), constructing and training a memory neural network model;
a. the method for constructing the neural network model specifically comprises the following steps:
step 2-1) segmenting words for case description, and mapping the words into word vectors; the segmentation adopts the beginning tool of Qinghua university, and because the word vector in the task is related to the field, the pre-trained word vector is not used, and the mapping directly follows the model training.
Step 2-2) performing one-dimensional convolution neural network extraction on the word vector sequence obtained in the step 2-1) to obtain a feature vector q of case description; other feature extraction networks, such as using LSTM to extract temporal features, may also be used. However, convolutional neural networks are more directly effective at extracting features than other network structures, such as a recurrent neural network, at this task.
Step 2-3) the eigenvector q obtained in step 2-2) enters a key-value memory module to carry out K-nearest neighbor matching, the matching method calculates cosine similarity for q and each key respectively, K keys with the largest cosine similarity are selected, the value (here, the code of the guilty name category) is obtained, and the value with the largest quantity in the K values is selected;
the key-value pairs stored in the memory module are actually the ' case description feature vector ' -criminal name code ' pairs.
Step 2-4) converting the code value obtained in step 2-3) into its corresponding guilt name.
b. The training step of the memory module of the neural network comprises the following steps:
step 3-1), if the predicted guilty name is inconsistent with the standard guilty name, the characteristic vector of the training sample is used as a key, and the guilty name code is used as a value to be inserted into a key-value memory module; if the predicted guilty name is consistent with the standard guilty name, averaging the feature vector of the predicted guilty name with the key corresponding to the same guilty name most similar to the feature vector of the predicted guilty name, and inserting the key back to the original position;
step 3-2) in step 3-1), when a new feature vector is to be inserted and the memory module is full, the location in the memory module that has not been updated for the longest time is selected to be discarded and replaced with a new key-value pair.
Claims (4)
1. A criminal case criminal name prediction method based on a memory neural network is characterized by comprising the following steps:
step one, constructing a training data set, and acquiring case description and a criminal name as training data;
step two, constructing a memory neural network model and training through training data;
memorizing key-value pairs stored in a neural network model, namely 'case description feature vector' - 'criminal name coding' pairs;
the specific steps for constructing the memory neural network model comprise:
step 2-1) segmenting words for case description, and mapping the words into word vector sequences;
step 2-2) performing one-dimensional convolution neural network extraction on the word vector sequence to obtain a feature vector q of case description;
step 2-3) inputting the characteristic vector q into a key-value memory module for K-neighbor matching, respectively calculating cosine similarity of q and each key, selecting K keys with the largest cosine similarity, taking coded values of the keys, and selecting the value with the largest number of K values;
step 2-4) converting the obtained code value into a corresponding criminal name;
when training is carried out through training data, for a training sample, if the predicted crime name is inconsistent with the standard crime name, the characteristic vector of the training sample is used as a key, and the crime name code is used as a value to be inserted into a key-value memory module; if the predicted guilty name is consistent with the standard guilty name, averaging the characteristic vector of the guilty name and the key corresponding to the same guilty name most similar to the characteristic vector, and inserting the key back to the original position;
when training is carried out through training data, when a new feature vector is inserted, but the memory module is full, the position which is not updated for the longest time in the memory module is selected to be discarded, and a new key-value pair is replaced;
thirdly, judging the criminal case criminal names through the trained memory neural network model.
2. The criminal case criminal name prediction method based on the memory neural network as claimed in claim 1, wherein: the first step is to crawl criminal referee from the Chinese referee document network and obtain case description and criminal name as training data.
3. The criminal case criminal name prediction method based on the memory neural network as claimed in claim 1, wherein: if the corresponding criminal names of the case description have multiple items, the main criminal names are selected, and then each criminal name is mapped into a unique integer as the code of the criminal name.
4. The criminal case criminal name prediction method based on the memory neural network as claimed in claim 1, wherein: the vocabulary in the step 2-1) adopts the Qinghua university sourcing tool (socket), and the mapping directly follows the model training.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811505665.2A CN109376964B (en) | 2018-12-10 | 2018-12-10 | Criminal case criminal name prediction method based on memory neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811505665.2A CN109376964B (en) | 2018-12-10 | 2018-12-10 | Criminal case criminal name prediction method based on memory neural network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109376964A CN109376964A (en) | 2019-02-22 |
CN109376964B true CN109376964B (en) | 2021-11-12 |
Family
ID=65373147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811505665.2A Active CN109376964B (en) | 2018-12-10 | 2018-12-10 | Criminal case criminal name prediction method based on memory neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109376964B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112396201A (en) * | 2019-07-30 | 2021-02-23 | 北京国双科技有限公司 | Criminal name prediction method and system |
CN111260114B (en) * | 2020-01-08 | 2022-06-17 | 昆明理工大学 | Low-frequency confusable criminal name prediction method for integrating case auxiliary sentence |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108846384A (en) * | 2018-07-09 | 2018-11-20 | 北京邮电大学 | Merge the multitask coordinated recognition methods and system of video-aware |
-
2018
- 2018-12-10 CN CN201811505665.2A patent/CN109376964B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108846384A (en) * | 2018-07-09 | 2018-11-20 | 北京邮电大学 | Merge the multitask coordinated recognition methods and system of video-aware |
Non-Patent Citations (6)
Title |
---|
Few-Shot Charge Prediction with Discriminative Legal Attributes;Zikun Hu 等;《Proceedings of the 27th International Conference on Computational Linguistics》;20180826;全文 * |
Key-Value Memory Networks for Directly Reading Documents;Alexander H. Miller 等;《arxiv》;20161010;第1-10页 * |
Learning to Predict Charges for Criminal Cases with Legal Basis;Bingfeng Luo 等;《arxiv》;20170728;全文 * |
Legal Article-Aware End-To-End Memory Network for Charge Prediction;Yatian Shen 等;《CSAE2018》;20181031;第1-5页 * |
Legal Judgment Prediction via Topological Learning;Haoxi Zhong 等;《researchgate》;20180131;第3540-3549页 * |
基于神经网络的刑事案件量刑决策系统;邹晓玫 等;《软件时空》;20081231(第1-3期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN109376964A (en) | 2019-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109376963B (en) | Criminal case and criminal name and criminal law joint prediction method based on neural network | |
CN111723645B (en) | Multi-camera high-precision pedestrian re-identification method for in-phase built-in supervised scene | |
WO2020081867A1 (en) | Semi-supervised person re-identification using multi-view clustering | |
CN107481256B (en) | Method and apparatus for updating background model | |
CN103970733B (en) | A kind of Chinese new word identification method based on graph structure | |
CN106778876A (en) | User classification method and system based on mobile subscriber track similitude | |
CN108399180B (en) | Knowledge graph construction method and device and server | |
CN110796088B (en) | Video similarity judging method and device | |
CN110019889A (en) | Training characteristics extract model and calculate the method and relevant apparatus of picture and query word relative coefficient | |
CN112819065B (en) | Unsupervised pedestrian sample mining method and unsupervised pedestrian sample mining system based on multi-clustering information | |
CN107908642B (en) | Industry text entity extraction method based on distributed platform | |
CN108183956B (en) | Method for extracting key path of propagation network | |
CN110851176B (en) | Clone code detection method capable of automatically constructing and utilizing pseudo-clone corpus | |
CN109376964B (en) | Criminal case criminal name prediction method based on memory neural network | |
CN109582813A (en) | A kind of search method, device, equipment and the storage medium of historical relic showpiece | |
CN109977668B (en) | Malicious code query method and system | |
CN110929848A (en) | Training and tracking method based on multi-challenge perception learning model | |
CN103020321B (en) | Neighbor search method and system | |
CN109871749A (en) | A kind of pedestrian based on depth Hash recognition methods and device, computer system again | |
CN105678244A (en) | Approximate video retrieval method based on improvement of editing distance | |
CN114842371A (en) | Unsupervised video anomaly detection method | |
CN114782752A (en) | Small sample image grouping classification method and device based on self-training | |
CN108133387B (en) | Multi-label K nearest neighbor algorithm based on soft information | |
CN113743239A (en) | Pedestrian re-identification method and device and electronic equipment | |
CN115186670B (en) | Method and system for identifying domain named entities based on active learning |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |