Network freight platform freight guarantee product accident behavior prediction method and system based on interpretable machine learning

By applying interpretability machine learning methods on the online freight platform, identifying the importance of order characteristics and predicting hazard behavior, the problem of the failure of the existing technology to identify risk factors and predict vehicle hazard behavior is solved, and fast and accurate hazard risk prediction and model interpretability enhancement is achieved.

CN119903967APending Publication Date: 2025-04-29UNIV OF SCI & TECH OF CHINA +2
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202510087674.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The prior art cannot identify the risk factors affecting the risk of small-scale cargo damage protection orders, and cannot predict the vehicle risk behavior of a certain order, especially when it is difficult to obtain driver driving behavior data.

Method used

Using an interpretability machine learning method, a variety of machine learning prediction models are constructed by obtaining original sample data from the online freight platform for feature classification, preprocessing and feature selection, and combining interpretability analysis methods to identify the importance of order characteristics and predict hazard behavior.

Benefits of technology

It realizes the rapid and accurate prediction of the risk of product orders of freight on the online freight platform in the absence of driver driving behavior data, saves manpower and time costs, and enhances the interpretability of the model, and supports pricing strategy optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903967A_ABST
    Figure CN119903967A_ABST
Patent Text Reader

Abstract

The invention provides a network freight platform freight guarantee product accident behavior prediction method based on interpretable machine learning, and the method comprises the following steps: S1, obtaining original sample data and a corresponding historical accident result from a network freight platform; s2, preprocessing original sample data and dividing a data set; s3, undersampling processing is carried out based on the preprocessed data; s4, performing feature selection based on the processed prediction sample data; s5, constructing, training and testing a plurality of machine learning prediction models; s6, comparing and evaluating a plurality of machine learning prediction models, and determining an optimal prediction model; and S7, processing the prediction request by the optimal prediction model, and returning a prediction result. The network freight platform freight guarantee product accident behavior prediction system based on interpretable machine learning comprises a data receiving module and a prediction module, and the prediction module comprises the optimal prediction model obtained in the step S6.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of risk behavior prediction of freight protection products on freight platforms, and specifically to a method and system for predicting risk behavior of freight protection products on network freight platforms based on explainable machine learning. Background Art

[0002] With the application of Internet technology and big data, the resources of the logistics industry have been integrated, accelerating the development of online freight platforms. On the online freight platform, cargo owners, logistics companies and drivers can use the platform to match and set prices independently. In the process of cargo transportation, due to the driving of the driver and the characteristics of the cargo itself, small cargo damage often occurs. Due to the limitation of deductibles, traditional insurance often causes drivers to bear large freight losses, which in turn leads to the loss of drivers on the platform. In order to reduce the driver's freight loss and establish a benign cooperative relationship between drivers and logistics companies, and then create a benign logistics ecosystem with truck drivers as the core, as one of the largest online freight platforms in the country, LuGe Group and Insurance Company have specially launched a small freight protection business for drivers, namely freight protection insurance. The platform integrates the data of cargo owners, logistics companies and drivers, and can price insurance products by detecting the driver's behavior data on the platform, and drivers can make decisions on whether to purchase products based on their own needs. If the driver suffers cargo damage after purchasing insurance, the platform can pay for it; otherwise, the driver will bear it himself.

[0003] Considering the benefits of freight guarantee service, there are currently two problems in the operation of this service:

[0004] 1. Failure to identify risk factors that affect the occurrence of small-value cargo damage insurance orders;

[0005] 2. It is impossible to predict the vehicle accident behavior of a certain order.

[0006] In addition, the current vehicle accident prediction uses historical data and statistical methods to predict the probability of insurance claims for vehicles in the future. Current research technologies are mainly concentrated in the fields of data mining, machine learning, and big data analysis. Researchers usually use multi-source data such as historical accident records of vehicles, driver behavior data, vehicle status information, environmental factors, and traffic conditions to identify high-risk individuals or groups by building risk assessment models (patent document numbers: CN 109784586 A; CN 112381314A; CN 118395262 A). These models may include logistic regression, decision trees, random forests, support vector machines, neural networks, and ensemble learning methods.

