A legal analysis and reasoning method, electronic device and storage medium

By breaking down the legal analysis process into legal reasoning, adversarial deduction, and strategy analysis stages, and utilizing a large language model to execute under pre-defined logical constraints, the problem of opaque results in automated legal analysis and reasoning in existing technologies is solved, achieving highly reliable and practical legal analysis results.

CN123180364APending Publication Date: 2026-11-27SHENZHEN DAOFA INTELLIGENT COMPUTING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611430268.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies for automated legal analysis and reasoning lack practicality, have opaque analysis processes, incomplete reasoning chains, and are unable to effectively solve complex problems in legal practice.

Method used

The legal analysis process is broken down into three structured stages: legal reasoning, adversarial deduction, and strategy analysis. A large language model is used to execute the process under pre-defined logical constraints, calling the large models for legal reasoning, adversarial deduction, and strategy analysis respectively to form a traceable reasoning path.

Benefits of technology

It enhances the reliability and practicality of automated legal analysis and reasoning, ensures the transparency and traceability of analysis results, avoids information omissions and reasoning blind spots, and generates high-quality, interpretable strategy analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180364A_ABST
    Figure CN123180364A_ABST
Patent Text Reader

Abstract

The application discloses a legal analysis and reasoning method, an electronic device and a storage medium. The method comprises the following steps: obtaining pre-analysis data of a current case, wherein the pre-analysis data of the current case comprises at least one of case facts of the current case, a dispute analysis result, associated case information and a legal rule analysis result; using a legal reasoning logic to constrain a legal reasoning large model to perform legal reasoning based on the pre-analysis data, and obtaining a reasoning analysis result of the current case; using a multi-role confrontation reasoning logic to constrain a confrontation reasoning large model to perform confrontation reasoning based on the pre-analysis data and the reasoning analysis result, and obtaining a reasoning result; and using a strategy analysis logic to constrain a strategy analysis large model to perform strategy analysis based on the pre-analysis data, the reasoning analysis result and the reasoning result, and obtaining a strategy analysis result. The above scheme can improve the practicality of automatic legal analysis and reasoning results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of legal data analysis and processing, and in particular to a legal analysis and reasoning method, electronic device, and storage medium. Background Technology

[0002] When handling legal cases, lawyers or legal professionals need to conduct comprehensive analysis and reasoning from multiple perspectives. This process usually relies on the practitioner's professional knowledge and experience, and is characterized by strong subjectivity and low efficiency.

[0003] With the development of artificial intelligence technology, automated legal analysis and reasoning based on large language models has become possible. However, directly inputting case descriptions into the model often leads to an opaque analysis process, incomplete reasoning chains, and limited practicality in the generated analysis results, failing to effectively solve complex problems encountered in legal practice. Summary of the Invention

[0004] This application provides at least one legal analysis and reasoning method, electronic device, and storage medium to address the problem that the results of automated legal analysis and reasoning in the prior art are not very practical.

[0005] This application provides a legal analysis and reasoning method, comprising: acquiring pre-analysis data of the current case, wherein the pre-analysis data of the current case includes at least one of the facts of the current case, dispute analysis results, related case information, and legal rule analysis results; using legal reasoning logic to constrain a large-scale legal reasoning model to perform legal reasoning based on the pre-analysis data, thereby obtaining the reasoning analysis results of the current case; using multi-role adversarial deduction logic to constrain an adversarial deduction model to perform adversarial deduction based on the pre-analysis data and reasoning analysis results, thereby obtaining deduction results; and using strategy analysis logic to constrain a large-scale strategy analysis model to perform strategy analysis based on the pre-analysis data, reasoning analysis results, and deduction results, thereby obtaining strategy analysis results.

[0006] This application provides an electronic device, including a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement any of the methods described above.

[0007] This application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement any of the methods described above.

[0008] In the above scheme, the legal analysis process is decomposed into three structured stages: legal reasoning, adversarial deduction, and strategy analysis. Each stage is executed by calling a dedicated large model under the constraints of predetermined logic, so that the entire legal analysis process has a traceable reasoning path, thereby improving the reliability of automated analysis and reasoning and enhancing the practicality of the analysis results.

