Intelligent prison term prediction method and system for complex criminal cases
By constructing a multi-defendant vectorized sentencing model and a dynamic sentencing element extraction method, the accuracy and legality issues of sentencing prediction in complex criminal cases in existing technologies have been resolved, achieving refined sentencing prediction and legal compliance for complex criminal cases.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ACAD OF MATHEMATICS & SYSTEMS SCIENCE - CHINESE ACAD OF SCI
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-14
AI Technical Summary
Existing criminal investigation assistance systems are highly dependent on feature acquisition and lack the ability to adapt to rules in complex criminal cases. They are unable to meet the requirements of judicial practice for accuracy, controllability, interpretability, and legality and compliance. In particular, in complex cases with multiple defendants and multiple charges, the inferences on the level of responsibility, the relationship of joint crimes, and the concurrent sentencing of multiple crimes are not precise enough.
By constructing a multi-defendant vectorized sentencing model, assigning fine-grained role labels, combining a large language model and legal norms, dynamically extracting sentencing elements, and performing dimensionality expansion processing when rules change, the model enables online updating and feedback correction of sentencing elements, ensuring the accuracy and legality of sentencing results.
It improves the completeness and accuracy of sentencing factor extraction, enhances the applicability and interpretability in complex case scenarios, reduces cross-period bias caused by rule changes, and improves the model's adaptability and legality.
Smart Images

