Law case information completion method and device and related equipment
By preprocessing the case description text and recognizing entities, combined with the case lead tree and missing value function, follow-up questions are generated and required elements are filled in. This solves the problem of incomplete case information collection in legal services and achieves efficient and accurate case lead matching and information completion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-04-14
AI Technical Summary
When accepting cases for legal services, existing technologies often result in vague and fragmented initial descriptions from users, leading to a lack of core case information collection. This affects the efficiency and accuracy of subsequent legal services. Manual inquiry is inefficient and costly, while general intelligent dialogue systems cannot accurately match case classification rules.
By receiving case description text, preprocessing and entity recognition are performed. Candidate case causes are matched using a case cause guidance tree, the information missing degree is calculated, follow-up questions are generated and supplementary elements are obtained until all required elements are filled. By combining the missing degree function and entity recognition technology, accurate case cause matching and targeted follow-up questions are achieved.
It significantly shortens the information collection time, ensures the completeness of information collection, and improves the efficiency and quality of case handling. Compared with manual questioning, it is more targeted and efficient.
Smart Images

Figure CN121859913A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a method, apparatus and related equipment for completing legal case information. Background Technology
[0002] Currently, when legal services accept cases, users' initial descriptions of the cases are generally vague and fragmented. For example, a user might only say "he owes me money and won't pay it back," making it impossible to directly determine whether the case falls under "private lending dispute," "contract dispute," or "fraud." This lack of clear case classification makes it difficult to gather core case information, thus affecting the efficiency and accuracy of subsequent legal services.
[0003] There are two main existing solutions for collecting case information, both of which have significant shortcomings: one is manual inquiry, which relies on the experience of legal service personnel to determine the cause of action and ask follow-up questions. This is not only inefficient and costly, but also prone to overlooking key elements such as loan agreements and transfer records due to differences in individual experience, resulting in incomplete case registration information. The other is a general intelligent dialogue system. This type of system does not take into account the professional characteristics of the legal industry, cannot accurately match the case classification rules, cannot identify key case elements, and its follow-up questions are not targeted, thus failing to solve the core problems of ambiguous case causes and missing information. Summary of the Invention
[0004] The present invention provides a method, apparatus and related equipment for supplementing legal case information, which aims to solve the technical problem that traditional case acceptance technology is difficult to accurately collect case information.
[0005] In a first aspect, embodiments of the present invention provide a method for supplementing legal case information, comprising: Receive the description text of the current case, preprocess the description text to obtain the corresponding text semantics; Based on the text semantics and the preset cause-of-fact guidance tree, the corresponding candidate cause of fact is matched to obtain at least one candidate cause of fact. Each node of the cause-of-fact guidance tree stores a classic description of the corresponding cause of fact. Entity recognition is performed on the semantic information to obtain at least one case element, and the missing elements of each candidate cause of action are determined by comparing all case elements with the set of required elements corresponding to each candidate cause of action. Based on the missing elements, the degree of missing key information for each candidate case is calculated according to a preset missing information function to obtain the information missing information degree for each candidate case. All candidate case reasons are sorted in reverse order according to the information missing degree, and the candidate case reason with the smallest information missing degree is selected as the current leading case reason; Generate follow-up questions based on the current guiding case and the corresponding missing elements, and output them. Obtain the user's response text to the follow-up question, extract the corresponding supplementary elements from the response text, and match the supplementary elements with the current guiding reason to determine whether the supplementary elements are missing elements of the current guiding reason. If so, the supplementary elements are added to the list of missing elements of the current guiding case, and follow-up questions are generated based on the current guiding case and the corresponding missing elements until all required elements are filled. If not, then a new guiding statement is matched based on the semantics of the response text, and follow-up questions are generated based on the new guiding statement and the corresponding missing elements until all required elements are filled in.
[0006] Secondly, embodiments of the present invention provide a legal case information completion device, which includes: The receiving module is used to receive the description text of the current case, preprocess the description text, and obtain the corresponding text semantics. The matching module is used to match corresponding candidate causes of action based on the semantics of the text and a preset cause of action guidance tree to obtain at least one candidate cause of action. Each node of the cause of action guidance tree stores a classic description of the corresponding cause of action. The comparison module is used to perform entity recognition on the semantic information to obtain at least one case element, and to compare all case elements with the set of required elements corresponding to each candidate cause of action to determine the missing elements of each candidate cause of action. The missing information calculation module is used to calculate the degree of missing key information of each candidate case based on the missing elements and according to a preset missing information degree function, so as to obtain the information missing information degree of each candidate case. The leading cause determination module is used to sort all candidate causes in reverse order according to the information missing degree, and select the candidate cause with the smallest information missing degree as the current leading cause. The follow-up question generation module is used to generate and output follow-up questions based on the current guiding case and the corresponding missing elements. The rematching module is used to obtain the user's response text to the follow-up question, extract the corresponding supplementary elements from the response text, and match the supplementary elements with the current guiding statement to determine whether the supplementary elements are missing elements of the current guiding statement. If so, the supplementary elements are added to the list of missing elements of the current guiding statement, and follow-up questions are generated based on the current guiding statement and the corresponding missing elements until all required elements are filled. If not, a new guiding statement is matched based on the textual semantics of the response text, and follow-up questions are generated based on the new guiding statement and the corresponding missing elements until all required elements are filled.
[0007] Thirdly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the legal case information completion method described in the first aspect.
[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the legal case information completion method described in the first aspect.
[0009] This invention provides a method, apparatus, and related equipment for completing legal case information. The method receives the descriptive text of the current case, preprocesses the descriptive text to obtain corresponding text semantics; matches corresponding candidate causes of action based on the text semantics and a pre-set cause-of-action guidance tree to obtain at least one candidate cause of action; performs entity recognition on the semantic information to obtain at least one case element, and compares all case elements with the required element set corresponding to each candidate cause of action to determine the missing elements of each candidate cause of action; based on the missing elements, calculates the degree of missing key information of each candidate cause of action according to a pre-set missingness function to obtain the information missingness of each candidate cause of action; sorts all candidate causes of action in reverse order according to the information missingness, and selects the candidate cause of action with the smallest information missingness as the current case. The process involves several steps: First, a preliminary lead case is introduced. Based on the current lead case and the lead case tree, follow-up questions are generated and output. Then, the user's response text to the follow-up questions is obtained. Corresponding supplementary elements are extracted from the response text, and these supplementary elements are matched against the current lead case to determine if they are missing elements. If so, the supplementary elements are added to the list of missing elements in the current lead case, and follow-up questions are generated based on the current lead case and the corresponding missing elements until all required elements are filled. If not, a new lead case is matched based on the semantics of the response text, and follow-up questions are generated based on the new lead case and the corresponding missing elements until all required elements are filled. This method achieves accurate lead case matching and targeted follow-up questions through a missing element degree function, significantly shortening information collection time. Compared to traditional manual questioning, it prioritizes questioning missing elements with higher weights, ensuring complete information collection and improving case handling efficiency and quality. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a flowchart illustrating an embodiment of the legal case information completion method provided by the present invention. Figure 2 This is a schematic block diagram of a legal case information completion device provided in an embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0014] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0015] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0016] Please see Figure 1 This is a flowchart illustrating a method for completing legal case information according to an embodiment of the present invention. The method includes steps S110 to S182.
[0017] Step S110: Receive the description text of the current case, preprocess the description text to obtain the corresponding text semantics; Step S120: Based on the text semantics and the preset cause-of-fact guidance tree, match the corresponding candidate cause of action to obtain at least one candidate cause of action; In this embodiment, a case type guidance tree is pre-constructed: based on current laws and regulations and actual judicial cases, major categories of civil, criminal, and administrative cases are sorted out, and primary, secondary, and sub-case types are divided. For example, under the primary cause of action "Contract Dispute," a secondary cause of action "Private Lending Dispute" can be set; then, under "Private Lending Dispute," sub-cause of "Family and Friends Lending Dispute" and other sub-causes can be further subdivided to obtain nodes in the cause of action guidance tree; and the attributes of the nodes can be defined: core attributes are set for each cause of action node, including: ① set of required elements: that is, the key information necessary for the establishment of the cause of action, such as the required elements for "Private Lending Dispute" being {lender's identity, borrower's identity, loan amount, delivery method, repayment period, loan contract or document}; ② set of optional elements: supplementary information, such as loan purpose, interest agreement, etc.; ③ associated legal ID: associated with the corresponding legal provisions and judicial interpretations to facilitate subsequent business support; ④ sub-cause of action pointer: establishes the association with the lower-level sub-cause of action to realize hierarchical jump; ⑤ element discrimination weight: determined through training with historical case data, the higher the weight, the greater the influence of the corresponding element on the determination of the cause of action, for example, the weight of "loan amount" (0.3) is higher than the weight of "place of occurrence" (0.05). In addition, common user expressions can be collected for each cause of action node to form a typical description library. For example, the typical description database for "private lending disputes" includes phrases like "someone owes me money and hasn't paid it back" and "money lent out wasn't repaid on time," which are used to match user input later. The case description tree stores classic descriptions of the corresponding case at each node. In one embodiment, the user's description of the case is obtained through text boxes, speech-to-text conversion, etc. The description text is then cleaned to remove special characters, meaningless words such as "um" and "ah," and then segmented to extract the semantic meaning. A fine-tuned Sentence-BERT model is used to calculate the semantic similarity between the text semantics and the semantic similarity between each case node in the case guidance tree, and the top-ranked case causes based on the semantic similarity are selected as candidate case causes. For example, if the user inputs "He owes me money and hasn't paid it back, there are transfer records," the following outputs are provided after matching: ① Private lending dispute (confidence 0.85); ② Contract dispute (confidence 0.62); ③ Fraud (confidence 0.45).
[0018] Step S130: Perform entity recognition on the semantic information to obtain at least one case element, and compare all case elements with the set of required elements corresponding to each candidate cause of action to determine the missing elements of each candidate cause of action. Step S140: Based on the missing elements, calculate the degree of missing key information for each candidate case according to a preset missing information function to obtain the information missing information degree for each candidate case. Step S150: Sort all candidate case reasons in reverse order according to the information missing degree, and select the candidate case reason with the smallest information missing degree as the current guiding case reason; In this embodiment, Named Entity Recognition (NER) technology is used to extract existing case elements from user input, and then compared with the required element set of each candidate cause of action to determine the missing elements for each candidate cause of action. For example, for the candidate cause of action "private lending dispute," if "transfer record" (corresponding to the delivery method) and "loan amount" are extracted from user input, then the missing elements are "lender's identity," "borrower's identity," and "repayment period." The information missingness of each candidate cause of action is calculated using the following missingness function: ,in, Indicates the first One candidate case; express The Middle Required elements The discrimination weight; Indicates an indicator function, when The value is 1 when nothing is extracted, and when... The value extracted was 0.
[0019] In one embodiment, taking the candidate cause of action "private lending dispute" as an example, its required elements and post-training weights are: lender's identity ( =0.2), Borrower's identity ( =0.25), Loan amount ( =0.25), delivery method ( =0.2), repayment period ( =0.1). If the user's initial input only mentions "transfer record (corresponding to delivery method) and loan of 100,000 yuan (corresponding to loan amount)", then the extracted elements are "delivery method and loan amount", and the missing elements are "lender's identity, borrower's identity, and repayment period". Substitute into the formula to calculate the missing value: M(private lending dispute) = (0.2×1) + (0.25×1) + (0.25×0) + (0.2×0) + (0.1×1) = 0.2 + 0.25 + 0.1 = 0.55.
[0020] Furthermore, all candidate causes of action are sorted in reverse order by the degree of missing information, and the candidate cause of action with the smallest degree of missing information is selected as the current leading cause of action. In addition, if the difference in the degree of missing information of multiple causes of action is ≤0.1 (close), then the cause of action with higher confidence is selected as the current leading cause of action.
[0021] Step S160: Generate follow-up questions based on the current guiding case and the corresponding missing elements, and output them; In this embodiment, the missing elements of the current guiding case are sorted in descending order according to the discrimination weights corresponding to each missing element, resulting in a follow-up question priority queue. Based on the priority order of the follow-up question priority queue, follow-up questions for each missing element are generated sequentially using the case guidance tree and a pre-trained large language model. For example, the missing elements for "private lending dispute" are sorted as follows: borrower identity (…). =0.25) > Lender's identity ( =0.2) > Repayment period ( =0.15). Generate follow-up questions: Based on the sorted missing elements, generate follow-up questions that conform to everyday expression habits. For example, when asking about the borrower's identity: "Are you sure you know the borrower's name, contact information, or ID number?"; when asking about the payment method: "Was the loan paid in cash, by bank transfer, or via WeChat / Alipay?". Furthermore, if the user's answer is still vague (e.g., "I don't know how it was paid"), the system automatically triggers a second-level clarification, providing options for the user to choose from, reducing the difficulty of expression. For example, a second-level clarification for the payment method: "Please select the payment method: A. Cash; B. Bank transfer; C. WeChat Pay; D. Alipay; E. Other."
[0022] Step S170: Obtain the user's response text to the follow-up question, extract the corresponding supplementary elements from the response text, and match the supplementary elements with the current guiding reason to determine whether the supplementary elements are missing elements of the current guiding reason. Step S181: If yes, the supplementary elements are added to the list of missing elements of the current guiding case, and follow-up questions are generated based on the current guiding case and the corresponding missing elements until all required elements are filled. Step S182: If not, then based on the textual semantics of the response text, a new guiding statement is matched, and follow-up questions are generated based on the new guiding statement and the corresponding missing elements until all required elements are filled in.
[0023] In this embodiment, the direction of the case guidance is adjusted based on the user's dynamic answers to ensure accurate case determination. The specific process is as follows: Compare the user's latest answer with the missing elements of the current guiding case, and determine whether the supplementary element is a missing element of the current guiding case. For example, if the current guiding case is "private lending dispute," and the user answers "there is no loan agreement, but the other party wrote a guarantee," the "guarantee" is not a required element for the case "private lending dispute," but it is a required element for the case "guarantee contract dispute," triggering a case jump verification. If yes, the supplementary element is added to the list of missing elements of the current guiding case, and follow-up questions are generated based on the current guiding case and the corresponding missing elements until all required elements are filled. If no, the text semantics of the reply text are re-matched, and the case with the highest matching degree is selected from the case guidance tree as the new guiding case (the original path is trimmed, and the user jumps to the new path). Follow-up questions are generated based on the new guiding case and the corresponding missing elements until all required elements are filled. For example, in the case above, the system jumps to "Guarantee Contract Dispute" and re-executes the missing value calculation and follow-up process of the missing value function; if there is no contradiction.
[0024] In one embodiment, the discrimination weights corresponding to the mandatory elements of each cause of action determine the accuracy of the information missingness calculation and the rationality of the follow-up questioning priority. A weight training model is trained based on historical case studies to ensure the accuracy of the discrimination weights. The specific steps are as follows: 1. Training Data Preparation: Collect complete past case studies as a training sample library. Each sample must include "the user's initial description, the final determined cause of action, complete case elements (including whether required elements are complete), and the case handler's follow-up questions." Sample annotation: First, annotate the set of standard required elements for each cause of action; second, annotate the "impact tags" (critical / important / general) of each element in the cause of action determination process. This annotation is completed by senior legal professionals to ensure accuracy. Finally, select no fewer than 10,000 valid samples, covering the main cause of action types.
[0025] 2. Feature Engineering: Feature extraction is performed on case elements in the training samples, transforming each required element into a quantifiable feature. For example, for the "loan amount" element, features include "whether it is missing, the degree of interference with the determination of the cause of action when missing, and the contribution to the confirmation of the cause of action after supplementation"; at the same time, the "element follow-up priority" feature is extracted based on the questioning order of the case handlers, serving as a reference for weight training.
[0026] 3. Model Construction: A logistic regression model is used as the weight to train the basic model. With "accuracy in case determination" as the optimization objective, the training objective function is constructed as follows: Loss = Σ|Y true - Y pred |, where Y true Y is the actual cause of action label for the sample.pred Based on the current discrimination weight The missing value is calculated and matched with the cause of action label. The labeled sample features are input into the model, with the required elements corresponding to the discrimination weights. Using these as the core training parameters, the loss function is minimized through gradient descent.
[0027] 4. Training and Parameter Optimization: The learning rate was set to 0.01, and the number of iterations was 500. An early stopping mechanism was used to prevent overfitting (training was stopped when the accuracy of case determination on the validation set did not improve for 10 consecutive iterations). During training, the element weights wj for each case were calculated after each iteration. The impact of the weight settings on the determination of different case types was analyzed through the confusion matrix, and the discrimination weights of each required element in the training samples were adjusted accordingly (increasing the weights for rare case samples to improve training balance).
[0028] 5. Weight Calibration and Validation: After training, the discrimination weights are validated using an independent test set (2000 cases that were not involved in training). The effectiveness of the assessment is determined by calculating the "follow-up value coefficient" (i.e., the improvement in the accuracy of case determination after following up on the required element) corresponding to the weight of each element. If the follow-up value coefficient of an element is lower than 0.05, its weight wj is fine-tuned (within ±0.02). Finally, a three-dimensional comparison table of "case cause-element-weight wj" is output and embedded into the corresponding node of DCGT, serving as the core basis for subsequent information missingness assessment.
[0029] Furthermore, in one embodiment, after generating and outputting follow-up questions based on the current leading cause of action and corresponding missing elements, to prevent the user from failing to respond for an extended period and thus making it impossible to determine the current cause of action, a response time limit for the user to the follow-up questions is set, and the user's response time is monitored in real time to see if it exceeds a preset time threshold. If the user's response time exceeds the preset time threshold, i.e., no response is given within the preset response time limit, then the candidate causes of action determined based on the existing dialogue content and the corresponding case elements are displayed. For example, if the user inputs "He owes me money and hasn't paid it back, there are transfer records," the following are displayed: Cause of action ① Private lending dispute (confidence level 0.85) and corresponding case elements; ② Contract dispute (confidence level 0.62) and corresponding case elements; ③ Fraud (confidence level 0.45) and corresponding case elements.
[0030] This method receives the descriptive text of the current case, preprocesses it to obtain corresponding semantic text; matches corresponding candidate case causes based on the semantic text and a pre-set case cause guidance tree to obtain at least one candidate case cause; performs entity recognition on the semantic information to obtain at least one case element, and compares all case elements with the required element set corresponding to each candidate case cause to determine the missing elements of each candidate case cause; based on the missing elements, calculates the degree of missing key information of each candidate case cause according to a pre-set missingness function to obtain the information missingness of each candidate case cause; sorts all candidate case causes in reverse order according to the information missingness, and selects the candidate case cause with the smallest information missingness as the current guiding case cause; generates follow-up questions based on the current guiding case cause and the case cause guidance tree to complete the missing elements. This method achieves accurate case cause matching and targeted follow-up questions through the missingness function, significantly shortening the information collection time. Compared with the traditional method of manual questioning, it prioritizes questioning missing elements with higher weight, ensuring the completeness of information collection and improving the efficiency and quality of case acceptance.
[0031] This invention also provides a legal case information completion device, which is used to execute any embodiment of the aforementioned legal case information completion method. Specifically, please refer to... Figure 2 , Figure 2 This is a schematic block diagram of a legal case information completion device provided in an embodiment of the present invention. The legal case information completion device 100 can be configured in a server.
[0032] like Figure 2 As shown, the legal case information completion device 100 includes a receiving module 110, a matching module 120, a comparison module 130, a missing calculation module 140, a guiding cause of action determination module 150, a follow-up question generation module 160, and a re-matching module 170.
[0033] The receiving module 110 is used to receive the description text of the current case, preprocess the description text, and obtain the corresponding text semantics; The matching module 120 is used to match corresponding candidate causes of action based on the text semantics and a preset cause of action guidance tree to obtain at least one candidate cause of action. Each node of the cause of action guidance tree stores a classic description of the corresponding cause of action. The comparison module 130 is used to perform entity recognition on the semantic information to obtain at least one case element, and to compare all case elements with the set of required elements corresponding to each candidate cause of action to determine the missing elements of each candidate cause of action. The missing information calculation module 140 is used to calculate the degree of missing key information of each candidate case based on the missing elements and according to a preset missing information degree function, so as to obtain the information missing information degree of each candidate case. The guiding cause determination module 150 is used to sort all candidate causes in reverse order according to the information missing degree, and select the candidate cause with the smallest information missing degree as the current guiding cause; The follow-up question generation module 160 is used to generate and output follow-up questions based on the current guiding case and the corresponding missing elements. The rematching module 170 is used to obtain the user's response text to the follow-up question, extract the corresponding supplementary elements from the response text, and match the supplementary elements with the current guiding statement to determine whether the supplementary elements are missing elements of the current guiding statement. If so, the supplementary elements are added to the list of missing elements of the current guiding statement, and follow-up questions are generated based on the current guiding statement and the corresponding missing elements until all required elements are filled. If not, a new guiding statement is matched based on the textual semantics of the response text, and follow-up questions are generated based on the new guiding statement and the corresponding missing elements until all required elements are filled.
[0034] In one embodiment, the follow-up question generation module 160 includes: The priority sorting unit is used to sort the missing elements of the current guiding case in descending order according to the discrimination weights corresponding to each missing element, so as to obtain the follow-up question priority queue. The follow-up question generation unit is used to generate follow-up questions for each missing element sequentially based on the case guidance tree and the pre-trained large language model, according to the priority order of the follow-up question priority queue.
[0035] In one embodiment, the matching module 120 includes: The similarity calculation unit is used to calculate the semantic similarity between the semantics of the text and the classic descriptions of each cause node in the cause guidance tree, and to determine the cause of action whose semantic similarity exceeds a preset similarity threshold as the candidate cause of action.
[0036] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the legal case information completion method described above.
[0037] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the legal case information completion method as described above.
[0038] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. 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, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. 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 implementation should not be considered beyond the scope of this invention.
[0039] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus 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. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.
[0040] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.
[0041] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0042] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.
[0043] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for supplementing legal case information, characterized in that, include: Receive the description text of the current case, preprocess the description text to obtain the corresponding text semantics; Based on the text semantics and the preset cause-of-fact guidance tree, the corresponding candidate cause of fact is matched to obtain at least one candidate cause of fact. Each node of the cause-of-fact guidance tree stores a classic description of the corresponding cause of fact. Entity recognition is performed on the semantic information to obtain at least one case element, and the missing elements of each candidate cause of action are determined by comparing all case elements with the set of required elements corresponding to each candidate cause of action. Based on the missing elements, the degree of missing key information for each candidate case is calculated according to a preset missing information function to obtain the information missing information degree for each candidate case. All candidate case reasons are sorted in reverse order according to the information missing degree, and the candidate case reason with the smallest information missing degree is selected as the current leading case reason; Generate follow-up questions based on the current guiding case and the corresponding missing elements, and output them. Obtain the user's response text to the follow-up question, extract the corresponding supplementary elements from the response text, and match the supplementary elements with the current guiding reason to determine whether the supplementary elements are missing elements of the current guiding reason. If so, the supplementary elements are added to the list of missing elements of the current guiding case, and follow-up questions are generated based on the current guiding case and the corresponding missing elements until all required elements are filled. If not, then a new guiding statement is matched based on the semantics of the response text, and follow-up questions are generated based on the new guiding statement and the corresponding missing elements until all required elements are filled in.
2. The method for completing legal case information as described in claim 1, characterized in that, The calculation of the degree of missing key information for each candidate cause of action based on a preset missingness function includes: The information missingness is calculated using the following formula: ,in, Indicates the first One candidate case; express The Middle Required elements The discrimination weight; Indicates an indicator function, when The value is 1 when nothing is extracted, and when... The value extracted was 0.
3. The method for completing legal case information as described in claim 2, characterized in that, The discrimination weights are determined using the following method: Historical case cases are obtained as training samples, which include a case description, the final determined cause of action, and required elements for each historical case. Initialize the discrimination weights of the required elements corresponding to each training sample, use the logistic regression model as the initial weight training model, input the training samples into the weight training model to determine the cause of action, and obtain the cause of action determined by the model. The model loss between the model's determined cause of action and the corresponding final determined cause of action is calculated according to a preset loss function. The discrimination weights of each required element in the training samples are adjusted according to the model loss, and so on, until the weight training model converges.
4. The method for supplementing legal case information as described in claim 1, characterized in that, After generating and outputting follow-up questions based on the current guiding cause and corresponding missing elements, the process includes: Real-time monitoring of user response time; If the response time exceeds a preset time threshold, the candidate cause of action and the corresponding case elements will be displayed.
5. The method for completing legal case information as described in claim 1, characterized in that, The generation of follow-up questions based on the current lead-in and the lead-in tree includes: Based on the discrimination weights corresponding to each missing element, the missing elements of the current guiding case are sorted in descending order to obtain the follow-up question priority queue. Based on the priority order of the questioning priority queue, questioning statements for each missing element are generated sequentially using the case guidance tree and the pre-trained large language model.
6. The method for completing legal case information as described in claim 1, characterized in that, The process of matching corresponding candidate causes of action based on the text semantics and a pre-set cause-of-action guidance tree yields at least one candidate cause of action, including: Calculate the semantic similarity between the text semantics and each cause node in the cause guidance tree, and select the top-ranked causes based on semantic similarity as candidate causes.
7. A legal case information completion device, characterized in that, include: The receiving module is used to receive the description text of the current case, preprocess the description text, and obtain the corresponding text semantics. The matching module is used to match corresponding candidate causes of action based on the semantics of the text and a preset cause of action guidance tree to obtain at least one candidate cause of action. Each node of the cause of action guidance tree stores a classic description of the corresponding cause of action. The comparison module is used to perform entity recognition on the semantic information to obtain at least one case element, and to compare all case elements with the set of required elements corresponding to each candidate cause of action to determine the missing elements of each candidate cause of action. The missing information calculation module is used to calculate the degree of missing key information of each candidate case based on the missing elements and according to a preset missing information degree function, so as to obtain the information missing information degree of each candidate case. The leading cause determination module is used to sort all candidate causes in reverse order according to the information missing degree, and select the candidate cause with the smallest information missing degree as the current leading cause. The follow-up question generation module is used to generate and output follow-up questions based on the current guiding case and the corresponding missing elements. The rematching module is used to obtain the user's response text to the follow-up question, extract the corresponding supplementary elements from the response text, and match the supplementary elements with the current guiding statement to determine whether the supplementary elements are missing elements of the current guiding statement. If so, the supplementary elements are added to the list of missing elements of the current guiding statement, and follow-up questions are generated based on the current guiding statement and the corresponding missing elements until all required elements are filled. If not, a new guiding statement is matched based on the textual semantics of the response text, and follow-up questions are generated based on the new guiding statement and the corresponding missing elements until all required elements are filled.
8. The legal case information completion device as described in claim 5, characterized in that, The follow-up question generation module includes: The priority sorting unit is used to sort the missing elements of the current guiding case in descending order according to the discrimination weights corresponding to each missing element, so as to obtain the follow-up question priority queue. The follow-up question generation unit is used to generate follow-up questions for each missing element sequentially based on the case guidance tree and the pre-trained large language model, according to the priority order of the follow-up question priority queue.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the legal case information completion method as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the legal case information completion method as described in any one of claims 1 to 6.