[0007] Therefore, the current vehicle accident prediction method usually needs to use multi-source data such as the vehicle's historical accident records, driver behavior data, vehicle status information, environmental factors, and traffic conditions, and build a risk assessment model to identify high-risk individuals or groups. However, in the actual application field, the above data requires a prerequisite, that is, the vehicle has been installed with a certain driving behavior detection and recording device to obtain the above information. However, in the actual application field, only a very small number of vehicles will be installed with similar recording devices. Therefore, it is difficult for companies that launch freight guarantee services to obtain relevant data and make vehicle accident predictions. In addition, the current vehicle accident prediction does not take into account the data characteristics of the platform, such as: the characteristics of the transport project, the characteristics of the transported goods, the historical characteristics of the driver, etc. Therefore, the vehicle accident prediction made cannot fully and comprehensively portray the accident behavior that may be caused by order environment factors such as project characteristics or transported goods characteristics. Summary of the invention

[0008] In order to solve the technical problems existing in the background technology, the present invention proposes a method and system for predicting the risk behavior of freight insurance products on an online freight platform based on explainable machine learning.

[0009] The method for predicting the risk behavior of freight protection products on a network freight platform based on explainable machine learning proposed in the present invention comprises the following steps:

[0010] S1. Obtain original sample data and corresponding historical accident results from the online freight platform, and classify the obtained original sample data into features as candidate fields for the subsequent feature selection process;

[0011] S2. Preprocessing of original sample data and division of data sets

[0012] Extract the orders of the freight insurance product purchased from the original sample data obtained in step S1, clean and filter the extracted order data to delete the order data with missing values, convert the text classification data into numeric type so that it can be accepted by the machine learning algorithm, and perform binary classification marking on the corresponding historical insurance results;

[0013] S3. Undersampling based on preprocessed data

[0014] Perform random undersampling so that the ratio of accident samples to non-accident samples is 1:1, and use the above results to form a complete and standard-formatted prediction sample data set, and extract part of the sample data from the formed prediction sample data set as a training set, and use the rest of the sample data as a test set;

[0015] S4. Feature selection based on the processed prediction sample data

[0016] Based on the above prediction sample data set, a variety of machine learning algorithms are used to build a prediction model, and the marginal contribution of each feature parameter to the prediction result of the machine learning model is calculated to obtain the feature importance ranking, and the most important features are selected to be retained as the input features of the subsequent prediction model;

[0017] S5. Construction, training and testing of various machine learning prediction models

[0018] A new prediction sample data set is extracted based on the features selected in step S4, and part of the sample data is extracted from the new prediction sample data set as a new training set, and the rest of the sample data is used as a new test set; and based on the new training set and test set, multiple machine learning prediction models are constructed, and then the optimal hyperparameter combination of each prediction model is determined, and then the training and testing of each prediction model are respectively performed, and finally the prediction results of the freight insurance product of each model are output;

[0019] S6. Comparative evaluation of multiple machine learning prediction models

[0020] Based on the preset model evaluation method, compare and analyze the prediction accuracy and generalization of various machine learning prediction models to determine the optimal prediction model;

[0021] S7. The optimal prediction model obtained in step S6 processes the prediction request and returns the prediction result. The returned prediction result includes the prediction of the accident outcome of the order and the separate prediction of each characteristic accident behavior factor in the order.

[0022] Preferably, in S1, the feature classification includes at least three major categories: "driver features", "vehicle features" and "order features".

[0023] Preferably, the "driver characteristics" class includes at least the following fields: driver's mobile phone number, driver's name; the "vehicle characteristics" class includes at least the following fields: license plate number, vehicle model; the "order characteristics" class includes at least the following fields: project ID, secondary classification of goods, origin, destination, mileage, and order creation time.

[0024] Preferably, in S2, the text-based classification features use LabelEncoder to encode the categorical data of the string type into numerical data so that it can be accepted by the machine learning algorithm.

[0025] Preferably, in S3, random undersampling is performed using the RandomUnderSampler function in the imbalanced-learn library.

[0026] Preferably, in S3, the extraction of training set sample data is completed using the train_test_split function.

