Quantification of risk improvement and automatic machine learning risk prediction method for shipbuilding accidents

By improving the normalized risk index and the compound incremental risk assessment method, and combining them with an automated machine learning framework, the problems of multi-valued variable quantification bias and data imbalance in ship repair and construction accident risk prediction have been solved, achieving high-precision and interpretable risk prediction and supporting enterprise safety management.

CN122155445APending Publication Date: 2026-06-05SHANGHAI MARITIME UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI MARITIME UNIVERSITY
Filing Date
2026-05-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies cannot effectively address the problems in ship repair and construction accident risk prediction, such as the neglect of potential risks of near misses, quantification bias of multi-valued variables, severe imbalance of dataset categories, binning of continuous variables, and low efficiency of manual optimization of model parameters, resulting in insufficient prediction accuracy and interpretability.

Method used

By employing the Improved Normalized Risk Index (INRI) and Compound Incremental Risk Assessment (CIRA) methods, combined with the Automated Machine Learning (AutoML) framework, and through data cleaning, binning, and model optimization, we achieve high-precision and interpretable prediction of accident injury risks.

Benefits of technology

It achieves comprehensive and forward-looking risk quantification, eliminates quantification bias, improves the model's prediction accuracy and interpretability, and provides scientific safety management data support for shipbuilding and repair enterprises.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122155445A_ABST
    Figure CN122155445A_ABST
Patent Text Reader

Abstract

The application provides a ship repair accident risk improvement quantification and automatic machine learning risk prediction method, and relates to the technical field of ship repair safety management and accident risk prediction. The method comprises the following steps: extracting independent variables and dependent variables from a ship repair enterprise accident database and performing data cleaning; using an improved normalized risk index method to quantify the accident injury severity, obtaining a risk value; after the continuous independent variables service length and temperature are binned, using a composite incremental risk assessment method to integrate the multi-value field risk in a single record, and calculating the risk coefficient value of each record; taking the obtained risk value and risk coefficient value as input features, constructing an AutoML model, and screening out an optimal model; and using the optimal model to predict the accident injury risk of the ship repair enterprise. Through the ship repair accident risk quantification system, the method can effectively help enterprises reduce accident injury risk and improve the whole-process safety early warning and prevention and control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ship repair and construction safety management and accident risk prediction technology, specifically to an improved quantitative method for ship repair and construction accident risk and an automatic machine learning method for risk prediction. Background Technology

[0002] Due to the complex working environment and widespread distribution of hazards in the shipbuilding and repair industry, the consequences of accidents vary significantly, making accident risk prediction a core aspect of safety management for shipbuilding companies. Currently, accident risk prediction in the industry primarily relies on traditional statistical models and human experience, but this has revealed numerous technical limitations in practical applications. Furthermore, the industry adaptability of automated machine learning (AutoML) technology remains significantly insufficient, failing to meet the high-precision and scientific risk prediction needs of shipbuilding and repair companies. Specific problems manifest in the following four aspects: First, traditional methods do not pay enough attention to the potential personal injury risk of near misses, usually excluding them from the quantitative framework, leading to an underestimation of risk. Second, multi-valued variables in accident data, such as multiple participants, multiple injury sites, and multiple accident causes, are difficult to quantify accurately. Although common splitting methods can preserve individual characteristics, as the number of multi-valued fields increases, it will cause data explosion or information loss, introducing evaluation bias. Third, the dataset is severely imbalanced, with few samples of serious injury and death, resulting in low prediction accuracy for minority classes. Fourth, the binning method for continuous variables and the risk calculation parameters have a significant impact on the model, and manual parameter tuning is inefficient and easily affected by subjective bias.

[0003] While AutoML (Automated Machine Learning) technology can automate algorithm selection and hyperparameter optimization, its existing research results have not fully incorporated the industry-specific characteristics of shipbuilding and repair accident data. It has not designed dedicated risk preprocessing schemes for issues such as potential risks of near misses, cumulative effects of risks from multi-valued variables, and interactions of high-dimensional nonlinear features. As a result, when it is directly applied to the shipbuilding and repair industry, there is still considerable room for improvement in the model's prediction accuracy and interpretability.

[0004] In summary, existing technologies cannot effectively solve the technical problems in predicting ship repair and construction accident risks. The industry urgently needs an automated risk quantification and prediction method that combines industry data characteristics with comprehensiveness and scientific rigor to provide reliable technical support for enterprises' accident injury risk early warning and prevention. Summary of the Invention

