Legal consultation generation method, electronic device, and medium

CN122928560APending Publication Date: 2026-10-16SHANGHAI GOLDEN BRIDGE INFOTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611075339.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-10-16

AI Technical Summary

Benefits of technology

[0015]In the above technical solution, by utilizing all case features of case information to obtain a set of similar cases, the limitations of searching for a single cause of action or litigation claim can be overcome, achieving high-precision, fine-grained similar case matching. This allows for more accurate identification of past precedents highly similar to the current case, providing a more accurate basis for subsequent analysis. By dynamically generating multiple litigation claim strategies based on case information, the risk assessment and win rate prediction of different litigation claim strategies under the current case information can be automatically evaluated. Furthermore, the optimal litigation claim strategy can be automatically determined based on the risk and win rate of each strategy, realizing an intelligent closed loop of "data collection - intelligent analysis - risk assessment - strategy generation." This elevates the civil litigation risk assessment process from the level of manual experience-based judgment to the level of data-driven intelligent analysis, significantly reducing the reliance on legal expert experience in the assessment process, achieving standardization and automation of the assessment process, and improving the quantitative accuracy of litigation risk assessment and the practical value of litigation decision support. Moreover, this method of encapsulating professional legal assessment capabilities into standardized online intelligent processing can break down the spatial and temporal barriers of high-quality assessment resources, eliminate conclusion biases caused by qualitative differences among different assessment subjects, thereby achieving efficient, standardized, and inclusive litigation risk assessment, and improving the accuracy of legal consultation results and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928560A_ABST
    Figure CN122928560A_ABST
Patent Text Reader

Abstract

The application provides a legal consultation generation method, an electronic device and a medium. The method comprises the following steps: based on the case characteristics of received case information, performing matching in a case library to obtain a case collection, the case information comprising case basic information and a plurality of evidence files; extracting key adjudication rules from the case collection; generating a plurality of different litigation request strategies according to a preset litigation request amount in the case basic information and the plurality of evidence files, each litigation request strategy comprising an alternative litigation request amount and an alternative evidence file set; finding a litigation request strategy with the highest global utility value in the plurality of litigation request strategies as a target litigation request strategy, the global utility value being determined based on a probability of winning, the alternative litigation request amount and a comprehensive risk index, the comprehensive risk index being determined based on the probability of winning, litigation cost and execution risk. The method can improve the quantitative accuracy of litigation risk assessment and the practical value of litigation decision assistance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically to a method for generating legal advice, an electronic device, and a medium. Background Technology

[0002] In the field of modern civil litigation services, scientific and quantitative assessment of litigation risks is not only a key basis for parties' decision-making, but also an important reference for courts and judicial administrative agencies to optimize the allocation of judicial resources. However, existing civil litigation risk assessment technologies mainly rely on traditional expert systems or simple keyword matching engines, which have significant bottlenecks and structural defects in terms of data processing depth, logical rigor, and intelligence level.

[0003] Specifically, on the one hand, current legal consultation assistance typically relies on predefined tags such as cause of action and claims for retrieval, or uses simple scoring tables for manual assistance. This approach fails to delve into the legal semantic logic within unstructured case descriptions (such as complaints, chat logs, and original contracts), resulting in a single-dimensional and unprofessional assessment of litigation strategies. On the other hand, existing technologies, when retrieving similar cases for reference, often rely on coarse-grained cause-of-action matching. However, the retrieved similar cases may differ significantly from the current case in key facts, points of contention, and evidentiary composition, leading to poor relevance of recommended reference cases and impacting the accuracy of case strategy assessment. Furthermore, current technologies often employ a static "input-report" single-scenario model for strategy evaluation, generating a single assessment result based solely on the user-submitted fixed claims and all evidence materials. This fails to proactively generate differentiated alternative litigation strategies or screen for the optimal strategy, severely limiting the system's value in assisting decision-making. In summary, existing civil litigation risk assessment technologies suffer from significant problems, including insufficient semantic understanding depth, low accuracy in similar case retrieval, and a lack of dynamic strategy generation. These bottlenecks severely limit the level of intelligence and application effectiveness of litigation risk assessment.

[0004] In view of this, the present invention is hereby proposed. Summary of the Invention

[0005] The present invention was proposed in view of the above-mentioned problems. According to one aspect of the present invention, a method for generating legal advice is provided, comprising: Based on the case characteristics of the received case information, a matching process is performed in the case database to obtain a set of similar cases. The case information includes basic case information and multiple evidence files. Extract key adjudication rules from the aforementioned set of similar cases; Based on the preset claim amount in the basic case information and the multiple evidence documents, multiple different claim strategies are generated. Each claim strategy includes alternative claim amounts and a set of alternative evidence documents. The alternative claim amounts are generated based on the preset claim amount and the minimum claim amount. The set of alternative evidence documents includes at least some of the evidence documents among the multiple evidence documents. Among the multiple litigation claim strategies, the litigation claim strategy with the highest global utility value is selected as the target litigation claim strategy. The global utility value of each litigation claim strategy is determined based on the probability of winning the litigation claim strategy, the amount of the alternative litigation claim strategy, and the comprehensive risk index of the litigation claim strategy. The comprehensive risk index is determined based on the probability of winning the litigation claim strategy, litigation costs, and enforcement risks.

[0006] For example, the case characteristics of the case information are determined in the following way: The basic information of the case and multiple evidence documents are analyzed to extract legal elements to obtain a set of legal elements, which includes elements of legal relationship type, core case facts, evidence, jurisdiction, and timeline. Calculate the correlation between any two legal elements in the legal element set to obtain the element correlation matrix; The case characteristics are generated by combining the set of legal elements and the element association matrix; Preferably, calculating the correlation between any two legal elements in the set of legal elements includes: For any two legal elements in the set of legal elements, calculate the semantic similarity, temporal relevance, and logical correlation between the two legal elements, and determine the correlation between the two legal elements based on the semantic similarity, the temporal relevance, and the logical correlation. Preferably, the step of combining the set of legal elements and the element association matrix to generate the case features includes: Using the element association matrix, the feature weight of each legal element in the legal element set is determined to obtain a weighted matrix; The set of legal elements is semantically vectorized to obtain an initial feature matrix; The initial feature matrix is ​​weighted using the weighting matrix to obtain the case features; Preferably, determining the feature weight of each legal element in the set of legal elements includes: For any legal element in the set of legal elements, the feature weight of the legal element is determined based on the sum of the correlation between the legal element and other legal elements in the element correlation matrix and the preset importance weight of the legal element.

[0007] For example, the matching in the case database based on the case features of the received case information includes: Calculate the cosine similarity between the case features and the features of each case in the case database; Cases in the case database whose cosine similarity to the case features reaches a similarity threshold are added to the case set.

[0008] For example, the extraction of key adjudication rules from the set of similar cases includes: Extract the reasoning behind the judgment for each case in the aforementioned set of similar cases; The reasoning behind the judgments of each case in the aforementioned case set is merged and input into a large language model, so as to extract the key judgment rules using the large language model.

[0009] For example, the strategy for generating multiple different litigation claims includes: The amount range is formed by the preset amount of the claim and the minimum amount of the claim, and then the amount range is diffused at equal intervals with a preset step size to obtain multiple alternative claim amounts. The multiple evidence files are split into multiple subsets by performing idempotent set decomposition. The multiple alternative claim amounts are combined with the multiple subsets of evidence documents through Cartesian product permutation to obtain multiple claim strategies.

[0010] For example, The probability of success for each of the aforementioned litigation strategies is determined in the following manner: Determine the strength of evidence and the degree of legal support for the stated litigation strategy; The probability of winning is determined by a weighted sum of the strength of the evidence, the support of the legal provisions, and the average success rate. The average success rate is the ratio of the number of successful cases in the case set to the total number of cases. And / or, The litigation costs for each of the aforementioned litigation claim strategies are determined as follows: The court acceptance fee, attorney fees, time costs, and other litigation expenses are determined based on the aforementioned litigation strategy. The litigation cost is obtained by summing the court acceptance fee, the attorney's fees, the time cost, and the other miscellaneous litigation expenses. And / or, The execution risk of each of the aforementioned litigation claim strategies is determined in the following ways: Determine the risks associated with the judgment debtor's financial situation, creditworthiness, the nature of the subject matter of enforcement, and the geographical enforcement environment. The execution risk is determined based on the risks associated with the property status, credit status, the nature of the subject matter of execution, and the geographical execution environment.

