A case similarity calculation method and system based on graph convolution

The neural network model based on graph convolution is used to process the knowledge graph, which solves the problem of difficulty in obtaining the relationship between the legal elements of the case in the existing technology, achieves high-accuracy case similarity calculation, and meets the demand for computational efficiency.

CN114169429BActive Publication Date: 2024-10-15XIANGTAN UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202111474411.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2024-10-15
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

Existing case similarity calculation methods based on text content are difficult to obtain the long-term, global and discontinuous dependencies between legal elements, and the calculation efficiency is low, making it impossible to accurately find similar cases.

Method used

A neural network model based on graph convolution is used to extract the knowledge graph from the legal documents of the case, convert it into a graph structure, and use the graph convolution network layer, graph node information aggregation layer and loss layer to calculate the graph representation of the case, using vector similarity The degree method calculates the similarity between cases.

Benefits of technology

It effectively captures the long-term and global dependencies between legal elements in the case, improves the accuracy of case similarity calculation, and meets the computing performance requirements in massive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114169429B_ABST
    Figure CN114169429B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of graph data processing, and discloses a case similarity calculation method based on graph convolution, including the steps of: training a neural network model based on graph convolution; extracting a knowledge graph from the case description of the case legal document whose similarity is to be calculated; converting the knowledge graph into a graph; inputting the graph into the trained neural network model based on graph convolution to obtain a graph representation of the case; and using a vector similarity calculation method to calculate the similarity between the case graph representations as the similarity between the corresponding cases. The method can obtain long-term, global and discontinuous dependencies between legal elements, effectively improve the accuracy of case similarity calculation, and can be used in massive data, and the computing performance of the system meets actual needs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of graph data processing, and in particular relates to a case similarity calculation method and system based on graph convolution. Background Art

[0002] In Natural Language Processing (NLP), text similarity calculation is a basic problem in the research of natural language processing. By measuring the similarity of two texts, it is used to determine whether two articles are similar, which has practical significance in many scenarios. For example, in judicial practice, similar cases are advocated for similar judgments, which means that the same or similar cases can get the same or similar judgment results. Similar cases and similar judgments can unify the standards of judicial judgments and maintain judicial fairness; the judgment results of similar cases can be used to calculate the deviation in the judgment process to ensure judicial authority; when encountering difficult cases, similar cases can also inspire and expand the judgment ideas of young judges. Through active or passive methods, find judges and parties who have been judged cases similar to the cases at hand.

[0003] In order to achieve similar judgments for similar cases, it is necessary to accurately calculate the similarity between cases. At present, people have made a lot of efforts: in order to accurately push cases according to case similarity, the Chinese invention patent with announcement number CN110442684B discloses a similar case recommendation method based on text content. The method is divided into a pre-training part and a fine-tuning part. The pre-training part uses the Transformer encoder as the main structure to train a Chinese language model, learn Chinese language knowledge from other corpora, and obtain a high-quality language model. The fine-tuning part uses a triple neural network model as a framework and pre-processed judicial documents as training data to learn more about judgments from the judicial field and obtain a better text vector representation. This similar case recommendation method based on text content can only use the semantic information of the content in the sentence, and it is difficult to obtain the long-term, global and non-continuous dependency relationship between legal elements. For complex cases, the subject-object relationship often spans multiple sentences or even multiple paragraphs, and the current judgment documents, indictments, rulings, etc. have very long text content, so the case similarity method based on text content is difficult to accurately calculate the similarity between cases. In addition, the model parameters based on text content are huge, the training time is long, the amount of data required is extremely large, and the computing efficiency cannot meet actual needs.

[0004] In the domain text similarity calculation method, the knowledge graph is a structured knowledge representation method. As a label graph, it is composed of a large number of triples (head entity, relationship, tail entity), represented as (h, r, t), where the relationship r models the relationship between two entities, which can fully represent the knowledge contained in the domain text and is a natural representation with relational structure in encoding many fields. Chinese invention patent CN110795926B discloses a judgment document similarity judgment method and system based on legal knowledge graph. The method takes advantage of the knowledge graph in representing case relationships, constructs the knowledge graph of the two judgment documents to be compared, and embeds the entities in the knowledge graph, and then takes the mean of the embedding vectors of the knowledge graph entities as the feature vector of the case, and finally calculates the similarity of the two legal documents through operations between the feature vectors.

