Legal case retrieval method and device, program product and electronic equipment

Through a multi-algorithm collaborative legal case retrieval method, the illegal facts and related elements of the target legal case are determined. Combined with the BERT model, knowledge graph and BM25 algorithm, the deep logical relationship recognition and multi-dimensional feature modeling problems of legal case retrieval in the existing technology are solved, and the stability and accuracy of the retrieval are improved.

CN120780830APending Publication Date: 2025-10-14CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510905753.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-14

AI Technical Summary

Technical Problem

Existing technologies cannot effectively identify the deep logical relationships between legal elements in legal case retrieval, and it is difficult to perform multi-dimensional feature structured modeling of complex cases. In addition, a single algorithm is easily affected by data sparsity and semantic ambiguity, resulting in retrieval results that are difficult to meet the requirements of logically complex legal case retrieval.

Method used

By obtaining the case data of the target legal case, determining the illegal facts involved and related case elements, and combining multiple correlation algorithms, such as the BERT model, knowledge graph and BM25 algorithm, the correlation between the target legal case and the reference legal case is collaboratively determined, thereby matching similar legal cases.

Benefits of technology

It improves the stability and accuracy of legal case retrieval, avoids the misjudgment of complex cases by a single model, realizes the refined retrieval of logically complex legal cases, and ensures the matching degree of the retrieval results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780830A_ABST
    Figure CN120780830A_ABST
Patent Text Reader

Abstract

The invention provides a legal case retrieval method and device, a program product and electronic equipment, and relates to the technical field of data processing. The legal case retrieval method comprises the steps of obtaining case data of a target legal case, and determining a target illegal fact involved in the target legal case and case elements associated with the target illegal fact based on the case data of the target legal case; determining the correlation between the target legal case and each contrast legal case by combining a plurality of correlation algorithms according to a target illegal fact involved in the target legal case, the case elements associated with the target illegal fact, the contrast illegal facts involved in each contrast legal case and the case elements associated with the contrast illegal facts; and determining a legal case matched with the target legal case from the contrast legal cases based on the correlation between the target legal case and the contrast legal cases. The stability and accuracy of the retrieval result can be improved, and the method is suitable for legal case retrieval scenes with complex logic.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data processing, and particularly relates to a legal case retrieval method, a legal case retrieval device, a computer program product and an electronic device. BACKGROUND

[0002] In judicial practice, when facing specific cases, searching for similar historical cases can not only significantly reduce the burden of judges in case retrieval and analysis, improve judicial efficiency, but also provide important support for the realization of judicial justice goal of "same case same judgment" by constructing a case reference system, and help the unification and standardization of judicial adjudication scale.

[0003] In related technologies, legal cases are usually retrieved by keyword matching or shallow semantic model. However, such methods have significant limitations: first, they cannot effectively identify the deep logical relationship between legal elements, resulting in a disconnection between the retrieval results and the actual case; second, they are difficult to structure model the multi-dimensional characteristics of complex cases, and cannot meet the actual needs of judges in case reasoning; third, a single algorithm is easily affected by data sparsity and semantic ambiguity, and pure semantic retrieval is difficult to accurately distinguish cases with similar charges but different facts. The existence of these problems makes it difficult for retrieval results to meet the requirements of legal case retrieval with complex logic.

[0004] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0005] The present disclosure provides a legal case retrieval method, a legal case retrieval device, a computer program product and an electronic device to at least partially solve the problem that retrieval results are difficult to meet the requirements of legal case retrieval with complex logic.

[0006] According to a first aspect of the present disclosure, a legal case retrieval method is provided, the method comprising: obtaining case materials of a target legal case, and determining a target illegal fact involved in the target legal case and a case element associated with the target illegal fact based on the case materials of the target legal case; determining the relevance of the target legal case and each control legal case in combination with a plurality of relevance algorithms according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact; and determining a legal case matched with the target legal case from each control legal case based on the relevance of the target legal case and each control legal case.

[0007] According to a second aspect of the present disclosure, a legal case retrieval device is provided, which comprises: a first data processing module configured to acquire case data of a target legal case, and determine a target illegal fact involved in the target legal case and a case element associated with the target illegal fact based on the case data of the target legal case; a relevance determination module configured to determine relevance of the target legal case to each of a plurality of comparison legal cases according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and a comparison illegal fact involved in each of the comparison legal cases and a case element associated with the comparison illegal fact, in combination with a plurality of relevance algorithms; and a legal case matching module configured to determine a legal case matched with the target legal case from the comparison legal cases based on the relevance of the target legal case to each of the comparison legal cases.

[0008] According to a third aspect of the present disclosure, a computer program product is provided, which comprises a computer program configured to implement the legal case retrieval method of the first aspect and possible implementation manners thereof when executed by a processor.