[0011] Exemplarily, the method further includes: Combining the legal elements corresponding to the target litigation claim strategy and the relationships between the various legal elements, the key adjudication rules, the comprehensive risk index of the target litigation claim strategy, and the probability of winning the target litigation claim strategy, a comprehensive risk report of the target litigation claim strategy is generated using a large language model. The comprehensive risk report includes a text predicting the probability of winning, a report predicting potential defense paths and points of attack on evidence. Based on the target litigation claim strategy and the comprehensive risk report, litigation strategy recommendations are generated.

[0012] Exemplarily, the method further includes: Optimize the interest claim among the alternative claim amounts of the target litigation claim strategy; Specifically, when the interest request does not exceed four times the LPR, the interest request remains unchanged; when the interest request exceeds four times the LPR, the interest request is adjusted to four times the LPR; when there is no interest request, an interest request is automatically generated based on the current bank loan interest rate or LPR.

[0013] According to another aspect of the present invention, an electronic device is provided, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the method as described above.

[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores a computer program / instructions that, when executed by a processor, implement the method described above.

[0015] In the above technical solution, by utilizing all case features of case information to obtain a set of similar cases, the limitations of searching for a single cause of action or litigation claim can be overcome, achieving high-precision, fine-grained similar case matching. This allows for more accurate identification of past precedents highly similar to the current case, providing a more accurate basis for subsequent analysis. By dynamically generating multiple litigation claim strategies based on case information, the risk assessment and win rate prediction of different litigation claim strategies under the current case information can be automatically evaluated. Furthermore, the optimal litigation claim strategy can be automatically determined based on the risk and win rate of each strategy, realizing an intelligent closed loop of "data collection - intelligent analysis - risk assessment - strategy generation." This elevates the civil litigation risk assessment process from the level of manual experience-based judgment to the level of data-driven intelligent analysis, significantly reducing the reliance on legal expert experience in the assessment process, achieving standardization and automation of the assessment process, and improving the quantitative accuracy of litigation risk assessment and the practical value of litigation decision support. Moreover, this method of encapsulating professional legal assessment capabilities into standardized online intelligent processing can break down the spatial and temporal barriers of high-quality assessment resources, eliminate conclusion biases caused by qualitative differences among different assessment subjects, thereby achieving efficient, standardized, and inclusive litigation risk assessment, and improving the accuracy of legal consultation results and user experience.

[0016] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0017] The above and other objects, features, and advantages of the present invention will become more apparent from the more detailed description of the embodiments of the invention in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same parts or steps.

[0018] Figure 1 A schematic flowchart illustrating a method for generating legal advice according to an embodiment of the present invention is shown. Figure 2 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described herein, all other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of the present invention.

[0020] According to one aspect of the present invention, a method for generating legal advice is provided. Figure 1 A schematic flowchart illustrating a method for generating legal advice according to an embodiment of the present invention is shown. Figure 1 As shown, the method may include the following steps S110, S120, S130 and S140.

[0021] In step S110, based on the case characteristics of the received case information, a matching is performed in the case database to obtain a set of similar cases. The case information includes basic case information and multiple evidence documents.

[0022] Basic case information may include plaintiff information, claims (including the preset claim amount), defendant information, and a description of the facts of the case. Multiple evidentiary documents may be included, but are not limited to documentary evidence and physical evidence. In some implementations, users can submit case information via a RESTful API interface. Let the case submission request be C_req (case submission request data packet), and its data structure be defined as: C_req = {P, E, F}. The Chinese meanings of each parameter are defined as follows: P represents the set of parties and claim information, defined as P = {p_plaintiff, p_defendant, A_claim}. Here, p_plaintiff represents plaintiff information (such as plaintiff's name, ID number, and contact information); p_defendant represents defendant information (such as defendant's name, ID number, and contact information); and A_claim represents the content of the claim and the claim amount. E represents the set of evidentiary materials, defined as E = {e_1, e_2, ..., e_n}, where e_1, e_2 to e_n represent individual evidentiary materials, and n is the total number of evidentiary materials. F represents the set of case fact descriptions, defined as F = {f_1, f_2, ...,f_m}, where f_1, f_2 to f_m represent individual case fact text paragraphs, and m is the total number of case fact descriptions.

[0023] For each piece of evidence e_i (the i-th individual piece of evidence, where i is an integer greater than or equal to 1 and less than or equal to n), its structure is defined as: e_i = {e_type, e_content, e_format, e_source, e_timestamp}, where the Chinese meanings of each parameter are defined as follows: e_type represents the type of evidence (e.g., documentary evidence, physical evidence, audiovisual materials, electronic data, etc.). e_content represents the specific content of the evidence or the corresponding file storage path. e_format represents the format of the evidence file (e.g., PDF, JPG, PNG, DOC, MP4, etc.). e_source represents the source of the evidence (e.g., provided by the plaintiff, provided by the defendant, obtained by the court ex officio, etc.). e_timestamp represents the creation time of the evidence file or the timestamp of the upload system.

[0024] The system used to implement this solution can generate a globally unique identifier for each submitted case. Let the case ID generation function be f_case_id, then: case_id = f_case_id(t, u, h) = "case_" + t + "_" + u + "_" + h, where: t represents a millisecond-level timestamp, t = ⌊timestamp() × 1000⌋, u represents a UUID (32-bit hexadecimal string), and h represents the case content hash (MD5). This generation method guarantees global uniqueness in a distributed environment, even in high-concurrency scenarios (1000 requests per second), with a collision probability of less than 10. -12 .

[0025] To facilitate monitoring of case information processing progress, an initial case data object C_data (case system running status object) can be created for each case. Its structure is defined as: C_data = {id, s, p, r, e, t_create, t_update, t_exec}. The Chinese meanings of each parameter are as follows: id represents the globally unique case identifier (Case ID) generated by the system. s represents the current analysis and processing status of the case, with values ​​belonging to the set {pending, analyzing, completed, failed}. Where pending indicates waiting for processing; analyzing indicates analysis is in progress; completed indicates analysis is complete; and failed indicates analysis failed. p represents the percentage of system analysis progress, with values ​​ranging from 0 to 100. r represents the generated risk assessment result set (including quantitative indicators, large model inference reports, etc.). e represents the error details text paragraph when the system runs incorrectly or abnormally (null if running normally). t_create represents the timestamp of case submission and creation (in milliseconds). t_update represents the timestamp (in milliseconds) of the most recent update to the case status or progress. t_exec represents the cumulative execution time (in milliseconds) of the case analysis process.

[0026] In some implementations, case data C_data can be persistently stored in Redis and pushed to an ARQ asynchronous task queue. Let the Redis storage operation be `Redis.set` and the queue push operation be `Queue.enqueue`, then the case enqueue process can be represented as: Redis.set(key_case, C_data, ttl = -1); Queue.enqueue("process_case_risk_assessment", id, P, E, F); Here, key_case = "legal_system:case:data:" + id, and ttl = -1 indicates that it will never expire.

[0027] After the worker process retrieves a task from the queue, it updates the case status: s ← analyzing, p ← 10.

[0028] Considering that different evidence documents may have different formats, each file in the case information can be pre-converted into text data for easier processing. For example, corresponding preprocessing strategies can be adopted for evidence materials of different formats. Specifically, for text data, the following text data processing function can be used: `T_processed = f_text(e_content) = clean(segment(e_content))`, where `e_content` represents text data. For image data, the following OCR recognition function can be used: `T_ocr = f_ocr(e_image) = OCR_engine(preprocess(e_image))`, where `e_image` represents image data. For document data, the following document parsing function can be used: `T_doc = f_doc(e_document) = extract_text(parse(e_document))`, where `e_document` represents document data. The unified preprocessing function can be expressed as: T_unified = f_preprocess(E) = ∪{f_text(e_i) ∪ f_ocr(e_i) ∪ f_doc(e_i) | e_i ∈ E}.

[0029] Case information features include, but are not limited to, legal relationship type, core case facts, evidence, jurisdiction, and timeline. In some implementations, all case information can be input into a large language model, which automatically summarizes and extracts case features such as legal relationship type, core case facts, evidence, jurisdiction, and timeline, generating a feature vector. Alternatively, it can combine various legal elements and the relationships between them to generate a case feature vector. This feature vector can then be matched with the features of various cases in the case database to obtain a set of similar cases.

[0030] In step S120, key adjudication rules are extracted from the set of similar cases.

