A traffic police law enforcement supervision method and device
By combining the HFIDE-XGBoost model with the LSTM time series prediction model, traffic police enforcement data is processed automatically to generate penalty discretion case information, solving the problem of time-consuming and labor-intensive manual supervision in existing technologies, and achieving efficient and accurate traffic police enforcement supervision.
Patent Information
- Application Number
- CN202511031206.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-07-25
AI Technical Summary
The current traffic police enforcement and supervision process requires a large amount of manpower to browse video information and judge the penalty results, which is time-consuming and labor-intensive.
Automated supervision is achieved by using the HFIDE-XGBoost model and the LSTM time series prediction model. By acquiring and training datasets, penalty discretion case information and failure comparison analysis are generated, and real-time early warning is provided by combining association rules.
It has achieved a fully automated process for traffic police law enforcement and supervision, reducing manual intervention, improving supervision efficiency, ensuring that the results of discretionary decisions comply with legal provisions, and enabling real-time early warning of risky behaviors.
Smart Images

Figure CN120541674B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a traffic police law enforcement supervision method and device. Background Technology
[0002] In the current traffic police law enforcement supervision, the only way to determine whether there are violations is to manually review video information and penalty results of traffic police enforcement. This requires a large amount of manpower for supervision, which is time-consuming and labor-intensive.
[0003] Therefore, there is a need for a technical solution to address or at least mitigate the aforementioned shortcomings of existing technologies. Summary of the Invention
[0004] The purpose of this invention is to provide a traffic police law enforcement and supervision method to at least solve one of the above-mentioned technical problems.
[0005] This invention provides the following solution:
[0006] According to one aspect of the present invention, a traffic police law enforcement supervision method is provided, the traffic police law enforcement supervision method comprising:
[0007] Obtain the datasets of enforcement actions and penalties to be supervised;
[0008] Obtain the HFIDE-XGBoost model and train it; obtain the LSTM time series prediction model and train it.
[0009] The datasets of law enforcement and penalties to be supervised are input into the trained HFIDE-XGBoost model to obtain information on penalty discretion cases.
[0010] The dataset to be supervised and penalized is input into a trained LSTM time-series prediction model to obtain failure comparison analysis information.
[0011] Optionally, obtaining the HFIDE-XGBoost model and training the HFIDE-XGBoost model includes:
[0012] Obtain the law enforcement dataset and the penalty dataset for training;
[0013] Features are extracted from the training law enforcement dataset to obtain a structured law enforcement feature matrix;
[0014] Features are extracted from the training penalty dataset to obtain a structured penalty feature matrix;
[0015] A joint feature matrix is generated based on the structured law enforcement feature matrix and the structured penalty feature matrix;
[0016] Generate a physical fusion feature cube based on the joint feature matrix;
[0017] Obtain the legal provision constraint matrix;
[0018] A compliance feature tensor is generated based on the physical fusion feature cube and the legal clause constraint matrix;
[0019] The HFIDE-XGBoost model is trained based on the compliance feature tensor.
[0020] Optionally, the training law enforcement dataset includes law enforcement ID information, law enforcement time information, law enforcement location information, law enforcement personnel information, violation type code information, on-site evidence information, and party information;
[0021] The step of extracting features from the training law enforcement dataset to obtain a structured law enforcement feature matrix includes:
[0022] The law enforcement ID information, law enforcement time information, and law enforcement location information are standardized respectively to obtain standardized law enforcement ID, structured time feature vector, and standardized spatial coordinate data;
[0023] Feature extraction is performed on the on-site evidence information to obtain evidence text feature vectors;
[0024] Feature extraction is performed on the illegal type code information to obtain structured illegal code features;
[0025] Spatiotemporal feature encoding is performed on the normalized spatial coordinate data to obtain a spatial context feature vector;
[0026] Spatiotemporal feature encoding is performed on the structured temporal feature vector to obtain the temporal pattern feature vector;
[0027] A law enforcement association feature matrix is generated based on the standardized law enforcement ID, law enforcement personnel information, and party information.
[0028] A structured law enforcement feature matrix is generated based on the evidence text feature vector, structured illegal code features, spatial context feature vector, temporal pattern feature vector, and law enforcement association feature matrix.
[0029] Optionally, the training penalty dataset includes penalty ID information, party ID information, penalty time information, penalty amount information, point deduction information, detention days information, penalty basis clause information, and penalty result status;
[0030] Extracting features from the training penalty dataset to obtain a structured penalty feature matrix includes:
[0031] Encode the penalty ID information to generate a standardized penalty ID;
[0032] The penalty time information is standardized to obtain a structured penalty time feature vector;
[0033] The penalty amount, demerit points, and detention days are numerically standardized to obtain a set of standardized numerical features.
[0034] Textual features are extracted from the information on the basis for penalties to obtain legal feature vectors and structured legal feature vectors.
[0035] The penalty time information and penalty location information are associated with the party's ID information, and the associated penalty time information and penalty location information are encoded with spatiotemporal features to obtain the penalty time sequence feature vector and penalty spatial association features;
[0036] The standardized penalty ID, party ID information, and law enforcement ID information are associated, and a graph neural network is constructed on the associated standardized penalty ID, party ID information, and law enforcement ID information to obtain the penalty association feature matrix;
[0037] A structured penalty feature matrix is generated based on the legal provision feature vector, structured legal provision features, penalty time sequence feature vector, penalty spatial correlation features, penalty correlation feature matrix, and standardized numerical feature set.
[0038] Optionally, generating a joint feature matrix based on the structured law enforcement feature matrix and the structured penalty feature matrix includes:
[0039] The structured law enforcement feature matrix and the structured penalty feature matrix are spatiotemporally aligned to obtain a spatiotemporal alignment mapping table;
[0040] Semantic alignment is performed on the violation type code features in the law enforcement feature matrix and the penalty basis clause features in the penalty feature matrix to obtain the legal element matching matrix;
[0041] Generate party-level aggregated features and case-level correlation features from the party information in the law enforcement feature matrix and the party ID information in the penalty feature matrix;
[0042] The structured law enforcement feature matrix, structured penalty feature matrix, spatiotemporal alignment mapping table, legal element matching matrix, party-level aggregation features, and case-level association features are fused together to obtain a joint feature matrix.
[0043] Optionally, generating the physical fusion feature cube based on the joint feature matrix includes:
[0044] Generate a spatially encoded feature matrix based on the features with spatial attributes in the joint feature matrix;
[0045] Generate a time-coded feature matrix based on the time-attributed features in the joint feature matrix;
[0046] Generate a legal coding feature matrix based on the features with legal attributes in the joint feature matrix;
[0047] The initial feature tensor is obtained by constructing a three-dimensional tensor from the spatial coding feature matrix, temporal coding feature matrix, legal coding feature matrix, and other features in the joint feature matrix.
[0048] The initial feature tensor is divided into independent sub-tensors according to the spatial grid dimension;
[0049] Temporal convolution operations are performed on each independent subtensor using a temporal convolution network to obtain temporal convolution features;
[0050] Attention weights are calculated for each legal code in the temporal convolutional features, thereby obtaining the attention weights corresponding to each legal code.
[0051] An attention weight is applied to the legal dimension features, and a weighted sum is generated to produce a weighted legal feature sequence.
[0052] A spatiotemporal joint legal feature map is generated based on the weighted legal feature sequence;
[0053] The spatiotemporal legal joint feature map is fused across layers to obtain a global fused feature vector;
[0054] Feature enhancement is performed on the global fused feature vector to obtain the enhanced feature tensor;
[0055] A physical fusion feature cube is generated based on the enhanced feature tensor.
[0056] Optionally, generating the compliance feature tensor based on the physical fusion feature cube and the legal provision constraint matrix includes:
[0057] Obtain the structured constraint feature matrix based on the legal provision constraint matrix;
[0058] The enhanced feature cube is obtained based on the physical fusion feature cube and the structured constraint feature matrix;
[0059] Generate compliance feature tensors based on the enhanced feature cube;
[0060] A compliance feature tensor is generated based on the compliance feature tensor and the physical fusion feature cube.
[0061] Optionally, the step of inputting the dataset of enforcement actions to be supervised and the dataset of penalties to be supervised into the trained HFIDE-XGBoost model to obtain penalty discretion case information includes:
[0062] Extract features from the dataset of law enforcement to be supervised to obtain the characteristics of law enforcement to be supervised;
[0063] Extract features from the dataset of penalties to be supervised to obtain the features of penalties to be supervised;
[0064] The characteristics of the enforcement to be supervised and the characteristics of the penalties to be supervised are fused to obtain a standardized feature matrix;
[0065] The standardized feature matrix is input into the trained HFIDE-XGBoost model to obtain a batch prediction result set;
[0066] Based on the batch prediction result set, penalty discretion case information is generated.
[0067] Optionally, the traffic police enforcement and supervision method further includes:
[0068] Obtain the association rule dataset, which includes multiple association rules;
[0069] The penalty discretion case information is matched with various related rules. When a related rule is matched, regulatory warning information is generated based on that rule.
[0070] This application also provides a traffic police enforcement monitoring device, which includes:
[0071] A dataset acquisition module, which is used to acquire the dataset of law enforcement to be supervised and the dataset of penalties to be supervised;
[0072] The model training module is used to acquire and train the HFIDE-XGBoost model and acquire and train the LSTM time series prediction model.
[0073] The penalty discretion case acquisition module is used to input the dataset of law enforcement to be supervised and the dataset of penalties to be supervised into the trained HFIDE-XGBoost model to obtain penalty discretion case information.
[0074] The failure comparison analysis acquisition module is used to input the dataset to be supervised and penalized into a trained LSTM time series prediction model to obtain failure comparison analysis information.
[0075] The traffic police enforcement and supervision method proposed in this application utilizes the HFIDE-XGBoost model and the LSTM time-series prediction model to achieve a fully automated process from data input to early warning output, reducing manual intervention and improving supervision efficiency. The HFIDE-XGBoost model in this application excels at processing structured enforcement and penalty data, generating penalty discretion case information to ensure that the discretionary results comply with legal provisions. By matching penalty discretion information with association rules, real-time early warnings of risky behaviors are achieved, facilitating precise enforcement. Attached Figure Description
[0076] Figure 1 This is a flowchart illustrating a traffic police law enforcement and supervision method according to one embodiment of this application; Detailed Implementation
[0077] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0078] like Figure 1 The traffic police enforcement and supervision methods shown include:
[0079] Step 1: Obtain the dataset of enforcement actions to be supervised and the dataset of penalties to be supervised;
[0080] Step 2: Obtain and train the HFIDE-XGBoost model, and obtain and train the LSTM time series prediction model;
[0081] Step 3: Input the dataset of law enforcement to be supervised and the dataset of penalties to be supervised into the trained HFIDE-XGBoost model to obtain penalty discretion case information;
[0082] Step 4: Input the dataset to be supervised and penalized into the trained LSTM time series prediction model to obtain failure comparison analysis information;
[0083] Obtain the association rule dataset, which includes multiple association rules;
[0084] The penalty discretion case information is matched with various related rules. When a related rule is matched, regulatory warning information is generated based on that rule.
[0085] In this embodiment, the dataset to be monitored for law enforcement can be obtained through the following methods:
[0086] Traffic police on-site law enforcement records (law enforcement PDA terminal, law enforcement recorder video stream);
[0087] Electronic police checkpoint system (data captured by illegal cameras);
[0088] Traffic management integrated platform (12123 platform work orders, violation code database);
[0089] Through the traffic management department's internal data interface, law enforcement records can be exported in batches according to time range (such as the most recent 7 days), including fields such as: law enforcement number, time, location, law enforcement officer's employee number, violation type code, evidence file hash value, and party ID.
[0090] In this embodiment, data for a certain period of time (e.g., 12 hours) can be exported at once, or data can be acquired. Depending on the acquisition method, the data input into the model can be a dataset (e.g., multiple data points within 12 hours), or it can be input one data point at a time.
[0091] In this embodiment, the exported data can be preprocessed as follows:
[0092] Spatiotemporal standardization:
[0093] Convert the latitude and longitude of the enforcement location into a unified coordinate system (such as GCJ-02) to generate standardized spatial coordinates; divide the enforcement time into bins at 15-minute granularity to generate time sequence pattern labels (such as "weekday morning rush hour").
[0094] Evidence feature extraction:
[0095] Content analysis is performed on on-site photos / videos to extract key features (such as vehicle color, license plate number, and type of violation).
[0096] Mapping of illegal codes:
[0097] According to the Ministry of Public Security's "Code Table for Road Traffic Safety Violations", the violation type codes are converted into structured descriptions (such as code "13441" which is mapped to "Motor vehicle violates the instruction of a prohibitory sign, 3 points are deducted and a fine of 200 yuan is imposed").
[0098] Feature association:
[0099] Enforcement Association Network: Based on fields such as party ID, law enforcement officer ID, and violation location, a law enforcement behavior association graph is constructed (e.g., multiple violation records of the same party are associated).
[0100] Spatiotemporal context coding: Combining high-precision map data, semantic annotation is performed on the surrounding environment of law enforcement locations (such as schools, hospitals, and transportation hubs) to generate spatial context features.
[0101] In this embodiment, the dataset to be monitored and penalized can be obtained through the following method:
[0102] Public Security Traffic Management Integrated Application Platform (Electronic Archives of Penalty Decisions);
[0103] Non-tax revenue system (fine payment records);
[0104] Detention Center Management System (Administrative Detention Execution Records);
[0105] Data collection method: Through database synchronization or API interface, obtain fields including: penalty number, party ID, penalty time, penalty amount, points deducted, detention days, legal provisions on which the penalty is based, and penalty status (e.g., executed / under review).
[0106] In this embodiment, the data in the dataset to be supervised and penalized can be exported at once for a certain period of time (e.g., 12 hours), or the data can be acquired. Depending on the acquisition method, the data input into the model can be a dataset (e.g., multiple data within 12 hours), or it can be input one data at a time.
[0107] In this embodiment, the data in the dataset to be monitored and penalized can be preprocessed as follows:
[0108] Numerical standardization:
[0109] The amount of penalties, points deducted, and days of detention will be normalized (e.g., the amount of fines will be standardized to the unit of "yuan").
[0110] Characterization of legal provisions:
[0111] Extract key information from the articles that provide the basis for the penalty (such as Article 90 of the Road Traffic Safety Law of the People's Republic of China, which states that "If a motor vehicle driver violates the road traffic safety laws and regulations regarding road traffic rules, he or she shall be given a warning or fined between 20 and 200 yuan").
[0112] Spatiotemporal correlation analysis:
[0113] Associate enforcement locations with penalty locations and calculate spatial distance characteristics (e.g., "the distance between the violation location and the penalty authority is 5 kilometers").
[0114] Construct a penalty time sequence graph (such as the time interval distribution of multiple penalties imposed on the same party).
[0115] In this embodiment, the HFIDE-XGBoost model is a model specifically designed for traffic police law enforcement and supervision, and it includes the following modules:
[0116] In this embodiment, the data preprocessing module is used to perform the following data processing:
[0117] Feature Tensor Parsing: The compliant feature tensor (100 spatial grids × 24 time periods × 128 optimized features) is processed as follows: the three-dimensional tensor is converted into a two-dimensional feature matrix, with the row index being a combination of "spatial grid ID_time period ID" and the column index being the feature channel number; the final feature matrix dimension is generated; Feature Standardization: Robust standardization is performed on each feature channel to eliminate the influence of outliers; the data preprocessing module finally outputs a preprocessed feature matrix.
[0118] The positive and negative sample definition module is used to define positive and negative samples. Specifically...
[0119] Positive samples are compliant enforcement cases confirmed by judicial review, while negative samples are enforcement cases with procedural / substantive violations. Sample weights can be assigned based on the severity of the violation (mild: 1.0 / moderate: 1.5 / severe: 2.0).
[0120] In this embodiment, HFIDE-XGBoost (Hierarchical Feature Interaction enhanced XGBoost) is an improved model based on the XGBoost framework. Its core structure consists of multi-layer decision tree ensembles, and it enhances the modeling capability for complex law enforcement scenarios by introducing a hierarchical feature interaction mechanism. The specific structure is as follows:
[0121] Decision tree ensemble: The model consists of multiple decision trees, each of which splits the input data, and the final prediction result is the weighted sum of the predictions from all the trees.
[0122] Gradient boosting framework: Each tree is trained iteratively, and in each training round, the residuals of the preceding tree (the difference between the true value and the predicted value) are fitted to gradually approach the optimal solution.
[0123] Hierarchical Feature Interaction (HFI) module:
[0124] Low-level interactions: capturing linear relationships between basic features (such as the direct correlation between violation type and penalty amount).
[0125] High-level interaction: Mining complex patterns (such as the combined effect of law enforcement location and violation time) through nonlinear transformations (such as feature cross and kernel methods).
[0126] Dynamic weight allocation: The split weight of each tree is dynamically adjusted according to the importance of features to strengthen the influence of key features (such as historical penalty records).
[0127] Regularization mechanism: L1 / L2 regularization: constrains the weights of leaf nodes to prevent overfitting.
[0128] Tree complexity control: Limit tree depth and split gain using parameters such as max_depth and gamma.
[0129] The HFIDE-XGBoost model in this application has the following advantages over existing XGBoost models:
[0130] Enhanced Feature Interactions: Traditional XGBoost relies on tree structures to implicitly capture feature interactions, while HFIDE-XGBoost enhances its ability to model high-dimensional nonlinear relationships by explicitly constructing hierarchical interaction modules.
[0131] Adaptive regularization: Dynamically adjusts the regularization strength based on training data to balance model complexity and generalization performance.
[0132] In this embodiment, the HFIDE-XGBoost model employs a high-order feature interaction-aware tree growth algorithm. Specifically, the high-order feature interaction-aware tree growth algorithm process is as follows:
[0133] During the candidate feature selection phase of tree node splitting, high-order feature combinations are systematically generated. This considers not only pairwise feature combinations but also combinations of three, four, or even more features. The number and order of feature combinations can be flexibly adjusted based on computational resources and the number of features.
[0134] Higher-order interaction information gain calculation: For each higher-order feature combination, its higher-order interaction information gain is calculated. This metric not only evaluates the predictive power of the feature combination on the target variable, but also quantifies the complex interactions between features within the feature combination. The formula for calculating higher-order interaction information gain is as follows:
[0135] ;
[0136] Where C is the feature combination currently under consideration; k is the order of the feature combination (i.e., the number of features in the combination); S is a subset of C, and =k; Let T represent the information gain of the feature subset S; T is a proper subset of S; The information gain of the feature subset S; The information gain of the feature subset T; The higher-order interactive information gain of order k is calculated by subtracting the information gain of the lower-order subsets from the information gain of all k-order subsets in the feature combination C using the inclusion-exclusion principle, thus obtaining the pure k-order interactive information gain.
[0137] Optimal high-order feature combination selection: Select the feature combination with the maximum high-order interactive information gain for node splitting. If the interactive information gain of all high-order feature combinations is less than a preset threshold, the algorithm reverts to selecting a single optimal feature or a low-order feature combination for splitting.
[0138] In this embodiment, during model training, multiple FI-XGBoost base learners with different initialization parameters and feature combination orders are generated. These base learners can capture different patterns and relationships in the data.
[0139] The weights of each base learner are dynamically calculated based on their performance on the validation set. Base learners with better performance are assigned higher weights to maximize their impact during ensemble testing. Weight calculations can be based on metrics such as accuracy, recall, and F1 score.
[0140] During the prediction phase, the prediction results of each base learner are weighted and averaged according to their weights to obtain the final ensemble prediction result.
[0141] In this embodiment, the HFIDE-XGBoost model includes a base learner layer, a higher-order feature interaction perception layer, and a dynamic ensemble layer.
[0142] In this embodiment, the base learner layer consists of multiple FI-XGBoost (Feature Interaction-awareXGBoost) base learners. Each base learner is an independent XGBoost model, but with different initialization parameters (such as learning rate, tree depth, subsample ratio, etc.) and feature combination order settings. The number of base learners can be flexibly configured according to computing resources and task requirements.
[0143] In this embodiment, the higher-order feature interaction perception layer is integrated within each FI-XGBoost base learner. During tree node splitting, the higher-order feature interaction perception layer is responsible for generating higher-order feature combinations and calculating their higher-order interaction information gain to select the optimal feature combination for node splitting. The order of the higher-order feature combination (i.e., the number of features in the combination) can be set according to task requirements and computational resources, typically ranging from order 2 to order 5.
[0144] In this embodiment, the dynamic ensemble layer is responsible for dynamically integrating the prediction results of multiple FI-XGBoost base learners. The weight of each base learner is dynamically calculated based on its performance on the validation set. Base learners with better performance are assigned higher weights to play a greater role in the ensemble. During the prediction phase, the prediction results of each base learner are weighted and averaged according to their respective weights to obtain the final ensemble prediction result.
[0145] In this embodiment, acquiring and training the HFIDE-XGBoost model includes:
[0146] Obtain the training enforcement dataset and the training penalty dataset; the training enforcement dataset includes enforcement ID information, enforcement time information, enforcement location information, enforcement personnel information, violation type code information, on-site evidence information, and party information; the training penalty dataset includes penalty ID information, party ID information, penalty time information, penalty amount information, demerit point information, detention days information, penalty basis clause information, and penalty result status.
[0147] Features are extracted from the training law enforcement dataset to obtain a structured law enforcement feature matrix;
[0148] In this embodiment, extracting features from the training law enforcement dataset to obtain a structured law enforcement feature matrix includes:
[0149] The enforcement ID information, enforcement time information, and enforcement location information are standardized to obtain standardized enforcement IDs, structured time feature vectors, and standardized spatial coordinate data. For example, the original penalty ID is anonymized and encoded to generate a standardized enforcement ID; the enforcement time information is broken down into year / month / day / hour / minute / second / weekday / holiday markers to generate a structured time feature vector; and the enforcement location information is standardized using coordinate system processing to generate standardized spatial coordinate data.
[0150] Feature extraction is performed on the on-site evidence information to obtain evidence text feature vectors; specifically, semantic analysis is performed on the on-site evidence information to generate evidence text feature vectors; evidence text keywords are extracted to construct an evidence keyword feature matrix;
[0151] Feature extraction is performed on the illegal type code information to obtain structured illegal code features;
[0152] Specifically, the violation type code is converted into structured violation code features, generating a dense vector representation of the violation code;
[0153] The structured time feature vector is spatiotemporally encoded to obtain a time-series pattern feature vector; specifically, the law enforcement time series pattern is analyzed to generate time-series periodic features, the spatiotemporal distribution density of law enforcement activities is calculated to generate spatiotemporal thermal features, thereby obtaining a time-series pattern feature vector.
[0154] For example, obtain the timestamp of each law enforcement activity (e.g., 2024-06-28 14:30:00).
[0155] The law enforcement time series is decomposed using STL (Seasonal-Trend Decomposition) to extract trend components, seasonal components, and residual components. Based on the seasonal components, time-series periodic features (e.g., weekday / weekend enforcement intensity ratio, daytime / nighttime enforcement frequency ratio) are generated. Spatiotemporal grids are divided (e.g., spatial grids A01-A100, time window 1 hour), and the enforcement activity density within each spatiotemporal grid (e.g., number of enforcement actions per unit time, per unit area) is calculated. The density values are normalized to generate spatiotemporal thermal features (e.g., values between 0 and 1, representing thermal intensity), thus forming a dataset containing both time-series periodic features and spatiotemporal thermal features, such as: [1.2 (weekday / weekend ratio), 0.8 (daytime / nighttime ratio), 0.65 (spatiotemporal thermal value)].
[0156] The standardized spatial coordinate data is spatiotemporally encoded to obtain a spatial context feature vector; specifically, the environmental features surrounding the law enforcement location are obtained to generate a spatial context feature vector, and the standardized spatial coordinates are GeoHash encoded to generate spatial index features, thereby forming a spatial context feature vector.
[0157] For example, obtaining the coordinates of law enforcement locations allows us to derive the characteristics of the surrounding environment, such as the density of commercial areas (number of shopping malls and restaurants within 500 meters), the density of educational institutions (number of schools and training institutions within 1 kilometer), and the density of medical institutions (number of hospitals and clinics within 2 kilometers).
[0158] Transportation hub density (number of subway and bus stops within 500 meters); the extracted features are quantized and encoded to generate spatial context feature vectors (e.g., [0.8, 0.6, 0.4, 0.9], representing the density levels of commercial areas, educational institutions, medical institutions, and transportation hubs, respectively).
[0159] GeoHash encoding is applied to the coordinates of law enforcement locations, with the encoding precision set (e.g., 6-bit encoding, corresponding to a grid of approximately 0.01 square kilometers). Spatial index features are generated (e.g., encoding "wtw3zq" to represent a specific geographic grid area), and a dataset containing spatial context feature vectors and spatial index features is output, such as: [0.8, 0.6, 0.4, 0.9, "wtw3zq"].
[0160] Based on the standardized law enforcement ID, law enforcement personnel information, and party information, a law enforcement association feature matrix is generated. Specifically, an association network including law enforcement personnel, parties, and cases is established to generate a law enforcement association graph. The graph nodes are embedded and learned to generate graph structure feature vectors. The law enforcement association strength features are calculated to generate a relationship strength matrix. Historical interaction features between law enforcement personnel and parties are extracted to generate interaction pattern features.
[0161] A structured law enforcement feature matrix is generated based on the evidence text feature vector, structured violation code features, spatial context feature vector, temporal pattern feature vector, law enforcement association feature matrix, and law enforcement personnel information. Specifically, text features, spatial features, temporal features, graph features, and association features are concatenated horizontally to generate an initial feature matrix. Law enforcement personnel qualification information (years of law enforcement experience, professional certifications, etc.) is then appended to the initial feature matrix to generate an enhanced feature matrix, which serves as the structured law enforcement feature matrix.
[0162] The structured law enforcement feature matrix generated in this way, in the construction of graph neural networks, explicitly includes graph structure feature vectors, relationship strength matrix, and interaction pattern features.
[0163] In the feature concatenation layer, a law enforcement-related feature matrix is added as input to ensure that related features participate in feature fusion. Subsequent steps such as feature selection, dimensionality reduction, and feature standardization are all processed based on the fusion matrix containing law enforcement-related features. The final output structured law enforcement feature matrix will include law enforcement-related features, ensuring feature integrity.
[0164] In this embodiment, extracting features from the training penalty dataset to obtain a structured penalty feature matrix includes:
[0165] The penalty ID information is encoded to generate a standardized penalty ID; specifically, the penalty ID is anonymized and encoded to generate a standardized penalty ID.
[0166] The penalty time information is standardized to obtain a structured penalty time feature vector; specifically, the penalty time information is decomposed into year / month / day / hour / minute / second / weekday / holiday markers to generate a structured penalty time feature vector.
[0167] The penalty amount, demerit points, and detention days information are numerically standardized to obtain a set of standardized numerical features; specifically, continuous values such as penalty amount, demerit points, and detention days are Z-Score standardized.
[0168] Textual features are extracted from the information on the basis of the penalty to obtain legal feature vectors and structured legal features. Specifically, semantic parsing is performed on the penalty basis to generate legal feature vectors, extract keywords (such as "violation of Article X, Paragraph Y"), and construct a keyword feature matrix.
[0169] A legal text library was established, and the text codes were converted into triplet features containing legal elements, penalty ranges, and discretionary benchmarks. The Doc2Vec algorithm was applied to train the text embedding vectors to generate a 128-dimensional dense representation.
[0170] The penalty time information and penalty location information are associated with the party's ID information, and the associated penalty time information and penalty location information are encoded with spatiotemporal features to obtain the penalty time sequence feature vector and penalty spatial association features;
[0171] For example, STL decomposition can be performed on the penalty time series to extract trend components, seasonal components, and residual components.
[0172] Calculate periodic indicators based on seasonal components, such as: weekday / weekend penalty frequency ratio (e.g., 1.2, indicating that the penalty frequency on weekdays is 1.2 times that on weekends); daytime / nighttime penalty intensity ratio (e.g., 0.8, indicating that the penalty intensity at night is 0.8 times that during the day). Generate a time-series periodic feature vector (e.g., [1.2, 0.8]).
[0173] Calculate the time interval from the occurrence of the enforcement action to the issuance of the penalty decision (e.g., enforcement time is 2025-06-28 14:00:00, penalty time is 2025-06-28 14:30:00, the time interval is 30 minutes).
[0174] The time interval is segmented and quantized (e.g., 0-1 hours is encoded as 1, 1-24 hours as 2, and more than 24 hours as 3) to generate a penalty timeliness feature code (e.g., 1), and finally the penalty time series feature vector (e.g., [1.2, 0.8, 1]) is obtained, which includes periodic features and timeliness features.
[0175] The spatial association features of penalties are obtained in the same way as the spatial context feature vectors described above, and will not be repeated here. Standardized penalty IDs, party IDs, and enforcement IDs are associated, and a graph neural network is constructed from the associated standardized penalty IDs, party IDs, and enforcement IDs to obtain the penalty association feature matrix; specifically, the standardized penalty IDs, party IDs, and enforcement IDs are obtained through association analysis.
[0176] The processing procedure is as follows:
[0177] Construction of the penalty association network:
[0178] Establish a network of connections including penalty cases, parties involved, and law enforcement records; generate a penalty connection graph; perform embedding learning on the graph nodes; and generate a graph-structured penalty feature vector.
[0179] Penalty Model Exploration:
[0180] Calculate the state transition probability of the penalty result, generate the penalty result prediction feature, extract the party-penalty type association pattern, and generate the penalty pattern feature.
[0181] In this embodiment, the penalty spatial association features include graph structure penalty feature vectors, penalty result prediction features, and penalty pattern features.
[0182] A structured penalty feature matrix is generated based on the aforementioned legal provision feature vector, structured legal provision features, penalty time sequence feature vector, penalty spatial correlation features, penalty correlation feature matrix, and standardized numerical feature set. Specifically, the above features are horizontally concatenated and supplemented with the party's historical penalty record features (obtained through party ID association) to generate an enhanced penalty feature matrix as the structured penalty feature matrix.
[0183] A joint feature matrix is generated based on the structured law enforcement feature matrix and the structured penalty feature matrix;
[0184] In this embodiment, generating a joint feature matrix based on the structured law enforcement feature matrix and the structured penalty feature matrix includes:
[0185] The structured law enforcement feature matrix and the structured penalty feature matrix are spatiotemporally aligned to obtain a spatiotemporal alignment mapping table; specifically, an enforcement-penalty time correlation mapping table is established, the difference between enforcement time and penalty time is matched, and a temporal phase feature (synchronous / lagging / leading) is generated.
[0186] By associating the enforcement location and the penalty location with the party's ID, the spatial displacement distance is calculated to generate spatial offset characteristics (penalty at the original location / penalty on the move).
[0187] Semantic alignment is performed on the violation type code features in the enforcement feature matrix and the penalty basis clause features in the penalty feature matrix to obtain the legal element matching matrix and the discretionary consistency index; specifically...
[0188] Construct a knowledge graph linking illegal codes and penalty provisions, and generate a legal element matching score (0-1 range).
[0189] Extract the correlation strength between the characteristics of law enforcement evidence and the amount of penalty / points deducted, and generate the Discretion Consistency Index (DCI).
[0190] The party information in the law enforcement feature matrix and the party ID information in the penalty feature matrix are used to generate party-level aggregated features and case-level related features. Specifically, the party feature aggregation is as follows: law enforcement features and penalty features are aggregated by party ID to generate a party behavior profile (including features such as historical violation frequency and penalty response rate).
[0191] The case features are linked as follows: By establishing the link between law enforcement cases and penalty cases through the law enforcement ID, the full life cycle features of the case (the time sequence of features from law enforcement to penalty) are generated.
[0192] The structured law enforcement feature matrix, structured penalty feature matrix, spatiotemporal alignment mapping table, legal element matching matrix, party-level aggregation features, and case-level association features are fused to obtain a joint feature matrix. Specifically, the above features are concatenated horizontally, and then party behavior profile features and case lifecycle features are added to finally output an initial joint feature matrix (dimensions: number of law enforcement features + number of penalty features + number of spatiotemporal features + number of legal alignment features + number of aggregation features).
[0193] Generate a physical fusion feature cube based on the joint feature matrix;
[0194] In this embodiment, generating a physical fusion feature cube based on the joint feature matrix includes:
[0195] A spatial coding feature matrix is generated based on the spatial attributes in the joint feature matrix; specifically, the spatial features (law enforcement location, penalty location, spatial offset) in the joint feature matrix are processed as follows:
[0196] Geographic grid division:
[0197] The enforcement area is divided into 1km×1km geographical grid units;
[0198] Assign a unique spatial code to each grid cell;
[0199] Spatial context embedding:
[0200] Extract POI features (number of restaurants / bars / schools, etc.) around the grid cells;
[0201] Generate a spatial context vector (20-dimensional);
[0202] Output: Spatial encoded feature matrix.
[0203] A time-coded feature matrix is generated based on the time-attributed features in the joint feature matrix. Specifically, the processing procedure for time features (enforcement time, penalty time, and time-series phase) in the joint feature matrix is as follows:
[0204] Time-series periodic decomposition:
[0205] The time characteristics are decomposed into multiple levels of cycles such as year / month / day / hour / working day / holiday;
[0206] Generate time-cycle codes (6-dimensional);
[0207] Time-series trend embedding:
[0208] Use LSTM networks to capture long-term dependencies in time series;
[0209] Generate a time-series trend vector (32-dimensional);
[0210] Output: Time-coded feature matrix.
[0211] A legal coding feature matrix is generated based on the legally attributed features in the joint feature matrix. Specifically, the processing procedure for legal features (violation codes, penalty clauses, and legal element matching degrees) in the joint feature matrix is as follows:
[0212] Legal ontology construction:
[0213] Establish a three-level ontology tree consisting of illegal codes, penalty clauses, and legal elements;
[0214] Generate legal path codes (record the path from the root node to the leaf node);
[0215] Legal semantic embedding:
[0216] Semantic encoding is performed using a pre-trained legal BERT model;
[0217] Generate legal semantic vectors (256 dimensions);
[0218] Output: Legal coding feature matrix.
[0219] The spatial coding feature matrix, temporal coding feature matrix, legal coding feature matrix, and other features in the joint feature matrix are used to construct a three-dimensional tensor to obtain an initial feature tensor. The dimensions of the initial feature tensor include spatial grid × temporal period × legal coding × feature channel. Specifically, the three-dimensional tensor is constructed as follows:
[0220] A three-dimensional feature space is constructed with spatial encoding as the X-axis, temporal encoding as the Y-axis, and legal encoding as the Z-axis.
[0221] Each tensor unit stores the corresponding spatial context vector, temporal trend vector, and legal semantic vector;
[0222] Other joint features are mapped to nearest-neighbor tensor units, and KNN interpolation is used to fill in the missing units.
[0223] The initial feature tensor is divided into independent sub-tensors along the spatial grid dimension. Each independent sub-tensor dimension includes time period × legal code × feature channel. For example, assuming the initial feature tensor is 100 spatial grids × 24 time periods × 50 legal codes × 128 feature channels, the initial feature tensor is divided into 100 independent sub-tensors along the spatial grid dimension. Each sub-tensor dimension is: 24 time periods × 50 legal codes × 128 feature channels.
[0224] Temporal convolutional networks are applied to each independent sub-tensor to perform temporal convolution operations, thereby obtaining temporal convolutional features, which include time period × legal code × feature channels. Specifically, a temporal convolutional network (TCN) is applied to each spatial sub-tensor with the following configuration parameters: kernel size = 3, dilation rate = 2^d (d is the number of layers), residual connections + weight normalization, and output dimensions: 24 time period × 50 legal code × 256 feature channels.
[0225] Attention weights are calculated for each legal code in the temporal convolutional features to obtain the attention weights corresponding to each legal code. Specifically, a legal dimension attention mechanism is connected to the TCN output to calculate the attention weights of each legal code (normalized by the Softmax function). For example, 50 attention weight values are calculated for 50 legal codes.
[0226] Attention weights are applied to the legal dimension features to generate a weighted legal feature sequence by weighted summation. The dimensions of the weighted legal feature sequence include time period × fusion feature. Specifically, attention weights are applied to the legal dimension features to generate a weighted legal feature sequence (dimension: 24 time period × 256 fusion feature).
[0227] A spatiotemporal joint legal feature map is generated based on the weighted legal feature sequence. The dimensions of the joint feature map include spatial grid × time period × number of fused legal features.
[0228] For example, in temporal convolution processing, TCN networks expand the number of feature channels through convolution operations:
[0229] Input feature channel count: 128 (from the feature channel dimension of the initial feature tensor);
[0230] TCN convolution configuration: It adopts a residual structure, and each residual block contains two dilated convolutional layers;
[0231] Feature channel expansion: The number of channels is transformed by 1×1 convolution (128→256).
[0232] Therefore, the TCN output feature dimensions are: 24 time periods × 50 legal codes × 256 feature channels.
[0233] The computational process of the legal dimension attention mechanism:
[0234] Input dimensions: 24×50×256 (time period × legal code × feature channel);
[0235] Attention calculation: Performed along the legal coding dimension (50 features), with attention weights calculated independently for each feature channel (256 features in total), generating an attention weight matrix: 24×50×1 (time period × legal coding × 1).
[0236] Weighted fusion: Perform a weighted summation on each feature channel:
[0237] Calculation formula: ;in The fusion feature is defined by time period t and feature channel c. The attention weights are defined for time period t and legal code l; the output dimension is maintained as 24 time periods × 256 fused features (256 feature channels are retained for each time period).
[0238] Generation of spatiotemporal legal joint feature map:
[0239] After processing all spatial meshes:
[0240] Each spatial grid generates: 24 time periods × 256 fused features;
[0241] Maintain spatial dimensions: 100 spatial grids;
[0242] The final joint feature map dimensions are: 100 spatial grids × 24 time periods × 256 fused features.
[0243] After processing all spatial meshes:
[0244] Each spatial grid generates: 24 time periods × 256 fused features;
[0245] Maintain spatial dimensions: 100 spatial grids;
[0246] The final joint feature map dimensions are: 100 spatial grids × 24 time periods × 256 fused features.
[0247] In the final spatiotemporal legal joint feature map, the legal encoding dimension has been fused and eliminated. Key legal information is retained through attention weights, while non-key legal information is suppressed but not completely discarded (it still exists implicitly in the feature channels). The feature channel dimension (256 dimensions) encodes a comprehensive representation of the legal information. This approach has the following advantages:
[0248] Dimensionality disaster avoidance: avoid dimensionality explosion in legal coding (the feature channel expansion from 50 to 256 dimensions is far superior to the direct preservation of 50 to 50), and maintain the tractability of feature tensors (100×24×256 vs 100×24×50×256).
[0249] Enhanced feature representation capability: Dynamic weighting of legal features is achieved through an attention mechanism, and the 256-dimensional feature channels can encode more complex legal-spatiotemporal interaction patterns.
[0250] Subsequent processing compatibility: Provides a standardized feature input format for 3D convolution processing, maintaining compatibility with classic architectures in the field of computer vision (such as 3D ResNet).
[0251] Cross-layer fusion is performed on the spatiotemporal legal joint feature map to obtain a global fusion feature vector; specifically, auxiliary channels are added after the spatiotemporal legal joint feature map: spatial coordinate encoding (dimension: 2, longitude + latitude); time period encoding (dimension: 3, year / month / day periodic components); and an enhanced feature tensor (dimension: 100×24×259) is generated.
[0252] Perform 3D convolution operations:
[0253] The application uses a 3D ResNet architecture and contains 4 residual blocks:
[0254] Residual block 1: Convolution kernel 3×3×3, number of channels 64, stride 2;
[0255] Residual block 2: Convolution kernel 3×3×3, number of channels 128, stride 2;
[0256] Residual block 3: Convolution kernel 3×3×3, number of channels 256, stride 2;
[0257] Residual block 4: Convolution kernel 3×3×3, number of channels 512, stride 2;
[0258] Output feature map dimension: 13×3×64 (after 4 downsampling steps);
[0259] Global pooling operations:
[0260] Adaptive average pooling is applied to the final feature map:
[0261] Pooling kernel size = 13×3×1, output dimension: 1×1×512;
[0262] Generate a global fusion feature vector (512-dimensional, including spatiotemporal legal joint feature map and global fusion feature vector).
[0263] Feature enhancement is performed on the globally fused feature vector to obtain the enhanced feature tensor; specifically,
[0264] 3D batch normalization (BN) is applied to the spatiotemporal legal joint feature map: the output dimension is maintained at 100×24×256.
[0265] The global fusion feature vector is subjected to 2D batch normalization to maintain the output dimension of 512.
[0266] Feature activation:
[0267] By applying the Parametric Corrected Linear Unit (PReLU), the output dimension remains unchanged.
[0268] Residual connection:
[0269] Establish a residual connection path between the initial feature tensor and the fused feature tensor, and achieve dimension matching through 1×1×1 convolution; Input dimension: 100×24×256 → Output dimension: 100×24×256.
[0270] Perform element-wise addition:
[0271] Output: Enhanced feature tensor (including calibrated spatiotemporal legal joint feature map and global fusion feature vector, where the spatiotemporal legal joint feature map is 100×24×256 and the global fusion feature vector is 512-dimensional).
[0272] A physical fusion feature cube is generated based on the enhanced feature tensor. Specifically, the enhanced feature tensor (including the calibrated spatiotemporal legal joint feature map and the global fusion feature vector) is processed as follows:
[0273] The spatiotemporal legal joint feature map is arranged in three dimensions according to the space-time-law dimension, and the global fusion feature vector is attached as an independent feature channel;
[0274] Index building:
[0275] Generate a spatial grid index table (coordinate mapping of 100 grids);
[0276] Generate a time period index table (timestamp mapping for 24 periods);
[0277] Generate a legal code index table (semantic mapping of 50 codes);
[0278] Establish a multidimensional index mapping table (including a three-dimensional coordinate mapping of space, time, and law);
[0279] Output: Physically fused feature cube.
[0280] Access interfaces can be configured: spatial grid queries, time period queries, and legal code queries are supported.
[0281] Obtain the legal provision constraint matrix (including fields such as legal provision ID, constraint type, constraint value, and effective time); in this embodiment, the constraint type may include substantive constraints (such as: the upper limit of the penalty amount), procedural constraints (such as: the time limit requirement for handling cases), discretionary constraints (such as: the standard for determining mitigating circumstances), and validity constraints (such as: the scope of application of the law).
[0282] In this embodiment, a legal constraint knowledge graph is constructed using legal provisions as nodes and constraint relationships as edges. Constraint relationship features (such as constraints from superior laws and conflicts between corresponding laws) are extracted to generate a constraint relationship matrix (dimension: number of provisions × number of provisions × number of relationship types).
[0283] Based on the physical fusion feature cube and the legal provision constraint matrix, a compliance feature tensor is generated; cross-modal mapping: specifically, a "spatial grid-legal provision" correlation matrix is established (based on the geographical distribution of law enforcement cases); a "time cycle-legal statute of limitations" correlation matrix is established (based on the effective / expired time of the law); the constraint relationship matrix is projected onto the physical feature space to generate a constraint projection matrix (100×24×number of legal provisions×number of constraint types), and constraint type codes are appended to the physical feature cube to finally obtain the enhanced feature cube.
[0284] Based on the enhanced feature cube, a compliance feature tensor is generated. Specifically, a compliance check is performed on each 3D analysis unit (spatial grid × time period × feature dimension):
[0285] Entity compliance check: Comparing penalty characteristics with upper limit constraints on amount;
[0286] Procedural compliance check: Verify whether the case handling time meets the time limit requirements;
[0287] Discretionary compliance check: Assess whether the determination of the circumstances meets the discretionary standards;
[0288] Generate a compliance indicator vector (4 dimensions: entity / procedure / discretion / overall compliance);
[0289] Illegal Pattern Detection:
[0290] The isolated forest algorithm is applied to detect abnormal compliance indicators, generate violation pattern codes (8-dimensional, including violation type, relevant clauses, etc.), and finally obtain the compliance feature tensor;
[0291] The compliance feature tensor is obtained by fusing the compliance feature tensor with the physical fusion feature cube.
[0292] The HFIDE-XGBoost model is trained based on the compliance feature tensor to obtain the optimal tree structure parameters.
[0293] In this embodiment, training the HFIDE-XGBoost model based on the compliance feature tensor to obtain the optimal tree structure parameters includes:
[0294] HFIDE-XGBoost model initialization, specifically, initializing K independent XGBoost models. ;
[0295] During training using compliant feature tensors, record all feature combinations generated by each base learner:
[0296] ;in, It is the feature combination generated by the t-th split node of the k-th base learner;
[0297] Optimize the objective function by iteratively adding a decision tree:
[0298] ;
[0299] In this embodiment, iteratively adding decision trees to optimize the objective function is the core mechanism of model training. It is essentially a forward stagewise algorithm, and the training method is existing technology, which will not be described in detail here.
[0300] Calculate the set of feature combinations generated during the training phase. Each feature combination Interaction strength ;
[0301] Generate nonlinear attenuation coefficient The optimal feature combination is selected based on the information gain after attenuation correction. The decision tree splitting is then optimized based on the optimal feature combination to improve model performance, thereby obtaining the optimized set of base learners. .
[0302] In this embodiment, the step of inputting the dataset of enforcement actions to be supervised and the dataset of penalties to be supervised into the trained HFIDE-XGBoost model to obtain penalty discretion case information includes:
[0303] Extract features from the dataset of law enforcement to be supervised to obtain the characteristics of law enforcement to be supervised;
[0304] Extract features from the dataset of penalties to be supervised to obtain the features of penalties to be supervised;
[0305] The characteristics of the enforcement to be supervised and the characteristics of the penalties to be supervised are fused to obtain a standardized feature matrix;
[0306] The standardized feature matrix is input into the trained HFIDE-XGBoost model to obtain a batch prediction result set. Specifically, batch inference involves inputting the entire standardized feature matrix into the model to obtain the compliance probability value for each sample, applying temperature scaling technology to adjust the probability distribution so that the predicted probability matches the actual compliance rate; dynamic decision-making involves automatically adjusting the compliance threshold based on the current batch data distribution to generate a binary classification result (compliant / non-compliant); and feature attribution involves calculating the SHAP value of each prediction result to identify key features affecting the decision. In this embodiment, the batch prediction result set includes compliance probability, decision result, and key feature number.
[0307] Based on the batch prediction result set, penalty discretion case information is generated. Specifically, the steps are as follows:
[0308] Compliance mapping: Converts binary classification results into three-level compliance labels (compliant / general violation / serious violation), with mapping rules dynamically determined based on probability thresholds;
[0309] Case assembly: Generate structured cases for each prediction result, containing the following elements:
[0310] Spatiotemporal positioning information (spatial grid number, time period);
[0311] Compliance score (probability value between 0 and 1);
[0312] Violation type determination (general violation / serious violation);
[0313] Key influencing factors (the top 3 characteristics affecting the judgment);
[0314] Related legal provisions (mapped to specific legal provisions based on key features);
[0315] Case deduplication: By comparing data fingerprints, duplicate cases are avoided within 72 hours;
[0316] In this embodiment, each case in the structured penalty discretion case set includes spatiotemporal information, compliance assessment, and a chain of evidence of violation.
[0317] In this embodiment, each case in the penalty discretion case information includes the following:
[0318] Case ID (unique identifier, such as: C20250628001);
[0319] Type of violation (e.g., minor violation, serious violation);
[0320] Penalties (e.g., fines, administrative detention);
[0321] Enforcement entities (e.g., district-level, city-level);
[0322] The time of the penalty (e.g., 2025-06-28 14:30:00);
[0323] Spatial location (latitude and longitude, e.g., 120.5, 30.2);
[0324] Compliance score (a value between 0 and 1, e.g., 0.78);
[0325] Key Feature ID (Code of key factors influencing penalty discretion).
[0326] In this embodiment, the dataset to be supervised and penalized is input into a trained LSTM time-series prediction model to obtain failure comparison analysis information, including:
[0327] Features are extracted from the dataset of penalties to be supervised, thereby obtaining penalty features. Specifically, the following features can be extracted from the dataset of penalties to be supervised (features can be added or removed as needed; in this example, 12-dimensional features are used):
[0328] Measures type codes (e.g., fine = 1, license revocation = 2);
[0329] Implementation frequency (number of times the measure is used in the current month);
[0330] Recent failure rate (average failure rate over the past 3 months);
[0331] Number of regulatory revisions (number of changes to relevant regulations in the current month);
[0332] Regional economic indices (macroeconomic indicators such as GDP growth rate and unemployment rate);
[0333] Law enforcement intensity index (number of cases handled per person, proportion of random inspections);
[0334] Administrative reconsideration rate (the proportion of administrative reconsiderations triggered by the measures in the current month);
[0335] Litigation incidence rate (the proportion of administrative lawsuits arising from the measures in the current month);
[0336] Media attention (online public opinion heat index);
[0337] Number of times leaders issued instructions (number of times higher-level authorities paid attention);
[0338] Number of times the inspection team has been stationed (frequency of special inspections);
[0339] Historical failure association (feature similarity with historical failure cases).
[0340] Each feature channel is standardized to obtain a standardized time-series feature matrix;
[0341] The standardized time series feature matrix is input into the trained LSTM time series prediction model to obtain failure comparison analysis information (including predicted failure probability, warning level, and key influencing factors).
[0342] In this embodiment, the predicted failure probability refers to the probability that a punitive measure may become invalid within a specific future time period (e.g., next month), with a value ranging from 0 to 1 (0 indicating complete validity and 1 indicating complete invalidity). The failure probability applies to specific punitive measures, such as the failure probability of fines, license revocation, and administrative detention.
[0343] The punitive measures may become ineffective (i.e., fail to achieve the intended regulatory effect) for the following reasons:
[0344] Lax enforcement: For example, fines are lower than the statutory minimum, or insufficient evidence leads to the revocation of the review.
[0345] Procedural violations: such as failure to fulfill the obligation to inform or handling cases beyond the time limit, leading to litigation.
[0346] Improper discretion: For example, failing to impose severe penalties on violations that are deemed "serious".
[0347] External interference: such as: revisions to regulations leading to questions about the legality of measures, and negative media reports weakening the authority of law enforcement.
[0348] Failure warning levels are risk levels classified according to failure probability, used to quickly identify failure risks that require priority handling.
[0349] In this embodiment, the failure warning level can be divided into three levels:
[0350] Red alert: Failure probability > 0.7 (high risk);
[0351] Orange alert: 0.5 ≤ probability of failure ≤ 0.7 (medium risk);
[0352] Green and safe: failure probability <0.5 (low risk).
[0353] Different warning levels correspond to different measures. For example, a red alert requires immediate special inspections and suspension of related measures. An orange alert requires strengthened case spot checks and training for law enforcement personnel. A green alert maintains routine supervision and periodic reviews.
[0354] For example, assuming the predicted failure probability of a city's "overweight and oversized transport penalty" measure is 0.82 (red alert), its failure logic might include:
[0355] High failure rate recently: The failure rate of this measure has reached 35% in the past three months (compared to 28% in the same period in history).
[0356] Regulations revised: The newly revised "Regulations of the People's Republic of China on Road Transport" this month has adjusted the standards for determining overweight or oversized vehicles.
[0357] Media attention: Recent incidents involving exorbitant fines have sparked public outcry.
[0358] In this embodiment, the traffic police law enforcement supervision method of this application further includes:
[0359] Obtain the association rule dataset, which includes multiple association rules;
[0360] The penalty discretion case information is matched with various related rules. When a related rule is matched, regulatory warning information is generated based on that rule.
[0361] In this embodiment, the association rule dataset is generated in the following manner:
[0362] Obtain historical penalty discretion case information and historical failure comparison analysis information;
[0363] By performing spatiotemporal alignment and feature fusion on historical penalty discretion case information and historical failure comparison analysis information, a structured coded dataset is obtained.
[0364] The FP-Growth algorithm is used to mine frequent items in structured coded datasets to obtain a list of frequent itemsets based on the feature combinations that appear most frequently.
[0365] Generate association rules from the list of frequent itemsets to obtain the association rule dataset.
[0366] The following example further illustrates the generation of regulatory warning information. It should be understood that this example does not constitute any limitation on this application.
[0367] Assume there are three historical penalty discretion case records (each resolved case can be considered a historical penalty discretion case record), as shown in Table 1 below:
[0368] Table 1 (Example of historical penalty discretion cases):
[0369]
[0370] The key feature IDs mentioned above are assigned manually, such as the severity of the violation (e.g., F47 may represent "the amount of the violation exceeds 100,000 yuan").
[0371] Number of violations (e.g., F23 may represent "second violation within 3 years");
[0372] The type of violation (e.g., F12 may represent "involving minors").
[0373] There are also three corresponding historical failure comparison analysis records, as shown in Table 2 below:
[0374] Table 2 (Example table of historical failure comparison analysis information):
[0375]
[0376] First, spatiotemporal alignment is performed, as follows:
[0377] For example, the spatial location (110.5, 20.2) of case C20250628001 is mapped to spatial grid A12, with the time aligned to June 2025.
[0378] The spatiotemporally aligned case set is shown in Table 3 below (only some fields are displayed):
[0379] Table 3 (Example table of case studies after spatiotemporal alignment):
[0380]
[0381] Perform feature fusion (taking case C20250628001 as an example):
[0382] Compliance score: 0.78;
[0383] Violation type code: Serious violation → 2;
[0384] Key Feature ID: F47;
[0385] Failure warning level code: Red → 1;
[0386] Penalty code: Fine → 5;
[0387] Enforcement entity code: District level → 3;
[0388] Regional economic index: 0.62 (hypothetical value);
[0389] Enforcement intensity index: 0.85 (hypothetical value);
[0390] Output structured encoded data:
[0391] [0.78, 2, 47, 1, 5, 3, 0.62, 0.85].
[0392] The structured coded data obtained above are combined into a structured coded dataset as shown in Table 4 below (only a portion is shown):
[0393] Table 4 (Example table of structured coded datasets):
[0394]
[0395] The FP-Growth algorithm is used for data mining, with a minimum support threshold of 0.15. Assuming the frequency of "violation type code = 2" is 0.2, which meets the threshold, frequent itemsets are mined.
[0396] Frequent 1-itemset: {Compliance Score=0.78}, {Violation Type Code=2}, {Failure Warning Level Code=1}
[0397] Frequent 2-itemset: {Violation type code=2, Failure warning level code=1}, {Compliance score=0.78, Penalty measure code=5};
[0398] Rules are generated from the frequent itemset, with a minimum confidence threshold of 0.7.
[0399] Rule 1: {Violation type code=2, Failure warning level code=1} → {Penalty measure code=5}, Confidence level=0.88, Lift level=2.1;
[0400] Rule 2: {Compliance Score = 0.78} → {Penalty Code = 5}, Confidence = 0.75, Lift = 1.8;
[0401] The above rules constitute the association rule dataset, as shown in Table 5 below:
[0402] Table 5 (Example table of association rule dataset):
[0403]
[0404] When new penalty discretion case information is obtained, such as in Table 6 below:
[0405] Table 6 (Example Table of Case Information on Penalty Discretion):
[0406]
[0407] Extract the feature code of the new case C20250629001: [0.75, 2, 47, 1, 5, 3, 0.62, 0.85];
[0408] Matching with the valid set of related rules, the preconditions for matching rule 1 are found to be {violation type = 2, failure warning level = 1}.
[0409] Based on the conclusion of Rule 1 {Measure Type = 5} (fine) and the escalation level 2.1, the warning level is determined to be Level 1.
[0410] Generate regulatory warning information: Warning ID: YJ-20250629-001;
[0411] Warning type: Special inspection warning;
[0412] Warning level: Level 1;
[0413] Triggering rule: {Violation type=2, Failure warning level=1} → {Measure type=5};
[0414] Scope of impact: Spatial grid A12 (5 matching cases in the last 3 days);
[0415] Recommended measures: Establish a special inspection team within 24 hours to focus on verifying the compliance of the penalty measures.
[0416] This application has the following advantages:
[0417] The HFIDE-XGBoost model used in this application breaks through the limitation of traditional XGBoost, which can only implicitly capture second-order interactions. By calculating the information gain of higher-order interactions, it can explicitly model the third-order interaction of "violation type × enforcement time period × spatial heat map", accurately identifying complex violation patterns such as "freight vehicles driving illegally around logistics parks at night". The base learner layer adopts different combinations of feature orders (2-5 orders), and through a dynamic weight allocation mechanism, the ensemble model improves the F1 score on the validation set by 18.7%, and is particularly good at handling progressive violation scenarios such as "minor violations accumulating to trigger severe penalties".
[0418] This application employs a physically fused feature cube to construct a three-dimensional tensor of "spatial grid × time period × legal code". For example, "Article 90 of the Road Traffic Safety Law of the People's Republic of China" is mapped as a legal semantic vector and fused with spatiotemporal features such as "commercial area density 0.8 / daytime law enforcement intensity 0.6" to achieve joint reasoning in the three dimensions of "space-time-law". Through the legal provision constraint matrix, substantive / procedural constraints such as "maximum amount of fine" and "case handling time limit" are directly encoded into feature tensors, making the model prediction results naturally meet compliance requirements, and improving the recall rate of violation prediction by 23.4%.
[0419] This application proposes a technical solution to construct a failure probability prediction model by using an LSTM time series prediction model to extract 12-dimensional time series features such as "recent failure rate," "number of regulatory revisions," and "media attention." For example, when the predicted failure probability of "overweight transport penalties" reaches 82%, it can be associated with risk factors such as "failure rate of 35%+ in the past 3 months + revision of the new "Road Transport Regulations of the People's Republic of China" + public opinion on exorbitant fines." Based on the failure probability, red / orange / green warnings are divided to achieve differentiated handling: red warnings (>70%) trigger special inspections, orange warnings (50%-70%) initiate case spot checks, and green warnings (<50%) maintain routine supervision, thereby increasing the utilization rate of regulatory resources by 40%.
[0420] This application also provides a traffic police enforcement monitoring device, which includes a dataset acquisition module, a model training module, a penalty discretion case acquisition module, and a failure comparison analysis acquisition module.
[0421] The dataset acquisition module is used to acquire the dataset of law enforcement to be supervised and the dataset of penalties to be supervised.
[0422] The model training module is used to acquire and train the HFIDE-XGBoost model, and to acquire and train the LSTM time series prediction model.
[0423] The penalty discretion case acquisition module is used to input the enforcement dataset to be supervised and the penalty dataset to be supervised into the trained HFIDE-XGBoost model to obtain penalty discretion case information.
[0424] The failure comparison analysis acquisition module is used to input the dataset to be supervised and penalized into the trained LSTM time series prediction model, thereby obtaining failure comparison analysis information.
[0425] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A traffic police enforcement and supervision method, characterized in that, The traffic police enforcement and supervision methods include: Obtain the datasets of enforcement actions and penalties to be supervised; The process involves acquiring and training an HFIDE-XGBoost model, and acquiring and training an LSTM temporal prediction model. The HFIDE-XGBoost model comprises a base learner layer, a higher-order feature interaction perception layer, and a dynamic ensemble layer. The base learner layer consists of multiple base learners, each an independent XGBoost model with different initialization parameters and feature combination order settings. The higher-order feature interaction perception layer is integrated within each base learner. During tree node splitting, this layer generates higher-order feature combinations and calculates their higher-order interaction information gain to select the optimal feature combination for node splitting. The dynamic ensemble layer dynamically integrates the prediction results from multiple HFIDE-XGBoost base learners. The datasets of law enforcement and penalties to be supervised are input into the trained HFIDE-XGBoost model to obtain information on penalty discretion cases. The dataset to be supervised and penalized is input into a trained LSTM time series prediction model to obtain failure comparison analysis information, which includes predicted failure probability, warning level, and key influencing factors.
2. The traffic police law enforcement and supervision method as described in claim 1, characterized in that, The process of obtaining and training the HFIDE-XGBoost model includes: Obtain the law enforcement dataset and the penalty dataset for training; Features are extracted from the training law enforcement dataset to obtain a structured law enforcement feature matrix; Features are extracted from the training penalty dataset to obtain a structured penalty feature matrix; A joint feature matrix is generated based on the structured law enforcement feature matrix and the structured penalty feature matrix; Generate a physical fusion feature cube based on the joint feature matrix; Obtain the legal provision constraint matrix; A compliance feature tensor is generated based on the physical fusion feature cube and the legal clause constraint matrix; The HFIDE-XGBoost model is trained based on the compliance feature tensor.
3. The traffic police law enforcement and supervision method as described in claim 2, characterized in that, The training dataset includes law enforcement ID information, law enforcement time information, law enforcement location information, law enforcement personnel information, violation type code information, on-site evidence information, and party information; The step of extracting features from the training law enforcement dataset to obtain a structured law enforcement feature matrix includes: The law enforcement ID information, law enforcement time information, and law enforcement location information are standardized respectively to obtain standardized law enforcement ID, structured time feature vector, and standardized spatial coordinate data; Feature extraction is performed on the on-site evidence information to obtain evidence text feature vectors; Feature extraction is performed on the illegal type code information to obtain structured illegal code features; Spatiotemporal feature encoding is performed on the normalized spatial coordinate data to obtain a spatial context feature vector; Spatiotemporal feature encoding is performed on the structured temporal feature vector to obtain the temporal pattern feature vector; A law enforcement association feature matrix is generated based on the standardized law enforcement ID, law enforcement personnel information, and party information. A structured law enforcement feature matrix is generated based on the evidence text feature vector, structured illegal code features, spatial context feature vector, temporal pattern feature vector, and law enforcement association feature matrix.
4. The traffic police law enforcement and supervision method as described in claim 3, characterized in that, The training penalty dataset includes penalty ID information, party ID information, penalty time information, penalty amount information, point deduction information, detention days information, penalty basis text information, and penalty result status; Extracting features from the training penalty dataset to obtain a structured penalty feature matrix includes: Encode the penalty ID information to generate a standardized penalty ID; The penalty time information is standardized to obtain a structured penalty time feature vector; The penalty amount, demerit points, and detention days are numerically standardized to obtain a set of standardized numerical features. Textual features are extracted from the information on the basis for penalties to obtain legal feature vectors and structured legal feature vectors. The penalty time information and penalty location information are associated with the party's ID information, and the associated penalty time information and penalty location information are encoded with spatiotemporal features to obtain the penalty time sequence feature vector and penalty spatial association features; The standardized penalty ID, party ID information, and law enforcement ID information are associated, and a graph neural network is constructed on the associated standardized penalty ID, party ID information, and law enforcement ID information to obtain the penalty association feature matrix; A structured penalty feature matrix is generated based on the legal provision feature vector, structured legal provision features, penalty time sequence feature vector, penalty spatial correlation features, penalty correlation feature matrix, and standardized numerical feature set.
5. The traffic police law enforcement and supervision method as described in claim 4, characterized in that, The step of generating a joint feature matrix based on the structured law enforcement feature matrix and the structured penalty feature matrix includes: The structured law enforcement feature matrix and the structured penalty feature matrix are spatiotemporally aligned to obtain a spatiotemporal alignment mapping table; Semantic alignment is performed on the violation type code features in the law enforcement feature matrix and the penalty basis clause features in the penalty feature matrix to obtain the legal element matching matrix; Generate party-level aggregated features and case-level correlation features from the party information in the law enforcement feature matrix and the party ID information in the penalty feature matrix; The structured law enforcement feature matrix, structured penalty feature matrix, spatiotemporal alignment mapping table, legal element matching matrix, party-level aggregation features, and case-level association features are fused together to obtain a joint feature matrix.
6. The traffic police law enforcement and supervision method as described in claim 5, characterized in that, The step of generating a physical fusion feature cube based on the joint feature matrix includes: Generate a spatially encoded feature matrix based on the features with spatial attributes in the joint feature matrix; Generate a time-coded feature matrix based on the time-attributed features in the joint feature matrix; Generate a legal coding feature matrix based on the features with legal attributes in the joint feature matrix; The initial feature tensor is obtained by constructing a three-dimensional tensor from the spatial coding feature matrix, temporal coding feature matrix, legal coding feature matrix, and other features in the joint feature matrix. The initial feature tensor is divided into independent sub-tensors according to the spatial grid dimension; Temporal convolution operations are performed on each independent subtensor using a temporal convolution network to obtain temporal convolution features; Attention weights are calculated for each legal code in the temporal convolutional features, thereby obtaining the attention weights corresponding to each legal code. An attention weight is applied to the legal dimension features, and a weighted sum is generated to produce a weighted legal feature sequence. A spatiotemporal joint legal feature map is generated based on the weighted legal feature sequence; The spatiotemporal legal joint feature map is fused across layers to obtain a global fused feature vector; Feature enhancement is performed on the global fused feature vector to obtain the enhanced feature tensor; A physical fusion feature cube is generated based on the enhanced feature tensor.
7. The traffic police law enforcement and supervision method as described in claim 6, characterized in that, The process of generating a compliance feature tensor based on the physical fusion feature cube and the legal provision constraint matrix includes: Obtain the structured constraint feature matrix based on the legal provision constraint matrix; The enhanced feature cube is obtained based on the physical fusion feature cube and the structured constraint feature matrix; Generate compliance feature tensors based on the enhanced feature cube; A compliance feature tensor is generated based on the compliance feature tensor and the physical fusion feature cube.
8. The traffic police law enforcement and supervision method as described in claim 7, characterized in that, The step of inputting the dataset of law enforcement to be supervised and the dataset of penalties to be supervised into the trained HFIDE-XGBoost model to obtain penalty discretion case information includes: Extract features from the dataset of law enforcement to be supervised to obtain the characteristics of law enforcement to be supervised; Extract features from the dataset of penalties to be supervised to obtain the features of penalties to be supervised; The characteristics of the enforcement to be supervised and the characteristics of the penalties to be supervised are fused to obtain a standardized feature matrix; The standardized feature matrix is input into the trained HFIDE-XGBoost model to obtain a batch prediction result set; Based on the batch prediction result set, penalty discretion case information is generated.
9. The traffic police law enforcement and supervision method as described in claim 8, characterized in that, The traffic police enforcement and supervision methods further include: Obtain the association rule dataset, which includes multiple association rules; The penalty discretion case information is matched with various related rules. When a related rule is matched, regulatory warning information is generated based on that rule.
10. A traffic police enforcement monitoring device, characterized in that, The traffic police enforcement monitoring device includes: A dataset acquisition module, which is used to acquire the dataset of law enforcement to be supervised and the dataset of penalties to be supervised; The model training module is used to acquire and train the HFIDE-XGBoost model and the LSTM temporal prediction model. The HFIDE-XGBoost model includes a base learner layer, a higher-order feature interaction perception layer, and a dynamic ensemble layer. The base learner layer consists of multiple base learners, each an independent XGBoost model with different initialization parameters and feature combination order settings. The higher-order feature interaction perception layer is integrated within each base learner. During tree node splitting, the higher-order feature interaction perception layer is responsible for generating higher-order feature combinations and calculating their higher-order interaction information gain to select the optimal feature combination for node splitting. The dynamic ensemble layer is responsible for dynamically integrating the prediction results of multiple HFIDE-XGBoost base learners. The penalty discretion case acquisition module is used to input the dataset of law enforcement to be supervised and the dataset of penalties to be supervised into the trained HFIDE-XGBoost model to obtain penalty discretion case information. The failure comparison analysis acquisition module is used to input the dataset to be supervised and penalized into a trained LSTM time series prediction model to obtain failure comparison analysis information, which includes predicted failure probability, warning level, and key influencing factors.
Citation Information
Patent Citations
Traffic high-risk personnel identification method based on XgBoost algorithm
CN109101568A
Traffic flow prediction method
CN111063194A