[0005] This invention addresses the technical problems in existing shipbuilding and repair enterprise accident risk prediction technologies, including the neglect of potential risks from near misses, quantification bias of multi-valued variables, severe imbalance in dataset categories, low efficiency and significant subjective bias in manual optimization of continuous variable binning and model parameters, and insufficient prediction accuracy and interpretability due to the incompatibility of existing AutoML technology with the specific characteristics of shipbuilding and repair accident data. This invention provides an improved quantification and automated machine learning method for shipbuilding and repair accident risk prediction. This method proposes two risk quantification methods: the Improved Normalized Risk Index (INRI) and the Composite Incremental Risk Assessment (CIRA), and integrates an AutoML framework to solve the aforementioned technical problems. This achieves high-precision and interpretable prediction of accident injury risks, providing data and theoretical support for the safety management of shipbuilding and repair enterprises.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: An improved quantitative and automated machine learning method for predicting ship repair and construction accident risks includes the following steps: Independent and dependent variables were extracted from the accident database of shipbuilding and repair enterprises and the data was cleaned. The dependent variable is the severity of accident injury. The severity of the accident injury was quantified using the Improved Normalized Risk Index (INRI) method to obtain the INRI risk value; After binning the continuous independent variables of service years and temperature, the Composite Incremental Risk Assessment (CIRA) method is used to integrate the risks of multi-valued fields in a single record and calculate the CIRA risk coefficient value for each record. The obtained INRI risk value and CIRA risk coefficient value are used as input features to build an AutoML model based on the PyCaret framework, and the optimal model is selected. The optimal model selected is used to predict the accident injury risk of shipbuilding and repair enterprises, and outputs the probability of injury occurrence, the risk value of severity, the importance ranking of key influencing factors, and the visualization analysis results.

[0007] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for improving the quantification of ship repair and construction accident risks and for automatic machine learning risk prediction.

[0008] Compared with the prior art, the beneficial effects of the present invention are: 1. Improve the risk quantification system to fill the gaps in traditional assessments and achieve comprehensive and accurate risk measurement. The innovative Improved Normalized Risk Index (INRI) breaks through the limitations of traditional methods that only focus on actual injury accidents. Based on international standards, it includes near misses in the quantification of potential personal injury risks, while refining the classification of events without personal injury to avoid data folding in low-frequency risk categories. By unifying the risk value scale from 0 to 100, it enables intuitive horizontal comparisons of different injury consequences and accident types, solving the problem of risk underestimation caused by the neglect of potential risks of near misses in traditional methods, and significantly improving the comprehensiveness and foresight of risk assessment.

[0009] 2. Overcome the challenges of handling multi-valued variables, eliminate quantification bias, and align with actual accident risk patterns. The innovative Composite Incremental Risk Assessment (CIRA) method specifically addresses the difficulty in quantifying multi-valued fields such as multiple injuries, injuries to multiple body parts, and multiple causes in ship repair and construction accident data. It avoids the drawbacks of data explosion or information loss caused by traditional splitting processing. By combining the weighted composite of mean and maximum values, and optimizing with a nonlinear incremental cumulative function and dual adjustment factors, it accurately simulates the nonlinear superposition and diminishing marginal effects of multi-valued risks. At the same time, it is equipped with multiple continuous variable binning schemes to scientifically integrate the risk contribution of multi-valued information, effectively eliminating the assessment bias caused by traditional quantification methods, and making the risk calculation results more consistent with the actual accident occurrence patterns.

[0010] 3. Optimize the entire modeling process, overcome the data imbalance problem, and improve model accuracy and efficiency. Leveraging the PyCaret AutoML framework, the entire modeling process is automated. Combined with the SMOTE optimization oversampling strategy, it specifically addresses the extreme class imbalance caused by the scarcity of high-risk samples such as serious injury and death in accident data, preventing the model from tilting towards the majority class and significantly improving the prediction accuracy for a few key high-risk events. Simultaneously, through Bayesian optimization and 10-fold cross-validation, it automatically completes algorithm selection, hyperparameter tuning, and model evaluation, overcoming the shortcomings of traditional manual parameter tuning, which is inefficient and prone to subjective bias. It balances model generalization ability and modeling efficiency. Empirical verification shows that the optimal regression model has an R² of 0.8638, and the optimal classification model has an F1 score of 0.8771, with prediction accuracy significantly superior to traditional statistical and conventional machine learning models.