[0031] After obtaining the set of similar cases, the key adjudication rules can be obtained based on the reasoning of each case in the set. For example, the reasoning of each case can be extracted and the key adjudication rules can be summarized using a large language model, which will not be elaborated here.

[0032] In some embodiments, in addition to extracting qualitative key adjudication rules from the case set, quantitative judicial statistical characteristics can also be calculated from the case set. Specifically, the average win rate can be determined based on the ratio of the number of winning cases in the case set to the total number of cases; the average compensation amount can be determined based on the ratio of the sum of the judgment amounts of each case in the case set to the total number of cases; and the average trial period can be determined based on the ratio of the sum of the trial durations of each case in the case set to the total number of cases. The average win rate P_win_similar can be expressed by the following formula: P_win_similar = count(Cases_win) / count(Cases_similar); where Cases_win represents the set of cases where the judgment result (result(C_i)) is "winning"; and the count function represents the element count of the set. The average compensation amount, Compensation_avg, can be expressed by the following formula: Compensation_avg = sum_compensation / count(Cases_similar); where sum_compensation represents the sum of compensation (C_i) for all similar cases in the set. The average trial period, Duration_avg, can be expressed by the following formula: Duration_avg = sum_duration / count(Cases_similar); where sum_duration represents the sum of trial duration (C_i) for all cases in the set.

[0033] In step S130, based on the preset claim amount and multiple evidence documents in the basic case information, multiple different claim strategies are generated. Each claim strategy includes alternative claim amounts and a set of alternative evidence documents. The alternative claim amounts are generated based on the preset claim amount and the minimum claim amount. The set of alternative evidence documents includes at least some of the evidence documents among the multiple evidence documents.

[0034] The basic case information includes a preset claim amount entered by the user. In this example, multiple claim amounts can be randomly or equidistantly generated within the range defined by the preset claim amount and the legally stipulated minimum claim amount (i.e., the minimum claim amount). These multiple claim amounts are then combined with sets of different documents from multiple evidentiary files to generate different claim strategies. Each preset claim strategy includes, in addition to the alternative claim amounts and sets of alternative evidentiary files, other information from the basic case information besides the claim amount, which will not be elaborated upon here.

[0035] In step S140, the litigation claim strategy with the highest global utility value among multiple litigation claim strategies is selected as the target litigation claim strategy. The global utility value of each litigation claim strategy is determined based on the probability of winning the litigation claim strategy, the amount of the alternative litigation claim strategy, and the comprehensive risk index of the litigation claim strategy. The comprehensive risk index is determined based on the probability of winning the litigation claim strategy, litigation costs, and enforcement risks.

[0036] In some embodiments, the optimization process can be represented by the following multi-objective optimization solution formula: max U(S_j) = alpha * Expected_benefit(S_j) - beta * Risk_Total(S_j), where Expected_benefit(S_j) represents the expected return of the j-th litigation claim strategy, Expected_benefit(S_j) = P_win(S_j) * A_j, P_win(S_j) represents the probability of winning the j-th litigation claim strategy, and A_j represents the alternative litigation claim amount of the j-th litigation claim strategy. Risk_Total(S_j) represents the overall risk index of the j-th litigation claim strategy. Risk_Total(S_j) = w1 * (1 - P_win(S_j)) + w2 * ln(Cost_total(S_j)) + w3 * Risk_execution(S_j), where Cost_total(S_j) represents the litigation cost of the j-th litigation claim strategy, and Risk_execution(S_j) represents the execution risk of the j-th litigation claim strategy. w1, w2, and w3 are preset weights, which can be determined based on actual working conditions or experience. w1 + w2 + w3 = 1. alpha and beta are weighting factors balancing returns and risks, and their values ​​can be preset based on the experience of senior lawyers.

[0037] To further improve the rationality and legality of strategies, they can be optimized through constraints, including budget constraints, time constraints, and legal rule constraints. The budget constraint is that the litigation cost Cost_total (S_j) for each litigation claim strategy must not exceed the preset litigation cost budget limit Budget_max. This preset litigation cost budget limit can be set through expert experience, and can be expressed as: Cost_total(S_j) <= Budget_max. The time constraint is that the estimated litigation period Duration_expected (S_j) for each litigation claim strategy must not exceed the preset maximum period Time_max. The preset maximum period can be set through expert experience, and can be expressed as: Duration_expected(S_j) <= Time_max. The legal rule constraint is that S_j must belong to a legal strategy space (e.g., the interest rate portion of interest claim A_j must not exceed four times the Loan Prime Rate (LPR) published by the National Interbank Funding Center).

[0038] By calculating the utility values ​​of different strategies, we can find the optimal strategy combination (i.e., the target litigation claim strategy) that maximizes U(S_j): S_optimal = (E_optimal, Amount_optimal). Amount_optimal represents the litigation claim amount of the target litigation claim strategy, and E_optimal represents the evidence set of the target litigation claim strategy, also known as the optimal evidence subset. This optimal evidence subset E_optimal satisfies the following condition: Evidence_power(E_optimal) = sum(wi * strength(e_i)) * correlation_bonus(E_optimal); where correlation_bonus(E_optimal) represents the synergistic reward score for mutual corroboration among the evidence, determined by the number of correlation nodes in the element correlation matrix M_correlation that are greater than a preset threshold.

[0039] The aforementioned technical solution, by utilizing the matching of all case features in case information to obtain a set of similar cases, can overcome the limitations of searching for single causes of action or litigation claims, achieving high-precision, fine-grained case matching. This allows for more accurate identification of past precedents highly similar to the current case, providing a more accurate basis for subsequent analysis. By dynamically generating multiple litigation claim strategies based on case information, the solution can automatically assess the risk and win rate prediction of different litigation claim strategies under the current case information. Furthermore, it can automatically determine the optimal litigation claim strategy based on the risk and win rate of each strategy, realizing an intelligent closed loop of "data collection - intelligent analysis - risk assessment - strategy generation." This elevates the civil litigation risk assessment process from the level of manual experience-based judgment to the level of data-driven intelligent analysis, significantly reducing the reliance on legal expert experience in the assessment process. It achieves standardization and automation of the assessment process, improving the quantitative accuracy of litigation risk assessment and the practical value of litigation decision support. Moreover, this method of encapsulating professional legal assessment capabilities into standardized online intelligent processing can break down the spatial and temporal barriers of high-quality assessment resources, eliminate conclusion biases caused by qualitative differences among different assessment subjects, thereby achieving efficient, standardized, and inclusive litigation risk assessment, and improving the accuracy of legal consultation results and user experience.

[0040] For example, the case characteristics of case information are determined in the following way: the basic case information and multiple evidence documents are analyzed separately to extract legal elements to obtain a set of legal elements, which includes legal relationship type elements, core case fact elements, evidence elements, jurisdiction elements, and timeline elements; the correlation between any two legal elements in the set of legal elements is calculated to obtain an element correlation matrix; and the case characteristics are generated by combining the set of legal elements and the element correlation matrix.