[0027] Preferably, the proportion of the training set in the sample data is greater than the proportion of the test set in the sample data.

[0028] Preferably, in S4, the marginal contribution of each feature parameter to the prediction result of the machine learning model is calculated by the feature_importances_ function built into the model.

[0029] Preferably, in S5, the extraction of new training set sample data is completed using the train_test_split function.

[0030] Preferably, the proportion of the new training set in the new sample data is greater than the proportion of the new test set in the new sample data.

[0031] Preferably, in S6, the model evaluation method includes:

[0032] Obtain multiple prediction results of multiple machine learning prediction models; determine the accuracy, precision, recall and F1 score of each prediction model based on the multiple prediction results; determine the optimal prediction model based on the accuracy, precision, recall and F1 score of each prediction model.

[0033] Preferably, the method further includes: S8, multi-method interpretability comparative analysis and risk factor weighting based on the optimal prediction model, the specific method is as follows:

[0034] A variety of explainable analysis methods are used to obtain the importance ranking results of each feature parameter in predicting the risk of freight insurance products, and a comparative analysis is performed. If the comparative analysis results meet certain conditions, it is determined that the importance ranking results of feature parameters obtained by different methods are similar, thereby determining a final feature parameter importance ranking result, and based on this result, the weighted result of the risk factor of the freight insurance product risk behavior is generated and fed back to the pricing strategy formulation department of the online freight platform for feedback guidance on the formulation and optimization of the overall basic price of freight insurance products based on the project side.

[0035] The invention discloses a network freight platform freight insurance product risk behavior prediction system based on explainable machine learning, comprising: a data receiving module and a prediction module;

[0036] The data receiving module is used to receive the data input by the user, and to check the validity of the received data, and to transmit the checked valid data to the prediction module;

[0037] The prediction module contains the optimal prediction model obtained in the above step S6. The prediction module automatically calls its internal prediction model to process the prediction request based on the received data and returns the prediction result. The returned prediction result includes the prediction of the accident outcome of the order and the separate prediction of each characteristic accident behavior factor in the order.

[0038] The invention discloses a method for developing a prediction program for risk behavior of a freight insurance product based on an optimal prediction model, comprising the following steps:

[0039] The optimal prediction model obtained in step S6 is saved as a model file, and after being loaded using the HTML program code, a web-based program for predicting the accident of the freight insurance product is obtained, and the program is enabled to automatically call the saved prediction model according to the parameter data input by the user, and the freight insurance product accident prediction result is obtained after calculation by the prediction model. The obtained freight insurance product accident prediction result includes a prediction of the accident result of the order and a separate prediction of each characteristic accident behavior factor in the order.

[0040] In the context of factors such as driver driving behavior being difficult to obtain, the present invention can use machine learning algorithms to identify risk factors and predict the risk of the order based on the order features recorded by the platform, including: project ID, order ID, driver ID, project_driver_historical cumulative number of waybills, cargo name, secondary classification of cargo, vehicle type, mileage, order creation time, origin, destination, etc., and interpret and analyze the importance of features, so that the platform can accurately identify the risk of the order. Compared with the prior art, the present invention has the following advantages:

[0041] 1. Use machine learning methods to achieve rapid and accurate prediction of the risks of freight insurance products on online freight platforms. The risk of an order can be determined without conducting other experiments, greatly saving manpower and time costs;

[0042] 2. Feature selection is performed on the feature parameters recorded at the platform level using feature engineering based on machine learning, which avoids the need for special hardware devices for recording driver and vehicle feature data in traditional accident prediction solutions, making the present invention more practical;

[0043] 3. In view of the weak interpretability of traditional machine learning methods, the present invention combines the freight insurance product risk prediction model with a variety of interpretability analysis methods to overcome the weak interpretability of traditional machine learning methods, fully understand the prediction results of the freight insurance product of the network freight platform of the machine learning model, obtain the importance ranking of feature parameters, and enhance the interpretability of the model;

[0044] 4. It can determine the importance of order characteristics in the prediction model from a qualitative perspective, so as to provide effective feedback guidance for the optimization of pricing strategies of online freight platforms in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flowchart of a method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning proposed by the present invention;

