Discretionary benchmark intelligent recommendation method
Patent Information
- Application Number
- CN202611284068.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]为了解决现有裁量推荐方案难以在同一系统内同时兼顾裁量结果的合法可控与对复杂案情的灵活适配的问题,本申请提供一种裁量基准智能推荐方法
1、通过先由裁量基准圈定由离散裁量档次构成的候选裁量集合、再令预训练语言模型仅在该集合内结合违法事实文本与裁量得分择档,使裁量结果被约束在法定边界之内无法越界,同时保留对复杂案情的语义理解能力,实现合法可控前提下的灵活适配。
Smart Images

Figure CN122926035A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of administrative law enforcement assistance, and in particular to an intelligent recommendation method for discretionary benchmarks. Background Technology
[0002] In the process of administrative law enforcement, administrative penalty discretion is the core step in determining the specific penalty level and amount within the statutory penalty range. To standardize administrative penalty discretion and reduce inappropriate discretionary space, local administrative law enforcement agencies have compiled a large number of enforcement matters and formulated corresponding discretionary benchmarks, forming a comprehensive system of discretionary benchmarks. When faced with specific violations, frontline law enforcement personnel need to quickly and accurately determine the applicable discretionary level and corresponding penalty range from this vast system of benchmarks.
[0003] Violations are often complex and involve overlapping types of offenses, while still allowing for a degree of discretion within the legally prescribed range. When different law enforcement officers handle the same type of violation and arrive at inconsistent decisions, it can easily lead to administrative review and litigation, damaging the credibility of administrative law enforcement. When the discretionary decision exceeds the legally prescribed penalty range or applies an incorrect penalty basis, the corresponding administrative action may be revoked and accountability may be pursued.
[0004] Existing discretionary recommendation schemes struggle to simultaneously ensure the legality and controllability of discretionary results while flexibly adapting to complex cases within the same system. Rule-based schemes solidify discretionary logic into limited conditional matching rules, making them ineffective or limiting to the closest approximation when encountering complex or novel circumstances not pre-defined by the rules, lacking necessary flexibility. While large language models can understand complex case descriptions, their outputs, unconstrained by legal boundaries, may result in penalties exceeding legal limits or citing non-existent grounds for punishment, making them unreliable in scenarios with extremely low tolerance for error. Historical case retrieval schemes, while referencing historical consistency, are limited by the size and coverage of the case database, failing to provide reliable references for novel or rare violations due to a lack of similar cases, and existing discretionary biases from historical cases are perpetuated. Furthermore, the varying importance of different discretionary factors for different types of violations makes it difficult to differentiate between varying circumstances and legally permissible discretionary measures if quantified with uniform weights. Each of the above solutions improves one aspect of discretionary recommendation, but fails in another, causing discretionary recommendation to lose sight of the balance between legality and controllability and flexibility. Summary of the Invention
[0005] To address the problem that existing discretionary recommendation schemes cannot simultaneously ensure the legality and controllability of discretionary results while flexibly adapting to complex cases within the same system, this application provides an intelligent recommendation method for discretionary benchmarks.
[0006] This application provides a method for intelligent recommendation of discretionary benchmarks, which adopts the following technical solution: A method for intelligent recommendation of discretionary benchmarks includes the following steps: S1. Perform multi-label classification on the illegal fact text to obtain the type of illegal behavior corresponding to the illegal fact text; S2. Extract the corresponding discretionary factors according to the type of illegal behavior, quantify each discretionary factor to obtain the quantified value of each discretionary factor, and weight each quantified value according to the weight determined according to the type of illegal behavior to obtain the discretionary score. S3. Based on the discretionary benchmark, identify a candidate discretionary set consisting of discrete discretionary levels that are permissible within the legal scope for the type of illegal behavior, and each discretionary level in the candidate discretionary set corresponds to a legally defined penalty range; S4. Using the text of the illegal facts and the discretionary score as input, a pre-trained language model is used to determine the recommended discretionary level within the candidate discretionary set. The recommended discretionary level is one of the discretionary levels in the candidate discretionary set. S5. Calculate the similarity between the illegal fact text and each historical case in the historical discretion case database, determine the top-ranked historical cases as similar historical cases according to the similarity from high to low, and count the discretion distribution of the similar historical cases; S6. Output discretion recommendation results, which include the recommended discretion level, the penalty range corresponding to the recommended discretion level, the discretion score, and the discretion distribution, as an auxiliary reference for discretion.
[0007] By adopting the above technical solution, the discretionary benchmark first delineates a candidate discretionary set consisting of discrete discretionary levels that are permissible within the legal scope for the type of illegal behavior. Then, the pre-trained language model determines the recommended discretionary level only within this candidate discretionary set, combining the illegal fact text and the discretionary score. This ensures that the discretionary results are constrained within the legal boundaries and cannot exceed them, while retaining the semantic understanding ability for complex cases. The discretionary score obtained by quantifying the discretionary factors provides a reproducible numerical basis for level selection, and the discretionary distribution of historical cases provides a historical consistency reference for the recommendation results. Thus, under the premise of legality and controllability, flexible adaptation to complex cases is achieved, taking into account both the consistency of discretion and the adaptability of individual cases.
[0008] Optionally, S4 includes sub-steps S41-S43: S41. Determine the recommended discretion level within the candidate discretion set using the pre-trained language model, and determine the confidence level for the recommended discretion level; S42. Map the discretion score to a discretion score level, and calculate the level deviation between the recommended discretion level and the discretion score level; S43. In response to the deviation of the grade being greater than a preset deviation threshold, the confidence level is lowered, and the scored discretionary grade and the recommended discretionary grade are marked together as discretionary grades to be manually confirmed.
[0009] By adopting the above technical solution, the recommended discretion level given by the pre-trained language model is compared with the discretion level mapped by the discretion score. When the deviation exceeds the preset deviation threshold, the confidence level is lowered and marked for manual confirmation, so that the discrepancy between the two types of discretion criteria based on semantics and numerical values is explicitly exposed rather than covered up.
[0010] Optionally, step S4 further includes sub-steps S44-S46: S44. In response to the deviation of the grade being greater than the preset deviation threshold, the conflicting recommended discretion grades and the score discretion grades are jointly determined as the recommended discretion interval; in response to the deviation of the grade not being greater than the preset deviation threshold, the recommended discretion grade is determined as the recommended discretion interval. S45. Determine the confidence level of each discretion level in the recommended discretion interval to obtain the confidence level distribution of the recommended discretion interval; S46. The recommended discretionary range and the confidence distribution are used as auxiliary references for manual determination of the final discretionary level within the recommended discretionary range. Each discretionary level in the recommended discretionary range belongs to the candidate discretionary set, and the penalty range corresponding to each discretionary level in the recommended discretionary range falls within the penalty range range of the candidate discretionary set.
[0011] By adopting the above technical solution, when there is a conflict between two types of discretionary basis, the recommended discretionary interval covering the two conflicting discrete discretionary levels and the confidence distribution of each level are used as the output. The interval boundary is constrained by the penalty range of the candidate discretionary set, so that the system does not produce a false single conclusion under uncertain conditions, and the final decision-making power is reserved to law enforcement officers.
[0012] Optionally, step S5 includes sub-steps S51-S53: S51. Convert the text of the illegal facts into a text vector; S52. Calculate the similarity between the text vector and the case vectors of each historical case in the historical discretion case library; S53. Based on the similarity from high to low, determine the preset number of historical cases that are ranked first as similar historical cases, and statistically analyze the distribution of the discretionary level of each similar historical case to obtain the discretionary distribution.
[0013] By adopting the above technical solution, the text of the illegal facts is vectorized and its similarity is calculated with the case vectors of each historical case in the historical discretion case database. The historical cases with the highest similarity are selected and their discretion level distribution is statistically analyzed, so that the recommendation results can obtain a reference for the discretion distribution based on similar historical cases.
[0014] Optionally, step S5 further includes sub-steps S54-S56: S54. In response to the number of similar historical cases being zero, or the similarity between the similar historical cases and the illegal fact text being lower than a preset similarity threshold, a benchmark reference case is generated based on the candidate discretionary set and the discretionary score. The benchmark reference case is generated as follows: taking the discretionary level mapped by the discretionary score as the center, a distribution of each discretionary level is generated on the candidate discretionary set as the discretionary distribution of the benchmark reference case, and a non-historical source mark is added to the benchmark reference case. S55. The discretionary distribution of the benchmark reference case shall be taken as the discretionary distribution; S56. In response to receiving the manual discretion result for the text of the illegal facts, the illegal facts text is associated with the manual discretion result and written as a seed historical case into the historical discretion case library.
[0015] By adopting the above technical solution, when similar historical cases are missing, a benchmark reference case with a non-historical source mark is generated based on the candidate discretion set and discretion score to fill the gap. After the case is manually decided, the case is used as a seed historical case to write back into the case library, so that the system has the ability to generate its own cases for new types of illegal acts.
[0016] Optionally, step S6 includes sub-steps S61-S62: S61. Output the first layer of display content of the discretion recommendation result. The first layer of display content includes the recommended discretion level, the penalty range corresponding to the recommended discretion level, and the discretion factors that contribute to the discretion score in the order of priority. S62. In response to receiving the expand instruction, output the second layer of display content of the discretion recommendation result. The second layer of display content includes the discretion benchmark clauses hit by the recommended discretion level, the quantitative values and weights of all the discretion factors, and the discretion distribution.
[0017] By adopting the above technical solution, the discretionary recommendation results are divided into a first layer of display content that only contains the recommended discretionary level, penalty range and core discretionary factors, and a second layer of display content that only outputs the hit clauses, all factor weights and discretionary distribution after receiving the expansion instruction, so that the discretionary basis is complete and traceable while avoiding information overload.
[0018] Optionally, S1 includes sub-steps S11-S13: S11. The illegal facts text is encoded using a multi-label classification model to obtain text features. The multi-label classification model is obtained through adaptive pre-training of legal domain text. S12. Based on a preset illegal behavior label tree, the text features are classified using a multi-label attention mechanism to obtain at least one candidate illegal behavior type; S13. Perform a hierarchical consistency check on the candidate illegal behavior types according to the hierarchical relationship of the illegal behavior label tree, and determine the candidate illegal behavior types that pass the hierarchical consistency check as the illegal behavior types.
[0019] By adopting the above technical solution, a multi-label classification model that has been pre-trained adaptively in the legal field is combined with a label tree of illegal behavior to classify illegal facts text, and a hierarchical consistency check is performed according to the hierarchical relationship of the label tree, so that complex illegal facts that violate multiple clauses at the same time can be accurately identified and the classification results conform to the hierarchical logic.
[0020] Optionally, in step S2, the discretionary factors include the area of violation, duration, repeated violations, scope of impact, and cooperation in rectification; in response to the absence of any of the discretionary factors in the text of the violation facts, the unrecorded discretionary factors are marked as missing discretionary factors, the quantification value of the missing discretionary factors is assigned according to a preset lenient value, and a supplementary investigation prompt for the missing discretionary factors is output.
[0021] By adopting the above technical solution, the composition of discretionary factors is clarified, and when a certain discretionary factor is not recorded in the text of the violation, it is marked as missing and assigned a value according to the lighter penalty. At the same time, a supplementary investigation prompt is output to avoid the omission of punishment due to the misinterpretation of unknown information as the lightest offense.
[0022] Optionally, S3 includes sub-steps S31-S33: S31. Configure a benchmark version number for the discretion benchmark, and determine the candidate discretion set according to the discretion benchmark corresponding to the benchmark version number; S32. In response to an update of the discretionary benchmark, mark the discretionary rules that have changed in the discretionary benchmark as rules to be reviewed; S33. Record whether the discretionary rule matched by the candidate discretionary set is the rule to be reviewed, so that when S6 outputs the discretionary recommendation result, in response to the matched discretionary rule being the rule to be reviewed, a manual review prompt mark is added to the discretionary recommendation result.
[0023] By adopting the above technical solution, a version number is configured for the discretionary benchmark and the discretionary rules that have changed after the update are marked as pending review. When outputting the results, a manual review prompt is added to the results of hitting the rules pending review, so as to avoid silently using outdated rules for discretionary purposes after the regulations are updated.
[0024] Optionally, S2 includes sub-steps S21-S23: S21. Query the corresponding weight table according to the type of illegal behavior to obtain the basic weight of each of the discretionary factors; S22. Modulate the basic weights according to the context factors corresponding to the illegal facts text to obtain modulated weights. The modulation is carried out within the range of keeping the relative order of the weights among the discretionary factors unchanged. The modulated weights are the lower-level implementations of the weights determined according to the type of illegal behavior. S23. The quantized values of each of the discretionary factors are weighted according to the modulation weights to obtain the discretionary score, wherein the weight table is configured such that the discretionary score does not decrease monotonically with any of the quantized values.
[0025] By adopting the above technical solution, a dedicated weight table is queried according to the type of illegal behavior, and the weights are adjusted within the range of maintaining the relative order of the factors in combination with the contextual factors. The weight table is configured so that the discretionary score does not decrease monotonically with the quantitative value of any factor, so that the differentiated circumstances of different types of illegal behavior can be distinguished in accordance with the statutory discretion.
[0026] Optionally, the discretionary benchmark is derived from a pre-constructed legal knowledge graph, which includes entities such as illegal acts, applicable clauses, discretionary factors and penalty ranges, as well as the relationships between these entities.
[0027] By adopting the above technical solution, a structured legal knowledge graph is used to organize the discretionary benchmarks, which facilitates the rapid retrieval of the correlation between illegal acts and applicable clauses, discretionary factors, and penalty ranges when delineating candidate discretionary sets.
[0028] Optionally, in response to the simultaneous occurrence of three factors—no matching illegal behavior type in the illegal behavior label tree, a rule pending review, and zero similar historical cases—the discretionary recommendation result is marked as requiring manual discretion, and the manual discretion result is written into the historical discretionary case database as a seed historical case.
[0029] By adopting the above technical solution, when classification, rules and cases fail simultaneously, human discretion takes over, avoiding unreliable recommendations, and establishing the first seed case for this type of illegal behavior.
[0030] Optionally, the processing path can be categorized based on the complexity of the case corresponding to the illegal facts text. If the case complexity is lower than the preset complexity threshold, the recommended discretionary level can be directly determined by the discretionary benchmark. If the case complexity is not lower than the preset complexity threshold, a pre-trained language model can be used to determine the recommended discretionary level.
[0031] By adopting the above technical solution, simple cases can be directly filed based on discretionary standards, while pre-trained language models can be used only for complex cases, thereby reducing the processing overhead and unnecessary semantic reasoning risks for simple cases.
[0032] Optionally, before writing the case into the historical discretionary case database, historical cases whose discretionary results deviate from the median of the discretionary distribution of similar historical cases by more than a preset deviation range are marked as abnormal cases, and the abnormal cases are not determined as similar historical cases.
[0033] By adopting the above technical solution, historical cases that deviate significantly from the mainstream discretionary practices of the same type are excluded from reference, thus preventing historical discretionary deviations from being retrieved, reused, and amplified.
[0034] Optionally, the final discretionary level determined manually can be used to calibrate the weight table at a preset cycle.
[0035] By adopting the above technical solution, the weight table is periodically calibrated by manually providing the final filing result within the legal range, so that the calculation of the discretionary score continues to conform to the actual discretionary standards as law enforcement practice progresses.
[0036] Optionally, the method is performed by a reference-independent inference kernel and a region-pluggable reference adaptation layer.
[0037] By adopting the above technical solution, the region-independent inference kernel is decoupled from the region-specific benchmark adaptation layer, so that the method does not need to retrain the inference kernel when switching to different regional discretionary benchmarks.
[0038] In summary, this application includes at least one of the following beneficial technical effects: 1. By first defining a candidate discretionary set consisting of discrete discretionary levels based on the discretionary benchmark, and then having the pre-trained language model select a level only within this set by combining the illegal facts text and the discretionary score, the discretionary results are constrained within the legal boundaries and cannot exceed them, while retaining the semantic understanding ability of complex cases, and achieving flexible adaptation under the premise of legality and controllability.
[0039] 2. By assigning specific weights to quantitative discretionary factors according to the type of violation and combining them with context-based ordering, discretionary scores are obtained. Historical case discretionary distribution provides a consistent reference, and the discretionary basis is displayed in layers, so that differentiated circumstances can be distinguished in accordance with statutory discretion. The discretionary results have both reproducible numerical basis and verifiable historical reference.
[0040] 3. By outputting a recommended discretionary range covering both conflicting files when semantic files and numerical files conflict and retaining the right to manually determine the file, replacing the missing similar cases with a rule-synthesized baseline case and writing back the seed case, and marking the updated outdated discretionary rules as pending review, the system maintains reliable results in boundary situations such as discretionary disagreements, cold start of cases, and regulatory updates. Attached Figure Description
[0041] Figure 1 This is a flowchart of an embodiment of the intelligent recommendation method for discretionary criteria provided in this application; Figure 2 This is a schematic diagram illustrating the selection of a candidate discretionary set and the selection of a file within the set, provided in an embodiment of this application. Figure 3 This is a flowchart illustrating the generation of conflict re-adjudication and recommended discretionary ranges provided in one embodiment of this application; Figure 4 This is a flowchart of cold start benchmark reference case generation and seed write-back provided in one embodiment of this application. Detailed Implementation
[0042] The present application will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the application and are not intended to limit the scope of the application.
[0043] This application discloses an intelligent recommendation method for discretionary benchmarks. Before detailing the embodiments of this application, some terms will be explained.
[0044] Discretionary standards are standard documents that administrative law enforcement agencies use to refine and categorize the range of penalties set by laws and regulations. Each discretionary rule typically includes the type of illegal act, the applicable clauses, and several discretionary levels, used to guide law enforcement personnel in determining penalties commensurate with the severity of the violation within the legally prescribed range.
[0045] Discretionary levels and penalty ranges are two levels of characterization of penalties in the discretionary benchmark. Discretionary levels are discrete penalty grades, such as warning, first-level fine, second-level fine, and third-level fine; penalty ranges are the types of penalties corresponding to each discretionary level and the upper and lower limits of the corresponding penalty amount. For example, the first-level fine corresponds to a type of fine and the amount is between 50 yuan and 200 yuan; for discretionary levels such as warnings that do not involve a fine amount, the penalty range is the corresponding type of penalty, and the upper and lower limits of the amount are empty.
[0046] Discretionary factors are quantifiable dimensions of circumstances that influence the determination of the level of discretion, such as the area of violation, duration, number of violations, scope of impact, and cooperation in rectification. Discretionary factors transform unstructured case descriptions into calculable values, forming the basis for achieving consistency in discretionary decisions.
[0047] The candidate discretionary set is a discrete set consisting of all discretionary levels that are legally permissible for a certain type of illegal conduct. The candidate discretionary set defines the legal boundaries for subsequent level recommendations; no recommendation result exceeds this set. This will be explained in detail in steps S3 and S4.
[0048] A pre-trained language model is a neural network model that has been pre-trained on a large-scale corpus and possesses the ability to understand and generate natural language. In the embodiments of this application, the pre-trained language model is used to determine the recommended discretionary level based on the semantics of the case within the candidate discretionary set.
[0049] The illegal behavior label tree is a tree-like classification system that organizes illegal behavior types according to a hierarchical inheritance structure. The root node is the general category of illegal behavior in the law enforcement field, which is divided into major categories and subcategories layer by layer. For example, urban management illegal behavior is divided into the category of urban appearance and sanitation, urban appearance and sanitation is divided into street vending, and street vending is further divided into mobile vendors and businesses operating outside their premises.
[0050] The historical discretionary case database is a database that stores information on closed cases. Each historical case includes at least the case text, the type of illegal act, the final determined discretionary level and penalty amount, and a case vector corresponding to the case text is stored in advance.
[0051] The application environment of this method is described below. This method can be executed by the server of the administrative law enforcement information system. Law enforcement officers enter the text of the violation facts through the law enforcement terminal and receive the discretionary recommendation result on the law enforcement terminal. The server can be deployed in the government cloud environment, and the pre-trained language model can be deployed locally to meet the security management requirements of law enforcement data. This method is applicable to administrative penalty discretion assistance scenarios in fields such as urban management, market supervision, ecological environment, and transportation.
[0052] To facilitate understanding, a specific case scenario is presented below. Law enforcement officers investigated and dealt with Wang for illegally operating a barbecue stall on a sidewalk near a school during the morning rush hour. The illegal area occupied was 2 square meters, and the stall had been operating for approximately 3 hours, polluting the road with oil. Wang only left the scene after repeated warnings. If this case were directly given to an unconstrained generative model to output a penalty suggestion, the model might suggest a fine of 2000 yuan. However, the statutory maximum fine for illegal street vending in the local discretionary standards is 1000 yuan, exceeding the statutory limit and therefore unacceptable. If only preset rules are used for matching, this case involves both illegal street vending and damage to the city's appearance, compounded by the combination of the morning rush hour and the location near a school. Preset rules cannot exhaustively cover such combinations, resulting in either incomplete matching results or the application of only the penalty level corresponding to a single circumstance. The method provided in this application is used to provide a discretionary recommendation that is both legal and appropriate to the case in such scenarios.
[0053] This application recommends discretionary levels and penalty ranges for texts containing facts of violations by first defining legitimate candidates based on discretionary criteria, and then having a pre-trained language model select only from the candidate range. First, the texts containing facts of violations are classified using multiple labels, and discretionary factors are quantified and weighted to obtain discretionary scores. Then, a candidate discretionary set is defined, and the recommended discretionary level is determined within the set. Finally, the discretionary recommendation result, carrying the supporting evidence, is output based on the discretionary distribution of historical cases. Thus, the recommendation result is constrained within legal boundaries while retaining semantic understanding of complex cases and the ability to differentiate between individual cases. The following sections provide a detailed explanation of the overall methodology, the specific implementation of each step, and the overall deployment of the method.
[0054] The following is combined Figure 1 The overall process of this method is described in detail. This method includes steps S1 to S6.
[0055] S1. Perform multi-label classification on the illegal facts text to obtain the type of illegal behavior corresponding to the illegal facts text.
[0056] S2. Extract the corresponding discretionary factors according to the type of illegal behavior, quantify each discretionary factor to obtain the quantitative value of each discretionary factor, and weight each quantitative value according to the weight determined according to the type of illegal behavior to obtain the discretionary score.
[0057] S3. Based on the discretionary benchmark, a candidate discretionary set consisting of discrete discretionary levels is delineated within the legally permissible range for the types of illegal acts. Each discretionary level in the candidate discretionary set corresponds to a legally defined penalty range.
[0058] S4. Using the text of the violation and the discretionary score as input, a pre-trained language model is used to determine the recommended discretionary level within the candidate discretionary set. The recommended discretionary level is one of the discretionary levels in the candidate discretionary set.
[0059] S5. Calculate the similarity between the illegal facts text and each historical case in the historical discretion case database. Select the top-ranked historical cases as similar historical cases according to the similarity from high to low, and count the discretion distribution of similar historical cases.
[0060] S6. Output the discretion recommendation results, which include the recommended discretion level, the penalty range corresponding to the recommended discretion level, the discretion score, and the discretion distribution, as an auxiliary reference for discretion.
[0061] The specific implementation of multi-label identification of illegal behavior in step S1 is described in detail below. In some embodiments, S1 includes sub-steps S11 to S13.
[0062] S11. The text of illegal facts is encoded using a multi-label classification model to obtain text features. The multi-label classification model is obtained through adaptive pre-training on legal domain texts. In the specific implementation, the encoding language model, which has been pre-trained on a large-scale general corpus, is first trained using legal domain corpora such as legal provisions, discretionary benchmark texts, and law enforcement documents. This makes the model more accurate in expressing legal terms such as "order to rectify" and "repeated violations." During encoding, the text of illegal facts is converted into a sequence of lexical units. After encoding by the model, fixed-dimensional text features are output, which are used for subsequent label classification. For example, inputting the case text of Wang's barbecue stall on the sidewalk and oil pollution of the road surface into the model results in a 768-dimensional text feature vector.
[0063] S12. Based on a pre-defined illegal behavior label tree, a multi-label attention mechanism is used to classify text features to obtain at least one candidate illegal behavior type. In the specific implementation, for each candidate label in the illegal behavior label tree, the attention mechanism calculates the relevance weights of each word in the text to the label. The text features are then weighted and aggregated according to these relevance weights to obtain the label's discrimination vector. The discrimination vector is then passed through a classification head to output the label's hit probability. Labels with hit probabilities exceeding a pre-defined label threshold constitute candidate illegal behavior types. For example, the pre-defined label threshold is set to 0.5. For instance, the case text of Wang's case simultaneously hits both the labels "illegal street vending" and "damaging the city's appearance," with hit probabilities of 0.91 and 0.66 respectively, both exceeding the threshold, thus constituting two candidate illegal behavior types.
[0064] S13. Perform hierarchical consistency checks on candidate illegal behavior types according to the hierarchical relationship of the illegal behavior label tree. Candidate illegal behavior types that pass the hierarchical consistency check are determined as illegal behavior types. In the specific implementation, the criterion for hierarchical consistency checks is that when a subclass label is hit, its parent class label must also be hit. If a subclass label is hit but its parent class label is not, the parent class label is added to the hit list, or the subclass label is downgraded to the parent class output, ensuring that the output type set conforms to the hierarchical logic of the label tree. Hitting only the parent class but not the subclass is considered a coarse-grained legal output and does not trigger correction. For example, if the model outputs a hit probability of 0.85 for "mobile vendor operation" but the higher-level "street occupation" does not exceed the threshold, after verification, "street occupation" is added to the hit list to avoid the logical contradiction of having a subclass but no parent class.
[0065] In response to the identification of multiple types of illegal acts, in some embodiments, steps S2 to S6 are executed for each type of illegal act, and respective discretionary recommendation results are output. For example, in the case of Wang, the subsequent steps are executed according to two types: illegal street vending and damage to the city's appearance. For ease of explanation, the following discussion will focus on the illegal street vending type.
[0066] In other embodiments, multi-label classification may not employ an attention mechanism, but instead sets up independent binary classification heads for each label in the label tree, with each binary classification head independently outputting the hit probability of the label based on text features; this implementation can also complete multi-label classification of illegal fact texts, and is another implementation of step S1.
[0067] Based on the types of illegal acts identified in step S1, the extraction, quantification, and weighting of discretionary factors in step S2 will be explained in detail below.
[0068] In some embodiments, S2, the discretionary factors include the area of violation, duration, number of violations, scope of impact, and cooperation in rectification. The quantification methods for each discretionary factor are as follows: the area of violation is normalized according to a preset area benchmark, for example, with 10 square meters as the benchmark, 2 square meters is quantified as 0.2; the duration is normalized according to a preset duration benchmark, for example, with 10 hours as the benchmark, 3 hours is quantified as 0.3; the number of violations is quantified by frequency, with the first violation being 0, the second within a year being 0.5, and the third or more within a year being 1; the scope of impact is quantified by the degree of impact on traffic and the environment, for example, 0.2 for back streets and alleys late at night, 0.5 for ordinary road sections during normal times, and 0.8 for road sections around schools and hospitals during morning and evening rush hours; cooperation in rectification is quantified by the degree of response of the party involved, with 0 for immediate rectification, 0.5 for rectification after persuasion, and 1 for refusal to rectify. In Wang's case, the quantified value for the area of violation is 0.2, the quantified value for the duration is 0.3, the quantified value for the scope of impact is 0.8, and the quantified value for cooperation in rectification is 0.5.
[0069] In response to the absence of any discretionary factor in the text of the violation, the system marks the unrecorded discretionary factor as a missing discretionary factor, assigns a pre-set lenient value to the quantified value of the missing discretionary factor, and outputs a supplementary investigation prompt for the missing discretionary factor. Unexamined circumstances in administrative penalties cannot be used as the basis for heavier penalties; the inclusion of missing discretionary factors in the score synthesis based on a lenient value reflects this principle. The supplementary investigation prompt simultaneously informs law enforcement personnel that the circumstance remains to be investigated, preventing information gaps from being silently concealed. For example, in Wang's case, the case text does not record whether there were repeated violations; repeated violations are marked as a missing discretionary factor, its quantified value is assigned 0 based on a lenient value, and a prompt is output to law enforcement personnel to check the party's penalty records within the past year.
[0070] In some embodiments, S2 includes sub-steps S21 to S23.
[0071] S21. Query the corresponding weight table based on the type of illegal behavior to obtain the basic weight of each discretionary factor. The weight table is set separately for each type of illegal behavior. The basic weight of the same discretionary factor can be different under different types of illegal behavior, so that each type of illegal behavior is weighted according to its own severity. For example, in the weight table for the illegal street vending type, the basic weights for illegal area, duration, repeated violations, scope of impact, and cooperation in rectification are 0.30, 0.15, 0.15, 0.25, and 0.15, respectively; in the weight table for the construction waste spillage type, the basic weight for scope of impact is set to 0.40, the basic weight for illegal area is reduced to 0.10, and the other factors are adjusted accordingly, reflecting the characteristic of this type of violation that the scope of impact is the focus of severity.
[0072] S22. Modulate the base weights based on the contextual factors corresponding to the text of the violation, obtaining modulated weights. Modulation is performed while maintaining the relative order of weights among the discretionary factors. The modulated weights are the lower-level implementations of the weights determined according to the type of violation. Contextual factors are background elements extracted from the text of the violation, such as time periods and regional sensitivity, for example, morning and evening rush hours, or areas surrounding schools or hospitals. Modulation is achieved through the following formula: in, For the first The basic weight of each discretionary factor This is the context modulation coefficient corresponding to this factor. This refers to the modulation weights. To maintain the relative order of the weights, the range of values for each modulation coefficient is constrained to prevent the reversal of the magnitude relationship between any two basic weights. For example, the upper limit of the modulation amplitude is set to half the difference between adjacent basic weights. Contextual modulation does not deviate from the general principle of determining weights based on the type of illegal behavior; it merely makes bounded fine adjustments within this principle based on the context. For example, in Wang's case, which occurred during the morning rush hour and was located near a school, the modulation coefficient for the influence range factor is set to 1.1, and the modulation weight is increased from 0.25 to 0.275. This increase of 0.025 is exactly half the difference between the basic weight of the influence range and the basic weight of the adjacent illegal area (0.05). The modulation coefficients for the other factors are set to 1.0. After modulation, the influence range modulation weight of 0.275 is still less than the illegal area weight of 0.30, and the relative order of the weights is consistent with the basic weights.
[0073] S23. The quantized values of each discretionary factor are weighted according to the modulation weights to obtain the discretionary score. The weight table is configured so that the discretionary score does not decrease monotonically with any quantized value. The discretionary score is calculated using the following formula: in, For the first The quantified value of each discretionary factor. For the discretionary score, the value falls within... All weights in the weighting table are configured with non-negative values. Increasing any quantified value will not decrease the discretionary score; more serious cases will not receive lighter scores. This monotonicity ensures a consistent direction in the discretionary decisions for similar cases. For example, in Wang's case, the moderating weights are 0.30, 0.15, 0.15, 0.275, and 0.15, and the quantified values are 0.2, 0.3, 0, 0.8, and 0.5. Substituting these values into the calculation... .
[0074] There are several ways to obtain the weight table. In one implementation, the weight table is developed by experts based on the descriptions of each level of circumstances in the discretionary standards and their law enforcement experience, and is released for use after review. In other embodiments, the weight table can also be obtained through regression learning from historical cases. That is, the quantitative values of each discretionary factor in historical cases are used as input, and the final discretionary level is used as the target for regression fitting. During training, non-negativity constraints are applied to the weights to maintain monotonicity. Both methods belong to the implementation of determining weights according to the type of illegal behavior. Furthermore, in some embodiments, the manually determined final discretionary level is used to calibrate the weight table at a preset period. For example, the deviation between the manually determined level and the scored discretionary level of cases within each quarterly statistical period is used to slightly adjust the factor weights corresponding to systematic deviations, so that the calculation of discretionary scores continuously aligns with actual discretionary standards as law enforcement practice progresses.
[0075] The following section provides a detailed explanation of the selection of the candidate discretionary set in step S3.
[0076] The discretionary benchmarks are stored in a structured format. Each discretionary rule includes the type of illegal behavior, applicable clauses, and a sequence of discretionary levels. Each level in the discretionary level sequence includes a description of the circumstances and the upper and lower limits of the penalty range. During the selection process, the discretionary benchmarks are retrieved using the type of illegal behavior as an index, and all discretionary levels in the corresponding discretionary rules are extracted to form a candidate discretionary set. For example, the discretionary rules for street vending, according to the local urban management regulations, have four levels: warning, first level (fine of 50 to 200 yuan), second level (fine of 200 to 500 yuan), and third level (fine of 500 to 1000 yuan). The candidate discretionary set consists of four discrete levels: warning, first level, second level, and third level, each carrying its own statutory penalty range.
[0077] In other embodiments, the discretionary criteria are derived from a pre-constructed legal knowledge graph. This graph includes entities representing illegal acts, applicable clauses, discretionary factors, and penalty ranges, as well as the relationships between these entities. Illegal act entities are linked to applicable clause entities, which in turn link to discretionary level and penalty range entities. Furthermore, each illegal act entity links to a corresponding discretionary factor entity. During the selection process, the selection begins with the illegal act entity and proceeds along the links to obtain all discretionary level entities, forming a candidate discretionary set. Organizing the discretionary criteria using a legal knowledge graph also allows for the selection of the candidate discretionary set and facilitates obtaining a list of corresponding discretionary factors for each type during the same traversal for use in step S2.
[0078] In some embodiments, S3 includes sub-steps S31 to S33.
[0079] S31. Configure a benchmark version number for the discretionary benchmark, and determine the candidate discretionary set based on the discretionary benchmark corresponding to the benchmark version number. For example, the benchmark version number is compiled by the release date as v2026.03. The system retrieves the discretionary benchmark by the currently effective benchmark version number, so that each selection can be traced back to the specific benchmark version, providing version basis for subsequent verification.
[0080] S32. In response to an update to the discretionary benchmark, the discretionary rules that have changed in the benchmark are marked as rules pending review. In practice, when a new version is released, each discretionary rule in the old and new versions is compared. Discretionary rules whose applicable clauses, tier classifications, or penalty ranges have changed are marked as rules pending review. For example, if the maximum penalty for the third tier in a discretionary rule is adjusted from 1,000 yuan to 2,000 yuan, this rule is marked as a rule pending review.
[0081] S33. Record whether the discretionary rules matched by the candidate discretionary set are rules pending review. This information is used by S6 to add a manual review prompt to the discretionary recommendation results when outputting the results, in response to the matched discretionary rules being rules pending review. The "pending review" mark is transferred to the output stage along with the case data. Cases that match rules pending review will have a clear prompt in the recommendation results, informing law enforcement officers that the discretionary rules on which the case is based have just been adjusted and the recommendation results must be manually reviewed before use, thereby avoiding the silent use of outdated standards in the early stages of benchmark updates.
[0082] Based on the candidate discretionary set, the specific implementation of file selection within the set and conflict re-determination in step S4 will be explained in detail below.
[0083] Reference Figure 2As one implementation method, the selection of a level within the set is achieved using a restricted option approach. A prompt message is constructed, including the text of the violation, the discretionary score, and the number, description of the circumstances, and penalty range for each discretionary level in the candidate discretionary set. The pre-trained language model is required to output only one level number from the given numbers; the output parsing layer only accepts candidate numbers. If the model output does not belong to a candidate number, the output is discarded and a new one is generated. Since the parsing layer only allows candidate numbers, the recommended discretionary level must structurally belong to the candidate discretionary set; levels exceeding the legally defined range cannot be recommended. For example, if the numbers 0 to 3 represent warnings to the third level in the candidate discretionary set, and the model integrates semantic information such as traffic obstruction around schools during morning rush hour, oil pollution on the road, and removal only after repeated warnings, it outputs number 2. Number 2 corresponds to the second level, and the recommended discretionary level is the second level.
[0084] In other embodiments, the selection of a discretionary level within the set is achieved through a scoring method. A pre-trained language model calculates a matching score for each discretionary level in the candidate discretionary set. For example, the model concatenates the text of the illegal act, the discretionary score, and the description of the relevant incident, then outputs a matching probability. The discretionary level with the highest matching score is selected as the recommended discretionary level. The scoring is limited to levels within the candidate discretionary set, and the selection result must also fall within the candidate discretionary set. Both of these methods belong to implementations of determining the recommended discretionary level within the candidate discretionary set using a pre-trained language model.
[0085] In some embodiments, the pre-trained language model reasons and selects grades within the candidate discretion set in a thought chain manner. That is, the prompt information requires the model to first analyze the matching of the quantitative value of each discretion factor with the plot description of each candidate grade, and then output the selected grade number. The analysis text generated by the model can be retained as a supplement to the recommendation basis in the second layer of display content described later.
[0086] Furthermore, in some embodiments, before executing step S4, the processing path is categorized according to the complexity of the case corresponding to the illegal fact text. The complexity can be determined by a combination of the number of identified illegal behavior types, the number of missing discretionary factors, and the distance between the discretionary score and the boundary of its sub-interval. For example, a case with a single type, all factors, and a discretionary score located in the middle of the sub-interval is considered low complexity. In response to a case complexity lower than a preset complexity threshold, the recommended discretionary level is directly determined by the discretionary benchmark; that is, the discretionary level mapped from the discretionary score is output as the recommended discretionary level without calling the pre-trained language model. In response to a case complexity not lower than the preset complexity threshold, the pre-trained language model is used to determine the recommended discretionary level. Simple cases can obtain recommendation results without going through a pre-trained language model, thus reducing processing latency and computational overhead.
[0087] In some embodiments, such as Figure 3As shown, S4 includes sub-steps S41 to S43.
[0088] S41. Determine the recommended discretion level within the candidate discretion set using a pre-trained language model, and assign a confidence level to each recommended discretion level. Under the restricted options implementation, the confidence level is the probability of the model outputting the selected number; under the level-by-level scoring implementation, the confidence level is the normalized matching score of the recommended discretion level. For example, in Wang's case, the model outputs the second level, with a confidence level of 0.72.
[0089] S42. Map the discretion score to a discretion level, and calculate the level deviation between the recommended discretion level and the discretion level. In the specific implementation, the range of discretion score values is... The results are divided into sub-intervals that correspond one-to-one with each level in the candidate discretionary set. For example, four levels correspond to each other in equal divisions. , , and The grade corresponding to the sub-interval into which the discretionary score falls is the discretionary grade; the grade deviation is the absolute value of the difference between the recommended discretionary grade and the score discretionary grade in the grade sequence of the candidate discretionary set. The sub-interval can also be non-uniformly divided according to the proportion of each grade's penalty range in the total range; this is not restricted here. For example, a discretionary score of 0.39 falling into... The score is at the first level, number 1; the recommended score is at the second level, number 2, with a deviation of 1.
[0090] S43. In response to a deviation of more than a preset deviation threshold, the confidence level is lowered, and both the scoring discretion level and the recommended discretion level are marked as discretion levels awaiting manual confirmation. The preset deviation threshold can be 0, meaning a discrepancy between the two levels triggers the decision; or it can be 1, meaning a difference of two or more levels triggers the decision, to avoid frequent manual intervention caused by slight discrepancies between adjacent levels. Taking a preset deviation threshold of 0 as an example, in Wang's case, the deviation of 1 is greater than 0, triggering a re-decision. The confidence level is multiplied by a preset attenuation coefficient of 0.5, lowering it from 0.72 to 0.36, and both the first and second levels are marked as discretion levels awaiting manual confirmation. The recommended discretion level of the semantic path and the scoring discretion level of the numerical path are based on different criteria. A discrepancy between the two indicates that there is semantic information in the case that the discretionary factors have not been fully captured, or that the weights are not properly adapted to the case. The re-decision explicitly exposes this discrepancy and passes it to the subsequent interval output for processing, rather than silently selecting one of the paths.
[0091] In some embodiments, S4 further includes sub-steps S44 to S46.
[0092] S44. In response to a deviation of the grade level exceeding a preset deviation threshold, the conflicting recommended discretionary grades and the scoring discretionary grades are jointly determined as a recommended discretionary interval; in response to a deviation of the grade level not exceeding the preset deviation threshold, the recommended discretionary grade level is determined as the recommended discretionary interval. The recommended discretionary interval consists of discrete discretionary grades, rather than a continuous numerical confidence band. When there is a conflict, the interval exactly includes two conflicting grades; when there is no conflict, the interval converges to a single grade. In some embodiments, in response to two conflicting grades not being adjacent in the grade sequence, the intermediate grade between the two grades is included in the recommended discretionary interval. For example, in the case of Wang, a conflict occurs, and the recommended discretionary interval consists of the first grade and the second grade.
[0093] S45. Determine the confidence level for each discretion level within the recommended discretion interval to obtain the confidence level distribution of the recommended discretion interval. In the specific implementation, the confidence level of each level within the interval is obtained by weighted normalization of the matching score and the degree of membership of the discretion score to the level by the pre-trained language model. The degree of membership is calculated based on the closeness of the discretion score to the center of the sub-interval of the level. For example, the model's normalized matching scores for the first and second levels are 0.30 and 0.70, respectively, and the normalized degree of membership of the discretion scores to the two levels are 0.60 and 0.40, respectively. By weighting each path with 0.5, the confidence level for the first level is 0.45 and the confidence level for the second level is 0.55. The confidence level distribution is 0.45 for the first level and 0.55 for the second level.
[0094] S46. The recommended discretionary range and confidence distribution serve as auxiliary references for manually determining the final discretionary level within the recommended discretionary range. Each discretionary level within the recommended discretionary range belongs to the candidate discretionary set, and the upper and lower limits of the penalty amount for the discretionary level belonging to the fine category within the recommended discretionary range fall within the penalty amount range of the fine level in the candidate discretionary set. The range is composed of levels in the candidate discretionary set, thus ensuring the level attribution is structurally guaranteed. In Wang's case, the first level range of 50 to 200 yuan and the second level range of 200 to 500 yuan both fall within the penalty amount range of the fine level of 50 to 1000 yuan in the candidate discretionary set. Combining the degree of oil pollution and on-site persuasion records, law enforcement officers determined the final discretionary level to be the second level within the recommended discretionary range, with a penalty amount of 300 yuan. The method itself does not replace the law enforcement officers' final decision.
[0095] The following provides a detailed description of the case retrieval and cold start processing in step S5. In some embodiments, S5 includes sub-steps S51 to S53.
[0096] S51. Convert the text of illegal facts into text vectors. The text vectors can reuse the encoder output of the multi-label classification model in S11, or they can be generated by an independent sentence vector model, with dimensions such as 768. When historical cases are added to the database, case vectors are pre-calculated and stored in the same way so that there is no need to re-encode during retrieval.
[0097] S52. Calculate the similarity between the text vector and the case vectors of each historical case in the historical discretion case library. As an example, cosine similarity is used: in, The text vector of the illegal facts. This represents the case vector of historical cases. In other embodiments, similarity can also be expressed as the negative value of Euclidean distance, or as a comprehensive similarity weighted by the consistency of the type of illegal behavior, the closeness of the discretionary factor quantification value, and the semantic similarity of the text, which can also measure the similarity between the current case and historical cases.
[0098] S53. Based on similarity from highest to lowest, a predetermined number of historical cases are identified as similar historical cases. The distribution of discretionary levels among these similar historical cases is then statistically analyzed to obtain the discretionary distribution. For example, the predetermined number is 10. For instance, in the case of Wang, among the 10 similar historical cases retrieved, there are 3 cases in the first level, 6 cases in the second level, and 1 case in the third level. The discretionary distribution is 0.30 for the first level, 0.60 for the second level, and 0.10 for the third level. This distribution corroborates the second level, which has a higher confidence level in the recommended discretionary range, providing law enforcement officers with a reference for how similar cases have historically been adjudicated.
[0099] In some embodiments, such as Figure 4 As shown, S5 also includes sub-steps S54 to S56.
[0100] S54. In response to the situation where the number of similar historical cases is zero, or the similarity between similar historical cases and the text of the illegal act is all below a preset similarity threshold, a benchmark reference case is generated based on the candidate discretionary set and the discretionary score. The benchmark reference case is generated as follows: taking the discretionary level mapped by the discretionary score as the center, a distribution of each discretionary level is generated on the candidate discretionary set as the discretionary distribution of the benchmark reference case, and a non-historical source mark is added to the benchmark reference case. A number of similar historical cases of zero corresponds to the absence of any closed cases of this type in the historical discretionary case database, for example, the type of illegal act is newly established; similarity all below the preset similarity threshold corresponds to the presence of cases, but none are sufficient as a reference. The preset similarity threshold is, for example, 0.6. The distribution is generated using a method of attenuation with distance from the discretionary level. in, For the first in the candidate discretion set The distance between the file and the center file in the file sequence. For the first The distribution values for each level are shown, with the center level representing the discretionary level mapped to the discretionary score. For example, when the center level is Level 1, the distances between the numbers of Warning, Level 1, Level 2, and Level 3 are 1, 0, 1, and 2, respectively, yielding distributions of approximately 0.20, 0.53, 0.20, and 0.07. Non-historical source markers are implemented using the source field and are displayed along with the discretionary distribution in the output, explicitly indicating that the reference is synthesized by rules rather than derived from actual historical cases.
[0101] S55. The discretionary distribution of the benchmark case shall be used as the discretionary distribution. The downstream usage of the discretionary distribution shall be consistent with the discretionary distribution of the real historical cases, and the output stage shall distinguish the nature of the two by non-historical source markers.
[0102] S56. In response to receiving the manual assessment result for the text of the violation, the manual assessment result is associated with the text of the violation and written as a seed historical case into the historical assessment case database. The manual assessment result includes the final manually determined assessment level and penalty amount. Once the seed historical case is entered into the database, it becomes the first real case of this type of violation. Subsequent cases of this type can be retrieved from the seed case, the number of similar historical cases is no longer zero, the generation of benchmark reference cases stops, and the historical reference naturally transitions from rule synthesis to real cases.
[0103] Furthermore, in some embodiments, before writing historical cases into the historical discretionary case database, historical cases whose discretionary results deviate from the median of the discretionary distribution of similar historical cases by more than a preset deviation range are marked as abnormal cases. Abnormal cases are not identified as similar historical cases. The preset deviation range is, for example, a level. When the median of the discretionary distribution of similar cases is in the second level, cases with a discretionary result of warning deviating by two levels are marked as abnormal cases and are not used as positive references during retrieval. Individual historical discretionary decisions that significantly deviate from the mainstream approach will therefore not be used in subsequent cases after retrieval.
[0104] In some embodiments, in response to the simultaneous occurrence of three factors—no matching violation type in the violation tag tree, a rule pending review being met, and zero similar historical cases—the discretionary recommendation result is marked as requiring manual discretion, and the manual discretion result is written into the historical discretionary case database as a seed case. This situation typically occurs in the initial stage of the launch of a new violation type under new regulations, where the classification basis, rule basis, and case basis all lack a reliable foundation. In this case, the method no longer outputs automatic recommendations, but instead relies on manual discretion, and the manual decision is used to create the first seed case for this type.
[0105] The following provides a detailed description of the hierarchical output of the discretion recommendation results in step S6. In some embodiments, S6 includes sub-steps S61 to S62.
[0106] S61. Output the first layer of the discretion recommendation results. This first layer includes the recommended discretion level, the corresponding penalty level, and the discretion factors ranked highest in terms of their contribution to the discretion score. The contribution value of each discretion factor is the product of its modulating weight and its quantified value. The discretionary factors are selected in descending order of contribution value, for example, the first three. In embodiments combined with sub-steps S44 to S46, the recommended discretionary levels in the first-level display content are presented in the form of recommended discretionary ranges and confidence level distributions. For example, in Wang's case, the contribution values of the scope of influence, cooperation in rectification, and illegal area are 0.22, 0.075, and 0.06, respectively. The first-level display content includes the first and second levels of the recommended discretionary range, the confidence levels of each level (0.45 and 0.55), the corresponding penalty range, and the three discretionary factors mentioned above. In response to hitting the rule for pending review, a manual review prompt mark is output along with the first-level display content.
[0107] S62. In response to receiving the expand command, output the second-layer display content of the discretion recommendation results. The second-layer display content includes the discretionary benchmark clauses matched by the recommended discretionary level, the quantitative values and weights of all discretionary factors, and the discretionary distribution. The expand command is, for example, the "view basis" operation on the law enforcement terminal interface. The discretionary benchmark clauses in the second-layer display content include the clause number and the original text of the scenario description. The quantitative values and modulated weights of all five discretionary factors are listed item by item. The discretionary distribution is labeled by source as historical statistics or rule synthesis. The layered objects are the discretionary factors and the discretionary basis itself. The first layer provides the core discretionary factors with the highest contribution ranking for quick assessment. The second layer provides the quantitative values and weights of all discretionary factors for item-by-item verification. During front-line law enforcement, law enforcement officers can make a preliminary judgment by first viewing the first layer. During case review or administrative reconsideration, the second layer is expanded to complete the complete backtracking, ensuring a complete and traceable basis chain without causing information overload on the first screen.
[0108] In some embodiments, the confidence distribution is presented as a bar chart along with the content displayed in the first layer. Each bar corresponds to a discretionary level in the recommended discretionary range, and the bar height corresponds to the confidence level of that level, making it easy for law enforcement officers to intuitively compare the degree of support for each level.
[0109] Finally, the overall deployment method of this approach is described. In some embodiments, the method is executed by a benchmark-independent inference kernel and a region-pluggable benchmark adaptation layer. The inference kernel includes the network skeleton of the multi-label classification model, the logic for quantifying and weighting discretionary factors, the file selection mechanism within the candidate discretionary set, and the case retrieval mechanism. These parts are not bound to any specific region's discretionary benchmark. The benchmark adaptation layer includes a discretionary benchmark library and benchmark version number for a specific region, a weight table corresponding to each type of violation, a region extension node for the violation label tree, and a historical discretionary case library for that region. When the method is deployed to a new region, only the benchmark adaptation layer is replaced, and a small amount of adaptation training is performed on the multi-label classification model using the label system of that region. The inference kernel does not need to be redeveloped, and the same method can thus be reused in multiple law enforcement jurisdictions where discretionary benchmarks differ regionally.
[0110] Therefore, this method defines the legal boundaries by delineating the candidate discretionary set, uses the selection of cases within the set to carry semantic judgments on complex cases, provides reproducible numerical evidence and historical references through discretionary scores and distributions, and displays the traceable output of the completed evidence in a hierarchical manner. In boundary situations such as conflicts between semantic and numerical judgments, lack of similar cases, and updates to discretionary benchmarks, the method maintains the usability of recommended results through re-adjudication and interval output, benchmark reference cases and seed write-back, pending review marking and manual review prompts, and ultimately retains the power to determine the discretionary level to law enforcement personnel.
[0111] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the methods and principles of this application should be covered within the scope of protection of this application.
Claims
1. A method for intelligent recommendation of discretionary criteria, characterized in that, Includes the following steps: S1. Perform multi-label classification on the illegal fact text to obtain the type of illegal behavior corresponding to the illegal fact text; S2. Extract the corresponding discretionary factors according to the type of illegal behavior, quantify each discretionary factor to obtain the quantified value of each discretionary factor, and weight each quantified value according to the weight determined according to the type of illegal behavior to obtain the discretionary score. S3. Based on the discretionary benchmark, identify a candidate discretionary set consisting of discrete discretionary levels that are permissible within the legal scope for the type of illegal behavior, and each discretionary level in the candidate discretionary set corresponds to a legally defined penalty range; S4. Using the text of the illegal facts and the discretionary score as input, a pre-trained language model is used to determine the recommended discretionary level within the candidate discretionary set. The recommended discretionary level is one of the discretionary levels in the candidate discretionary set. S5. Calculate the similarity between the illegal fact text and each historical case in the historical discretion case database, determine the top-ranked historical cases as similar historical cases according to the similarity from high to low, and count the discretion distribution of the similar historical cases; S6. Output discretion recommendation results, which include the recommended discretion level, the penalty range corresponding to the recommended discretion level, the discretion score, and the discretion distribution, as an auxiliary reference for discretion.
2. The intelligent recommendation method for discretionary benchmarks according to claim 1, characterized in that, S4 includes the following sub-steps: S41. Determine the recommended discretion level within the candidate discretion set using the pre-trained language model, and determine the confidence level for the recommended discretion level; S42. Map the discretion score to a discretion score level, and calculate the level deviation between the recommended discretion level and the discretion score level; S43. In response to the deviation of the grade being greater than a preset deviation threshold, the confidence level is lowered, and the scored discretionary grade and the recommended discretionary grade are marked together as discretionary grades to be manually confirmed.
3. The intelligent recommendation method for discretionary benchmarks according to claim 2, characterized in that, S4 further includes the following sub-steps: S44. In response to the deviation of the grade being greater than the preset deviation threshold, the conflicting recommended discretion grades and the scoring discretion grades are jointly determined as the recommended discretion interval; In response to the deviation of the grade not being greater than the preset deviation threshold, the recommended discretion grade is determined as the recommended discretion range; S45. Determine the confidence level of each discretion level in the recommended discretion interval to obtain the confidence level distribution of the recommended discretion interval; S46. The recommended discretionary range and the confidence distribution are used as auxiliary references for manual determination of the final discretionary level within the recommended discretionary range. Each discretionary level in the recommended discretionary range belongs to the candidate discretionary set, and the penalty range corresponding to each discretionary level in the recommended discretionary range falls within the penalty range range of the candidate discretionary set.
4. The intelligent recommendation method for discretionary benchmarks according to claim 1, characterized in that, S5 includes the following sub-steps: S51. Convert the text of the illegal facts into a text vector; S52. Calculate the similarity between the text vector and the case vectors of each historical case in the historical discretion case library; S53. Based on the similarity from high to low, determine the preset number of historical cases that are ranked first as similar historical cases, and statistically analyze the distribution of the discretionary level of each similar historical case to obtain the discretionary distribution.
5. The intelligent recommendation method for discretionary benchmarks according to claim 4, characterized in that, S5 further includes the following sub-steps: S54. In response to the number of similar historical cases being zero, or the similarity between the similar historical cases and the illegal fact text being lower than a preset similarity threshold, a benchmark reference case is generated based on the candidate discretionary set and the discretionary score. The benchmark reference case is generated as follows: taking the discretionary level mapped by the discretionary score as the center, a distribution of each discretionary level is generated on the candidate discretionary set as the discretionary distribution of the benchmark reference case, and a non-historical source mark is added to the benchmark reference case. S55. The discretionary distribution of the benchmark reference case shall be taken as the discretionary distribution; S56. In response to receiving the manual discretion result for the text of the illegal facts, the illegal facts text is associated with the manual discretion result and written as a seed historical case into the historical discretion case library.
6. The intelligent recommendation method for discretionary benchmarks according to claim 1, characterized in that, S6 includes the following sub-steps: S61. Output the first layer of display content of the discretion recommendation result. The first layer of display content includes the recommended discretion level, the penalty range corresponding to the recommended discretion level, and the discretion factors that contribute to the discretion score in the order of priority. S62. In response to receiving the expand instruction, output the second layer of display content of the discretion recommendation result. The second layer of display content includes the discretion benchmark clauses hit by the recommended discretion level, the quantitative values and weights of all the discretion factors, and the discretion distribution.
7. The intelligent recommendation method for discretionary benchmarks according to claim 1, characterized in that, S1 includes the following sub-steps: S11. The illegal facts text is encoded using a multi-label classification model to obtain text features. The multi-label classification model is obtained through adaptive pre-training of legal domain text. S12. Based on a preset illegal behavior label tree, the text features are classified using a multi-label attention mechanism to obtain at least one candidate illegal behavior type; S13. Perform a hierarchical consistency check on the candidate illegal behavior types according to the hierarchical relationship of the illegal behavior label tree, and determine the candidate illegal behavior types that pass the hierarchical consistency check as the illegal behavior types.
8. The intelligent recommendation method for discretionary benchmarks according to claim 1, characterized in that, In step S2, the discretionary factors include the area of violation, duration, repeated violations, scope of impact, and cooperation in rectification. In response to the absence of any of the discretionary factors in the text of the violation, the unrecorded discretionary factors are marked as missing discretionary factors. The quantification value of the missing discretionary factors is assigned according to a preset lenient value, and a supplementary investigation prompt for the missing discretionary factors is output.
9. The intelligent recommendation method for discretionary benchmarks according to claim 1, characterized in that, S3 includes the following sub-steps: S31. Configure a benchmark version number for the discretion benchmark, and determine the candidate discretion set according to the discretion benchmark corresponding to the benchmark version number; S32. In response to an update of the discretionary benchmark, mark the discretionary rules that have changed in the discretionary benchmark as rules to be reviewed; S33. Record whether the discretionary rule matched by the candidate discretionary set is the rule to be reviewed, so that when S6 outputs the discretionary recommendation result, in response to the matched discretionary rule being the rule to be reviewed, a manual review prompt mark is added to the discretionary recommendation result.
10. The intelligent recommendation method for discretionary benchmarks according to claim 1, characterized in that, S2 includes the following sub-steps: S21. Query the corresponding weight table according to the type of illegal behavior to obtain the basic weight of each of the discretionary factors; S22. Modulate the basic weights according to the context factors corresponding to the illegal facts text to obtain modulated weights. The modulation is carried out within the range of keeping the relative order of the weights among the discretionary factors unchanged. The modulated weights are the lower-level implementations of the weights determined according to the type of illegal behavior. S23. The quantized values of each of the discretionary factors are weighted according to the modulation weights to obtain the discretionary score, wherein the weight table is configured such that the discretionary score does not decrease monotonically with any of the quantized values.