A legal element graph assisted case recommendation method, device and program product

By constructing a legal element graph and adopting an element-based trial method, the problem of insufficient accuracy in existing similar case recommendation systems has been solved, achieving context-consistent similar case recommendations and simplifying the search process for legal professionals.

CN120780850BActive Publication Date: 2025-12-26HUA DATA TECH (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511292664.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-12-26
Estimated Expiration
2045-09-10

AI Technical Summary

Technical Problem

Existing similar case recommendation systems fail to fully consider the relationships between elements within a case, resulting in insufficient accuracy of recommendation results and difficulty in achieving context-consistent similar case recommendations.

Method used

The method of element-based trial is used to construct a legal element map. Through adaptive screening and unified element representation space, the granularity of case elements is analyzed, similar case documents are recommended, and the adaptive selection process is fed back.

Benefits of technology

It improves the accuracy and efficiency of similar case recommendations, simplifies the search process for legal professionals, and provides context-consistent recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780850B_ABST
    Figure CN120780850B_ABST
Patent Text Reader

Abstract

The application provides a kind of legal element graph assisted case recommendation method, device and program product, it is related to semantic recognition technical field. Among them, legal element graph assisted case recommendation method includes: collecting case text data, generating fact element and corresponding graph feature coding set in line with the fact of the matter, then combining text feature coding vector, graph feature coding set is decoded and corrected, and case element coding is obtained;Case element coding is used for case recommendation. The application uses the method of element uniform space to analyze the correlation between cases, more accurately finds the cases with similar background, fact and legal problem of target case by understanding the relationship of case related elements, and reports the self-adaptive cognitive process in the uniform space of case elements.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of semantic recognition, and in particular to a legal element graph assisted similar case recommendation method, device and program product. BACKGROUND

[0002] In the field of justice, legal workers often need to refer to and consult a large number of judicial documents to support the judgment. However, finding similar judgment documents for the current case is a time-consuming and complex task. The goal of the existing similar case recommendation system is to provide legal workers with a search service for similar cases.

[0003] These systems mainly search for cases based on keyword matching and text similarity algorithms. However, the elements of a case are complex and unselected and systematized elements can disrupt the process of finding similar cases. Therefore, the existing system often fails to fully consider the element relationship within the case, resulting in insufficient accuracy of the recommendation results.

[0004] The difficulty of improving the similar case recommendation system lies in how to unify the understanding of the context of existing and generated judicial documents by the recommendation system to achieve context-consistent similar case recommendation. SUMMARY

[0005] In view of the deficiencies of the prior art, in combination with the technical background conditions, the present application proposes a legal element graph assisted similar case recommendation method, device and program product guided by an element type trial method, which uses the element type trial method to adaptively select the element graph, unifies the element representation space, and completes the element granularity analysis and similar case recommendation based on the element representation space.

[0006] For the coded complaint, answer, evidence list and other case documents containing legal fact claims, the element type trial method is used to adaptively select the case elements, so that the context of the case document and the judgment is consistent, and then similar case documents are recommended according to the case elements. At the same time, the method proposed by the present application can feedback the process of adaptively selecting the elements, so that the legal workers can judge whether the case is appropriate.

[0007] Among them, the element type trial method is a new type of trial method, which requires analyzing the constitutive elements of legal norms, further decomposing the constitutive elements into fact elements, refining the basic fact elements of fixed case, summarizing whether each element is disputed, and conducting trial around the disputed elements, simplifying the preparation of judicial documents, so as to simplify the trial process, improve the trial efficiency, realize the special trial of similar cases, and realize the fast trial of simple cases.

[0008] In a first aspect, the present application provides a legal element graph assisted similar case recommendation method, comprising the following steps:

[0009] S1: Collect case text data, use a trained large language model to filter out repetitive and incomplete data, and store it in a case database; the case text data includes the current case;

[0010] S2: Use a trained element graph generation model to extract the constitutive elements of applicable legal rules from the case text data, parse them into specific factual elements, use the factual elements to build a parameterized legal element graph, and a case graph feature code set ;

[0011] S3: Based on the case graph feature code set , get the case text feature code set in the form of a judgment ;

[0012] S4: Based on the case text feature code set , get the optimized case graph feature code set and case classification recognition information ;

[0013] S5: Based on the case text data, get the case text feature code vector and case classification recognition information ;

[0014] S6: Based on the optimized case graph feature code set and the case text feature code vector , adaptively select the graph feature code, and decode and correct to get the case element code , and the context of the classification recognition information is unified;

[0015] S7: According to the similarity of the case element code, select the most similar case to the current case in the case database as the recommended result of the same type of legal document.

[0016] As a further improvement of the present application, in step S2, the factual elements are represented using a relationship element set , each element of the set is a relational data, that is, each element includes two entity data and a relationship data; the is obtained by encoding each element in .

[0017] As a further improvement of the present application, in the step S2, in the parameterized legal element graph, the fact elements are arranged into a structure in accordance with the requirements of the fact theory, which includes the requirements of the rules of burden of proof, the trial order of the request, the defense, the counter-defense, and the re-counter-defense.

[0018] As a further improvement of the present application, the specific steps of the step S3 include: training the parameterized judgment document generation model using the trained .

[0019] As a further improvement of the present application, the specific steps of the step S4 include: using the case text feature code set based on the parameterized neural network encoder and the loss function of the case classification to output the optimized case graph feature code set and the case classification identification information .

[0020] As a further improvement of the present application, the specific steps of the step S5 include: using the case text data, based on the parameterized neural network encoder and the loss function of the case classification to output the case text feature code vector and the case classification identification information

[0021] .

[0022] based on the loss function of the case classification using the neural network to encode each graph feature in and respectively, to form a set f:

[0023]

[0024] and record the sequence number as the maximum loss in :

[0025]

[0026] Then, take the gradient of the elements in the set to form a matrix :

[0027]

[0028] Again, by Lagrange multiplier , get stage The momentum of the characteristics of the case text is aligned with the characteristics of the element relationship graph :

[0029]

[0030] Then, in stage , input the case graph feature encoding set , after decoding by neural network , obtain the case element representation , after momentum Correction, get case element code :

[0031]

[0032] The stage Indicates the th loop in the WHILE loop; after each loop, the th graph feature encoding is removed from , until only one graph feature encoding is left in .

[0033] As a further improvement of the present application, the step S7 further comprises giving an explanation of the inference process by the following calculation:

[0034]

[0035] Wherein, Rank represents the order, in , from high to low .

[0036] In a second aspect, the present application provides a computer device comprising a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the method of the first aspect.

[0037] In a third aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the method of the first aspect.

[0038] In a fourth aspect, the present application provides a computer program product, wherein the computer program is executed by a processor to implement the steps of the method of the first aspect.

[0039] Compared with the prior art, the application not only makes case recommendation based on case surface characteristics, but also uses the method of element uniform space to analyze the correlation between cases. The application can more accurately find cases with similar background, facts and legal issues as the target case by understanding the relationship between the relevant elements of the case, and provide reference for legal workers. At the same time, the application can report the self-adaptive cognitive process in the case element uniform space to assist legal workers in selecting appropriate similar cases. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 A schematic diagram of the parameterized legal element atlas obtained according to the method of the application; in the diagram, N represents the plaintiff demand relationship, W represents the defendant intention relationship, and O represents the event type relationship. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme in the embodiments of the application will be described clearly and completely in combination with the drawings. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments of the application. In the described embodiments of the application, steps S1, S2, … do not limit the unique execution steps of the application; various models, simulation environments and software described in the application are not the only limited ways of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without making creative efforts fall within the scope of protection of the application.

[0042] In the application, the computer device / system refers to the related entities applied to the computer, such as hardware, combination of hardware and software, software or software in execution, etc. In detail, for example, the software includes but is not limited to processes running on the processor, processors, objects, executable software, execution threads, programs and / or computers. In addition, the application programs or scripts running on the server or the server can be software. One or more software can be in the execution process and / or thread, and the software can be localized on one computer and / or distributed between two or more computers, and can be run by various computer readable media.

[0043] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0044] In a first aspect, the application provides a legal element atlas assisted case recommendation method embodiment, and the specific process can be as follows:

[0045] S1: Collect a large amount of judicial document data D through crawler technology or other data acquisition methods and channels, and perform data screening and storage.

[0046] In the screening step, a pre-trained large language model is used. It assists in filtering legal case data, removing duplicate cases and cases with incomplete content, and storing the filtered case data and judgments in the case database.

[0047] S2: Analyze the constituent elements of the applicable legal rule into specific factual elements, arrange them into a structure that conforms to the requirements of the factual theory of elements; construct the above structure into a parameterized legal element map (e.g., using a directed acyclic graph). Figure 1 (As shown).

[0048] Preferred structures that meet the requirements of the factual approach include: factual elements that comply with the rules of burden of proof and the order of hearing requests, defenses, counter-defenses, and further defenses.

[0049] Preferably, the parsing process utilizes a trained feature map generation model M. G For the trained M G Model: Input case text data U, output set of relational elements ,right The encoding of each element in the data yields a set of case map feature codes. Among them, the set Each element is relational data: it includes two entity data and a relational data reflecting the relationship between the two.

[0050] In one embodiment of the present invention, the set of element relationships is a directed acyclic graph:

[0051] ,

[0052] Wherein, N represents the plaintiff's need relationship, W represents the defendant's intention relationship, and O represents the event type relationship;

[0053] Then through Construct a parameterized legal element map.