[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0011] Figure 1 This is a flowchart illustrating an embodiment of the legal analysis and reasoning method of this application; Figure 2 This is a schematic diagram of the framework of an embodiment of the electronic device of this application; Figure 3 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0012] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0013] In the following description, specific details such as particular subsystem structures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0014] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0015] See Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the legal analysis and reasoning method of this application. This embodiment can be applied to scenarios such as legal consultation, litigation assistance, intelligent contract review service platforms, or internal corporate legal systems. The legal analysis and reasoning method provided in this embodiment can run on a specific device. Users can use their terminal devices to run front-end programs to interact with the running device, sending text, files, etc., to the running device. Users can also view the content obtained and sent to the terminal device by the legal analysis and reasoning method executed by the running device on the front-end program running on the terminal device.

[0016] Specifically, the method may include: Step S110: Obtain the pre-analysis data for the current case.

[0017] The current case refers to a legal case that requires analysis and reasoning. Pre-analysis data can be data obtained through prior analysis of the current case.

[0018] The pre-analysis data for the current case includes at least one of the following: the facts of the current case, the results of the dispute analysis, information on related cases, and the results of the legal rule analysis.

[0019] In some implementation scenarios, the pre-analysis data for the current case includes the facts of the current case, the results of dispute analysis, information on related cases, and the results of legal rule analysis.

[0020] Among them, the case facts refer to the facts of the current case, the dispute analysis results include the points of contention in the current case, the related case information includes information on related cases that can be referenced in the current case, and the legal rule analysis results can represent the results of the analysis of the relevant legal rules in the current case.

[0021] The analysis and reasoning methods provided in this application embodiment may include sequentially executed steps of legal reasoning, adversarial deduction, and strategy analysis. Legal reasoning focuses on analyzing the applicable law and facts of the current case, and deriving conclusions based on these. Adversarial deduction focuses on deducing the opinions of multiple different positions on the current case, primarily reflecting the adversarial clashes between these positions. Strategy analysis focuses on analyzing the action directions and means that the user can adopt, directly providing the user with easy-to-use action guidelines.

[0022] Multiple analytical and reasoning steps are logically connected and coordinated, and the conclusions of earlier steps can serve as references for later steps, which can improve the reliability and practicality of the analytical steps. For example, confrontations from different perspectives can provide analytical opinions from other positions. When analyzing strategies, combining the analytical opinions from other positions makes the final strategic considerations more complete, avoids the situation where the strategy has loopholes from other positions, and improves the practicality of the analysis.

[0023] Step S120: Utilize legal reasoning logic to constrain the large-scale legal reasoning model to perform legal reasoning based on pre-analyzed data, and obtain the reasoning analysis results of the current case.

[0024] Step S130: Using the multi-role adversarial deduction logic constraint adversarial deduction large model, adversarial deduction is performed based on pre-analysis data and reasoning analysis results to obtain the deduction results.

[0025] Step S140: Using the strategy analysis logic constraint, the large-scale strategy analysis model performs strategy analysis based on the pre-analysis data, reasoning analysis results, and deduction results to obtain the strategy analysis results.

[0026] It should be noted that the steps of legal reasoning, adversarial deduction, and strategy analysis can be implemented using a large model. Different steps can use the same large model or different large models.

[0027] Among these, the large models mentioned above can be Large Language Models (LLMs), which are deep learning models trained on massive amounts of text data and capable of understanding natural language and generating text. The specific model used can be adjusted according to the actual application needs, such as selecting a model based on inference difficulty and resource consumption. For example, models such as the Tongyi 1000 Questions Large Model, GPT, and LLaMA can be selected.

[0028] The model inputs differ for each step, and each step is configured with corresponding reasoning and analysis logic to guide and constrain the reasoning and output of the large model at that step.

[0029] The legal reasoning model performs legal reasoning according to legal reasoning logic to obtain the reasoning analysis results of the current case. The adversarial deduction model performs adversarial deduction according to multi-role adversarial deduction logic to obtain the deduction results. The strategy analysis model performs strategy analysis according to strategy analysis logic to obtain the strategy analysis results.

[0030] In some embodiments, the dispute analysis results include several points of contention.

[0031] In some embodiments, the legal rule analysis results include several relevant laws.

[0032] In some embodiments, the related case information includes information on several related cases, and the information on a single related case may specifically include at least one of the cause of action and the main points of the judgment.