[0046] Figure 2 This is a module diagram of the risk behavior prediction system for freight protection products on a network freight platform based on explainable machine learning proposed by the present invention;

[0047] Figure 3 This is a schematic diagram of the wage deviation of the risk behavior prediction system for freight protection products of an online freight platform based on explainable machine learning proposed by the present invention. DETAILED DESCRIPTION

[0048] Reference Figure 1 The invention proposes a method for predicting the risk behavior of freight protection products on a network freight platform based on explainable machine learning, comprising the following steps:

[0049] S1. Obtain the original sample data and the corresponding historical accident results from the online freight platform, and divide the data fields into three categories: "driver characteristics", "vehicle characteristics" and "order characteristics" as alternative fields for the subsequent feature selection process, where: "driver characteristics" category includes at least fields: driver's mobile phone number, driver's name, etc.; "vehicle characteristics" category includes at least fields: license plate number, vehicle model, etc.; "order characteristics" category includes at least fields: project ID, secondary classification of goods, origin, destination, mileage, order creation time, etc. The original sample data obtained from the online freight platform constitutes the original sample data used to predict the accident behavior of freight insurance products; the corresponding historical accident results collected are used as the target parameter data of the data set, that is, the data label.

[0050] S2. Preprocessing of original sample data

[0051] For the original sample data obtained in step S1, the orders for the purchased freight insurance products are extracted, cleaned and filtered, and the order data with missing values ​​is deleted. For the categorical features in text form, LabelEncoder is used to encode the categorical data of string type into numerical data so that it can be accepted by the machine learning algorithm, and the corresponding historical accident results are processed by binary classification marking (that is, the accident mark is 1, and the non-accident mark is 0).

[0052] S3. Undersampling and data set division based on preprocessed data

[0053] Since the distribution of accident behaviors of freight insurance products on online freight platforms is significantly unbalanced: the number of accident samples (2.65%) is much smaller than the number of non-accident samples (97.35%), the RandomUnderSampler function in the imbalanced-learn library is used for random under-sampling, so that the ratio of the number of accident samples to the number of non-accident samples is 1:1; and the sampled data is established to form a prediction sample data set with complete data and standard format.

[0054] Use the train_test_split function to extract 70% of the sample data from the established prediction sample data set as the training set, and the remaining 30% of the sample data as the test set. The train_test_split function method can automate the process of data set division, greatly saving time, and can achieve random division by setting a random seed, thereby avoiding human preference and ensuring the randomness of the data set. The train_test_split function style is as follows:

[0055] x_train,x_test,y_train,y_test=

[0056] train_test_split(train_data,train_target,test_size,random_state,shuffle)

[0057] Among them, x_train is the characteristic parameter of the training set after division; x_test is the characteristic parameter of the test set after division; y_train is the target parameter of the training set after division; y_test is the target parameter of the test set after division; train_data is the sample characteristic parameter data set to be divided; train_target is the sample target parameter data set to be divided; test_size is the data size of the test set. If it is a floating point number between 0 and 1, it indicates the proportion of the test set. If it is an integer, it directly indicates the number of data in the test set, and the remaining data is counted in the training set; random_state is the seed of the random number, which is used to determine how the data set is randomly shuffled and divided. If a different random number seed is set each time, the train_test_split function will divide the data set into training set and test set in different ways. If the same random number seed is set each time, the same training set and test set will be obtained each time; shuffle is used to determine whether to randomly reorder the data before dividing the data set. If it is False, the original order of the sample data will not be disrupted. If it is True, the order of the sample data will be disrupted.

[0058] In this embodiment, the train_test_split function method is selected to divide the training set and the test set, and the relevant parameter settings of the function are as follows:

[0059] train_data is the feature parameter data selected in the data set;

[0060] train_target is the target parameter data, i.e., historical accident results;

[0061] test_size is 0.3; random_state is 42.

[0062] S4. Feature selection based on processed experimental sample data