[0011] 4. Identify core risk factors, enhance the interpretability of results, and empower enterprises' actual safety management. By accurately identifying the location of injury, accident type, and cause of the accident through feature importance analysis, and combining this with visualized analysis results, the interpretability of the model is greatly improved. It can directly output results such as the probability of injury occurrence, risk value, and ranking of key factors, providing scientific and accurate data support for shipbuilding and repair companies to conduct targeted hazard investigation, risk classification and control, and safety decision optimization. It has strong engineering application value, effectively helping companies reduce the risk of accident injuries and improve the whole-process safety early warning and control system.

[0012] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0013] Figure 1 This is a flowchart of the improved quantitative and automatic machine learning risk prediction method for ship repair and construction accident risks provided by the present invention. Figure 2 This is a schematic diagram illustrating the evaluation results of the prediction model under different binning methods for continuous variables provided by this invention; Figure 3 This is a schematic diagram of the ROC (Reverse Oscillator) model for the imbalanced dataset provided by this invention. Figure 4 This is a schematic diagram of the tree depth and cross-validation score in the ERT model provided by this invention; Figure 5 This is a schematic diagram illustrating the impact of the number of features on the model prediction score provided by this invention; Figure 6 This is a schematic diagram of the confusion matrix of the classification prediction model provided by the present invention; Figure 7 This is a schematic diagram illustrating the statistical importance of features in the regression and classification models provided by this invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings, so as to more clearly understand the purpose, features and advantages of this invention. It should be understood that the embodiments shown in the drawings are not intended to limit the scope of this invention, but are only for illustrating the essential spirit of the technical solutions of this invention. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0015] Unless the context requires otherwise, throughout the specification and claims, the word “comprising” and its variations, such as “including” and “having”, shall be understood to have an open, inclusive meaning, that is, to be interpreted as “including, but not limited to”.

[0016] Throughout this specification, references to "an embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Therefore, the appearance of "in an embodiment" or "an embodiment" in various places throughout the specification does not necessarily refer to the same embodiment. Furthermore, a particular feature, structure, or characteristic may be combined in any manner in one or more embodiments.

[0017] The singular forms “a” and “the” used in this specification and the appended claims include plural references unless otherwise expressly stated herein. It should be noted that the term “or” is generally used to mean “and / or” unless otherwise expressly stated herein.

[0018] In the following description, in order to clearly demonstrate the structure and working method of the present invention, a number of directional terms will be used. However, terms such as "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", and "down" should be understood as convenient terms and not as limiting terms.

[0019] The implementation details of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following content is only for the convenience of understanding the implementation details and is not necessary for implementing this solution.

[0020] The following detailed description, using specific embodiments, illustrates a method for improving the quantification of ship repair and construction accident risks and for automatic machine learning-based risk prediction according to the present invention. This embodiment uses the SRBAD accident database constructed by a ship repair and construction company as the data source. SQL query tools and the Python programming language are employed for data extraction and processing. The model is built based on the PyCaret automatic machine learning framework (Python version 3.8.12, PyCaret version 3.3.2). The computing environment consists of an Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz processor, a Windows 11 64-bit operating system (8 GB memory, 477 GB storage), and an NVIDIA GPU (NVIDIA-SMI 531.14, CUDA 12.1). The entire implementation process strictly adheres to the data-driven principle, ensuring the scientific validity, repeatability, and engineering applicability of the method through systematic preprocessing, risk quantification, dataset generation, imbalance handling, and AutoML optimization.

[0021] like Figure 1The specific technical solution of the present invention is as follows: S1. Data extraction and preprocessing; This embodiment uses the national standard severity of injury as the core benchmark and selects variables that are significantly correlated with the severity of accident injury from the SRBAD accident database of shipbuilding and repair enterprises as the basic features for risk prediction modeling. At the same time, it also takes into account the coverage of variables across multiple dimensions such as accident personnel characteristics, environmental factors, working conditions, and accident performance.

[0022] First, through univariate analysis and backward stepwise binary logistic regression, 11 core variables with significant impact on the severity of accident injuries were identified: employment type, hazardous work approval, gender, education level, season, peak hours, non-working days, accident type, location, length of service, and temperature. To more comprehensively capture the multidimensional characteristics of accidents, in addition to the above 11 core variables, five variables directly related to accidents—job type, injured body part, injury mode, accident cause, and work type—were further incorporated, forming a preliminary set of variables to be analyzed that includes various accident-related characteristics.