Figure CN122388136A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of smart justice, legal artificial intelligence, and intelligent adjudication assistance, specifically to an intelligent method and system for predicting sentences in complex criminal cases. Background Technology
[0002] One of the important tasks in the fields of smart justice and legal artificial intelligence is sentence prediction, which involves auxiliary analysis and inference of the sentence based on the description of the facts of the case, the circumstances of the conduct, and information about the relevant parties. With the development of natural language processing, machine learning, and large language model technology, sentencing assistance technology has gradually evolved from early rule-based expert systems to predictive models based on statistical learning and reasoning systems based on large models.
[0003] Current judicial auxiliary systems typically take judgments, case files, or case fact texts as input, and output prediction results through steps such as information extraction, feature construction, and model inference. While these technologies have improved the automation level of judicial auxiliary analysis to some extent, in real-world judicial applications, they still generally suffer from problems such as strong reliance on feature acquisition, insufficient rule adaptability, and insufficient rigor in inferences for complex cases. Consequently, they struggle to simultaneously meet the requirements of judicial practice for accuracy, controllability, interpretability, and legal compliance.
[0004] The existing sentencing prediction and adjudication assistance technologies have three main shortcomings: First, the acquisition of sentencing factors relies heavily on pre-set rules, dictionaries, and expert experience, and lacks the ability to correct for missing information, extraction bias, and implicit semantics in the text; second, the feature space is mostly fixed-dimensional, making it difficult to expand online and adapt synchronously when faced with updates to judicial rules or new sentencing factors; and third, in complex cases involving multiple defendants and multiple charges, the inferences regarding the level of responsibility, joint criminal relationships, and concurrent sentencing are not precise enough, and there is a lack of strict legal rules to constrain the results, resulting in insufficient interpretability, legality, and applicability stability. Summary of the Invention
[0005] In view of the above problems, the present invention provides an intelligent method and system for predicting sentences in complex criminal cases, which solves the technical problems of insufficient accuracy, insufficient interpretability and insufficient legal constraints in the extraction of sentencing elements, rule evolution and adaptation and inference of complex cases in the prior art.
[0006] This invention provides an intelligent method for predicting sentences in complex criminal cases, comprising the following steps: Step S1: The judgment documents of the cases to be processed are sequentially parsed, the initial set of sentencing elements is constructed, and the sentencing elements are extracted to obtain the set of sentencing elements and the structured sentencing elements. Step S2: Establish a multi-defendant vectorized sentencing model. The multi-defendant vectorized sentencing model sequentially performs feature attribution, establishes fine-grained role labels, predicts single-crime sentences, and performs combined sentence constraint processing on the input structured sentencing elements, and outputs the predicted sentence. Step S3: Input the structured sentencing elements into the multi-defendant vectorized sentencing model to obtain a preliminary predicted sentence; The preliminary predicted sentence is compared with the actual judgment to obtain new candidate sentencing factors; the set of sentencing factors is then updated based on these new candidate sentencing factors. Step S4: Perform dimensionality expansion processing on the structured sentencing elements based on the newly added feature dimensions to obtain the expanded structured sentencing elements; Step S5: Based on the updated set of sentencing elements and the expanded-dimensional structured sentencing elements, update the multi-defendant vectorized sentencing model online and output the final predicted sentence.
[0007] Preferably, step S1 specifically includes: Step S1-1: Extract the text from the "Finds and Finds" and "Opinions of the Court" sections of the judgment document of the case to be processed, and obtain the corresponding charges against each defendant among multiple defendants; Step S1-2: For each defendant, run the sentencing element initialization Agent Skill to generate an initial set of sentencing elements corresponding to the target crime based on legal norms and case data; Steps S1-3: For each defendant, based on their corresponding crime and the initial sentencing element set, generate an input instruction text to guide the big language model to perform targeted information extraction, and input the input instruction text and the corresponding case text into the big language model to obtain structured sentencing elements; The structured sentencing elements include statutory circumstances, discretionary circumstances, consequences of the conduct, subjective malice, and other sentencing-related attributes.
[0008] Preferably, the processing steps for initializing the sentencing factor Agent Skill include: The system receives the crime name input by the user, extracts the crime name features, retrieves relevant laws and regulations from the legal knowledge base through retrieval enhancement generation technology, analyzes the retrieval results using a large language model, and extracts common sentencing elements related to the crime name. After a user uploads specific case documents, the document analysis module is invoked to read the case text from the case database. The case text is analyzed using LLM to identify and extract new sentencing elements unique to the case. The new elements are then merged with general sentencing elements to form the initial set of sentencing elements.
[0009] Preferably, in step S2, the steps of the multi-defendant vectorized sentencing model sequentially performing feature attribution and establishing fine-grained role labels on the input structured sentencing elements specifically include: The facts of the case related to sentencing are assigned to each defendant individually, and an attribution value is constructed for each defendant. The attribution value includes the number of times the defendant participated in the act, the amount of money directly controlled or received by the defendant, whether harm was caused, whether the defendant surrendered himself to the police, and whether he pleaded guilty and accepted punishment. The set of responsibility roles is determined by the following expression:
[0010] ,or,
[0011]
[0012] Define fine-grained role tags and encode them as one-hot vectors; the fine-grained role tags are specifically:
[0013] in, Indicates the first The detailed responsibility roles of each defendant.
[0014] Preferably, in step S2, the step of the multi-defendant vectorized sentencing model predicting the sentence for a single crime based on the input structured sentencing elements specifically includes: For single-crime sentence prediction, let the first... The cases total The defendant, then the first The sentencing results for the defendants are expressed as follows:
[0015] in: Indicates a case index; Indicates the first Number of defendants in each case; Indicates the first In the case of the first The index of the defendants, and ; Indicates the first In the case of the first Sentencing results for the defendants; Indicates that for the first In the case of the first The saturation constraint function set by the defendant is used to limit the intermediate sentencing result of the defendant to the range permitted by the corresponding law. Indicates the first In the case of the first The starting point for sentencing of the defendants; Indicates the number of features used to determine the benchmark sentence; Indicates the first In the case of the first The defendants in the The values of the basic criminal characteristics; Indicates the first In the case of the first The defendant's Adjustment coefficients corresponding to the characteristics of the benchmark sentence; Indicates the number of legally applicable sentencing factors that take precedence; Indicates the first In the case of the first The values for each defendant in the category t of priority sentencing circumstances; Indicates the first In the case of the first The adjustment coefficient corresponding to the priority sentencing circumstances of the defendant in category t; Indicates the number of other sentencing factors; Indicates the first In the case of the first The defendants in the Values for other sentencing factors; Indicates the first In the case of the first The defendant's Adjustment coefficients corresponding to other sentencing circumstances; Indicates the first In the case of the first Unstructured factors of the defendants can be fitted using neural networks; Indicates the first In the case of the first The disturbing items of the defendants; This represents the summation operation; This indicates a series of multiplication operations; No. The overall sentencing result for multiple defendants in a case is obtained by combining the sentencing results of each defendant, as expressed in the following formula:
[0016] in express Overall sentencing results for multiple defendants in this case They represent the first In the case of the first The sentencing results for the defendants.
[0017] Preferably, in step S2, the expression for the multi-defendant vectorized sentencing model to process the combined sentence constraints of the input structured sentencing elements is as follows:
[0018]
[0019]
[0020]
[0021] in This represents the predicted sentence output by the vectorized sentencing model for multiple defendants. This indicates the input sentence duration. Indicates the longest sentence among the multiple sentences. The legal upper limit is used to trim the input sentence. Indicates the longest sentence among multiple sentences. For each crime Perform a search to obtain the maximum value. Indicates the total number of charges. Indicates the first The predicted sentence for each crime is as follows: Indicates the legal upper limit. This indicates calculating the minimum value. Indicates the total sentence. This represents the legally capped function, where 240 represents the number of months corresponding to twenty years, 300 represents the number of months corresponding to twenty-five years, and 420 represents the number of months corresponding to thirty-five years.
[0022] Preferably, in step S3, the step of comparing the preliminary predicted sentence with the actual judgment result to obtain new candidate sentencing factors, and updating the sentencing element set based on the new candidate sentencing factors, specifically includes: The preliminary predicted sentence is compared with the actual judgment result; when the deviation between the two exceeds a preset threshold, the source of error is analyzed to obtain new candidate sentencing factors. When the feedback correction process identifies new candidate sentencing factors, the candidate sentencing factors are reviewed, and the approved candidate sentencing factors are added to the sentencing element set.
[0023] Preferably, step S4 specifically includes: When a new sentencing factor arises from a point in time When a feature vector is included in sentencing evaluation, a dimension expansion operation is performed on the original feature vector to construct an expanded feature vector. in: This is the expanded feature vector of the case; The original case feature vector before dimensionality expansion. To add sentencing factors at the time The value of ; Indicates the dimension expansion 3D real vector space, Indicates time; The model parameter vector is expanded from the original dimension to ; At the moment of dimensional expansion At the previous moment, the original parameter estimation results are embedded into the expanded parameter space, and the expression is: ,in: Before expanding the dimensions, in the existing Parameter estimates in the dimension; the newly added _th ... The dimension parameter is initially set to 0.
[0024] Preferably, step S4 further includes: During the online update phase of Adam after its expansion, At that time, based on the expanded feature vector and the expanded parameter vector Construct the current loss function and calculate the gradient after dimensionality expansion. The expression is as follows:
[0025] in, This represents the expanded gradient vector obtained at time t. Represents the parameter vector Find the gradient. This represents the loss function at time t; Then, update the expanded first and second moments as follows:
[0026] in, This indicates the estimation of the first moment after dimension expansion. This represents the first-order moment attenuation coefficient. This represents the first moment estimate at time t-1. This represents the second-order moment estimation after dimension expansion. This represents the second moment estimate at time t-1. This represents the second-order moment attenuation coefficient. This represents the element-wise square of the gradient vector; The corresponding deviation correction is:
[0027] in, This represents the first-moment estimate after bias correction. This represents the second-order moment estimate after bias correction; Then update the expanded parameter vector using the following formula:
[0028] This represents the extended-dimensional parameter vector at time t. This represents the parameter vector at time t-1. Indicates the learning rate. It is a small positive number.
[0029] On the one hand, the present invention provides an intelligent sentence prediction system for complex criminal cases, characterized in that it includes: The sentencing element analysis module is used to sequentially parse the text of the judgment documents of the cases to be processed, construct the initial set of sentencing elements, and extract sentencing elements to obtain the set of sentencing elements and structured sentencing elements. A multi-defendant vectorized sentencing model sequentially performs feature attribution, establishes fine-grained role labels, predicts single-crime sentences, and processes combined sentence constraints on the input structured sentencing elements, and outputs the predicted sentence. The update module is used to input the structured sentencing elements into the multi-defendant vectorized sentencing model to obtain a preliminary predicted sentence; compare the preliminary predicted sentence with the actual judgment result to obtain new candidate sentencing factors; and update the sentencing element set based on the new candidate sentencing factors. The dimension expansion module is used to expand the dimension of the structured sentencing elements based on the newly added feature dimensions to obtain the expanded structured sentencing elements. The online update module is used to update the multi-defendant vectorized sentencing model online based on the updated set of sentencing elements and the expanded-dimensional structured sentencing elements, and output the final predicted sentence.
[0030] Compared with the prior art, the present invention has at least the following beneficial effects: (1) This invention improves the extraction of sentencing elements from a one-time static extraction method to a closed-loop dynamic extraction method with feedforward fallback, feedback correction and manual confirmation mechanisms. Before extraction, a relatively complete initial set of sentencing elements is constructed based on legal norms and case data. After extraction, the missing factors or extraction errors are identified by using prediction bias. The process of adding new elements is controlled by manual review. This can effectively reduce the problems of omission of key details, attribute mismatch and extraction bias caused by fixed rule templates or single automatic extraction. At the same time, this invention can better identify implicit circumstances in judicial practice that are not explicitly listed by law but have a real impact on sentencing, improve the completeness, accuracy and stability of sentencing element extraction, and enhance the applicability, interpretability and engineering scalability of structured representation in multi-defendant and complex case scenarios.
[0031] (2) This invention expands the feature vector, parameter vector, and adaptive optimization state simultaneously when the sentencing rules change, enabling the model to incorporate new sentencing factors into the existing prediction system online without destroying the original learning results. This avoids the shortcomings of fixed-dimensional models in cross-period applications, such as the inability to explicitly express new rules, the inability to ignore new circumstances, or the need for overall retraining. At the same time, this invention achieves compatible representation of case samples from different judicial periods in the same feature space by uniformly setting historical samples to zero on the new dimensions. This effectively reduces cross-period bias caused by rule changes and improves the model's adaptability to the long-term evolving judicial environment. Furthermore, since the original parameter estimation results and the optimizer's historical state are retained simultaneously during dimensional expansion, this invention has lower reconstruction costs and higher online update efficiency in engineering implementation. It can achieve smooth absorption and rapid learning of new sentencing factors while maintaining the stability of the original dimensions.
[0032] (3) This invention allocates key sentencing facts such as amount, frequency, consequences, and degree of participation in a case to specific defendants through a defendant-by-defendant fact attribution mechanism, thereby avoiding the problem of the difference in responsibility between defendants being obscured by the direct use of total case information in existing technologies. At the same time, this invention refines the original coarse-grained binary role label of "principal offender / accessory" into a multi-level responsibility role of "sole principal offender, principal offender with more serious responsibility, principal offender with less serious responsibility, principal offender of equal status, and accessory." Without changing the main structure of the original sentencing framework, this invention significantly enhances the ability to express the differences in the level of responsibility within joint crimes, so that different defendants who are principal offenders can still reflect different sentencing weights. Furthermore, by setting statutory upper and lower limit constraint functions for each defendant and a multiple-crime penalty trimming function, this invention limits the model output to the range allowed by law, effectively overcoming the defects of existing technologies in the inference of combined sentences, which may result in sentences lower than the maximum sentence for a single crime, exceed the sum of sentences for a single crime, or exceed the statutory upper limit. This simultaneously improves the precision, interpretability, and legal compliance of sentencing prediction for complex cases such as multiple defendants and multiple-crime penalties. Attached Figure Description
[0033] The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of the invention.
[0034] Figure 1 The flowchart illustrates the intelligent sentence prediction method for complex criminal cases provided by this invention.
[0035] Figure 2 The flowchart of the intelligent sentence prediction system for complex criminal cases provided by this invention.
[0036] Figure 3 The Agent Skill structure diagram for initializing sentencing elements provided by this invention. Detailed Implementation
[0037] To better understand the above-described objectives, features, and advantages of the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other. Furthermore, the present invention can be implemented in other ways different from those described herein; therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0038] To illustrate the effectiveness of the method proposed in this invention, the following detailed description of the above technical solution is provided through a specific embodiment, such as... Figure 1 , Figure 2 As shown, an intelligent method for predicting sentences in complex criminal cases is disclosed, and the specific implementation steps are as follows: Step S1: The judgment documents of the cases to be processed are sequentially parsed, the initial set of sentencing elements is constructed, and the sentencing elements are extracted to obtain the set of sentencing elements and the structured sentencing elements. In this step, the present invention obtains the judgment documents of the case to be processed, and preferably extracts the "founded by this court" and "held by this court" sections as the main objects of analysis; for cases with multiple defendants and multiple crimes, the correspondence between the defendants and the crimes is first established to form the main basis for subsequent element extraction.
[0039] Specifically, the text of the "Ascertained by this Court" and "This Court Holds" sections in the judgment documents of the case to be processed can be extracted, and key-value pairs of the defendant and the crime can be obtained by means of text matching, etc. The key-value pairs of the defendant and the crime can be one or more.
[0040] Subsequently, the present invention runs the sentencing element initialization Agent Skill, which generates an initial set of sentencing elements corresponding to the target crime based on legal norms and case data.
[0041] Sentencing Factors Initialization Agent Skill, such as Figure 3 As shown, a detailed description follows. The Sentencing Element Initialization AgentSkill is implemented through a multi-layered intelligent agent architecture. The Sentencing Element Initialization Agent Skill includes: an interaction and decision input layer, an intelligent reasoning and understanding layer, a skill execution and invocation layer, and a legal knowledge and case layer. Its detailed processing steps are as follows: (1) The system receives the crime name input by the user, extracts the crime name features, and then retrieves relevant laws and regulations from the legal knowledge base using retrieval augmentation generation (RAG) technology. Subsequently, the system uses large language model (LLM) to analyze the retrieval results, automatically extracts the general sentencing elements related to the crime, and displays the sentencing elements.
[0042] (2) Supplementing and confirming elements based on case data: After the user uploads specific case documents, the file analysis module is invoked to read the case text from the case database. The case text is analyzed using LLM to identify and extract the unique and newly added sentencing elements of the case. These newly added elements are merged with the initial list to form an initial set of sentencing elements, which can be submitted to the user for final interactive confirmation.
[0043] (3) After the user confirms the adoption of the final sentencing factors, the initial set of sentencing factors can be used for subsequent downstream tasks such as displaying statistical results. At the same time, the user's interaction and confirmation behavior will be used to continuously iterate and optimize the system model in order to continuously improve the accuracy and efficiency of factor extraction.
[0044] The initial sentencing element set includes general sentencing factors and crime-specific factors, and is supplemented by discretionary circumstances that repeatedly appear in real judgments to improve feature coverage. This process constitutes the feedforward fallback mechanism of this invention, namely, before formally extracting sentencing elements, an initial sentencing element set is constructed in advance based on legal norms, sentencing guidelines, preset rules, and case data to minimize the omission of key sentencing elements.
[0045] Subsequently, sentencing element extraction is performed based on the initial set of sentencing elements. Preferably, an independent analysis unit for each defendant is established based on the key-value pairs between the defendant and the charge; then, for each defendant, in conjunction with their corresponding charge and the initial set of sentencing elements, an input instruction text is generated to guide the large language model to perform targeted information extraction. This input instruction text, along with the corresponding case text, is input into the large language model to extract the statutory circumstances, discretionary circumstances, behavioral consequences, subjective malice, and other sentencing-related attributes corresponding to the defendant, thereby forming structured sentencing elements for a specific defendant.
[0046] In some embodiments, the instruction text may include a text requiring the output of the defendant's statutory circumstances, discretionary circumstances, behavioral consequences, subjective malice, and other sentencing-related attributes, and the statutory circumstances, discretionary circumstances, behavioral consequences, subjective malice, and other sentencing-related attributes of the defendant shall be used to constitute the structured sentencing elements; the structured sentencing elements may include the structured sentencing elements of each of the multiple defendants.
[0047] Step S2: Establish a multi-defendant vectorized sentencing model. The multi-defendant vectorized sentencing model sequentially performs feature attribution, establishes fine-grained role labels, predicts single-crime sentences, and performs combined sentence constraint processing on the input structured sentencing elements, and outputs the predicted sentence. In this step, the present invention establishes a multi-defendant vectorized sentencing model based on a mechanism structure of "sentencing starting point + benchmark sentencing factor correction + multiplicative adjustment of prior sentencing factors + other sentencing factor correction + statutory boundary constraints". The present invention maintains consistency with the single-defendant sentencing model in its overall sentencing mechanism. The difference lies in that, for multi-defendant cases, the present invention does not merely adopt the coarse-grained responsibility role characteristics of the single-defendant scenario. Instead, it refines the original binary "principal / accessory" role representation into a fine-grained set of responsibility roles, including "sole principal offender, principal offender with greater culpability, principal offender with less culpability, principal offender of equal status, and accessory," based on the characteristics of responsibility allocation within joint crimes. This refined responsibility role is then used as one of the sentencing input features at the defendant level. Thus, while maintaining the original sentencing structure, different defendants in the same case, even if both are identified as principal offenders, can still obtain different feature inputs, different intermediate sentencing results, and different final sentencing results due to differences in their actual status, role, and degree of responsibility in the joint crime.
[0048] In a specific embodiment, let the first... The cases total The defendant, then the first The sentencing results for the defendants are expressed as follows:
[0049] in: Indicates a case index; Indicates the first Number of defendants in each case; Indicates the first In the case of the first The index of the defendants, and ; Indicates the first In the case of the first Sentencing results for the defendants; Indicates that for the first In the case of the first The saturation constraint function set by the defendant is used to limit the intermediate sentencing result of the defendant to the range permitted by the corresponding law. Indicates the first In the case of the first The starting point for sentencing of the defendants; Indicates the number of features used to determine the benchmark sentence; Indicates the first In the case of the first The defendants in the The values of the basic criminal characteristics; Indicates the first In the case of the first The defendant's Adjustment coefficients corresponding to the characteristics of the benchmark sentence; Indicates the number of legally applicable sentencing factors that take precedence; Indicates the first In the case of the first The values for each defendant in the category t of priority sentencing circumstances; Indicates the first In the case of the first The adjustment coefficient corresponding to the priority sentencing circumstances of the defendant in category t; Indicates the number of other sentencing factors; Indicates the first In the case of the first The defendants in the Values for other sentencing factors; Indicates the first In the case of the first The defendant's Adjustment coefficients corresponding to other sentencing circumstances; Indicates the first In the case of the first Unstructured factors of the defendants can be fitted using neural networks; Indicates the first In the case of the first The disturbing items of the defendants; This represents the summation operation; This indicates a series of multiplication operations.
[0050] No. The overall sentencing result for multiple defendants in a case is obtained by combining the sentencing results of each defendant, as expressed in the following formula:
[0051] in express Overall sentencing results for multiple defendants in this case They represent the first In the case of the first The sentencing results for the defendants.
[0052] In the feature attribution stage, for multi-defendant cases, this invention does not directly use overall case statistics as sentencing input. Instead, it assigns case facts related to sentencing to each defendant individually, constructing defendant-level attribution values as feature vectors. Taking robbery cases as an example, the attribution values may include the number of times the defendant participated in the act, the amount of money directly controlled or received, whether harm was caused, whether the defendant surrendered, and whether the defendant pleaded guilty and accepted punishment. Through this defendant-by-defendant attribution process, different defendants in the same case can have different base sentence starting points, base sentence increments, and subsequent adjustment degrees, thereby overcoming the problem of the internal differences among defendants being masked by directly using total case information in existing technologies.
[0053] In the fine-grained role labeling stage, addressing the problem that existing technologies typically only use a binary "principal / accessory" role labeling, which is insufficient to depict the differences in the degree of responsibility among multiple principal offenders in joint crimes, this invention, without altering the overall sentencing model structure, provides a fine-grained upgrade to the responsibility roles in joint crimes. In single-defendant cases, the responsibility role label is... , Indicates the first The original coarse-grained responsibility role of each defendant.
[0054] In cases involving multiple defendants, this invention replaces the original set of defendants with a more detailed set of liability roles, expressed as: .
[0055] in: The terms "sole principal offender" and "accomplice" represent a set of responsible roles. "Sole principal offender" means there is only one principal offender in a joint crime; "principal offender with heavier responsibility" means the one with relatively heavier responsibility when there are multiple principal offenders; "principal offender with lighter responsibility" means the one with relatively lighter responsibility when there are multiple principal offenders; "principal offenders of equal status" means that the status and role of multiple principal offenders are equivalent, and it is difficult to distinguish between them clearly; "accomplice" retains its original legal meaning.
[0056] Furthermore, the refined role tags are defined as follows: in, Indicates the first The detailed responsibility roles of the defendants. In one implementation, Encoded as a five-dimensional one-hot vector: in, The five components correspond to The five character types are represented, with only one component having a value of 1 and the rest having a value of 0. (Except for...) Merging As the structured feature participating in multiplicative adjustment, the positions of the other four features are: The structured features of the additive adjustment are presented in the above-mentioned refined representation of responsibility roles. Even if multiple defendants in the same case are identified as "principal offenders," this invention can still further distinguish their internal responsibility levels, thereby improving the ability to characterize sentencing differences and the interpretability of the model.
[0057] To ensure that sentencing results do not exceed the legally prescribed upper and lower limits, this invention sets a saturation constraint function for each defendant, expressed as:
[0058] in, Indicates the first In the case of the first The saturation constraint function of the defendants This indicates the input sentence duration; This indicates the lower limit of the statutory sentence for the defendant; This indicates the maximum statutory sentence for the defendant.
[0059] Legal lower limit It is not a fixed constant stipulated by criminal law, but can automatically shift to the next statutory sentencing level as circumstances such as attempted crime or mitigation of punishment are considered, so as to reflect the changes in sentencing levels permitted by law.
[0060] Furthermore, the feature systems of the multi-defendant scenario and the single-defendant scenario in this invention maintain consistency in most sentencing factors. The main difference lies in the fact that the multi-defendant scenario adds a responsibility role feature to characterize the allocation of responsibility within a joint crime. This responsibility role feature is preferably used to replace the "principal / accessory" binary role representation in the single-defendant or coarse-grained model, while other sentencing features can still use the existing definitions and values in the single-defendant model. Based on this, this invention can directly inherit the corresponding parameters already learned in the single-defendant sentencing model as the initialization parameters of the multi-defendant sentencing model, only requiring new initialization of the corresponding parameters of the newly added responsibility role refined features. This achieves a smooth migration from the single-defendant model to the multi-defendant model while maintaining the original sentencing knowledge and existing training results, reducing model retraining costs and improving modeling efficiency and stability in the multi-defendant scenario.
[0061] Furthermore, in cases involving three or more defendants in a joint crime, to more precisely distinguish the degree of participation and role of accomplices in the joint crime, the aforementioned set of responsible roles can be further refined as follows:
[0062]
[0063] In the process of combining sentences, for cases where a defendant committed multiple crimes before the judgment was pronounced, and each crime corresponds to a fixed-term imprisonment, this invention sets up a constraint of concurrent sentencing based on the sentencing results of each individual crime. Suppose the defendant is involved in... The number of crimes and the corresponding predicted sentences for each crime are: ,in, Indicates the first The predicted sentence for each crime is as follows: Indicates the total number of charges, and each The preferred method is to calculate the sentence uniformly on a monthly basis. The maximum sentence among multiple sentences is defined as... Define the total term of imprisonment as .
[0064] Based on the rules for concurrent sentencing for multiple offenses under the term of imprisonment, a statutory capping function is established, expressed as:
[0065] Where 240 represents the number of months corresponding to twenty years, 300 represents the number of months corresponding to twenty-five years, and 420 represents the number of months corresponding to thirty-five years. Further defining a valid upper bound, the expression is:
[0066] in, Indicates the legal upper limit. This indicates calculating the minimum value. Indicates the total sentence. This represents the legally defined capped function.
[0067] Let the predicted sentences for each crime be combined as follows: The predicted sentence expression output by the vectorized sentencing model for multiple defendants is:
[0068] in This represents the predicted sentence output by the vectorized sentencing model for multiple defendants. This indicates the input sentence duration. Indicates the longest sentence among the multiple sentences. The legal upper limit is used to trim the input sentence.
[0069] Step S3: Input the structured sentencing elements into the multi-defendant vectorized sentencing model to obtain a preliminary predicted sentence; The preliminary predicted sentence is compared with the actual judgment to obtain new candidate sentencing factors; the set of sentencing factors is then updated based on these new candidate sentencing factors. In this step, the structured sentencing elements are first input into the multi-defendant vectorized sentencing model to obtain a preliminary predicted sentence.
[0070] The preliminary predicted sentence is compared with the actual judgment result. When the deviation exceeds a preset threshold, a feedback correction process is triggered to analyze the source of the error, determining whether the deviation is caused by inaccurate extraction of existing elements or by missing elements in the current sentencing element set. This process constitutes the core of the feedback correction mechanism of this invention. After completing the extraction of sentencing elements and obtaining the corresponding sentencing prediction result, the existing sentencing element extraction result and the sentencing element set itself are reverse-checked and corrected based on the deviation between the output result and the expected result or the actual judgment result, in order to identify problems such as inaccurate extraction or missing elements.
[0071] When the feedback correction process identifies new candidate sentencing factors, these factors are reviewed. Preferably, legal professionals confirm these factors by considering their judicial rationality, cross-case applicability, and stable extractability. This process constitutes the core of the inventor's in-loop confirmation mechanism. After the system automatically identifies new candidate sentencing factors, legal professionals review their judicial rationality, applicability, and extractability. Only after passing the review are these factors incorporated into the sentencing element system, thus ensuring the controllability and legality of the sentencing element expansion process. Only when the review is passed is the corresponding candidate sentencing factor written into the sentencing element database to update the sentencing element set corresponding to the target crime.
[0072] Through the above processing, the present invention improves the extraction of sentencing elements from a one-time static extraction method to a closed-loop dynamic extraction method with feedforward fallback, feedback correction and manual confirmation mechanisms, which can effectively reduce the problems of omission of key details, attribute mismatch and extraction deviation caused by fixed rule templates or single automatic extraction.
[0073] Step S4: Perform dimensionality expansion processing on the structured sentencing elements based on the newly added feature dimensions to obtain the expanded structured sentencing elements; To address the situation where newly added sentencing factors in judicial sentencing models are incorporated into the evaluation system as judicial rules change, this invention employs an adaptive Adam online learning method with scalable parameter dimensions. This method enables the model to smoothly transition from the original feature space to the expanded feature space without losing the original learning results. The following description further illustrates this invention in conjunction with the introduction of the "plea bargaining" circumstance, but the invention is not limited to this embodiment.
[0074] First, define the original features and parameters before dimensionality expansion. Let's assume that at time point... The original feature vector corresponding to the arrived case sample is in, A time index for the case samples; The original case feature vector before dimension expansion; The dimension of the feature space before dimensionality expansion; express A real vector space. Corresponding to the original feature vector, the parameter estimation vector of the model before dimensionality expansion is denoted as... in, The model represents the original Parameter estimation results in the dimensional feature space. Before the introduction of the new incremental penalty factor, i.e. At that time, the model was The Adam algorithm is used for online updates within the 3D space.
[0075] In this step, the present invention performs end-concatenation processing on the original case feature vector based on the newly added feature dimension to obtain the expanded-dimensional case feature vector; Based on the newly added feature dimension, the original model parameter vector, the original first moment state of the Adam optimizer, and the original second moment state are synchronously initialized with zero values to obtain the extended model parameter vector, the extended first moment state, and the extended second moment state. During the Adam online update phase, loss function is constructed and calculated based on the expanded case feature vector and the expanded model parameter vector to obtain the expanded gradient vector. Based on the expanded gradient vector, the expanded first-order moment state and the expanded second-order moment state are recursively updated and biased, and the expanded model parameter vector is updated based on the corrected moment state. The details are as follows.
[0076] When a new sentencing factor is based on a point in time When a feature vector is included in sentencing evaluation, a dimension expansion operation is performed on the original feature vector to construct an expanded feature vector. in: This is the expanded feature vector of the case; To add sentencing factors at the time The value of ; Indicates the dimension expansion A real vector space. In a preferred embodiment, the added sentencing factor is "plea bargaining," then... in: This indicates that the defendant has pleaded guilty and accepted punishment. This indicates that the defendant does not have the mitigating circumstance of pleading guilty and accepting punishment.
[0077] Corresponding to feature expansion, the model parameter vector is expanded from its original dimension to... At the moment of dimensional expansion In the previous moment, the original parameter estimation results are embedded into the expanded parameter space, and initial values are set for the new dimensions. Preferably, a zero-initialization method is used, that is: ,in: Before expanding the dimensions, in the existing Parameter estimates in the dimension; the newly added _th ... The initial value of the dimension parameter is set to 0. Using this method, the parameters to be learned for the newly added sentencing factors can be introduced while maintaining the original learning results. Optionally, the newly added dimension can also be initialized with a reasonable prior estimate, and is not limited to zero initialization.
[0078] During the Adam online update phase before expansion At that time, the model was based on the original 3D feature vector Constructing the loss function in, Indicates the time of use Case sample parameters The defined loss function. The gradient before dimensionality expansion is defined as follows:
[0079] in, Indicates about parameters The gradient operator. The first-order moment state variables and the second-order moment state variables before dimension expansion are denoted as follows: Its recursive update is as follows:
[0080] in: The first-order moment attenuation coefficient; The second-order moment attenuation coefficient; This indicates element-wise multiplication.
[0081] Further deviation correction:
[0082] Then update the parameters:
[0083] in: The learning rate; To prevent the stability constant from having a denominator of zero; Represents a vector The square root is taken element by element; the division in the above formula is element-by-element division.
[0084] During the Adam state expansion phase at the dimension expansion time, at time point When feature expansion occurs, to maintain the optimization history of the original dimensions and ensure that the newly added dimensions enter the learning process in a neutral state, Adam's first-order moment state and second-order moment state are expanded simultaneously as follows:
[0085] in: The first-order moment state after dimension expansion; The second-order moment state after dimension expansion; (Previous) Each component fully inherits the historical state before the dimension expansion; a new component is added. Each component is initialized to 0. This allows the existing feature dimensions to continue utilizing existing gradient statistics, while the newly added dimensions learn adaptively from the initial state.
[0086] During the online update phase of Adam after its expansion, At that time, based on the expanded feature vector and the expanded parameter vector Construct the current loss function and calculate the gradient after dimensionality expansion.
[0087] in, This represents the expanded gradient vector obtained at time t. Represents the parameter vector Find the gradient. Let t represent the loss function at time t.
[0088] Then, update the expanded first and second moments as follows:
[0089] This indicates the estimation of the first moment after dimension expansion. This represents the first-order moment attenuation coefficient. This represents the first moment estimate at time t-1. This represents the second-order moment estimation after dimension expansion. This represents the second moment estimate at time t-1. This represents the second-order moment attenuation coefficient. This represents the element-wise square of the gradient vector.
[0090] The corresponding deviation correction is:
[0091] in, This represents the first-moment estimate after bias correction. This represents the second-order moment estimate after bias correction; Then update the expanded parameter vector using the following formula:
[0092] This represents the extended-dimensional parameter vector at time t. This represents the parameter vector at time t-1. Indicates the learning rate. To prevent small positive numbers with zero denominators, the square root and division in the above formula are performed separately for each element of the vector.
[0093] Through the above-mentioned dimensionality expansion process, the present invention can simultaneously expand the dimensionality of the feature vector, parameter vector, and adaptive optimization state when the sentencing rules change. This allows the model to incorporate new sentencing factors into the existing prediction system online without destroying the original learning results. This avoids the shortcomings of fixed-dimensional models in cross-period applications, such as being unable to explicitly express new rules, having to ignore new circumstances, or having to retrain the entire model.
[0094] Step S5: Based on the updated set of sentencing elements and the expanded-dimensional structured sentencing elements, update the multi-defendant vectorized sentencing model online and output the final predicted sentence.
[0095] Specifically, based on the updated set of sentencing elements, subsequent cases continue to have their sentencing elements extracted and iteratively optimized, thus forming a closed-loop evolution mechanism that includes feedforward fallback, feedback correction, and manual confirmation. This allows the sentencing element system to gradually improve with the accumulation of cases. When subsequent judicial interpretations, sentencing guidelines, or judgment rules continue to change, and other new sentencing factors emerge, the above-mentioned dimensionality expansion process can be repeated, adding new dimensions to the end of the existing feature vector and simultaneously expanding the parameter vector and optimizer state. Correspondingly, when a certain sentencing factor is no longer applicable, it can also be removed from the feature space.
[0096] During online updates, this invention achieves compatible representations of case samples from different judicial periods within the same feature space by uniformly setting historical samples to zero in the newly added dimensions. This effectively reduces cross-period bias caused by rule changes and enhances the model's adaptability to long-term evolving judicial environments. Furthermore, because the original parameter estimation results and optimizer historical states are preserved simultaneously during dimensionality expansion, this invention boasts lower reconstruction costs and higher online update efficiency in engineering implementation. It can maintain the stability of the original dimensions while achieving smooth absorption and rapid learning of newly added sentencing factors.
[0097] Ultimately, the multi-defendant vectorized sentencing model, based on the updated set of sentencing elements and the expanded-dimensional structured sentencing elements, outputs predicted sentences that conform to legal norms, reflect differences in the level of responsibility, and adapt to the evolution of rules. For multi-defendant cases, the model outputs independent sentencing results for each defendant; for cases involving multiple offenses, the model outputs the final sentence based on the single-offense sentencing through a combined sentence constraint function, ensuring that the predicted result is not lower than the maximum sentence for a single offense, does not exceed the total sentence for any single offense, and does not exceed the statutory upper limit.
[0098] This invention also provides an intelligent sentence prediction system for complex criminal cases, comprising: The sentencing element analysis module is used to sequentially parse the text of the judgment documents of the cases to be processed, construct the initial set of sentencing elements, and extract sentencing elements to obtain the set of sentencing elements and structured sentencing elements. A multi-defendant vectorized sentencing model sequentially performs feature attribution, establishes fine-grained role labels, predicts single-crime sentences, and processes combined sentence constraints on the input structured sentencing elements, and outputs the predicted sentence. The update module is used to input the structured sentencing elements into the multi-defendant vectorized sentencing model to obtain a preliminary predicted sentence; compare the preliminary predicted sentence with the actual judgment result to obtain new candidate sentencing factors; and update the sentencing element set based on the new candidate sentencing factors. The dimension expansion module is used to expand the dimension of the structured sentencing elements based on the newly added feature dimensions to obtain the expanded structured sentencing elements. The online update module is used to update the multi-defendant vectorized sentencing model online based on the updated set of sentencing elements and the expanded-dimensional structured sentencing elements, and output the final predicted sentence.
[0099] While the specific embodiments of the present invention depict actions or steps in a particular order, this should be understood as requiring such actions or steps to be performed in the specific order shown or in sequential order, or requiring all illustrated actions or steps to be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0100] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for intelligent sentence prediction in complex criminal cases, characterized in that, Includes the following steps: Step S1: The judgment documents of the cases to be processed are sequentially parsed, the initial set of sentencing elements is constructed, and the sentencing elements are extracted to obtain the set of sentencing elements and the structured sentencing elements. Step S2: Establish a multi-defendant vectorized sentencing model. The multi-defendant vectorized sentencing model sequentially performs feature attribution, establishes fine-grained role labels, predicts single-crime sentences, and performs combined sentence constraint processing on the input structured sentencing elements, and outputs the predicted sentence. Step S3: Input the structured sentencing elements into the multi-defendant vectorized sentencing model to obtain a preliminary predicted sentence; Compare the preliminary predicted sentence with the actual judgment result to obtain new candidate sentencing factors; The sentencing factor set is updated based on the new candidate sentencing factors; Step S4: Perform dimensionality expansion processing on the structured sentencing elements based on the newly added feature dimensions to obtain the expanded structured sentencing elements; Step S5: Based on the updated set of sentencing elements and the expanded-dimensional structured sentencing elements, update the multi-defendant vectorized sentencing model online and output the final predicted sentence.
2. The intelligent sentence prediction method for complex criminal cases according to claim 1, characterized in that, Step S1 specifically includes: Step S1-1: Extract the text from the "Ascertained by this Court" and "This Court Holds" sections of the judgment document of the case to be processed, and obtain the corresponding charges against each defendant among multiple defendants; Step S1-2: For each defendant, run the sentencing element initialization Agent Skill to generate an initial set of sentencing elements corresponding to the target crime based on legal norms and case data; Steps S1-3: For each defendant, based on their corresponding crime and the initial sentencing element set, generate an input instruction text to guide the big language model to perform targeted information extraction, and input the input instruction text and the corresponding case text into the big language model to obtain structured sentencing elements; The structured sentencing elements include statutory circumstances, discretionary circumstances, consequences of the conduct, subjective malice, and other sentencing-related attributes.
3. The intelligent sentence prediction method for complex criminal cases according to claim 2, characterized in that, The processing steps for initializing the Agent Skill based on sentencing factors include: The system receives the crime name input by the user, extracts the crime name features, retrieves relevant laws and regulations from the legal knowledge base through retrieval enhancement generation technology, analyzes the retrieval results using a large language model, and extracts common sentencing elements related to the crime name. After a user uploads specific case documents, the document analysis module is invoked to read the case text from the case database. The case text is analyzed using LLM to identify and extract new sentencing elements unique to the case. The new elements are then merged with general sentencing elements to form the initial set of sentencing elements.
4. The intelligent sentence prediction method for complex criminal cases according to claim 3, characterized in that, In step S2, the multi-defendant vectorized sentencing model sequentially performs feature attribution and establishes fine-grained role labels for the input structured sentencing elements, specifically including: The facts of the case related to sentencing are assigned to each defendant individually, and an attribution value is constructed for each defendant. The attribution value includes the number of times the defendant participated in the act, the amount of money directly controlled or received by the defendant, whether harm was caused, whether the defendant surrendered himself to the police, and whether he pleaded guilty and accepted punishment. The set of responsibility roles is determined by the following expression: , or, Define fine-grained role tags and encode them as one-hot vectors; the fine-grained role tags are specifically: in, Indicates the first The detailed responsibility roles of each defendant.
5. The intelligent sentence prediction method for complex criminal cases according to claim 4, characterized in that, In step S2, the step of the multi-defendant vectorized sentencing model predicting the sentence for a single crime based on the input structured sentencing elements specifically includes: For single-crime sentence prediction, let the first... The cases total The defendant, then the first The sentencing results for the defendants are expressed as follows: in: Indicates a case index; Indicates the first Number of defendants in each case; Indicates the first In the case of the first The index of the defendants, and ; Indicates the first In the case of the first Sentencing results for the defendants; Indicates that for the first In the case of the first The saturation constraint function set by the defendant is used to limit the intermediate sentencing result of the defendant to the range permitted by the corresponding law. Indicates the first In the case of the first The starting point for sentencing of the defendants; Indicates the number of features used to determine the benchmark sentence; Indicates the first In the case of the first The defendants in the The values of the basic criminal characteristics; Indicates the first In the case of the first The defendant's Adjustment coefficients corresponding to the characteristics of the benchmark sentence; Indicates the number of legally applicable sentencing factors that take precedence; Indicates the first In the case of the first The values for each defendant in the category t of priority sentencing circumstances; Indicates the first In the case of the first The adjustment coefficient corresponding to the priority sentencing circumstances of the defendant in category t; Indicates the number of other sentencing factors; Indicates the first In the case of the first The defendants in the Values for other sentencing factors; Indicates the first In the case of the first The defendant's Adjustment coefficients corresponding to other sentencing circumstances; Indicates the first In the case of the first Unstructured factors of the defendants can be fitted using neural networks; Indicates the first In the case of the first The disturbing items of the defendants; This represents the summation operation; This indicates a series of multiplication operations; No. The overall sentencing result for multiple defendants in a case is obtained by combining the sentencing results of each defendant, as expressed in the following formula: in express Overall sentencing results for multiple defendants in this case They represent the first In the case of the first The sentencing results for the defendants.
6. The intelligent sentence prediction method for complex criminal cases according to claim 5, characterized in that, In step S2, the expression for the multi-defendant vectorized sentencing model to process the combined sentence constraints of the input structured sentencing elements is as follows: in This represents the predicted sentence output by the vectorized sentencing model for multiple defendants. This indicates the input sentence duration. Indicates the longest sentence among the multiple sentences. The legal upper limit is used to trim the input sentence. Indicates the longest sentence among multiple sentences. For each crime Perform a search to obtain the maximum value. Indicates the total number of charges. Indicates the first The predicted sentence for each crime is as follows: Indicates the legal upper limit. This indicates calculating the minimum value. Indicates the total sentence. This represents the legally capped function, where 240 represents the number of months corresponding to twenty years, 300 represents the number of months corresponding to twenty-five years, and 420 represents the number of months corresponding to thirty-five years.
7. The intelligent sentence prediction method for complex criminal cases according to claim 6, characterized in that, In step S3, the preliminary predicted sentence is compared with the actual judgment result to obtain new candidate sentencing factors; The steps of updating the set of sentencing factors based on the new candidate sentencing factors specifically include: The preliminary predicted sentence is compared with the actual judgment result; when the deviation between the two exceeds a preset threshold, the source of error is analyzed to obtain new candidate sentencing factors. When the feedback correction process identifies new candidate sentencing factors, the candidate sentencing factors are reviewed, and the approved candidate sentencing factors are added to the sentencing element set.
8. The intelligent sentence prediction method for complex criminal cases according to claim 7, characterized in that, Step S4 specifically includes: When a new sentencing factor arises from a point in time When a feature vector is included in sentencing evaluation, a dimension expansion operation is performed on the original feature vector to construct an expanded feature vector. in: This is the expanded feature vector of the case; The original case feature vector before dimensionality expansion. To add sentencing factors at the time The value of ; Indicates the dimension expansion 3D real vector space, Indicates time; The model parameter vector is expanded from the original dimension to ; At the moment of dimensional expansion At the previous moment, the original parameter estimation results are embedded into the expanded parameter space, and the expression is: ,in: Before expanding the dimensions, in the existing Parameter estimates in the dimension; the newly added _th ... The dimension parameter is initially set to 0.
9. The intelligent sentence prediction method for complex criminal cases according to claim 8, characterized in that, Step S4 also includes: During the online update phase of Adam after its expansion, At that time, based on the expanded feature vector and the expanded parameter vector Construct the current loss function and calculate the gradient after dimensionality expansion. The expression is as follows: in, This represents the expanded gradient vector obtained at time t. Represents the parameter vector Find the gradient. This represents the loss function at time t; Then, update the expanded first and second moments as follows: in, This indicates the estimation of the first moment after dimension expansion. This represents the first-order moment attenuation coefficient. This represents the first moment estimate at time t-1. This represents the second-order moment estimation after dimension expansion. This represents the second moment estimate at time t-1. This represents the second-order moment attenuation coefficient. This represents the element-wise square of the gradient vector; The corresponding deviation correction is: in, This represents the first-moment estimate after bias correction. This represents the second-order moment estimate after bias correction; Then update the expanded parameter vector using the following formula: This represents the extended-dimensional parameter vector at time t. This represents the parameter vector at time t-1. Indicates the learning rate. It is a small positive number.
10. An intelligent sentence prediction system for complex criminal cases, characterized in that, include: The sentencing element analysis module is used to sequentially parse the text of the judgment documents of the cases to be processed, construct the initial set of sentencing elements, and extract sentencing elements to obtain the set of sentencing elements and structured sentencing elements. A multi-defendant vectorized sentencing model sequentially performs feature attribution, establishes fine-grained role labels, predicts single-crime sentences, and processes combined sentence constraints on the input structured sentencing elements, and outputs the predicted sentence. The update module is used to input the structured sentencing elements into the multi-defendant vectorized sentencing model to obtain a preliminary predicted sentence; and to compare the preliminary predicted sentence with the actual judgment result to obtain new candidate sentencing factors. The sentencing factor set is updated based on the new candidate sentencing factors; The dimension expansion module is used to expand the dimension of the structured sentencing elements based on the newly added feature dimensions to obtain the expanded structured sentencing elements. The online update module is used to update the multi-defendant vectorized sentencing model online based on the updated set of sentencing elements and the expanded-dimensional structured sentencing elements, and output the final predicted sentence.