A judicial case modeling method, device and storage medium based on normalized tensor decomposition
By representing judicial cases as three-dimensional tensors based on the method of normalized tensor decomposition, the problem of difficulty in describing the correlation between case modules in the existing technology is solved, and the accuracy and description ability of the prediction algorithm are improved.
Patent Information
- Application Number
- CN202110379085.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-08
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-04-08
AI Technical Summary
Existing judicial case modeling methods cannot describe cases from multiple levels and are difficult to capture the correlation information between different case modules, resulting in low accuracy of subsequent prediction algorithms and relying on feature models to suffer from data sparse and dimensionality explosion problems.
A method based on normalized tensor decomposition is used to represent judicial cases as three-dimensional tensors. The original tensor is decomposed into a kernel tensor and a mapping matrix through the normalized tensor decomposition algorithm to improve the accuracy of the prediction algorithm.
Effectively captures the deep correlation information between case modules, improves the accuracy of subsequent prediction algorithms, reduces reliance on legal expertise and manual annotation, and can describe judicial cases from multiple levels.
Smart Images

Figure CN112883938B
Abstract
Description
Technical Field
[0001] The present application relates to a judicial case modeling method, and in particular to a judicial case modeling method, device and storage medium based on normalized tensor decomposition, belonging to the field of data processing technology. Background Art
[0002] Traditional modeling methods are mainly based on feature models and matrix decomposition. Figure 4 As shown in the figure, the feature model uses a feature dictionary and a feature extraction algorithm to represent judicial cases as a two-dimensional matrix. When the features and case scales are large, the feature model is prone to data sparsity and dimensionality explosion. To address the above problems, the judicial case modeling method based on matrix decomposition decomposes the original matrix obtained by the feature model and uses the obtained matrix to represent the case. When the matrix decomposition algorithm is combined with the co-occurrence matrix and the topic model, the obtained judicial case representation has certain semantic information, such as the similarity between words and the correlation between topics and features. The judicial case modeling method based on matrix decomposition reduces the matrix dimension, avoids dimensionality explosion and data sparsity, and is conducive to improving the accuracy of subsequent prediction algorithms. However, this type of method is based on the feature model and has the natural defects of the feature model. It cannot describe cases from multiple levels and it is difficult to capture the correlation information between different case modules, which is not conducive to improving the accuracy of subsequent prediction algorithms.
[0003] Common text modeling methods based on feature models and matrix decomposition cannot provide a multi-level and fine-grained description of cases and are not suitable for judicial case modeling. Unlike general text data, judicial cases have their own specific components, and the importance of each component varies in different judicial application scenarios. When determining the crime of a case, the accusation of the public prosecutor is particularly important; when predicting the outcome of a case, the information of the defendant and the plaintiff and the part found out during the trial play a decisive role. When the parties to the case are minors, disabled people, and patients with mental disorders, the case is often sentenced leniently or severely. Existing judicial case modeling methods cannot characterize cases at the case module and vocabulary level in the case module. Summary of the invention
[0004] In order to solve the technical problem that the natural defects existing in the prior art are not conducive to improving the accuracy of subsequent prediction algorithms, the present invention provides a judicial case modeling method based on normalized tensor decomposition, which makes up for the shortcomings of the prior art, represents judicial cases as three-dimensional tensors, and uses a normalized tensor decomposition algorithm and a weight matrix to decompose the original tensor into a core tensor and a series of mapping matrices, thereby improving the accuracy of subsequent prediction algorithms.
[0005] A judicial case modeling method based on normalized tensor decomposition includes the following steps:
[0006] S1. Divide judicial cases into modules;
[0007] S2. Filter the words in the judicial case module;
[0008] S3. Matrixing the judicial case module and generating tensors;
[0009] S4. Decompose the original tensor of the judicial case into a core tensor to complete the judicial case modeling.
[0010] Preferably, the module segmentation of the judicial case described in step S1 specifically includes: a subject module, an object module, a motive module, a behavior module and a result module; the subject module contains the suspect information; the object module contains the victim information; the motive module contains event information; the behavior module contains the crime process and case development; the result module contains the victim's loss, the social impact caused and the serious consequences.
[0011] Preferably, the module vocabulary filtering of judicial cases described in step S2 includes vocabulary reduction, vocabulary sorting, vocabulary cutting or filling; the vocabulary reduction includes word segmentation and stop word removal of sentences in each case module, and meaningless words in the original sentences, while retaining professional terms in the legal field; the vocabulary sorting includes sorting the vocabulary in each case module; the vocabulary cutting or filling includes setting the standard length of the case module, trimming or filling the vocabulary in each case module to make them of the same length.
[0012] Preferably, the vocabulary reduction described in step S2 includes constructing a stop word dictionary and a legal industry-specific word dictionary.
[0013] Preferably, the matrixing of the judicial case modules described in step S3 includes vectorizing the vocabulary in each judicial case module, converting the one-hot vectors in the corpus into low-dimensional dense vectors, and representing the case modules that have undergone vocabulary filling operations with blank vocabulary using zero vectors, mean vectors, or random vectors; each judicial case module is represented in the form of a matrix with the same dimension, and the case module matrices of each case in the three-dimensional space are combined to obtain a tensor representation of the judicial case.
[0014] Preferably, the specific algorithm for decomposing the original tensor of judicial cases into core tensors in step S4 is as follows:
[0015]
[0016] Let λ = χ × s W, Make it
[0017] Where χ is the original tensor of judicial cases, W is the judicial case module matrix, I1 represents the number of judicial case modules, I2 represents the number of words in each judicial case module, and I N Represents the dimension of each vocabulary in the judicial case module;
[0018] Core Tensor The following conditions must be met:
[0019]
[0020] in, is the core tensor, {U (n)} is a set of mapping matrices, n∈[1,N]; {U (n)}and Make the objective function φ obtain the minimum value, and
[0021]
[0022] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements a step of judicial case modeling based on normalized tensor decomposition when executing the computer program.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements a judicial case modeling method based on normalized tensor decomposition.
[0024] The beneficial effects of the present invention are as follows: A judicial case modeling method based on normalized tensor decomposition. The core tensor obtained by the judicial case modeling method based on normalized tensor decomposition is more in line with the case crime determination scenario, carries deep correlation information between different case modules, and improves the accuracy of subsequent case-related prediction algorithms; the judicial case modeling method based on normalized tensor decomposition effectively solves the natural defects of the judicial case modeling method based on feature models, does not require a large amount of legal expertise and manual labeling work, is not strongly dependent on vocabulary and grammatical information in the database, can describe judicial cases from all levels, and capture potential correlations between different case modules. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0026] Figure 1 This is a flow chart of the modeling method described in an embodiment of the present invention;
[0027] Figure 2The matrixization and tensor generation process of the judicial case module described in the embodiment of the present invention;
[0028] Figure 3 A pseudo code diagram of a decomposition algorithm according to an embodiment of the present invention;
[0029] Figure 4 Schematic diagram of traditional modeling methods based on feature models and matrix decomposition. DETAILED DESCRIPTION
[0030] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0031] Examples, references Figures 1 to 4 , describing this embodiment, a judicial case modeling method based on normalized tensor decomposition in this embodiment comprises the following steps:
[0032] Step 1. Divide the judicial case into modules; specifically including: subject module, object module, motivation module, behavior module and result module; the subject module contains the suspect information; the object module contains the victim information; the motivation module contains event information; the behavior module contains the crime process and case development; the result module contains the victim's loss, the social impact caused and the serious consequences.
[0033] Step 2. Filter the vocabulary in the judicial case module; specifically including vocabulary reduction, vocabulary sorting, vocabulary cutting or filling; the vocabulary reduction includes word segmentation and stop word removal of sentences in each case module, and removal of meaningless words in the original sentences, while retaining professional terms in the legal field; the vocabulary sorting includes sorting the vocabulary in each case module; the vocabulary cutting or filling includes setting the standard length of the case module, cutting or filling the vocabulary in each case module to make them of the same length.
[0034] Step 3. Matrixize the judicial case module and generate tensors; Matrixization of judicial case modules includes vectorizing the vocabulary in each judicial case module, converting the one-hot vectors in the corpus into low-dimensional dense vectors, and representing the case modules that have undergone vocabulary filling operations with blank vocabulary using zero vectors, mean vectors, or random vectors; each judicial case module is represented in the form of a matrix with the same dimension, and the case module matrix of each case in the three-dimensional space is combined to obtain the tensor representation of the judicial case.
[0035] Step 4. Decompose the original tensor of the judicial case into a core tensor to complete the judicial case modeling. A judicial case modeling method based on normalized tensor decomposition uses a normalized tensor decomposition algorithm to decompose the original tensor representing the judicial case into a core tensor. The normalized tensor decomposition algorithm is an unsupervised tensor decomposition algorithm based on Tucker decomposition. Normalized tensor decomposition approximates the original tensor as a core tensor and a series of mapping matrix products under the action of a weight matrix.
[0036] The specific decomposition algorithm for decomposing the original tensor of judicial cases into the core tensor is as follows:
[0037]
[0038] Let λ = χ × s W Make it
[0039] Where χ is the original tensor of judicial cases, W is the judicial case module matrix, I1 represents the number of judicial case modules, I2 represents the number of words in each judicial case module, and I N Represents the dimension of each vocabulary in the judicial case module;
[0040] Given a tensor χ, and the weight matrix, W, The scaling of χ based on W is λ = χ × s W, Among them
[0041] Core Tensor The following conditions must be met:
[0042]
[0043] in, is the core tensor, {U (n)} is a set of mapping matrices, n∈[1,N]; {U (n)}and Make the objective function φ obtain the minimum value, and
[0044]
[0045] J N The value of is predefined. Generally speaking, we use J N The value is less than I N , thereby achieving the purpose of reducing the dimension. At the same time, J N The value of is constrained by formula (2). The smaller the value of the objective function, the higher the value of J NThe more reliable the value of , the closer the kernel tensor is to the original tensor.
[0046] Specifically, the case module segmentation provides the basis for TENR to generate the original tensor, and the subject module mainly contains the background information of criminal suspects, criminal groups, etc. For legal case documents, the subject module is the seven identities of the defendant among the parties: name, gender, date of birth, ethnicity, place of birth, occupation or work unit and position, and address. For legal consultation sentences, the content of the subject module is usually relatively brief, generally focusing on the name, gender, occupation or work unit and position, and address of the defendant. Similarly, the object module mainly contains the background information of the victim, the organization that suffered harm, etc.
[0047] Specifically, the motivation module includes subjective emotional information such as the cause of the incident, the remorse of the suspect after the incident, and the attitude of the victim. For legal case documents, the motivation module contains three parts: the origin of the case, important circumstances, and related issues. The origin of the case refers to the cause and process of the case. Important circumstances refer to the parties' attitudes, such as the defendant's remorse and whether the victim forgives. Related issues refer to other facts related to the case, such as whether there is a criminal record. For legal consultation sentences, the motivation module is mainly composed of the subjective attitudes of the defendant and the plaintiff, such as "repeated requests have failed", "extremely bad attitude", "no forgiveness", etc.
[0048] Specifically, the behavior module mainly includes the crime process and case development, and is also the main component of legal case documents and consulting statement texts.
[0049] Specifically, the result module includes the losses of the victim, the social impact caused, and the serious consequences, which are mainly given in the title and end of the legal case documents and consulting statements.
[0050] Specifically, since there is a lot of information in the original judicial case data that is not important to the subsequent prediction algorithm, such as the information of the public prosecutor and the defense lawyer in the legal case documents, and the modal particles and stop words in the legal consultation sentences, etc. This information often interferes with the subsequent prediction algorithm and seriously reduces the accuracy of the algorithm. Therefore, after the case module is segmented, each case module needs to be filtered.
[0051] Among them, vocabulary filtering includes:
[0052] (1) Vocabulary reduction: Construct a stop word dictionary and a legal industry-specific word dictionary. The stop word dictionary aims to filter out modal particles and stop words that are useless to the subsequent prediction algorithm. The legal industry-specific word dictionary aims to filter out important case elements. In view of different prediction scenarios, combined with corresponding laws and regulations, this article constructs multiple legal word dictionaries. According to the above two types of dictionaries, the sentences in each case module are segmented and stop words are removed. Remove meaningless words from the original sentences while retaining professional terms in the legal field to avoid segmentation errors and loss of key words. The vocabulary reduction operation can effectively eliminate information that is irrelevant to the subsequent prediction algorithm and retain important case elements.
[0053] (2) Vocabulary sorting: Sort the vocabulary in each case module according to the order of appearance, frequency, TF-IDF value (Term Frequency–Inverse Document Frequency), vocabulary weight value in specific scenarios, etc. In legal case documents and consulting sentences, the recurring and first-appearing words occupy a more important position in the entire case description. Especially in legal consulting sentences, the case facts stated by the user first are often an important factor in determining the case charges and the case verdict. The TF-IDF value selects representative vocabulary in the case module. In addition, the same vocabulary has different weights in different prediction scenarios. For example, "separation" is an important case element in divorce cases, but has a lower weight in theft cases.
[0054] (3) Vocabulary cutting or filling: Since TENR represents judicial cases with tensors of the same dimension and number of dimensions, the case modules have the same dimensions, and the number of words contained in each case module should be the same. According to the distribution of cases in the database, the standard length of the case module is set, and the words in each case module are cut or filled to make them the same length. For case modules with a vocabulary larger than the standard length, the TF-IDF algorithm is used to sort and cut the vocabulary. For case modules with a vocabulary smaller than the standard length, they are filled with pre-set blank words.
[0055] On the basis of case module segmentation, TENR uses vocabulary reduction, vocabulary sorting, vocabulary cutting or padding to extract valid vocabulary from the original data of the case module. The premise of representing the case as a tensor is that each case module has the same number of meaningful words. In order to remove meaningless words and avoid the loss of case elements, TENR constructs a stop word dictionary and a legal industry-specific word dictionary to preliminarily filter the vocabulary in the module. TENR uses vocabulary order, TF-IDF value, etc. to sort the vocabulary, and then sets the standard length, and cuts or fills to make each module have the same number of words. The vocabulary filtering operation in the module does not require a large amount of manual annotation, avoids data sparsity, and helps TENR describe cases from multiple levels.
[0056] After the module vocabulary is filtered, the number of words in each module is the same. The case module matrix represents the words in each module with vectors of the same dimension, and uses the matrix composed of the vocabulary vectors in the module to represent the module. The module matrices of each case are combined together to obtain the tensor representation of the case. For the case module matrix, this embodiment uses the word2vec tool to vectorize the words in each case module and converts the one-hot vectors in the corpus into low-dimensional dense vectors. For case modules that have undergone vocabulary filling operations, blank words can be represented by zero vectors, mean vectors or random vectors. Each judicial case module is represented in the form of a matrix with the same dimension. Further, the case module matrix of each case in the three-dimensional space is combined to obtain the tensor representation of the judicial case.
[0057] The computer device of the present invention may be a device including a processor and a memory, such as a single chip microcomputer including a central processing unit, etc. Moreover, the processor is used to implement the steps of the above-mentioned modeling method based on CREO software that can modify the relationship-driven modeling data when executing the computer program stored in the memory.
[0058] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0059] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0060] Computer Readable Storage Medium Embodiments
[0061] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by a processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. A computer program is stored on the computer-readable storage medium. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-mentioned modeling method of modifiable relationship-driven modeling data based on CREO software can be implemented.
[0062] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer readable media do not include electric carrier signals and telecommunication signals.
[0063] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0064] The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may be subject to various modifications and changes.
Claims
1. A judicial case modeling method based on normalized tensor decomposition, It is characterized in that The following steps are involved: S1. Divide judicial cases into modules; S2. Filter the words in the judicial case module; S3. Matrixing the judicial case module and generating tensors; S4. decompose the original tensor of the judicial case into a core tensor to complete the judicial case modeling; The module segmentation of the judicial case in step S1 specifically includes: subject module, object module, motivation module, behavior module and result module; the subject module includes the suspect information; the object module includes the victim information; the motivation module includes the event information; the behavior module includes the crime process and case development; the result module includes the victim's loss, the social impact caused and the serious consequences; The module vocabulary filtering of judicial cases in step S2 includes vocabulary reduction, vocabulary sorting, vocabulary cutting or filling; the vocabulary reduction includes segmenting the sentences in each case module, removing stop words, removing meaningless words in the original sentences, and retaining legal professional terms; the vocabulary sorting includes sorting the words in each case module; the vocabulary cutting or filling includes setting the standard length of the case module, cutting or filling the words in each case module to make them of the same length; The matrixing of the judicial case modules described in step S3 includes vectorizing the vocabulary in each judicial case module, converting the one-hot vectors in the corpus into low-dimensional dense vectors, and representing the case modules that have undergone vocabulary filling operations with blank vocabulary using zero vectors, mean vectors, or random vectors; each judicial case module is represented in the form of a matrix with the same dimension, and the case module matrix of each case in the three-dimensional space is combined to obtain a tensor representation of the judicial case; The specific algorithm for decomposing the original tensor of judicial cases into the core tensor in step S4 is as follows: make Make it Among them, χ is the original tensor of judicial cases, W is the judicial case module matrix, I 1 represents the number of judicial case modules, I 2 represents the number of words in each judicial case module, I N Represents the dimension of each vocabulary in the judicial case module; Core Tensor The following conditions must be met: in, is the core tensor, {U (n) } is a set of mapping matrices, {U (n) }and Make the objective function φ obtain the minimum value, and 2. The method according to claim 1, It is characterized in that The vocabulary reduction described in step S2 includes constructing a stop word dictionary and a legal industry-specific word dictionary.
3. A computer device, Features: It includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of judicial case modeling based on normalized tensor decomposition as described in claim 1 or 2 when executing the computer program.
4. A computer-readable storage medium having a computer program stored thereon, Features: When the computer program is executed by a processor, it implements a judicial case modeling method based on normalized tensor decomposition as described in claim 1 or 2.