[0005] However, the method of taking the average of the embedding vectors of two knowledge graph entities as the case feature vector loses a lot of structural information of the knowledge graph, which reflects the relationship between legal elements. Therefore, the method of taking the average of the vectors of two knowledge graphs and then calculating the similarity result has a very low accuracy and cannot find real similar cases. Summary of the invention

[0006] The technical problem to be solved by the present invention is to overcome the problems existing in traditional text content-based methods and the difficulties in training neural networks on knowledge graphs.

[0007] To solve the above problems, the present invention provides:

[0008] A case similarity calculation method based on graph convolution includes the following steps:

[0009] S1. Train a neural network model based on graph convolution;

[0010] S2. Extracting a knowledge graph from the case description of the legal document of the case whose similarity is to be calculated;

[0011] S3. Converting the knowledge graph into a graph;

[0012] S4. Inputting the graph into the trained graph convolution-based neural network model to obtain a graph representation of the case;

[0013] S5. The similarity between the case graph representations is calculated using a method for calculating the similarity between vectors as the similarity between the corresponding cases.

[0014] Furthermore, the graph convolution-based neural network model includes a graph convolution network layer, a graph node information aggregation layer, and a loss layer; the graph convolution network layer is formed by stacking multiple graph convolution layers, and the output of the previous graph convolution layer is used as the input of the next graph convolution layer. The lth layer is shown in the following formula:

[0015]

[0016] in, A is the adjacency matrix of the graph, I n is the identity matrix, is the diagonal matrix of the graph, and W (l) ∈R n×d is the trainable weight matrix of layer l, σ(·) represents the activation function, H (l) ∈R n×d is the node feature matrix of the lth layer, and the feature matrix of the first layer node is the embedded representation of the entity or relationship in the knowledge graph corresponding to the graph node; and / or

[0017] The graph convolution-based neural network model receives graph information as input and outputs a graph representation during the reasoning process.

[0018] Furthermore, the S1 training based on the graph convolution neural network model is carried out in the following manner:

[0019] S11. Obtain a training set, where each sample in the training set consists of several legal documents, and there are similarity differences between the documents;

[0020] S12. Extracting knowledge graphs from the case descriptions of each legal document in the training set:

[0021] Predefine the entity and relationship types of the case knowledge graph to be extracted; extract the predefined types of entities and relationships from the case description by using manual annotation or a trained automatic knowledge extraction model to obtain a knowledge graph consisting of a number of triplets (h, r, t), where h represents the head entity, r represents the relationship, and t represents the tail entity;

[0022] S13. Embed the entities and relations of each triplet of the knowledge graph:

[0023] Use the knowledge graph embedding algorithm to embed each triple, obtain the embedding vectors of the entities and relations in the triple set, and construct a mapping between the entities and relations in the knowledge graph and their embedding vectors;

[0024] S14. Convert the knowledge graph into a graph:

[0025] Each entity of each triple in the knowledge graph is converted into a node, and the node number corresponds to the entity name one by one; each relationship in the triple is converted into a node, and the node number increases in sequence; the embedding vectors of the entity and relationship are used as the features of the node; the converted graph is set as an undirected graph;

[0026] S15. Input the graph corresponding to each sample into the graph convolution-based neural network model, calculate the loss, update the model parameters according to the gradient between the loss and the model parameters until the model converges, and save the model parameters.

[0027] Furthermore, step S2 extracts a knowledge graph from the case description of the case legal document whose similarity is to be calculated, including:

[0028] S21. Predefine the entity and relationship types of the case knowledge graph to be extracted; extract the predefined types of entities and relationships from the case description by using manual annotation or a trained automatic knowledge extraction model to obtain a knowledge graph consisting of a number of triples (h, r, t), where h represents the head entity, r represents the relationship, and t represents the tail entity;

[0029] S22. Use the knowledge graph embedding algorithm to perform embedding learning on each triple, obtain the embedding vectors of entities and relationships in the triple set, and construct a mapping between entities and relationships in the knowledge graph and their embedding vectors.

[0030] Furthermore, the step S3 converts the knowledge graph into a graph:

[0031] Each entity of a triple in the knowledge graph is converted into a node, and the node number corresponds to the entity name one by one; each relationship in a triple is converted into a node, and the node number increases sequentially; the embedding vectors of entities and relationships are used as the features of the nodes; the converted graph is set as an undirected graph.

[0032] Furthermore, the knowledge graph embedding algorithm is one of the TransE algorithm, the TransH algorithm, the DistMult algorithm or the HoLE algorithm.

[0033] Furthermore, step S5 uses a vector similarity calculation method to calculate the similarity between the case graph representations as the similarity between the corresponding cases, wherein the closer the distance between the embedded vectors in the vector space is, the more similar the cases are.

[0034] Furthermore, the graph node information aggregation layer is a bidirectional long short-term memory network layer; and / or

[0035] The mean of the output vectors of the first and last cells in the bidirectional long short-term memory network layer is used as the representation of the entire graph.

[0036] Furthermore, the loss layer accepts graph representations of three cases and calculates the loss using a triplet loss function.

[0037] A case similarity calculation system based on graph convolution, comprising:

[0038] The knowledge graph extraction module is used to extract the knowledge graph representing the case details from the case legal documents;

[0039] The graph representation module is used to obtain the embedding of entities and relationships in the case knowledge graph, convert the case knowledge graph into a graph, and input the node information matrix of the graph into the trained case similarity calculation model based on graph convolution to obtain the graph representation;

[0040] The similarity calculation module is used to calculate the similarity of the obtained graph representation using a similarity calculation method between vectors.

[0041] The beneficial effects of the present invention are: using a knowledge graph to represent a case in a legal document, it can better capture the long-term, global and non-continuous dependencies between the legal elements in the case legal document; combining the knowledge graph with the graph convolution model, and using the graph convolution deep neural network model, it realizes the extraction of complex structural information; representing the cases to be calculated for similarity as vectors, and calculating the similarity by operations between vectors, which can be used in real massive data, and the computing performance of the system meets actual needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the overall process of the case similarity calculation method based on graph convolution provided by the present invention;

[0043] Figure 2 It is a schematic diagram of the structure of a similarity calculation model based on graph convolution provided by the present invention;

[0044] Figure 3 It is a schematic diagram of the overall structure of the case similarity calculation system based on graph convolution provided by the present invention. DETAILED DESCRIPTION

[0045] The technical solution of the present invention is illustrated below by way of example, and the scope of protection requested by the present invention includes but is not limited to the following embodiments.

[0046] Figure 1 The overall flow diagram of the case similarity calculation method based on graph convolution provided by the embodiment of the present invention includes:

[0047] S1. Training a graph convolution-based neural network model

[0048] The model receives graph information as input and can output a graph representation during reasoning.

[0049] The specific steps of training the neural network model based on graph convolution include: 1) obtaining a training set, where each sample consists of several legal documents, and there are similarity differences between the documents; 2) extracting a knowledge graph from the case description of each legal document in the training set; 3) embedding the entities and relationships of each triplet in the knowledge graph; 4) converting the knowledge graph into a graph; 5) inputting the graph corresponding to each sample into the neural network model based on graph convolution, calculating the loss, and updating the model parameters according to the gradient between the loss and the model parameters until the model converges, and saving the model parameters.

[0050] Specifically, if each sample in the training set contains three cases, the order of the cases reflects the similarity between the cases. Generally, the similarity between the first case and the second case is greater than the similarity between the first case and the third case. If the sample contains two cases, the sample also needs a label to identify the similarity between the two cases. Among them, the sample consisting of three cases has a wider practical significance and operability. The legal documents in the sample need to contain the main content of the case, which can be the factual part of the legal documents such as the indictment, appeal, and judgment of the case.

[0051] S2. Extract the knowledge graph from the case description of the legal document of the case whose similarity is to be calculated.

[0052] In the same manner as in the model training process, a knowledge graph is extracted from the case description of the legal document of the case whose similarity is to be calculated.

[0053] The methods of extracting knowledge graphs during the training process include manual annotation or automatic extraction model extraction. Through knowledge graph extraction, knowledge graph triples reflecting the subject-object relationship information of the case are obtained, and the similarity between cases is calculated by calculating the similarity between knowledge graphs.

[0054] S3. Converting the knowledge graph into a graph;