[0033] In some embodiments, the legal reasoning logic may include individual analysis rules, focus analysis rules, and analysis summary rules. Individual analysis rules can be used to instruct the overall legal reasoning model to analyze each point of contention separately. Focus analysis rules can specify how to analyze a single point of contention. Analysis summary rules can specify how to analyze the current case as a whole.

[0034] Furthermore, the focus analysis rule can be used to instruct the legal reasoning model on the applicable law, reference cases, factual application, and reasoning conclusions of the focus of the dispute, while the analysis and summary rule can be used to instruct the legal reasoning model on the overall conclusions and risk levels of the current case.

[0035] In some implementation scenarios, legal reasoning logic is used to constrain the large-scale legal reasoning model to perform legal reasoning based on pre-analyzed data, resulting in the following reasoning analysis results for the current case: The legal reasoning model is invoked to analyze the applicable law, reference cases, factual application, and reasoning conclusions for each point of contention; as well as the overall conclusion and risk level of the current case.

[0036] The analysis of the applicable law, reference cases, factual application, and reasoning conclusions regarding the focus of the dispute may include: selecting the applicable law for the focus of the dispute from several relevant laws; selecting reference cases for the focus of the dispute from several related cases; and reasoning the application of facts based on the facts of the case and the key points of the judgments in the reference cases. Furthermore, it may also include reasoning conclusions based on the application of facts to analyze the focus of the dispute.

[0037] Among them, referable cases are those that are related to the current focus of the dispute. For example, when selecting referable cases, one can consider whether the related cases have similar or identical points of dispute to the current focus of the dispute. If so, they can be selected as referable cases.

[0038] When applying the facts in reasoning, since there are already similar or consistent points of fact in the referenced cases, and the main points of the judgments reflect this content, the application of the facts of the dispute in this case can be based on the facts of this case combined with the application of similar or consistent points of fact in the referenced cases.

[0039] In analyzing and reasoning to reach a conclusion, one is essentially applying the facts to arrive at the final legal judgment on the point of contention, such as whether an infringement or breach of contract has occurred. This conclusion must be drawn based on the application of facts; without using the facts of this case, it is impossible to deduce a conclusion.

[0040] Understandably, the specific logic of the above selection of reference cases, application of reasoning facts, and analysis of reasoning conclusions can be configured in the legal reasoning logic to constrain the model's reasoning steps and logic, instructing the model to execute according to the configured steps and logic, thereby improving the reliability and practicality of the model's output.

[0041] In this embodiment of the method, multiple rules work together to break down complex case analysis tasks into independent, standardized analyses of each point of contention. By forcing the model to follow the path of "point of contention-rule-application-conclusion," jumps in the reasoning process and omissions of information are avoided. This allows even cases with multiple complex points of contention to generate clearly structured analytical units for each point of contention. Furthermore, this approach can ensure the completeness and traceability of legal reasoning.

[0042] In a specific application scenario, regarding the controversial issue of "whether the defendant has committed a fundamental breach of contract," the reasoning analysis results output by the legal reasoning model may include: the applicable law being Articles 509 and 563 of the Contract Law section of the Civil Code; a relevant case being Case No. (2022) Jing 0105 Min Chu 12345 (Judgment summary: delayed performance of a major debt after being urged constitutes a fundamental breach of contract); the factual application being "in this case, the defendant failed to pay the purchase price within the agreed period, and still failed to perform after being urged by the plaintiff, which meets the constituent elements of a fundamental breach of contract"; and the reasoning conclusion being "the defendant's behavior constitutes a fundamental breach of contract, and the plaintiff has the right to terminate the contract and claim compensation for losses."

[0043] By providing a constrained "legal library" and "case library" for the large-scale legal reasoning model, its information sources are limited, preventing the model from arbitrarily searching for or fabricating legal provisions and case numbers from a broad pool of general knowledge. The model is forced to "select" rather than "create" from a defined list, which significantly reduces the risk of errors in legal citation and ensures the jurisprudential rigor of the analytical conclusions. Furthermore, combining the above principles, this approach can significantly suppress the generation of factual illusions in the model.