[0041] In this example, legal elements can be extracted from different documents containing case information. For example, case information can be input into a large language model (such as the Qwen3-80B model) that has been fine-tuned with legal documents. Let the legal element extraction function be f_extract, and its mathematical expression be defined as: L_elements = f_extract(T_unified, P_legal, M_llm); where the Chinese meanings of each parameter are defined as follows: L_elements represents the extracted set of structured legal elements; R_relation represents the legal relationship type element (such as private lending relationship, sales contract relationship, etc.); F_facts represents the core case fact elements (such as key facts such as loan amount, agreed interest rate, repayment period, etc.); E_evidence represents the evidence element (such as IOU, bank transfer voucher, debt collection chat records, etc., evidence chain entities); J_jurisdiction represents the jurisdiction element (such as the defendant's domicile, place of contract performance, etc., which determine the court of jurisdiction); T_timeline represents the timeline element (such as loan time, overdue time, statute of limitations, etc., timestamp information); P_legal represents the legal domain-specific prompt word template used by the large language model; M_llm This represents the deployed large language model entity. By leveraging the deep semantic understanding capabilities of the finely tuned legal large model, this approach overcomes the limitations of traditional keyword matching techniques, achieving deep semantic understanding and automated element extraction of case facts, legal relationships, and points of contention. This fundamentally enhances the professionalism and accuracy of assessment and analysis, and can also improve the accuracy and objectivity of risk identification.

[0042] The accuracy of legal relationship identification can be calculated using the following function: A_relation = |R_correct ∩ R_standard| / |R_standard|; where R_correct represents the legal relationship identified by the model, and R_standard represents the standard answer. The large language model can be trained and tested in advance using this function and pre-labeled sample data until the identification accuracy exceeds the accuracy threshold.

[0043] After obtaining the legal elements, the correlation between the elements can be calculated. In some schemes of this example, calculating the correlation between any two legal elements in the set of legal elements includes: for any two legal elements in the set of legal elements, calculating the semantic similarity, temporal relevance, and logical correlation between the two legal elements, and determining the correlation between the two legal elements based on the semantic similarity, temporal relevance, and logical correlation. For example, the correlation between two legal elements can be calculated using the following correlation calculation function: correlation(L_i, L_j) = α·semantic_sim(L_i, L_j) + β·temporal_sim(L_i, L_j) + γ·logical_sim(L_i, L_j); where: L_i and L_j represent two legal elements respectively; semantic_sim represents semantic similarity; temporal_sim represents temporal relevance; logical_sim represents logical correlation; α, β, and γ are weighting coefficients, α + β + γ = 1. The correlations between various legal elements can form a correlation matrix M_correlation: M_correlation[i,j] = correlation(L_i, L_j). By combining semantic similarity, temporal relevance, and logical correlation, the correlations between two legal elements can be explored in depth from multiple dimensions. This can provide a more accurate basis for the evaluation of subsequent litigation strategies and effectively fill the subjective blind spots of human experience judgment in evidence chain analysis.

[0044] An element association matrix can reflect the relationships between different elements. This example considers combining the element association matrix with various legal elements to construct a case feature vector. In some implementations, case features are generated by combining a set of legal elements and the element association matrix, including: using the element association matrix to determine the feature weight of each legal element in the set of legal elements to obtain a weighted matrix; semantically vectorizing the set of legal elements to obtain an initial feature matrix; and weighting the initial feature matrix using the weighted matrix to obtain the case features. In this scheme, the set of legal elements is converted into a high-dimensional feature vector, and the element association matrix is ​​used as a weighted matrix in the feature space mapping. This encodes the link between evidence and facts in the vector, thereby enabling automated prediction of the validity, relevance, and authenticity of evidence, effectively filling the subjective blind spots of human experience in evidence chain analysis. The initial feature matrix is ​​weighted using a weighting matrix, which can be represented as: V_case = f_vectorize(L_elements, M_correlation) = [v1, v2, ...,vd]; where d is the number of feature dimensions, usually set to 512 or 1024; V_case represents the case features obtained after weighting; L_elements represents the initial feature matrix obtained by vectorizing legal elements; and M_correlation represents the element correlation matrix.

[0045] In some embodiments, determining the feature weight of each legal element in the legal element set includes: for any legal element in the legal element set, determining the feature weight of the legal element based on the sum of the correlations between the legal element and other legal elements in the element correlation matrix and the preset importance weight of the legal element. Specifically, the feature weight w(i) can be calculated using the following formula: w(i) = TF_IDF(feature_i) * importance(feature_i) * sum_correlation(i), where importance(feature_i) represents the preset importance weight of this type of element in civil litigation, which can be set based on experience; sum_correlation(i) represents the sum of the correlation values ​​between the i-th element and other elements in the element correlation matrix M_correlation. By summing the correlation values, the weight of strongly corroborating elements can be enhanced.

[0046] To facilitate subsequent processing, the case feature vector can be normalized to generate a normalized case vector V_normalized: V_normalized = V_case / L2_norm(V_case); where L2_norm(V_case) represents the L2 norm of the high-dimensional feature vector V_case.

[0047] In related technologies, there is often a lack of logical verification capabilities for complex chains of evidence. Research has found that in civil litigation, there are complex nested and interconnected relationships between evidence and the facts to be proven. Existing technologies lack the ability to automatically analyze the validity of evidence logically, and cannot construct a dynamic evidence chain matrix based on the type of evidence (such as documentary evidence, electronic data), authenticity, and relevance. This makes it difficult for systems to achieve high-precision automated determination of the strength of evidence when faced with massive amounts of evidence, resulting in limited assessment accuracy. In this example solution, the correlation between different legal elements is calculated, and this correlation is combined with the legal elements to generate case features. This strengthens the strongly corroborating elements in the case features, thereby providing a more accurate basis for subsequent case retrieval and strategy evaluation, and improving the accuracy of strategy evaluation.

[0048] For example, based on the case features of the received case information, matching is performed in the case database, including: calculating the cosine similarity between the case features and the features of each case in the case database; and adding cases in the case database whose cosine similarity with the case features reaches a similarity threshold to the case features to the case set. Let the current case vector be V_target, and the case vector set in the case database be DB_vectors = {V_1, V_2, ..., V_N}. The cosine similarity calculation can be expressed as: sim(V_target, V_i) = (V_target · V_i) / (||V_target|| × ||V_i||), and the case set can be expressed as Cases_similar = {C_i | sim(V_target, V_i) ≥ θ, C_i ∈ DB_cases}, where C_i is the case corresponding to V_i, and θ represents the similarity threshold, which can be 0.85.

[0049] The above solution extracts the core features of the received cases, uses the cosine similarity algorithm to accurately calculate the degree of matching between the features and those of all existing cases in the case database, and then filters them according to a preset similarity threshold. This can quickly locate similar cases with highly matching features and form a set of similar cases, effectively improving the accuracy and efficiency of similar case retrieval, avoiding the subjectivity and tediousness of manual screening, and providing objective and efficient technical support for case strategy evaluation in subsequent steps.

[0050] For example, extracting key adjudication rules from a set of similar cases includes: extracting the adjudication reasoning for each case in the set of similar cases; merging the adjudication reasoning for each case in the set of similar cases and inputting it into a large language model, so as to extract key adjudication rules using the large language model.

[0051] In a specific implementation, the unstructured text paragraphs corresponding to the "This Court Holds" or "Reasons for Judgment" sections in the retrieved similar case set (Cases_similar) can be automatically located and extracted. These unstructured text paragraphs are then merged and input into a deployed large language model. The large language model extracts the core legal logic and judgment rules applied by judges when handling similar disputes through summary clustering and opinion merging, generating highly condensed qualitative judicial judgment rules, represented as Rule_Extract. For example, in private lending, qualitative judgment rules such as "in large loans, only a promissory note without transfer vouchers is not supported" can be extracted.

[0052] The above approach can quickly and accurately obtain key adjudication rules for similar cases by leveraging the deep semantic understanding capabilities of large language models. This can provide accurate assessment basis for subsequent litigation strategy evaluation and further improve the accuracy of the assessment.

[0053] For example, generating multiple different litigation claim strategies includes: forming an amount range with a preset litigation claim amount and a minimum litigation claim amount, and performing equal-distance divergence within the amount range with a preset step size to obtain multiple alternative litigation claim amounts; performing power set splitting on multiple evidence documents to obtain multiple evidence document subsets; and performing Cartesian product permutation and combination of multiple alternative litigation claim amounts and multiple evidence document subsets to obtain multiple litigation claim strategies.

[0054] For example, the system can read the user-defined upper limit of the claim amount (i.e., the preset claim amount) A_max and the legally stipulated lower limit of the claim amount A_min. It then divides this interval into equal-distance divergent partitions using a preset step size delta_A (e.g., 5000 yuan), generating a candidate set of claim amounts: A_candidates = {A_min, A_min + delta_A, ..., A_max}.

[0055] For evidence files, the set of evidence materials submitted by the user, E = {e_1, e_2, ..., e_n}, can be split into power sets to generate a space of valid candidate evidence subsets: E_subsets = {E_subset_1, E_subset_2, ..., E_subset_k}. To improve the quality of evidence, subsets of evidence files that are obviously irrelevant or have conflicting timelines can be deleted, further enhancing the legality of the evidence.

[0056] The candidate strategy grid set consisting of multiple claim strategies can be represented as: Strategy_space = {S_1, S_2, ..., S_N}, where each S_j = (E_subset_j, A_j). S_j represents the j-th claim strategy, A_j represents the alternative claim amount for the j-th claim strategy, and E_subset_j represents the evidence set for the j-th claim strategy.

[0057] The aforementioned technical solution achieves large-scale and refined generation of litigation claim strategies through dual optimization of quantified amount ranges and power set decomposition of evidence, combined with a Cartesian product combination strategy. On the one hand, the equidistant dispersion processing based on preset amount ranges ensures the complete coverage of candidate amounts and ensures the standardization and comparability of amount selection through fixed step size, avoiding the limitations of a single amount strategy. On the other hand, the power set decomposition of evidence documents can fully explore the probative value of different evidence combinations. Combined with the full permutation and combination method, it can systematically sort out evidence support schemes suitable for different amount claims, ultimately forming a multi-dimensional litigation claim strategy library that can be flexibly adapted to actual case scenarios. This effectively improves the efficiency and comprehensiveness of strategy formulation and provides a richer selection space and data support for the subsequent determination of target litigation claim strategies.

[0058] For example, the probability of success for each litigation strategy is determined by: determining the strength of evidence and the support of legal provisions for the litigation strategy; and determining the probability of success based on the weighted sum of the strength of evidence, the support of legal provisions, and the average success rate; wherein the average success rate is the ratio of the number of successful cases in the case set to the total number of cases.

[0059] For example, the probability of winning, P_win, can be calculated using the following model: P_win = σ(Σ(w_i × x_i) + b); where: σ(z) = 1 / (1+e^(-z)) is the Sigmoid activation function; x_i is the i-th feature value (e.g., strength of evidence, support of legal provisions, win rate of similar cases (i.e., average win rate)); w_i is the corresponding weight; and b is the bias term. In this embodiment, the compensation amount can also be predicted based on the amount of the claim, the support of evidence, and the average compensation amount. The estimated compensation amount, Amount_predicted, can be calculated using the following formula: Amount_predicted = max(0, Σ(α_i ×factor_i) + β); where factor_i includes: the amount of the claim, the support of evidence, and the average compensation of similar cases.

[0060] For example, the litigation cost for each claim strategy is determined by: determining court fees, attorney fees, time costs, and other litigation miscellaneous expenses based on the claim strategy; and calculating the sum of court fees, attorney fees, time costs, and other litigation miscellaneous expenses to obtain the litigation cost.

[0061] The total litigation cost (Cost_total) can be calculated using the following formula: Cost_total = Cost_court + Cost_lawyer + Cost_other + Cost_time. Here, Cost_court represents the court acceptance fee, which can be calculated according to the "Measures for Payment of Litigation Costs," expressed as: Cost_court = f_court_fee(Amount_claim), where Amount_claim represents the amount claimed in the lawsuit. Cost_lawyer represents the attorney's fee, Cost_lawyer = α × Amount_claim + β × Complexity_factor + γ, where Complexity_factor represents the case complexity factor, which can be determined using a large language model or based on human experience; α and β represent weights; and γ is the basic attorney's fee, which can be set based on experience. Cost_time represents the time cost, Cost_time = Duration_predicted × Opportunity_cost_per_day, where Duration_predicted represents the estimated litigation period, and Opportunity_cost_per_day represents the daily opportunity cost, set according to the actual situation of the parties involved. Cost_other represents other miscellaneous litigation expenses, which can be set as needed or based on expert experience.

[0062] For example, the execution risk of each litigation claim strategy is determined by: determining the risk of the judgment debtor's (i.e., the defendant's) financial situation, credit situation, nature of the subject matter of execution, and geographical execution environment; and determining the execution risk based on the risk of financial situation, credit situation, nature of the subject matter of execution, and geographical execution environment.