[0055] The knowledge graph is converted into a graph in the same manner as in the model training process.

[0056] Among them, the way to convert the knowledge graph into a graph during the training process is relationship nodeization, that is, converting the relationship in the knowledge graph into a node in the graph.

[0057] S4. Inputting the graph into the trained graph convolution-based neural network model to obtain a graph representation of the case;

[0058] S5. The similarity between the case graph representations is calculated using a method for calculating the similarity between vectors as the similarity between the corresponding cases.

[0059] This technical solution extracts knowledge graphs from the case descriptions of the legal documents of the cases to be calculated and the cases in each training data set, converts the knowledge graphs into graphs, and uses graph convolutional neural networks to extract feature information of the case corresponding graphs. The knowledge graph is used to model the complex subject-object relationship in the case, and the graph convolutional neural network is used to obtain the long-term, global, and discontinuous dependency characteristics between legal elements, thereby improving the accuracy of case similarity calculation.

[0060] The step of extracting a knowledge graph from the legal documents of each case in the training set includes extracting entities and relationships of predefined types from the case description using manual annotation or a trained automatic knowledge extraction model, and obtaining a knowledge graph composed of several triples (h, r, t), where h represents the head entity, r represents the relationship, and t represents the tail entity.

[0061] Predefine the entity and relationship types of the case knowledge graph that need to be extracted. For example, predefine the entity and relationship types as parties, events, and various legal relationships, and use manual annotation or a trained knowledge automatic extraction model to extract entities and relationships from the case description. The knowledge automatic extraction model can be used to extract triples on structured text and quasi-structured text. It generally includes a named entity recognition module and a relationship extraction module. Each case extracts a set of several triples (h, r, t), and the triple form is ("Zhang", "husband and wife", "Li"), where "Zhang" represents the head entity, "Li" represents the tail entity, and "husband and wife" indicates that the relationship between the "Zhang" entity and the "Li" entity is a husband and wife relationship.

[0062] The aforementioned trained automatic knowledge extraction model includes an entity extraction model and a relationship extraction model; the entity extraction model is a named entity recognition model, which marks legal entities on a certain amount of legal texts, marks the entity type at the position where the legal entity appears, and marks 0 or other identifiers at the position where the legal entity does not appear, the sequence constitutes a training sample, and the classification model is trained using the sequence to obtain the trained naming recognition model; the relationship extraction model is a supervised semantic relationship classification model, which uses a convolutional tree kernel as a kernel function and is trained on legal relationship labeled samples to obtain the relationship extraction model.

[0063] The method of embedding the entities and relationships of each triple in the knowledge graph specifically includes: using the knowledge graph embedding algorithm to embed each triple, obtain the embedding vectors of the entities and relationships in the triple set, and construct a mapping between the entities and relationships in the knowledge graph and their embedding vectors.

[0064] There are many knowledge graph embedding algorithms that can be used, including the TransE algorithm, the TransH algorithm, the DistMult algorithm, and the HoLE algorithm. The triples of the knowledge graphs of all cases in the training set are used as the input of the knowledge graph embedding model to ensure that the embedding vectors of entities and relationships in all triples are in the same vector space. Before input, in order to distinguish entities with the same name but different references in different cases, the entity names in different cases are uniqued. In this embodiment, the case number can be simply added after the unique entity name of different cases to distinguish two entities with the same name but different references. After training the knowledge graph embedding model, a mapping between all entities and relationships and their vectors is obtained. In this embodiment, the embedding vectors of entities and relationships use vectors with a dimension of 30.

[0065] The steps of converting the knowledge graph into a graph specifically include: converting the entities of each triple in the knowledge graph into a node, and the node number corresponds to the entity name one by one; converting the relationship in each triple into a node, and the node number increases successively; the embedding vectors of entities and relationships are used as the features of the nodes; and setting the converted graph to an undirected graph.

[0066] Specifically, there are a large number of entities in the knowledge graph, but only a small number of relationships. The knowledge graph is converted into a graph, and different numbers are set for the same relationships to avoid incorrect connections between entities with the same relationship. For example, if there are two triples ("Zhang", "husband and wife", "Li") and ("Wang", "husband and wife", "Zhao") in a knowledge graph, different node numbers are set for these two "husband and wife" relationships to ensure that the two entities "Zhang" and "Wang" are not connected through the "husband and wife" node. However, the "husband and wife" relationship nodes share the same embedded vector, and the characteristics of the node are characterized by the embedded vector.