[0044] In some implementation scenarios, legal reasoning logic may include analyzing each point of contention separately, listing the applicable laws, regulations and provisions, listing the case number and the main points of the judgment if there are available reference cases that are relevant to the case, leaving the string blank if there are no relevant cases, finding the judgment logic that supports the client's claims from the reference cases, and citing the main points of the judgment in factual application.

[0045] In some embodiments, the analysis and summary rules include several risk levels and risk level descriptions for each risk level. Clients at different risk levels have different probabilities of winning. The analysis of the overall conclusion and risk level of the current case includes: based on the risk level descriptions of all risk levels, selecting the risk level descriptions whose meaning matches that of the current case, and taking the corresponding risk level as the risk level of the current case.

[0046] The risk level description describes the degree of risk at the corresponding level. This risk level description allows the model to understand and distinguish different risk levels, thereby improving the accuracy of the risk level classification for the current case.

[0047] In some implementation scenarios, risk levels can be categorized as high, medium, and low. High-risk levels include missing key evidence, unfavorable legal relationships for the client, strong counterarguments from the opposing party, and a high risk of the client losing the case. Medium-risk levels include some uncertainty, with the outcome of the case depending on the validity of the evidence or the judge's discretion. Low-risk levels include clear facts, sufficient evidence, a well-defined legal relationship, and a high probability of the client winning the case.

[0048] By pre-defining risk categories and their descriptions, vague risk perceptions are transformed into standardized classification tasks. The legal reasoning model matches the overall pattern of a case with pre-defined risk characteristics, thereby arriving at a qualitative rather than quantitative risk assessment conclusion. This approach makes the risk assessment process more objective and consistent, while avoiding making unfulfilled numerical promises.

[0049] The analysis and summary rules can clearly define the criteria for determining the risk level and prohibit the model from outputting any percentage figures or specific compensation amounts.

[0050] In some embodiments, the multi-role adversarial deduction logic includes individual deduction rules, focus deduction rules, and deduction summary rules. Individual deduction rules are used to instruct the adversarial deduction model to perform a round of deduction for each point of contention. Focus deduction rules are used to instruct the model how to perform a round of deduction for a single point of contention. Deduction summary rules are used to instruct the model to summarize the current case.

[0051] Furthermore, the focus deduction rules are used to instruct the adversarial deduction model to generate legal opinions on the points of contention from multiple pre-defined roles according to the focus deduction rules. These pre-defined roles include neutral and non-neutral roles.

[0052] Furthermore, the deduction summary rules are used to instruct the adversarial deduction model to summarize and analyze the current case from a neutral perspective.

[0053] In some embodiments, the adversarial deduction model is constrained by multi-role adversarial deduction logic to perform adversarial deduction based on pre-analyzed data and reasoning analysis results. The deduction results include: calling the adversarial deduction model to perform a round of deduction for each point of contention; generating legal opinions of each preset role on the point of contention in each round of deduction; and analyzing the legal principles of the current case from the perspective of a neutral role based on all rounds of deduction, as well as analyzing the industry practices of the current case.

[0054] In some embodiments, the multi-role adversarial deduction logic also includes a role definition for each preset role. The role definition for a non-neutral role includes the legal opinion of the non-neutral role indicating that the current case is favorable to the non-neutral role on the issue of dispute. The role definition for a neutral role includes the legal opinion of the neutral role containing an analysis of the legal opinions of the non-neutral role.

[0055] In some embodiments, non-neutral roles include our role and at least one opposing role.

[0056] In some implementation scenarios, adversarial scenarios can be configured with three pre-defined roles: our lawyer, the opposing lawyer, and the judge. The first two are non-neutral roles, while the last is a neutral role. For example, the role of our lawyer can be defined as requiring all analysis to be based on protecting our interests, defending our legitimate rights, and providing legal opinions favorable to our side in a round of adversarial scenarios. The role of the judge can be defined as requiring a neutral adjudicative perspective, providing neutral legal commentary in legal deliberation scenarios, specifically including providing independent analysis of each lawyer's opinion.

[0057] In analyzing the legal principles and industry practices of current cases, a neutral perspective can be adopted to help users understand the judge's possible reasoning. Furthermore, when analyzing industry practices, reference cases can be consulted.

[0058] In some embodiments, the focus deduction rules include sub-deduction rules for each preset role, which are used to instruct the large model how to generate a legal opinion for a certain role in a round of deduction.