[0063] Based on the prediction sample data set processed above, the prediction models are constructed using the decision tree algorithm, random forest algorithm, K-Nearest Neighbor (KNN) algorithm, and the XGBoost algorithm. The marginal contribution of each feature parameter to the prediction result of the machine learning model is calculated using the built-in feature_importances_ function of the model to obtain the feature importance ranking, and the feature importance given by the four prediction models is used to select the most important features by taking the average weight and retaining them as the input features of the subsequent prediction model. The specific number of feature selections can be 3, 4, 5, or 6....

[0064] S5. Construction, training and testing of various machine learning prediction models

[0065] Based on the features selected in step S4, a new prediction sample data set is extracted, and 70% (or 80%) of the sample data is extracted from the new prediction sample data set using the train_test_split function as a new training set, and the remaining 30% (or 20%) of the sample data is used as a new test set. Based on this new training set and the new test set, a variety of machine learning prediction models are constructed, including: decision tree prediction model, random forest prediction model, K-nearest neighbor (k-Nearest Neighbor, KNN) prediction model, and the fastest gradient boosting machine (XGBoost) prediction model. When determining the optimal hyperparameter combination of each model, grid search hyperparameter optimization is used, and the model performance corresponding to each hyperparameter combination is determined in combination with ten-fold cross validation evaluation. The optimal hyperparameter combination of each machine learning prediction model is used to train and test each prediction model, and finally the prediction results of the freight insurance product of each model are output.

[0066] S6. Comparative evaluation of multiple machine learning prediction models

[0067] Based on the binary classification model evaluation method, the prediction accuracy and generalization of various machine learning prediction models are compared and analyzed to determine the optimal prediction model. The model evaluation indicators include:

[0068] Accuracy: Accuracy refers to the ratio of correctly classified samples to the total number of samples.

[0069] Precision: Precision refers to the ratio of the number of samples correctly classified as positive examples by the classifier to the total number of samples output by the classifier as positive examples.

[0070] Recall: Recall refers to the ratio of the number of samples correctly classified as positive examples by the classifier to the total number of samples that are actually positive examples.

[0071] F1-Score: The F1-Score takes into account both precision and recall, and is the harmonic mean of precision and recall.

[0072] Evaluation index calculation method:

[0073] For a binary classification problem, the confusion matrix is ​​2x2, with 0 and 1, where each row represents the true value and each column represents the predicted value.

[0074]

[0075]

[0076] The prediction model with the highest comprehensive performance of evaluation indicators is selected as the optimal prediction model.

[0077] S7. The optimal prediction model obtained in step S6 processes the prediction request and returns the prediction result. The returned prediction result includes the prediction of the accident outcome of the order and the separate prediction of each characteristic accident behavior factor in the order.

[0078] The traditional machine learning method is more like a "black box model" and its prediction results are opaque and weakly interpretable. Therefore, the present invention conducts interpretability analysis on the prediction model, which is of great significance for users to understand the specific prediction process of the model and determine the importance ranking of each feature parameter.

[0079] In the model interpretability analysis, the key to determining the importance ranking of feature parameters is to understand the contribution of each feature parameter to the model prediction. This contribution is usually measured by different indicators, and different indicators correspond to different model interpretability analysis methods. Model interpretability analysis methods include the built-in feature_importances_ function method of the model and the SHAP (SHapley Additive exPlanations) method.

[0080] The feature_importances_ function method is usually used for tree-based models, such as decision trees, random forests, and gradient boosting trees. These models calculate the importance of feature parameters through Gini importance or information gain during training. Therefore, after the model training is completed, the feature_importances_ attribute or method can be used to obtain the importance ranking of feature parameters and identify the feature parameters that have the greatest impact on model prediction, thereby helping to understand the model's prediction process.

[0081] The SHAP method is a game theory-based method used to explain the model output results of a single prediction. It calculates the SHAP value corresponding to each feature parameter in the sample data set to clarify the marginal contribution of each feature parameter to the model prediction result. The SHAP value is the numerical value assigned to each feature parameter in the sample data set. Because for each sample in the sample data set, the prediction model will generate a prediction value, and the prediction value is obtained by adding the baseline value to the sum of the SHAP values ​​corresponding to each feature parameter. The SHAP value corresponding to each feature parameter obeys the following expression:

[0082] y i =y base +f(x i1 )+f(x i2 )+……+f(x ik )