[0054] This step is used to identify relevant elements, case conditions and outcomes, and the relationships between them; to analyze the legal element relationships in case materials and judgments.

[0055] S3: Based on the parameterized legal element graph, the text judgment result is obtained, and the case text feature encoding set is further obtained;

[0056] The specific steps are as follows: using the case text data U and the case graph feature encoding set Training a parameterized judgment generation model Using trained The text data U is processed to obtain the text judgment result;

[0057] The case text feature encoding set is obtained from the text judgment results. .

[0058] S4: Using a parameterized natural language neural network to process the case text feature encoding set. An optimized set of case graph feature codes was obtained. ;

[0059] The specific steps are as follows: using the case text feature encoding set Parameterized neural network encoder and the loss function for case classification Output an optimized set of case graph feature codes. Case classification and identification information .

[0060] S5: Using case text data U, based on a parameterized neural network encoder and the loss function for case classification Output the case text feature encoding vector Case classification and identification information .

[0061] S6: Optimize the case graph feature encoding set and case text feature encoding vector Input a unified space for case elements, and adaptively select graph feature encoding to achieve contextual consistency between case elements and classification and recognition information;

[0062] An adaptive selection map feature encoding algorithm is employed as the algorithm for simulating the spatial representation mechanism of elements. This adaptive selection map feature encoding algorithm uses an optimized set of case map feature codes. Parameterized neural networks Case text feature encoding vector and the loss function for case classification. As input; in stage m, when When the number of codes in the dataset is greater than 1, the following calculation is performed: Loss function based on case classification. Using neural networks , respectively Each map feature encoding, and Encode the data to form a set f:

[0063]

[0064] And record as The sequence number of the largest loss :

[0065]

[0066] Then, the gradient of the elements in the set is calculated to form a matrix G m :

[0067]

[0068] Then, the momentum of the feature of the case text with respect to the feature graph of the case is calculated by using the Lagrange multiplier :

[0069]

[0070] Then, in the mth stage, the set of case graph feature encodings is input into the neural network to obtain the case element representation , which is modified by the momentum to obtain the case element encoding :

[0071]

[0072] The mth stage represents the mth iteration in the WHILE loop. After one iteration, the first graph feature encoding is removed from until only one graph feature encoding is left in .

[0073] In this step, the modified element encoding is generated according to the case text classification information and is adaptively unified.

[0074] S7: The case element encoding corresponding to the current case after adaptive selection is calculated with the similarity of all case element encodings in the case database, and the case text corresponding to the most similar case element encoding is selected as the recommended result of the current case. The recommended result can be sorted according to the similarity and provided to the user for selection and review.