[0063] In some embodiments, execution risk Risk_execution can be expressed as Risk_execution = 1 - Π(1 - r_i), where r_i are various execution risk factors: r_1 is the risk of the judgment debtor's financial status; r_2 is the risk of the judgment debtor's credit status; r_3 is the risk of the nature of the execution target; and r_4 is the risk of the geographical execution environment. Among these, the risks of financial status and credit status can be obtained through banks, while the risks of the nature of the execution target and the geographical execution environment can be determined based on expert experience. In one implementation scheme, the risk of the judgment debtor's property status can also be determined in the following way: First, calculate the property status score Property_score: Property_score = w_1×Real_estate + w_2×Vehicle + w_3×Bank_deposit + w_4×Other_assets, where w_1, w_2, w_3, and w_4 represent the weights of the corresponding items; Real_estate represents real estate / property assets; Vehicle represents vehicle-type movable assets; Bank_deposit represents bank deposits; and Other_assets represents other assets.

[0064] For example, the method may further include: upon receiving a user's modification instruction, dynamically modifying the target litigation strategy request according to the modification instruction, and recalculating the probability of victory, litigation costs, enforcement risks, and comprehensive risk index based on the modified target litigation strategy request, and regenerating a comprehensive risk report and litigation strategy recommendations. This enables an evolution from "static result presentation" to "dynamic strategy deduction."

[0065] In some embodiments, the user input processing function is: Response = f_interactive(Query, Context, History); where: Query is the user question; Context is the current case context; History is the dialogue history. The policy recalculates the trigger condition: Recalculate = (Parameter_change>threshold) OR (New_evidence_added) OR (User_preference_updated); the dynamic update algorithm is: if Recalculate: Strategy_new = f_strategy_update(Strategy_old, Changes, Constraints_new) Display_diff(Strategy_old, Strategy_new).

[0066] For example, the method further includes: optimizing the interest claim in the alternative claim amount of the target litigation claim strategy; wherein, when the interest claim does not exceed four times the LPR, the interest claim remains unchanged; when the interest claim exceeds four times the LPR, the interest claim is adjusted to four times the LPR; when there is no interest claim, an interest claim is automatically generated based on the current bank loan interest rate or LPR. That is, if the agreed interest rate is <= LPR * 4, the "according to the agreed interest rate" litigation strategy is adopted; if the agreed interest rate is > LPR * 4, the litigation strategy is automatically adjusted to "according to the statutory interest rate ceiling (LPR * 4)"; if no interest rate is agreed in the case, the litigation strategy is automatically switched to "according to the same period bank loan interest rate / LPR". This improves the professionalism and legality of the final strategy and increases the accuracy of strategy generation.

[0067] For example, the method further includes: combining the legal elements corresponding to the target litigation claim strategy and the relationships between the various legal elements, key adjudication rules, the comprehensive risk index of the target litigation claim strategy and the probability of winning the target litigation claim strategy, and using a large language model to generate a comprehensive risk report for the target litigation claim strategy. The comprehensive risk report includes a text predicting the probability of winning, a report predicting potential defense paths and points of attack on evidence; and combining the target litigation claim strategy and the comprehensive risk report to generate litigation strategy recommendations.

[0068] In some implementations, to transform quantitative indicators into assessment text with in-depth professional legal logic, the aforementioned calculated quantitative feature parameters, search results, and case elements can be converted into structured prompts. The constructed structured prompt template P_prompt is defined as follows: P_prompt = Template(L_elements, M_correlation, Rule_Extract, P_win, Risk_Total). The structured prompt P_prompt is formatted in system memory as the following configuration text with semantic tags: “ [System Role]: You are a judicial expert with extensive experience in civil litigation.

[0069] [Case Facts and Context]: {L_elements} [Element Correlation Matrix]: {M_correlation} [Referencing Judicial Rules]: {Rule_Extract} [Quantitative Analysis Indicators]: Predicted probability of winning: {P_win} System Total Risk Index: {Risk_Total} [Guide to Reasoning Tasks]: 1. Based on the [predicted probability of winning] and the [case factual context], explain the core legal basis and factual gaps that lead to the probability score, and generate a prediction of the likelihood of winning.

[0070] 2. Compare the [case facts and context] with [reference to judicial rulings] to identify conflicts in the application of legal provisions and simulate potential defenses that the defendant may take during the trial.

[0071] 3. Analyze the evidence nodes in the [element association matrix] with a correlation degree lower than the preset threshold, locate isolated evidence that fails to form a closed loop of corroboration, and output the predicted evidence attack points of the defender.

[0072] The system inputs the formatted prompt text P_prompt into the model inference engine by calling the Large Language Model API, and performs the following inference steps: 1. Result Prediction Generation: The large language model reads the specific value of P_win and locates the corresponding evidentiary advantage under the guidance of prompts. When P_win = 0.92, the large language model outputs qualitative analysis text, clarifying the factual support for the 92% probability of winning, and pointing out that the remaining 8% risk of losing lies in the defendant's possible claim that the interest calculation standard exceeds the statutory limit.

[0073] 2. Potential Defense Path Simulation Generation: The large language model compares the subject matter of the case, the statute of limitations, and the hard restrictions in the referenced adjudication rules. If it is found that the debt may have exceeded the statute of limitations, the large language model generates a defense warning text, indicating that the plaintiff and defendant are likely to raise the statute of limitations as a defense, and suggests that the plaintiff prepare collection evidence that can prove the interruption of the statute of limitations.