[0059] The adversarial sub-deduction rules can be used by the adversarial deduction model to analyze the opposing side's arguments in the current case and generate unfavorable legal opinions based on these arguments. These arguments can include evidentiary loopholes, logical flaws, and weak probative value. The sub-deduction rules can be configured with various categories of arguments to instruct the model to identify whether these categories of arguments exist in the current case.

[0060] Among them, the sub-deduction rules of our role can be used to instruct the adversarial deduction model to generate legal opinions favorable to our role by utilizing information from related cases.

[0061] Among them, the sub-deduction rules for neutral roles can be used to instruct the adversarial deduction model to generate legal opinions on non-neutral roles in this round of deduction using information from related cases.

[0062] Both our side and the neutral side can directly reference relevant case information to generate corresponding opinions, thereby making their opinions more reliable, comprehensive, and referential.

[0063] In some implementation scenarios, the sub-deduction rules of the opposing role can also be used to instruct the adversarial deduction model to generate legal opinions on the current round of deduction using information from related cases, so that all parties can cite related cases as a basis, enhance the adversarial nature of the disputed issues, and make the final analysis results more referential.

[0064] In some implementation scenarios, the multi-role adversarial logic can include: you simultaneously play three roles: the opposing / defendant's lawyer, your / plaintiff's lawyer, and the judge (neutral adjudicator).

[0065] In some implementation scenarios, the multi-role adversarial deduction logic may include: one-to-one correspondence of the points of contention, conducting a corresponding number of rounds of adversarial confrontation, our lawyer puts forward an opinion favorable to our side for each point of contention, the opposing lawyer puts forward an objection attacking our position for each point of contention, the judge provides neutral legal commentary, and gives independent analysis for our side's opinion and the opposing lawyer's objection.

[0066] More refined sub-deduction rules set unique thinking templates and action guidelines for each role, specifying "how to think" and "where to find arguments." This differentiated rule design makes the adversarial process closer to real courtroom or arbitration scenarios, ensuring that the debate revolves around valid arguments and evidence. Furthermore, this approach can bring the beneficial effect of making the generated deduction content more targeted, practical, and defensible.

[0067] In this embodiment of the method, multiple rules collectively construct a structured simulated courtroom environment. Multiple rounds of debate are conducted, using "points of contention" as the unit of argument and "preset roles" as the main participants. By having different roles examine the same issue back-to-back in each round, the model is forced to explore arguments from different perspectives. These diverse opinions are ultimately absorbed by the deductive summary rules, and then refined by a neutral role to extract deeper legal principles and industry practices, achieving a closed loop from "adversarial" to "summarization." This approach can effectively expose blind spots in reasoning and improve the robustness and self-consistency of analytical conclusions in complex legal environments.

[0068] Understandably, the specific logic of the above analysis can be configured in the multi-role adversarial reasoning logic to constrain model inference.

[0069] In a specific application scenario, regarding the same point of contention, a round of adversarial deduction can yield the following output: Our lawyer's opinion is, "The defendant's delayed payment, despite being urged to pay, constitutes a fundamental breach of contract, and the plaintiff has the right to terminate the contract and claim compensation for actual losses." The opposing lawyer's opinion is, "The defendant's failure to pay on time is due to quality defects in the goods delivered by the plaintiff; the defendant has the right to raise the defense of prior performance and does not constitute a fundamental breach of contract." The judge's neutral comment is, "The core of the dispute lies in whether the goods have quality defects. If the defendant can provide a valid quality inspection report or correspondence between the parties to prove the quality objection, then its defense may be valid; otherwise, it should be considered a fundamental breach of contract." After completing the adversarial deduction of all points of contention, the neutral role can generate a summary, such as: "The main dispute in this case is whether a breach of contract has occurred and how to determine the amount of compensation. From an evidentiary perspective, the plaintiff has preliminarily proven the establishment of the contract, the existence of the payment obligation, and the fact of the urging, and the chain of evidence is relatively complete; the defendant's claim of a quality defense lacks written evidence support, and the risk is high. In summary, this case is more favorable to our side in terms of the establishment of a breach of contract, but the amount of compensation requires further supplementary evidence of losses." In some embodiments, the strategy analysis logic is used to constrain the strategy analysis big model to perform strategy analysis based on pre-analysis data, reasoning analysis results, and deduction results. The resulting strategy analysis results include: calling the strategy analysis big model to generate at least one of the following: current situation, essential judgment, strategic choice, risk prediction, action route, and evidence list, as the strategy analysis results.