[0075] Preferably, the similarity calculation method uses the cosine similarity calculation method.

[0076] After outputting the case text, the system can inform the reasoning process of the algorithm:

[0077]

[0078] where Rank represents the ranking, and in , the ranking is arranged from high to low​ as an interpretable output.

[0079] In a second aspect, the present application provides a computer device embodiment, comprising a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the method of the first aspect.

[0080] In a third aspect, the present application provides a computer readable storage medium embodiment, having stored thereon a computer program, which, when executed by a processor, implements the steps of the method of the first aspect.

[0081] In a fourth aspect, the present application provides a computer program product embodiment, which, when executed by a processor, implements the steps of the method of the first aspect.

Claims

1. A legal element map assisted case recommendation method, characterized in that, The method comprises the following steps: S1: collecting case text data, screening using a trained large language model, removing duplicate and incomplete data, and storing in a case database; the case text data includes a current case; S2: generating a case graph using the trained element graph generation model extracting the constitutive elements of the applicable legal rules from the case text data, parsing them into specific factual elements, using the factual elements to build a parameterized legal element graph, and a case graph feature encoding set ; S3: encoding set of case text data and case graph features , training a parameterized judgment document generation model , using the trained processing the case text data to obtain a text judgment result, and obtaining a case text feature encoding set from the text judgment result ; S4: obtaining an optimized case graph feature code set based on the case text feature code set , obtaining an optimized case graph feature code set and case classification identification information ; S5: obtaining a case text feature encoding vector based on the case text data and case classification identification information ; S6: Based on the optimized case graph feature encoding set and case text feature encoding vector , and the loss function of case classification, adaptive selection the graph feature encoding in , and decoding and correction, get case element encoding , and the context of classification and identification information is unified; S7: selecting the most similar case to the current case in the case database as the recommendation result of the same type of legal document according to the similarity of the case element code.

2. The method of claim 1, wherein, In the step S2, the fact element uses the relation element set It is indicated that each element of the set is relational data, that is, each element includes two entity data and a relation data; the For encoding each element in element set.

3. The method of claim 1, wherein, In the step S2, in the parameterized legal element graph, the fact elements are arranged in a structure conforming to the requirements of the fact theory, and the requirements of the structure include: conforming to the rules of burden of proof, conforming to the trial order of request, defense, counter-defense and re-counter-defense.

4. The method of claim 1, wherein, The specific steps of the step S4 include: using a case text feature code set , a parameterized neural network encoder , and a case classification loss function , outputting an optimized case atlas feature code set , and case classification identification information .

5. The method of claim 1, wherein, The specific steps of the step S5 include: using the case text data, encoding the case text data based on a parameterized neural network encoder , and a loss function of case classification , outputting a case text feature encoding vector , and case classification identification information .

6. The method of claim 1, wherein, The specific steps of the step S6 include: Loss function based on case classification , using neural networks each atlas feature in and are encoded separately, making up the set f: ; and record as the index number corresponding to the feature of the map with the largest loss in the middle : ; Next, the gradient is taken of the elements in the set to form the matrix : ; Again, by Lagrange multipliers , the momentum of the features of the case text with respect to the alignment of the features of the element relationship map of stage m is obtained : ; Then, in stage m, input the case graph feature code set , after decoding by the neural network , obtain the case element representation , after momentum correction, obtain the case element code : ; The stage m represents the m-th iteration in the WHILE loop; after each iteration, the m-th iteration is... Each spectral feature is encoded from Remove from the middle until Until only one map feature code remains.

7. The method of claim 6, wherein, The step S7 further includes giving an explanation of the reasoning process by the following calculation: ; wherein, representing ranking, in which are ranked from high to low .

8. A computer apparatus comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program, when executed by the processor, causes the processor to perform the method of any one of claims 1 to 7. The processor executes the computer program to implement the steps of the method of any one of claims 1-7.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-7.

10. A computer program product, characterised in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Case classification method and device, computer equipment and storage medium

    CN111475613A

  • Class case recommendation method based on deep understanding

    CN120492612A