[0023] The set of variables to be analyzed also includes a departmental variable, a scenario characteristic variable reflecting the departmental attributes of the accident-occurring operation. While a feasibility analysis for modeling this variable should have been conducted, it exhibits significant quality issues in the actual data: different shipbuilding and repair companies have inconsistent naming conventions for departments with the same functions (e.g., electromechanical-related departments are named "Electromechanical Workshop," "Electromechanical Work Area," and "Electromechanical Department"), directly leading to extremely high data sparsity for this variable. Even after merging and classifying departments with the same functions, the variable still retains 47 unique values. Excessive category diversity significantly increases the complexity of modeling and analysis, easily leading to the risk of model overfitting, and interfering with model training efficiency and the interpretability of results. Therefore, this embodiment removes the departmental variable from the set of variables to be analyzed.

[0024] After the above screening and elimination, the final basic dataset for modeling was determined to contain 16 independent variables and 1 dependent variable: the independent variables are employment type, hazardous operation approval, gender, education level, season, peak time, non-working day, accident type, location, length of service, temperature, job type, injured part, injury mode, operation type, and accident cause; the dependent variable is the national standard injury severity.

[0025] This dataset records incidents as events, with each record fully encompassing multi-dimensional information related to the incident. Subsequent standardized data cleaning processes were performed, including removing missing values ​​and handling outliers, ultimately creating a high-quality dataset directly usable for subsequent risk quantification and model building. This provides a reliable data foundation for the successful implementation of INRI and CIRA methods, ensuring the accuracy of risk assessment and the stability of model training.

[0026] S2. Dependent Variable Risk Quantification – Implementation of the Improved Normalized Risk Index (INRI) Method; Traditional methods classify accident injuries into five categories: no personal injury, minor injury, slight injury, serious injury, and death, often neglecting the potential risks in no personal injury. To more comprehensively reflect the complexity of accident injuries, this embodiment further subdivides no personal injury into two categories: (1) equipment and property damage and environmental pollution; (2) near misses (including events without actual injury but with emergency bandaging or medical treatment). This subdivision allows the risk quantification framework to cover a wider range of accident consequence types.

[0027] The inclusion of near misses is based on reliable international standards and professional frameworks: According to clause 3.35 of ISO 45001:2018(E), a near miss is an event that does not cause personal injury or health damage but has the potential to lead to such consequences; referring to the Patient Safety Terminology Framework, near misses may avoid actual impact due to timely intervention or protective measures, but their potential threat to personal health cannot be ignored. Therefore, this embodiment explicitly includes near misses in the category of potential personal injury risks, thereby compensating for the shortcomings of traditional methods in paying insufficient attention to potential risks of events without personal injury, and improving the comprehensiveness and foresight of risk assessment.

[0028] The INRI method proposed in this embodiment integrates accident frequency and injury severity and amplifies them by 100 times to achieve a direct comparison of different risk categories within a unified range of 0 to 100. The specific calculation formula is as follows: in, The normalized risk value represents the j-th type of accident injury among the variables, and its value ranges from 0 to 100. The numerical code representing the category of the variable; This represents the frequency of each type of accident injury outcome. The value represents the severity level of the accident injury in Table 1; i is the coded value of the accident injury result; the INRI classification and its corresponding severity level of accident injury are shown in Table 1.

[0029] This method not only expands the scope of risk quantification but also effectively utilizes variables that were previously difficult to incorporate into traditional binary logistic regression models due to their low frequency (such as job type, injury location, injury mode, accident cause, and work type), avoiding data folding issues and improving the comprehensiveness and accuracy of the model. Through order-of-magnitude scaling, risk values ​​become more intuitive, facilitating comparisons between different categories and subsequent modeling inputs.

[0030] S3. Multi-valued field risk composite incremental assessment – ​​Implementation of the composite incremental risk assessment (CIRA) method; To satisfy the category frequency in the above INRI formula The computational requirements necessitate converting the continuous variables of seniority and temperature into categorical variables. This embodiment designs four binning schemes: A1B1 (equal intervals for seniority + equal intervals for temperature), A1B2 (equal intervals for seniority + custom temperature), A2B1 (custom age + equal intervals for temperature), and A2B2 (custom age + custom temperature) to comprehensively examine the impact of binning methods on model performance. Figure 2 As shown, the binning performance distribution indicates that A2B1 regression is slightly better, while A1B1 / A2B2 classification is stronger. Specifically, equidistant binning divides categories based on equal-length numerical intervals; custom binning divides intervals based on the actual data distribution, industry business characteristics, etc., rather than numerical equidistant binning.