[0074] 3. Evidence Attack Point Prediction and Generation: The large language model locates nodes with low correlation in the element correlation matrix M_correlation (e.g., large cash loans lacking direct bank statement support such as transfer vouchers). After cross-comparison, the large language model generates predicted text, indicating that the opposing party is highly likely to attack based on "the loan was not actually delivered," and marks this point as a weak point in the plaintiff's evidence chain. Finally, the large language model assembles the structured text paragraphs generated from the above three parts to output the final comprehensive civil litigation risk assessment report. Then, it can be combined with the target litigation claim strategy to assemble the structured report input parameter, Report_Input. Report_Input is then transmitted to the large language model. The large language model uses these dry, optimal mathematical parameters as semantic constraints, performs natural language translation and logical polishing, and automatically generates a highly readable "Personalized Litigation Strategy Recommendation Report" containing specific litigation path steps.

[0075] The above solution, by combining the target litigation claim strategy with a comprehensive risk report and using a large language model to generate litigation strategy suggestions, can improve document readability, facilitate user understanding, and help improve user experience.

[0076] In some implementations, when Risk_Total>=θ_risk, the current case can be automatically marked as a high-risk case, and a "preventive litigation warning" prefix can be added to the input layer of the large language model when generating litigation strategy suggestions to limit the generation of aggressive litigation strategy suggestions.

[0077] In some implementations, risk level and strategy score can also be output. The risk level mapping function can be: Risk_level = f_risk_mapping(Risk_Total); where the adaptive mapping rule of the f_risk_mapping function is defined as follows: if Risk_Total < θ_low, then Risk_level = "Low Risk"; if θ_low <= Risk_Total < θ_high, then Risk_level = "Medium Risk"; if Risk_Total >= θ_high, then Risk_level = "High Risk". In the above rules, θ_low and θ_high are the system's preset low-risk and high-risk thresholds, respectively (for example, set to 0.35 and 0.70, respectively).

[0078] In some implementation schemes, the total risk index Risk_Total, as an input variable, exhibits dynamic polymorphism at different stages of system operation: 1. In the initial static display stage, the data for this variable comes from the baseline total risk index calculated by the "Risk Assessment and Prediction Module" based on all original case materials; 2. In the strategy deduction or interactive adjustment stage, the data for this variable is dynamically updated to the dynamic total risk index Risk_Total(S_optimal) calculated by the "Litigation Strategy Generation Module," corresponding to the currently selected / optimized optimal strategy.

[0079] The visual score calculation function is defined as: Visual_score = (1 - Risk_Total) * 100; this score represents the overall health of the case and is directly mapped to the risk dashboard of the front-end user interface for intuitive rendering.

[0080] In some solutions, the performance of the method can be evaluated and monitored. Evaluation metrics can include evaluation accuracy, system response performance, and user satisfaction. Evaluation accuracy metrics include prediction accuracy, cost estimation accuracy, and strategy effectiveness. Prediction accuracy: Accuracy_prediction = |{cases| |P_predicted - P_actual| ≤ ε}| / |Total_cases|; where ε is the allowable error range (usually set to 0.1).

[0081] Cost prediction accuracy: Precision_cost = 1 - (1 / n) × Σ|Cost_predicted - Cost_actual| / Cost_actual.

[0082] Strategy effectiveness assessment: Effectiveness = (Benefit_actual - Benefit_baseline) / Benefit_baseline.

[0083] System response performance includes average response time, concurrent processing capacity, and system availability. Average response time: Response_time_avg = (1 / n) × Σ(t_end - t_start). Concurrent processing capacity: Throughput = Cases_processed / Time_window. System availability: Availability = (Total_time - Downtime) / Total_time.

[0084] User satisfaction assessment can be represented by a comprehensive satisfaction score: Satisfaction = w_1×Accuracy_score + w_2×Usability_score + w_3×Efficiency_score, where the scores for each dimension are calculated based on user feedback data.

[0085] The implementation effect of the present invention will be further explained below in conjunction with specific scenarios.

[0086] Taking private lending disputes as an example, the application process is explained in detail: (I) Case Input and Processing: Input data: Parties involved: Zhang San (plaintiff) vs. Li Si (defendant); Claims: Repayment of principal of RMB 100,000 and interest; Evidence: IOU, transfer records, chat logs.

[0087] System processing time: Data acquisition: 0.5 seconds; Feature extraction: 2.3 seconds; Case retrieval: 1.8 seconds; Risk assessment: 1.2 seconds; Strategy generation: 0.8 seconds; Total: 6.6 seconds.

[0088] (II) Evaluation Result Output: Risk assessment results: Probability of winning: 92%; Expected compensation: Principal 100,000 yuan + interest 12,000 yuan; Litigation costs: Acceptance fee 2,300 yuan + Attorney fees 6,000 yuan; Enforcement risk: Medium (requires application for property preservation); Trial period: 3-5 months.

[0089] Strategic recommendations: 1. Prioritize litigation (high success rate); 2. Apply for property preservation (reduce enforcement risk); 3. Strengthen the chain of evidence (increase the probability of winning); 4. Reasonably determine the litigation claims (balance benefits and costs).

[0090] (III) Effect Verification Compared with traditional manual assessment: Assessment time: reduced from 2-3 hours to 6.6 seconds, an efficiency increase of 1600 times; Assessment accuracy: the error in predicting the probability of winning is controlled within 5%; Cost savings: the assessment cost is reduced from 500 yuan to 5 yuan, a saving of 99%; Professionalism: covers 95% of common legal risk points.

[0091] The above scenario example uses private lending as an illustration. It can be understood that the solution of this invention can also be applied to cases such as contract disputes, tort liability cases, labor disputes, and intellectual property cases. When applying it to other cases, different case databases, legal element extraction templates, and legal knowledge bases can be used depending on the case type, which will not be elaborated further.

[0092] The system running the method of this invention has excellent scalability. In terms of horizontal scalability: it supports distributed deployment, theoretically scalable to 1000+ nodes; single-node processing capacity: 1000 cases / hour; cluster processing capacity: up to 1 million cases / hour. In terms of vertical scalability: it supports GPU-accelerated inference, increasing model inference speed by 10 times; it supports model quantization compression, reducing memory usage by 75%; it supports edge computing deployment, reducing response latency to less than 100ms.

[0093] The technical effects are further described below by comparing the exemplary solutions of the present invention with the prior art.

[0094] On the one hand, the above-mentioned example solution of the present invention achieves systematic technical integration and intelligent upgrading. It constructs a closed-loop system from "data collection" to "strategy generation," breaking through the limitations of traditional legal consultation systems that rely solely on keyword retrieval and template matching. This system elevates the civil litigation risk assessment process from the level of manual experience-based judgment to the level of data-driven intelligent analysis, significantly reducing the reliance on legal expert experience in the assessment process and achieving standardization and automation of the assessment process. Specifically, by integrating Large Language Model (LLM), OCR recognition technology, legal knowledge base, and multi-dimensional risk assessment algorithms, it achieves intelligent and automated legal risk assessment. Assuming the accuracy rate of traditional manual assessment is ρ_traditional = 78% (based on lawyer experience judgment), the accuracy rate of the present invention, combining semantic understanding and case analysis, is ρ_ai = 92%, an accuracy improvement of Δρ = ρ_ai - ρ_traditional = 14%. This technical integration not only breaks through the subjective limitations of traditional assessment methods but also significantly improves the accuracy and objectivity of risk identification through deep semantic understanding capabilities. Compared to existing technologies that rely on expert experience, this invention can be adapted to different case types through configuration, eliminating the need to retrain assessment personnel. Assuming the expert training cost for traditional methods is C_traditional = 80 hours (including legal training, case study, and practical guidance), the system configuration cost of this invention is C_config = 2 hours (requiring only parameter adjustments). This represents a cost reduction of η_cost = (C_traditional - C_config) / C_traditional = 97.5%, significantly lowering system deployment and maintenance costs.

