Method and system for generating legal reasoning thought chain data, and electronic device
By constructing pre-set tables and generating mind maps, the problem of insufficient data on legal reasoning thought chains in existing technologies is solved, achieving high-quality legal reasoning data generation and ensuring logic and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-03-24
AI Technical Summary
Existing legal reasoning methods lack high-quality thought chain data in complex legal issues, resulting in high costs, low efficiency, and unclear or inaccurate reasoning processes.
By constructing a pre-defined table, based on the correspondence between the right to claim, the requirements of the right to claim, the right to defend, and the requirements of the right to defend, legal reasoning thought chain data is generated, including a mind map and recommended right to defend, ensuring that each step of reasoning conforms to legal logic.
It enables the generation of high-quality legal reasoning thought chain data, especially in complex fields such as private lending and contract law, providing clear thought chains and accurate reasoning processes.
Smart Images

Figure CN121094086B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of natural language processing, and particularly relates to a legal reasoning thought chain data generation method and system and electronic equipment. BACKGROUND
[0002] In recent years, large language models have shown excellent performance in natural language processing and logical reasoning tasks, especially in content generation and question answering. However, the legal field has highly specialized and standardized characteristics, involving complex legal provisions, requirements, and reasoning processes.
[0003] In order to achieve high-quality legal reasoning, especially in complex civil lending and contract law fields, the model not only needs to give the correct conclusion, but also needs to have a clear reasoning chain and ensure that each step of the reasoning process conforms to the legal logic.
[0004] Among the current technical means, the two most common methods are manually writing reasoning tracks and model self-generating reasoning processes. Therefore, the existing automated reasoning methods often face two major challenges. On the one hand, manual writing requires the involvement of a large number of experts, resulting in high costs, low efficiency, and difficulty in large-scale data production. Therefore, the lack of high-quality "thought chain" data for training leads to unclear model reasoning paths and reasoning steps, making it difficult to effectively deal with complex legal problems. On the other hand, model self-generation has great limitations and cannot guarantee the accuracy of the reasoning process, often resulting in incorrect reasoning paths, inconsistent logic, or results that do not meet the requirements of legal provisions. It can be seen that the existing reasoning data generation methods cannot efficiently generate high-quality legal reasoning chain data, especially for complex and multi-step legal reasoning tasks. SUMMARY
[0005] The technical problem to be solved by the present disclosure is to overcome the lack of high-quality legal reasoning thought chain data in the prior art, and to provide a legal reasoning thought chain data generation method, system and electronic equipment.
[0006] The present disclosure solves the above technical problems by the following technical solutions:
[0007] In a first aspect, a legal reasoning thought chain data generation method is provided, applied to a large language model, the generation method comprising the following steps:
[0008] Obtaining case fact content;
[0009] determine a thinking graph corresponding to the case fact content according to a preset table, wherein the preset table is constructed according to a corresponding relationship of a claim right, a claim right element, a defense right and a defense right element, and the thinking graph includes a target claim right and a target claim right element associated with the case fact content, and a target defense right and a target defense right element associated with the target claim right;
[0010] generate legal reasoning thinking chain data corresponding to the case fact content according to the thinking graph and an interpretation of the target defense right in the preset table, wherein the thinking chain data includes a thinking chain and a recommended defense right.
[0011] Optionally, the step of determining the thinking graph corresponding to the case fact content according to the preset table specifically includes:
[0012] in response to the case fact content satisfying all claim right elements corresponding to the target claim right, obtaining a target defense right associated with the target claim right;
[0013] extracting a corresponding fact segment from the case fact content as a target claim right element according to a claim right element corresponding to the target claim right, and extracting a corresponding fact segment from the case fact content as a target defense right element according to a defense right element corresponding to the target defense right;
[0014] generating the thinking graph according to the target claim right, the target claim right element, the target defense right and the target defense right element.
[0015] Optionally, the generation method further includes:
[0016] obtaining supplementary content for the case fact content according to the recommended defense right;
[0017] verifying whether the recommended defense right satisfies a corresponding defense right element according to the supplementary content.
[0018] Optionally, the number of the thinking chains is multiple, and the generation method further includes:
[0019] detecting whether the format of the generated thinking chain meets the requirements;
[0020] outputting the thinking chain with the format meeting the requirements.
[0021] Optionally, the generation method further includes:
[0022] in response to the recommended defense right not being a defense right associated with the target claim right in the preset table, performing legal logic rewriting on reasoning content of the thinking chain according to the preset table, and updating the recommended defense right based on the rewritten thinking chain.
[0023] Optionally, the legal logic rewriting of the reasoning content of the thought chain according to the preset table specifically includes:
[0024] modifying the legal provisions inconsistent with the target claim right and the target defense right in the reasoning content of the thought chain.
[0025] In a second aspect, a legal reasoning thought chain data generation system is provided, applied to a large language model, and includes:
[0026] a case acquisition module configured to acquire case fact content;
[0027] a thought map determination module configured to determine a thought map corresponding to the case fact content according to a preset table, wherein the preset table is constructed according to a corresponding relationship of a claim right, a claim right requirement, a defense right, and a defense right requirement, and the thought map includes a target claim right and a target claim right requirement associated with the case fact content, and a target defense right and a target defense right requirement associated with the target claim right;
[0028] a thought chain data generation module configured to generate legal reasoning thought chain data corresponding to the case fact content according to the thought map and an interpretation of the target defense right in the preset table, wherein the thought chain data includes a thought chain and a recommended defense right.
[0029] Optionally, the thought map determination module specifically includes:
[0030] an acquisition unit configured to acquire a target defense right associated with the target claim right in response to the case fact content satisfying all claim right requirements corresponding to the target claim right;
[0031] an extraction unit configured to extract a corresponding fact segment from the case fact content as a target claim right requirement according to a claim right requirement corresponding to the target claim right, and extract a corresponding fact segment from the case fact content as a target defense right requirement according to a defense right requirement corresponding to the target defense right;
[0032] a generation unit configured to generate the thought map according to the target claim right, the target claim right requirement, the target defense right, and the target defense right requirement.
[0033] Optionally, the case acquisition module is further configured to acquire supplementary content for the case fact content according to the recommended defense right.
[0034] The generation system further includes:
[0035] The verification module is configured to verify whether the recommended plea satisfies a corresponding plea requirement according to the supplementary content.
[0036] Optionally, the number of the thought chains is a plurality, and the generation system further comprises:
[0037] The format detection module is configured to detect whether the format of the generated thought chain meets a requirement.
[0038] The output module is configured to output the thought chain whose format meets the requirement.
[0039] Optionally, the generation system further comprises:
[0040] The rewriting module is configured to, in response to the recommended plea not being the plea associated with the target request right in the preset table, rewrite the reasoning content of the thought chain according to the preset table, and update the recommended plea based on the rewritten thought chain.
[0041] Optionally, the rewriting module is specifically configured to modify a law article appearing in the reasoning content of the thought chain and inconsistent with the target request right and the target plea in the preset table.
[0042] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and the processor implements the method for generating the legal reasoning thought chain data according to the first aspect when executing the computer program.
[0043] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the method for generating the legal reasoning thought chain data according to the first aspect.
[0044] In a fifth aspect, a computer program product is provided, which includes a computer program, and the computer program is executed by a processor to implement the method for generating the legal reasoning thought chain data according to the first aspect.
[0045] On the basis of common knowledge in the art, the above-mentioned preferred conditions can be combined arbitrarily, i.e., to obtain each preferred example of the present disclosure.
[0046] The positive progress effect of the present disclosure is that: by constructing a preset table through the correspondence relationship of the claim right, the claim right requirement, the defense right and the defense right requirement, as the basis of the legal reasoning process, the subsequent generated thinking chain data has logicality and correctness; then according to the preset table, the thinking map corresponding to the case fact content is determined, and the thinking chain corresponding to the case fact content and the recommended defense right are generated according to the thinking map and the interpretation of the target defense right in the preset table, so that high-quality legal reasoning thinking chain data with thinking chain is obtained, and the acquisition of high-quality legal reasoning thinking chain data is realized. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 A flowchart of a legal reasoning thinking chain data generation method provided for the embodiment 1 of the present disclosure is provided.
[0048] Figure 2 A specific flowchart of step S12 provided for the embodiment 1 of the present disclosure is provided.
[0049] Figure 3 A partial flowchart of a legal reasoning thinking chain data generation method provided for the embodiment 1 of the present disclosure is provided.
[0050] Figure 4 A partial flowchart of a legal reasoning thinking chain data generation method provided for the embodiment 1 of the present disclosure is provided.
[0051] Figure 5 A partial flowchart of another legal reasoning thinking chain data generation method provided for the embodiment 1 of the present disclosure is provided.
[0052] Figure 6 A partial flowchart of another legal reasoning thinking chain data generation method provided for the embodiment 1 of the present disclosure is provided.
[0053] Figure 7 A module schematic diagram of a legal reasoning thinking chain data generation system provided for the embodiment 2 of the present disclosure is provided.
[0054] Figure 8 A structural schematic diagram of an electronic device provided for the embodiment 3 of the present disclosure is provided. DETAILED DESCRIPTION
[0055] The present disclosure will be further illustrated by way of examples below, but the present disclosure is not limited in the scope of the examples.
[0056] The use of ordinal numbers and other prefix words in the embodiments of the present disclosure to distinguish the described objects does not constitute a limitation on the described objects. The statements about the described objects refer to the description in the context of the claims or embodiments and should not constitute redundant limitations because of the use of such prefix words. In addition, in the description of the embodiments, unless otherwise stated, the meaning of "a plurality of" is two or more.
[0057] In the embodiments of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with relevant legal regulations and do not violate public order and good customs.
[0058] In the embodiments of the present disclosure, the claim right refers to the right of the obligee to require or not require certain behavior of the obligor, which is the core tool of the "debt-right-property" system of civil law. For example, the claim right can include contract performance claim right, tort damage compensation claim right, property return claim right, unjust enrichment return claim right, and no-reason management compensation claim right.
[0059] The claim right requirement refers to the specific factual conditions that must be met in full for the law to give one party the right to claim; only when these conditions are established one by one, the claim right party actually occurs and can be enforced by the court.
[0060] The right of defense refers to the defense right of the obligor to "recognize the existence of the claim right" but "refuse to pay" according to law; its exercise can only be claimed by the parties, and the court cannot apply it ex officio. The right of defense can include the right of simultaneous performance, the right of prior performance, the right of unfitness, the right of prior suit of general guarantor, the right of permanent defense of time limit, and the right of agreed defense.
[0061] The defense right requirement refers to the specific factual conditions that must be met in full for the law to allow the obligor to resist the claim right; only when these conditions are established one by one, the right of defense party actually occurs, and the court can reject or temporarily block the claimant's request based on this.
[0062] Embodiment 1
[0063] Figure 1 A flowchart of a legal reasoning thought chain data generation method provided in the embodiment is applied to a large language model and includes the following steps:
[0064] S11, acquiring case fact content. In the present embodiment, the case fact content can be acquired by user input, and the case fact content includes the litigation request of the claimant. The case fact content refers to the objective life fact that can cause specific legal effect and is one-to-one corresponding to the claim right or defense right requirement, which can be converted into specific legal fact in the subsequent steps, and then determine the right to establish or extinguish.
[0065] S12, determine a thinking map corresponding to the case fact content according to a preset table; wherein the preset table is constructed according to the corresponding relationship of the claim right, the claim right element, the defense right and the defense right element, and the thinking map includes the target claim right and the target claim right element associated with the case fact content, and the target defense right and the target defense right element associated with the target claim right.
[0066] In the embodiment, the preset table is constructed according to the corresponding relationship of the claim right, the claim right element, the defense right and the defense right element. Specifically, the preset table is a structured table constructed according to expert knowledge, which is used to store the expert knowledge related to the claim right and the defense right related to the civil lending and the contract law in the form of a structured table. The structured table contains the contents of the claim right, the claim right element, the defense right, the defense right interpretation, the defense right element and the relevant law articles, wherein the format of the structured table is shown in Table 1. For example, the claim right 1 includes the law article content 1, the law article content 2 and the law article content 3, the law article content corresponds to the claim right element, the law article content 1 corresponds to the claim right element 1, the law article content 2 corresponds to the claim right element 2, and the law article content 3 corresponds to the claim right element 3. Each claim right element has a corresponding defense right, such as the claim right element 1 corresponding to the defense right 1, the claim right element 2 corresponding to the defense right 2, and the claim right element 3 corresponding to the defense right 3. Each defense right has a corresponding defense right interpretation, law article content and defense right element. For example, the defense right 1 corresponds to the defense right 1 interpretation, the law article content A and the defense element 1, the defense right 2 corresponds to the defense right 2 interpretation, the law article content B and the defense element 2, and the defense right 3 corresponds to the defense right 3 interpretation, the law article content C and the defense element 3.
[0067] Table 1
[0068]
[0069] In one specific embodiment, the structured table is the basis of the reasoning process, which provides clear claim right, defense right, defense right interpretation, corresponding claim right element and defense right element, and relevant law article content for legal reasoning, thereby providing legal reference and judgment for large language model in the reasoning process.
[0070] In the embodiment, after receiving the case fact content input by the user, the large language model extracts the target claim right and the target claim right element associated with the case fact content, and the target defense right and the target defense right element associated with the target claim right according to the preset table, thereby determining the thinking map corresponding to the case fact content, so as to continue the next step of reasoning.
[0071] S13, generating legal reasoning thinking chain data corresponding to the case fact content according to the thinking map and the interpretation of the target defense right in the preset table, wherein the thinking chain data includes a thinking chain and a recommended defense right.
[0072] In the embodiment, the thinking map generated in the foregoing is taken as an input of the large language model, and the interpretation of the defense right in the preset table is added to prompt the large language model to generate the recommended defense right. In a specific example, the process of thinking of the large language model, that is, reasoning content, can be required to be placed between <think>< / think> tags, and then a most possible defense content is generated for the original claim and placed between <answer> < / answer> tags. The original claim refers to the case fact content, and the most possible defense content refers to the recommended defense right.
[0073] In the embodiment, in order to realize high-quality legal reasoning, the preset table is constructed by the corresponding relationship among the claim right, the claim right requirement, the defense right and the defense right requirement, as a basis for the legal reasoning process, so that the thinking chain data generated subsequently has logicality and correctness; the thinking map corresponding to the case fact content is determined according to the preset table, and the thinking chain and the recommended defense right corresponding to the case fact content are generated according to the thinking map and the interpretation of the target defense right in the preset table, so that the high-quality legal reasoning thinking chain data with the thinking chain and the question and answer is obtained, and the acquisition of the high-quality legal reasoning thinking chain data is realized. Especially in the fields of complex civil lending, contract law and the like, the large language model in the embodiment can not only give the recommended defense right, but also has a clear thinking chain, and ensures that each step of the reasoning process conforms to the legal logic.
[0074] In an optional implementation manner, as shown in Figure 2 , the step S12 specifically includes:
[0075] S121, in response to the case fact content satisfying all claim right requirements corresponding to the target claim right, acquiring a target defense right associated with the target claim right.
[0076] In the implementation manner, the large language model can determine whether the target claim right is established by judging whether the case fact content satisfies all claim right requirements corresponding to the target claim right. If the case fact content does not satisfy all claim right requirements corresponding to the target claim right, it indicates that the target claim right is not established, and the current reasoning is interrupted. If the case fact content satisfies all claim right requirements corresponding to the target claim right, a target defense right associated with the target claim right is acquired according to the preset table.
[0077] S122, extract a corresponding fact segment as a target claim element from the case fact content according to the claim element corresponding to the target claim right, and extract a corresponding fact segment as a target defense element from the case fact content according to the defense element corresponding to the target defense right.
[0078] In the embodiment, the large language model can extract relevant fact segments as the content of the target claim element from the case fact content, and extract relevant fact segments as the content of the target defense element from the case fact content.
[0079] S123, generate the thinking map according to the target claim right, the target claim element, the target defense right and the target defense element.
[0080] In one specific example, the content format of the generated thinking map is as follows:
[0081] {
[0082] "Case fact content": "####"
[0083] "Claim right": "Target claim right",
[0084] "Claim element": {
[0085] "Content of target claim element 1": "Fact segment 1"
[0086] "Content of target claim element 2": "Fact segment 2"
[0087] "Content of target claim element 3": "Fact segment 3" ...
[0089] }
[0090] "Defense right": "Target defense right",
[0091] "Defense element": {
[0092] "Content of target defense element 1": "Fact segment A"
[0093] "Content of target defense element 2": "Fact segment B"
[0094] "Content of target defense element 3": "Fact segment C" ...
[0096] }
[0097] }
[0098] Wherein, "####" refers to the specific case fact content, which contains fact segment 1, fact segment 2, fact segment 3, fact segment A, fact segment B and fact segment C.
[0099] Further, in the present embodiment, when the target claim right is established and the corresponding mind map is generated, the process of generating the recommended defense right is entered. In the process of generating the recommended defense right, the recommended defense right is generated according to the generated mind map and the interpretation of the target defense right in the preset table. In a specific implementation process, the process of thinking of the large language model can be placed between the <think>< / think> tags, and then a recommended defense right is generated for the claim of the actual case content and placed between the <answer> < / answer> tags.
[0100] In an optional implementation manner, as shown in Figure 3 , the generating method further includes:
[0101] S14, obtaining supplementary content for the case fact content according to the recommended defense right. In the present embodiment, the supplementary content is used to refute the recommended defense right. Specifically, the corresponding supplementary content can be input by the user, or the supplementary content for the case fact content can be directly called by the large language model.
[0102] S15, verifying whether the recommended defense right satisfies the corresponding defense right requirement according to the supplementary content.
[0103] In the present embodiment, if the recommended defense right verified according to the supplementary content satisfies the corresponding defense right requirement, it means that the current recommended defense right can overturn the establishment of the target claim right. If the recommended defense right verified according to the supplementary content does not satisfy the corresponding defense right requirement, steps S12 and S13 are executed again to generate a multi-step thinking chain, and a complete legal reasoning thinking chain data is gradually constructed.
[0104] In an optional implementation manner, the number of thinking chains is multiple, as shown in Figure 4 , the generating method further includes:
[0105] S16, detecting whether the format of the generated thinking chain meets the requirements.
[0106] S17, outputting the thinking chain with the format meeting the requirements.
[0107] In the present embodiment, by outputting the thinking chain with the format meeting the requirements and eliminating the thinking chain with the format not meeting the requirements, the quality control and screening of the thinking chain are realized, so that a high-quality thinking chain is obtained.
[0108] In one optional implementation, the generation method further includes:
[0109] S18. In response to the fact that the recommended defense is not the defense associated with the target claim in the preset table, the reasoning content of the thought chain is rewritten according to the preset table in terms of legal logic, and the recommended defense is updated based on the rewritten thought chain.
[0110] In this embodiment, a preset table is used to further review the thought chain that meets the format requirements, thereby ensuring that the thought chain obtained based on reasoning and the recommended right of defense comply with legal rules.
[0111] In another specific embodiment, the recommended defense right can also be directly removed from the thought chain corresponding to the defense right associated with the target claim right in the preset table, so as to improve the quality of the thought chain data.
[0112] In one optional implementation, step S18 specifically includes: modifying the legal provisions in the reasoning content of the thought chain that are inconsistent with the target claim and the target defense in the preset table.
[0113] In this implementation, the correctness and consistency of the reasoning steps are ensured by comparing the target claims and defenses in the reasoning content of the thought chain with those in a preset table. This is achieved through a large language model... <think> ...< / think> The reasoning content in the tag is rewritten with legal logic, and legal provisions that are inconsistent with the target claim and the target defense in the reasoning content of the thought chain are modified to ensure that the reasoning process complies with legal rules.
[0114] Furthermore, the modified thought chain data is screened again. Based on indicators such as the consistency of logical sequence, clarity of reasoning path, and accuracy of legal citation in the preset table, the thought chain data is comprehensively screened and optimized to ensure that the generated thought chain data is not only sufficient in quantity but also of high quality, and that the reasoning process is logically clear and complies with legal norms.
[0115] In a specific example Figure 5 This is a partial flowchart of a method for generating legal reasoning thought chain data. Figure 5 As can be seen, Step 1: Obtain a mind map based on the input legal question and the expert knowledge structure table. The legal question represents the facts of the case, and the expert knowledge structure table is the pre-set table. Step 2: Generate the right of defense based on the mind map and the expert knowledge structure table, ultimately generating the corresponding thought chain.
[0116] Figure 6A flowchart for the process of evaluating and screening the generated thought chain data, the generation method comprises:
[0117] S61, correctness and formatting detection is performed on the thought chain data. The thought chain data includes recommended counterclaims and thought chains. The correctness detection includes detecting whether the recommended counterclaims in the thought chain data are the counterclaims associated with the target request right in the preset table.
[0118] S62, the thought chain data that passes the correctness and formatting detection is further integrated and screened according to the expert knowledge structured table, so as to ensure that the output data is high-quality thought chain data.
[0119] S63, the thought chain data that does not pass the correctness and formatting detection is rewritten and optimized according to the expert knowledge structured table. Specifically, the reasoning content in the “ <think> ...< / think> ” label is rewritten by a large language model, the legal rules that are inconsistent with the target request right and the target counterclaim in the preset table are modified in the reasoning content of the thought chain, and the reasoning process is ensured to comply with the legal rules; and the thought chain with incorrect format is optimized in format, and the thought chain with correct format is output; then step S62 is executed again to output high-quality thought chain data, so as to realize the acquisition of high-quality legal reasoning thought chain data.
[0120] Embodiment 2
[0121] Corresponding to the foregoing legal reasoning thought chain data generation method embodiment 1, the disclosure also provides an embodiment of a legal reasoning thought chain data generation system.
[0122] Figure 7 A module schematic diagram of a legal reasoning thought chain data generation system provided in this embodiment is applied to a large language model, and the legal reasoning thought chain data generation system 20 comprises:
[0123] A case acquisition module 201 is configured to acquire case fact content.
[0124] A thought map determination module 202 is configured to determine a thought map corresponding to the case fact content according to a preset table. The preset table is constructed according to the corresponding relationship of request rights, request right requirements, counterclaims, and counterclaim requirements. The thought map includes a target request right and a target request right requirement associated with the case fact content, and a target counterclaim and a target counterclaim requirement associated with the target request right.
[0125] The thought chain data generation module 203 is configured to generate legal reasoning thought chain data corresponding to the case fact content according to the thought map and the interpretation of the target defense right in the preset table, wherein the thought chain data includes a thought chain and a recommended defense right.
[0126] In the embodiment, the preset table is constructed by the correspondence relationship of the claim right, the claim right requirement, the defense right and the defense right requirement, as a basis of the legal reasoning process, so that the subsequently generated thought chain data has logic and correctness; the thought map corresponding to the case fact content is determined according to the preset table, and the thought chain and the recommended defense right corresponding to the case fact content are generated according to the thought map and the interpretation of the target defense right in the preset table, so that the high-quality legal reasoning thought chain data with the thought chain and the question and answer is obtained, and the acquisition of the high-quality legal reasoning thought chain data is realized.
[0127] For the system embodiment, since it basically corresponds to the method embodiment, the related parts can be referred to the part of the method embodiment. The system embodiment described above is only illustrative, wherein the units described as separate components can or can not be physically separated, and the components of the unit can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to the actual needs, some or all of the modules can be selected to achieve the purpose of the present disclosure.
[0128] Embodiment 3
[0129] Figure 8 A structural schematic diagram of an electronic device is shown in the embodiment, which includes a memory, a processor and a computer program stored in the memory and used for running on the processor, and the processor implements the method for generating legal reasoning thought chain data in the embodiment 1 when executing the computer program. Figure 8 The electronic device 80 shown is only an example, and should not bring any limitation to the function and use range of the embodiments of the present disclosure.
[0130] As Figure 8 shown, the electronic device 80 can be in the form of a general computing device, for example, it can be a server device. The components of the electronic device 80 can include but are not limited to the above-mentioned at least one processor 81, the above-mentioned at least one memory 82, the bus 83 connecting different system components including the memory 82 and the processor 81.
[0131] The bus 83 includes a data bus, an address bus and a control bus.
[0132] The memory 82 may include volatile memory, such as random access memory (RAM) 821 and / or cache memory 822, and may further include read-only memory (ROM) 823.
[0133] The memory 82 may also include a program tool 825 (or utility) having a set (at least one) program module 824, such program module 824 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0134] The processor 81 executes various functional applications and data processing by running computer programs stored in the memory 82, such as the method for generating legal reasoning thought chain data provided in Embodiment 1 above.
[0135] Electronic device 80 can also communicate with one or more external devices 84 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 85. Furthermore, electronic device 80 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 86. Figure 8 As shown, network adapter 86 communicates with other modules of electronic device 80 via bus 83. It should be understood that, although... Figure 8 Not shown, it can be used in conjunction with electronic device 80 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0136] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0137] Example 4
[0138] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for generating legal reasoning thought chain data provided in Embodiment 1 above.
[0139] More specifically, the readable storage medium can include, but is not limited to, a portable disc, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0140] Embodiment 5
[0141] The embodiments of the present disclosure further provide a computer program product comprising a computer program which, when executed by a processor, implements the method for generating a legal reasoning thought chain data according to the above-mentioned embodiment 1.
[0142] The program code of the computer program product for executing the present disclosure can be written in any combination of one or more programming languages, and can be executed completely on a user device, partially on a user device, as a separate software package, partially on a user device and partially on a remote device, or completely on a remote device.
[0143] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, and these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. A method for generating legal reasoning thought chain data, characterized in that, The generation method, performed by a large language model, includes the following steps: Obtain the facts of the case; A mind map corresponding to the facts of the case is determined based on a preset table; wherein, the preset table is constructed based on the correspondence between the right to claim, the requirements of the right to claim, the right to defend, and the requirements of the right to defend; and the mind map includes the target right to claim and the requirements of the target right to claim associated with the facts of the case, as well as the target right to defend and the requirements of the target right to defend associated with the target right to claim. Based on the mind map and the interpretation of the target defense in the preset table, legal reasoning mind chain data corresponding to the facts of the case is generated. The mind chain data includes the mind chain and the recommended defense. The step of determining the mind map corresponding to the facts of the case based on the preset table specifically includes: In response to the factual content of the case satisfying all the claim requirements corresponding to the target claim, the target defense associated with the target claim is obtained; Based on the claim requirements corresponding to the target claim, the corresponding factual fragments are extracted from the case facts as the target claim requirements, and based on the defense requirements corresponding to the target defense, the corresponding factual fragments are extracted from the case facts as the target defense requirements. The mind map is generated based on the target claim, the requirements of the target claim, the target defense, and the requirements of the target defense.
2. The method for generating legal reasoning thought chain data as described in claim 1, characterized in that, The generation method further includes: Obtain supplementary information regarding the facts of the case based on the recommended right of defense; Verify, based on the supplementary content, whether the recommended defense meets the corresponding defense requirements.
3. The method for generating legal reasoning thought chain data as described in claim 1, characterized in that, The number of thought chains is multiple, and the generation method further includes: Check if the format of the generated thought chain meets the requirements; Output the thought chain in the required format.
4. The method for generating legal reasoning thought chain data as described in any one of claims 1-3, characterized in that, The generation method further includes: In response to the fact that the recommended defense is not the same as the defense associated with the target claim in the preset table, the reasoning content of the thought chain is rewritten according to the preset table using legal logic, and the recommended defense is updated based on the rewritten thought chain.
5. The method for generating legal reasoning thought chain data as described in claim 4, characterized in that, The step of rewriting the reasoning content of the thought chain based on the preset table using legal logic specifically includes: Modify any legal provisions in the reasoning content of the thought chain that are inconsistent with the target's claim right and the target's defense right in the preset table.
6. A system for generating legal reasoning thought chain data, characterized in that, For performing the method for generating legal reasoning thought chain data as described in claim 1, the system for generating legal reasoning thought chain data includes: The case acquisition module is used to acquire the facts of a case. The mind map determination module is used to determine the mind map corresponding to the case facts based on a preset table; wherein, the preset table is constructed based on the correspondence between the right to claim, the requirements of the right to claim, the right to defend, and the requirements of the right to defend; the mind map includes the target right to claim and the requirements of the target right to claim associated with the case facts, as well as the target right to defend and the requirements of the target right to defend associated with the target right to claim. The thought chain data generation module is used to generate legal reasoning thought chain data corresponding to the case facts based on the thought map and the interpretation of the target defense in the preset table. The thought chain data includes the thought chain and the recommended defense. The mind mapping determination module specifically includes: The acquisition unit is configured to acquire the target defense associated with the target claim in response to the factual content of the case satisfying all the claim requirements corresponding to the target claim. The extraction unit is used to extract corresponding factual fragments from the case facts as target claim elements based on the claim elements corresponding to the target claim, and to extract corresponding factual fragments from the case facts as target defense elements based on the defense elements corresponding to the target defense. The generation unit is used to generate the mind map based on the target claim, the requirements of the target claim, the target defense, and the requirements of the target defense.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the method for generating legal reasoning thought chain data as described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for generating legal reasoning thought chain data as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the method for generating legal reasoning thought chain data as described in any one of claims 1-5.
Citation Information
Patent Citations
Civil affair judgment result prediction method and system based on thinking chain
CN120030141A
Legal element map auxiliary class case recommendation method and device and program product
CN120780850A