Litigation success rate prediction method and device, terminal, server and storage medium
By performing feature extraction and preprocessing on the case description of litigation cases, combined with the analysis of risk characteristic values, a litigation success rate prediction model is constructed, which solves the problems of insufficient data quality and insufficient prediction in complex legal environments in the existing technology, and improves prediction Accuracy and efficiency of legal services.
Patent Information
- Application Number
- CN202410708291.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-09-03
AI Technical Summary
Existing litigation prediction models do not have high requirements for data quality and completeness, resulting in insufficient prediction accuracy and reliability, and are unable to effectively handle complex legal environments and new case types.
By obtaining the case description of the case to be predicted, feature extraction and preprocessing are performed, including deleting duplicate values, completing missing values, correcting outliers and standardizing processing, building a prediction model based on historical case data, and using risk characteristic values to perform similar matching and Statistical analysis and output litigation success rate prediction report.
It improves the accuracy and reliability of litigation prediction, reduces the impact of changes in the legal environment on the prediction model, and ensures the quality and efficiency of legal services.
Smart Images

Figure CN118587048A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data analysis technology, and specifically relates to a litigation success rate prediction method, device, terminal, server and storage medium. Background Art
[0002] At present, litigation prediction in the legal field generally relies on the experience and intuitive judgment of lawyers. Although this method has certain practical value, it also has obvious limitations. First, manual judgment is easily affected by individual experience, emotions or other subjective factors, resulting in prediction bias. Second, with the increasing complexity of case types and legal environments, it has become increasingly difficult to accurately grasp all potential risks and variables based on personal experience alone.
[0003] Although there are related technologies in the prior art that use big data models to predict litigation, in the research and practice of the prior art, the inventors of this application found that:
[0004] The current litigation prediction big model's definition of data quality and completeness fails to meet users' demands for accuracy and reliability of litigation predictions. Errors, omissions or biases in its data may directly affect the accuracy and reliability of the predictions. In addition, the uniqueness of a specific case may be ignored in the data set, affecting the model's ability to judge similar cases.
[0005] As the legal environment and legal rules are constantly changing, the current litigation prediction model relies too much on historical data, which may cause the model to be unable to make accurate predictions when faced with new legal environments or case types that have never occurred.
[0006] Based on this, there is a need to provide a more scientific and systematic method for predicting the success rate of litigation to improve the accuracy of litigation predictions and ensure the quality and efficiency of legal services. Summary of the invention
[0007] In view of this, the present application provides a litigation success rate prediction method, device, terminal, server and storage medium, wherein the litigation success rate prediction method can overcome the above-mentioned defects of the prior art and improve the accuracy of litigation prediction.
[0008] In a first aspect, the present application provides a method for predicting a litigation success rate, the method comprising at least the following steps: obtaining a case description of a case to be predicted, and performing feature extraction on the case description to obtain a feature vector capable of characterizing the case description; using the feature vector as input, and predicting the litigation success rate of the case to be predicted through a trained prediction model; wherein the trained prediction model is obtained by training based on a first case data set related to the case to be predicted; based on the feature vector, similarity matching is performed between the case to be predicted and the cases in the first case data set to obtain a second case data set; wherein the cases in the second case data set are sorted in descending order of similarity to obtain similar reference cases; based on the second case data set, statistics are performed on the litigation results of historical cases; wherein the litigation results of historical cases include the judgment results, risk characteristic values and historical litigation success rates of each case, and the risk characteristic values are the characteristics and proportions of the judgment standard elements involved in the case description in the judgment results; and outputting a prediction report based on the litigation success rate prediction results of the case to be predicted, similar reference cases, and the litigation results of historical cases.
[0009] In this aspect, assuming that the case to be predicted is a case involved in the case, the first case data set refers to a collection of cases that contain part or all of the case involved information, or are similar to the case involved information. The cases in this case set may contain the following information: case characteristics, including case type, legal clauses involved in the case, and the place where the case is accepted; case facts, including basic facts, evidence facts, background facts, legal facts, and any other information that may affect the judgment, such as economic conditions, psychological state, social relations, etc.; party information, including personal or institutional information of the plaintiff and the defendant; court information, including information about the court handling the case, and the judgment result; time information, such as the time of prosecution and the time of closing the case. Further, the key case information of the case description of the case to be predicted is analyzed and extracted, and similar matching is performed with the cases in the first case data set to obtain the most similar historical cases, which is the second case data set.
[0010] By introducing the risk characteristic value of the case, the characteristics and proportions of the judgment standard elements involved in the case description in historical cases (i.e., the core claims and opinion elements in the judgment essentials, including the focus of the dispute, legal basis, fact determination, application of law, analysis of rights and obligations, reasons for the ruling, judgment results, trial procedure instructions and other considerations, etc.) are determined. In the statistics of historical case litigation results in the second case data set (the judgment results of each case, risk characteristic values and historical litigation success rates), as well as in the training of the prediction model based on the first case data set, the statistical analysis of historical cases is more scientific and accurate, and by quantifying risks, it can promote the optimization of resource allocation of the prediction model, enhance the discrimination and accuracy of the prediction model, and thus improve the accuracy of litigation prediction.
[0011] In one possible implementation, after obtaining the case description of the case to be predicted, it also includes: preprocessing the case description, including: deleting duplicate values in the case description; determining whether the missing values in the case description are key evidence; if so, filling the missing values, including mean / median / mode interpolation, fixed value filling, nearest neighbor interpolation, regression interpolation, and function interpolation; if not, deleting the samples or features containing the missing values; wherein the key evidence is data that can affect the trial process and / or trial results of the case to be predicted; determining whether the outliers in the case description are key evidence; if so, identifying the outliers based on an outlier detection algorithm, and correcting the outliers using an interpolation method or a regression model; if not, deleting the outliers, or deleting the samples or features containing the outliers; and standardizing the data structure of the case description based on the data structure applicable to the trained machine learning model.
[0012] In this possible implementation method, by deleting duplicate values, the influence of data duplication on model training and results can be avoided, and the purity and accuracy of the data can be maintained; for the missing values of key evidence, the corresponding technical means are used to complete the processing to ensure the integrity of the data, avoid the information loss caused by missing data, and improve the accuracy of the model; for the outliers in the key evidence, the corresponding technical means are used to correct the processing to avoid the influence of outliers on model training and results, and improve the robustness of the model; standardization can eliminate the dimensional differences between different features, making the data structure more unified, which is conducive to the training and optimization of machine learning models. Based on this, the present application can ensure the integrity, accuracy and consistency of the data and improve the stability and prediction performance of the model by performing technical steps such as deleting duplicate values, completing missing values, correcting outliers, and standardizing data structures in the preprocessing of the case description. The application of these technical steps can make the model more complete and reliable, so that it can be better applied to the analysis and processing of case description data.
[0013] In one possible implementation, the feature extraction of the case description to obtain a feature vector capable of representing the case description includes: extracting text features in the case description, wherein the extraction means include one or more of bag of words, word frequency-inverse text frequency, word embedding, pre-trained language model, part-of-speech tagging, named entity recognition, sentiment analysis, representing text by word frequency or sequence length, grammar-based features, and document embedding; constructing a feature vector for representing the case description based on the text features; and selecting the feature vectors to eliminate irrelevant or redundant feature vectors and determine an optimal feature subset.
[0014] In this possible implementation, Bag of Words refers to converting the words in the case description into a vector representation in the order of appearance, ignoring grammar and word order; TF-IDF refers to counting the frequency of words in the case description and weighting them by inverse text frequency to highlight important words; Word Embedding refers to converting words into dense vector representations, such as Word2Vec, GloVe and other methods; Pre-trained Language Models refers to using pre-trained language models (such as BERT, GPT, etc.) to obtain text features; Part-of-Speech Tagging refers to marking the part of speech of each word and extracting grammatical information; Named Entity Recognition refers to identifying named entities (such as names of people, places, and organizations) in the case description; Sentiment Analysis Analysis refers to analyzing the emotional tone in the case description and extracting emotional features; representing text by word frequency or sequence length refers to representing text features based on the frequency of occurrence of words in the case description or the length of the sequence; grammar-based features refers to extracting grammatical information from the case description, such as syntactic structure, verb form, etc.; document embedding refers to representing the entire document as a vector, taking into account the phrases, semantics and other information in the text.
[0015] It is understandable that the present application selects the most representative and relevant features from the original feature set of the case description by combining the actual situation of the case to be predicted, so as to build the model and make predictions. Selecting a suitable feature subset can effectively reduce the dimension of the model, reduce the risk of overfitting, and improve the model interpretability. For example, the correlation between each feature vector and the target variable can be calculated to select those feature vectors that are highly correlated with the target variable, while eliminating the feature vectors with low correlation with the target variable; or analyze the variance of each feature vector and eliminate the feature vectors with small variance, because the feature vectors with small variance often carry less information; or use machine learning models such as random forests, gradient boosting trees, etc., to determine which feature vectors contribute the most to the model prediction results by evaluating the importance of features, and then eliminate the feature vectors with low importance; or convert the original feature vectors into linearly independent principal components through principal component analysis, and then select the most important principal components to represent the original feature vectors, so as to achieve the purpose of dimensionality reduction and elimination of redundant features, etc. Based on this, eliminating irrelevant or redundant feature vectors can improve the simplicity and generalization ability of the model, reduce the noise interference of features, and speed up the training and prediction of the model.
[0016] In one possible implementation, the feature vector is used as input to predict the trial duration of the case to be predicted using a trained prediction model.
[0017] In this possible implementation method, based on the above-mentioned processed historical case data, i.e., the first case data set and the second case data set, it is assumed that models such as random forest and support vector machine (SVM) are used to predict the trial time of the case, and hyperparameter tuning is performed, and the data set is divided into a training set and a validation set for model training. The model is trained using the training set, the model effect is evaluated using the validation set, and the model performance is optimized by cross-validation and the like. Finally, the prediction effect of the model is evaluated using evaluation indicators (e.g., root mean square error RMSE, mean absolute error MAE, etc.), and adjusted and calibrated again as needed. Then, the case description of the case to be predicted and its corresponding feature vector can be determined, and the trial time prediction result of the case to be predicted can be obtained through the trained prediction model, and the rationality and credibility of the prediction result can be analyzed, such as the confidence interval of the prediction can be evaluated using the uncertainty estimation method. Therefore, the present application can also accurately predict the trial time of an ongoing litigation case, or the trial time of a litigation case to be conducted.
[0018] In a possible implementation, based on the feature vector, similarity matching is performed between the case to be predicted and the case in the first case data set to obtain the second case data set, including: performing cosine similarity matching between the feature vector of the predicted case and the feature vector of the case in the first case data set, and the cosine similarity calculation formula is:
[0019]
[0020] Wherein, A and B represent two vectors respectively, and cosine similarity is the cosine of the angle between two n-dimensional vectors in n-dimensional space, that is, it is equal to the dot product (vector product) of the two vectors divided by the product of the lengths (or sizes) of the two vectors; alternatively, the feature vector of the predicted case is matched with the feature vector of the case in the first case data set by Jaccard similarity.
[0021] In one possible implementation, the calculation formula for the historical litigation success rate is as follows:
[0022]
[0023] Where S is the number of successful cases, W i is the weight corresponding to the risk characteristic value of the i-th successful case, T is the number of cases in the second case data set, and W j is the weight corresponding to the risk characteristic value of the jth case. In this possible implementation method, the risk characteristic value can be used to determine the characteristics and proportions of the elements of the judgment standard involved in the case description in historical cases, and can characterize the core claims and viewpoints in the judgment essentials, including legal basis, fact finding, legal application, rights and obligations analysis, reasons for the ruling, judgment results, trial procedure description and other considerations, which can directly affect the judgment result of the case. Therefore, by introducing the risk characteristic value, the litigation risk is quantified, the discriminatory power and accuracy of the case judgment result or litigation success rate analysis statistics are enhanced, and it is used to improve the accuracy of litigation prediction. It can be understood that the weight corresponding to the risk characteristic value should be determined by comprehensively evaluating the degree of influence of each characteristic and proportion of the judgment standard elements involved in the case description on the judgment result.
[0024] It can be understood that the trained prediction model shown in the above embodiment is a complete legal model. Through the data of the case to be predicted provided by the user and the preprocessing of data completion and correction, it can ensure the data quality and integrity, improve the judgment of the prediction model on similar cases, and promote the optimization of resource allocation of the prediction model by introducing risk characteristic values, enhance the discrimination of the prediction model and the accuracy of the output of the prediction results (the litigation success rate prediction results of the case to be predicted, similar reference cases, and the litigation results of the historical cases, including the judgment results of each case, risk characteristic values and historical litigation success rates), reduce the impact of the changing legal environment and legal rules on the prediction model to a certain extent, thereby improving the accuracy of litigation predictions and ensuring the quality and efficiency of legal services.
[0025] In a second aspect, the present application provides a litigation success rate prediction device, which at least includes: a data acquisition module, which is used to obtain a case description of a case to be predicted; a feature extraction module, which is used to extract features from the case description to obtain a feature vector that can characterize the case description; a prediction module, which is used to use the feature vector as input to predict the litigation success rate of the case to be predicted through a trained prediction model; wherein the trained prediction model is obtained by training based on a first case data set related to the case to be predicted; a similarity matching module, which is used to perform similarity matching between the case to be predicted and the cases in the first case data set based on the feature vector to obtain a second case data set; wherein the cases in the second case data set are sorted in descending order of similarity to obtain similar reference cases; a statistical module, which is used to perform statistics on historical case litigation results based on the second case data set; wherein the historical case litigation results include the judgment result, risk characteristic value and historical litigation success rate of each case, and the risk characteristic value is the characteristics and proportion of the judgment standard elements involved in the case description in the judgment result; a report generation module, which is used to output a prediction report based on the litigation success rate prediction result of the case to be predicted, the similarity matching result, and the historical case litigation result.
[0026] In one possible implementation, the device also includes: a preprocessing module for preprocessing the case description; the preprocessing module includes: a first submodule for deleting repeated values in the case description; a second submodule for determining whether the missing values in the case description belong to key evidence; if so, the missing values are filled, including mean / median / mode interpolation, fixed value filling, nearest neighbor interpolation, regression interpolation, and function interpolation; if not, the samples or features containing the missing values are deleted; wherein the key evidence is data that can affect the trial process and / or trial results of the case to be predicted; a third submodule for determining whether the outliers in the case description belong to key evidence; if so, the outliers are identified based on the outlier detection algorithm, and the outliers are corrected using an interpolation method or a regression model; if not, the outliers are deleted, or the samples or features containing the outliers are deleted; a fourth submodule is used to standardize the data structure of the case description based on the data structure applicable to the trained machine learning model.
[0027] In one possible implementation, the feature extraction module includes: a fifth submodule, used to extract text features in the case description, the extraction means including one or more of bag of words, word frequency-inverse text frequency, word embedding, pre-trained language model, part-of-speech tagging, named entity recognition, sentiment analysis, text representation by word frequency or sequence length, grammar-based features, and document embedding; a sixth submodule, used to construct a feature vector for characterizing the case description based on the text features; and a seventh submodule, used to select the feature vectors to eliminate irrelevant or redundant feature vectors and determine the optimal feature subset.
[0028] In a possible implementation, the prediction module is further used to take the feature vector as input and predict the trial duration of the case to be predicted through a trained prediction model.
[0029] In a possible implementation, the similarity matching module is used to perform cosine similarity matching between the feature vector of the predicted case and the feature vector of the case in the first case data set. The cosine similarity calculation formula is:
[0030]
[0031] Wherein, A and B represent two vectors respectively, and cosine similarity is the cosine of the angle between two n-dimensional vectors in n-dimensional space, that is, equal to the dot product (vector product) of the two vectors divided by the product of the lengths (or sizes) of the two vectors; or, used to perform Jaccard similarity matching on the feature vector of the predicted case with the feature vector of the case in the first case data set.
[0032] In one possible implementation, the calculation formula for the historical litigation success rate is as follows:
[0033]
[0034] Where S is the number of successful cases, W i is the weight corresponding to the risk characteristic value of the i-th successful case, T is the number of cases in the second case data set, and W j is the weight corresponding to the risk characteristic value of the jth case.
[0035] In a third aspect, the present application provides a terminal comprising a touch screen, a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the terminal implements the litigation success rate prediction method as described above.
[0036] In a fourth aspect, the present application provides a server, comprising a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the server implements the litigation success rate prediction method as described above.
[0037] In a fifth aspect, the present application provides a storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the litigation success rate prediction method as described above.
[0038] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0040] Figure 1 It is a flowchart of a litigation success rate prediction method provided by an embodiment of the present application;
[0041] Figure 2It is a flowchart of a litigation success rate prediction method provided by an embodiment of the present application;
[0042] Figure 3 It is a flowchart of a litigation success rate prediction method provided by an embodiment of the present application;
[0043] Figure 4 It is a flowchart of a litigation success rate prediction method provided by an embodiment of the present application;
[0044] Figure 5 It is a flowchart of constructing a prediction model provided by an embodiment of the present application;
[0045] Figure 6 It is a flowchart of constructing a recommendation model provided by an embodiment of the present application;
[0046] Figure 7 It is a structural schematic diagram of a litigation success rate prediction device provided by an embodiment of the present application;
[0047] Figure 8 It is a structural schematic diagram of a litigation success rate prediction device provided by an embodiment of the present application;
[0048] Fig. 9 It is a hardware structure diagram of a litigation success rate prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] Where there are descriptions involving “first”, “second”, etc. in the specification and claims of this application and the above-mentioned drawings, the descriptions of “first”, “second”, etc. are only used for descriptive purposes to distinguish different objects, rather than for describing a specific order, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features.
[0051] The terms "including" and "having" and any variations thereof as used herein are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units or modules is not limited to the listed steps or units or modules, but may optionally include steps or units or modules not listed, or may optionally include other steps or units or modules inherent to these processes, methods, products or devices.
[0052] For "and / or" or "and / or" appearing in the text, its meaning includes three parallel solutions. Taking "A and / or B" as an example, it includes Solution A, or Solution B, or a solution in which both A and B are satisfied.
[0053] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0054] The technical solution provided by the embodiments of the present application can overcome the defects of unstable and inaccurate prediction models in the prior art. Through the data of the case to be predicted provided by the user and the preprocessing of the data completion and correction, the data quality and integrity can be ensured to improve the judgment of the prediction model on similar cases, and the optimization of the resource allocation of the prediction model can be promoted by introducing risk characteristic values, thereby enhancing the discrimination of the prediction model and the accuracy of the output of the prediction results (the prediction results of the litigation success rate of the case to be predicted, similar reference cases, and the litigation results of the historical cases, including the judgment results of each case, the risk characteristic values and the historical litigation success rates). To a certain extent, the impact of the changing legal environment and legal rules on the prediction model can be reduced, thereby improving the accuracy of litigation predictions and ensuring the quality and efficiency of legal services.
[0055] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0056] See also Figure 1 , Figure 1 It is a flowchart of a litigation success rate prediction method provided in one embodiment of the present application.
[0057] Step S100: Obtain a case description of a case to be predicted, and perform feature extraction on the case description to obtain a feature vector capable of representing the case description.
[0058] In this embodiment, the case to be predicted can be an ongoing litigation case or a litigation case to be prepared. It should be noted that the case to be predicted can also be a specific event of a dispute, accident, etc. provided by the user that can be classified into any one or more of civil cases, economic cases, criminal cases, administrative cases, intellectual property cases, labor dispute cases, divorce cases, etc. For example, Zhang San's home was robbed and valuable property was lost. Based on the evidence collected at hand, Zhang San determined that the property he lost was stolen by his neighbor Li Si, but Li Si refused to admit it, so Zhang San had the idea of suing Li Si for theft. Then this specific event can be used as the case to be predicted referred to in this embodiment.
[0059] In this embodiment, the case description includes but is not limited to: the facts, that is, a detailed description of the cause, development, related events and behaviors of the case; the identity and relationship of the parties, that is, listing the identity, relationship, background and other information of the parties involved in the case; the request for prosecution, that is, clarifying the prosecution's request, that is, what kind of judgment or decision the court hopes to make; evidence information, that is, listing the evidence provided by the parties and the testimony of relevant witnesses, including written evidence and on-site evidence; legal basis, that is, indicating the legal provisions, regulations, precedents, etc. involved, to support the prosecution's claims; the focus of the dispute, that is, summarizing the focus of the dispute between the parties to the case, that is, the core issues that need to be resolved during the court trial; process and results, that is, describing the development process of the case in the judicial process and the results of each stage, etc. The cases involved by the user include civil cases, economic cases, criminal cases, administrative cases, intellectual property cases, labor dispute cases and divorce cases, etc., and each type of case can be subdivided into multiple types according to the specific circumstances. For example, civil cases involve civil disputes between individuals, such as contract disputes, marriage and family disputes, property disputes, etc. Among them, contract disputes include but are not limited to contract performance, contract termination, contract breach, etc.; marriage and family disputes include but are not limited to divorce agreement disputes, child custody disputes, property division, etc.; and property disputes refer to disputes involving property rights and interests, mainly including the following situations: disputes involving contractual relationships such as sale, lease, and loan, such as contract breach, contract termination, contract performance, etc.; one party obtains improper benefits without legal basis, resulting in damage to the rights and interests of the other party, such as infringement, unfair competition, etc.; situations involving one party making a promise but failing to perform or being unable to perform, causing losses, such as breach of contract, arrears of payment, etc.; refers to disputes arising in the process of executing court judgments or rulings, including refusal to execute judgments, improper execution procedures, etc.; disputes involving inheritance or distribution of estates, such as the validity of wills, order of inheritance, etc.; issues involving transfer of real estate rights and interests, ownership of use rights, illegal construction of houses, etc.; issues involving company shareholder rights, corporate governance, equity transfer, etc.
[0060] It is understandable that each type of case has different characteristics and trial procedures. The case summary, party information, case background, course of events, evidence materials, applicable law, and investigation and trial process of each specific case under each sub-type are all different. Therefore, each type has various sub-types, and each case under each sub-type corresponds to a different case description and key information.
[0061] Based on this, in order to clearly, completely and accurately determine the case description of the case involved by the user, it is necessary to obtain the relevant information of the case involved provided by the user as much as possible, including but not limited to the user's current consultation record, historical consultation record, uploaded documents, images, voice, video, etc. Furthermore, this embodiment can accurately and completely determine the case description of the case corresponding to the lawsuit, dispute or accident that the user wants to express through the current consultation record, or through the current consultation record, combined with the traced historical consultation record, it can accurately and completely determine the case description of the case corresponding to the lawsuit, dispute or accident that the user wants to express. It can be understood that the consultation record includes chat records, and also includes but is not limited to one or more of documents, images, voice, and video, that is, this embodiment can extract or complete the case description that the user wants to express by analyzing the image, voice, or video materials uploaded by the user, which is convenient for users who are not good at text expression or are not convenient for text expression.
[0062] For users who are not good at expressing themselves in words, it is often difficult for them to accurately describe the details of the case or to express what they think in their hearts. For users who are not convenient to express themselves in words, or because of environmental problems or other inconveniences, using voice, taking photos, or recording videos is more direct, efficient, clear and complete. In the method of this embodiment, voice recognition technology, image recognition technology, or video stream processing technology is used to extract or complete the case description that the user wants to express by analyzing the images, voice, or video materials uploaded by the user.
[0063] For example, Zhang San is driving a motor vehicle normally on the road. The motor vehicle is equipped with a functioning driving recorder, which happens to fully record the process of Zhang San being madly cut off, cursed, and beaten by a "road rage" driver (no car accident occurred, and other road traffic was not obstructed). Then Zhang San can open the conversation page on the APP that applies this embodiment, upload the video (or a few words of introduction to the incident by Zhang San, who is not good at speaking), and the APP background will be able to accurately analyze the case description that Zhang San wants to express.
[0064] In this embodiment, the user's current consultation record, historical consultation record, and / or uploaded documents, images, voices, videos, etc. can be obtained by receiving input from the user through an input component, wherein the input component includes: a keyboard, a mouse, a touch screen, a touch pad, and an audio input device, etc. It can also be sent by a receiving terminal, wherein the terminal includes a mobile phone, a computer, a tablet computer, a server, etc. The method of obtaining the above data is not limited in this embodiment.
[0065] In one possible implementation, see Figure 2 , Figure 2 It is a flowchart of a litigation success rate prediction method provided in one embodiment of the present application.
[0066] Preprocessing the case description includes:
[0067] Step S110, deleting duplicate values in the case description;
[0068] Step S120: determining whether the missing value in the case description belongs to key evidence, where the key evidence is data that can affect the trial process and / or trial result of the case involving the user;
[0069] Step S121: If yes, then the missing values are filled, including mean / median / mode interpolation, fixed value filling, nearest neighbor interpolation, regression interpolation, and function interpolation;
[0070] Step S122: If not, delete the samples or features containing missing values;
[0071] Step S130, determining whether the abnormal value in the case description is a key evidence;
[0072] Step S131: If yes, then based on the outlier detection algorithm, identify the outliers and use interpolation or regression model to correct the outliers;
[0073] Step S132: if not, delete the outlier, or delete the sample or feature containing the outlier;
[0074] Step S140: Based on the data structure applicable to the trained machine learning model, the data structure of the case description is standardized.
[0075] In this embodiment, by deleting duplicate values, the influence of data duplication on model training and result deviation can be avoided, and the purity and accuracy of the data can be maintained; for the missing values of key evidence, the corresponding technical means are used to complete the processing to ensure the integrity of the data, avoid the information loss caused by missing data, and improve the accuracy of the model; for the outliers in the key evidence, the corresponding technical means are used to correct the processing to avoid the influence of outliers on model training and result deviation, and improve the robustness of the model; standardization can eliminate the dimensional differences between different features, making the data structure more unified, which is conducive to the training and optimization of machine learning models. Based on this, this application can ensure the integrity, accuracy and consistency of the data and improve the stability and prediction performance of the model by performing technical steps such as deleting duplicate values, completing missing values, correcting outliers, and standardizing data structures in the preprocessing of the case description. The application of these technical steps can make the model more complete and reliable, so that it can be better applied to the analysis and processing of case description data.
[0076] For example, to determine whether the missing values in the case description are key evidence, first identify the core issues of the case, that is, clarify what the core dispute points of the case are. For example, in a traffic accident lawsuit, the core issue may be to determine the responsible party, and any evidence related to determining the responsibility is key. Then analyze the completeness of the existing evidence, that is, review the existing case files, identify all the evidence mentioned, and evaluate whether the evidence is sufficient to support or refute the core dispute points. For example, if a description of the accident scene or related traffic surveillance video is missing in a traffic accident case, this may be a key missing evidence. Assess the potential impact of the missing information, that is, for each missing point of information found, assess its possible impact on the outcome of the case. If the missing information directly affects the resolution of the core dispute points, then this information is key evidence. For example, if a copy of the employee's work contract is missing in a labor dispute case, this may be a key evidence because the content of the contract is directly related to the rights, responsibilities and obligations of both parties.
[0077] For example, suppose that in a commercial contract dispute case, the key point of dispute is whether the payment terms in the contract have been fulfilled. If the case file lacks a payment confirmation signed by both parties or related bank transaction records, the missing information in this case is likely to be decisive evidence. Because these documents can directly prove or deny whether the defendant has fulfilled his payment obligations, they have a direct impact on the judgment of the case. Through the preprocessing steps of the above embodiment, it is possible to effectively determine whether the missing information in the case description may change the outcome of the lawsuit, thereby deciding whether it is necessary to focus on and process this information. This is crucial to ensure the accuracy of the success rate of the lawsuit.
[0078] In a possible implementation, feature extraction is performed on the case description to obtain a feature vector that can characterize the case description. This may be achieved by extracting text features from the case description, using one or more of bag of words, word frequency-inverse text frequency, word embedding, pre-trained language model, part-of-speech tagging, named entity recognition, sentiment analysis, representing text by word frequency or sequence length, grammar-based features, and document embedding, and then constructing a feature vector for characterizing the case description based on the text features. It can be understood that feature extraction is the process of converting raw data into a form that is easy to process and analyze. In this embodiment, feature extraction and engineering processing are performed on the case description, so that the case description data is converted into features that can be used for machine learning.
[0079] For example, suppose there is a lawsuit, and the case description is: "Plaintiff A claims that defendant B failed to fulfill its obligation to pay for goods within the agreed period of the contract, causing plaintiff A to suffer economic losses. Plaintiff A provided written contracts, transaction records and other relevant evidence to support his claim. Defendant B argued that plaintiff A failed to provide goods as agreed in the contract and was in breach of contract. During the trial, the court believed that it was necessary to further investigate the evidence and circumstances of both parties to determine the facts and legal basis of the case. Text feature extraction for this case description can include: Text cleaning: Removing stop words , punctuation marks, and convert them to lowercase; word segmentation: segment the text to get words such as "plaintiff A", "defendant B", "contract", "payment", "economic loss", etc.; bag of words model: convert words into vector representations, such as {"plaintiff A":1,"defendant B":2,"contract":3,"payment":4,"economic loss":5}; TF-IDF: calculate the TF-IDF value of each word, emphasizing the importance of key words; N-gram features: extract adjacent word combinations, such as "plaintiff A defendant B", "defendant B contract" as features; Word Embedding: map words to high-dimensional vector representations to capture the semantic associations between words; topic modeling: identify topics that may be involved in the case description, such as "contract performance" and "breach of contract"; sentiment analysis: analyze the emotional color in the words of the plaintiff and the defendant to determine whether the claim is positive or negative. Through the above text feature extraction methods, key information in the case description can be obtained and further converted into feature vectors that can be used for machine learning algorithm analysis, helping the machine learning model to better understand and analyze the content of the case description.
[0080] In one possible implementation, see Figure 3 , Figure 3 It is a flowchart of a litigation success rate prediction method provided in one embodiment of the present application.
[0081] Step S150, extracting text features from the case description, wherein the extraction means include one or more of bag of words, word frequency-inverse text frequency, word embedding, pre-trained language model, part-of-speech tagging, named entity recognition, sentiment analysis, representing text by word frequency or sequence length, grammar-based features, and document embedding;
[0082] Step S160: constructing a feature vector for representing the case description based on the text features;
[0083] Step S170: Select the feature vectors to eliminate irrelevant or redundant feature vectors and determine the optimal feature subset.
[0084] In this embodiment, Bag of Words refers to converting the words in the case description into vector representation in the order of appearance, ignoring grammar and word order; TF-IDF refers to counting the frequency of words in the case description and weighting them by inverse text frequency to highlight important words; Word Embedding refers to converting words into dense vector representation, such as Word2Vec, GloVe and other methods; Pre-trained Language Models refers to using pre-trained language models (such as BERT, GPT, etc.) to obtain text features; Part-of-Speech Tagging refers to marking the part of speech of each word and extracting grammatical information; Named Entity Recognition refers to identifying named entities (such as names of people, places, and organizations) in the case description; Sentiment Analysis Analysis refers to analyzing the emotional tone in the case description and extracting emotional features; representing text by word frequency or sequence length refers to representing text features based on the frequency of occurrence of words in the case description or the length of the sequence; grammar-based features refers to extracting grammatical information from the case description, such as syntactic structure, verb form, etc.; document embedding refers to representing the entire document as a vector, taking into account the phrases, semantics and other information in the text.
[0085] For example, a case description may contain a large amount of personal information, such as the age, occupation, and educational background of the parties. Unless this information is directly related to the legal issues of the case, it is usually considered irrelevant information and needs to be removed from the analysis data. Although the case background provides environmental information, excessive and detailed background descriptions, such as irrelevant historical events, geographical information, etc., can be considered content that needs dimensionality reduction. In case documents, especially when multiple documents are aggregated, there may be repeated information. This type of information increases the complexity of data processing and should be identified and removed through technical means. Sometimes lawyers or judges will cite a large number of legal provisions or precedents when describing a case, but not all citations are directly related to the outcome of the case. Distinguishing which legal provisions are core and which are incidental can help simplify the data set. Case descriptions may contain emotional language or subjective evaluations, which should be ignored or eliminated when conducting rigorous legal analysis to avoid affecting objectivity. In a long or multi-stage litigation process, some early information may become irrelevant over time. Identifying and updating this information is part of the dimensionality reduction process. In a case, some evidential information may not have a direct impact on the final decision. Although screening this type of information is challenging, it helps focus on the key factors that affect the outcome of the case. The feature vectors corresponding to the above information are all irrelevant or redundant feature vectors to be eliminated.
[0086] In this embodiment, by combining the actual situation of the case involved by the user, the most representative and relevant features are selected from the original feature set of the case description for building a model and making predictions. Selecting a suitable feature subset can effectively reduce the dimension of the model, reduce the risk of overfitting, and improve the model interpretability. For example, by calculating the correlation between each feature vector and the target variable, those feature vectors that are highly correlated with the target variable can be selected, and the feature vectors with low correlation with the target variable can be eliminated; or the variance of each feature vector can be analyzed to eliminate the feature vectors with small variance, because the feature vectors with small variance often carry less information; or machine learning models such as random forests, gradient boosting trees, etc. are used to determine which feature vectors contribute the most to the model prediction results by evaluating the importance of features, and then eliminate the feature vectors with low importance; or the original feature vectors are converted into linearly independent principal components through principal component analysis, and then the most important principal components are selected to represent the original feature vectors, so as to achieve the purpose of dimensionality reduction and elimination of redundant features, etc. Based on this, eliminating irrelevant or redundant feature vectors can improve the simplicity and generalization ability of the model, reduce the noise interference of features, and speed up the training and prediction speed of the model.
[0087] Step S200: using the feature vector as input, predicting the litigation success rate of the case to be predicted through a trained prediction model, wherein the trained prediction model is obtained by training based on a first case data set related to the case to be predicted.
[0088] In this embodiment, assuming that the case to be predicted is a case involved in the case, the first case data set refers to a collection of cases that contain part or all of the case involved information, or are similar to the case involved information. The cases in this case set may contain the following information: case characteristics, including case type, legal clauses involved in the case, and the place where the case is accepted; case facts, including basic facts, evidence facts, background facts, legal facts, and any other information that may affect the judgment, such as economic conditions, psychological state, social relations, etc.; party information, including personal or institutional information of the plaintiff and the defendant; court information, including information about the court handling the case, and the judgment result; time information, such as the time of prosecution and the time of closing the case. Furthermore, by analyzing and extracting the key case information of the case description of the case to be predicted, and performing similar matching with the cases in the first case data set, a number of the most similar historical cases can be obtained, which is the second case data set.
[0089] In one possible implementation, see Figure 4 , Figure 4 It is a flowchart of a litigation success rate prediction method provided in one embodiment of the present application.
[0090] Step S210: taking the feature vector as input, predicting the trial duration of the case to be predicted through the trained prediction model.
[0091] In this possible implementation method, based on the above-mentioned processed historical case data, i.e., the first case data set and the second case data set, it is assumed that models such as random forest and support vector machine (SVM) are used to predict the trial time of the case, and hyperparameter tuning is performed, and the data set is divided into a training set and a validation set for model training. The model is trained using the training set, the model effect is evaluated using the validation set, and the model performance is optimized by cross-validation and the like. Finally, the prediction effect of the model is evaluated using evaluation indicators (e.g., root mean square error RMSE, mean absolute error MAE, etc.), and adjusted and calibrated again as needed. Then, the case description of the case to be predicted and its corresponding feature vector can be determined, and the trial time prediction result of the case to be predicted can be obtained through the trained prediction model, and the rationality and credibility of the prediction result can be analyzed, such as the confidence interval of the prediction can be evaluated using the uncertainty estimation method. Therefore, the present application can also accurately predict the trial time of an ongoing litigation case, or the trial time of a litigation case to be conducted.
[0092] Step S300: Based on the feature vector, the case to be predicted is similarly matched with the cases in the first case data set to obtain a second case data set, wherein the cases in the second case data set are sorted in descending order of similarity to obtain similar reference cases.
[0093] In this embodiment, based on the analysis and extraction of key case information described in the case, the user is matched with and recommended reference cases that are most similar to the case to be tested. If there are multiple most similar reference cases, they need to be sorted in descending order based on their matching similarity, and the top few cases are pushed to the user.
[0094] In a possible implementation, based on the feature vector, similarity matching is performed between the case to be predicted and the case in the first case data set to obtain the second case data set, including: performing cosine similarity matching between the feature vector of the predicted case and the feature vector of the case in the first case data set, and the cosine similarity calculation formula is:
[0095]
[0096] Wherein, A and B represent two vectors respectively, and cosine similarity is the cosine of the angle between two n-dimensional vectors in n-dimensional space, that is, it is equal to the dot product (vector product) of the two vectors divided by the product of the lengths (or sizes) of the two vectors; alternatively, the feature vector of the predicted case is matched with the feature vector of the case in the first case data set by Jaccard similarity.
[0097] Step S400: Perform statistics on historical case litigation results based on the second case data set, wherein the historical case litigation results include the judgment result, risk characteristic value and historical litigation success rate of each case, and the risk characteristic value is the characteristics and proportion of the judgment standard elements involved in the case description in the judgment result.
[0098] In one possible implementation, the calculation formula for the historical litigation success rate is as follows:
[0099]
[0100] Where S is the number of successful cases, W i is the weight corresponding to the risk characteristic value of the i-th successful case, T is the number of cases in the second case data set, and W jis the weight corresponding to the risk characteristic value of the jth case. In this possible implementation method, the risk characteristic value can be used to determine the characteristics and proportions of the elements of the adjudication standard involved in the case description in historical cases, and can characterize the core claims and viewpoints in the adjudication essentials, including the focus of the dispute, legal basis, fact finding, legal application, rights and obligations analysis, reasons for the ruling, judgment results, trial procedure description and other considerations, which can directly affect the adjudication results of the case.
[0101] It is understandable that the weight corresponding to the risk feature value should be determined by comprehensively evaluating the influence of each feature and proportion of the judgment standard elements involved in the case description on the judgment result. In this possible implementation method, for example: the first step is to collect historical case data, which should include the complete text of the case, covering all parts of the judgment document, such as the focus of the dispute, legal basis, fact finding, legal application, rights and obligations analysis, reasons for the ruling, judgment results and trial procedures; the second step is to identify and extract key information and risk features in the case text through natural language processing technology (NLP), such as using keyword extraction, entity recognition, dependency analysis and other technologies to identify key legal provisions, fact descriptions, judgment reasons, etc.; the third step is to summarize and classify the extracted features, and each type of feature is associated with the final judgment result of the case to form a detailed risk feature database; the fourth step is to use statistical analysis methods (such as logistic regression, decision tree, etc.) to evaluate the weight of each risk feature based on the correlation between the same or similar risk features in the historical data and the case results, where the weight reflects the influence of the feature on the judgment result.
[0102] In the above embodiment, the trained prediction model shown should be a complete legal model. Through the data of the case to be predicted provided by the user and the preprocessing of the data completion and correction, the data quality and integrity can be ensured to improve the prediction model's judgment on similar cases. By introducing the risk characteristic value of the case in the statistics of historical case litigation results and the training of the prediction model, the characteristics and proportions of the case description in the historical case involving the judgment standard elements (that is, the core claims and viewpoints in the judgment essentials, including the focus of the dispute, legal basis, fact finding, legal application, rights and obligations analysis, reasons for the ruling, judgment results, trial procedure description and other considerations, etc.) are determined, and the statistical analysis of historical cases is more scientific and accurate in a quantitative risk manner. And by combining with quantified risk characteristic values, it can promote the optimization of resource allocation of the prediction model, enhance the discrimination of the prediction model and the accuracy of the output of the prediction results (the prediction results of the litigation success rate of the case to be predicted, similar reference cases, and the litigation results of the historical cases, including the judgment results of each case, risk characteristic values and historical litigation success rates), and to a certain extent reduce the impact of the changing legal environment and legal rules on the prediction model, thereby improving the accuracy of litigation predictions and ensuring the quality and efficiency of legal services.
[0103] Step S500: output a prediction report based on the litigation success rate prediction result of the case to be predicted, similar reference cases, and litigation results of historical cases.
[0104] In this embodiment, illustratively, the prediction model can visualize the statistical analysis results / prediction report and provide corresponding suggestions to the user based on the prediction report.
[0105] In a possible implementation, according to the description of the above embodiment, the trained prediction model should be a complete legal model that can meet the user's needs for predicting the litigation success rate of all specific events / cases involving law. Therefore, the following introduces a method for constructing a recommendation model.
[0106] See also Figure 5 , Figure 5 It is a flowchart of constructing a prediction model provided in one embodiment of the present application.
[0107] Step S600, data preparation: establish a case database and divide it into training set, verification set and test set according to various types of adjudication cases in various fields. The case data of each adjudication case should be accurate and complete, including case type, case facts, party information, judgment results, etc.
[0108] In this embodiment, the case data of each adjudication case needs to be cleaned and preprocessed, including processing missing values, outliers, etc. Exemplarily, the data set can be divided according to a certain ratio, such as 70% of the data as a training set and 30% of the data as a test set (and validation set). Next, feature extraction and engineering processing are performed on the data, including converting the case data into features that can be used for machine learning, including case type, party information, keyword extraction of case facts, and judgment results. Its specific implementation can refer to the description of the preprocessing step in the above embodiment, and for the sake of brevity, it will not be repeated here.
[0109] Step S610, constructing a model: constructing an initialized neural network model, wherein the initialized neural network model is configured with multiple machine learning models that can be used to predict the success rate of litigation.
[0110] For example, to build a neural network model: first define the structure of the neural network, including the number of neurons and activation functions in the input layer, hidden layer, and output layer; then select a suitable loss function and optimization algorithm, among which commonly used loss functions include mean square error (MSE), cross entropy, etc., and optimization algorithms can be stochastic gradient descent (SGD), Adam, etc.; then you can use deep learning frameworks such as TensorFlow, Keras, Pytorch, etc. to implement neural network construction. It should be noted that you can choose a suitable machine learning model or statistical model to predict the success rate of litigation. Commonly used models include:
[0111] The logistic regression model maps the linear output to the interval (0,1) through the logistic function to represent the probability, which is used to predict the success rate of litigation in traffic accident cases.
[0112] The decision tree model (Decision Tree) segments the data set and constructs a tree structure for classification or regression to predict the winning rate of real estate dispute cases.
[0113] Random Forest model is an ensemble learning model consisting of multiple decision trees. Each tree is trained on a random subset of the training set and the final prediction is decided by voting or averaging. The implementation effect is usually better than a single decision tree in performance and generalization ability, but the model is more complex and the computational cost is higher.
[0114] The support vector machine model performs classification by finding the optimal hyperplane that can separate two types of samples.
[0115] Step S620, training model: training the initialized neural network model based on the training set, and periodically using the validation set to determine whether the training results are overfitting or underfitting, and continuing the training by adjusting the hyperparameters or model structure of the initialized neural network model until a neural network model that meets the training termination conditions is output, i.e., a litigation success rate prediction model.
[0116] In this embodiment, the neural network model is trained using a practical training set, and the loss function is minimized by continuously adjusting the parameters of the model.
[0117] In this possible implementation method, in order to build a complete legal model as a prediction model for the litigation success rate of this application, it is necessary to prepare a database of various types of judicial cases in various fields in the data preparation stage and improve the database. Furthermore, the data needs to be divided into a training set, a verification set, and a test set. Exemplarily, the test set input includes: user case, user demand content, and the corresponding feature vector includes: party subject, object, case key feature words, case cause, character relationship, user demand (set prompt). In the model construction and training model stages, through a complete database, as well as optimization and adjustment of model parameters and structure, the model can describe the case of each case and statistically analyze the results of historical case litigation, including the judgment results, risk characteristic values, and historical litigation success rates of each case.
[0118] In one possible implementation, see Figure 6 , Figure 6 It is a flowchart of constructing a recommendation model provided in an embodiment of the present application.
[0119] Step S630, model evaluation: taking the test set as the input of the prediction model to obtain a prediction result; determining the evaluation result of the prediction model based on the actual result of the test set and the prediction result, the evaluation result includes one or more of mean square error, accuracy, recall rate, F1 value, precision or specificity; if the evaluation result meets the set indicator value, output the trained recommendation model, if the evaluation result does not meet the set indicator value, tune the prediction model.
[0120] In this embodiment, the above model evaluation is used to determine whether the model is overfitting, so as to adjust the model structure and parameters in time to avoid overfitting problems, find out other possible problems with the model and improve the accuracy of the model.
[0121] Step S640, model tuning: based on the evaluation results, adjusting the hyperparameters or model structure of the prediction model; continuing to train the adjusted prediction model using the training set; wherein the hyperparameters include one or more of a learning rate, a regularization parameter, the number of neural network layers and nodes, and the depth of a decision tree; adjusting the model structure of the recommendation model includes: determining multiple machine learning models configured by the prediction model and performing model fusion to obtain an improved prediction model; wherein the fusion method includes a voting method, a stacked generalization method, a weighted fusion method, a feature fusion method, or a recommendation fusion method.
[0122] In this embodiment, through the above-mentioned model tuning, the consumption of computing and storage resources can be reduced, the performance of the model can be optimized, and the response speed of the model can be improved, so as to provide users with more personalized and accurate prediction results and improve user experience.
[0123] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.
[0124] See also Figure 7 , Figure 7 It is a structural diagram of a litigation success rate prediction device provided in one embodiment of the present application.
[0125] The device at least comprises: a data acquisition module 100, for acquiring a case description of a case to be predicted; a feature extraction module 200, for extracting features from the case description to obtain a feature vector capable of representing the case description; a prediction module 300, for taking the feature vector as input and predicting the litigation success rate of the case to be predicted through a trained prediction model; wherein the trained prediction model is obtained by training based on a first case data set related to the case to be predicted; and a similarity matching module 400, for matching the case to be predicted with the cases in the first case data set based on the feature vector. A similar match is performed to obtain a second case data set; wherein the cases in the second case data set are sorted in descending order of similarity to obtain similar reference cases; a statistical module 500 is used to perform statistics on historical case litigation results based on the second case data set; wherein the historical case litigation results include the judgment results, risk characteristic values and historical litigation success rates of each case, and the risk characteristic values are the characteristics and proportions of the judgment standard elements involved in the case description in the judgment results; a report generation module 600 is used to output a prediction report based on the litigation success rate prediction results of the case to be predicted, the similarity matching results, and the historical case litigation results.
[0126] In one possible implementation, see Figure 8 , Figure 8It is a structural diagram of a litigation success rate prediction device provided in one embodiment of the present application.
[0127] The device also includes: a preprocessing module 700, which is used to preprocess the case description; the preprocessing module 700 includes: a first submodule 710, which is used to delete repeated values in the case description; a second submodule 720, which is used to determine whether the missing values in the case description belong to key evidence; if so, the missing values are filled, including mean / median / mode interpolation, fixed value filling, nearest neighbor interpolation, regression interpolation, and function interpolation; if not, the samples or features containing the missing values are deleted; wherein the key evidence is data that can affect the trial process and / or trial results of the case to be predicted; a third submodule 730, which is used to determine whether the outliers in the case description belong to key evidence; if so, the outliers are identified based on the outlier detection algorithm, and the outliers are corrected using an interpolation method or a regression model; if not, the outliers are deleted, or the samples or features containing the outliers are deleted; a fourth submodule 740, which is used to standardize the data structure of the case description based on the data structure applicable to the trained machine learning model.
[0128] In one possible implementation, the feature extraction module 200 includes: a fifth submodule 210, used to extract text features in the case description, and the extraction means include one or more of bag of words, word frequency-inverse text frequency, word embedding, pre-trained language model, part-of-speech tagging, named entity recognition, sentiment analysis, representing text by word frequency or sequence length, grammar-based features, and document embedding; a sixth submodule 220, used to construct a feature vector for characterizing the case description based on the text features; a seventh submodule 230, used to select the feature vectors to eliminate irrelevant or redundant feature vectors and determine the optimal feature subset.
[0129] In a possible implementation, the prediction module 300 is further used to take the feature vector as input and predict the trial duration of the case to be predicted through a trained prediction model.
[0130] In a possible implementation, the similarity matching module 400 is used to perform cosine similarity matching between the feature vector of the predicted case and the feature vector of the case in the first case data set. The cosine similarity calculation formula is:
[0131]
[0132] Wherein, A and B represent two vectors respectively, and cosine similarity is the cosine of the angle between two n-dimensional vectors in n-dimensional space, that is, equal to the dot product (vector product) of the two vectors divided by the product of the lengths (or sizes) of the two vectors; or, used to perform Jaccard similarity matching on the feature vector of the predicted case with the feature vector of the case in the first case data set.
[0133] In one possible implementation, the calculation formula for the historical litigation success rate is as follows:
[0134]
[0135] Where S is the number of successful cases, W i is the weight corresponding to the risk characteristic value of the i-th successful case, T is the number of cases in the second case data set, and W j is the weight corresponding to the risk characteristic value of the jth case.
[0136] It should be noted that, in some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation thereof can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0137] See also Fig. 9 , Fig. 9 A schematic diagram of the hardware structure of a litigation success rate prediction device provided in an embodiment of the present application.
[0138] The device 2 includes a processor 21, a memory 24, an input device 22, and an output device 23. The processor 21, the memory 24, the input device 22, and the output device 23 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present application. It should be understood that in each embodiment of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0139] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present application.
[0140] The memory 24 can be used to store computer program instructions and various computer program codes including the program code for executing the program code of the present application. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or portable read-only memory (CD-ROM), which is used for related instructions and data.
[0141] The input device 22 is used to input data and / or signals, and the output device 23 is used to output data and / or signals. The output device 23 and the input device 22 may be independent devices or an integrated device.
[0142] It is understandable that in the embodiment of the present application, the memory 24 can not only be used to store related instructions, and the embodiment of the present application does not limit the specific data stored in the memory.
[0143] Understandably, Fig. 9 Only a simplified design of a litigation success rate prediction device is shown. In practical applications, the device may also include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all devices that can implement the embodiments of the present application are within the scope of protection of the present application.
[0144] The present application provides a terminal, which includes a touch screen, a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the terminal implements the litigation success rate prediction method as described above.
[0145] In a fourth aspect, the present application provides a server, comprising a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the server implements the litigation success rate prediction method as described above.
[0146] In a fifth aspect, the present application provides a storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the litigation success rate prediction method as described above.
[0147] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0148] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0149] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present application have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.
[0150] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0151] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0152] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0153] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0154] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
Claims
1. A litigation success rate prediction method, characterized in that: The method comprises at least the following steps: Obtaining a case description of a case to be predicted, and performing feature extraction on the case description to obtain a feature vector capable of representing the case description; The feature vector is used as input to predict the litigation success rate of the case to be predicted through a trained prediction model; wherein the trained prediction model is obtained by training based on a first case data set related to the case to be predicted; Based on the feature vector, the case to be predicted is similarly matched with the cases in the first case data set to obtain a second case data set; wherein the cases in the second case data set are sorted in descending order of similarity to obtain similar reference cases; Performing statistics on historical case litigation results based on the second case data set; wherein the historical case litigation results include the judgment result, risk characteristic value and historical litigation success rate of each case, and the risk characteristic value is the characteristics and proportion of the judgment standard elements involved in the case description in the judgment result; Based on the litigation success rate prediction results of the case to be predicted, similar reference cases, and litigation results of historical cases, a prediction report is output.
2. The litigation success rate prediction method according to claim 1, characterized in that: After obtaining the case description of the case to be predicted, the method further includes: preprocessing the case description, including: Deleting duplicate values in the case description; Determine whether the missing values in the case description belong to key evidence; if so, fill in the missing values, including mean / median / mode interpolation, fixed value filling, nearest neighbor interpolation, regression interpolation, and function interpolation; if not, delete the samples or features containing the missing values; wherein the key evidence is data that can affect the trial process and / or trial results of the case to be predicted; Determine whether the outlier in the case description is key evidence; if so, identify the outlier based on the outlier detection algorithm and correct the outlier using an interpolation method or a regression model; if not, delete the outlier, or delete the sample or feature containing the outlier; The data structure of the case description is standardized based on the data structure applicable to the trained machine learning model.
3. The litigation success rate prediction method according to claim 1, characterized in that: The method of performing similarity matching between the case to be predicted and the cases in the first case data set based on the feature vector to obtain a second case data set includes: The feature vector of the predicted case is matched with the feature vector of the case in the first case data set by cosine similarity. The cosine similarity calculation formula is: Among them, A and B represent two vectors respectively, and cosine similarity is the cosine of the angle between two n-dimensional vectors in n-dimensional space, that is, it is equal to the dot product (vector product) of the two vectors divided by the product of the lengths (or sizes) of the two vectors; Alternatively, Jaccard similarity matching is performed between the feature vector of the predicted case and the feature vector of the case in the first case data set.
4. The litigation success rate prediction method according to claim 1, characterized in that: The calculation formula for the historical litigation success rate is as follows: Where S is the number of successful cases, W i is the weight corresponding to the risk characteristic value of the i-th successful case, T is the number of cases in the second case data set, and W j is the weight corresponding to the risk characteristic value of the jth case.
5. A litigation success rate prediction device, characterized in that: The device at least comprises: A data acquisition module is used to obtain the case description of the case to be predicted; A feature extraction module, used to extract features from the case description to obtain a feature vector that can characterize the case description; A prediction module, used to use the feature vector as input and predict the litigation success rate of the case to be predicted through a trained prediction model; wherein the trained prediction model is obtained by training based on a first case data set related to the case to be predicted; A similarity matching module is used to perform similarity matching between the case to be predicted and the cases in the first case data set based on the feature vector to obtain a second case data set; wherein the cases in the second case data set are sorted in descending order of similarity to obtain similar reference cases; A statistical module, for performing statistics on historical case litigation results based on the second case data set; wherein the historical case litigation results include the judgment result, risk characteristic value and historical litigation success rate of each case, and the risk characteristic value is the characteristics and proportion of the judgment standard elements involved in the case description in the judgment result; A report generation module is used to output a prediction report based on the litigation success rate prediction results, similarity matching results, and historical case litigation results of the case to be predicted.
6. The litigation success rate prediction device according to claim 5, characterized in that: The device also includes: A preprocessing module, used for preprocessing the case description; The preprocessing module comprises: The first submodule is used to delete duplicate values in the case description; The second submodule is used to determine whether the missing values in the case description belong to key evidence; if so, the missing values are filled, including mean / median / mode interpolation, fixed value filling, nearest neighbor interpolation, regression interpolation, and function interpolation; if not, the samples or features containing the missing values are deleted; wherein the key evidence is data that can affect the trial process and / or trial results of the case to be predicted; The third submodule is used to determine whether the outlier in the case description is a key evidence; if so, based on the identification of the outlier by the outlier detection algorithm, the outlier is corrected using an interpolation method or a regression model; if not, the outlier is deleted, or the sample or feature containing the outlier is deleted; The fourth submodule is used to standardize the data structure of the case description based on the data structure applicable to the trained machine learning model.
7. The litigation success rate prediction device according to claim 5, characterized in that: The calculation formula for the historical litigation success rate is as follows: Where S is the number of successful cases, W i is the weight corresponding to the risk characteristic value of the i-th successful case, T is the number of cases in the second case data set, and W j is the weight corresponding to the risk characteristic value of the jth case.
8. A terminal, characterized in that: The terminal includes a touch screen, a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the terminal implements the litigation success rate prediction method as described in any one of claims 1-4.
9. A server, characterized in that: The server includes a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the server implements the litigation success rate prediction method as described in any one of claims 1-4.
10. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the litigation success rate prediction method as described in any one of claims 1-4.
Citation Information
Cited By
Deep learning litigation material preprocessing and classifying method
CN119441938A
Simulated court dialectical care scene prediction method and system
CN121353030A