[0067] Graph representation maps a case to a point in the vector space. The distance between vectors reflects the relationship between cases, such as the category to which the case belongs, whether the cases are similar, etc. Through model learning, the more similar cases are, the closer the distance between the embedded vectors in the vector space is. Through operations between vectors, the complexity of case similarity calculation can be reduced, and fast similarity calculation can be achieved.

[0068] The neural network model based on graph convolution in this technical solution includes a graph convolution network layer, a graph node information aggregation layer, and a loss layer. The graph convolution network layer is composed of multiple graph convolution layers stacked together, and the output of the previous graph convolution layer is used as the input of the next graph convolution layer. The first layer is shown in formula (I):

[0069]

[0070] in, A is the adjacency matrix of the graph, I n is the identity matrix, is the diagonal matrix of the graph. (l) ∈R n×d is the trainable weight matrix of layer l. σ(·) represents the activation function. H (l) ∈R n×d It is the node feature matrix of the lth layer. The feature matrix of the first layer nodes is the embedded representation of the entity or relationship in the knowledge graph corresponding to the graph node.

[0071] In this technical solution, the graph node information aggregation layer is a bidirectional long short-term memory network layer. The mean of the output vectors of the first and last cell units of the bidirectional long short-term memory network layer is used as the representation of the entire graph.

[0072] Specifically, the bidirectional long short-term memory network layer includes several cell units. The hidden vector of the node in the graph is used as the input vector of each cell unit. The output vector of each cell unit is obtained after calculation through the cell gate, update gate, forget gate and output gate. The mean of the output vectors of the first and last cell units of the bidirectional long short-term memory network is used as the representation of the entire graph.

[0073] In this technical solution, the loss layer accepts the graph representation of three cases and uses the triplet loss function to calculate the loss.

[0074] Specifically, a sample contains three cases, and three graph representations are obtained after embedding. The similarity between the first case and the second case is set to be greater than or equal to the similarity between the first case and the third case. The triplet loss function accepts three graph representations as input and makes the distance between the first case and the second case as small as possible, and the distance between the first case and the third case as large as possible, so as to distinguish similar cases from dissimilar cases.

[0075] Figure 2 A schematic diagram of the structure of a similarity calculation model based on graph convolution provided in an embodiment of the present invention, wherein the network structure includes two modules: an embedding module, which is used to learn the representation of the input graph; and a similarity calculation module, which calculates the similarity between case graph representations. The embedding module includes two components: a GCN network layer, i.e., a graph convolution network layer, which applies graph convolution operations to update node features; and a BiLSTM network layer, i.e., a bidirectional long short-term memory network layer, which aggregates node features to obtain the features of the entire graph. During the training process, the graph constructed by the case content in each sample is input into the graph embedding module to obtain the final graph representation.

[0076] In another embodiment of the present invention, a case similarity calculation system based on graph convolution is provided, which is used to implement the method in the above embodiment. Therefore, the description and definition in the above embodiment of the case similarity calculation method based on graph convolution can help understand the various modules of the embodiment of the present invention. Figure 3 A schematic diagram of the overall structure of a case similarity calculation system based on graph convolution provided in an embodiment of the present invention, the system includes a knowledge graph extraction module 301, a graph representation module 302, and a similarity calculation module 303.

[0077] The knowledge graph extraction module 301 is used to extract a knowledge graph representing case details from the legal document whose case similarity is to be calculated;

[0078] Among them, the legal documents for which the case similarity is to be calculated are the legal documents for which the case similarity is to be calculated. The methods for extracting the knowledge graph include manual annotation and extraction using an automatic extraction model. Through knowledge graph extraction, a knowledge graph triple reflecting the subject-object relationship information of the case is obtained, and the similarity between cases is calculated by calculating the similarity between knowledge graphs.

[0079] The graph representation module 302 is used to obtain the embedding of entities and relationships in the case knowledge graph, convert the case knowledge graph into a graph, and input the node information matrix of the graph into the trained case similarity calculation model based on graph convolution to obtain a graph representation;