[0095] On the other hand, the above-described example scheme of the present invention can significantly improve the accuracy of analysis and the depth of assessment. Through the legal element semantic extraction model and the multi-dimensional risk quantification algorithm, the accuracy of risk identification and the comprehensiveness of assessment are effectively improved. If the accuracy rate of traditional assessment is defined as Acc_Trad, and the accuracy rate of the present invention is Acc_New, then the performance improvement can be expressed as: Acc_Gain = Acc_New - Acc_Trad. Practical verification shows that the present invention, through deep semantic understanding and case rule extraction, achieves a 94% accuracy rate in identifying legal elements of a case and an 89% accuracy rate in predicting the success rate, representing improvements of 19% and 16% respectively compared to traditional assessment methods, overcoming the shortcomings of traditional assessment methods such as single-dimensionality and strong subjectivity.

[0096] By utilizing multimodal data processing technology and legal element correlation analysis algorithms, this invention can automatically identify the relationships between evidentiary materials and accurately extract key legal elements in a case. The algorithm has a time complexity of O(n·m) and a space complexity of O(n), where n is the number of pieces of evidence and m is the number of element types. In real-world scenarios (n<50, m<20), the algorithm executes in less than 3 seconds, demonstrating excellent performance.

[0097] For example, when analyzing loan disputes, the system can automatically link loan agreements, transfer records, and chat logs to build a complete chain of evidence, rather than analyzing individual pieces of evidence in isolation. This intelligent linking capability significantly improves the system's accuracy in handling complex legal cases (such as those involving multiple parties and multiple points of contention).

[0098] In actual testing, for cases involving 5 types of evidence with an average of 3 materials per type, traditional methods require lawyers to spend 2-3 hours conducting correlation analysis, while this invention can automatically complete the correlation in just 6.6 seconds with an accuracy rate of 96.8%, avoiding the problem of manual analysis required by traditional technologies.

[0099] On the other hand, the above-described example solution of this invention has excellent processing performance. In practical use, a high-concurrency asynchronous processing architecture and distributed computing technology can be adopted to greatly shorten the case processing time. If we define the time taken for traditional manual assessment of a single case as Time_Man, and the time taken for automatic assessment of a single case by this system as Time_Sys, then the system efficiency improvement factor Eff_Ratio can be expressed as: Eff_Ratio = Time_Man / Time_Sys; actual test data shows that the single case processing time is reduced from 2-3 hours in the traditional manual method to 6.6 seconds, and the system processing efficiency is improved by 1600 times, alleviating the pressure on the allocation of legal service resources in terms of space and time.

[0100] By using an asynchronous task queue and a worker cluster architecture, the system throughput is improved by approximately W times compared to serial processing (W is the number of workers). Assuming the average time for a single case analysis is t_case = 6.6 seconds, the total time for serial processing of N cases is T_serial = N × t_case, and the total time for parallel processing is T_parallel ≈ (N / W) × t_case, then the efficiency improvement is η = T_serial / T_parallel ≈ W.

[0101] In actual testing (N=1000, W=10), serial processing took 6600 seconds, while parallel processing took 720 seconds, representing an actual improvement of approximately 9.2 times (taking into account task scheduling overhead).

[0102] The real-time progress tracking mechanism employs a debouncing strategy. Let the total number of cases be N. Without debouncing, the number of updates is N. With debouncing, the number of updates is approximately the number of progress intervals (usually 100), and the reduction in write operations is η_reduce = (N - 100) / N. When N = 1000, η_reduce ≈ 90%, significantly reducing database write pressure.

[0103] On the other hand, the above-described example solution of this invention can achieve significant cost-effectiveness and operational optimization, and can greatly reduce the marginal cost of legal risk assessment. If we define the cost of manual assessment per case as Cost_Man, and the cost of AI-automated processing in this solution as Cost_Sys, then the cost-saving ratio Cost_Saving per case can be expressed as: Cost_Saving = (Cost_Man - Cost_Sys) / Cost_Man; in large-scale case assessment scenarios, the Cost_Saving ratio can reach over 99%. Assuming the cost of manual assessment by lawyers is 500 yuan / case (calculated at 2 hours × 250 yuan / hour), and the cost of AI assessment in this invention is 5 yuan / case (including computing resources and model call fees), the cost-saving ratio is (500-5) / 500 = 99%, which greatly reduces the litigation preparation costs for parties and legal service institutions, and promotes the popularization and balance of professional legal auxiliary services.

[0104] By shifting the evaluation logic from the expert experience layer to the data-driven layer, this invention significantly reduces the deployment and maintenance costs of the system. Assuming that training a legal evaluation expert using traditional methods takes T_expert = 2 years, while deploying an evaluation system using this invention takes T_deploy = 1 week, the deployment efficiency improvement is η_deploy = T_expert / T_deploy ≈ 100 times. When updating the legal knowledge base, only the configuration file needs to be modified to take effect, without the need for retraining personnel. The demand response cycle is shortened from an average of 30 days to 1 day, representing a 30-fold increase in response speed.

[0105] On the other hand, the above-described example scheme of the present invention possesses dynamic game theory and real-time decision-making capabilities. When a user changes the litigation request parameter User_Params, the system can update the feature model in real time and output new strategy suggestions. This dynamic evolution capability upgrades the evaluation process from "static result presentation" to "dynamic strategy deduction," providing parties with more scientific and operational decision-making assistance and significantly enhancing the application value of the evaluation results. For example, when a user asks, "If I only sue to demand repayment of the principal and waive interest, how will the success rate change?" the system can recalculate and provide a quantitative risk assessment result within 2 seconds, including changes in the success rate, cost-benefit analysis, and execution risk assessment.

[0106] Assuming the strategy adjustment response time is T_response = 2 seconds, the traditional method requires lawyers to re-analyze for T_manual = 30 minutes, resulting in a response efficiency improvement of η_response = T_manual / T_response = 900 times.

[0107] On the other hand, the above-described example scheme of the present invention can establish a comprehensive risk classification and traceability system. In the final litigation strategy recommendation, the large language model can subdivide the risk assessment results into types such as "winning risk," "enforcement risk," "cost risk," and "time risk," and provide detailed risk factor analysis, evidence validity assessment, and strategy recommendations. Assuming the traditional system risk location time is T_locate_old = 60 minutes, this scheme shortens the risk location time to T_locate_new = 5 minutes through complete traceability information, resulting in a location efficiency improvement ratio of η_locate = T_locate_old / T_locate_new = 12 times.

[0108] This sophisticated risk management mechanism enables users to quickly pinpoint the root cause of risks, distinguishing between issues of evidence, applicable law, or strategy selection, thus facilitating subsequent case preparation and strategy optimization.

[0109] In practical applications, the traceability information provided by the system includes: risk type classification, specific risk factors, evidence validity score, similar case references, and strategy suggestions. Assuming evidence issues account for α = 60%, legal application issues account for β = 25%, and strategy issues account for γ = 15%, traditional methods cannot distinguish risk types and require individual investigation, with an average investigation time of T_check = 45 minutes per issue.

[0110] This invention, through risk classification, allows for direct location of evidence issues (T_evidence = 5 minutes), legal application issues (T_legal = 15 minutes), and strategy issues (T_strategy = 10 minutes). Therefore, the average problem processing time is: T_avg = α × T_evidence + β × T_legal + γ × T_strategy = 0.6 × 5 + 0.25 × 15 + 0.15 × 10 = 9.25 minutes; this represents an efficiency improvement of approximately 4.9 times compared to traditional methods.

[0111] On the other hand, the above-described example solution of the present invention can lower the threshold and cost of accessing legal services. This solution significantly reduces the threshold and cost of legal services by transforming professional legal knowledge into an intelligent assessment tool. Assuming that consulting a professional lawyer using traditional methods costs C_lawyer = 500 yuan / hour, and the present invention provides a comparable level of assessment service for C_ai = 5 yuan / time, then the cost reduction ratio is η_cost = (C_lawyer × 2 - C_ai) / (C_lawyer × 2) = 99.5% (calculated based on a 2-hour consultation). Ordinary parties do not need to possess professional legal knowledge to obtain professional-level risk assessments and strategic advice, which significantly improves the accessibility and fairness of legal services.

[0112] When business rules change, only the legal knowledge base needs to be updated to take effect, without the need to retrain the system. The response cycle for requests has been shortened from an average of 15 days to 1 day, increasing the response speed by 15 times.

[0113] Meanwhile, the distributed architecture supports horizontal scaling. Let the number of Workers be W, and the processing speed of a single Worker be v_single, then the total system processing speed is v_total = W × v_single × η_scale, where η_scale is the scaling efficiency (usually 0.85-0.95).

[0114] In actual testing (N=10000 cases), 1 worker took 18 hours to process, 2 workers took 10 hours (η_scale=90%), and 4 workers took 5.5 hours (η_scale=82%). The processing capacity can be flexibly adjusted according to the workload, reducing operation and maintenance costs.

