Highway Safety Control Method and System Based on a Control Unit
By using neural networks in the highway control unit for risk description tag prediction, the problem of difficulty in identifying potential risks in traditional methods is solved, and refined risk assessment and timely response are achieved, which improves safety control efficiency.
Patent Information
- Application Number
- CN202411876981.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Traditional highway safety control methods rely on manual monitoring and empirical judgment, making it difficult to comprehensively and accurately identify potential risks, and cannot deal with complex and changeable traffic conditions in a timely manner.
By obtaining driving road conditions data and risk factor knowledge blocks from the management and control units of the sample highway, using the reference neural network to predict risk description tags, generating refined risk assessment results, and generating management and control suggestions.
It realizes rapid and accurate risk description label prediction of highway target control units, and improves safety control level and emergency response capabilities.
Smart Images

Figure CN119672955B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular, to a highway safety control method and system based on a control unit. Background Art
[0002] As an important part of the modern transportation network, highway safety control is of great significance for ensuring driving safety and improving traffic efficiency. However, the traffic conditions on highways are complex and changeable, involving various factors such as vehicle speed, traffic flow, weather conditions, and road conditions, making safety control face huge challenges. Traditional highway safety control methods often rely on manual monitoring and empirical judgment, and it is difficult to comprehensively and accurately identify potential risks and make effective responses in a timely manner. Summary of the Invention
[0003] In view of the problems mentioned above, in combination with the first aspect of the present invention, embodiments of the present invention provide a highway safety control method based on a control unit, and the method includes:
[0004] Obtain x sample driving road condition data and Y risk factor knowledge blocks from the sample driving road condition data sequences of each sample control unit of a sample highway; the sample driving road condition data sequence includes X sample driving road condition data and the Y risk factor knowledge blocks, and the Y risk factor knowledge blocks are in one-to-one correspondence with Y local risk description labels of a target risk description label, and the risk factor knowledge blocks are used for knowledge vector representation of the corresponding local risk description labels; x, X, and Y are positive integers, and x is less than X;
[0005] Load the x sample driving road condition data and the Y risk factor knowledge blocks into a reference neural network for risk description label prediction to generate a risk description label prediction result for each sample driving road condition data; the reference neural network is generated by fine-tuning the parameters of an initialized neural network, and the initialized neural network is generated by optimizing the network parameters according to a plurality of training data combinations, and the training data combination is a combination composed of training driving road condition data and training risk factor knowledge blocks;
[0006] If it is determined that the network training convergence requirement is met based on the risk description label prediction result, obtain a risk description label prediction network from the reference neural network;
[0007] Obtain the target driving condition data of the target control unit of the highway to be input, perform risk description label prediction on the target driving condition data through the risk description label prediction network, generate the risk description label prediction result of the target driving condition data, and generate the control suggestion of the target control unit according to the risk description label prediction result; the risk description label prediction result is used to reflect the target local risk description label matched by the target driving condition data among the multiple local risk description labels included in the target risk description label.
[0008] In a possible implementation manner of the first aspect, the loading the x sample driving condition data and the Y risk factor knowledge blocks into the reference neural network for risk description label prediction to generate the risk description label prediction result of each sample driving condition data includes:
[0009] Load the x sample driving condition data and the Y risk factor knowledge blocks into the reference neural network, and use the reference neural network to perform encoding representation on the x sample driving condition data and the Y risk factor knowledge blocks to generate the target driving condition feature vectors of the x sample driving condition data and the target risk factor knowledge vectors of the Y risk factor knowledge blocks;
[0010] Use the reference neural network to perform risk description label prediction based on the target driving condition feature vectors and the target risk factor knowledge vectors to generate the risk description label prediction result of each sample driving condition data.
[0011] In a possible implementation manner of the first aspect, the reference neural network includes a driving condition knowledge representation unit and a risk factor knowledge representation unit. The loading the x sample driving condition data and the Y risk factor knowledge blocks into the reference neural network and using the reference neural network to perform encoding representation on the x sample driving condition data and the Y risk factor knowledge blocks to generate the target driving condition feature vectors of the x sample driving condition data and the target risk factor knowledge vectors of the Y risk factor knowledge blocks includes:
[0012] Load the x sample driving condition data into the driving condition knowledge representation unit, and use the driving condition knowledge representation unit to perform encoding representation on the x sample driving condition data to generate the target driving condition feature vectors of the x sample driving condition data;
[0013] Load the Y risk factor knowledge blocks into the risk factor knowledge representation unit, and use the risk factor knowledge representation unit to perform encoding representation on the Y risk factor knowledge blocks to generate the target risk factor knowledge vectors of the Y risk factor knowledge blocks.
[0014] In a possible implementation of the first aspect, the initialized neural network includes a static driving condition extraction layer, and the driving condition knowledge representation unit includes the static driving condition extraction layer and a dynamic driving condition extraction layer;
[0015] Encoding and representing the x sample driving condition data by using the driving condition knowledge representation unit to generate a target driving condition feature vector of the x sample driving condition data includes:
[0016] Extracting features from the x sample driving condition data by using the static driving condition extraction layer to generate a first driving condition feature vector;
[0017] Extracting features from the x sample driving condition data by using the dynamic driving condition extraction layer to generate a second driving condition feature vector;
[0018] Fusing the first driving condition feature vector and the second driving condition feature vector to generate a target driving condition feature vector of the x sample driving condition data.
[0019] In a possible implementation of the first aspect, extracting features from the x sample driving condition data includes:
[0020] Decomposing each sample driving condition data to generate K sample driving condition segments of each sample driving condition data; K is a positive integer;
[0021] Performing a fusion calculation on each sample driving condition segment and a set conversion vector to generate a segment vector of each sample driving condition segment;
[0022] Generating a corresponding driving condition feature vector based on each segment vector.
[0023] In a possible implementation of the first aspect, encoding and representing the Y risk factor knowledge blocks by using the risk factor knowledge representation unit to generate a target risk factor knowledge vector of the Y risk factor knowledge blocks includes:
[0024] Performing semantic parsing on each risk factor knowledge block by using a natural language processing algorithm to extract corresponding key semantic information, where the key semantic information includes a risk type, a risk level, a risk occurrence condition, a risk impact range, and a historical risk event record;
[0025] Classifying the extracted key semantic information, and assigning corresponding numerical codes to the key semantic information according to the classification result and a preset coding rule to generate a dictionary including all the key semantic information and the corresponding numerical codes;
[0026] For each type of key semantic information, construct corresponding feature mapping rules, where the feature mapping rules define the rules for converting the key semantic information into numerical features;
[0027] According to the constructed feature mapping rules, calculate the feature values corresponding to each key semantic information, and perform normalization processing on the feature values to generate a risk factor feature vector matrix containing all the feature values and their corresponding normalization results;
[0028] Use covariance analysis algorithm or association rule mining algorithm to identify the association relationships between different features in the risk factor feature vector matrix, and based on the identified association relationships, construct an associated risk factor feature matrix, where the associated features in the associated risk factor feature matrix are used to reflect the interaction and influence between different risk factors;
[0029] Use the recursive feature elimination algorithm or expert knowledge to evaluate the importance of each associated feature in the associated risk factor feature matrix, and assign corresponding feature weights to each associated feature according to the evaluation results, where the magnitude of the feature weights reflects the contribution degree of the associated feature in risk prediction;
[0030] Use the feature weights to perform weighted processing on the associated risk factor features. After generating a weighted risk factor feature vector, according to the selected fusion strategy, perform fusion processing on the weighted risk factor feature vector to generate a fused risk factor vector, and match the corresponding standardization method according to the distribution pattern of the fused risk factor vector. The standardization methods include normalization, standardization or regularization;
[0031] Use the selected standardization method to perform standardization processing on the fused risk factor vector to generate the target risk factor knowledge vector of the Y risk factor knowledge blocks.
[0032] In a possible implementation manner of the first aspect, the use of the reference neural network to perform risk description label prediction based on the target driving road condition feature vector and the target risk factor knowledge vector, and generate a risk description label prediction result for each of the sample driving road condition data, includes:
[0033] Connect the target driving road condition feature vector and the target risk factor knowledge vector to generate a connected feature vector;
[0034] Perform mutual correlation training based on the connected feature vector to generate mutual correlation training features;
[0035] For each of the sample driving condition data, obtain the target cross-correlation training features of the sample driving condition data for each of the local risk description tags from the cross-correlation training features, and calculate the similarity score between each of the target cross-correlation training features and the set tag features to generate a similarity score result;
[0036] Perform a normalization transformation on each of the similarity score results to generate a normalization transformation result, and determine the normalization transformation result as the confidence level of the sample driving condition data matching the corresponding local risk description tag;
[0037] Generate a risk description tag prediction result for the sample driving condition data based on the respective confidence levels corresponding to the sample driving condition data.
[0038] In a possible implementation manner of the first aspect, the step of generating cross-correlation training features by performing cross-correlation training based on the connection feature vector includes:
[0039] According to the dimension information of the connection feature vector, determine the format information of the weight matrix required for cross-correlation training. Among them, if the dimension of the connection feature vector is n-dimensional, initialize a weight matrix with a shape of [n, m], where m is a preset value related to the dimension of the expected cross-correlation training features or the network structure. At the same time, initialize a bias vector that matches the weight matrix, and the dimension of the bias vector is m-dimensional. Then set the number of rounds of cross-correlation training and the learning rate, and the learning rate will be used to adjust the update step sizes of the weight matrix and the bias vector during the training process;
[0040] Use the connection feature vector as the input data structure of the input layer, and determine whether it is necessary to construct a hidden layer of the cross-correlation training basic structure according to the format information of the weight matrix. If it is necessary to construct a hidden layer, determine the number of neurons in the hidden layer. The number of neurons is determined according to the dimension of the connection feature vector and the complexity of the expected output features. In addition, define the activation function of the hidden layer of the cross-correlation training basic structure and construct the output layer. The number of neurons in the output layer matches the dimension of the finally expected cross-correlation training features;
[0041] Input the connection feature vectors into the input layer of the constructed cross-correlation training infrastructure, and directly transfer the connection feature vectors to the next layer through the input layer. Among them, if there is a hidden layer, for each neuron in the hidden layer, perform a weighted summation operation on the input connection feature vectors and the corresponding weights in the weight matrix, and then add the corresponding bias value in the bias vector to generate an intermediate result. Then, perform a non-linear transformation on the intermediate result through an activation function to obtain the output of the hidden layer. The output of this hidden layer is used as the input of the next layer, and repeat the operations of weighted summation, adding bias values, and activation functions until reaching the output layer. In the output layer, perform weighted summation and add bias value operations to obtain a temporary output result. The temporary output result is the preliminary result of cross-correlation training calculated based on the current weight matrix and bias vector;
[0042] Input the temporary output result into the mean square error loss function, calculate the average of the squares of the differences between each element of the temporary output result and the pre-set target cross-correlation training features, and output the corresponding loss function value;
[0043] According to the calculated loss function value, starting from the output layer, calculate the contribution degree of each weight and bias to the loss function value in reverse. Among them, for the output layer, use the derivative rule to calculate the derivatives of the loss function value with respect to the weights and biases of the output layer. The derivatives reflect the influence degree of the changes in weights and biases on the loss function value. Then multiply the derivatives by the pre-set learning rate to obtain the update amounts of the weights and biases of the output layer. Next, for the hidden layer, multiply the error information passed from the output layer by the derivative of the activation function of the hidden layer to obtain the update amounts of the weights and biases of the hidden layer. Thus, obtain the update amounts of the weights and biases of each layer;
[0044] Use the calculated update amounts of the weights and biases to update the current weight matrix and bias vector. Among them, for the weight matrix, subtract the corresponding weight update amount from each element; for the bias vector, subtract the corresponding bias update amount from each element. Thus, obtain the updated weight matrix and bias vector;
[0045] Check whether the number of completed training rounds has reached the pre-set number of training rounds. If the set number of training rounds has been reached, it means that the cross-correlation training is completed; otherwise, it means that the training is not completed and the next round of training needs to be continued;
[0046] After the cross-correlation training is completed, input the connection feature vectors into the trained cross-correlation training infrastructure again to obtain cross-correlation training features, which reflect the cross-correlation relationship between the internal elements of the connection feature vectors.
[0047] In a possible implementation of the first aspect, the reference neural network further includes a feature fusion unit; obtaining the risk description label prediction network from the reference neural network includes:
[0048] Associating the current target risk factor knowledge vector with the current driving road condition knowledge representation unit and the current feature fusion unit to generate a risk description label prediction network.
[0049] In another aspect, an embodiment of the present invention further provides a highway safety control system based on a control unit, including a processor and a machine-readable storage medium. The machine-readable storage medium is connected to the processor. The machine-readable storage medium is used to store programs, instructions, or codes, and the processor is used to execute the programs, instructions, or codes in the machine-readable storage medium to implement the above method.
[0050] Based on the above aspects, the embodiments of the present application construct an efficient data processing and risk assessment system by selecting driving road condition data and risk factor knowledge blocks from the control units of sample highways. The reference neural network is used to predict risk description labels for the sample data, and through network training convergence verification, the accuracy and reliability of the risk prediction model are ensured. This method can quickly and accurately predict the corresponding risk description labels for the actual driving road condition data of the target control unit of the highway input, especially being able to refine to the matching of multiple local risk description labels, thereby providing a more refined risk assessment result. The control suggestions generated based on these risk description label prediction results provide a scientific basis for the safety management of highways, helping to timely identify and respond to potential risks, and significantly improving the safety control level and emergency response ability of highways. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a schematic flowchart of the execution process of the highway safety control method based on the control unit provided by the embodiment of the present invention.
[0052] Figure 2 is a schematic diagram of the hardware architecture of the highway safety control system based on the control unit provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] The present invention will be specifically described below in conjunction with the accompanying drawings of the specification. Figure 1 is a schematic flowchart of the highway safety control method based on the control unit provided by an embodiment of the present invention. The highway safety control method based on the control unit will be introduced in detail below.
[0054] Step S110: Obtain x sample driving condition data and Y risk factor knowledge blocks from the sample driving condition data sequences of each sample control unit on the sample highway. The sample driving condition data sequence includes X sample driving condition data and the Y risk factor knowledge blocks. The Y risk factor knowledge blocks correspond one-to-one with Y local risk description labels of the target risk description label. The risk factor knowledge blocks are used to represent the corresponding local risk description labels in the form of knowledge vectors. x, X, and Y are positive integers, and x is less than X.
[0055] In this embodiment, the sample highway is divided into multiple sample control units, and each sample control unit has a corresponding sample driving condition data sequence. For example, the sample driving condition data sequence of sample control unit 1 contains the driving condition information per hour in the past period (such as the past year). Here, the driving condition information includes various factors such as vehicle speed, traffic flow, weather conditions (such as whether it is raining, snowing, foggy, etc.), road conditions (such as whether there is construction, pavement damage conditions, etc.), and traffic accident occurrence conditions. Set X to 1000, that is, this data sequence contains 1000 sample driving condition data. At the same time, the target risk description label contains multiple local risk description labels, such as "driving risk in bad weather", "driving risk in construction sections", "driving risk during high traffic flow periods", etc. Assume that Y is 5 here, corresponding to 5 local risk description labels, and there are also 5 risk factor knowledge blocks. Then set x to 100, and the server obtains 100 sample driving condition data and these 5 risk factor knowledge blocks from the sample driving condition data sequence of sample control unit 1. These 5 risk factor knowledge blocks are pre-constructed. For example, for the risk factor knowledge block corresponding to the local risk description label "driving risk in bad weather", it contains knowledge contents such as the historical traffic accident rate in bad weather (such as heavy rain, heavy snow, thick fog, etc.), the handling difficulty of different types of vehicles (such as sedans, trucks, buses, etc.) in bad weather, and the relationship between road visibility and vehicle speed in bad weather. These contents exist in a specific knowledge vector representation form for subsequent neural networks to process.
[0056] Step S120: Load the x sample driving condition data and the Y risk factor knowledge blocks into the reference neural network for risk description label prediction, and generate a risk description label prediction result for each of the sample driving condition data. The reference neural network is generated by fine-tuning the parameters of the initialized neural network. The initialized neural network is generated by optimizing the network parameters based on multiple training data combinations. The training data combination is a combination composed of training driving condition data and training risk factor knowledge blocks.
[0057] In this embodiment, 100 sample driving condition data and 5 risk factor knowledge blocks obtained can be loaded into a reference neural network for predicting risk description labels. This reference neural network is generated through a series of complex processes. First, the neural network is initialized by optimizing network parameters according to a large number of training data combinations. These training data combinations are composed of training driving condition data and training risk factor knowledge blocks. For example, the training driving condition data may come from highway driving records in multiple different regions and different time periods, and the training risk factor knowledge blocks are constructed for different local risk description labels similar to the knowledge content mentioned above. Then, the reference neural network is obtained by fine-tuning the parameters of the initialized neural network.
[0058] After the data is loaded into the reference neural network, the driving condition knowledge representation unit and the risk factor knowledge representation unit in the reference neural network start to work. Taking the driving condition knowledge representation unit as an example, assume that the static extraction layer of driving conditions in it extracts features from the speed information in the sample driving condition data. If the speed data is a continuous numerical sequence, it may extract some static features, such as average speed, maximum speed, minimum speed, etc., to generate the first driving condition feature vector. And the dynamic extraction layer of driving conditions will consider the change of speed over time. For example, a sharp change in speed within a certain time period may imply an unexpected situation (such as a traffic accident or a temporary road control). Through this dynamic analysis, a second driving condition feature vector is generated. Finally, these two feature vectors are fused to obtain the target driving condition feature vector of 100 sample driving condition data.
[0059] For the risk factor knowledge representation unit, take the risk factor knowledge block corresponding to "driving risk on the construction section" as an example. Use natural language processing algorithms to perform semantic parsing on this risk factor knowledge block, and extract key semantic information. For example, the risk type is the driving risk caused by construction, the risk level may be divided into different levels such as high, medium, and low according to the construction scale and the importance of the section, the risk occurrence conditions are during construction and without reasonable warning signs or the road becoming narrower, etc., the risk impact range is within the construction section and a certain distance before and after it, and the historical risk event records include the number and types of traffic accidents that occurred in similar construction sections in the past. Classify these key semantic information, and assign corresponding numerical codes to them according to the preset coding rules. For example, the risk type may be coded as 1, the high risk level is coded as 3, etc., to generate a dictionary containing all key semantic information and corresponding numerical codes. Then construct feature mapping rules for each type of key semantic information. For example, for the risk level, map the high, medium, and low levels to specific numerical intervals. Calculate the feature values corresponding to each key semantic information according to this rule, and perform normalization processing to generate a risk factor feature vector matrix containing all feature values and corresponding normalization results. Then use the covariance analysis algorithm to identify the correlation relationships between different features in the matrix, and construct a correlation risk factor feature matrix. For example, it is found that there is a certain correlation between the risk level and the risk impact range. If the risk level is high, the risk impact range may be larger. Then use the recursive feature elimination algorithm to evaluate the importance of each associated feature, and assign feature weights to each associated feature according to the evaluation results. For example, the feature weight of the risk level is 0.4, the feature weight of the risk impact range is 0.3, etc. Use these feature weights to perform weighted processing on the correlation risk factor features, generate a weighted risk factor feature vector, and then perform fusion processing on the weighted risk factor feature vector according to the fusion strategy (such as weighted average) to generate a fused risk factor vector. Finally, perform normalization processing on it according to the distribution pattern matching normalization method (such as normalization) of the fused risk factor vector to obtain the target risk factor knowledge vector of 5 risk factor knowledge blocks.
[0060] After that, the reference neural network connects the target driving road condition feature vector and the target risk factor knowledge vector to generate a connection feature vector. Based on the connection feature vector, cross-correlation training is performed. For example, according to the dimension information of the connection feature vector (assumed to be n-dimensional), the format information of the weight matrix required for cross-correlation training is determined to be [n, m] (m is determined according to the dimension of the cross-correlation training features expected to be obtained, such as 100). At the same time, a bias vector of m dimensions is initialized, the number of rounds of cross-correlation training is set to 100 rounds, and the learning rate is 0.01. Using the connection feature vector as the input data structure of the input layer, if a hidden layer needs to be constructed (determined according to the dimension of the connection feature vector and the complexity of the expected output features), assuming the number of neurons in the hidden layer is 50, the activation function of the hidden layer (such as the ReLU function) is defined and the output layer is constructed (the number of neurons matches the dimension of the finally expected cross-correlation training features, assumed to be 30). The connection feature vector is input into the input layer of the constructed cross-correlation training basic structure and passed to the next layer through the input layer. If there is a hidden layer, for each neuron in the hidden layer, the input connection feature vector is weighted and summed with the corresponding weights in the weight matrix and then the corresponding bias value in the bias vector is added to generate an intermediate result, which is then non-linearly transformed through the activation function to obtain the output of the hidden layer. This output is used as the input of the next layer and the above operations are repeated until the output layer is reached. At the output layer, weighted summation and bias value addition operations are performed to obtain a temporary output result. The temporary output result is input into the mean squared error loss function to calculate the average of the squares of the differences between each element and the pre-set target cross-correlation training features, and the loss function value is output. According to the loss function value, starting from the output layer, the contribution degree of each weight and bias to the loss function value is calculated in reverse, and the weight matrix and bias vector are updated. Check whether the number of training rounds reaches 100 rounds. If it reaches, the cross-correlation training is completed and the cross-correlation training features are obtained. For each sample driving road condition data, the target cross-correlation training features of this sample driving road condition data for each local risk description label are obtained from the cross-correlation training features, and the similarity score between each target cross-correlation training feature and the set label feature is calculated. For example, the cosine similarity calculation method is used to generate the similarity score result. Each similarity score result is normalized and converted to determine the confidence that the sample driving road condition data matches the corresponding local risk description label. Based on these confidences, the risk description label prediction result of each sample driving road condition data is generated.
[0061] In step S130, if it is determined based on the risk description label prediction result that the network training convergence requirement is met, the risk description label prediction network is obtained from the reference neural network.
[0062] Suppose that in the previous risk description label prediction results, for each sample of driving condition data, the confidence levels of its matching various local risk description labels gradually tend to be stable, and the overall error rate (such as the mean squared error) has been reduced below a preset threshold, which meets the requirements for network training convergence. For example, the preset mean squared error threshold is 0.05, and after multiple iterative trainings, the calculated mean squared error is 0.03. At this time, the server obtains the risk description label prediction network from the reference neural network. In this process, the current target risk factor knowledge vector is associated with the current driving condition knowledge representation unit and the current feature fusion unit to generate the risk description label prediction network. This risk description label prediction network has the ability to predict risk description labels for new driving condition data.
[0063] Step S140: Obtain the target driving condition data of the target control unit of the expressway input, perform risk description label prediction on the target driving condition data through the risk description label prediction network, generate the risk description label prediction result of the target driving condition data, and generate the control suggestion for the target control unit according to the risk description label prediction result. The risk description label prediction result is used to reflect the target local risk description label matched by the target driving condition data among the multiple local risk description labels included in the target risk description label.
[0064] When there is input of the target driving condition data of the target control unit of the expressway, for example, the real-time driving condition data of a specific section (target control unit) of this expressway, including current vehicle speed, traffic flow, weather conditions (it is drizzling and the road is a bit slippery), and road construction conditions (there is a small-scale construction) and other information. The server performs risk description label prediction on these target driving condition data through the already generated risk description label prediction network. First, the target driving condition data undergoes processing similar to the previous steps in the risk description label prediction network to obtain the risk description label prediction result of the target driving condition data. Suppose this risk description label prediction result shows that the target driving condition data has a relatively high matching confidence level (such as 0.8) under the local risk description label of "driving risk in bad weather" in the target risk description label, while the confidence levels under other local risk description labels are relatively low. Generate the control suggestion for the target control unit according to this risk description label prediction result. For the situation with a relatively high confidence level of "driving risk in bad weather", the control suggestions may include adding warning signs on this section to remind drivers to slow down, appropriately adjusting the speed limit according to the traffic flow situation, etc. In this way, the entire process from the acquisition of driving condition data to risk description label prediction and then to the generation of control suggestions is completed, which helps to improve the driving safety and management efficiency of the expressway.
[0065] Based on the above steps, in the embodiment of the present application, by selecting driving condition data and risk factor knowledge blocks from the control units of sample highways, an efficient data processing and risk assessment system is constructed. The reference neural network is used to predict risk description labels for the sample data, and through network training convergence verification, the accuracy and reliability of the risk prediction model are ensured. This method can quickly and accurately predict the corresponding risk description labels for the actual driving condition data of the target control unit of the highway, especially being able to refine to the matching of multiple local risk description labels, thereby providing a more refined risk assessment result. The control suggestions generated based on the prediction results of these risk description labels provide a scientific basis for the safety management of the highway, helping to identify and respond to potential risks in a timely manner, and significantly improving the safety control level and emergency response ability of the highway.
[0066] In a possible implementation manner, step S120 includes:
[0067] Step S121, loading the x sample driving condition data and the Y risk factor knowledge blocks into the reference neural network, and using the reference neural network to perform encoding representation on the x sample driving condition data and the Y risk factor knowledge blocks to generate the target driving condition feature vectors of the x sample driving condition data and the target risk factor knowledge vectors of the Y risk factor knowledge blocks.
[0068] Step S122, using the reference neural network to perform risk description label prediction based on the target driving condition feature vectors and the target risk factor knowledge vectors, and generating the risk description label prediction results of each sample driving condition data.
[0069] In a possible implementation manner, the reference neural network includes a driving condition knowledge representation unit and a risk factor knowledge representation unit, and step S121 includes:
[0070] Step S1211, loading the x sample driving condition data into the driving condition knowledge representation unit, and using the driving condition knowledge representation unit to perform encoding representation on the x sample driving condition data to generate the target driving condition feature vectors of the x sample driving condition data.
[0071] Step S1212, loading the Y risk factor knowledge blocks into the risk factor knowledge representation unit, and using the risk factor knowledge representation unit to perform encoding representation on the Y risk factor knowledge blocks to generate the target risk factor knowledge vectors of the Y risk factor knowledge blocks.
[0072] In this embodiment, first, the server loads x sample driving condition data and Y risk factor knowledge blocks into the reference neural network, and then uses the reference neural network to encode and represent these data, so as to generate the target driving condition feature vectors of the x sample driving condition data and the target risk factor knowledge vectors of the Y risk factor knowledge blocks. In this process, the reference neural network includes a driving condition knowledge representation unit and a risk factor knowledge representation unit.
[0073] For the sample driving condition data, the server loads the x sample driving condition data into the driving condition knowledge representation unit, and uses the driving condition knowledge representation unit to encode and represent these sample driving condition data to generate the target driving condition feature vectors. For example, taking the sample driving condition data in the previously mentioned sample control unit as an example, it contains various information such as vehicle speed, traffic flow, weather conditions, road conditions, and the occurrence of traffic accidents. The driving condition static extraction layer in the driving condition knowledge representation unit starts to work. For the information of vehicle speed, it will comprehensively analyze the vehicle speed data in all sample driving condition data, and calculate statistical features such as average vehicle speed, maximum vehicle speed, minimum vehicle speed, and the standard deviation of vehicle speed. These features are combined to initially form a feature representation. At the same time, the driving condition dynamic extraction layer will pay attention to the change trend of vehicle speed over time, for example, how the vehicle speed suddenly decreases from the normal speed at several consecutive data points. This dynamic change feature is combined with the static feature. In addition, for the traffic flow, it will analyze the traffic flow peaks and troughs at different time periods, and features such as the fluctuation range of traffic flow. In terms of weather conditions, if it is rainy weather, it will record relevant features such as the intensity of rain and the duration of rain. For road conditions, it will focus on features such as the location and area of the damaged road area. For the occurrence of traffic accidents, it will count information such as the frequency, severity, and location of accidents. By integrating, quantifying, and encoding these numerous features, the target driving condition feature vectors for the x sample driving condition data are finally generated.
[0074] For the risk factor knowledge chunks, the server loads Y risk factor knowledge chunks into the risk factor knowledge representation unit, and uses this unit to encode and represent these knowledge chunks to generate the target risk factor knowledge vector. Taking the risk factor knowledge chunk of "driving risk in bad weather" mentioned above as an example, the risk factor knowledge representation unit uses natural language processing algorithms to perform semantic parsing on it. This risk factor knowledge chunk contains many knowledge contents, such as the accident rate of driving in bad weather (heavy rain, heavy snow, thick fog, etc.) in history, the handling difficulty of different types of vehicles (sedans, trucks, buses, etc.) in bad weather, and the relationship between road visibility and vehicle speed in bad weather. During the semantic parsing process, key semantic information such as the risk type being the driving risk in bad weather, the risk level may be classified into different levels such as high, medium, and low according to factors such as historical accident rates, the risk occurrence condition is the appearance of bad weather, the risk impact range may be the entire road section affected by bad weather and its surrounding areas, and the historical risk event records include the specific number of traffic accidents that occurred in this bad weather in the past, the types of accidents (such as rear-end collisions, skidding, etc.). Then, classify these key semantic information and assign corresponding numerical codes to them according to the preset coding rules. For example, the risk type of driving risk in bad weather may be encoded as 1, and the high risk level is encoded as 3, etc., so as to generate a dictionary containing all key semantic information and corresponding numerical codes. After that, construct feature mapping rules for each type of key semantic information. For example, for the risk level, map the high, medium, and low levels to specific numerical intervals. Calculate the feature values corresponding to each key semantic information according to this rule, and perform normalization processing to generate a risk factor feature vector matrix containing all feature values and corresponding normalization results. Then use the covariance analysis algorithm to identify the correlation relationships between different features in the matrix. For example, it is found that there is a correlation between the risk level and the risk impact range. If the risk level is high, the risk impact range may be larger, so as to construct an associated risk factor feature matrix. Then use the recursive feature elimination algorithm to evaluate the importance of each associated feature, and assign feature weights to each associated feature according to the evaluation results. For example, the feature weight of the risk level is 0.4, and the feature weight of the risk impact range is 0.3, etc. Use these feature weights to perform weighted processing on the associated risk factor features to generate a weighted risk factor feature vector, and then perform fusion processing on the weighted risk factor feature vector according to the fusion strategy (such as weighted average) to generate a fused risk factor vector. Finally, perform normalization processing on it according to the distribution pattern matching normalization method (such as normalization) of the fused risk factor vector, so as to obtain the target risk factor knowledge vector of Y risk factor knowledge chunks.
[0075] After obtaining the target driving condition feature vector of x sample driving condition data and the target risk factor knowledge vector of Y risk factor knowledge blocks, the server uses a reference neural network to predict risk description labels based on these two vectors, generating the risk description label prediction results for each sample driving condition data. The server first concatenates the target driving condition feature vector and the target risk factor knowledge vector to generate a concatenated feature vector. For example, if the target driving condition feature vector is a vector with dimension n1 and the target risk factor knowledge vector is a vector with dimension n2, then the dimension of the concatenated feature vector is n1 + n2. Then, mutual correlation training is performed based on the concatenated feature vector, and this mutual correlation training process is relatively complex. According to the dimension information of the concatenated feature vector (assumed to be m-dimensional), the format information of the weight matrix required for mutual correlation training is determined as [m, p] (p is determined according to the dimension of the expected mutual correlation training features, such as 100), and at the same time, a p-dimensional bias vector is initialized. The number of rounds of mutual correlation training is set to 100 rounds, and the learning rate is set to 0.01. Using the concatenated feature vector as the input data structure of the input layer, if a hidden layer needs to be constructed (determined according to the dimension of the concatenated feature vector and the complexity of the expected output features), assuming the number of neurons in the hidden layer is 50, define the activation function of the hidden layer (such as the ReLU function) and construct the output layer (the number of neurons matches the dimension of the finally expected mutual correlation training features, assumed to be 30). Input the concatenated feature vector into the input layer of the constructed mutual correlation training basic structure and pass it to the next layer through the input layer. If there is a hidden layer, for each neuron in the hidden layer, perform a weighted sum operation on the input concatenated feature vector and the corresponding weights in the weight matrix and then add the corresponding bias value in the bias vector to generate an intermediate result, and then perform a non-linear transformation through the activation function to obtain the output of the hidden layer. This output is used as the input of the next layer and repeat the above operations until reaching the output layer. At the output layer, perform a weighted sum and add bias value operation to obtain a temporary output result. Input the temporary output result into the mean squared error loss function to calculate the average of the squares of the differences between each element and the pre-set target mutual correlation training features, and output the loss function value. According to the loss function value, calculate the contribution degree of each weight and bias to the loss function value in reverse from the output layer, and update the weight and bias vector. Check whether the number of training rounds reaches 100 rounds. If it reaches, the mutual correlation training is completed, and the mutual correlation training features are obtained. For each sample driving condition data, obtain the target mutual correlation training features of this sample driving condition data for each local risk description label from the mutual correlation training features, and calculate the similarity score between each target mutual correlation training feature and the set label feature. For example, use the cosine similarity calculation method to generate the similarity score result.Normalize each similarity score result and determine it as the confidence level of the sample driving condition data matching the corresponding local risk description label. Generate the risk description label prediction result for each sample driving condition data based on these confidence levels. For example, if the confidence level of a sample driving condition data under the local risk description label of "Driving risk in bad weather" is 0.8, and the confidence levels under other local risk description labels are relatively low, then it can be considered that this sample driving condition data is more inclined to match the local risk description label of "Driving risk in bad weather".
[0076] In a possible implementation manner, the initialized neural network includes a static driving condition extraction layer, and the driving condition knowledge representation unit includes the static driving condition extraction layer and a dynamic driving condition extraction layer.
[0077] Step S1211 includes:
[0078] Use the static driving condition extraction layer to extract features from the x sample driving condition data to generate a first driving condition feature vector.
[0079] Use the dynamic driving condition extraction layer to extract features from the x sample driving condition data to generate a second driving condition feature vector.
[0080] Fuse the first driving condition feature vector and the second driving condition feature vector to generate the target driving condition feature vector of the x sample driving condition data.
[0081] In a possible implementation manner, the extraction of features from the x sample driving condition data includes:
[0082] Decompose each sample driving condition data to generate K sample driving condition segments of each sample driving condition data. K is a positive integer.
[0083] Fuse and calculate each sample driving condition segment with a set conversion vector to generate a segment vector of each sample driving condition segment.
[0084] Generate the corresponding driving condition feature vector based on each segment vector.
[0085] In this embodiment, taking the sample driving condition data in the aforementioned sample control unit as an example, this data contains various information such as vehicle speed, traffic flow, weather conditions, road conditions, and the occurrence of traffic accidents, etc. For the information of vehicle speed, the static extraction layer of driving conditions will comprehensively analyze the vehicle speed data in x sample driving condition data. It may calculate statistical features such as the average vehicle speed, which is obtained by adding all vehicle speed data and dividing by the number of data; the maximum vehicle speed, that is, finding the maximum value from all vehicle speed data; the minimum vehicle speed, finding the minimum value; the standard deviation of vehicle speed, which calculates the degree of dispersion of vehicle speed data through a specific mathematical formula, etc. For traffic flow, it will calculate statistical features such as the average traffic flow, which is calculated in a similar way to the average vehicle speed, and the peak traffic flow, that is, the maximum value in the traffic flow data, etc. In terms of weather conditions, if it is rainy weather, it will calculate features such as the proportion of rainy weather in these x sample driving condition data. For road conditions, it will calculate features such as the average area of damaged road areas, etc. For the occurrence of traffic accidents, it will calculate features such as the average frequency of accidents. Combining these features extracted from aspects such as vehicle speed, traffic flow, weather conditions, road conditions, and the occurrence of traffic accidents, the first driving condition feature vector is initially formed.
[0086] Next, taking these sample driving condition data as examples, for the vehicle speed, the dynamic extraction layer of driving conditions will focus on the change of vehicle speed over time. Each sample driving condition data can be decomposed. Suppose it is decomposed into K sample driving condition segments, where K is a positive integer. For example, for a certain sample driving condition data, if each segment is 10 minutes in chronological order and this data covers 100 minutes, then K is 10. For each sample driving condition segment, it is fused with a set conversion vector for calculation to generate a segment vector for each sample driving condition segment. The set conversion vector may be a vector predefined according to prior knowledge or the model. For example, this vector contains some weight information related to the change of vehicle speed. During the fusion calculation, it may be an operation such as weighted summation of the vehicle speed data in the sample driving condition segment and the corresponding weights in the set conversion vector. Then, based on each segment vector, a corresponding driving condition feature vector is generated. For the dynamic change of vehicle speed, it may calculate features such as the change rate of vehicle speed between adjacent segments, which is obtained by subtracting the average vehicle speed of the previous segment from the average vehicle speed of the next segment and then dividing by the average vehicle speed of the previous segment; or the fluctuation amplitude of vehicle speed within a certain time window. For the traffic flow, it will focus on the increasing and decreasing trends of traffic flow between different segments, such as calculating the difference in traffic flow between adjacent segments and the fluctuation frequency of traffic flow within a specific time period. Regarding the weather condition, if the weather changes between different segments, such as from sunny to rainy, features such as the frequency of this weather change will be recorded. The road condition will focus on features such as the expansion or contraction of the damaged road area in different segments. The occurrence of traffic accidents will count features such as the distribution law of accidents in different segments. By extracting and quantifying these features, the second driving condition feature vector is formed.
[0087] Finally, during the fusion process, various methods may be adopted, such as weighted fusion. Suppose certain features in the first driving condition feature vector are considered to have a more important position in the overall risk assessment, higher weights will be assigned to them, and the features in the second driving condition feature vector will also be assigned corresponding weights according to their importance. Taking the vehicle speed feature as an example, if the average vehicle speed is considered to have an importance coefficient of 0.4 in the static features, and the change rate of the vehicle speed is considered to have an importance coefficient of 0.6 in the dynamic features, then during fusion, operations such as weighted summation will be performed on these two features according to this weight. Similar weighted fusion operations are also carried out for features such as traffic flow, weather conditions, road conditions, and the occurrence of traffic accidents. Through this comprehensive fusion method, all the features in the first driving condition feature vector and the second driving condition feature vector are integrated together, and finally, a target driving condition feature vector of x sample driving condition data is generated. This target driving condition feature vector contains comprehensive feature information of the sample driving condition data and can provide accurate input information for subsequent risk description label prediction based on the reference neural network.
[0088] In a possible implementation manner, step S1212 includes:
[0089] Step S1212-1, using natural language processing algorithms to perform semantic parsing on each risk factor knowledge block to extract the corresponding key semantic information, where the key semantic information includes risk type, risk level, risk occurrence conditions, risk impact scope, and historical risk event records.
[0090] In this embodiment, taking the risk factor knowledge block of "driving risk in bad weather" as an example, through natural language processing algorithms, the risk type of driving risk in bad weather can be accurately identified from the text description in the knowledge block. For the risk level, if it is mentioned in the knowledge block that according to factors such as historical accident data and the severity of the weather, the risk level is classified as high in this case, then the key semantic information of the risk level being high will be extracted. Regarding the risk occurrence conditions, if the description indicates that the risk occurs when there are bad weather conditions such as heavy rain, heavy snow, thick fog, etc. and the visibility is lower than a certain value, then this is the corresponding risk occurrence condition. If the risk impact scope is described as the entire road section affected by the bad weather and the roads within a certain distance before and after it, this information will also be extracted. The historical risk event records are the event information such as the number of accidents and accident types (such as rear-end collisions, skidding, etc.) that occurred in the past under such bad weather conditions sorted out from the knowledge block. Such semantic parsing operations are performed on all Y risk factor knowledge blocks to obtain the corresponding key semantic information for each knowledge block.
[0091] Step S1212-2: Classify the extracted key semantic information, and assign corresponding numerical codes to the key semantic information according to the classification results and preset coding rules, generating a dictionary containing all the key semantic information and the corresponding numerical codes.
[0092] For example, for the category of risk types, if there are multiple risk types, such as driving risks in bad weather, driving risks in construction sections, etc., according to the preset coding rules, the driving risk in bad weather may be coded as 1, and the driving risk in the construction section may be coded as 2, etc. For the risk level, if it is divided into three levels: high, medium, and low, the high risk level may be coded as 3, the medium risk level as 2, and the low risk level as 1. If the risk occurrence conditions are classified according to factors such as whether it is easy to trigger risks, the condition that is easy to trigger may be coded as 1, and the one that is more difficult to trigger as 2, etc. The risk impact range is classified according to the size of the affected area. The large-scale impact may be coded as 3, the medium-scale as 2, and the small-scale as 1. The historical risk event records are classified according to the number of accidents. The records with a large number of accidents are coded as 3, the medium number as 2, and the small number as 1, etc. Organize these coded key semantic information into a dictionary for convenient subsequent operations.
[0093] Step S1212-3: For each type of key semantic information, construct a corresponding feature mapping rule, where the feature mapping rule defines the rule for converting the key semantic information into numerical features.
[0094] Step S1212-4: According to the constructed feature mapping rule, calculate the feature value corresponding to each key semantic information, and perform normalization processing on the feature value, generating a risk factor feature vector matrix containing all the feature values and the corresponding normalization results.
[0095] Taking the risk level as an example, the constructed feature mapping rule may be to map the high risk level to the numerical interval [0.7, 1], the medium risk level to [0.4, 0.6], and the low risk level to [0, 0.3]. For the risk impact range, if the road length is used as a measurement standard, the large-scale impact may be mapped to [0.6, 1], the medium-scale to [0.3, 0.5], and the small-scale to [0, 0.2], etc. According to such a feature mapping rule, the server calculates the feature value corresponding to each key semantic information. For example, for a certain risk factor knowledge block where the risk level is high, the calculated feature value according to the mapping rule may be 0.8. After calculating the feature values for all key semantic information, perform normalization processing on these feature values to unify their values into a specific interval, such as [0, 1], thereby generating a risk factor feature vector matrix containing all the feature values and the corresponding normalization results.
[0096] Step S1212-5: Use the covariance analysis algorithm or the association rule mining algorithm to identify the association relationships between different features in the risk factor feature vector matrix, and based on the identified association relationships, construct an associated risk factor feature matrix, where the associated features in the associated risk factor feature matrix are used to reflect the interactions and influences between different risk factors.
[0097] In the risk factor feature vector matrix, there are potential relationships between the eigenvalues corresponding to different key semantic information. For example, in the matrix corresponding to the risk factor knowledge block of "driving risk in bad weather", there may be an association between the risk level and the risk impact range. If the risk level is high, the risk impact range is usually larger, and this association relationship can be quantified through the covariance analysis algorithm. The association rule mining algorithm may find association relationships such as if the number of accident records in the historical risk event records is large, then the risk level is usually high. Based on these identified association relationships, an associated risk factor feature matrix is constructed, and the associated features in this matrix can reflect the interactions and influences between different risk factors. For example, the mutual influence relationship between the risk level and the risk impact range will be correspondingly reflected in the matrix.
[0098] Step S1212-6: Use the recursive feature elimination algorithm or the expert knowledge base to evaluate the importance of each associated feature in the associated risk factor feature matrix, and assign corresponding feature weights to each associated feature according to the evaluation results. The magnitude of the feature weight reflects the contribution degree of the associated feature in risk prediction.
[0099] For example, for the associated risk factor feature matrix of "driving risk in bad weather", if the recursive feature elimination algorithm analyzes and finds that the risk level has a higher importance in risk prediction, it may assign a feature weight of 0.4 to it, while the risk impact range has a relatively lower importance and may be assigned a feature weight of 0.3. If evaluated using the expert knowledge base, the expert judges based on experience that the historical risk event records are of great significance for risk prediction in certain cases and may assign a higher weight to it. Reasonable feature weights are assigned to each associated feature according to these evaluation results.
[0100] Step S1212-7: Use the feature weights to perform weighted processing on the associated risk factor features. After generating a weighted risk factor feature vector, according to the selected fusion strategy, perform fusion processing on the weighted risk factor feature vector to generate a fused risk factor vector, and match the corresponding standardization method according to the distribution pattern of the fused risk factor vector. The standardization methods include normalization, standardization, or regularization.
[0101] Next, the server performs a weighting process on the associated risk factor features using the feature weights to generate a weighted risk factor feature vector. For each associated feature in the associated risk factor feature matrix, its eigenvalue is multiplied by the corresponding feature weight, and then these weighted eigenvalues are combined in a certain order to form a weighted risk factor feature vector. After that, according to the selected fusion strategy, the weighted risk factor feature vector is fused to generate a fused risk factor vector. If the selected fusion strategy is weighted average, then each element in the weighted risk factor feature vector is averaged according to the weights to obtain the fused risk factor vector. A corresponding standardization method is matched according to the distribution pattern of the fused risk factor vector, and the standardization methods include normalization, standardization, or regularization. If the distribution of the fused risk factor vector is relatively dispersed, the normalization method may be selected.
[0102] Step S1212-8, perform standardization processing on the fused risk factor vector using the selected standardization method to generate the target risk factor knowledge vector of the Y risk factor knowledge blocks.
[0103] For example, if the normalization method is selected, each element in the fused risk factor vector is calculated according to the normalization formula so that the elements in the vector meet specific requirements, such as the sum of all elements being 1 or the value range of the elements being within a specific interval, etc. Finally, the target risk factor knowledge vector of the Y risk factor knowledge blocks that meets the requirements is obtained. This target risk factor knowledge vector can accurately represent the characteristics of the risk factor knowledge blocks and provide effective input for subsequent risk description label prediction.
[0104] In a possible implementation manner, step S122 includes:
[0105] Step S1221, concatenate the target driving road condition feature vector and the target risk factor knowledge vector to generate a concatenated feature vector.
[0106] Step S1222, perform cross-correlation training based on the concatenated feature vector to generate cross-correlation training features.
[0107] Step S1223, for each of the sample driving road condition data, obtain the target cross-correlation training features of the sample driving road condition data for each of the local risk description labels from the cross-correlation training features, and calculate the similarity score between each of the target cross-correlation training features and the set label features to generate a similarity score result.
[0108] Step S1224, perform standardization conversion on each of the similarity score results to generate a standardization conversion result, and determine the standardization conversion result as the confidence level of the sample driving road condition data matching the corresponding local risk description label.
[0109] Step S1225: Generate a risk description label prediction result for the sample driving road condition data based on the respective confidence levels corresponding to the sample driving road condition data.
[0110] In a possible implementation manner, step S1222 includes:
[0111] Step S1222-1: Determine format information of a weight matrix required for cross-correlation training according to dimension information of the connection feature vector. Specifically, if the dimension of the connection feature vector is n-dimensional, initialize a weight matrix with a shape of [n, m], where m is a preset value related to the dimension of the expected cross-correlation training feature or the network structure. Meanwhile, initialize a bias vector that matches the weight matrix, and the dimension of the bias vector is m-dimensional. Then, set the number of rounds of cross-correlation training and the learning rate, and the learning rate will be used to adjust the update step sizes of the weight matrix and the bias vector during the training process.
[0112] Step S1222-2: Use the connection feature vector as the input data structure of the input layer, and determine whether it is necessary to construct a hidden layer of the cross-correlation training basic structure according to the format information of the weight matrix. If it is necessary to construct a hidden layer, determine the number of neurons in the hidden layer. The number of neurons is determined according to the dimension of the connection feature vector and the complexity of the expected output feature. Also, define an activation function for the hidden layer of the cross-correlation training basic structure and construct an output layer. The number of neurons in the output layer matches the dimension of the ultimately expected cross-correlation training feature.
[0113] Step S1222-3: Input the connection feature vector into the input layer of the constructed cross-correlation training basic structure to directly transfer the connection feature vector to the next layer through the input layer. Specifically, if there is a hidden layer, for each neuron in the hidden layer, perform a weighted summation operation on the input connection feature vector and the corresponding weight in the weight matrix and then add the corresponding bias value in the bias vector to generate an intermediate result. Then, perform a non-linear transformation on the intermediate result through the activation function to obtain the output of the hidden layer. The output of this hidden layer is used as the input of the next layer to repeat the above operations of weighted summation, adding the bias value, and the activation function until reaching the output layer. In the output layer, perform weighted summation and add the bias value operations to obtain a temporary output result, and the temporary output result is a preliminary result of cross-correlation training calculated based on the current weight matrix and bias vector.
[0114] Step S1222-4: Input the temporary output result into the mean squared error loss function, calculate the mean of the squares of the differences between each element of the temporary output result and the pre-set target cross-correlation training feature, and output the corresponding loss function value.
[0115] Step S1222-5: According to the calculated loss function value, starting from the output layer, calculate the contribution degree of each weight and bias to the loss function value in reverse. Specifically, for the output layer, use the derivative rule to calculate the derivatives of the loss function value with respect to the weights and biases of the output layer. These derivatives reflect the influence degree of the changes in weights and biases on the loss function value. Then multiply the derivatives by the pre-set learning rate to obtain the update amounts of the weights and biases of the output layer. Next, for the hidden layer, multiply the error information passed from the output layer by the derivative of the activation function of the hidden layer to obtain the update amounts of the weights and biases of the hidden layer. Thus, the update amounts of the weights and biases of each layer are obtained.
[0116] Step S1222-6: Use the calculated update amounts of the weights and biases to update the current weight matrix and bias vector. Specifically, for the weight matrix, subtract the corresponding weight update amount from each element. For the bias vector, subtract the corresponding bias update amount from each element. Thus, the updated weight matrix and bias vector are obtained.
[0117] Step S1222-7: Check whether the number of completed training rounds has reached the pre-set number of training rounds. If the set number of training rounds has been reached, it means that the cross-correlation training is completed. Otherwise, it means that the training is not yet completed and the next round of training needs to continue.
[0118] Step S1222-8: After the cross-correlation training is completed, input the connection feature vector into the trained cross-correlation training basic structure again to obtain the cross-correlation training feature, which reflects the cross-correlation relationship between the internal elements of the connection feature vector.
[0119] In this embodiment, first, the server concatenates the target driving road condition feature vector and the target risk factor knowledge vector to generate a concatenated feature vector. For example, if the target driving road condition feature vector is a vector with a dimension of p, which contains the feature values after encoding information such as vehicle speed, traffic flow, weather conditions, road conditions, and the occurrence of traffic accidents, and the target risk factor knowledge vector is a vector with a dimension of q, which contains the feature values after encoding risk factors such as risk types, risk levels, risk occurrence conditions, risk impact ranges, and historical risk event records, then the dimension of the concatenated feature vector obtained by concatenating these two vectors is p + q. This concatenated feature vector integrates the information of both driving road conditions and risk factors, providing comprehensive input for subsequent cross-correlation training.
[0120] Next, the server performs cross-correlation training based on the concatenated feature vector to generate cross-correlation training features. This process is relatively complex and involves multiple sub-steps. According to the dimension information of the concatenated feature vector, the format information of the weight matrix required for cross-correlation training is determined. Suppose the dimension of the concatenated feature vector is n. Then, a weight matrix with a shape of [n, m] is initialized, where m is a pre-set value related to the dimension of the expected cross-correlation training features or the network structure. At the same time, a bias vector matching the weight matrix is initialized, with a dimension of m. For example, if n = 100 and m = 50 is determined according to the network structure and the complexity of the expected output features, then a [100, 50] weight matrix and a 50-dimensional bias vector are initialized. Then, the number of rounds of cross-correlation training is set to T rounds (e.g., T = 100) and the learning rate α (e.g., α = 0.01). The learning rate will be used to adjust the update step sizes of the weight matrix and the bias vector during the training process.
[0121] After that, using the concatenated feature vector as the input data structure of the input layer, it is determined whether a hidden layer of the cross-correlation training basic structure needs to be constructed according to the format information of the weight matrix. If a hidden layer needs to be constructed, the number of neurons in the hidden layer is determined according to the dimension of the concatenated feature vector and the complexity of the expected output features. For example, if the dimension of the concatenated feature vector is relatively high and relatively complex features are expected to be output, the number of neurons in the hidden layer may be determined to be 30. At the same time, the activation function (such as the ReLU function) of the hidden layer of the cross-correlation training basic structure is defined and the output layer is constructed. The number of neurons in the output layer matches the dimension of the finally expected cross-correlation training features (assumed to be 20).
[0122] Subsequently, the connected feature vector is input into the input layer of the constructed cross-correlation training infrastructure to directly pass the connected feature vector to the next layer through the input layer. If there is a hidden layer, for each neuron in the hidden layer, the input connected feature vector is weighted and summed with the corresponding weights in the weight matrix and then added with the corresponding bias value in the bias vector to generate an intermediate result. For example, for the i-th neuron in the hidden layer, let the connected feature vector be x, the corresponding weight in the weight matrix be w_i, and the bias value in the bias vector be b_i. Then the intermediate result z_i = ∑(x_j * w_i_j) + b_i (j represents the dimension index of the connected feature vector). Then the intermediate result is non-linearly transformed through an activation function to obtain the output of the hidden layer. The output of this hidden layer is used as the input of the next layer to repeat the above operations of weighted summation, adding bias value, and activation function until the output layer is reached. In the output layer, operations of weighted summation and adding bias value are performed to obtain a temporary output result. This temporary output result is the preliminary result of cross-correlation training calculated based on the current weight matrix and bias vector.
[0123] Then the temporary output result is input into the mean squared error loss function to calculate the average of the squares of the differences between each element of the temporary output result and the pre-set target cross-correlation training feature, and the corresponding loss function value is output. Assume the temporary output result is y_pred, the target cross-correlation training feature is y_true, and the mean squared error loss function is MSE = (1 / N) * ∑((y_pred_i - y_true_i)^2) (N is the number of elements, and i is the element index).
[0124] According to the calculated loss function value, starting from the output layer, the contribution degree of each weight and bias to the loss function value is calculated in reverse. For the output layer, the derivative of the loss function value with respect to the output layer weights and biases is calculated using the derivative rule, and this derivative reflects the influence degree of the changes in weights and biases on the loss function value. Then the derivative is multiplied by the pre-set learning rate to obtain the update amounts of the output layer weights and biases. Next, for the hidden layer, the error information passed from the output layer is multiplied by the derivative of the activation function of the hidden layer to obtain the update amounts of the hidden layer weights and biases, thereby obtaining the update amounts of the weights and biases of each layer. For example, for the output layer weight w_out, let its derivative be dw_out, then the update amount Δw_out = α * dw_out. For the bias b_out, let its derivative be db_out, and the update amount Δb_out = α * db_out. For the hidden layer weights w_hidden and biases b_hidden, the update amounts are obtained through similar calculations based on the error information passed from the output layer.
[0125] Update the current weight matrix and bias vector using the calculated weight and bias update amounts. For the weight matrix, subtract each element by the corresponding weight update amount. For the bias vector, subtract each element by the corresponding bias update amount, thereby obtaining the updated weight matrix and bias vector. Then check whether the number of completed training rounds has reached the preset number of training rounds. If the preset number of training rounds (e.g., 100 rounds) has been reached, it indicates that the cross-correlation training is completed. Otherwise, it indicates that the training is not completed and the next round of training needs to be continued.
[0126] After the cross-correlation training is completed, input the connection feature vector into the trained cross-correlation training infrastructure again to obtain the cross-correlation training features. These cross-correlation training features reflect the cross-correlation relationships among the internal elements of the connection feature vector. For example, for the relationship between the vehicle speed and the risk level in the connection feature vector, if it is found during the training process that the risk level tends to be higher when the vehicle speed is higher, then this relationship will be reflected in the cross-correlation training features.
[0127] Next, for each sample driving condition data, obtain the target cross-correlation training features of the sample driving condition data for each local risk description label from the cross-correlation training features, and calculate the similarity score between each target cross-correlation training feature and the set label feature to generate a similarity score result. Taking a certain data in the sample driving condition data as an example, assume that the local risk description labels include "driving risk in bad weather", "driving risk in construction sections", "driving risk during high traffic flow periods", etc. For the local risk description label "driving risk in bad weather", obtain the target cross-correlation training features related to this label from the cross-correlation training features, and then calculate the similarity score between it and the set label feature of "driving risk in bad weather". The cosine similarity calculation method may be used to calculate the similarity score. Let the target cross-correlation training feature be x and the set label feature be y, then the similarity score s = (x·y) / (||x||*||y||), where · represents the vector dot product, and ||x|| and ||y|| represent the norms of vectors x and y respectively. Perform such calculations for each local risk description label to generate the corresponding similarity score results.
[0128] After that, a normalization transformation is performed on each similarity score result to generate a normalization transformation result, and the normalization transformation result is determined as the confidence level of the sample driving condition data matching the corresponding local risk description label. For example, a normalization method is used to map the similarity score result to the interval [0, 1]. Suppose the similarity score result of a sample driving condition data for the label "Driving risk in bad weather" is 0.6, and the normalization transformation result obtained after normalization is 0.6, and this 0.6 is determined as the confidence level of the sample driving condition data matching the local risk description label of "Driving risk in bad weather".
[0129] Finally, based on the confidence levels corresponding to the sample driving condition data, a risk description label prediction result of the sample driving condition data is generated. For example, if the confidence level of a sample driving condition data for "Driving risk in bad weather" is 0.8, the confidence level for "Driving risk in construction sections" is 0.1, and the confidence level for "Driving risk during high traffic flow periods" is 0.1, then it can be considered that the risk description label prediction result of this sample driving condition data is more inclined to "Driving risk in bad weather".
[0130] In a possible implementation manner, the reference neural network further includes a feature fusion unit.
[0131] Step S130 may include: associating the current target risk factor knowledge vector with the current driving condition knowledge representation unit and the current feature fusion unit to generate a risk description label prediction network.
[0132] For example, the target risk factor knowledge vector contains information about various risk factors, the driving condition knowledge representation unit contains feature information of the driving condition, and the feature fusion unit has the ability to fuse different information. By associating them, the risk description label prediction network can comprehensively utilize this information for accurate risk description label prediction. Specifically, it may be to fuse and associate information such as the risk level and risk impact range in the target risk factor knowledge vector with information such as vehicle speed and traffic flow in the driving condition knowledge representation unit through the feature fusion unit according to certain rules, so as to construct a risk description label prediction network, and this risk description label prediction network can play a role in subsequent risk description label prediction of new driving condition data.
[0133] Figure 2 FIG. shows the hardware structure diagram of a highway safety control system 100 based on a control unit provided in an embodiment of the present invention for implementing the above-mentioned highway safety control method based on a control unit, as Figure 2As shown, the highway safety control system 100 based on a control unit may include a processor 110, a machine-readable storage medium 120, a bus 130, and a communication unit 140.
[0134] The machine-readable storage medium 120 may store data and / or instructions. In some embodiments, the machine-readable storage medium 120 may store data obtained from an external terminal. In some embodiments, the machine-readable storage medium 120 may store data and / or instructions that the highway safety control system 100 based on a control unit uses to execute or complete the exemplary methods described in the present invention.
[0135] In a specific implementation process, one or more processors 110 execute computer-executable instructions stored in the machine-readable storage medium 120, so that the processor 110 can execute the highway safety control method based on a control unit as described in the above method embodiments. The processor 110, the machine-readable storage medium 120, and the communication unit 140 are connected through the bus 130, and the processor 110 can be used to control the sending and receiving actions of the communication unit 140.
[0136] For the specific implementation process of the processor 110, reference may be made to the various method embodiments executed by the highway safety control system 100 based on a control unit above. Their implementation principles and technical effects are similar, and will not be elaborated here in this embodiment.
[0137] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When a processor executes the computer-executable instructions, the above highway safety control method based on a control unit is implemented.
[0138] It should be noted that, in order to simplify the description of the present invention disclosure and thus help the understanding of one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, sometimes multiple features are merged into one embodiment, drawing, or description thereof.
Claims
1. A highway safety control method based on a control unit, characterized in that, The method includes: Obtaining x sample driving condition data and Y risk factor knowledge blocks from the sample driving condition data sequences of each sample control unit on the sample highway; the sample driving condition data sequences include X sample driving condition data and the Y risk factor knowledge blocks, the Y risk factor knowledge blocks are in one-to-one correspondence with Y local risk description labels of the target risk description label, and the risk factor knowledge blocks are used for knowledge vector representation of the corresponding local risk description labels; x, X, and Y are positive integers, and x is less than X; Loading the x sample driving condition data and the Y risk factor knowledge blocks into a reference neural network for risk description label prediction, and generating a risk description label prediction result for each of the sample driving condition data; the reference neural network includes a driving condition knowledge representation unit, a risk factor knowledge representation unit, and a feature fusion unit, the reference neural network is generated by fine-tuning the parameters based on an initialized neural network, the initialized neural network is generated by optimizing the network parameters based on a plurality of training data combinations, and the training data combinations are combinations composed of training driving condition data and training risk factor knowledge blocks; If it is determined that the requirements for network training convergence are met based on the risk description label prediction result, then obtaining a risk description label prediction network from the reference neural network, including: associating the current target risk factor knowledge vector with the current driving condition knowledge representation unit and the current feature fusion unit to generate a risk description label prediction network, and the target risk factor knowledge vector is generated according to the Y risk factor knowledge blocks; Obtaining the target driving condition data of the target control unit of the input highway, performing risk description label prediction on the target driving condition data through the risk description label prediction network, generating a risk description label prediction result of the target driving condition data, and generating a control suggestion for the target control unit according to the risk description label prediction result; the risk description label prediction result is used to reflect the target local risk description label matched by the target driving condition data among the multiple local risk description labels included in the target risk description label.
2. The highway safety control method based on a control unit according to claim 1, characterized in that The step of loading the x sample driving condition data and the Y risk factor knowledge blocks into a reference neural network for risk description label prediction, and generating a risk description label prediction result for each of the sample driving condition data, includes: Loading the x sample driving condition data and the Y risk factor knowledge blocks into a reference neural network, and using the reference neural network to perform encoding representation on the x sample driving condition data and the Y risk factor knowledge blocks, generating target driving condition feature vectors of the x sample driving condition data and target risk factor knowledge vectors of the Y risk factor knowledge blocks; Using the reference neural network to perform risk description label prediction based on the target driving condition feature vectors and the target risk factor knowledge vectors, and generating a risk description label prediction result for each of the sample driving condition data.
3. The freeway safety control method based on a control unit according to claim 2, wherein Loading the x sample driving condition data and the Y risk factor knowledge chunks into a reference neural network, and using the reference neural network to perform encoding representation on the x sample driving condition data and the Y risk factor knowledge chunks to generate a target driving condition feature vector of the x sample driving condition data and a target risk factor knowledge vector of the Y risk factor knowledge chunks, including: Loading the x sample driving condition data into the driving condition knowledge representation unit, and using the driving condition knowledge representation unit to perform encoding representation on the x sample driving condition data to generate a target driving condition feature vector of the x sample driving condition data; Loading the Y risk factor knowledge chunks into the risk factor knowledge representation unit, and using the risk factor knowledge representation unit to perform encoding representation on the Y risk factor knowledge chunks to generate a target risk factor knowledge vector of the Y risk factor knowledge chunks.
4. The highway safety control method based on a control unit according to claim 3, characterized in that The initialized neural network includes a driving condition static extraction layer, and the driving condition knowledge representation unit includes the driving condition static extraction layer and a driving condition dynamic extraction layer; The using the driving condition knowledge representation unit to perform encoding representation on the x sample driving condition data to generate a target driving condition feature vector of the x sample driving condition data, including: Using the driving condition static extraction layer to perform feature extraction on the x sample driving condition data to generate a first driving condition feature vector; Using the driving condition dynamic extraction layer to perform feature extraction on the x sample driving condition data to generate a second driving condition feature vector; Fusing the first driving condition feature vector and the second driving condition feature vector to generate a target driving condition feature vector of the x sample driving condition data.
5. The freeway safety control method based on a control unit according to claim 4, characterized in that, The performing feature extraction on the x sample driving condition data includes: Decomposing each sample driving condition data to generate K sample driving condition segments of each sample driving condition data; K is a positive integer; Performing fusion calculation on each sample driving condition segment and a set conversion vector to generate a segment vector of each sample driving condition segment; Generating a corresponding driving condition feature vector based on each segment vector.
6. The freeway safety control method based on a control unit according to claim 3, wherein, The using the risk factor knowledge representation unit to perform encoding representation on the Y risk factor knowledge chunks to generate a target risk factor knowledge vector of the Y risk factor knowledge chunks, including: Using a natural language processing algorithm to perform semantic parsing on each risk factor knowledge chunk to extract corresponding key semantic information, where the key semantic information includes a risk type, a risk level, a risk occurrence condition, a risk impact range, and a historical risk event record; Classifying the extracted key semantic information, and assigning corresponding numerical codes to the key semantic information according to the classification result and a preset encoding rule to generate a dictionary including all the key semantic information and the corresponding numerical codes; For each type of key semantic information, construct corresponding feature mapping rules, where the feature mapping rules define the rules for converting the key semantic information into numerical features; According to the constructed feature mapping rules, calculate the feature values corresponding to each key semantic information, and perform normalization processing on the feature values to generate a risk factor feature vector matrix containing all the feature values and their corresponding normalization results; Use covariance analysis algorithm or association rule mining algorithm to identify the association relationships between different features in the risk factor feature vector matrix, and based on the identified association relationships, construct an associated risk factor feature matrix, where the associated features in the associated risk factor feature matrix are used to reflect the interaction and influence between different risk factors; Use recursive feature elimination algorithm or expert knowledge to evaluate the importance of each associated feature in the associated risk factor feature matrix, and assign corresponding feature weights to each associated feature according to the evaluation results, where the magnitude of the feature weights reflects the contribution degree of the associated feature in risk prediction; Use the feature weights to perform weighted processing on the associated risk factor features, generate a weighted risk factor feature vector, and then according to the selected fusion strategy, perform fusion processing on the weighted risk factor feature vector to generate a fused risk factor vector, and match the corresponding standardization method according to the distribution pattern of the fused risk factor vector, where the standardization method includes normalization, standardization or regularization; Use the selected standardization method to perform standardization processing on the fused risk factor vector to generate the target risk factor knowledge vector of the Y risk factor knowledge blocks.
7. The highway safety control method based on a control unit according to claim 2, wherein Using the reference neural network, based on the target driving road condition feature vector and the target risk factor knowledge vector, perform risk description label prediction to generate the risk description label prediction results for each of the sample driving road condition data, including: Connect the target driving road condition feature vector and the target risk factor knowledge vector to generate a connected feature vector; Perform mutual association training based on the connected feature vector to generate mutual association training features; For each of the sample driving road condition data, obtain the target mutual association training features of the sample driving road condition data for each of the local risk description labels from the mutual association training features, and calculate the similarity score between each of the target mutual association training features and the set label features to generate a similarity score result; Perform standardization conversion on each of the similarity score results to generate a standardization conversion result, and determine the standardization conversion result as the confidence level of the sample driving road condition data matching the corresponding local risk description label; Based on the confidence levels corresponding to the sample driving road condition data, generate the risk description label prediction results for the sample driving road condition data.
8. The freeway safety control method based on a control unit according to claim 7, characterized in that The step of performing mutual association training based on the connected feature vector to generate mutual association training features includes: Determine the format information of the weight matrix required for cross-correlation training according to the dimensional information of the connection feature vector. Among them, if the dimension of the connection feature vector is n-dimensional, initialize a weight matrix with a shape of [n, m], where m is a preset value related to the dimension of the expected cross-correlation training feature or the network structure. At the same time, initialize a bias vector that matches the weight matrix, and the dimension of the bias vector is m-dimensional. Then set the number of rounds and the learning rate of the cross-correlation training. The learning rate will be used to adjust the update step sizes of the weight matrix and the bias vector during the training process; Use the connection feature vector as the input data structure of the input layer. Determine whether it is necessary to construct the hidden layer of the cross-correlation training basic structure according to the format information of the weight matrix. If it is necessary to construct the hidden layer, determine the number of neurons in the hidden layer. The number of neurons is determined according to the dimension of the connection feature vector and the complexity of the expected output feature. And define the activation function of the hidden layer of the cross-correlation training basic structure and construct the output layer. The number of neurons in the output layer matches the dimension of the finally expected cross-correlation training feature; Input the connection feature vector into the input layer of the constructed cross-correlation training basic structure to directly transfer the connection feature vector to the next layer through the input layer. Among them, if there is a hidden layer, for each neuron in the hidden layer, perform a weighted sum operation on the input connection feature vector and the corresponding weight in the weight matrix and then add the corresponding bias value in the bias vector to generate an intermediate result. Then perform a non-linear transformation on the intermediate result through the activation function to obtain the output of the hidden layer. The output of this hidden layer is used as the input of the next layer to repeat the above operations of weighted sum, adding bias value and activation function until reaching the output layer. Then perform weighted sum and adding bias value operations in the output layer to obtain a temporary output result. The temporary output result is the preliminary result of cross-correlation training calculated based on the current weight matrix and bias vector; Input the temporary output result into the mean square error loss function, calculate the average value of the squares of the differences of each element between the temporary output result and the preset target cross-correlation training feature, and output the corresponding loss function value; According to the calculated loss function value, starting from the output layer, calculate the contribution degree of each weight and bias to the loss function value in reverse. Among them, for the output layer, use the derivative rule to calculate the derivatives of the loss function value with respect to the weights and biases of the output layer. The derivatives reflect the influence degree of the changes of the weights and biases on the loss function value. Then multiply the derivatives by the preset learning rate to obtain the update amounts of the weights and biases of the output layer. Next, for the hidden layer, multiply the error information passed by the output layer by the derivative of the activation function of the hidden layer to obtain the update amounts of the weights and biases of the hidden layer. Thus, the update amounts of the weights and biases of each layer are obtained; Update the current weight matrix and bias vector using the calculated weight and bias update amounts. Specifically, for the weight matrix, subtract the corresponding weight update amount from each element; for the bias vector, subtract the corresponding bias update amount from each element, thereby obtaining the updated weight matrix and bias vector. Check whether the number of completed training rounds has reached the pre-set number of training rounds. If the set number of training rounds has been reached, it indicates that the co-correlation training is completed; otherwise, it indicates that the training is not yet completed and the next round of training needs to be continued. After the co-correlation training is completed, input the connection feature vector into the trained co-correlation training basic structure again to obtain the co-correlation training feature, which reflects the co-correlation relationship between the internal elements of the connection feature vector.
9. A highway safety control system based on a control unit, characterized in that, The highway safety control system based on the control unit includes a processor and a memory. The memory is connected to the processor. The memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the highway safety control method based on the control unit according to any one of claims 1-8 above.
Citation Information
Patent Citations
Highway risk automatic evaluation method based on feature construction and fusion
CN109671274A
Highway traffic operation real-time risk assessment method based on neural network
CN110910641A