[0080] Among them, the case similarity calculation model based on graph convolution is constructed according to the legal document case similarity task and trained on a large number of case legal document sample data sets with known similarity relationships. The embeddings of each entity and relationship in the knowledge graph are extracted from the training data set, and the embeddings of the entities and relationships in the case to be calculated for similarity are obtained through the entity or relationship names. The way to convert the knowledge graph extracted from the legal document for the case to be calculated for similarity into a graph is to convert the relationship in the knowledge graph into a node in the graph.

[0081] A similarity calculation module 303 is used to calculate the similarity of the obtained graph representation using a similarity calculation method between vectors;

[0082] The graph representation maps a case to a point in the vector space, and the distance between vectors reflects the relationship between the cases. Through the operation between vectors, the complexity of case similarity calculation can be reduced, and fast similarity calculation can be achieved.

[0083] This embodiment extracts a knowledge graph from the case descriptions of the legal documents of the cases to be calculated and the cases in each training data set, converts the knowledge graph into a graph, and uses a graph convolutional neural network to extract feature information of the case corresponding graph. The knowledge graph is used to model the complex subject-object relationship in the case, and the graph convolutional neural network is used to obtain the long-term, global, and discontinuous dependency characteristics between legal elements, thereby improving the accuracy of case similarity calculation.

[0084] The experimental results of this embodiment are shown in Table 1:

[0085] Table 1

[0086] method Accuracy (%) BERT and other text content-based methods 72.66 Method of the present invention 83.60

[0087] The results show that the model of the present invention has greatly improved the accuracy compared with the case similarity calculation method based on text content.

[0088] A specific implementation is given above, but the present invention is not limited to the described implementation. The basic idea of ​​the present invention lies in the above scheme. For ordinary technicians in this field, according to the teachings of the present invention, various deformed models, formulas, and parameters can still be designed without spending creative labor. Changes, modifications, substitutions, and deformations of the implementation without departing from the principles and spirit of the present invention still fall within the scope of protection of the present invention.

Claims

1. A case similarity calculation method based on graph convolution, characterized in that: The method comprises the following steps: S1. Train a neural network model based on graph convolution; the neural network model based on graph convolution includes a graph convolution network layer, a graph node information aggregation layer, and a loss layer; the graph convolution network layer is formed by stacking multiple graph convolution layers, and the output of the previous graph convolution layer is used as the input of the next graph convolution layer, and the lth layer is shown in the following formula: in, A is the adjacency matrix of the graph, I n is the identity matrix, is the diagonal matrix of the graph, and W (l) ∈R n×d′ is the trainable weight matrix of layer l, σ(·) represents the activation function, H (l) ∈R n×d′ is the node feature matrix of the lth layer, and the feature matrix of the first layer node is the embedded representation of the entity or relationship in the knowledge graph corresponding to the graph node; the graph convolution-based neural network model receives the information of the graph as input and outputs a graph representation during the reasoning process; the graph node information aggregation layer is a bidirectional long short-term memory network layer; the mean of the output vectors of the first and last cell units of the bidirectional long short-term memory network layer is used as the representation of the entire graph; The training of the graph convolution-based neural network model is carried out in the following manner: S11. Obtain a training set, wherein each sample in the training set consists of several legal documents, and there are similarity differences between the documents; S12. Extract a knowledge graph from the case description of each legal document in the training set: predefine the entity and relationship types of the case knowledge graph to be extracted; extract entities and relationships of predefined types from the case description using manual annotation or a trained knowledge automatic extraction model, and obtain a knowledge graph consisting of several triples (h, r, t), wherein h represents the head entity, r represents the relationship, and t represents the tail entity; S13. Embed the entities and relationships of each triple of the knowledge graph: use the knowledge graph embedding The algorithm is used to embed each triplet, and the embedding vectors of the entities and relations in the triplet set are obtained, and a mapping between the entities and relations in the knowledge graph and their embedding vectors is constructed; S14. The knowledge graph is converted into a graph: the entities of each triplet in the knowledge graph are respectively converted into a node, and the node number corresponds to the entity name one by one; the relationship in each triplet is converted into a node, and the node number increases in sequence; the embedding vectors of the entities and relations are used as the features of the nodes; the converted graph is set as an undirected graph; S15. The graph corresponding to each sample is input into the neural network model based on graph convolution, the loss is calculated, and the model parameters are updated according to the gradient between the loss and the model parameters until the model converges, and the model parameters are saved; S2. Extracting a knowledge graph from the case description of the legal document of the case whose similarity is to be calculated; S3. Converting the knowledge graph into a graph; S4. Inputting the graph into the trained graph convolution-based neural network model to obtain a graph representation of the case; S5. The similarity between the case graph representations is calculated using a method for calculating the similarity between vectors as the similarity between the corresponding cases.

