Flowing population intensive enterprise operator infringement prediction method based on gradient boosting decision tree
By using a gradient boosting decision tree model, combined with feature selection and construction, data balancing, and loss function optimization, the problems of nonlinear relationship processing, data skewness, and insufficient interpretability in the prediction of labor-related crimes in enterprises with high concentrations of migrant workers are solved, achieving high-precision prediction of crime risks and dynamic adaptive management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2026-03-10
AI Technical Summary
Existing traditional statistical models, single decision tree models, random forest models, and shallow machine learning models suffer from problems such as insufficient handling of nonlinear relationships, overfitting and underfitting, improper handling of data skewness, and insufficient interpretability when dealing with the issue of labor rights violations in enterprises with high concentrations of migrant workers. These issues affect the accuracy and practicality of predictions.
A gradient boosting decision tree (GBDT) model is adopted. Through the iterative construction of multiple decision trees, combined with feature selection and construction, data balancing, loss function adjustment and hyperparameter optimization, a model for predicting labor-related crimes in enterprises with high migrant population density is constructed. The model is continuously optimized through user feedback and data updates.
It significantly improves prediction accuracy, enhances the interpretability and adaptability of the model, can dynamically adapt to data changes, provides accurate warnings of harm risks, and promotes social harmony and economic development.
Smart Images