[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, which comprises: a processor; and a memory configured to store executable instructions of the processor; wherein the processor is configured to execute the legal case retrieval method of the first aspect and possible implementation manners thereof via execution of the executable instructions.

[0010] The technical solution of the present disclosure has the following beneficial effects:

[0011] In the above legal case retrieval process, the case data of a target legal case is acquired, and a target illegal fact involved in the target legal case and a case element associated with the target illegal fact are determined based on the case data of the target legal case; relevance of the target legal case to each of a plurality of comparison legal cases is determined according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and a comparison illegal fact involved in each of the comparison legal cases and a case element associated with the comparison illegal fact, in combination with a plurality of relevance algorithms; and a legal case matched with the target legal case is determined from the comparison legal cases based on the relevance of the target legal case to each of the comparison legal cases. The present disclosure realizes legal case retrieval through multi-algorithm cooperation, which can improve stability and accuracy of retrieval results, avoid misjudgment of a single model for complex case situations, and is suitable for legal case retrieval scenarios with complex logic. In addition, the present disclosure performs similarity analysis from the perspective of illegal facts rather than illegal types, which is a coarse-grained perspective, which can further refine case retrieval results and ensure matching degree of retrieval results. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1a flowchart showing a legal case search method in the present exemplary embodiment;

[0013] Figure 2 a flowchart showing a process of determining a target illegal fact and a case element associated with the target illegal fact to which a target legal case is related in the present exemplary embodiment;

[0014] Figure 3 a flowchart showing a process of determining a relevance of a target legal case to each of comparison legal cases in the present exemplary embodiment;

[0015] Figure 4 a flowchart showing a process of searching for relevant legal cases in the present exemplary embodiment;

[0016] Figure 5 a block diagram showing a structure of a legal case search device in the present exemplary embodiment;

[0017] Figure 6 an electronic device for implementing the above-described legal case search method in the present exemplary embodiment. DETAILED DESCRIPTION

[0018] Example embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings.

[0019] The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this application, illustrate certain non-limiting embodiments of the present disclosure. In the drawings, the same reference numerals are used to represent similar components and / or features in various examples and embodiments herein. The figures are not necessarily drawn to scale, with emphasis instead being placed upon illustrating the principles of the present disclosure. Some of the drawings can be schematic or sketch-like representations of processes, devices, or structures, and as such, are not necessarily drawn to scale. Some of the blocks in the block diagrams can be functional blocks that can employ software, hardware, or a combination of software and hardware to carry out the indicated functions in processes, devices, or systems, or a combination thereof. Embodiments of the present disclosure can be manifested as a computing device, an apparatus, a method, an apparatus for implementing the above-described legal case search method, a program, a system, a computer program product, computer-readable storage media, or a combination thereof. The present disclosure described above can be implemented in any number of ways, using hardware, software or a combination thereof. The embodiments described above are merely meant to be illustrative and not limiting. The particular illustrative embodiments described can be implemented in software and / or firmware using object or modularized design techniques. The specific routines or operations described herein can be implemented in hardware, software, or a combination thereof. Any features, structures, or features described herein can be combined in any suitable way. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the present disclosure. One skilled in the relevant art will recognize, however, that the various embodiments of the present disclosure can be practiced without one or more of the specific details, or indeed, with additional procedures, components, devices, etc. In other instances, well-known structures have not been described in order to avoid obscuring aspects of the present disclosure.

[0020] In the related art, legal cases are usually retrieved by keyword matching or a shallow semantic model. However, such methods have significant limitations: first, they cannot effectively identify deep logical relationships between legal elements, resulting in retrieval results that are inconsistent with actual cases; second, they cannot structure model multi-dimensional characteristics of complex cases, and cannot meet the actual needs of judges for case reasoning; third, a single algorithm is susceptible to data sparsity and semantic ambiguity, and pure semantic retrieval cannot accurately distinguish cases with similar charges but different facts. The existence of these problems makes it difficult for retrieval results to meet the requirements of legal case retrieval with complex logic.

[0021] In view of the above problems, the exemplary embodiments of the present disclosure provide a legal case retrieval method, a legal case retrieval device, a computer program product and an electronic device. It can be applied to but not limited to: judicial trial intelligent assistance, legal consultation services and other scenes.

[0022] In an optional embodiment, referring to Figure 1 The method for retrieving legal cases shown in FIG. 1 can specifically include the following steps S110 to S130:

[0023] Step S110, obtaining case materials of a target legal case, and determining a target illegal fact involved in the target legal case and a case element associated with the target illegal fact based on the case materials of the target legal case;

[0024] Step S120, determining the relevance of the target legal case and each control legal case according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact, in combination with multiple relevance algorithms;

[0025] Step S130, determining a legal case matched with the target legal case from each control legal case based on the relevance of the target legal case and each control legal case.

[0026] Figure 1 In the method shown in FIG. 1, legal case retrieval is achieved by multi-algorithm cooperation, which can improve the stability and accuracy of retrieval results, avoid misjudgment of a single model for complex cases, and be suitable for legal case retrieval scenes with complex logic. In addition, the present disclosure performs similarity analysis from the perspective of illegal facts rather than illegal types, which is a coarse-grained perspective, which can further refine the case retrieval results and ensure the matching degree of the retrieval results.

[0027] The following will specifically describe each step in Figure 1

[0028] ​In step S110, the case material of the target legal case is obtained, and based on the case material of the target legal case, the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact are determined.

[0029] The target legal case is a legal case to be searched, and the case material of the target legal case refers to materials related to the case situation.

[0030] After obtaining the case material of the target legal case, the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact can be determined based on the case material of the target legal case.

[0031] The target illegal fact refers to the illegal fact involved in the legal case to be searched, and the illegal fact can be characterized by specific behaviors that violate legal provisions and consequences caused by the behaviors.

[0032] The case elements refer to key elements associated with the illegal fact in the case material, which can include but are not limited to: elements required to constitute illegal acts, space-time elements, evidence information, etc. For example, elements required to constitute illegal acts may include illegal subjects, illegal objects, subjective aspects of illegal acts, and objective aspects of illegal acts, which are not specifically limited by the present disclosure.

[0033] In an optional implementation, as shown in Figure 2 Based on the case material of the target legal case, the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact can be determined by the following steps:

[0034] Step S210, based on the case material of the target legal case, extracting the target illegal name involved in the target legal case;

[0035] Step S220, based on the target illegal name involved in the target legal case, the legal provisions associated with the target illegal name, and the case material original text associated with the target illegal name, content summary is performed through a large language model to obtain the target illegal fact corresponding to the target illegal name involved in the target legal case;

[0036] Step S230, determining the legal category to which the illegal name involved in the target legal case belongs, and using an element extraction strategy matched with the legal category to extract the case elements associated with the target illegal fact corresponding to the target illegal name from the case material original text associated with the target illegal name.

[0037] Figure 2In the illustrated step, the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case are determined, so as to facilitate subsequent similarity retrieval from the perspective of illegal fact. This process preserves the logical association between case elements and can avoid the decline in retrieval accuracy caused by the loss of logical relationship.

[0038] The target illegal name refers to the illegal name involved in the case to be retrieved. For example, the illegal name involved in the target legal case can be extracted from the case materials of the target legal case by using a large language model.

[0039] Optionally, the legal provisions associated with the target illegal name can be part of the legal provisions corresponding to the target illegal name. For example, the legal provisions associated with the target illegal name can be extracted from the case materials of the target legal case by using a large language model, so as to obtain the legal provisions associated with the target illegal name. This extraction method is simple and efficient.

[0040] Optionally, the legal provisions associated with the target illegal name can also be the complete version of the legal provisions corresponding to the target illegal name. Since the case materials of the legal case can cite part of the legal provisions corresponding to the illegal name, in this case, the legal provisions corresponding to the target illegal name can be extracted from the case materials of the target legal case by using a large language model, and legal provision retrieval can be performed based on the extracted legal provisions to obtain the complete version of the legal provisions corresponding to the target illegal name. This provides sufficient legal knowledge background for subsequent content summarization by the large language model, so as to avoid missing the implicit constraint relationship between legal provisions.

[0041] Specifically, based on the target illegal name involved in the target legal case, the legal provisions associated with the target illegal name, and the case materials associated with the target illegal name, the content summary can be performed by using the deep semantic understanding ability of the large language model for natural language to obtain the target illegal fact corresponding to the target illegal name involved in the target legal case.

[0042] Specifically, the legal category to which the illegal name belongs can be determined according to the belonging relationship between the illegal name and the legal category. For example, the categories include criminal, civil, administrative, etc.

[0043] Optionally, since the case elements involved in different legal categories can be different, different element extraction strategies can be set in advance for different legal categories to facilitate targeted case element extraction and to ensure the effectiveness and usability of the extracted content. Specifically, the large language model can use an element extraction strategy matched with the legal category to extract the case elements associated with the target illegal fact corresponding to the target illegal name from the case materials associated with the target illegal name, so as to realize the structured decomposition of legal elements.

[0044] For example, for criminal cases, the following case elements can be extracted: four elements of illegal constitution corresponding to illegal names (e.g., illegal subject, illegal object, subjective aspect of illegality, and objective aspect of illegality), three levels of illegal constitution (e.g., constitution element compliance, illegality, and responsibility), two levels of illegal constitution (e.g., objective illegal element and subjective responsible element), time and space elements, evidence chain information, and the like.

[0045] For example, for civil cases, the following case elements can be extracted: subject information, litigation request and dispute points, facts and evidence, and the like.

[0046] For example, for administrative cases, the following case elements can be extracted: nature of administrative behavior, parties and interested parties, dispute core, evidence information, and the like.

[0047] By using an element extraction strategy matched with the legal category to which the illegal name involved in the target legal case belongs, the case elements associated with the target illegal fact corresponding to the target illegal name are extracted from the case material original text associated with the target illegal name, so as to assist in analyzing the relevant characteristics of the illegal fact.

[0048] In an optional implementation, the following steps can also be performed: obtaining legal materials of each control legal case, and determining a control illegal fact and a case element associated with the control illegal fact involved in each control legal case based on the case material of each control legal case. Based on the case material of each control legal case, the control illegal fact and the case element associated with the control illegal fact involved in each control legal case can be determined by the following steps: based on the case material of each control legal case, extracting a control illegal name involved in each control legal case; based on the control illegal name involved in each control legal case, legal provisions associated with the control illegal name, and case material original text associated with the control illegal name, performing content summarization by a large language model to obtain a control illegal fact corresponding to the control illegal name involved in each control legal case; determining a legal category to which the control illegal name belongs, and correspondingly using an element extraction strategy matched with the legal category to extract a case element associated with the corresponding control illegal fact from the case material original text associated with the control illegal name involved in each control legal case.

[0049] The control illegal name refers to an illegal name involved in the control legal case. The control legal case is a similar control case of the legal case to be searched. For example, the control legal case can be a case in the historical case library.

[0050] Exemplarily, based on the case information of a to-be-processed comparison legal case, a comparison illegal act name involved in the to-be-processed comparison legal case can be extracted; based on the comparison illegal act name involved in the to-be-processed comparison legal case, legal provisions associated with the comparison illegal act name, and case information original text associated with the comparison illegal act name, a comparison illegal fact corresponding to the comparison illegal act name involved in the to-be-processed comparison legal case is obtained through content summarization by a large language model; a legal category to which the comparison illegal act name involved in the to-be-processed comparison legal case belongs is determined, and based on an element extraction strategy matched with the legal category, corresponding case elements associated with the comparison illegal fact are extracted from the case information original text associated with the comparison illegal act name involved in the to-be-processed comparison legal case by the large language model. The to-be-processed comparison legal case can be any legal case in the comparison legal cases.

[0051] It should be noted that the determination process of the comparison illegal fact involved in the to-be-processed comparison legal case and the case elements associated with the comparison illegal fact is similar to the determination process of the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, which will not be described here.

[0052] By determining the comparison illegal fact involved in each comparison legal case and the case elements associated with the comparison illegal fact, the target legal case and each comparison legal case can be compared in terms of illegal facts.

[0053] In step S120, based on the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the comparison illegal fact involved in each comparison legal case and the case elements associated with the comparison illegal fact, the relevance of the target legal case and each comparison legal case is determined in combination with multiple relevance algorithms.

[0054] The relevance algorithm used is used to analyze the similarity between two legal case objects (the target legal case and the to-be-processed comparison legal case).

[0055] In an optional implementation, as shown in Figure 3 The determination of the relevance of the target legal case and each comparison legal case based on the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the comparison illegal fact involved in each comparison legal case and the case elements associated with the comparison illegal fact in combination with multiple relevance algorithms can be realized by the following steps:

[0056] In step S310, based on the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the comparison illegal fact involved in each comparison legal case and the case elements associated with the comparison illegal fact, a first relevance score of the target legal case and each comparison legal case is determined by using a first relevance algorithm.

[0057] Step S320, according to the target illegal fact involved in the target legal case and the case elements related to the target illegal fact and the control illegal fact involved in each control legal case and the case elements related to the control illegal fact, a second correlation algorithm is used to determine the second correlation score of the target legal case and each control legal case.

[0058] Step S330, according to the target illegal fact involved in the target legal case and the case elements related to the target illegal fact and the control illegal fact involved in each control legal case and the case elements related to the control illegal fact, a third correlation algorithm is used to determine the third correlation score of the target legal case and each control legal case.

[0059] Step S340, based on the first correlation score, the second correlation score and the third correlation score of the target legal case and each control legal case, the correlation of the target legal case and each control legal case is determined.

[0060] It should be noted that in actual application, steps S310, S320 and S330 can be executed in parallel or in a specific order. The execution order of steps S310, S320 and S330 is not limited in the embodiments of the present disclosure.

[0061] Among them, the first correlation algorithm, the second correlation algorithm and the third correlation algorithm are three different types of similarity algorithms. For example, the first correlation algorithm is a correlation algorithm based on BERT model; the second correlation algorithm is a correlation algorithm based on knowledge graph; and the third correlation algorithm is a correlation algorithm based on BM25.

[0062] Among them, the first correlation score refers to the correlation score obtained by using the first correlation algorithm. For example, according to the target illegal fact involved in the target legal case and the case elements related to the target illegal fact and the control illegal fact involved in the control legal case and the case elements related to the control illegal fact, the first correlation algorithm is used to determine the first correlation score of the target legal case and the control legal case.

[0063] Among them, the second correlation score refers to the correlation score obtained by using the second correlation algorithm. For example, according to the target illegal fact involved in the target legal case and the case elements related to the target illegal fact and the control illegal fact involved in the control legal case and the case elements related to the control illegal fact, the second correlation algorithm is used to determine the second correlation score of the target legal case and the control legal case.

[0064] The third correlation score refers to a correlation score obtained by using a third correlation algorithm. For example, the third correlation algorithm can be used to determine the third correlation score of the target legal case and the to-be-processed comparison legal case according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the comparison illegal fact involved in the to-be-processed comparison legal case and the case elements associated with the comparison illegal fact.

[0065] Optionally, the first correlation score, the second correlation score and the third correlation score of the target legal case and the to-be-processed comparison legal case can be weighted and summed to obtain the correlation of the target legal case and the to-be-processed comparison legal case, so as to realize multi-algorithm cooperation and ensure the stability of the search.

[0066] In an optional implementation, when the first correlation algorithm is a correlation algorithm based on a BERT model, the first correlation score of the target legal case and each comparison legal case can be determined by using the first correlation algorithm according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the comparison illegal fact involved in each comparison legal case and the case elements associated with the comparison illegal fact in step S310. The first correlation score of the target legal case and each comparison legal case can be determined by the following steps: encoding the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact by using the BERT model to obtain a target sentence vector corresponding to the target illegal fact involved in the target legal case; encoding the comparison illegal fact involved in each comparison legal case and the case elements associated with the comparison illegal fact by using the BERT model to obtain a comparison sentence vector corresponding to the comparison illegal fact involved in each comparison legal case; and respectively performing cosine similarity calculation on the target sentence vector corresponding to the target illegal fact involved in the target legal case and the comparison sentence vector corresponding to the comparison illegal fact involved in each comparison legal case to determine the first correlation score of the target legal case and each comparison legal case.

[0067] The BERT model can be trained by using contrastive learning. The training samples include a positive sample pair constructed by legal cases with the same illegal name but different illegal facts.

[0068] The BERT model is trained by using contrastive learning. By selecting legal cases with similar illegal names but different illegal facts as negative samples in the contrastive learning, the model can be strengthened to distinguish cases with the same name but different facts, improve the discrimination ability for difficult-to-distinguish legal cases, and reduce the false detection rate.

[0069] Optionally, the BERT model can also be pre-trained using information such as the judgment result of the legal case and the reasoning analysis process of the legal case to improve its coding ability for legal cases, which is not limited in the present disclosure.

[0070] The target sentence vector refers to a set of vectors capable of reflecting the semantic information of the target illegal fact, and the contrast sentence vector refers to a set of vectors capable of reflecting the semantic information of the contrast illegal fact.

[0071] Exemplarily, the target illegal fact involved in the target legal case and the case elements related to the target illegal fact can be encoded by the BERT model to obtain the target sentence vector corresponding to the target illegal fact involved in the target legal case; the contrast illegal fact involved in the to-be-processed contrast legal case and the case elements related to the contrast illegal fact can be encoded by the BERT model to obtain the contrast sentence vector corresponding to the contrast illegal fact involved in the to-be-processed contrast legal case; the target sentence vector corresponding to the target illegal fact involved in the target legal case and the contrast sentence vector corresponding to the contrast illegal fact involved in the to-be-processed contrast legal case are subjected to cosine similarity calculation to determine the first relevance score of the target legal case and the to-be-processed contrast legal case.

[0072] By training the BERT model by taking legal cases with the same or similar illegal names but different illegal facts as positive and negative sample pairs, the discrimination ability of the BERT model to semantic similarity and difference can be enhanced. The BERT model is used for relevance calculation in the present disclosure, which can realize fine-grained matching of legal cases and meet the demand for refined retrieval.

[0073] Optionally, a single legal case can involve one or more illegal facts.

[0074] In an optional implementation, the above-mentioned cosine similarity calculation of the target sentence vector corresponding to the target illegal fact involved in the target legal case and the contrast sentence vector corresponding to the contrast illegal fact involved in each contrast legal case to determine the first relevance score of the target legal case and each contrast legal case can be realized by the following steps: for the to-be-processed contrast legal case, the target sentence vector corresponding to each target illegal fact involved in the target legal case is subjected to cosine similarity calculation with the contrast sentence vector corresponding to each contrast illegal fact involved in the to-be-processed contrast legal case to obtain the cosine similarity between each target illegal fact and each contrast illegal fact; the to-be-processed contrast legal case is any one of the contrast legal cases; according to the cosine similarity between each target illegal fact and each contrast illegal fact, the most similar contrast illegal fact of each target illegal fact is determined from the contrast illegal facts involved in the to-be-processed contrast legal case; and the first relevance score of the target legal case and the to-be-processed contrast legal case is obtained by summing calculation according to the cosine similarity between each target illegal fact and its most similar contrast illegal fact.

[0075] Exemplarily, the first relevance score score of the target legal case Q and the to-be-processed contrast legal case C can be obtained by calculating the following formula (1). S31(Q, C) :

[0076]

[0077] wherein f qi represents the i-th target illegal fact in the target legal case Q; f cj represents the j-th control illegal fact in the control legal case C to be processed; sim BERT (f qi , f cj ) represents the similarity between f qi and f cj , which is obtained based on the sentence vectors of the BERT model; m represents the number of facts in the target legal case Q; and n represents the number of facts in the control legal case C to be processed. represents the control illegal fact with the largest similarity to the i-th target illegal fact, which is selected from the n control illegal facts involved in the control legal case C to be processed. represents the sum of the cosine similarities between the m target illegal facts and their most similar control illegal facts.

[0078] By selecting the most similar control illegal fact in the control legal case to be processed for each target illegal fact, and summing the cosine similarities between each target illegal fact and its most similar control illegal fact, the similarity between different facts can be fully mined, and the accuracy of the similarity evaluation between the target legal case and the control legal case to be processed can be ensured.

[0079] In an optional implementation, the second relevance algorithm is a knowledge graph-based relevance algorithm. In step S320, the second relevance algorithm is used to determine the second relevance scores of the target legal case and each control legal case based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, and the control illegal facts involved in each control legal case and the case elements associated with the control illegal facts. The following steps can be used to achieve this: constructing a knowledge graph of each control legal case based on the control illegal facts involved in each control legal case and the case elements associated with the control illegal facts; respectively searching the knowledge graph of each control legal case based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, to obtain the graph search results of each control legal case; and respectively calculating the relevance of the target illegal facts involved in the target legal case and the graph search results of each control legal case based on a preset relevance function, to determine the second relevance scores of the target legal case and each control legal case.

[0080] Exemplarily, according to the control illegal facts and the case elements associated with the control illegal facts involved in the control legal case to be processed, the information associated with each other in the control legal case to be processed can be constructed into a knowledge graph through a graph neural network.

[0081] Optionally, the nodes involved in the knowledge graph can include but are not limited to: space-time nodes, behavior nodes, evidence chain nodes, legal provisions and the like, and the present disclosure does not make specific limitations on this. The knowledge graph can support modeling of the logical relationship of legal provisions (for example, the cause-effect relationship between subjective intention and objective behavior).

[0082] Optionally, after the knowledge graph of the control legal case to be processed is constructed, according to the target illegal facts and the case elements associated with the target illegal facts involved in the target legal case, path reasoning matching is performed through a graph neural network, the knowledge graph of the control legal case to be processed is searched, and a graph search result of the control legal case to be processed is obtained; and based on a preset correlation function, the target illegal facts involved in the target legal case and the graph search result of the control legal case to be processed are correlated to calculate a second correlation score of the target legal case and the control legal case to be processed.

[0083] Exemplarily, for a certain target illegal fact, similar space-time nodes, behavior nodes, evidence chain nodes, legal provision nodes and the like are searched from the knowledge graph of the control legal case to be processed.

[0084] Since the knowledge graph can associate the elements such as illegal behavior, evidence chain, space-time constraint and legal provision in a structured form, support complex logical reasoning, and mine the matching items with logical association but not obvious surface characteristics between the target legal case and the control legal case to be processed, the legal rigor of the case search result is improved.

[0085] In an optional implementation, the single legal case involves one or more illegal facts, and the knowledge graph of each comparison legal case is searched according to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, and the graph search result of each comparison legal case can be obtained by the following steps: searching the knowledge graph of the comparison legal case to be processed according to each target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and obtaining the graph search result corresponding to each target illegal fact; the comparison legal case to be processed is any legal case in the comparison legal cases. The second correlation score of the target legal case and each comparison legal case can be obtained by performing correlation calculation on the target illegal facts involved in the target legal case and the graph search result of each comparison legal case based on the preset correlation function, which can be realized by the following steps: performing correlation calculation on each target illegal fact and its corresponding graph search result based on the preset correlation function to obtain the correlation score of each target illegal fact and its corresponding graph search result; for the comparison legal case to be processed, the correlation scores of each target illegal fact and its corresponding graph search result are summed to obtain the second correlation score of the target legal case and the comparison legal case to be processed.

[0086] For example, the second correlation score of the target legal case Q and the comparison legal case C to be processed can be obtained by calculating the following formula (2). S32 (Q,C):

[0087]

[0088] wherein f qi represents the i-th target illegal fact in the target legal case Q; G C represents the search result of the knowledge graph of the comparison legal case C corresponding to f qi ; rel() represents the preset correlation function. represents the sum of the correlation scores of the m target illegal facts and their corresponding graph search results; m is the number of facts in the target legal case Q.

[0089] The preset correlation function is used to convert the correlation between data into a specific numerical value to measure the degree of association between data sequences. It should be noted that in the actual implementation process, the developer can configure the correlation function according to the actual needs, and the present disclosure does not make specific limitations on this.

[0090] By performing path reasoning matching in the knowledge graph of the comparison legal case to be processed for each target illegal fact, the similarity of different facts in the logical relationship can be fully mined, and the consistency of the case search result in the legal logic can be significantly improved.

[0091] In an optional implementation, the third relevance algorithm is a BM25-based relevance algorithm, and the third relevance scores of the target legal case and the control legal cases are determined by using the third relevance algorithm according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case and the control illegal fact and the case elements associated with the control illegal fact involved in each control legal case. This can be achieved by the following steps: the third relevance scores of the target legal case and the control legal cases are obtained by using the BM25-based relevance algorithm according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case and the control illegal fact and the case elements associated with the control illegal fact involved in each control legal case, respectively.

[0092] Specifically, the third relevance scores of the target legal case and the control legal cases can be obtained by using the BM25-based relevance algorithm according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case and the control illegal fact and the case elements associated with the control illegal fact involved in the control legal case to be processed.

[0093] For example, the second relevance score score S33 (Q,C) of the target legal case Q and the control legal case C to be processed can be obtained by calculating the following formula (3):

[0094] score S33 (Q,C)=BM25(Q,C) (3)

[0095] wherein BM25() is a BM25-based relevance algorithm. It should be noted that the BM25 algorithm (Best Matching 25) is an information retrieval algorithm based on a probabilistic retrieval model, mainly used for calculating the relevance score of query text and documents.

[0096] Through the three-modal dynamic weight distribution of BERT, BM25 and graph reasoning, the semantic similarity, statistical significance and legal logic compliance can be balanced, and the accuracy of the legal case retrieval result can be further improved.

[0097] In step S130, the legal case matched with the target legal case is determined from the control legal cases based on the relevance of the target legal case and the control legal cases.

[0098] For example, the control legal case with the highest relevance can be selected as the legal case matched with the target legal case.

[0099] Exemplarily, the preset number of control legal cases are sequentially selected as the legal cases matched with the target legal case in the order of relevance from high to low.

[0100] As shown in the flowchart of retrieving relevant legal cases, the steps can specifically include the following steps: Figure 4

[0101] Step S401, obtaining legal materials of a target legal case and each control legal case;

[0102] Step S402, based on the case materials of the target legal case, determining the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case by using a large language model; based on the case materials of each control legal case, determining the control illegal fact and the case elements associated with the control illegal fact involved in each control legal case by using a large language model;

[0103] Step S403, according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case and the control illegal fact and the case elements associated with the control illegal fact involved in each control legal case, determining the first relevance score of the target legal case and each control legal case by using a relevance algorithm based on a BERT model;

[0104] Step S404, according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case and the control illegal fact and the case elements associated with the control illegal fact involved in each control legal case, determining the second relevance score of the target legal case and each control legal case by using a relevance algorithm based on a knowledge graph;

[0105] Step S405, according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case and the control illegal fact and the case elements associated with the control illegal fact involved in each control legal case, determining the third relevance score of the target legal case and each control legal case by using a relevance algorithm based on BM25;

[0106] Step S406, weighting and summing the first relevance score, the second relevance score and the third relevance score of the target legal case and each control legal case respectively to determine the relevance of the target legal case and each control legal case;

[0107] Step S407, according to the relevance of the target legal case and each control legal case, selecting the control legal case with the highest relevance as the legal case matched with the target legal case.

[0108] Figure 4 ​In the illustrated step, the key elements in the case are automatically extracted by a large language model, a structured knowledge graph is constructed to capture the logical association between the elements, and a three-modal collaborative mechanism of BERT deep semantic matching, BM25 high-frequency evidence word statistical retrieval, and knowledge graph logical reasoning is fused to construct a multi-dimensional relevance scoring system. It can mine the matching items in the legal case that have logical association but not obvious surface characteristics, and can effectively distinguish similar illegal cases, which can significantly improve the retrieval robustness under complex case conditions, and is suitable for legal case retrieval scenarios with complex logic. It should be noted that in the actual application process, steps S403, S404 and S405 can be executed in parallel or sequentially according to a specific order, and the execution order of steps S403, S404 and S405 is not limited in the embodiments of the present disclosure.

[0109] The exemplary embodiments of the present disclosure also provide a legal case retrieval device, which refers to Figure 5 As shown, the legal case retrieval device 500 can include the following program modules:

[0110] The first data processing module 510 is configured to obtain the case data of the target legal case, and determine the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact based on the case data of the target legal case;

[0111] The relevance determination module 520 is configured to determine the relevance of the target legal case and each control legal case according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case elements associated with the control illegal fact, in combination with a plurality of relevance algorithms;

[0112] The legal case matching module 530 is configured to determine the legal case matched with the target legal case from each control legal case based on the relevance of the target legal case and each control legal case.

[0113] In an optional embodiment, based on the foregoing scheme, the first data processing module 510 can be configured to: based on the case data of the target legal case, extract the target illegal name involved in the target legal case; based on the target illegal name involved in the target legal case, the legal provisions associated with the target illegal name, and the case data original text associated with the target illegal name, perform content summarization by a large language model to obtain the target illegal fact corresponding to the target illegal name involved in the target legal case; determine the legal category to which the illegal name of the target legal case belongs, and extract the case elements associated with the target illegal fact corresponding to the target illegal name by using an element extraction strategy matched with the legal category from the case data original text associated with the target illegal name.

[0114] In an optional implementation, based on the foregoing scheme, the legal case retrieval device 500 further comprises: a second data processing module configured to obtain legal data of each comparison legal case, and determine a comparison illegal fact involved in each comparison legal case and a case element associated with the comparison illegal fact based on case data of each comparison legal case; the second data processing module can be configured to: extract a comparison illegal name involved in each comparison legal case based on the case data of each comparison legal case; based on the comparison illegal name involved in each comparison legal case, legal provisions associated with the comparison illegal name, and case data original text associated with the comparison illegal name, content summary is performed through a large language model to obtain a comparison illegal fact corresponding to the comparison illegal name involved in each comparison legal case; and determine a legal category to which the comparison illegal name involved in each comparison legal case belongs, and correspondingly extract a case element associated with the corresponding comparison illegal fact from the case data original text associated with the comparison illegal name involved in each comparison legal case by using an element extraction strategy matched with the legal category.

[0115] In an optional implementation, based on the foregoing scheme, the relevance determination module 520 comprises: a first correlation calculation module configured to determine a first correlation score of the target legal case and each comparison legal case according to the target illegal fact and the case element associated with the target illegal fact involved in the target legal case and the comparison illegal fact and the case element associated with the comparison illegal fact involved in each comparison legal case by using a first correlation algorithm; a second correlation calculation module configured to determine a second correlation score of the target legal case and each comparison legal case according to the target illegal fact and the case element associated with the target illegal fact involved in the target legal case and the comparison illegal fact and the case element associated with the comparison illegal fact involved in each comparison legal case by using a second correlation algorithm; a third correlation calculation module configured to determine a third correlation score of the target legal case and each comparison legal case according to the target illegal fact and the case element associated with the target illegal fact involved in the target legal case and the comparison illegal fact and the case element associated with the comparison illegal fact involved in each comparison legal case by using a third correlation algorithm; and an algorithm coordination module configured to determine the relevance of the target legal case and each comparison legal case based on the first correlation score, the second correlation score, and the third correlation score of the target legal case and each comparison legal case; wherein the first correlation algorithm, the second correlation algorithm, and the third correlation algorithm are three different types of similarity algorithms.

[0116] In an optional implementation, based on the foregoing scheme, the first correlation algorithm is a correlation algorithm based on a BERT model, and the first correlation calculation module includes: a first sentence vector calculation module configured to encode a target illegal fact involved in a target legal case and a case element associated with the target illegal fact through a BERT model to obtain a target sentence vector corresponding to the target illegal fact; a second sentence vector calculation module configured to encode a control illegal fact involved in each control legal case and a case element associated with the control illegal fact through the BERT model to obtain a control sentence vector corresponding to the control illegal fact; and a cosine similarity calculation module configured to respectively perform cosine similarity calculation on the target sentence vector corresponding to the target illegal fact involved in the target legal case and the control sentence vector corresponding to the control illegal fact involved in each control legal case to determine a first correlation score of the target legal case and each control legal case.

[0117] In an optional implementation, based on the foregoing scheme, a single legal case involves one or more illegal facts, and the cosine similarity calculation module is configured to: for a to-be-processed control legal case, respectively perform cosine similarity calculation on the target sentence vector corresponding to each target illegal fact involved in the target legal case and the control sentence vector corresponding to each control illegal fact involved in the to-be-processed control legal case to obtain the cosine similarity between each target illegal fact and each control illegal fact; the to-be-processed control legal case is any legal case in the control legal cases; determine, according to the cosine similarity between each target illegal fact and each control illegal fact, the most similar control illegal fact of each target illegal fact from the control illegal facts involved in the to-be-processed control legal case; and perform summation calculation according to the cosine similarity between each target illegal fact and the most similar control illegal fact thereof to obtain the first correlation score of the target legal case and the to-be-processed control legal case.

[0118] In an optional implementation, based on the foregoing scheme, the BERT model is trained by contrastive learning, and training samples include a positive sample pair and a negative sample pair constructed by legal cases with the same illegal name and different illegal facts.

[0119] In an optional implementation, based on the foregoing scheme, the second relevance algorithm is a knowledge graph-based relevance algorithm, and the second relevance calculation module comprises: a knowledge graph construction module, configured to construct a knowledge graph of each control legal case according to a control illegal fact involved in each control legal case and a case element associated with the control illegal fact; a knowledge graph retrieval module, configured to retrieve the knowledge graph of each control legal case according to a target illegal fact involved in the target legal case and a case element associated with the target illegal fact, to obtain a graph retrieval result of each control legal case; and a correlation function calculation module, configured to perform relevance calculation on the target illegal fact involved in the target legal case and the graph retrieval result of each control legal case based on a preset relevance function, to determine a second relevance score of the target legal case and each control legal case.

[0120] In an optional implementation, based on the foregoing scheme, the single legal case involves one or more illegal facts, and the knowledge graph retrieval module is configured to: perform content retrieval on the knowledge graph of a to-be-processed control legal case according to each target illegal fact involved in the target legal case and a case element associated with the target illegal fact, to obtain a graph retrieval result corresponding to each target illegal fact; the to-be-processed control legal case is any legal case in the control legal cases; and the correlation function calculation module is configured to: perform relevance calculation on each target illegal fact and the graph retrieval result corresponding to the target illegal fact based on the preset relevance function, to obtain a relevance score of each target illegal fact and the graph retrieval result corresponding to the target illegal fact; and perform summation on the relevance scores of each target illegal fact and the graph retrieval result corresponding to the target illegal fact, to obtain a second relevance score of the target legal case and the to-be-processed control legal case.

[0121] In an optional implementation, based on the foregoing scheme, the third relevance algorithm is a BM25-based relevance algorithm, and the third relevance calculation module is configured to: respectively adopt the BM25-based relevance algorithm according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact, to obtain a third relevance score of the target legal case and each control legal case.

[0122] The specific details of each part of the legal case retrieval device 500 have been described in detail in the method part implementation, and the undisclosed details can be referred to the method part implementation, and thus will not be described again.

[0123] It should be noted that, although several modules or units of the devices for action execution are mentioned in the above detailed description, such division is not mandatory. Indeed, according to exemplary embodiments of the present disclosure, features and functionalities of two or more modules or units described above can be embodied in one module or unit. Conversely, features and functionalities of one module or unit described above can be further divided into embodied by multiple modules or units.

[0124] Exemplary embodiments of the present disclosure also provide a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the above-mentioned legal case retrieval method.

[0125] In an embodiment, the computer program product can be a tangible product containing the computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, etc. signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid state disk (SSD), etc. Exemplarily, the computer program product can be implemented as a non-volatile storage medium storing the computer program, such as read-only memory, Nand flash, etc.

[0126] In an embodiment, the computer program product can be an intangible product containing the computer program. Exemplarily, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, etc. digital file storing the computer program.

[0127] The code of the computer program can be written in one or more programming languages. Programming languages such as C, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (for example, through an Internet connection provided by an operator).

[0128] The computer program can be carried or transferred by an electric, magnetic, optical, electromagnetic, infrared, or the like signal. The electronic device can convert the signal carrying the computer program into a digital signal, and then run the computer program. When the computer program is run on the electronic device, its code is used to make the electronic device perform (more specifically, can make the processor of the electronic device perform) the method steps of various exemplary embodiments of the present disclosure, such as can perform the above-mentioned method, which includes the following steps:

[0129] Obtaining case materials of the target legal case, and determining a target illegal fact involved in the target legal case and a case element associated with the target illegal fact based on the case materials of the target legal case;

[0130] Determining the relevance of the target legal case and each control legal case according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact, in combination with a plurality of relevance algorithms;

[0131] Determining a legal case matching the target legal case from each control legal case based on the relevance of the target legal case and each control legal case.

[0132] In an optional embodiment, based on the foregoing scheme, the target illegal fact involved in the target legal case and the case element associated with the target illegal fact can be determined based on the case materials of the target legal case by the following steps: based on the case materials of the target legal case, extracting a target illegal name involved in the target legal case; based on the target illegal name involved in the target legal case, the legal provisions associated with the target illegal name, and the case material original text associated with the target illegal name, performing content summarization by a large language model to obtain a target illegal fact corresponding to the target illegal name involved in the target legal case; determining a legal category to which the illegal name belongs, and extracting the case element associated with the target illegal fact corresponding to the target illegal name from the case material original text associated with the target illegal name by using an element extraction strategy matched with the legal category.

[0133] In an optional implementation, based on the foregoing scheme, the following steps can also be performed: obtaining legal materials of each control legal case, and determining a control illegal fact involved in each control legal case and a case element associated with the control illegal fact based on case materials of each control legal case; wherein the determination of the control illegal fact involved in each control legal case and the case element associated with the control illegal fact based on the case materials of each control legal case can be realized by the following steps: extracting a control illegal name involved in each control legal case based on the case materials of each control legal case; performing content summarization by a large language model based on the control illegal name involved in each control legal case, legal provisions associated with the control illegal name, and case material original text associated with the control illegal name, to obtain a control illegal fact corresponding to the control illegal name involved in each control legal case; determining a legal category to which the control illegal name involved in each control legal case belongs, and correspondingly adopting an element extraction strategy matched with the legal category to extract a case element associated with the corresponding control illegal fact from the case material original text associated with the control illegal name involved in each control legal case.

[0134] In an optional implementation, based on the foregoing scheme, the determination of the relevance of the target legal case to each control legal case according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact, in combination with multiple relevance algorithms, can be realized by the following steps: determining a first relevance score of the target legal case to each control legal case according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact, by using a first relevance algorithm; determining a second relevance score of the target legal case to each control legal case according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact, by using a second relevance algorithm; determining a third relevance score of the target legal case to each control legal case according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case element associated with the control illegal fact, by using a third relevance algorithm; and determining the relevance of the target legal case to each control legal case based on the first relevance score, the second relevance score, and the third relevance score of the target legal case to each control legal case; wherein the first relevance algorithm, the second relevance algorithm, and the third relevance algorithm are three different types of similarity algorithms.

[0135] In an optional implementation, based on the foregoing scheme, the first correlation algorithm is a correlation algorithm based on a BERT model, and the first correlation scores of the target legal case and the control legal cases are determined by using the first correlation algorithm according to the target illegal fact and the case elements related to the target illegal fact involved in the target legal case and the control illegal fact and the case elements related to the control illegal fact involved in each control legal case. This can be achieved by the following steps: encoding the target illegal fact and the case elements related to the target illegal fact involved in the target legal case by using the BERT model to obtain a target sentence vector corresponding to the target illegal fact involved in the target legal case; encoding the control illegal fact and the case elements related to the control illegal fact involved in each control legal case by using the BERT model to obtain a control sentence vector corresponding to the control illegal fact involved in each control legal case; and respectively performing cosine similarity calculation on the target sentence vector corresponding to the target illegal fact involved in the target legal case and the control sentence vector corresponding to the control illegal fact involved in each control legal case to determine the first correlation scores of the target legal case and the control legal cases.

[0136] In an optional implementation, based on the foregoing scheme, the single legal case involves one or more illegal facts, and the first correlation scores of the target legal case and the control legal cases are determined by respectively performing cosine similarity calculation on the target sentence vector corresponding to the target illegal fact involved in the target legal case and the control sentence vector corresponding to the control illegal fact involved in each control legal case. This can be achieved by the following steps: for a control legal case to be processed, performing cosine similarity calculation on the target sentence vector corresponding to each target illegal fact involved in the target legal case and the control sentence vector corresponding to each control illegal fact involved in the control legal case to be processed to obtain the cosine similarity between each target illegal fact and each control illegal fact; the control legal case to be processed is any legal case in the control legal cases; determining the most similar control illegal fact of each target illegal fact from the control illegal facts involved in the control legal case to be processed according to the cosine similarity between each target illegal fact and each control illegal fact; and performing summation calculation according to the cosine similarity between each target illegal fact and the most similar control illegal fact thereof to obtain the first correlation score of the target legal case and the control legal case to be processed.

[0137] In an optional implementation, based on the foregoing scheme, the BERT model is trained by using contrastive learning, and the training samples include positive and negative sample pairs constructed by legal cases with the same illegal name and different illegal facts.

[0138] In an optional implementation, based on the foregoing scheme, the second correlation algorithm is a knowledge graph-based correlation algorithm, and the second correlation scores of the target legal case and the control legal cases are determined by using the second correlation algorithm according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case and the control illegal fact and the case elements associated with the control illegal fact involved in each control legal case. This can be achieved by the following steps: constructing a knowledge graph of each control legal case according to the control illegal fact and the case elements associated with the control illegal fact involved in the control legal case; respectively searching the knowledge graph of each control legal case according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case to obtain a graph search result of each control legal case; and respectively performing correlation calculation on the target illegal fact involved in the target legal case and the graph search result of each control legal case based on a preset correlation function to determine the second correlation score of the target legal case and each control legal case.

[0139] In an optional implementation, based on the foregoing scheme, the single legal case involves one or more illegal facts, and the graph search result of each control legal case is obtained by respectively searching the knowledge graph of each control legal case according to the target illegal fact and the case elements associated with the target illegal fact involved in the target legal case, which can be achieved by the following steps: performing content search on the knowledge graph of the control legal case to be processed according to each target illegal fact involved in the target legal case and the case elements associated with the target illegal fact to obtain a graph search result corresponding to each target illegal fact; the control legal case to be processed is any legal case in the control legal cases; and the second correlation scores of the target legal case and the control legal cases are determined by respectively performing correlation calculation on the target illegal fact involved in the target legal case and the graph search result of each control legal case based on a preset correlation function, which can be achieved by the following steps: performing correlation calculation on each target illegal fact and the graph search result corresponding to the target illegal fact based on the preset correlation function to obtain a correlation score of each target illegal fact and the graph search result corresponding to the target illegal fact; and summing the correlation scores of each target illegal fact and the graph search result corresponding to the target illegal fact to obtain the second correlation score of the target legal case and the control legal case to be processed.

[0140] In an optional implementation, based on the foregoing scheme, the third relevance algorithm is a BM25-based relevance algorithm, and the third relevance scores of the target legal case and the control legal cases are determined by using the third relevance algorithm according to the target illegal fact and the case element associated with the target illegal fact involved in the target legal case and the control illegal fact and the case element associated with the control illegal fact involved in each control legal case. The third relevance scores of the target legal case and the control legal cases can be obtained by the following steps: the BM25-based relevance algorithm is used respectively according to the target illegal fact and the case element associated with the target illegal fact involved in the target legal case and the control illegal fact and the case element associated with the control illegal fact involved in each control legal case.

[0141] In the legal case retrieval process, the legal case retrieval is realized by the multi-algorithm cooperation, the stability and accuracy of the retrieval result can be improved, the misjudgment of a single model to a complex case can be avoided, and the legal case retrieval scene with complex logic is applicable. In addition, the similarity analysis is performed from the perspective of illegal fact instead of the illegal type, which is a coarse-grained perspective, the case retrieval result can be further refined, and the matching degree of the retrieval result is ensured.

[0142] The exemplary embodiments of the present disclosure also provide an electronic device capable of realizing the legal case retrieval method. The electronic device can include a processor and a memory. The memory stores executable instructions of the processor, such as program codes. The processor executes the method in the exemplary embodiments by executing the executable instructions. In addition, the electronic device can also include a display for displaying a graphical user interface.

[0143] The exemplary embodiments of the present disclosure will be described below with reference to Figure 6 The electronic device is exemplarily illustrated in the form of a general computing device. It should be understood that Figure 6 The electronic device 600 shown is only an example and should not limit the functions and use range of the embodiments of the present disclosure.

[0144] As Figure 6 shown, the electronic device 600 can include a processor 610, a memory 620, a bus 630, an I / O (input / output) interface 640, a network adapter 650, and a display 660.

[0145] The memory 620 can include volatile memory, such as RAM 621, on-chip cache memory 622, and can also include non-volatile memory, such as ROM 623. The memory 620 can also include one or more program modules 624, such as an operating system, one or more application programs, other program modules, and program data, each of which or a combination of which can include implementation of a network environment. For example, the program modules 624 can include the various modules in the apparatus described above.

[0146] The processor 610 can include one or more processing units, such as: the processor 610 can include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or a NPU (Neural-Network Processing Unit), etc.

[0147] The processor 610 can be configured to execute executable instructions stored in the memory 620, such as to perform any one or more method steps in the present example embodiments.

[0148] For example, the processor 610 can perform the following steps:

[0149] Obtaining case materials of the target legal case, and determining a target illegal fact involved in the target legal case and a case element associated with the target illegal fact based on the case materials of the target legal case;

[0150] Determining relevancies of the target legal case and each of the control legal cases according to the target illegal fact involved in the target legal case and the case element associated with the target illegal fact, the control illegal fact involved in each of the control legal cases and the case element associated with the control illegal fact, and in combination with a plurality of correlation algorithms;

[0151] Determining a legal case matched with the target legal case from the control legal cases based on the relevancies of the target legal case and each of the control legal cases.

[0152] In an optional implementation, based on the foregoing scheme, based on the case material of the target legal case, the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact can be determined by the following steps: based on the case material of the target legal case, the target illegal name involved in the target legal case is extracted; based on the target illegal name involved in the target legal case, the legal provisions associated with the target illegal name, and the case material original text associated with the target illegal name, the content summary is performed through the large language model to obtain the target illegal fact corresponding to the target illegal name involved in the target legal case; determine the legal category to which the illegal name involved in the target legal case belongs, and extract the case elements associated with the target illegal fact corresponding to the target illegal name from the case material original text associated with the target illegal name using the element extraction strategy matched with the legal category.

[0153] In an optional implementation, based on the foregoing scheme, the following steps can also be performed: obtaining the legal material of each control legal case, and based on the case material of each control legal case, determining the control illegal fact involved in each control legal case and the case elements associated with the control illegal fact; wherein the above based on the case material of each control legal case, determining the control illegal fact involved in each control legal case and the case elements associated with the control illegal fact can be realized by the following steps: based on the case material of each control legal case, the control illegal name involved in each control legal case is extracted; based on the control illegal name involved in each control legal case, the legal provisions associated with the control illegal name, and the case material original text associated with the control illegal name, the content summary is performed through the large language model to obtain the control illegal fact corresponding to the control illegal name involved in each control legal case; determine the legal category to which the control illegal name involved in each control legal case belongs, and correspondingly adopt the element extraction strategy matched with the legal category to extract the case elements associated with the corresponding control illegal fact from the case material original text associated with the control illegal name involved in each control legal case.

[0154] In an optional embodiment, based on the above scheme, according to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the comparative illegal facts involved in each comparative legal case and the case elements associated with the comparative illegal facts, combined with multiple correlation algorithms, the correlation between the target legal case and each comparative legal case is determined, which can be achieved by the following steps: according to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the comparative illegal facts involved in each comparative legal case and the case elements associated with the comparative illegal facts, a first correlation algorithm is used to determine the first correlation score between the target legal case and each comparative legal case; according to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the comparative illegal facts involved in each comparative legal case and the case elements associated with the comparative illegal facts Based on the comparison illegal facts and case elements associated with the comparison illegal facts involved in the legal case, a second correlation algorithm is used to determine the second correlation score between the target legal case and each comparison legal case; based on the target illegal facts and case elements associated with the target illegal facts involved in the target legal case, as well as the comparison illegal facts and case elements associated with the comparison illegal facts involved in each comparison legal case, a third correlation algorithm is used to determine the third correlation score between the target legal case and each comparison legal case; based on the first correlation score, second correlation score, and third correlation score of the target legal case and each comparison legal case, the correlation between the target legal case and each comparison legal case is determined; wherein, the first correlation algorithm, the second correlation algorithm, and the third correlation algorithm are three different types of similarity algorithms.

[0155] In an optional embodiment, based on the above-mentioned scheme, the first correlation algorithm is a correlation algorithm based on the BERT model. The above-mentioned first correlation algorithm is used according to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the case elements associated with the control illegal facts involved in each comparison legal case, to determine the first correlation score between the target legal case and each comparison legal case. This can be achieved by the following steps: encoding the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts through the BERT model to obtain the target sentence vector corresponding to the target illegal facts involved in the target legal case; encoding the control illegal facts involved in each comparison legal case and the case elements associated with the control illegal facts through the BERT model to obtain the control sentence vector corresponding to the control illegal facts involved in each comparison legal case; performing cosine similarity calculation on the target sentence vector corresponding to the target illegal facts involved in the target legal case and the control sentence vector corresponding to the control illegal facts involved in each comparison legal case, to determine the first correlation score between the target legal case and each comparison legal case.

[0156] In an optional implementation, based on the foregoing scheme, the single legal case involves one or more illegal facts, and the cosine similarity is calculated for the target sentence vector corresponding to the target illegal fact involved in the target legal case and the control sentence vector corresponding to the control illegal fact involved in each control legal case to determine the first relevance score of the target legal case and each control legal case. This can be achieved by the following steps: for the control legal case to be processed, the cosine similarity is calculated for each target sentence vector corresponding to each target illegal fact involved in the target legal case and each control sentence vector corresponding to each control illegal fact involved in the control legal case to be processed to obtain the cosine similarity between each target illegal fact and each control illegal fact; the control legal case to be processed is any legal case in each control legal case; the cosine similarity between each target illegal fact and each control illegal fact is determined from each control illegal fact involved in the control legal case to be processed; and the first relevance score of the target legal case and the control legal case to be processed is obtained by summing the cosine similarity between each target illegal fact and its most similar control illegal fact.

[0157] In an optional implementation, based on the foregoing scheme, the BERT model is trained using contrastive learning, and the training samples include positive and negative sample pairs constructed from legal cases with the same illegal name and different illegal facts.

[0158] In an optional implementation, based on the foregoing scheme, the second relevance algorithm is a knowledge graph-based relevance algorithm, and the second relevance algorithm is used to determine the second relevance score of the target legal case and each control legal case according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the control illegal fact involved in each control legal case and the case elements associated with the control illegal fact. This can be achieved by the following steps: constructing a knowledge graph of each control legal case according to the control illegal fact involved in each control legal case and the case elements associated with the control illegal fact; retrieving the knowledge graph of each control legal case according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact to obtain the graph retrieval result of each control legal case; and determining the second relevance score of the target legal case and each control legal case by calculating the relevance of the target illegal fact involved in the target legal case and the graph retrieval result of each control legal case based on a preset relevance function.

[0159] In an optional implementation, based on the foregoing scheme, the single legal case involves one or more illegal facts, and the knowledge graph of each of the comparison legal cases is searched according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact, and the graph search result of each of the comparison legal cases is obtained, which can be achieved by the following steps: searching the knowledge graph of the to-be-processed comparison legal case according to each target illegal fact involved in the target legal case and the case elements associated with the target illegal fact to obtain the graph search result corresponding to each target illegal fact; the to-be-processed comparison legal case is any legal case in the comparison legal cases; wherein, the target illegal fact involved in the target legal case and the graph search result of each of the comparison legal cases are respectively calculated based on the preset correlation function to determine the second correlation score of the target legal case and each of the comparison legal cases, which can be achieved by the following steps: calculating the correlation between each target illegal fact and its corresponding graph search result based on the preset correlation function to obtain the correlation score of each target illegal fact and its corresponding graph search result; summing the correlation scores of each target illegal fact and its corresponding graph search result for the to-be-processed comparison legal case to obtain the second correlation score of the target legal case and the to-be-processed comparison legal case.

[0160] In an optional implementation, based on the foregoing scheme, the third correlation algorithm is a BM25-based correlation algorithm, and the third correlation algorithm is used to determine the third correlation score of the target legal case and each of the comparison legal cases according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact and the comparison illegal fact involved in each of the comparison legal cases and the case elements associated with the comparison illegal fact, which can be achieved by the following steps: the BM25-based correlation algorithm is used to determine the third correlation score of the target legal case and each of the comparison legal cases according to the target illegal fact involved in the target legal case and the case elements associated with the target illegal fact and the comparison illegal fact involved in each of the comparison legal cases and the case elements associated with the comparison illegal fact.

[0161] In the legal case searching process, the legal case searching is realized by the multi-algorithm cooperation, which can improve the stability and accuracy of the searching result, avoid the misjudgment of a single model to a complex case, and be suitable for a legal case searching scene with complex logic. In addition, the disclosure performs the similarity analysis from the perspective of illegal facts instead of the illegal type in a coarse-grained manner, which can further refine the case searching result and ensure the matching degree of the searching result.

[0162] The electronic device 600 can communicate with one or more external devices 700 (for example, a keyboard, a mouse, an external controller, etc.) through the I / O interface 640.

[0163] The electronic device 600 can communicate with one or more networks through the network adapter 650, for example, the network adapter 650 can provide a mobile communication solution such as 3G / 4G / 5G, or provide a wireless communication solution such as a wireless local area network, Bluetooth, near field communication, etc. The network adapter 650 can communicate with other modules of the electronic device 600 through the bus 630.

[0164] The electronic device 600 can display a graphical user interface, etc. through the display 660.

[0165] Although Figure 6 Other hardware and / or software modules can also be provided in the electronic device 600, which are not shown in the above description, including but not limited to: a display, microcode, device drivers, redundant processors, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, etc.

[0166] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, such a division is not mandatory. Indeed, according to the exemplary embodiments of the present disclosure, the features and functionalities of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functionalities of one module or unit described above can be further divided into embodied by a plurality of modules or units.

[0167] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method or a program product. Therefore, various aspects of the present disclosure can be embodied as a whole hardware embodiment, a whole software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system" here. Those skilled in the art will easily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional techniques in the art that are not disclosed by the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

[0168] It should be understood that the present disclosure is not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A legal case retrieval method, characterized in that: The method comprises: Obtain case data of a target legal case, and based on the case data of the target legal case, determine target illegal facts involved in the target legal case and case elements related to the target illegal facts; Determining the relevance of the target legal case with the referenced legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the referenced illegal facts involved in the referenced legal cases and the case elements associated with the referenced illegal facts, in combination with multiple relevance algorithms; Based on the relevance between the target legal case and the reference legal cases, a legal case matching the target legal case is determined from the reference legal cases.

2. The method according to claim 1, characterized in that The determining, based on the case data of the target legal case, the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, includes: Extracting target violation names involved in the target legal case based on the case data of the target legal case; Based on the target violation name involved in the target legal case, the legal provisions associated with the target violation name, and the original case material associated with the target violation name, a large language model is used to summarize the content to obtain the target violation facts corresponding to the target violation name involved in the target legal case; Determine the legal category to which the illegal name involved in the target legal case belongs, and adopt an element extraction strategy that matches the legal category to extract case elements associated with the target illegal facts corresponding to the target illegal name from the original case material associated with the target illegal name.

3. The method according to claim 1, characterized in that The method further comprises: Obtaining legal information for each of the comparative legal cases, and determining, based on the case information for each of the comparative legal cases, comparative illegal facts involved in each of the comparative legal cases and case elements associated with the comparative illegal facts; The determining of the comparative illegal facts involved in each comparative legal case and the case elements associated with the comparative illegal facts based on the case data of each comparative legal case includes: Based on the case data of each of the comparative legal cases, extracting the names of the comparative violations involved in each of the comparative legal cases; Based on the names of the violations involved in the respective comparative legal cases, the legal provisions associated with the names of the violations involved in the respective comparative legal cases, and the original texts of the case materials associated with the names of the violations involved in the respective comparative legal cases, content summary is performed using a large language model to obtain the facts of the violations corresponding to the names of the violations involved in the respective comparative legal cases; Determine the legal category to which the control violation names involved in each control legal case belong, and adopt an element extraction strategy that matches the legal category to extract case elements associated with the corresponding control violation facts from the original case materials associated with the control violation names involved in each control legal case.

4. The method according to claim 1, wherein The step of determining the relevance between the target legal case and each of the reference legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, and the reference illegal facts involved in each of the reference legal cases and the case elements associated with the reference illegal facts, in combination with multiple relevance algorithms, includes: Determining, using a first correlation algorithm, a first correlation score between the target legal case and each of the reference legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the reference illegal facts involved in each of the reference legal cases and the case elements associated with the reference illegal facts; Determining, using a second correlation algorithm, a second correlation score between the target legal case and each of the reference legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the reference illegal facts involved in each of the reference legal cases and the case elements associated with the reference illegal facts; Determining, using a third correlation algorithm, a third correlation score between the target legal case and each of the reference legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the reference illegal facts involved in each of the reference legal cases and the case elements associated with the reference illegal facts; Determining the relevance between the target legal case and the reference legal cases based on the first relevance score, the second relevance score, and the third relevance score between the target legal case and the reference legal cases; The first correlation algorithm, the second correlation algorithm, and the third correlation algorithm are three different types of similarity algorithms.

5. The method according to claim 4, characterized in that The first correlation algorithm is a correlation algorithm based on the BERT model, and the first correlation algorithm is used to determine a first correlation score between the target legal case and each of the reference legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the reference illegal facts involved in each of the reference legal cases and the case elements associated with the reference illegal facts, including: Encoding the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts through the BERT model to obtain a target sentence vector corresponding to the target illegal facts involved in the target legal case; Encoding the comparative illegal facts involved in each comparative legal case and the case elements associated with the comparative illegal facts through the BERT model to obtain comparative sentence vectors corresponding to the comparative illegal facts involved in each comparative legal case; The target sentence vector corresponding to the target illegal fact involved in the target legal case and the control sentence vector corresponding to the control illegal fact involved in each control legal case are respectively subjected to cosine similarity calculation to determine the first correlation score between the target legal case and each control legal case.

6. The method according to claim 5, characterized in that A single legal case involves one or more illegal facts. The cosine similarity calculation is performed on the target sentence vector corresponding to the target illegal facts involved in the target legal case and the reference sentence vector corresponding to the reference illegal facts involved in each reference legal case to determine the first correlation score between the target legal case and each reference legal case, including: For the pending comparison legal case, performing cosine similarity calculation on the target sentence vector corresponding to each target illegal fact involved in the target legal case and the comparison sentence vector corresponding to each comparison illegal fact involved in the pending comparison legal case, to obtain the cosine similarity between each target illegal fact and each comparison illegal fact; the pending comparison legal case is any legal case among the comparison legal cases; Determining, based on the cosine similarity between each target violation fact and each comparison violation fact, the comparison violation fact that is most similar to each target violation fact from among the comparison violation facts involved in the comparison legal case to be processed; A sum calculation is performed based on the cosine similarity between each target illegal fact and its most similar reference illegal fact to obtain a first correlation score between the target legal case and the reference legal case to be processed.

7. The method according to claim 5, characterized in that The BERT model is trained using contrastive learning, and the training samples include positive and negative sample pairs constructed from legal cases with the same violation name but different violation facts.

8. The method according to claim 4, characterized in that The second correlation algorithm is a correlation algorithm based on a knowledge graph, and the second correlation algorithm is used to determine a second correlation score between the target legal case and each of the reference legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the reference illegal facts involved in each of the reference legal cases and the case elements associated with the reference illegal facts, including: Constructing a knowledge graph of each of the comparative legal cases based on the comparative illegal facts involved in each of the comparative legal cases and the case elements associated with the comparative illegal facts; Searching the knowledge graphs of the respective reference legal cases according to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts to obtain graph search results for the respective reference legal cases; Based on a preset correlation function, the target illegal facts involved in the target legal case and the graph retrieval results of the respective control legal cases are respectively correlated to determine a second correlation score between the target legal case and the respective control legal cases.

9. The method according to claim 8, characterized in that A single legal case involves one or more illegal facts. According to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, the knowledge graphs of the referenced legal cases are searched respectively to obtain the graph search results of the referenced legal cases, including: Based on each target illegal fact and its associated case elements involved in the target legal case, a content search is performed on the knowledge graph of the pending comparative legal case to obtain a graph search result corresponding to each target illegal fact; the pending comparative legal case is any one of the comparative legal cases; The method of performing correlation calculations on the target illegal facts involved in the target legal case and the graph search results of the respective reference legal cases based on a preset correlation function to determine a second correlation score between the target legal case and the respective reference legal cases includes: Based on a preset correlation function, a correlation calculation is performed between each target illegal fact and its corresponding graph search result to obtain a correlation score between each target illegal fact and its corresponding graph search result; For the pending comparative legal case, the correlation scores of each target illegal fact and its corresponding graph search result are summed to obtain a second correlation score between the target legal case and the pending comparative legal case.

10. The method according to claim 4, characterized in that The third correlation algorithm is a correlation algorithm based on BM25, and the third correlation algorithm is used to determine a third correlation score between the target legal case and each of the reference legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the reference illegal facts involved in each of the reference legal cases and the case elements associated with the reference illegal facts, including: According to the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the control illegal facts involved in each comparison legal case and the case elements associated with the control illegal facts, the BM25-based correlation algorithm is used to obtain the third correlation score of the target legal case and each comparison legal case.

11. A legal case retrieval device, characterized in that: The device comprises: a first data processing module, configured to obtain case data of a target legal case, and determine, based on the case data of the target legal case, target illegal facts involved in the target legal case and case elements associated with the target illegal facts; a relevance determination module for determining the relevance of the target legal case with the referenced legal cases based on the target illegal facts involved in the target legal case and the case elements associated with the target illegal facts, as well as the referenced illegal facts involved in the referenced legal cases and the case elements associated with the referenced illegal facts, in combination with multiple relevance algorithms; The legal case matching module is configured to determine a legal case that matches the target legal case from among the reference legal cases based on the relevance between the target legal case and the reference legal cases.

12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

13. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 10 by executing the executable instructions.