[0083] Among them, y i is the final model prediction value of the i-th sample; y base is the benchmark value of the model, that is, the mean of all sample target parameter data in the sample data set; x i1 is the first characteristic parameter of the i-th sample, x i2 is the second characteristic parameter of the i-th sample, and so on; f(x i1 ) is x i1 The SHAP value of the ith sample is the contribution of the first feature parameter of the ith sample to the final model prediction value, f(x i2 ) is x i2 The SHAP value of , that is, the contribution of the second feature parameter of the i-th sample to the final model prediction value, and so on.

[0084] The advantage of the SHAP method is that it can provide an intuitive explanation of the influence of feature parameters on model prediction. ik )>0, it indicates that the characteristic parameter plays a positive role in the final model prediction value. On the contrary, when f(x ik)<0, it indicates that the characteristic parameter has an inverse effect on the final model prediction value, showing the positive and negative nature of the influence. In addition, the SHAP method can also be interpreted at the global and local levels. This method is applicable to various types of models, including tree models, linear models, neural networks, etc.

[0085] In this embodiment, since the determined freight insurance product accident prediction model is the fastest gradient boosting machine model, the model will calculate the importance of feature parameters during the training process and has a built-in feature_importances_ function method, the feature_importances_ function and SHAP methods are selected to perform interpretability analysis of the model to help it quickly determine the accident risk of the order and the importance ranking of the feature parameters, and guide the formulation of pricing strategies for freight insurance products based on this result.

[0086] Furthermore, it also includes: S8, multi-method interpretability comparative analysis and risk factor weighting based on the optimal prediction model, the specific method is as follows:

[0087] A variety of explainable analysis methods are used to obtain the importance ranking results of each feature parameter in predicting the risk of freight insurance products, and a comparative analysis is performed. If the comparative analysis results meet certain conditions, it is determined that the importance ranking results of feature parameters obtained by different methods are similar, thereby determining a final feature parameter importance ranking result, and based on this result, the weighted result of the risk factor of the freight insurance product risk behavior is generated and fed back to the pricing strategy formulation department of the online freight platform for feedback guidance on the formulation and optimization of the overall basic price of freight insurance products based on the project side.

[0088] Reference Figure 2-3 , the network freight platform freight protection product risk behavior prediction system based on explainable machine learning disclosed by the present invention includes: a data receiving module and a prediction module;

[0089] The data receiving module is used to receive data input by the user, and to check the validity of the received data, and transmit the checked valid data to the prediction module; specifically: the data input by the user includes one or more of "driver characteristics" data, "vehicle characteristics" data, and "order characteristics" data.

[0090] The prediction module contains the optimal prediction model obtained in the above step S6. The prediction module automatically calls its internal prediction model to process the prediction request based on the received data and returns the prediction result. The returned prediction result includes the prediction of the accident outcome of the order and the separate prediction of each characteristic accident behavior factor in the order.

[0091] The invention discloses a method for developing a prediction program for risk behavior of a freight insurance product based on an optimal prediction model, comprising the following steps:

[0092] The optimal prediction model obtained in step S6 is saved as a model file, and loaded with HTML program code to obtain the freight insurance product accident prediction web page program. The specific process is as follows:

[0093] Use a lightweight web framework Flask to create a web application and API interface; save the trained optimal prediction model to the backend service framework to process prediction requests; use the @app.route decorator to define the prediction interface, process POST requests, obtain the feature data entered by the user, perform validity checks and encoding, use the trained model to make predictions, and return the prediction results. The program can automatically call the prediction model according to the parameter data entered by the user, obtain the prediction results of the freight insurance product after calculation, and make the obtained freight insurance product prediction results include the prediction of the order's accident results and the separate prediction of each feature accident behavior factor in the order.

[0094] Since the reliability of the model has been verified in the previous steps, the developed freight insurance product accident prediction program is an effective prediction tool, providing an intuitive and convenient interface for the online freight platform to help it quickly determine the accident risk of the order and the importance ranking of the characteristic parameters, and guide the formulation of the pricing strategy of the freight insurance product based on this result. At the same time, the freight insurance product accident behavior prediction system has the advantages of convenience, speed and high accuracy, without the need to retrain the model, saving a lot of time and cost.