[0031] After binning and discretizing continuous variables, all features can be effectively quantified into single-category risk values ​​using the INRI method. However, for multi-valued fields in the dataset, such as multiple injuries, multiple body parts injuries, and multiple accident causes, traditional splitting methods, while preserving individual characteristics, easily lead to data explosion and a sharp increase in computational complexity as the number of multi-valued fields increases, failing to accurately reflect the actual accident characteristics of multiple risks. Therefore, this embodiment proposes the Composite Incremental Risk Assessment (CIRA) method. Based on the quantified INRI risk values, it integrates and calculates the risk information of multi-valued fields in a single record to obtain a comprehensive risk coefficient value Rc that reflects the cumulative effect of multiple values. in: = , This represents the risk coefficient value calculated using the mean. This represents the risk coefficient value calculated using the maximum value; The INRI normalized risk value represents the k-th observation corresponding to the j-th feature under a multi-valued field in a single accident record. It is a specific application of the INRI single-value quantification result in the risk integration of multi-valued fields. , This is a multi-valued cumulative increment term used to simulate the nonlinear superposition effect of risk; α (taking values ​​0, 0.1, ..., 1, a total of 11 values) is used to adjust the weights of the mean and maximum value, achieving a dynamic balance between global average risk and extreme risk. When α=0, it completely depends on the mean (emphasizing overall risk), and when α=1, it completely depends on the maximum value (emphasizing extreme high risk). A step size of 0.1 can clearly distinguish experimental groups with different weight ratios and can clearly find the optimal weight balance point. If the step size is too small (such as 0.05), it will increase the experimental workload without significantly improving accuracy; β (taking values ​​0, 0.05, ..., 1, ..., 1) is used to adjust the weights of the mean and maximum value, achieving a dynamic balance between global average risk and extreme risk. The method uses 21 different values ​​(0.1, 0.15, 0.2, ..., 1) to control the marginal decrease in risk increment, providing a more nuanced understanding of the nonlinear superposition of risks. This requires finer step sizes: β determines the rate of risk accumulation for multi-valued fields (multiple injuries, multiple body parts injuries, etc.), and subtle changes in the marginal decrease pattern directly affect the accuracy of risk coefficient calculation. A step size of 0.05 can more accurately capture the optimal marginal decrease, matching the complex cumulative characteristics of multi-valued risks in ship repair and construction accidents; n represents the number of times a category occurs (including repetitions); upper bound constraints ensure reasonable results and avoid extreme amplification. This method effectively captures the nonlinear superposition effect of multi-valued accumulation, more closely reflecting real-world accident scenarios (such as nonlinear risk growth when multiple people are involved).

[0032] After completing the binning of continuous variables and setting the values ​​of the adjustment factors in the CIRA method, based on 11 values ​​of α and 21 values ​​of β, and combined with 4 binning combination schemes for years of service and temperature, a total of 924 risk quantification datasets were generated through cross-combination. This provided rich and diverse input samples for the subsequent selection of algorithms and optimization of hyperparameters in the AutoML model, ensuring the comprehensiveness of model optimization.

[0033] Meanwhile, this embodiment also compared and verified six different multi-valued risk calculation methods. The experimental results are shown in Table 2. Among them, the composite mean-maximum increment method proposed in this embodiment achieved the best evaluation index in both regression and classification prediction tasks, which is significantly better than the simple mean method, the maximum value method, the composite mean-maximum method, the mean increment method, and the maximum value increment method. This fully demonstrates that the increment mechanism can more scientifically capture the risk accumulation effect of multi-valued fields, further optimize the performance of risk quantification, and lay a more accurate risk feature foundation for subsequent modeling.

[0034] S4. Handling imbalanced datasets; The distribution of accident injury severity exhibits extreme imbalance, with severely injured and fatal cases accounting for a very low percentage. This imbalance leads to poor prediction performance for the minority class. On the unprocessed dataset, the area under the ROC curve (AUC) of most classification models is below 0.9, with the AUC for class 4 (corresponding to severely injured cases) being only 0.23 (e.g., ...). Figure 3 As shown, the ROC curves indicate that the models are almost indistinguishable.