[0070] The strategy analysis logic can be used to instruct the large-scale strategy analysis model to perform strategy analysis according to this logic to obtain strategy analysis results. This approach directly provides users with a complete, actionable framework, from macro-level judgment to micro-level operations, resulting in more practical output.

[0071] The current situation describes the current stage of the trial of the target case and the primary point of contention at this stage; the essential judgment includes the judgment conclusion, the established facts, and the matters to be determined; the strategic choice includes the strategic direction, triggering conditions, strategic means, follow-up means, and reversibility; the risk prediction includes risk items, risk sources, adverse consequences, and countermeasures; the action plan includes several action plans arranged in sequence, each action plan including executable actions and the reasons for choosing that action; the evidence list includes the name, status, and purpose of each piece of related evidence.

[0072] The strategy analysis logic includes field logic for each output field. This field logic instructs the overall strategy analysis model to generate the corresponding field content according to the logic, collectively forming the complete strategy analysis result. The field logic corresponding to the current situation requires first determining the stage of the case based on the current stage identification results, then filtering out the key categories for the current stage from multiple key categories, and finally identifying the primary point of contention for the target case within that key category.

[0073] The essential judgment requires the following logical requirements: extract the established facts based on the facts of the case; analyze the apparent contradictions and substantive contradictions of the target case from the perspective of the primary point of contention; extract the matters to be determined based on the pre-analysis data; and further analyze the defense application methods, corresponding remedies, and directions for evidence reinforcement for the matters to be determined.

[0074] The logical requirements for the fields corresponding to strategic selection are as follows: first, generate the category of positive legal behavior as the strategic direction; then, extract the triggering conditions of the strategic direction based on the facts of the case; analyze the corresponding strategic means under the strategic direction based on the reasoning analysis results; then, generate the follow-up means corresponding to the strategic means based on the deduction results; and finally, analyze the reversibility of the strategic direction.

[0075] The field logic requirements for risk prediction are as follows: extract risk items from the pre-analysis data, mark the original data used to extract the risk items in the pre-analysis data as the risk source, analyze the adverse consequences that the risk items will actually cause after they occur, and then analyze the corresponding countermeasures for the risk items in combination with the determined strategic choices.

[0076] The logical requirements of the fields corresponding to the action route are to generate multiple executable actions in chronological order of their executable time, and to analyze the rationale for executing the actions in this order.

[0077] The logical requirements for the fields corresponding to the evidence list are as follows: list the relevant evidence for the target case one by one, determine the status of each piece of evidence as existing, partially existing, or to be supplemented, and analyze the purpose of each piece of evidence.

[0078] The process involves multiple stages, including first instance, second instance, enforcement, and retrial. Key categories for the first instance include case filing, jurisdiction, evidence organization, and factual assertions. Key categories for the second instance include grounds for appeal, errors in the application of law, procedural violations, new evidence, and the possibility of reversal / remand. Key categories for enforcement include limitation of liability, exclusion of assets, objections to enforcement, settlement conditions, and performance plans. Key categories for retrial include grounds for retrial, new evidence, errors in the application of law, and procedural violations.

[0079] Determining the current stage based on the current stage identification result includes: if the current stage identification result is first instance, second instance, execution, or retrial, the current stage identification result shall be used as the current stage; if the current stage identification result is pending confirmation, each stage among multiple stages shall be used as the current stage.

[0080] In some cases, the strategy analysis logic also includes a rule prohibiting numerical commitments, which is used to indicate that the control results of the large model in the strategy analysis do not contain target numerical content.

[0081] In some cases, the strategy analysis logic also includes case restriction rules, which are used to instruct the strategy judgment model to select target case data from related case data for generating analysis and strategy recommendations.

[0082] In some cases, the strategy analysis logic also includes legal constraint rules, which are used to instruct the strategy judgment model to select legal provisions from available legal provisions for generating analysis and strategy recommendations.