Figure CN121638518A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, and in particular to a method for predicting labor-related harm in enterprises with high migrant worker populations based on gradient boosting decision trees. Background Technology
[0002] Currently, against the backdrop of rapid socio-economic development, the migrant population has become a significant component of urbanization, particularly in labor-intensive enterprises where the large and mobile workforce presents challenges to enterprise management and government social governance. In particular, issues of worker abuse, including wage arrears, poor working conditions, and violations of labor rights, not only affect the quality of life of migrant workers but also hinder social equity and harmonious development. Therefore, constructing a predictive model for worker abuse in labor-intensive enterprises based on Gradient Boosting Decision Tree (GBDT) has significant practical and technical value for preventing and intervening in such problems.
[0003] Existing traditional statistical models, single decision tree models, random forest models, and shallow machine learning models have the following problems:
[0004] Insufficient handling of nonlinear relationships: Traditional statistical methods and some shallow machine learning models have difficulty effectively capturing nonlinear relationships between variables, which is a significant limitation in complex socioeconomic phenomena.
[0005] Overfitting and underfitting issues: Individual decision trees and some models are prone to overfitting on complex datasets, while oversimplified models may lead to underfitting, both of which affect prediction accuracy.
[0006] Explanatory power and practicality: While black-box models like random forests have strong predictive power, they lack sufficient interpretability and are difficult to directly guide policy-making or improve internal management within enterprises.
[0007] Improper handling of data skew: The relatively small number of incidents of violence against migrant workers may cause the model to be overly biased towards the majority class (no incidents) during training, reducing its predictive ability for the minority class (incidents). Summary of the Invention
[0008] One of the objectives of this invention is to provide a method for predicting labor-related infringements in enterprises with high migrant population density based on gradient boosting decision trees, so as to at least solve one of the above-mentioned defects in the prior art.
[0009] This invention provides a method for predicting labor-related harm in labor-intensive enterprises based on gradient boosting decision trees, comprising:
[0010] Collect target data;
[0011] Preprocess the target data;
[0012] Based on the preprocessing results, feature selection and construction are performed;
[0013] Based on the feature selection and construction results, a prediction model for labor infringement in enterprises with a high concentration of migrant workers is trained using gradient boosting decision tree as the basic model.
[0014] Optimize the training-completed prediction model for labor-related crimes in enterprises with high concentrations of migrant workers;
[0015] Based on the optimized prediction model for labor infringement in enterprises with a large migrant population, the task of predicting labor infringement in these enterprises is carried out.
[0016] Preferably, the collected target data includes:
[0017] Based on the data quality control mechanism, target data is obtained from multiple data channels; the target data includes at least: self-reported by enterprises, government regulatory departments, third-party investigation agencies, and worker feedback on labor infringement incidents in enterprises with a high concentration of migrant workers.
[0018] Preferably, the preprocessing of the target data includes:
[0019] The target data is then cleaned, encoded, standardized, normalized, and balanced in sequence.
[0020] Preferably, the feature selection and construction based on the preprocessing results includes:
[0021] The correlation between the features in the preprocessed results and the incidents of workplace violence was analyzed using Pearson correlation coefficient and Spearman rank correlation coefficient.
[0022] Based on the correlation analysis results, target features are selected from the preprocessing results;
[0023] For categorical variables in the preprocessing results, the chi-square test is used to evaluate the association between the target feature and the target variable;
[0024] Based on the correlation assessment results, the final features are selected from the target features;
[0025] Based on the final features, construct new features; the new features should include at least: work intensity index and safety awareness score;
[0026] The final features and new features are used as the results of feature selection and construction.
[0027] Preferably, optimizing the trained prediction model for labor-related offenses in labor-intensive enterprises includes:
[0028] K-Fold cross-validation was used to evaluate the stability and generalization ability of the trained model for predicting labor-related crimes in enterprises with high migrant population density.
[0029] Loss function adjustment: To address the data skew problem in the trained prediction model of labor malpractice in enterprises with high migrant population density, weighted logistic regression is used in the base learner of GBDT in the trained prediction model of labor malpractice in enterprises with high migrant population density to adjust the weight of positive samples.
[0030] The optimal combination of hyperparameters in the trained prediction model of labor-related crimes in enterprises with high migrant population density is found using grid search, random search, or Bayesian optimization strategies, and then set accordingly.
[0031] The AUC-ROC metric is monitored on the validation set of the trained prediction model for labor infringements in labor-intensive enterprises. Training is stopped when the performance of the AUC-ROC metric no longer improves significantly.
[0032] Preferably, after training the labor harassment prediction model for labor-intensive enterprises based on feature selection and construction results and using gradient boosting decision trees as the basic model, the method further includes:
[0033] Multiple evaluation metrics were used to assess the performance of the trained model for predicting labor-related offenses in enterprises with high migrant worker populations.
[0034] Preferably, after performing the task of predicting occupational hazards in enterprises with a high concentration of migrant workers based on the optimized occupational hazard prediction model, the method further includes:
[0035] Establish a user feedback mechanism to collect problems and suggestions from practical applications;
[0036] Regularly collect new target data and update the model training set;
[0037] Based on the problems and suggestions in practical applications and the updated model training set, the optimized prediction model for labor-related crimes in enterprises with high migrant population density is retrained and optimized.
[0038] This application has achieved the following beneficial effects:
[0039] 1. Significantly improve prediction accuracy: GBDT builds decision trees iteratively, learning complex patterns and nonlinear relationships in the data layer by layer. In particular, it can capture weak but crucial interactions between variables, thereby significantly improving prediction accuracy while maintaining model simplicity.
[0040] 2. Effectively addressing data skew: By integrating sampling strategies within the learning framework (such as oversampling techniques like SMOTE) and adjusting the weights of the loss function, this invention effectively balances the dataset, ensuring that the model remains highly sensitive to rare events (such as labor disputes) and reducing false negative predictions.
[0041] 3. Enhanced model interpretability: The GBDT model provides a ranking of feature importance, which allows researchers and policymakers to intuitively understand which factors contribute the most to the risk of worker injury, thus facilitating the development of targeted preventive measures and policy interventions.
[0042] 4. Dynamic Adaptation and Generalization: The model design of this invention takes into account the needs of data updates and environmental changes. Through periodic retraining and feature selection optimization, it ensures that the model can continuously adapt to new data features and risk trends, and maintain long-term predictive effectiveness.
[0043] 5. Promoting scientific decision-making and governance: By providing accurate and timely early warnings of workplace violence risks, this invention helps governments and enterprises take proactive measures to improve the working environment of workers, reduce the incidence of violence incidents, and ultimately promote social harmony and economic development.
[0044] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0045] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0046] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0047] Figure 1 This is a schematic diagram of a method for predicting labor-related harm in enterprises with high migrant population density based on gradient boosting decision trees, as described in an embodiment of the present invention. Detailed Implementation
[0048] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0049] This invention provides a method for predicting labor-related harm in enterprises with high migrant worker populations based on gradient boosting decision trees, such as... Figure 1 As shown, it includes:
[0050] Collect target data;
[0051] Preprocess the target data;
[0052] Based on the preprocessing results, feature selection and construction are performed;
[0053] Based on the feature selection and construction results, a prediction model for labor infringement in enterprises with a high concentration of migrant workers is trained using gradient boosting decision tree as the basic model.
[0054] Optimize the training-completed prediction model for labor-related crimes in enterprises with high concentrations of migrant workers;
[0055] Based on the optimized prediction model for labor infringement in enterprises with a large migrant population, the task of predicting labor infringement in these enterprises is carried out.
[0056] The target data to be collected includes:
[0057] Based on the data quality control mechanism, target data is obtained from multiple data channels; the target data includes at least: self-reported by enterprises, government regulatory departments, third-party investigation agencies, and worker feedback on labor infringement incidents in enterprises with a high concentration of migrant workers.
[0058] The preprocessing of the target data includes:
[0059] The target data is then cleaned, encoded, standardized, normalized, and balanced in sequence.
[0060] The feature selection and construction based on the preprocessing results includes:
[0061] The correlation between the features in the preprocessed results and the incidents of workplace violence was analyzed using Pearson correlation coefficient and Spearman rank correlation coefficient.
[0062] Based on the correlation analysis results, target features are selected from the preprocessing results;
[0063] For categorical variables in the preprocessing results, the chi-square test is used to evaluate the association between the target feature and the target variable;
[0064] Based on the correlation assessment results, the final features are selected from the target features;
[0065] Based on the final features, construct new features; the new features should include at least: work intensity index and safety awareness score;
[0066] The final features and new features are used as the results of feature selection and construction.
[0067] The optimization of the trained prediction model for labor-related crimes in labor-intensive enterprises includes:
[0068] K-Fold cross-validation was used to evaluate the stability and generalization ability of the trained model for predicting labor-related crimes in enterprises with high migrant population density.
[0069] Loss function adjustment: To address the data skew problem in the trained prediction model of labor malpractice in enterprises with high migrant population density, weighted logistic regression is used in the base learner of GBDT in the trained prediction model of labor malpractice in enterprises with high migrant population density to adjust the weight of positive samples.
[0070] The optimal combination of hyperparameters in the trained prediction model of labor-related crimes in enterprises with high migrant population density is found using grid search, random search, or Bayesian optimization strategies, and then set accordingly.
[0071] The AUC-ROC metric is monitored on the validation set of the trained prediction model for labor infringements in labor-intensive enterprises. Training is stopped when the performance of the AUC-ROC metric no longer improves significantly.
[0072] After training the labor harassment prediction model for labor-intensive enterprises based on feature selection and construction results and using gradient boosting decision trees as the basic model, the method further includes:
[0073] Multiple evaluation metrics were used to assess the performance of the trained model for predicting labor-related offenses in enterprises with high migrant worker populations.
[0074] The optimized labor harassment prediction model for enterprises with a large migrant population, after performing the labor harassment prediction task, also includes:
[0075] Establish a user feedback mechanism to collect problems and suggestions from practical applications;
[0076] Regularly collect new target data and update the model training set;
[0077] Based on the problems and suggestions in practical applications and the updated model training set, the optimized prediction model for labor-related crimes in enterprises with high migrant population density is retrained and optimized.
[0078] like Figure 1 As shown, the specific implementation includes the following steps:
[0079] 1) Data collection
[0080] Data sources: Ensure that the data comes from multiple reliable channels, including self-reporting by enterprises, government regulatory departments, third-party investigation agencies, and feedback from workers.
[0081] Data quality: Establish a data quality control mechanism to ensure that the collected data is accurate and avoids bias and error.
[0082] 2) Data preprocessing
[0083] Cleaning: Automatically detects and removes duplicates, identifies and handles outliers (e.g., through threshold setting, cluster analysis, etc.), and appropriately imputes or deletes missing values.
[0084] Encoding: Choose an appropriate encoding method based on the characteristics of the categorical variable (one-hot encoding is suitable for unordered classification, while label encoding or effect encoding is suitable for ordered classification).
[0085] Standardization / Normalization: Standardize or normalize numerical features to ensure that features of different dimensions have the same weight in the model.
[0086] Data balancing: To address the imbalance between positive and negative samples, oversampling techniques such as SMOTE or undersampling methods are employed. When necessary, synthetic minority class oversampling techniques (SMOTE) and undersampling methods (such as ENN, Tomek Links, etc.) are combined.
[0087] 3) Feature selection and construction
[0088] Correlation analysis: Pearson correlation coefficient, Spearman rank correlation coefficient and other methods were used to analyze the correlation between the characteristics and the incidents of abuse of workers.
[0089] Chi-square test: For categorical variables, the chi-square test is used to assess the association between a feature and the target variable.
[0090] Feature construction: Based on business understanding and data characteristics, new composite features (such as work intensity index and safety awareness score) are created to enhance the predictive ability of the model.
[0091] 4) Model building and optimization
[0092] Model initialization: Select GBDT as the base model and set appropriate initial parameters.
[0093] Training and validation: K-Fold cross-validation is used to evaluate the stability and generalization ability of the model.
[0094] Loss function adjustment: To address the data skew problem, consider using weighted logistic regression in the base learners of GBDT to adjust the weights of positive samples.
[0095] Hyperparameter tuning: using strategies such as grid search, random search, or Bayesian optimization to find the optimal combination of hyperparameters.
[0096] Early stopping strategy: Monitor metrics such as AUC-ROC on the validation set, and stop training when performance no longer improves significantly.
[0097] 5) Model Evaluation and Deployment
[0098] Feature importance re-evaluation: After training, the importance of features is re-evaluated, and unimportant features are removed.
[0099] Prediction module: Deploys the optimized GBDT model as a prediction service, accepts new employment data and outputs the probability of occurrence of infringement events.
[0100] Evaluation module: Uses a variety of evaluation metrics (such as confusion matrix, precision, recall, F1 score, AUC-ROC curve) to comprehensively evaluate model performance.
[0101] Early warning module: Integrates the prediction results into the real-time monitoring system to issue early warning signals to high-risk individuals or enterprises.
[0102] 6) Continuous optimization and iteration
[0103] Feedback loop: Establish a user feedback mechanism to collect problems and suggestions from practical applications.
[0104] Data updates: Collect new data regularly and update the model training set.
[0105] Model retraining: Based on new data and user feedback, the model is retrained and optimized to ensure its timeliness and accuracy.
[0106] Through the above technical solutions, this predictive model aims to provide a scientific basis for the prevention and management of worker-related crimes in enterprises with high migrant worker populations, thereby promoting the protection of workers' rights and social stability.
[0107] The innovation of this invention lies in
[0108] Comprehensive Feature Modeling: This model innovatively integrates heterogeneous data from multiple sources, including public security, social security, legal entities, and market supervision bureaus. Through meticulous feature engineering, it constructs a feature system that comprehensively reflects the risk of infringement on employment rights, thereby improving the interpretability and accuracy of the prediction model.
[0109] Adaptive Loss Optimization: Given the skewed nature of the data on labor abuse incidents, the model employs a weighted loss function, assigning different weights to samples of different categories. In particular, in dealing with the imbalance of positive and negative samples, the model's ability to identify the minority class (i.e., labor abuse incidents) is directly optimized by adjusting the loss function, thereby improving the predictive sensitivity and specificity.
[0110] Progressive learning mechanism: Utilizing the gradient boosting principle of GBDT, the model learns iteratively, with each tree dedicated to correcting the prediction residuals of the preceding model. This gradual accumulation of learning results in a powerful and highly adaptive prediction framework. This mechanism is particularly suitable for predicting occupational injury risks in complex, non-linear scenarios.
[0111] Feature Importance Insights: The model is not only used for prediction, but also assesses the importance of each feature in predicting labor abuse through the inherent mechanism of GBDT. This provides policymakers and corporate management with a priority ranking of intervention measures, which helps to implement precise policies and reduce the risk of abuse.
[0112] Dynamic early warning system: The constructed model does not remain at the theoretical level, but is designed as a dynamic early warning tool that can be embedded in actual management systems. It can monitor and warn of potential risks of labor infringement in real time, providing technical support for timely preventive measures and enhancing the practical value and social benefits of the model.
[0113] Continuous model performance optimization: By introducing automated hyperparameter tuning strategies and early stopping mechanisms, the model can continuously optimize itself as new data is added while maintaining high efficiency, thereby improving the model's stability and long-term effectiveness and adapting to changes in the mobile population and business environment.
[0114] In summary, this predictive model provides an innovative and efficient solution for preventing worker-related crimes in enterprises with high concentrations of migrant workers through comprehensive data utilization, targeted loss function design, efficient learning mechanism, in-depth feature analysis, real-time early warning function, and continuous optimization strategy.
[0115] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1.A method for predicting the infringement of migrant population-intensive enterprises by workers based on gradient boosting decision trees, characterized in that, The method comprises the following steps: Collect target data; Preprocess the target data; Based on the preprocessing result, perform feature selection and construction; Based on the feature selection and construction result, train a migrant population intensive enterprise work infringement prediction model based on a gradient boosting decision tree as a base model; Optimize the trained migrant population intensive enterprise work infringement prediction model; Based on the optimized migrant population intensive enterprise work infringement prediction model, perform the migrant population intensive enterprise work infringement prediction task. 2.The method of predicting the infringement of the floating population intensive enterprise business according to claim 1, wherein, The target data collection includes: Based on the data quality control mechanism, obtain target data from multiple data channels; the target data at least includes migrant population intensive enterprise work infringement events reported by enterprises, government regulatory departments, third-party investigation agencies and migrant workers. 3.The method of claim 1, wherein the method comprises: The preprocessing of the target data includes: Clean, encode, standardize, normalize and balance the target data in sequence. 4.The method of predicting the invasion of floating population intensive enterprises according to claim 1, wherein, Based on the preprocessing result, perform feature selection and construction, including: Use Pearson correlation coefficient and Spearman rank correlation coefficient to analyze the correlation between features in the preprocessing result and work infringement events; Select target features from the preprocessing result based on the correlation analysis result; For the classification variables in the preprocessing result, use chi-square test to evaluate the relevance of the target features and the target variables; Select final features from the target features based on the relevance evaluation result; Based on the final features, construct new features; the new features at least include work intensity index and safety awareness score; Use the final features and new features as the feature selection and construction result. 5.The method of predicting the invasion of floating population intensive enterprises according to claim 1, wherein, Optimize the trained migrant population intensive enterprise work infringement prediction model, including: Use K-Fold cross-validation to evaluate the stability and generalization ability of the trained migrant population intensive enterprise work infringement prediction model; Loss function adjustment: to solve the data skew problem of the trained migrant population intensive enterprise work infringement prediction model, use weighted logistic regression in the base learner of GBDT in the trained migrant population intensive enterprise work infringement prediction model to adjust the weight of positive samples; Use grid search, random search or Bayesian optimization strategy to find the optimal hyperparameter combination in the trained migrant population intensive enterprise work infringement prediction model and make corresponding settings; Monitor the AUC-ROC index on the validation set in the trained migrant population intensive enterprise work infringement prediction model, and stop training when the performance of the AUC-ROC index no longer improves significantly. 6.The method of predicting the invasion of floating population intensive enterprises according to claim 1, wherein, After training the migrant population intensive enterprise work infringement prediction model based on the feature selection and construction result and using the gradient boosting decision tree as the base model, the method further includes: Use multiple evaluation indexes to evaluate the model performance of the trained migrant population intensive enterprise work infringement prediction model. 7.The method of predicting the invasion of floating population intensive enterprises according to claim 1, wherein, After performing the migrant population intensive enterprise work infringement prediction task based on the optimized migrant population intensive enterprise work infringement prediction model, the method further includes: Establish a user feedback mechanism to collect problems and suggestions in actual application; Collect new target data regularly and update the model training set; According to the problems and suggestions in practical application and the updated model training set, the optimized migrant population intensive enterprise work infringement prediction model is retrained and optimized.