[0035] This embodiment employs the SMOTE synthetic minority class oversampling technique, comparing two strategies: Strategy ① oversampling only the minus class; and Strategy ② oversampling all classes below the majority class while keeping the majority class unchanged. Experimental results (as shown in Table 3) demonstrate that Strategy ② significantly outperforms Strategy ①. For CatBoost and other models, AUC increases from 0.7371 to 0.8801, and F1 score increases from 0.7307 to 0.8669; RF and ERT models also show substantial improvements. This strategy effectively alleviates the imbalance problem, enhances the model's ability to distinguish between a minority of high-risk classes, and ensures the reliability of predictions for critical events such as serious injury / death. F1 score is a core evaluation metric for machine learning classification tasks. S5 and AutoML model construction, optimization and experimental results analysis; Based on the PyCaret framework, candidate ensemble algorithms were used, including linear models (Linear Regression (LiR), Elastic Network (EN), Logistic Regression (LR), Linear Discriminant Analysis (LDA), tree models (Decision Tree (DT), Random Forest (RF), Extremely Random Tree (ERT), ensemble boosting models (Gradient Boosting, XGBoost, AdaBoost, LightGBM, CatBoost), and other comparative models (Support Vector Machine (SVM), K-Nearest Neighbors (KNN), Naive Bayes (NB). Bayesian hyperparameter optimization was employed, along with 10-fold cross-validation. The dataset was split into training and test sets in a 7:3 ratio.

[0036] A comparison of regression and classification tasks (as shown in Table 4) reveals that both performed exceptionally well: For the regression task, the minimum MSE was 41.2985, the maximum was 188.5626, and the average was 52.6315; the minimum R² was 0.7586, the maximum was 0.8638, and the average was 0.8538. For the classification task, the minimum AUC was 0.7793, the maximum was 0.8807, and the average was 0.8695; the minimum F1 score was 0.7760, the maximum was 0.8771, and the average was 0.8650. Depending on the research objectives, the task type can be flexibly selected: regression is suitable for predicting continuous risk values, while classification is suitable for grading discrete severity levels.

[0037] The analysis of the effects of binning and adjustment factors showed (e.g.) Figure 2As shown in the figure): the performance distribution is stable under the four binning schemes. The A2B1 scheme has a slightly better regression R² median of 0.8540 and MSE median of 52.4648. The A1B1 and A2B2 schemes have higher classification AUC / F1. The overall differences are small, but they reflect the advantages of custom binning in capturing nonlinear features.

[0038] A comparison of six risk calculation methods (as shown in Table 2) shows that the composite mean-maximum increment method achieves the best performance in both regression (R²=0.8638, MSE=41.2985) and classification (AUC=0.8807, F1=0.8771), proving that the increment mechanism further optimizes the performance and is superior to the simple mean, maximum or no increment method.