[0083] In some cases, strategy analysis logic also includes position constraint rules, which are used to instruct the strategy analysis model to generate results that conform to a predetermined position.

[0084] This method breaks down complex legal analysis tasks into four core stages: acquiring pre-analysis data, legal reasoning, adversarial deduction, and strategy analysis. It utilizes different specialized large-scale models operating under pre-defined logical constraints, forming an enhanced "analysis-verification-decision" workflow. This workflow addresses the problems of opaque analysis processes, lack of risk verification, and unclear conclusions in existing technologies involving single large-scale model calls. Adversarial deduction acts as a "stress test" for the reasoning conclusions, proactively identifying weaknesses in the reasoning chain by simulating adversarial roles, thus improving the robustness of the conclusions. This step-by-step, model-based, and rule-based collaborative approach achieves the technical effect of outputting high-quality, interpretable, and clearly defined strategy analysis results, enhancing the practicality of the strategy analysis results.

[0085] In a specific application scenario, the legal reasoning model, based on legal reasoning logic, analyzes the applicable law, the key points of judgments in related cases, and the facts of the case, focusing on the central issue of whether the defendant has committed a fundamental breach of contract, and arrives at a preliminary legal reasoning conclusion. Next, the adversarial reasoning model simulates the roles of both the client's lawyer and the opposing lawyer, presenting legal opinions. For example, the opposing lawyer might question whether the client's evidence chain lacks crucial evidence regarding the "contractually agreed payment period," generating legal opinions unfavorable to the client based on this objection. Simultaneously, a judge is simulated to provide a neutral commentary on these opinions. Finally, the strategy analysis model synthesizes all the above analyses, generating a final report. This report not only includes legal analysis but also, from the client's perspective, provides specific action suggestions and risk warnings, such as "immediately supplement and solidify evidence regarding the contractual payment period."

[0086] See Figure 2 , Figure 2 This is a schematic diagram of the framework of an embodiment of the electronic device of this application.

[0087] The electronic device 20 includes a memory 21 and a processor 22. The processor 22 is used to execute program instructions stored in the memory 21 to implement the steps in any of the above-described legal analysis and reasoning method embodiments. In a specific implementation scenario, the electronic device 20 may include, but is not limited to, computer equipment, electrical equipment, microcomputers, desktop computers, and servers. In addition, the electronic device 20 may also include mobile devices such as laptops and tablets, which are not limited here.

[0088] Specifically, processor 22 controls itself and memory 21 to implement the steps in any of the above-described legal analysis and reasoning method embodiments. Processor 22 may also be referred to as a CPU (Central Processing Unit). Processor 22 may be an integrated circuit chip with signal processing capabilities. Processor 22 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 22 may be implemented using integrated circuit chips.

[0089] See Figure 3 , Figure 3This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application.

[0090] The computer-readable storage medium 30 provided in this embodiment stores program instructions 31 that can be executed by a processor. When the program instructions 31 are executed by the processor, they are used to implement the steps in any of the above-described legal analysis and reasoning method embodiments.

[0091] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0092] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another subsystem, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0093] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a server, network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A legal analysis and reasoning method, characterized in that, The method includes: Obtain pre-analysis data for the current case, wherein the pre-analysis data for the current case includes at least one of the following: case facts, dispute analysis results, related case information, and legal rule analysis results. Using legal reasoning logic to constrain the legal reasoning model, legal reasoning is performed based on the pre-analyzed data to obtain the reasoning analysis results of the current case; The adversarial deduction model, which utilizes multi-role adversarial deduction logic constraints, performs adversarial deduction based on the pre-analysis data and the reasoning analysis results to obtain the deduction results; The strategy analysis model is constrained by the strategy analysis logic to perform strategy analysis based on the pre-analysis data, the inference analysis results, and the deduction results, and thus obtain the strategy analysis results.

2. The method according to claim 1, characterized in that, The dispute analysis results include several points of contention, and the legal reasoning logic includes individual analysis rules, point-of-contention analysis rules, and analysis summary rules. The individual analysis rules are used to instruct the legal reasoning model to analyze each point of contention separately. The point-of-contention analysis rules are used to instruct the legal reasoning model to analyze the applicable law, reference cases, factual application, and reasoning conclusions of the point of contention. The analysis summary rules are used to instruct the legal reasoning model to analyze the overall conclusion and risk level of the current case. The legal reasoning model, which utilizes legal reasoning logic to constrain legal reasoning, performs legal reasoning based on the pre-analyzed data to obtain the reasoning analysis results for the current case, including: The legal reasoning model is invoked to analyze the applicable law, reference cases, factual application, and reasoning conclusions for each of the aforementioned points of contention. And analyze the overall conclusions and risk level of the current case.