2. The case similarity calculation method based on graph convolution according to claim 1 is characterized in that: Step S2 extracts a knowledge graph from the case description of the legal document of the case whose similarity is to be calculated, including: S21. Predefine the entity and relationship types of the case knowledge graph to be extracted; extract the predefined types of entities and relationships from the case description by using manual annotation or a trained automatic knowledge extraction model to obtain a knowledge graph consisting of a number of triples (h, r, t), where h represents the head entity, r represents the relationship, and t represents the tail entity; S22. Use the knowledge graph embedding algorithm to perform embedding learning on each triple, obtain the embedding vectors of entities and relationships in the triple set, and construct a mapping between entities and relationships in the knowledge graph and their embedding vectors.

3. The case similarity calculation method based on graph convolution according to claim 1 or 2, characterized in that: The step S3 converts the knowledge graph into a graph: Each entity of a triple in the knowledge graph is converted into a node, and the node number corresponds to the entity name one by one; each relationship in a triple is converted into a node, and the node number increases sequentially; the embedding vectors of entities and relationships are used as the features of the nodes; the converted graph is set as an undirected graph.

4. The case similarity calculation method based on graph convolution according to claim 1 or 2, characterized in that: The knowledge graph embedding algorithm is one of the TransE algorithm, the TransH algorithm, the DistMult algorithm or the HoLE algorithm.

5. The case similarity calculation method based on graph convolution according to claim 3 is characterized in that: The knowledge graph embedding algorithm is one of the TransE algorithm, the TransH algorithm, the DistMult algorithm or the HoLE algorithm.

6. The case similarity calculation method based on graph convolution according to claim 1 or 2, characterized in that: Step S5 uses a vector similarity calculation method to calculate the similarity between the case graph representations as the similarity between the corresponding cases, wherein the closer the distance between the embedded vectors in the vector space is, the more similar the cases are.

7. The case similarity calculation method based on graph convolution according to claim 3 is characterized in that: Step S5 uses a vector similarity calculation method to calculate the similarity between the case graph representations as the similarity between the corresponding cases, wherein the closer the distance between the embedded vectors in the vector space is, the more similar the cases are.

8. The case similarity calculation method based on graph convolution according to claim 4 is characterized in that: Step S5 uses a vector similarity calculation method to calculate the similarity between the case graph representations as the similarity between the corresponding cases, wherein the closer the distance between the embedded vectors in the vector space is, the more similar the cases are.

9. The case similarity calculation method based on graph convolution according to claim 1 is characterized in that: The loss layer accepts a graph representation of three cases and calculates the loss using a triplet loss function.

10. A case similarity calculation system based on graph convolution, the case similarity calculation system based on graph convolution is used to implement the case similarity calculation method based on graph convolution as described in any one of claims 1 to 9, characterized in that: The case similarity calculation system based on graph convolution includes: The knowledge graph extraction module is used to extract the knowledge graph representing the case details from the case legal documents; The graph representation module is used to obtain the embedding of entities and relationships in the case knowledge graph, convert the case knowledge graph into a graph, and input the node information matrix of the graph into the trained case similarity calculation model based on graph convolution to obtain the graph representation; The similarity calculation module is used to calculate the similarity of the obtained graph representation using a similarity calculation method between vectors.

Citation Information

Patent Citations

  • A text-content-based case recommendation method

    CN110442684B

  • A method and system for judging the similarity of court judgments based on legal knowledge graphs

    CN110795926B

  • A method and apparatus for processing knowledge map based on semi-supervised embedded representation model

    CN109389151A

  • Case knowledge graph automatic construction method and system, equipment and medium

    CN110781254A

  • Method for carrying out personalized recommendation on commodities by fusing knowledge graph

    CN112232925A