[0039] The optimal regression model is an Extremely Randomized Tree (ERT): binning A2B1, α=0.9, β=0.10, R²=0.8638, MSE=41.2985. Key parameters include n_estimators=100, max_depth=8, bootstrap=False, etc. (as shown in Table 5). The tree depth optimization curve is shown (e.g.) Figure 4 As shown in the figure), at a depth of 8, the training and validation scores are well balanced, avoiding overfitting; the influence curve of the number of features is shown (e.g. Figure 5 As shown in the figure, more than 10 features contribute very little, demonstrating the efficiency of the model.

[0040] The optimal classification model is CatBoost: binning A2B2, α=0.1, β=0.60, F1=0.8771, AUC=0.8807. Key parameters include iterations=1000, learning_rate=0.083, depth=6, etc. (as shown in Table 6). The confusion matrix is ​​displayed (e.g., Figure 6 As shown), the prediction accuracy is high for a very small number of classes (serious injury / death), the distinction between no injury and near miss is excellent, and the distinction between minor injury and slight injury is difficult (which is consistent with the actual boundary ambiguity).

[0041] S6. Application of feature importance analysis and risk prediction.

[0042] Feature importance analysis shows (e.g.) Figure 7As shown in the regression model, the injury site had the highest importance (0.6809), followed by the accident type (0.1151), while other features (such as injury mode, work approval, and peak hours) were below 0.05. In the classification model, the injury site had the highest importance (30.92), followed by the accident type (9.89) and the accident cause (9.00), with the importance gradually decreasing for injury mode, job type, and season. Gender, temperature, length of service, and employment type had the lowest importance. These results clarify the key points of risk prevention and control: the injury site and accident type ranked first in both tasks and were the core influencing factors.

[0043] This method uses an optimal model to predict new accident data, outputting risk values ​​for injury severity, probability of occurrence, ranking of key factors by importance, and visualization results (such as tree depth curves, feature quantity influence curves, confusion matrices, and importance statistics). This approach supports real-time hazard identification, risk classification and control, and safety decision optimization for enterprises, demonstrating significant engineering application value.

[0044] This embodiment fully verifies the superiority of the method: INRI expands the scope of risk quantification, CIRA scientifically handles the cumulative effect of multiple values, and AutoML achieves efficient global optimization. The overall performance is significantly better than traditional methods, providing a reliable and accurate tool for accident injury risk management in shipbuilding and repair enterprises.

[0045] This invention addresses the problems in shipbuilding and repair accident risk prediction, such as neglecting near miss risk, quantification bias of multi-valued variables, data imbalance, low efficiency of manual parameter tuning, and insufficient industry adaptability of AutoML technology. It proposes an improved quantification method that integrates the Improved Normalized Risk Index (INRI) and the Composite Incremental Risk Assessment (CIRA), and integrates the PyCaret AutoML framework to construct a risk prediction method. This method first selects and cleans a basic dataset of 16 independent variables and 1 dependent variable from a shipbuilding and repair enterprise accident database. Then, it uses INRI to include near misses in the risk quantification scope and achieves a unified risk value scale of 0-100. Next, it uses CIRA combined with four continuous variable binning schemes, dual adjustment factors, and a nonlinear incremental cumulative function to scientifically handle the risk accumulation problem of multi-valued fields, generating 924 quantified datasets. Subsequently, the SMOTE oversampling strategy is used to solve the data imbalance problem. Based on the PyCaret framework, multiple algorithms are integrated, and the AutoML model is constructed and optimized through Bayesian optimization and 10-fold cross-validation. By conducting feature importance analysis to identify core risk factors, this method not only improves the quantitative system for shipbuilding and repair accident risks, overcomes the challenges of handling multi-valued variables, and resolves the data imbalance dilemma, but also significantly improves the model's prediction accuracy (the optimal regression model achieves an R² of 0.8638, and the optimal classification model achieves an F1 value of 0.8771) and modeling efficiency. Furthermore, it accurately identifies core risk factors, enhances the interpretability of prediction results, and can directly output results such as the probability of injury and risk values. This provides scientific and accurate data support for shipbuilding and repair enterprises to conduct hazard investigation, risk classification and control, and safety decision optimization. It possesses strong engineering application value and can effectively help enterprises reduce accident injury risks and improve the entire process of safety early warning and control systems.

[0046] This disclosure also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the ship repair and construction accident risk improvement quantification and automatic machine learning risk prediction method as described in the above embodiments.

[0047] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the invention by those skilled in the art without departing from the spirit and essence of the invention. Such modifications or substitutions should all fall within the scope of the invention, or any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the invention should be covered within the protection scope of the invention. Therefore, the protection scope of the invention should be determined by the scope of the claims.

Claims

1. A method for improving the quantification of ship repair and construction accident risks and predicting risks using automated machine learning, characterized in that, Includes the following steps: Independent and dependent variables were extracted from the accident database of shipbuilding and repair enterprises and the data was cleaned. The dependent variable is the severity of accident injury. The severity of the accident injury was quantified using the Improved Normalized Risk Index (INRI) method to obtain the INRI risk value; After binning the continuous independent variables of service years and temperature, the Composite Incremental Risk Assessment (CIRA) method is used to integrate the risks of multi-valued fields in a single record and calculate the CIRA risk coefficient value for each record. The obtained INRI risk value and CIRA risk coefficient value are used as input features to build an AutoML model based on the PyCaret framework, and the optimal model is selected. The optimal model selected is used to predict the accident injury risk of shipbuilding and repair enterprises, and outputs the probability of injury occurrence, the risk value of severity, the importance ranking of key influencing factors, and the visualization analysis results.

2. The method according to claim 1, characterized in that, The method of using the Improved Normalized Risk Index (INRI) to quantify the severity of the accident injury and obtain the INRI risk value specifically includes: The classification of accidents by severity, excluding personal injury, is further subdivided into two categories: equipment and property damage / environmental pollution and near misses. The potential injury risk of these near misses is included in the calculation, using the following formula: ; in, The normalized risk value represents the j-th type of accident injury among the variables, and its value ranges from 0 to 100. The numerical code representing the category of the variable; This represents the frequency of each type of accident injury outcome. Represents the severity level of the accident injury; i is the coded value of the accident injury result.

3. The method according to claim 2, characterized in that, The continuous independent variables, seniority and temperature, are binned using one or more of the following four combination schemes: seniority binning with equal intervals and temperature binning with equal intervals A1B1, seniority binning with equal intervals and temperature binning with custom binning A1B2, seniority binning with custom binning and temperature binning with equal intervals A2B1, and seniority binning with custom binning and temperature binning with custom binning A2B2.

4. The method according to claim 3, characterized in that, The CIRA risk coefficient value for each record is calculated using the following formula: ; Where Rc is the CIRA risk coefficient value; = , This represents the risk coefficient value calculated using the mean. This represents the risk coefficient value calculated using the maximum value; This represents the INRI normalized risk value of the kth observation item corresponding to the jth type feature under a certain multi-value field in a single accident record. , The multi-valued cumulative increment term is used to simulate the non-linear superposition effect of risk; α is used to adjust the weights of the mean and the maximum value, with a value set of {0,0.1,0.2,...,0.9,1}. When α=0, the calculation is completely dependent on the mean, and when α=1, the calculation is completely dependent on the maximum value; β is used to control the marginal diminishing effect of risk increment, with a value set of {0,0.05,0.1,0.15,0.2,…,0.95,1}. β determines the risk accumulation rate of the multi-valued field; n is the number of times the category appears.

5. The method according to claim 4, characterized in that, The candidate algorithm pool for the AutoML model includes linear models, tree models, ensemble boosting models, and other comparative models. The linear models are one or more of Linear Regression (LiR), Elastic Network (EN), Logistic Regression (LR), and Linear Discriminant Analysis (LDA). The tree models are one or more of Decision Tree (DT), Random Forest (RF), and Extremely Random Tree (ERT). The ensemble boosting models are one or more of Gradient Boosting (XGBoost), AdaBoost, LightGBM, and CatBoost. The other comparative models are one or more of Support Vector Machine (SVM), K-Nearest Neighbors (KNN), and Naive Bayes (NB).

6. The method according to claim 5, characterized in that, The process of building an AutoML model based on the PyCaret framework and selecting the optimal model includes: The SMOTE oversampling strategy is used to oversample all categories below the majority class while keeping the majority class sample size unchanged. The algorithm selection, hyperparameter tuning and 10-fold cross-validation are automatically completed through Bayesian optimization to screen out the optimal model, which includes the optimal regression model and the optimal classification model. The optimal regression model is Extremely Random Tree (ERT), and the corresponding binning scheme is a custom binning scheme based on seniority and a temperature-equidistant binning scheme A2B1, with α=0.9 and β=0.

10. The key parameters of the Extremely Random Tree (ERT) are n_estimators=100 and max_depth=8. The evaluation index of this model is R²=0.8638 and MSE=41.2985. The optimal classification model is CatBoost, with a binning scheme of custom binning based on seniority and custom binning based on temperature (A2B2), α=0.1, β=0.

60. The key hyperparameters of CatBoost are iterations=1000, learning_rate=0.083, and depth=6. The evaluation metrics of this model are F1=0.8771 and AUC=0.8807.

7. The method according to claim 1, characterized in that, The importance of the key influencing factors is ranked as follows: in the regression model, the injured site is the most important, followed by the accident type; in the classification model, the injured site is the most important, followed by the accident type and the cause of the accident.

8. The method according to claim 1, characterized in that, The visualization analysis results include one or more of the following: tree depth versus training / cross-validation score curve, the influence curve of the number of input features on the model prediction score, the confusion matrix of the optimal classification model, the statistical graph of feature importance of regression and classification models, and the model performance distribution graph under different binning schemes and adjustment factor combinations.

9. The method according to claim 1, characterized in that, The data cleaning includes removing missing values ​​and handling outliers; the independent variables include one or more of the following: employment type, hazardous operation approval, gender, education level, season, peak time, non-working day, accident type, location, length of service, temperature, job type, injured part, injury mode, operation type, and accident cause; the multi-value fields include one or more of the following: multiple injuries, multiple injuries to multiple parts of the body, and multiple accident causes.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the ship repair and construction accident risk improvement quantification and automatic machine learning risk prediction method as described in any one of claims 1 to 9.