[0095] In summary, the present invention can identify risk factors and predict the risk of the order using a machine learning algorithm, even when factors such as the driver's driving behavior are difficult to obtain, based on the order features recorded by the platform, including: project ID, order ID, driver ID, project_driver_historical cumulative number of waybills, cargo name, secondary classification of cargo, vehicle type, mileage, order creation time, origin, destination, etc., and interpret and analyze the importance of related features, so that the platform can accurately identify the risk of the order. Compared with the prior art, the present invention has the following advantages:

[0096] 1. Based on feature engineering, other feature data of order records that can be collected by the online freight platform are selected to predict order accidents, which solves the problem that traditional prediction methods are difficult to collect vehicle driving data;

[0097] 2. Use machine learning methods to achieve rapid and accurate prediction of the risks of freight insurance products on online freight platforms. The risk of an order can be determined without conducting other experiments, greatly saving manpower and time costs.

[0098] 3. Feature selection is performed on the feature parameters recorded at the platform level using feature engineering based on machine learning, which avoids the need for special hardware devices for recording driver and vehicle feature data in traditional accident prediction solutions, making the present invention more practical;

[0099] 4. In view of the weak interpretability of traditional machine learning methods, the present invention combines the freight insurance product risk prediction model with a variety of interpretability analysis methods to overcome the weak interpretability of traditional machine learning methods, fully understand the prediction results of the freight insurance product of the network freight platform of the machine learning model, obtain the importance ranking of feature parameters, and enhance the interpretability of the model;

[0100] 5. It can determine the importance of order characteristics in the prediction model from a qualitative perspective, so as to provide effective feedback guidance for the optimization of pricing strategies of online freight platforms in practical applications.

[0101] 6. The freight insurance product accident prediction HTML program developed by the present invention can automatically predict the order accident result with one click according to the imported order feature data, avoiding redundant experiments and facilitating the promotion and application of the trained prediction model in industrial practice.

[0102] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for predicting the risk behavior of freight protection products on online freight platforms based on explainable machine learning, characterized in that: The following steps are involved: S1. Obtain original sample data and corresponding historical accident results from the online freight platform, and classify the obtained original sample data into features as candidate fields for the subsequent feature selection process; S2. Preprocessing of original sample data and division of data sets Extract the orders of the freight insurance product purchased from the original sample data obtained in step S1, clean and filter the extracted order data to delete the order data with missing values, convert the text classification data into numeric type so that it can be accepted by the machine learning algorithm, and perform binary classification marking on the corresponding historical insurance results; S3. Undersampling based on preprocessed data Perform random undersampling so that the ratio of accident samples to non-accident samples is 1:1, and use the above results to form a complete and standard-formatted prediction sample data set, and extract part of the sample data from the formed prediction sample data set as a training set, and use the rest of the sample data as a test set; S4. Feature selection based on the processed prediction sample data Based on the above prediction sample data set, a variety of machine learning algorithms are used to build a prediction model, and the marginal contribution of each feature parameter to the prediction result of the machine learning model is calculated to obtain the feature importance ranking, and the most important features are selected to be retained as the input features of the subsequent prediction model; S5. Construction, training and testing of various machine learning prediction models A new prediction sample data set is extracted based on the features selected in step S4, and part of the sample data is extracted from the new prediction sample data set as a new training set, and the rest of the sample data is used as a new test set; and based on the new training set and test set, multiple machine learning prediction models are constructed, and then the optimal hyperparameter combination of each prediction model is determined, and then the training and testing of each prediction model are respectively performed, and finally the prediction results of the freight insurance product of each model are output; S6. Comparative evaluation of multiple machine learning prediction models Based on the preset model evaluation method, compare and analyze the prediction accuracy and generalization of various machine learning prediction models to determine the optimal prediction model; S7. The optimal prediction model obtained in step S6 processes the prediction request and returns the prediction result. The returned prediction result includes the prediction of the accident outcome of the order and the separate prediction of each characteristic accident behavior factor in the order.