[0115] Furthermore, the above-described example solutions of this invention have broad applicability, not only applicable to private lending disputes but also extend to various civil case types such as contract disputes, tort liability, labor disputes, and intellectual property rights. Assuming the complexity of each case type is C_complexity (measured by the number of points of contention), traditional methods require training specialized assessment experts for each type, with a training workload of W_traditional = C_complexity × 200 hours / type.

[0116] This invention utilizes a universal legal element extraction algorithm and knowledge base configuration. Only parameter configuration needs to be adjusted, and the workload is adapted to W_universal = 8 hours / type (configuration time). The workload reduction ratio is η_work = (W_traditional - W_universal) / W_traditional.

[0117] Taking contract disputes as an example (C_complexity = 5), the traditional method requires 1000 hours per type, while the present invention only requires 8 hours per type, reducing the workload by 99.2%.

[0118] The system supports complex case structures (multiple parties, multiple points of contention) and can be configured to adapt to different types of civil cases. In practical applications, this invention has been validated in the field of private lending: processing 1,000 cases per day with an accuracy rate of 92%, achieving a 1,600-fold increase in efficiency.

[0119] Based on the same technical architecture, this invention has the technical capability to be extended to other types of civil cases, providing a general intelligent risk assessment solution for the legal services industry, and has broad application value and promotion prospects.

[0120] In summary, this invention not only improves the intelligence and processing efficiency of legal risk assessment, enhancing its accuracy and objectivity, but also optimizes the service architecture and lowers service barriers and costs. In terms of quantitative results: accuracy increased from 78% to 92% (a 14% increase), processing efficiency improved by 1600 times, service costs decreased by 99%, deployment costs decreased by 97.5%, and risk location efficiency improved by 12 times.

[0121] According to another aspect of the present invention, an electronic device is also provided. Figure 2 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. Figure 2 As shown, the electronic device 200 includes a processor 210 and a memory 220. The memory 220 stores a computer program, which the processor 210 executes to implement the method described above.

[0122] According to another aspect of the present invention, a computer-readable storage medium is also provided. The storage medium stores a computer program / instructions that, when executed by a processor, implement the method described above. The storage medium may, for example, include a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0123] Those skilled in the art will readily understand the implementation structure, working principle, and beneficial effects of electronic devices and computer-readable storage media by reading the above methods. For the sake of brevity, further details will not be elaborated upon here.

[0124] Although exemplary embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above exemplary embodiments are merely illustrative and are not intended to limit the scope of the invention. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the invention as claimed in the appended claims.

[0125] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0126] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed.

[0127] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0128] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention. However, this approach should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, its inventive point lies in solving the corresponding technical problem with fewer features than all of those in a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0129] Those skilled in the art will understand that, apart from the mutual exclusion of features, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or elements of any method or apparatus so disclosed may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0130] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.

[0131] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules in the electronic device according to embodiments of the present invention. The present invention can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing some or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0132] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

[0133] The above description is merely a specific embodiment of the present invention or an explanation of that embodiment. The scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating legal consultation, characterized in that, include: Based on the case characteristics of the received case information, a matching process is performed in the case database to obtain a set of similar cases. The case information includes basic case information and multiple evidence files. Extract key adjudication rules from the aforementioned set of similar cases; Based on the preset claim amount in the basic case information and the multiple evidence documents, multiple different claim strategies are generated. Each claim strategy includes alternative claim amounts and a set of alternative evidence documents. The alternative claim amounts are generated based on the preset claim amount and the minimum claim amount. The set of alternative evidence documents includes at least some of the evidence documents among the multiple evidence documents. Among the multiple litigation claim strategies, the litigation claim strategy with the highest global utility value is selected as the target litigation claim strategy. The global utility value of each litigation claim strategy is determined based on the probability of winning the litigation claim strategy, the amount of the alternative litigation claim strategy, and the comprehensive risk index of the litigation claim strategy. The comprehensive risk index is determined based on the probability of winning the litigation claim strategy, litigation costs, and enforcement risks.

2. The method according to claim 1, characterized in that, The case characteristics of the case information are determined in the following ways: The basic information of the case and multiple evidence documents are analyzed to extract legal elements to obtain a set of legal elements, which includes elements of legal relationship type, core case facts, evidence, jurisdiction, and timeline. Calculate the correlation between any two legal elements in the legal element set to obtain the element correlation matrix; The case characteristics are generated by combining the set of legal elements and the element association matrix; Preferably, calculating the correlation between any two legal elements in the set of legal elements includes: For any two legal elements in the set of legal elements, calculate the semantic similarity, temporal relevance, and logical correlation between the two legal elements, and determine the correlation between the two legal elements based on the semantic similarity, the temporal relevance, and the logical correlation. Preferably, the step of combining the set of legal elements and the element association matrix to generate the case features includes: Using the element association matrix, the feature weight of each legal element in the legal element set is determined to obtain a weighted matrix; The set of legal elements is semantically vectorized to obtain an initial feature matrix; The initial feature matrix is ​​weighted using the weighting matrix to obtain the case features; Preferably, determining the feature weight of each legal element in the set of legal elements includes: For any legal element in the set of legal elements, the feature weight of the legal element is determined based on the sum of the correlation between the legal element and other legal elements in the element correlation matrix and the preset importance weight of the legal element.

3. The method according to claim 1, characterized in that, The matching of case features based on the received case information in the case database includes: Calculate the cosine similarity between the case features and the features of each case in the case database; Cases in the case database whose cosine similarity to the case features reaches a similarity threshold are added to the case set.

4. The method according to claim 1, characterized in that, The extraction of key adjudication rules from the set of similar cases includes: Extract the reasoning behind the judgment for each case in the aforementioned set of similar cases; The reasoning behind the judgments of each case in the aforementioned case set is merged and input into a large language model, so as to extract the key judgment rules using the large language model.

5. The method according to claim 1, characterized in that, The strategy for generating multiple different litigation claims includes: The amount range is formed by the preset amount of the claim and the minimum amount of the claim, and then the amount range is diffused at equal intervals with a preset step size to obtain multiple alternative claim amounts. The multiple evidence files are split into multiple subsets by performing idempotent set decomposition. The multiple alternative claim amounts are combined with the multiple subsets of evidence documents through Cartesian product permutation to obtain multiple claim strategies.

6. The method according to claim 1, characterized in that, The probability of success for each of the aforementioned litigation strategies is determined in the following manner: Determine the strength of evidence and the degree of legal support for the stated litigation strategy; The probability of winning is determined by a weighted sum of the strength of the evidence, the support of the legal provisions, and the average success rate. The average success rate is the ratio of the number of successful cases in the case set to the total number of cases. And / or, The litigation costs for each of the aforementioned litigation claim strategies are determined as follows: The court acceptance fee, attorney fees, time costs, and other litigation expenses are determined based on the aforementioned litigation strategy. The litigation cost is obtained by summing the court acceptance fee, the attorney's fees, the time cost, and the other miscellaneous litigation expenses. And / or, The execution risk of each of the aforementioned litigation claim strategies is determined in the following ways: Determine the risks associated with the judgment debtor's financial situation, creditworthiness, the nature of the subject matter of enforcement, and the geographical enforcement environment. The execution risk is determined based on the risks associated with the property status, credit status, the nature of the subject matter of execution, and the geographical execution environment.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: Combining the legal elements corresponding to the target litigation claim strategy and the relationships between the various legal elements, the key adjudication rules, the comprehensive risk index of the target litigation claim strategy, and the probability of winning the target litigation claim strategy, a comprehensive risk report of the target litigation claim strategy is generated using a large language model. The comprehensive risk report includes a text predicting the probability of winning, a report predicting potential defense paths and points of attack on evidence. Based on the target litigation claim strategy and the comprehensive risk report, litigation strategy recommendations are generated.

8. The method according to any one of claims 1-6, characterized in that, The method further includes: Optimize the interest claim among the alternative claim amounts of the target litigation claim strategy; Specifically, when the interest request does not exceed four times the LPR, the interest request remains unchanged; when the interest request exceeds four times the LPR, the interest request is adjusted to four times the LPR; when there is no interest request, an interest request is automatically generated based on the current bank loan interest rate or LPR.

9. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the method as claimed in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The system stores a computer program / instructions that, when executed by a processor, implement the method as described in any one of claims 1-8.