Traffic event active disposal decision-making method and system based on neural network selection model
By adopting a proactive decision-making method for traffic incidents based on a neural network selection model, the problem of inflexible decision-making in traditional methods when dealing with complex traffic data is solved, achieving more efficient and accurate traffic incident handling and improving the performance and safety of the traffic system.
Patent Information
- Application Number
- CN202410913098.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-29
AI Technical Summary
Traditional traffic incident handling methods are based on predefined rules and algorithms, which cannot efficiently process and analyze large amounts of real-time data. This results in inflexible decision-making in complex and ever-changing situations, affecting traffic efficiency and safety.
A proactive decision-making method for traffic incidents based on a neural network selection model is adopted. By collecting and encoding traffic emergency incident data, a neural network model is constructed, and the model performance is monitored during training. The performance is evaluated using a validation set, the model structure is optimized, and finally, it is applied to real-world decision-making scenarios for decision inference.
It improves the accuracy and adaptability of traffic incident decision-making, enabling early prediction and identification of incidents, reducing their impact, and improving the overall performance and reliability of the transportation system.
Smart Images

Figure CN119049267A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and more specifically, to a method and system for actively handling traffic incidents based on a neural network selection model. Background Art
[0002] Traffic accidents and congestion will reduce traffic efficiency, increase travel time and cost, and may also pose a threat to people's lives and property safety. As the scale of traffic data continues to increase, traditional traffic incident handling methods are based on predefined rules and algorithms. These methods are not flexible enough when facing complex and changing situations. As the amount of data increases, it is impossible to efficiently process and analyze large amounts of real-time data.
[0003] Neural network models have excellent capabilities in processing complex data and pattern recognition. They can automatically learn and extract the characteristics and laws of traffic events, thereby improving the accuracy and adaptability of decision-making. Compared with traditional passive response methods, active handling can predict and identify traffic events in advance, take measures to avoid or reduce their impact, and improve the overall performance and reliability of the transportation system. Summary of the invention
[0004] The present invention aims at the technical problems existing in the prior art and provides a traffic incident active handling decision method based on a neural network selection model to solve the problems raised in the above background technology.
[0005] The technical solution of the present invention to solve the above technical problems is as follows: a traffic incident active handling decision-making method based on a neural network selection model specifically comprises the following steps:
[0006] Step 101, collecting traffic emergency event data from multiple projects, encoding the collected data to obtain a traffic emergency event data set, and dividing the data set into a training set, a verification set, and a test set;
[0007] Step 102: construct a neural network model, use the training set to train the neural network model, monitor the performance of the model on the training set during the training process, and save the trained neural network model after the training is completed;
[0008] Step 103: At the end of each cycle, the validation set is used to evaluate the performance and generalization ability of the model, the model structure is adjusted to optimize the model performance, and the trained model is applied to the actual traffic incident active handling decision scenario. By inputting new traffic incident data, the model is used to make decision inferences.
[0009] In a preferred embodiment, in step 101, traffic emergency event data from multiple projects are collected, and the collected data are coded to obtain a traffic emergency event data set, and the data set is divided into a training set, a validation set, and a test set. The specific steps are as follows:
[0010] Step A1, data collection: collecting road engineering environmental data, video data, traffic volume, event level, location information and disposal resource data;
[0011] Step A2, coding processing: check the data for abnormal values, missing values and inconsistent data items, remove invalid data, process missing values, unify data formats, extract key features including road conditions, vehicle density, accident types according to the characteristics of each data source, convert the event level into a numerical code, and integrate the information of different data sources into a unified data set to ensure the consistency and availability of the data format, further including the following steps:
[0012] Step A201: Describe the event level in text as minor, general, or severe, and convert it into a numerical code. Define a mapping function to map the text description to the numerical code E. event =Map(L event ), specifically, the following mapping method is used:
[0013] Slight → 1
[0014] Normal → 2
[0015] Severe → 3
[0016] Among them, Map() is the mapping function, E event is the numerical code of the event level, the event level is L event ;
[0017] Step A202: Take road status, vehicle density and accident type as features, denoted as f road 、f traffic 、f accident , where f road Numerical code indicating road status, f traffic Represents the specific value of vehicle density, f accident A numeric code indicating the type of incident.
[0018] In a preferred embodiment, in step 102, a neural network model is constructed, and the training set is used to train the neural network model. During the training process, the performance of the model on the training set is monitored. After the training is completed, the trained neural network model is saved. The specific steps are as follows:
[0019] Step B1, design a neural network model: including an input layer, a hidden layer and an output layer, wherein the input layer has three nodes, corresponding to the road state, vehicle density and accident type respectively, and 20 neurons are set according to the number of basic road data attributes; the hidden layer: according to the major categories of traffic incident handling resources, 100 neurons are set; the output layer has one node for outputting the predicted value of the event level, and 5 neurons are set, each neuron corresponds to a level of predicted output, and the category with the highest probability is selected as the final predicted level;
[0020] Step B2, model training: Use the training set to train the neural network model, set the feature vector of the input layer to be x=(x1, x2, x3), where x1 represents the road state, x2 represents the vehicle density, and x3 represents the accident type, calculate the predicted output of the model through forward propagation, and use back propagation to adjust the weight and bias of the model to reduce the difference between the predicted value and the true value, further comprising the following steps:
[0021] Step B201, calculation from input layer to hidden layer: the output h of each hidden layer neuron j j The calculation formula is as follows:
[0022]
[0023] in, is the weight of neuron j from the input layer to the hidden layer, is the bias term of hidden layer neuron j, x is the input vector, and σ is the activation function;
[0024] Step B202, calculation from hidden layer to output layer: predicted value of output layer The output of the hidden layer is calculated by weight and bias: Among them, W 2 is the weight matrix from the hidden layer to the output layer, b 2 is the bias vector of the output layer. The output layer uses the softmax activation function to convert the output into a probability distribution. The specific calculation formula is as follows:
[0025]
[0026] in, is the predicted value of the kth neuron in the output layer, z k is the weighted input of the kth neuron in the output layer, z i is the weighted input of the ith neuron in the output layer, and The exponential function is applied to z. k and z i superior, is the weight of neuron k from the hidden layer to the output layer, is the bias term of neuron k in the output layer.
[0027] In a preferred embodiment, the weights and biases of the model are adjusted using back propagation, and the specific steps are as follows:
[0028] Step C1, calculate the cross entropy loss function: use the cross entropy loss function to measure the difference between the predicted value and the true numerical encoding label. Represents the predicted output vector of the model, which is a probability distribution. y represents the real numerical encoding label vector, corresponding to the real label of the event level. The specific calculation formula is as follows:
[0029]
[0030] in, Indicates the difference between the predicted event level and the true label, C is the number of categories, C = 1 means mild, C = 2 means general, and C = 3 means severe; is the model's predicted output for the event level, which is a probability distribution; event is a real numerically encoded label vector, with only one element being 1 and the others being 0;
[0031] The total loss function L is the average value of all sample losses: in, and y represent the predicted output of the model and the true numerical encoding label, respectively, n represents the number of samples, is the predicted output of the p-th sample model for the event level, y event,p is the numerical encoding vector of the true event level label of the p-th sample;
[0032] Step C2, back propagation: monitor the performance of the model on the training set during the training process by calculating the gradient of the loss function for each weight and bias, further including the following steps:
[0033] Step C201: For each output layer neuron k, the weight update formula from the output layer to the hidden layer is: in, is the loss function L for The gradient of is the derivative of the softmax function, is the loss function L with respect to the output layer weights The partial derivative of is used to update the weights from the output layer to the hidden layer The gradient of is the weight of the hidden layer neuron j The bias update formula from the output layer to the hidden layer is: in, is the loss function L with respect to the output layer bias The partial derivative of is the input z of neuron k in the output layer k Bias it The derivative of
[0034] Step C203: For each hidden layer neuron j, the weight update formula from the hidden layer to the input layer is: in, is the loss function L with respect to the hidden layer weights The partial derivative of is the output layer input z k Output h to the hidden layer j The partial derivative of is the activation function with respect to the weighted input z j The derivative of is the input layer feature x i Weight The bias update formula from hidden layer to input layer is: in, is the bias of the loss function L relative to the hidden layer neuron j The partial derivative of is the input z to the hidden layer neuron j j Bias it The derivative of .
[0035] In a preferred embodiment, in step 103, at the end of each cycle, the validation set is used to evaluate the performance and generalization ability of the model, the model structure is adjusted to optimize the model performance, and the trained model is applied to the actual traffic incident active handling decision scenario. By inputting new traffic incident data, the model is used to make decision inferences. The specific steps are:
[0036] Step D1, decision-making reasoning process: input the real-time traffic event data into the trained neural network model, the model extracts key features from it, predicts the event level based on the previously learned patterns and historical data, the model outputs each event level prediction vector, selects the category with the highest probability as the final prediction level, and makes specific traffic event handling decisions based on the prediction results;
[0037] The mathematical formula of the event level prediction vector is: in, It indicates the probability that the model predicts that the event belongs to category C;
[0038] The final prediction grade mathematical formula is: in, is the final predicted level, argm Cax represents the value such that Maximized category C;
[0039] Step D2, data recording and traceability: record the results and process of each decision, establish a traceability mechanism for decisions, analyze the decision results based on historical data and traceability information, and feed the analysis results back to the model optimization and decision-making process, further including the following steps:
[0040] Step D201, record each decision: for each traffic event data input, record the output of the model and the final predicted grade
[0041] Step D202, store historical data: store the input feature x and model output of each decision Prediction level and the true label y event Stored in a database;
[0042] Step D203, decision analysis: use the neural network model to make decisions, and its output Among them, θ is the parameter of the model. By analyzing the parameters in the model training process, the influence of different features on the decision results is evaluated. According to the output of the neural network model, which consists of multiple layers, a set of weights of each layer is represented as θ λ , the model's predicted output for the input is expressed as: y = f(x; θ 1 ,θ 2 ,...,θ λ ), where λ is the number of layers in the network, and the absolute value of the weight is used as a measure of feature importance. For the input feature x i The specific calculation formula is as follows:
[0043]
[0044] in, Representation output For the input feature x i The partial derivative of Importance(x i ) indicates output For the input feature x i impact.
[0045] The present application also provides a traffic incident active handling decision system based on a neural network selection model, which specifically includes a data collection and preprocessing module, a data set partitioning module, a neural network model construction and training module, a model evaluation and optimization module, and a decision inference and application module;
[0046] Data collection and preprocessing module: collects traffic emergency event data from multiple projects and encodes the collected data;
[0047] Dataset partitioning module: divides the collected data set into training set, validation set and test set for training, validation and evaluation of neural network models;
[0048] Neural network model construction and training module: Design the neural network structure for traffic incident processing, use the training set to train the neural network model, and adjust the model parameters through the optimization algorithm to maximize the model performance;
[0049] Model evaluation and optimization module: At the end of each training cycle, the validation set is used to evaluate the performance and generalization ability of the model. Based on the evaluation results of the validation set, the architecture of the neural network is adjusted to optimize the performance of the model.
[0050] Decision inference and application module: Apply the trained neural network model to the actual traffic incident active handling decision scenario, process the real-time traffic incident data, and use the deployed neural network model to make instant decision inference and handling suggestions.
[0051] The beneficial effects of the present invention are as follows: traffic emergency event data from multiple projects are collected, and the collected data are encoded and processed to obtain a traffic emergency event data set, the data set is divided into a training set, a validation set and a test set, a neural network model is constructed, the training set is used to train the neural network model, the performance of the model on the training set is monitored during the training process, and after the training is completed, the trained neural network model is saved, the performance and generalization ability of the model are evaluated using the validation set at the end of each cycle, the model structure is adjusted to optimize the model performance, and the trained model is applied to actual traffic event active handling decision-making scenarios, by inputting new traffic event data, using the model to make decision inferences, and using the neural network model to learn through a large amount of training data, so as to adapt to different traffic event situations and changes, so that the decision is more comprehensive and effective, and the efficiency and response speed of traffic management can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 Constructing a flow chart for the model of the present invention;
[0053] Figure 2 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0055] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0056] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0057] Example 1
[0058] This embodiment provides Figure 1 and Figure 2 The active handling decision-making method for traffic incidents based on the neural network selection model shown in the figure specifically includes the following steps:
[0059] Step 101, collecting traffic emergency event data from multiple projects, encoding the collected data to obtain a traffic emergency event data set, and dividing the data set into a training set, a verification set, and a test set;
[0060] Step 102: construct a neural network model, use the training set to train the neural network model, monitor the performance of the model on the training set during the training process, and save the trained neural network model after the training is completed;
[0061] Step 103: At the end of each cycle, the validation set is used to evaluate the performance and generalization ability of the model, the model structure is adjusted to optimize the model performance, and the trained model is applied to the actual active handling decision-making scenario of traffic incidents. By inputting new traffic incident data, the model is used to make decision inferences.
[0062] Preferably, in step 101, traffic emergency event data from multiple projects are collected, and the collected data are coded to obtain a traffic emergency event data set, and the data set is divided into a training set, a validation set, and a test set. The specific steps are as follows:
[0063] Step A1, data collection: collecting road engineering environmental data, video data, traffic volume, event level, location information and disposal resource data, wherein the road engineering environmental data includes road type, road surface condition, traffic signs and signal light status; the video data includes videos recorded by traffic cameras, which are used for accident scene analysis and traffic flow statistics; the traffic volume data includes the number and speed information of vehicles passing through the road; the event level is classified according to the severity of the event, including minor, general and severe levels; the location information includes the geographical coordinates and road section information of the accident; the disposal resource data includes the availability and deployment of traffic management departments, rescue personnel, equipment and vehicle resources;
[0064] Step A2, coding processing: Check the data for outliers, missing values, and inconsistent data items, remove invalid data, process missing values, unify data formats, extract key features including road conditions, vehicle density, and accident types according to the characteristics of each data source, convert event levels into numerical codes, and integrate information from different data sources into a unified data set to ensure consistency and availability of data formats.
[0065] Preferably, in the encoding process of step A2, according to the characteristics of each data source, key features including road conditions, vehicle density, and accident type are extracted, and the event level is converted into a numerical code, further comprising the following steps:
[0066] Step A201: Describe the event level in text as minor, general, or severe, and convert it into a numerical code. Define a mapping function to map the text description to the numerical code E event =Map(L event ), specifically, the following mapping is used:
[0067] Slight → 1
[0068] Normal → 2
[0069] Severe → 3
[0070] Among them, Map() is the mapping function, Eevent is the numerical code of the event level, the event level is L event ,The text description of the event level is mapped into the corresponding numerical code, reflecting the difference in the severity of the event;
[0071] Step A202: Take road status, vehicle density and accident type as features, denoted as f road 、f traffic 、f accident , where f road Numerical code indicating road status, f traffic Represents the specific value of vehicle density, f accident A numeric code indicating the type of incident.
[0072] Preferably, in step 102, a neural network model is constructed, and the training set is used to train the neural network model. During the training process, the performance of the model on the training set is monitored. After the training is completed, the trained neural network model is saved. The specific steps are as follows:
[0073] Step B1, design a neural network model: including an input layer, a hidden layer and an output layer, wherein the input layer has three nodes, corresponding to the road state, vehicle density and accident type respectively, and 20 neurons are set according to the number of basic road data attributes; the hidden layer: according to the major categories of traffic incident handling resources, 100 neurons are set; the output layer has one node for outputting the predicted value of the event level, and 5 neurons are set, each neuron corresponds to a level of predicted output, and the category with the highest probability is selected as the final predicted level;
[0074] Step B2, model training: Use the training set to train the neural network model. Suppose the feature vector of the input layer is x = (x1, x2, x3), where x1 represents the road state, x2 represents the vehicle density, and x3 represents the accident type. The predicted output of the model is calculated through forward propagation, and the weight and bias of the model are adjusted using back propagation to reduce the difference between the predicted value and the true value.
[0075] Preferably, in the model training of step B2, the predicted output of the model is calculated by forward propagation, and the weight and bias of the model are adjusted by back propagation, further comprising the following steps:
[0076] Step B201, calculation from input layer to hidden layer: the output h of each hidden layer neuron j j The calculation formula is as follows:
[0077]
[0078] in, is the weight of neuron j from the input layer to the hidden layer, is the bias term of hidden layer neuron j, x is the input vector, and σ is the activation function;
[0079] Step B202, calculation from hidden layer to output layer: predicted value of output layer The output of the hidden layer is calculated by weight and bias: Among them, W 2 is the weight matrix from the hidden layer to the output layer, b 2 is the bias vector of the output layer. The output layer uses the softmax activation function to convert the output into a probability distribution. The specific calculation formula is as follows:
[0080]
[0081] in, is the predicted value of the kth neuron in the output layer, z k is the weighted input of the kth neuron in the output layer, z i is the weighted input of the ith neuron in the output layer, and The exponential function is applied to z. k and z i superior, is the weight of neuron k from the hidden layer to the output layer, is the bias term of neuron k in the output layer.
[0082] Preferably, the method of adjusting the weights and biases of the model using back propagation comprises the following specific steps:
[0083] Step C1, calculate the cross entropy loss function: use the cross entropy loss function to measure the difference between the predicted value and the true numerical encoding label. Represents the predicted output vector of the model, which is a probability distribution. y represents the real numerical encoding label vector, corresponding to the real label of the event level. The specific calculation formula is as follows:
[0084]
[0085] in, Indicates the difference between the predicted event level and the true label, C is the number of categories, C = 1 means mild, C = 2 means general, and C = 3 means severe; is the model's predicted output for the event level, which is a probability distribution; event is a real numerically encoded label vector, with only one element being 1 and the others being 0;
[0086] The total loss function L is the average value of all sample losses: in, and y represent the predicted output of the model and the true numerical encoding label, respectively, n represents the number of samples, is the predicted output of the p-th sample model for the event level, y event,p is the numerical encoding vector of the true event level label of the p-th sample;
[0087] Step C2, back propagation: monitor the performance of the model on the training set during the training process by calculating the gradient of the loss function for each weight and bias, further including the following steps:
[0088] Step C201: For each output layer neuron k, the weight update formula from the output layer to the hidden layer is: in, is the loss function L for The gradient of is the derivative of the softmax function, is the loss function L with respect to the output layer weights The partial derivative of is used to update the weights from the output layer to the hidden layer The gradient of is the weight of the hidden layer neuron j The bias update formula from the output layer to the hidden layer is: in, is the loss function L with respect to the output layer bias The partial derivative of is the input z of neuron k in the output layer k Bias it The derivative of
[0089] Step C203: For each hidden layer neuron j, the weight update formula from the hidden layer to the input layer is: in, is the loss function L with respect to the hidden layer weights The partial derivative of is the output layer input z k Output h to the hidden layer j The partial derivative of is the activation function with respect to the weighted input z j The derivative of is the input layer feature x i Weight The bias update formula from hidden layer to input layer is: in, is the bias of the loss function L relative to the hidden layer neuron j The partial derivative of is the input z to the hidden layer neuron j j Bias it The derivative of .
[0090] Preferably, in step 103, at the end of each cycle, the validation set is used to evaluate the performance and generalization ability of the model, the model structure is adjusted to optimize the model performance, and the trained model is applied to the actual traffic incident active handling decision scenario. By inputting new traffic incident data, the model is used to make decision inferences. The specific steps are:
[0091] Step D1, decision-making reasoning process: input the real-time traffic event data into the trained neural network model, the model extracts key features from it, predicts the event level based on the previously learned patterns and historical data, the model outputs each event level prediction vector, selects the category with the highest probability as the final prediction level, and makes specific traffic event handling decisions based on the prediction results;
[0092] The mathematical formula of the event level prediction vector is: in, It indicates the probability that the model predicts that the event belongs to category C;
[0093] The final prediction grade mathematical formula is: in, is the final predicted level, argm C ax represents the value such that Maximized category C;
[0094] Step D2, data recording and traceability: record the results and process of each decision, establish a traceability mechanism for decisions, analyze the decision results based on historical data and traceability information, and feed the analysis results back to the model optimization and decision-making process, further including the following steps:
[0095] Step D201, record each decision: for each traffic event data input, record the output of the model and the final predicted grade
[0096] Step D202, store historical data: store the input feature x and model output of each decision Prediction level and the true label y event Stored in a database;
[0097] Step D203, decision analysis: use the neural network model to make decisions, and its output Among them, θ is the parameter of the model. By analyzing the parameters in the model training process, the influence of different features on the decision results is evaluated. According to the output of the neural network model, which consists of multiple layers, a set of weights of each layer is represented as θλ. The predicted output of the model for the input is expressed as: y = f(x; θ 1 ,θ2 ,...,θ λ ), where λ is the number of layers in the network, and the absolute value of the weight is used as a measure of feature importance. For the input feature x i The specific calculation formula is as follows:
[0098]
[0099] in, Representation output For the input feature x i The partial derivative of Importance(x i ) indicates output For the input feature x i impact.
[0100] The present application also provides a traffic incident active handling decision system based on a neural network selection model, which specifically includes a data collection and preprocessing module, a data set partitioning module, a neural network model construction and training module, a model evaluation and optimization module, and a decision inference and application module;
[0101] Data collection and preprocessing module: collects traffic emergency event data from multiple projects and encodes the collected data;
[0102] Dataset partitioning module: divides the collected data set into training set, validation set and test set for training, validation and evaluation of neural network models;
[0103] Neural network model construction and training module: Design the neural network structure for traffic incident processing, use the training set to train the neural network model, and adjust the model parameters through the optimization algorithm to maximize the model performance;
[0104] Model evaluation and optimization module: At the end of each training cycle, the validation set is used to evaluate the performance and generalization ability of the model. Based on the evaluation results of the validation set, the architecture of the neural network is adjusted to optimize the performance of the model.
[0105] Decision inference and application module: Apply the trained neural network model to the actual traffic incident active handling decision scenario, process the real-time traffic incident data, and use the deployed neural network model to make instant decision inference and handling suggestions.
[0106] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0107] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0109] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0111] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0112] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A traffic incident active handling decision-making method based on a neural network selection model, characterized in that: The specific steps include: Step 101, collecting traffic emergency event data from multiple projects, encoding the collected data to obtain a traffic emergency event data set, and dividing the data set into a training set, a verification set, and a test set; Step 102: construct a neural network model, use the training set to train the neural network model, monitor the performance of the model on the training set during the training process, and save the trained neural network model after the training is completed; Step 103: At the end of each cycle, the validation set is used to evaluate the performance and generalization ability of the model, the model structure is adjusted to optimize the model performance, and the trained model is applied to the actual traffic incident active handling decision scenario. By inputting new traffic incident data, the model is used to make decision inferences.
2. The active handling decision-making method for traffic incidents based on a neural network selection model according to claim 1 is characterized in that: In step 101, traffic emergency event data from multiple projects are collected, and the collected data are coded to obtain a traffic emergency event data set, and the data set is divided into a training set, a validation set, and a test set. The specific steps are as follows: Step A1, data collection: collecting road engineering environmental data, video data, traffic volume, event level, location information and disposal resource data; Step A2, coding processing: Check the data for outliers, missing values, and inconsistent data items. According to the characteristics of each data source, extract key features including road conditions, vehicle density, and accident types, convert the event level into a numerical code, and integrate the information from different data sources into a unified data set.
3. The active handling decision-making method for traffic incidents based on a neural network selection model according to claim 2 is characterized in that: In the coding process of step A2, according to the characteristics of each data source, key features including road conditions, vehicle density, and accident types are extracted, and the event level is converted into a numerical code, which further includes the following steps: Step A201: Describe the event level in text as minor, general, or severe, and convert it into a numerical code. Define a mapping function to map the text description to the numerical code E. event =Map(L event ), use the following mapping: Slight → 1 Normal → 2 Severe → 3 Among them, Map() is the mapping function, E event is the numerical code of the event level, the event level is L event ; Step A202: Take road status, vehicle density and accident type as features, denoted as f road 、f traffic 、f accident , where f road Numerical code indicating road status, f traffic Represents the specific value of vehicle density, f accident A numeric code indicating the type of incident.
4. The active handling decision-making method for traffic incidents based on a neural network selection model according to claim 1 is characterized in that: In step 102, a neural network model is constructed, and the training set is used to train the neural network model. During the training process, the performance of the model on the training set is monitored. After the training is completed, the trained neural network model is saved. The specific steps are as follows: Step B1, design a neural network model: including an input layer, a hidden layer and an output layer, wherein the input layer has three nodes, corresponding to the road state, vehicle density and accident type respectively, and 20 neurons are set according to the number of basic road data attributes; the hidden layer is based on the major categories of traffic incident handling resources, and 100 neurons are set; the output layer has one node for outputting the predicted value of the event level, and 5 neurons are set, each neuron corresponds to a level of predicted output, and the category with the highest probability is selected as the final predicted level; Step B2, model training: Use the training set to train the neural network model. Suppose the feature vector of the input layer is x = (x1, x2, x3), where x1 represents the road state, x2 represents the vehicle density, and x3 represents the accident type. The predicted output of the model is calculated through forward propagation, and the weight and bias of the model are adjusted using back propagation.
5. The active handling decision-making method for traffic incidents based on a neural network selection model according to claim 4 is characterized in that: In the model training of step B2, the predicted output of the model is calculated by forward propagation, and the weight and bias of the model are adjusted by back propagation, which further includes the following steps: Step B201, calculation from input layer to hidden layer: the output h of each hidden layer neuron j j The calculation formula is as follows: in, is the weight of neuron j from the input layer to the hidden layer, is the bias term of hidden layer neuron j, x is the input vector, and σ is the activation function; Step B202, calculation from hidden layer to output layer: predicted value of output layer The output of the hidden layer is calculated by weight and bias: Among them, W 2 is the weight matrix from the hidden layer to the output layer, b 2 is the bias vector of the output layer. The output layer uses the softmax activation function to convert the output into a probability distribution. The specific calculation formula is as follows: in, is the predicted value of the kth neuron in the output layer, z k is the weighted input of the kth neuron in the output layer, z i is the weighted input of the ith neuron in the output layer, and The exponential function is applied to z. k and z i superior, is the weight of neuron k from the hidden layer to the output layer, is the bias term of neuron k in the output layer.
6. The active handling decision-making method for traffic incidents based on a neural network selection model according to claim 5 is characterized in that: The specific steps of using back propagation to adjust the weights and biases of the model are as follows: Step C1, calculate the cross entropy loss function: use the cross entropy loss function to measure the difference between the predicted value and the true numerical encoding label. represents the predicted output vector of the model, y represents the real numerical encoding label vector, corresponding to the real label of the event level, and the specific calculation formula is as follows: in, Indicates the difference between the predicted event level and the true label, C is the number of categories, C = 1 means mild, C = 2 means general, and C = 3 means severe; is the model's predicted output for event level; y event is a real numerically encoded label vector, with only one element being 1 and the others being 0; The total loss function L is the average value of all sample losses: in, and y represent the predicted output of the model and the true numerical encoding label, respectively, n represents the number of samples, is the predicted output of the p-th sample model for the event level, y event,p is the numerical encoding vector of the true event level label of the p-th sample; Step C2, back propagation: monitor the performance of the model on the training set during the training process by calculating the gradient of the loss function for each weight and bias, further including the following steps: Step C201: For each output layer neuron k, the weight update formula from the output layer to the hidden layer is: in, is the loss function L for The gradient of is the derivative of the softmax function, is the loss function L with respect to the output layer weights The partial derivative of is the weight of the hidden layer neuron j The bias update formula from the output layer to the hidden layer is: in, is the loss function L with respect to the output layer bias The partial derivative of is the input z of neuron k in the output layer k Bias it The derivative of Step C203: For each hidden layer neuron j, the weight update formula from the hidden layer to the input layer is: in, is the loss function L with respect to the hidden layer weights The partial derivative of is the output layer input z k Output h to the hidden layer j The partial derivative of is the activation function with respect to the weighted input z j The derivative of is the input layer feature x i Weight The bias update formula from hidden layer to input layer is: in, is the bias of the loss function L relative to the hidden layer neuron j The partial derivative of is the input z to the hidden layer neuron j j Bias it The derivative of .
7. The active handling decision-making method for traffic incidents based on a neural network selection model according to claim 1 is characterized in that: In step 103, at the end of each cycle, the validation set is used to evaluate the performance and generalization ability of the model, the model structure is adjusted to optimize the model performance, and the trained model is applied to the actual traffic incident active handling decision scenario. By inputting new traffic incident data, the model is used to make decision inferences. The specific steps are: Step D1, decision-making reasoning process: input the real-time traffic event data into the trained neural network model, the model extracts key features from it, predicts the event level based on the previously learned patterns and historical data, the model outputs each event level prediction vector, selects the category with the highest probability as the final prediction level, and makes specific traffic event handling decisions based on the prediction results; The mathematical formula of the event level prediction vector is: in, It indicates the probability that the model predicts that the event belongs to category C; The final prediction grade mathematical formula is: in, is the final predicted level, Indicates that Maximized category C; Step D2, data recording and traceability: record the results and process of each decision, establish a decision traceability mechanism, analyze the decision results based on historical data and traceability information, and feed the analysis results back to the model optimization and decision-making process.
8. The active handling decision-making method for traffic incidents based on a neural network selection model according to claim 1 is characterized in that: In the data recording and tracing step D2, a decision-making traceability mechanism is established, and the decision results are analyzed based on historical data and traceability information, and the analysis results are fed back to the model optimization and decision-making process, which further includes the following steps: Step D201, record each decision: for each traffic event data input, record the output of the model and the final predicted grade Step D202, store historical data: store the input feature x and model output of each decision Prediction level and the true label y event Stored in a database; Step D203, decision analysis: use the neural network model to make decisions, and its output Among them, θ is the parameter of the model. By analyzing the parameters in the model training process, the influence of different features on the decision results is evaluated. The output of the neural network model consists of multiple layers, and a set of weights of each layer is represented as θ λ , the model's predicted output for the input is expressed as: y = f(x; θ 1 ,θ 2 ,...,θ λ ), where λ is the number of layers in the network, and the absolute value of the weight is used as a measure of feature importance. For the input feature x i The specific calculation formula is as follows: in, Representation output For the input feature x i The partial derivative of Importance(x i ) indicates output For the input feature x i impact.
9. The active handling decision system for traffic incidents based on a neural network selection model is applied to the active handling decision method for traffic incidents based on a neural network selection model as described in any one of claims 1 to 8, characterized in that: It includes data collection and preprocessing module, data set partitioning module, neural network model building and training module, model evaluation and optimization module, and decision inference and application module; Data collection and preprocessing module: collects traffic emergency event data from multiple projects and encodes the collected data; Dataset partitioning module: divides the collected data set into training set, validation set and test set for training, validation and evaluation of neural network models; Neural network model construction and training module: Design the neural network structure for traffic incident processing, use the training set to train the neural network model, and adjust the model parameters through the optimization algorithm to maximize the model performance; Model evaluation and optimization module: At the end of each training cycle, the validation set is used to evaluate the performance and generalization ability of the model. Based on the evaluation results of the validation set, the architecture of the neural network is adjusted to optimize the performance of the model. Decision inference and application module: Apply the trained neural network model to the actual traffic incident active handling decision scenario, process the real-time traffic incident data, and use the deployed neural network model to make instant decision inference and handling suggestions.
Citation Information
Cited By
Big data-based highway event handling method and system, terminal and storage medium
CN119323887A
Automatic decision-making method and system based on data governance
CN119760325A
Self-adaptive continuous learning method of expressway event handling model agent
CN121580052A
An adaptive continuous learning method for a highway incident handling model agent
CN121580052B