3. The method according to claim 2, characterized in that, The legal rule analysis results include several relevant laws, and the related case information includes several related cases and corresponding judgments. The analysis of the applicable law, relevant cases, factual application, and reasoning conclusions regarding the points of contention include: The process involves selecting the applicable law for the point of contention from the aforementioned related laws, selecting the referable case for the point of contention from the aforementioned related cases, reasoning the application of the facts based on the facts of the case and the key points of the judgments in the referable case, and analyzing the reasoning conclusions for the point of contention based on the application of the facts. The analysis and summary rules include several risk levels and a risk level description for each risk level. Clients at different risk levels have different probabilities of winning. The overall conclusion and risk level of the current case analysis include: Based on the risk level descriptions of all the aforementioned risk levels, the risk level description that matches the meaning of the current case is selected, and the corresponding risk level is taken as the risk level of the current case.

4. The method according to claim 3, characterized in that, The risk levels are categorized as high, medium, and low. High risk includes missing key evidence, unfavorable legal relationships for the client, strong counterarguments from the opposing party, and a high risk of the client losing. Medium risk includes some uncertainty, with the outcome depending on the validity of the evidence or the judge's discretion. Low risk includes clear facts, sufficient evidence, and a well-defined legal relationship, with a high probability of the client winning.

5. The method according to claim 1, characterized in that, The dispute analysis results include several points of contention. The multi-role adversarial deduction logic includes individual deduction rules, focus deduction rules, and deduction summary rules. The individual deduction rules instruct the adversarial deduction model to perform a round of deduction for each point of contention. The focus deduction rules instruct the adversarial deduction model to generate legal opinions from multiple preset roles regarding the points of contention according to the focus deduction rules. The deduction summary rules instruct the adversarial deduction model to summarize and analyze the current case from a neutral role. The multiple preset roles include neutral roles and non-neutral roles. The adversarial deduction model utilizing multi-role adversarial deduction logic constraints performs adversarial deduction based on the pre-analysis data and the inference analysis results, yielding deduction results including: The adversarial simulation model is invoked to perform a simulation for each of the disputed issues. In each simulation, legal opinions of each preset role on the disputed issues are generated. From the perspective of the neutral role, the legal principles of the current case are analyzed based on all simulations, and the industry practices of the current case are also analyzed.

6. The method according to claim 5, characterized in that, The multi-role adversarial deduction logic also includes the role definitions of each of the preset roles. The role definition of the non-neutral role includes the legal opinion of the non-neutral role indicating that the current case is favorable to the non-neutral role on the issue of dispute. The role definition of the neutral role includes the legal opinion of the neutral role containing an analysis of the legal opinion of the non-neutral role.

7. The method according to claim 6, characterized in that, The non-neutral roles include our role and at least one opposing role; the focus deduction rules include sub-deduction rules for each of the preset roles, and the opposing role's sub-deduction rules are used to instruct the adversarial deduction model to analyze the argument doubts of our role in the current case, and generate legal opinions unfavorable to our role based on the argument doubts; The sub-deduction rules for our role are used to instruct the adversarial deduction model to generate legal opinions favorable to our role using the related case information; The sub-deduction rules for the neutral role are used to instruct the adversarial deduction model to generate legal opinions for the non-neutral role using the related case information.

8. The method according to claim 1, characterized in that, The strategy analysis model, which utilizes strategy analysis logic constraints, performs strategy analysis based on the pre-analysis data, the inference analysis results, and the deduction results. The resulting strategy analysis results include: The strategy analysis model is invoked to generate at least one of the following: current situation, essential judgment, strategic choice, risk prediction, action plan, and evidence list, as the result of the strategy analysis.

9. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores program instructions that, when executed by the processor, implement the method of any one of claims 1 to 8.

10. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the method of any one of claims 1 to 8.