2. The method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning according to claim 1 is characterized in that: In S1, the feature classification includes at least three categories: "driver features", "vehicle features", and "order features"; Preferably, the "driver characteristics" class includes at least the following fields: driver's mobile phone number, driver's name; the "vehicle characteristics" class includes at least the following fields: license plate number, vehicle model; the "order characteristics" class includes at least the following fields: project ID, secondary classification of goods, origin, destination, mileage, order creation time.

3. The method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning according to claim 1 is characterized in that: In S2, the text-based categorical features use LabelEncoder to encode the string-type categorical data into numerical data so that it can be accepted by the machine learning algorithm.

4. The method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning according to claim 1 is characterized in that: In S3, random undersampling is done using the RandomUnderSampler function in the imbalanced-learn library; Preferably, the extraction of training set sample data is completed using the train_test_split function; Preferably, the proportion of the training set in the sample data is greater than the proportion of the test set in the sample data.

5. The method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning according to claim 1 is characterized in that: In S4, the marginal contribution of each feature parameter to the prediction result of the machine learning model is calculated by the feature_importances_ function built into the model.

6. The method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning according to claim 1 is characterized in that: In S5, the extraction of new training set sample data is completed using the train_test_split function; Preferably, the proportion of the new training set in the new sample data is greater than the proportion of the new test set in the new sample data.

7. The method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning according to claim 1 is characterized in that: In S6, the model evaluation methods include: Obtain multiple prediction results of multiple machine learning prediction models; determine the accuracy, precision, recall and F1 score of each prediction model based on the multiple prediction results; determine the optimal prediction model based on the accuracy, precision, recall and F1 score of each prediction model.

8. The method for predicting risk behavior of freight protection products on a network freight platform based on explainable machine learning according to claim 1 is characterized in that: Also includes: S8. Comparative analysis of the interpretability of multiple methods and weighting of risk factors based on the optimal prediction model. The specific methods are as follows: A variety of explainable analysis methods are used to obtain the importance ranking results of each feature parameter in predicting the risk of freight insurance products, and a comparative analysis is performed. If the comparative analysis results meet certain conditions, it is determined that the importance ranking results of feature parameters obtained by different methods are similar, thereby determining a final feature parameter importance ranking result, and based on this result, the weighted result of the risk factor of the freight insurance product risk behavior is generated and fed back to the pricing strategy formulation department of the online freight platform for feedback guidance on the formulation and optimization of the overall basic price of freight insurance products based on the project side.

9. A network freight platform freight insurance product risk behavior prediction system based on explainable machine learning, characterized by: include: Data receiving module and prediction module; The data receiving module is used to receive the data input by the user, and to check the validity of the received data, and to transmit the checked valid data to the prediction module; The prediction module contains the optimal prediction model obtained in step S6 of the method for predicting the risk behavior of freight insurance products on an online freight platform based on explainable machine learning as described in any of claims 1-7. The prediction module automatically calls its internal prediction model to process the prediction request according to the received data, and returns the prediction result. The returned prediction result includes the prediction of the risk outcome of the order and the separate prediction of each characteristic risk behavior factor in the order.

10. A method for developing a prediction program for the risk behavior of freight insurance products based on an optimal prediction model, characterized in that: The following steps are involved: The optimal prediction model obtained in step S6 of the method for predicting the risk behavior of freight insurance products on a network freight platform based on explainable machine learning as described in any of claims 1-7 is saved as a model file, and loaded with HTML program code to obtain a freight insurance product risk prediction web page program, and the program is enabled to automatically call the saved prediction model according to the parameter data input by the user, and obtain the freight insurance product risk prediction result after calculation by the prediction model, and the obtained freight insurance product risk prediction result includes the prediction of the risk result of the order and the separate prediction of each characteristic risk behavior factor in the order.

Citation Information

Patent Citations

  • Model training method and device, accident rate prediction method and device, electronic equipment and storage medium

    CN112381314A

  • Method and system for predicting vehicle insurance loss situations

    CN109784586A

  • Bond market default risk early warning method based on interpretable machine learning

    CN113240527A

  • Risk control method, system and device and storage medium

    CN116416073A

  • Network freight platform waybill complaint prediction method based on ensemble learning

    CN116993356A