Driving danger prediction method and device based on adaptive fuzzy neural network
By using adaptive fuzzy neural network and genetic algorithm to optimize parameters in the driving hazard prediction system, the problem of insufficient accuracy and adaptability of driving risk assessment in the prior art is solved, and efficient and accurate driving hazard prediction and driving decision support are achieved.
Patent Information
- Application Number
- CN202411565407.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
AI Technical Summary
When facing complex and changing environments, it is difficult for the prior art to accurately and in real time to evaluate driving risks, and the model is insufficiently adaptable and the parameter optimization efficiency is low, resulting in a reduction in prediction accuracy.
The driving hazard prediction method based on adaptive fuzzy neural network is adopted. By collecting original variables from the vehicle driving environment, dimensionality reduction processing is performed to obtain key variables, building a driving hazard prediction model, and optimizing the front and rear parts parameters of the model using genetic algorithms.
It improves the adaptability and prediction accuracy of the model, realizes accurate and real-time driving risk assessment, and enhances the driving decision-making support capabilities of smart vehicles.
Smart Images

Figure CN119537834A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of new energy vehicles, and in particular to a method and device for predicting driving hazards based on an adaptive fuzzy neural network. Background Art
[0002] The driving process of a vehicle on the road is a highly complex dynamic interactive system that involves real-time acquisition of environmental information and timely driving decisions. The vehicle's speed, distance to other vehicles, and intersection status directly affect the vehicle's judgment of the current driving risk. When the driving risk is small, the vehicle will usually choose to speed up; when the driving risk is large, the vehicle will slow down or give way. Therefore, how to accurately characterize the relationship between environmental information and driving hazards is the key to ensuring vehicle safety and optimizing driving behavior.
[0003] At present, a relatively advanced method for solving complex nonlinear system problems is the adaptive neuro-fuzzy inference system (ANFIS). ANFIS combines the self-learning and adaptive capabilities of neural networks with the rule interpretability of fuzzy logic systems, and has good potential in dealing with driving decisions in complex environments.
[0004] However, the existing ANFIS-based driving risk judgment method is difficult to accurately and in real time assess risks when faced with complex and changing environments, and it is difficult to accurately characterize the relationship between environmental information and driving risks. Especially in nonlinear and dynamically changing scenarios, the adaptability and prediction accuracy of traditional methods are limited. In addition, traditional methods usually require a large number of rules to be preset manually, and cannot flexibly handle complex driving scenarios. However, the performance of these rules in actual driving may not be efficient enough or cannot cope with all scenarios, so there is a lack of flexible decision-making mechanisms. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a method and device for predicting driving hazards based on an adaptive fuzzy neural network to solve the problems existing in the prior art, such as insufficient model adaptability and low parameter optimization efficiency, which lead to reduced model prediction accuracy and difficulty in accurately and in real time assessing driving risks.
[0006] In a first aspect of an embodiment of the present application, a method for predicting driving danger based on an adaptive fuzzy neural network is provided, comprising: collecting original variables used to reflect the state of a vehicle from a vehicle driving environment, and performing dimensionality reduction processing on the original variables to obtain key variables used to predict driving danger values; constructing a driving danger prediction model based on an adaptive fuzzy neural network, wherein the driving danger prediction model uses key variables as input and driving danger values as output; optimizing antecedent parameters and consequent parameters of the driving danger prediction model using a genetic algorithm, wherein the optimization of the antecedent parameters includes optimizing the center position and standard deviation of the membership function according to selection, crossover and mutation operations of the genetic algorithm, and the optimization of the consequent parameters includes optimizing the linear combination parameters in the fuzzy inference rules; inputting the vehicle state data acquired in real time into the optimized driving danger prediction model, and outputting a driving danger value used to characterize the driving danger, wherein the driving danger value is used to instruct the vehicle to slow down and yield or accelerate first.
[0007] According to a second aspect of an embodiment of the present application, a driving hazard prediction device based on an adaptive fuzzy neural network is provided, comprising: an acquisition module configured to acquire original variables for reflecting vehicle status from a vehicle driving environment, and perform dimensionality reduction processing on the original variables to obtain key variables for predicting driving hazard values; a construction module configured to construct a driving hazard prediction model based on an adaptive fuzzy neural network, wherein the driving hazard prediction model uses key variables as input and driving hazard values as output; an optimization module configured to optimize antecedent parameters and consequent parameters of the driving hazard prediction model using a genetic algorithm, wherein the optimization of the antecedent parameters includes optimizing the center position and standard deviation of the membership function according to the selection, crossover and mutation operations of the genetic algorithm, and the optimization of the consequent parameters includes optimizing the linear combination parameters in the fuzzy inference rules; a prediction module configured to input the vehicle status data acquired in real time into the optimized driving hazard prediction model, and output a driving hazard value for characterizing driving hazard, wherein the driving hazard value is used to instruct the vehicle to slow down and yield or accelerate first.
[0008] According to a third aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the computer program.
[0009] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0010] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0011] By collecting the original variables used to reflect the vehicle status from the vehicle driving environment and performing dimensionality reduction processing on the original variables, the key variables used to predict the driving risk value are obtained; a driving risk prediction model is constructed based on an adaptive fuzzy neural network, wherein the driving risk prediction model uses the key variables as input and the driving risk value as output; the antecedent parameters and the consequent parameters of the driving risk prediction model are optimized using a genetic algorithm, wherein the optimization of the antecedent parameters includes optimizing the central position and standard deviation of the membership function according to the selection, crossover and mutation operations of the genetic algorithm, and the optimization of the consequent parameters includes optimizing the linear combination parameters in the fuzzy inference rules; the vehicle status data obtained in real time is input into the optimized driving risk prediction model, and the driving risk value used to characterize the driving risk is output, wherein the driving risk value is used to instruct the vehicle to slow down and give way or accelerate first. The present application can improve the adaptability of the model, improve the efficiency of parameter optimization, and thus improve the accuracy of the model prediction, thereby realizing accurate and real-time driving risk assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 It is a flow chart of a method for predicting driving danger based on an adaptive fuzzy neural network provided in an embodiment of the present application;
[0014] Figure 2 is a schematic diagram of a road intersection in an actual driving scenario provided by an embodiment of the present application;
[0015] Figure 3 It is a schematic diagram of the structure of an adaptive fuzzy neural network (ANFIS) provided in an embodiment of the present application;
[0016] Figure 4 It is a schematic diagram of the training process of the driving hazard reasoning model provided in the embodiment of the present application;
[0017] Figure 5 It is a structural schematic diagram of a driving hazard prediction device based on an adaptive fuzzy neural network provided in an embodiment of the present application;
[0018] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0020] How a vehicle makes dynamic driving decisions while driving on the road is a complex process that involves the information the vehicle obtains from the environment in real time and makes driving decisions such as acceleration or deceleration based on this information. The driving behavior of a vehicle is directly affected by many factors in the environment, such as vehicle speed, distance to the vehicle in front, and the status of other vehicles on the road.
[0021] Currently, the judgment of whether there is danger during driving mainly depends on the analysis of environmental information, such as the speed of the vehicle, the distance between the intersection and other vehicles, etc. This information is used to predict the current driving risk. If the vehicle judges that the driving risk is low, it will generally choose to accelerate; if the risk is high, it will choose to slow down. This driving behavior decision based on environmental data is crucial for safe driving.
[0022] In solving this problem, Adaptive Neuro-Fuzzy Inference System (ANFIS) is a promising technology. ANFIS combines the advantages of neural networks and fuzzy systems, with the self-learning and adaptive capabilities of neural networks and the rule interpretability of fuzzy systems. This makes it particularly suitable for scenarios such as driving decisions when dealing with complex, nonlinear problems.
[0023] However, the prior art still has the following disadvantages:
[0024] 1) It is difficult to accurately characterize the relationship between environmental information and driving risk: Existing driving risk judgment methods are difficult to accurately and in real time assess risks in complex and changing environments. Especially in nonlinear and dynamically changing scenarios, the adaptability and prediction accuracy of traditional methods are limited.
[0025] 2) Lack of flexible decision-making mechanism: Traditional methods usually require a large number of rules to be preset manually, which cannot flexibly handle complex driving scenarios. In actual driving, these rules may not be efficient enough or cannot cope with all scenarios.
[0026] Therefore, how to more accurately and flexibly process the environmental data collected during vehicle driving and make more intelligent driving decisions has become the main challenge in existing technologies.
[0027] In view of the problems existing in the prior art, in order to solve the problem that it is difficult to accurately characterize the relationship between environmental information and vehicle driving hazards in the prior art, this application proposes a driving hazard model based on GA-ANFIS (Genetic Algorithm Optimized Adaptive Neuro-Fuzzy Inference System). The model analyzes the vehicle driving data set, uses principal component analysis (PCA) to screen out variables that have a greater impact on vehicle traffic decisions, optimizes the network structure parameters of the neuro-fuzzy system (ANFIS), and thus improves the system's speed and global optimization capabilities.
[0028] Figure 1 is a flow chart of a method for predicting driving hazards based on an adaptive fuzzy neural network provided in an embodiment of the present application. Figure 1 As shown, the driving hazard prediction method based on the adaptive fuzzy neural network may specifically include:
[0029] S101, collecting original variables for reflecting vehicle status from the vehicle driving environment, and performing dimensionality reduction processing on the original variables to obtain key variables for predicting driving risk values;
[0030] S102, constructing a driving hazard prediction model based on an adaptive fuzzy neural network, wherein the driving hazard prediction model takes key variables as input and takes driving hazard values as output;
[0031] S103, optimizing the antecedent parameters and the consequent parameters of the traffic hazard prediction model by using a genetic algorithm, wherein the optimization of the antecedent parameters includes optimizing the central position and the standard deviation of the membership function according to the selection, crossover and mutation operations of the genetic algorithm, and the optimization of the consequent parameters includes optimizing the linear combination parameters in the fuzzy inference rule;
[0032] S104, inputting the vehicle status data acquired in real time into the optimized driving hazard prediction model, and outputting a driving hazard value for characterizing the driving hazard, wherein the driving hazard value is used to instruct the vehicle to slow down and yield or to accelerate and go first.
[0033] In some embodiments, raw variables reflecting the vehicle state are collected from the vehicle driving environment, including:
[0034] The vehicle status information in the vehicle driving environment is collected, and the collected vehicle status information is used to form a road data set; according to the current driving road scene of the vehicle, the vehicle status information matching the current driving road scene is selected from the road data set, and the vehicle status information selected from the road data set is used as the original variable.
[0035] Specifically, the embodiment of the present application first collects multiple original variables for reflecting the vehicle state from the vehicle driving environment to assist in building a driving hazard prediction model. First, in conjunction with the accompanying drawings in the actual driving scene, the process of collecting multiple original variables for reflecting the vehicle state from the vehicle driving environment in the embodiment of the present application is described in detail.
[0036] The following embodiments will be described in detail by collecting vehicle status information in a road intersection scenario and combining it with a data set of an actual driving scenario.
[0037] Figure 2 Schematic diagram of a road intersection in an actual driving scenario provided by an embodiment of the present application. Figure 2 As shown in FIG. 1 , a typical road intersection diagram is shown, where two vehicles are vehicle C1 and vehicle C2. In this scenario, the driving behaviors of vehicles C1 and C2 at the intersection are decided based on different traffic priorities, with one vehicle acting as the "first vehicle" and the other as the "yielding vehicle".
[0038] This embodiment collects and processes the original state variables related to the vehicle driving hazard through the following steps:
[0039] First, the collection of road data sets: In the intersection scene, the system collects road data sets through multiple sensors (such as vehicle-mounted cameras, radars, etc.). This data set contains key status information such as trajectory information, speed, acceleration, etc. related to vehicle driving.
[0040] Further, selection of original variables: In this embodiment, the original variables related to vehicles C1 and C2 are collected. Based on the behavior of the two vehicles at the intersection, this embodiment will select the following ten original state variables:
[0041] The speed of the preceding vehicle (the speed of vehicle C1);
[0042] The acceleration of the preceding vehicle (the acceleration of vehicle C1);
[0043] yield speed (speed of vehicle C2);
[0044] Let the vehicle accelerate (the acceleration of vehicle C2);
[0045] The distance between the two vehicles (the distance between vehicles C1 and C2);
[0046] The distance from the preceding vehicle to the intersection (the distance between vehicle C1 and intersection O);
[0047] The time taken by the preceding vehicle to reach the intersection (the estimated time when vehicle C1 arrives at intersection O);
[0048] The distance from the yielding vehicle to the intersection (the distance between vehicle C2 and intersection O);
[0049] The time for the vehicle to reach the intersection (the estimated time for vehicle C2 to arrive at intersection O);
[0050] The time difference between the two vehicles arriving at the intersection (the estimated arrival time difference between vehicles C1 and C2 at intersection O).
[0051] Further, processing of state variables: After collecting the above-mentioned original state variables, the road data set is preprocessed to ensure that the selected state variables can effectively reflect the driving status and decision-making requirements of the two vehicles. Specifically, this embodiment adopts data filtering and cleaning technology to eliminate abnormal data and ensure the accuracy and consistency of the data.
[0052] Further, data selection matching the current driving scene: After data collection, according to the current driving scene, Figure 1 In the intersection scenario shown, data matching the current scenario is selected from the road dataset as the original variable. Variables related to intersection priority are extracted through real-time analysis of vehicle status information.
[0053] Through the above method of this embodiment, this embodiment successfully collects the original state information reflecting the vehicles C1 and C2 in the intersection scene, and preliminarily processes these original variables, providing accurate input data for the subsequent driving hazard prediction model.
[0054] In some embodiments, the original variables are subjected to dimensionality reduction processing to obtain key variables that affect driving hazards, including:
[0055] The original variables are processed using the principal component analysis algorithm, converted into several principal components, and the contribution rate of each original variable to each principal component is calculated;
[0056] Based on the contribution rate of each principal component, select the first several principal components whose cumulative contribution rate reaches the preset threshold, and use the comprehensive contribution rate calculation formula to quantitatively analyze the contribution rate of each original variable to determine the comprehensive contribution rate of each original variable;
[0057] According to the comprehensive contribution rate and total contribution rate of each original variable, the ratio between the comprehensive contribution rate and the total contribution rate of the original variable is calculated, where the ratio is used to represent the importance of the original variable;
[0058] Compare the comprehensive contribution rate and proportion of each original variable, and screen out key variables based on the comparison results.
[0059] Specifically, this embodiment performs dimensionality reduction processing on the original variables to screen out key variables that affect driving hazards. In practical applications, this embodiment processes multiple original state quantities collected during vehicle driving through the principal component analysis (PCA) algorithm to extract key variables that have a greater impact on driving hazard assessment.
[0060] First, the PCA algorithm is used to convert multiple original variables in the data set into several principal components. Each principal component represents a linear combination of multiple original variables, and these principal components retain the main information of the data. During processing, the importance of the original variables to the principal components is evaluated by calculating the contribution rate of each original variable to each principal component.
[0061] Next, according to the contribution rate of each principal component, select the first several principal components whose cumulative contribution rate reaches the preset threshold (usually 95%). This ensures that in the process of dimensionality reduction, most of the information of the original data is retained as much as possible, while reducing redundant data and noise. The remaining principal components with smaller contributions are ignored.
[0062] In order to quantify the comprehensive contribution of each original variable, the overall impact of each original variable is calculated based on the proportion of its contribution to different principal components. This step ensures that we can accurately assess the importance of the original variables in the entire data set.
[0063] In addition, by combining cross-operating condition data sets under multiple different scenarios, principal component analysis is performed on the data of each scenario to ensure that the importance of each original variable is fully considered under multiple driving scenarios. In this way, this embodiment can ensure that the selected variables are not only applicable to a single scenario, but also can adapt to different driving conditions.
[0064] Then, based on the comprehensive contribution rate of the original variables and their proportion in the overall contribution, the importance of each original variable is calculated. By comparing the contribution rate and proportion of each original variable, it is possible to intuitively determine which variables play a key role in driving decisions. For example, variables such as vehicle speed, acceleration, and vehicle-to-vehicle distance often have an important impact on the judgment of driving danger, while the impact of other variables may be relatively small.
[0065] Finally, through the above analysis steps, this embodiment can screen out key variables that have a greater impact on vehicle traffic decisions. These variables will serve as inputs for subsequent driving hazard prediction models, thereby improving the accuracy and efficiency of predictions.
[0066] The following is a specific example to explain the process of reducing the dimension of the original variables to screen out the key variables that affect driving hazards. The specific content may include the following:
[0067] 1) The variables of the data set are converted into new principal components according to the PCA algorithm to obtain the contribution rate of each original variable to the principal component. Generally, only the first k principal components whose sum of proportions after conversion is greater than 95% need to be considered, and the remaining principal components can be ignored.
[0068] 2) Taking k = 3 as an example, the contribution rate of each original variable is quantitatively analyzed using a comprehensive calculation formula in the form of formula (1), where α, β, and γ are the proportions of the first three principal components, respectively, and p 1 、p 2 、p 3 are the contribution rates of the original variables to the first three principal components, and p is the comprehensive contribution rate of the original variables.
[0069] p=αp 1 +βp 2 +γp 3 (1)
[0070] 3) In order to make the analysis results more comprehensive, multiple groups of cross-operating condition data were selected from the data set, and PCA was used to analyze the comprehensive contribution rate of each original variable after dimensionality reduction.
[0071] 4) In order to comprehensively and quantitatively analyze the impact of each original variable on vehicle traffic decision-making, the importance of each original variable is calculated using formula (2), and the original variable contribution rate p is used i Contribution to the total The proportion S(i) represents the importance of each original variable.
[0072]
[0073] 5) According to the calculation results, by comparing the comprehensive contribution rate and importance of each original variable, the variables that have a greater impact on vehicle traffic decisions can be screened out.
[0074] In some embodiments, a driving hazard prediction model is constructed based on an adaptive fuzzy neural network, including:
[0075] Based on the adaptive fuzzy neural network, a traffic hazard prediction model including fuzzification layer, fuzzy rule layer, normalization layer, reasoning layer and output layer is constructed;
[0076] Among them, the fuzzification layer is used to fuzzify the input key variables using the membership function, the fuzzy rule layer is used to calculate the trigger strength of each fuzzy rule based on the predetermined fuzzy rules, the normalization layer is used to normalize the trigger strength of all fuzzy rules, the inference layer is used to calculate the output of the fuzzy rules according to the normalized trigger strength, and the output layer is used to weighted average the output of the fuzzy rules to obtain the driving risk value.
[0077] Specifically, this embodiment builds a driving hazard prediction model based on an adaptive fuzzy neural network (ANFIS), uses multiple input variables for fuzzy reasoning to output the current driving hazard value of the vehicle, and assists the vehicle in making decisions on going first or giving way.
[0078] Figure 3 Schematic diagram of the structure of the adaptive fuzzy neural network (ANFIS) provided in the embodiment of the present application. Figure 3 As shown in the figure, the ANFIS network structure consists of five layers. The system takes four variables that have a greater impact on driving decisions as input and completes the prediction of driving hazards through a multi-layer network structure. Specifically, it can include the following steps:
[0079] 1. Input layer (fuzzification layer):
[0080] The input layer is used to receive the four selected key variables {x 1 ,x 2 ,x 3 ,x 4}, these variables include parameters such as the speed of the leading vehicle, the speed of the yielding vehicle, the distance between vehicles, etc., which are crucial to the judgment of driving danger. These input variables are fuzzified by the membership function, and converted into fuzzy sets to express uncertainty and fuzziness. In this embodiment, the membership function can adopt a Gaussian membership function, which has good smoothness and differentiability and can better express the fuzzy boundary.
[0081] 2. Fuzzy rule layer (fuzzy operation layer):
[0082] The fuzzy rule layer combines the fuzzy sets of input variables through preset fuzzy rules to generate the trigger strength of each fuzzy rule. Each fuzzy rule represents an input-output relationship, such as "if the leading vehicle has a high speed and the distance between vehicles is far, the driving risk is low", and the trigger strength indicates the applicability of the fuzzy rule under the current conditions.
[0083] 3. Normalization layer:
[0084] The trigger strength of each fuzzy rule output by the fuzzy rule layer is normalized to ensure that the trigger strength of all fuzzy rules is within a unified range. This step calculates the relative weight of each rule through the normalization operation to ensure that the result output by the model is a comprehensive consideration of all rules.
[0085] 4. Reasoning layer (fuzzy conclusion layer):
[0086] The normalized trigger strength will be passed to the inference layer. This layer calculates the output corresponding to each fuzzy rule based on the normalized rule trigger strength. The output of each rule is a fuzzy driving risk value. By calculating the linear combination of each rule, the inference layer generates a fuzzy output value.
[0087] It should be noted that in practical applications, the following formula is used to calculate the output of each fuzzy rule. The specific formula is as follows:
[0088] f i =a i x 1 +b i x 2 +c i x 3 +d i x 4 +r i
[0089] Among them, {a i , b i 、c i ,d i 、r i} is called the consequent parameter.
[0090] 5. Output layer:
[0091] The output layer performs weighted average processing on all output results of the fuzzy rules and converts the fuzzy driving risk value into a specific numerical output. The output value is between 0 and 1, indicating the current driving risk level. When it is close to 1, it means that the driving risk is small and the vehicle can go first; when it is close to 0, it means that the driving risk is large and the vehicle should slow down or give way.
[0092] In an example, suppose the four input variables are {x 1 ,x 2 ,x 3 ,x 4}, the corresponding output is y c , where y is the time when the vehicle makes a prior decision c =1, when making a yield decision, y c =0. The entire ANFIS model finally realizes the reasoning process from multiple input variables to driving risk value through fuzzy processing of input variables, fuzzy rule reasoning and output calculation. The model is a 4-input 1-output system, in which the input set is represented by X={x 1 ,x 2 ,x 3 ,x 4}, the output set is represented by Y = {y c} indicates that it is used to assist the vehicle in making real-time driving decisions.
[0093] Through this multi-layer structure of adaptive fuzzy neural network, this embodiment can comprehensively consider multiple influencing factors and make reasonable judgments on the driving risks of vehicles, thereby providing effective support for the safe driving of intelligent vehicles.
[0094] In some embodiments, the membership function adopts a Gaussian membership function, and the Gaussian membership function is expressed by the following formula:
[0095]
[0096] Among them, c represents the center position of the membership function, and σ represents the standard deviation of the membership function, which is used to determine the shape and width of the membership function.
[0097] Specifically, in the first layer (fuzzification layer) of the adaptive fuzzy neural network (ANFIS), the embodiment of the present application will select a Gaussian membership function, which is symmetrical about the center, relatively smooth, and has good differentiability. When optimizing and solving, it can avoid discontinuities and mutations, and can better express fuzziness. The form of the Gaussian membership function is shown in the following formula:
[0098]
[0099] As shown in the above formula, the shape is changed by adjusting the parameters c and σ. {c, σ} are also called antecedent parameters (c is the center position of the membership function, σ is the standard deviation of the membership function, which determines the shape and width of the membership function).
[0100] In some embodiments, the center position and standard deviation of the membership function are optimized according to the selection, crossover and mutation operations of the genetic algorithm, including:
[0101] Initialize the structure of the adaptive fuzzy neural network and set the initial parameters of the membership function, wherein the initial parameters include the center position and standard deviation of the membership function, and use the center position and standard deviation as antecedent parameters;
[0102] Genetic algorithms are used to randomly generate an initial population containing multiple parameter combinations, wherein the parameter combinations include different setting values of the center position and standard deviation of the membership function;
[0103] The fitness value of each parameter combination is calculated based on the fitness function, and the parameter combination as the next generation population is selected according to the fitness value, and a crossover operation is performed on the parameter combination as the next generation population to generate a new parameter combination;
[0104] Perform mutation operations on the new parameter combination to make small perturbations to the center position and standard deviation of the membership function;
[0105] Add the mutated parameter combination to the population to form a new generation of population, and update the center position and standard deviation of the membership function;
[0106] The parameter combination is iteratively updated until the preset termination condition is met. The central position and standard deviation of the membership function corresponding to the termination condition are taken as output and updated to the driving hazard prediction model.
[0107] Specifically, ANFIS mainly updates network parameters through a hybrid learning algorithm that combines the least squares method and the back-propagation method, which is divided into antecedent parameter learning and consequent parameter learning. When the input is forwarded to the fourth layer of the network, the antecedent parameters are fixed unchanged, and the consequent parameters are optimized and updated using the least squares method; after the output is obtained, the consequent parameters are fixed unchanged, the error is back-propagated, and the antecedent parameters are optimized and updated using the gradient descent method.
[0108] However, the above parameter optimization method has a slow search speed and is prone to fall into local optimum. Therefore, this application proposes to use a genetic algorithm (GA) to optimize it. It evaluates different parameter combinations and performs natural selection and genetic operations on these combinations to iteratively update, thereby finding the global optimal solution. Among them, the fitness function is calculated using the root mean square error (RMSE):
[0109]
[0110] In the formula, u pi 、u di They represent the expected output and the actual output respectively, and n represents the number of samples.
[0111] For example, this embodiment optimizes the central position and standard deviation of the membership function of the adaptive fuzzy neural network (ANFIS) through a genetic algorithm (GA). The optimization process combines the selection, crossover and mutation operations of the genetic algorithm to improve the global optimization ability of the network and avoid the defect that traditional optimization methods are prone to fall into local optimality. Figure 4 is a schematic diagram of the training process of the driving hazard reasoning model provided in the embodiment of the present application, such as Figure 4 As shown, the following steps may be specifically included:
[0112] 1) Initialize the ANFIS model:
[0113] First, the structure of the adaptive fuzzy neural network is initialized, and the antecedent parameters of the initial membership function are set, including the central position and standard deviation of the membership function. These parameters are used to fuzzify the input variables, and the initial parameters can be set based on experience or generated randomly.
[0114] 2) Generate the initial population:
[0115] Next, a genetic algorithm is used to randomly generate an initial population containing multiple parameter combinations, each of which includes different central positions and standard deviation settings of the membership function. These combinations represent different potential solution spaces, covering possible parameter configurations.
[0116] 3) Fitness evaluation:
[0117] The fitness value of each parameter combination is calculated using the root mean square error (RMSE) as the fitness function. RMSE measures the error between the model output and the expected output. The lower the fitness value, the better the performance of the parameter combination.
[0118] 4) Select an operation:
[0119] Based on the fitness value, individuals with higher fitness (i.e., parameter combinations with better performance) are selected as the basis for the next generation of population. Through the process of natural selection, excellent individuals are retained and individuals with poor fitness values are eliminated.
[0120] 5) Crossover operation:
[0121] The selected excellent individuals are cross-operated to exchange the parameter combinations of different individuals and generate new parameter combinations. The cross-operation expands the search space and generates new solutions to improve the search efficiency.
[0122] 6) Mutation operation:
[0123] The generated new parameter combination is mutated, that is, the central position and standard deviation of the membership function are randomly perturbed in a small range. This step can increase the diversity of the population and prevent the algorithm from falling into a local optimal solution.
[0124] 7) Generate a new generation of population and update parameters:
[0125] The mutated parameter combination is combined with the original individuals to form a new generation population, the central position and standard deviation of the membership function are updated, and the fitness evaluation is continued. Through this iterative process, the antecedent parameters are gradually optimized.
[0126] 8) Iterative update and optimization:
[0127] Repeat the steps of fitness evaluation, selection, crossover and mutation until the preset termination condition is met. The termination condition can be that the fitness value reaches a certain threshold or the number of iterations reaches a set upper limit.
[0128] 9) Output optimized parameters:
[0129] When the termination condition is reached, the center position and standard deviation of the current optimal membership function are output, and these optimized antecedent parameters are updated to the ANFIS network. The optimized network can more accurately characterize the relationship between input and output, and improve the accuracy of the driving hazard prediction model.
[0130] 10) Hybrid learning of least squares method combined with back propagation method:
[0131] In the ANFIS optimization process, the model uses a hybrid learning algorithm, including the least squares method and the back propagation method. Specifically, the antecedent parameters are optimized by the genetic algorithm, while the consequent parameters are updated by the least squares method. When the input data is passed to the fourth layer of the network, the antecedent parameters are fixed and the consequent parameters are optimized by the least squares method; after the output results are generated, the consequent parameters are fixed and the antecedent parameters are adjusted and updated by error back propagation.
[0132] Through the steps of the present embodiment described above, the present embodiment effectively combines the global optimization capability of the genetic algorithm and the adaptive learning capability of ANFIS, solves the problems of slow search speed and easy falling into local optimum in the traditional optimization method, and finally realizes the accurate prediction of driving hazards.
[0133] In some embodiments, optimizing the linear combination parameters in the fuzzy inference rule includes:
[0134] Initialize the linear combination parameters of each fuzzy rule, the linear combination parameters include the weight coefficients and constant terms of each input variable in the output of the fuzzy inference rule, and constitute the linear equation form of the fuzzy inference rule;
[0135] Genetic algorithm is used to generate an initial population containing multiple parameter combinations for the linear combination parameters of each fuzzy inference rule, and each individual in the initial population represents a different linear combination parameter setting;
[0136] Calculate the fitness value of each individual based on the fitness function, and select excellent individuals from the initial population according to the fitness value;
[0137] Perform crossover operations on excellent individuals, swap the linear combination parameters of excellent individuals, and generate new individuals;
[0138] Perform mutation operation on the new individuals so as to randomly modify the linear combination parameters in the new individuals;
[0139] The mutated individuals and the original individuals are combined into a new generation population, and the fitness is re-evaluated to determine the optimal linear combination parameters in the new generation population;
[0140] The linear combination parameters of the fuzzy inference rules are iteratively updated until the preset termination condition is met, the optimal linear combination parameters corresponding to the termination condition are taken as output, and the optimal linear combination parameters are applied to the fuzzy inference rules.
[0141] Specifically, this embodiment optimizes the linear combination parameters in the fuzzy inference rules through a genetic algorithm (GA) to improve the accuracy and efficiency of the traffic hazard prediction model. Figure 4 As shown in (Training Flowchart of Driving Hazard Reasoning Model), the optimization process includes multiple steps, which aims to iteratively update the linear combination parameters of fuzzy inference rules and finally find the global optimal solution.
[0142] First, the linear combination parameters of each fuzzy inference rule are initialized. The linear combination equation of each fuzzy inference rule includes the weight coefficients of the input variables and the constant term. These parameters determine the accuracy of the fuzzy inference rule output, so multiple possible parameter settings should be considered during initialization to form the initial population.
[0143] Furthermore, a genetic algorithm is used to generate multiple parameter combinations for the linear combination parameters of each fuzzy rule to form an initial population. Each individual in the population represents a different linear combination parameter setting, covering different weight coefficients and constant terms.
[0144] Furthermore, the fitness value of each individual is calculated based on the fitness function, which is the root mean square error (RMSE), which is used to measure the deviation of each linear combination parameter from the expected output during the inference process. The smaller the fitness value, the better the effect of the parameter combination, and the closer the output of the model is to the expected result.
[0145] Furthermore, according to the fitness value, individuals with higher fitness are selected from the initial population as excellent individuals, and these parameter combinations with better performance are retained. Through this selection process, individuals with poor fitness are eliminated, and parameter settings that can better express fuzzy inference rules are retained.
[0146] Furthermore, the selected excellent individuals are crossovered. Through the crossover operation, the linear combination parameters of two or more individuals are partially exchanged to generate new individuals. The crossover operation helps to expand the search space and explore new linear combination parameters, thereby improving the efficiency of the global search.
[0147] Furthermore, the new individuals generated by the crossover operation are subjected to mutation operation. During the mutation process, some weight coefficients or constant terms in the linear combination parameters are randomly modified in a small range to increase the diversity of the population and prevent the algorithm from falling into the local optimal solution.
[0148] Furthermore, the mutated individuals and the original individuals are combined into a new generation population, and their fitness is re-evaluated. By calculating the new fitness value, the linear combination parameters with the best performance are further screened. This process gradually optimizes the parameter combination through intergenerational evolution.
[0149] Furthermore, the above steps of the genetic algorithm (selection, crossover, mutation and fitness evaluation) will continue to iterate until the preset termination condition is met. For example, when the fitness value reaches a preset threshold, or the number of iterations reaches a set upper limit, the algorithm is terminated. At this point, the model will output the current optimal linear combination parameters.
[0150] Furthermore, when the termination condition is met, the optimal linear combination parameters are applied to the fuzzy inference rules and the network structure of the ANFIS model is updated. The optimized parameters ensure that the output of the fuzzy inference rules is more accurate, thereby improving the accuracy and reliability of driving hazard prediction.
[0151] Furthermore, the ANFIS model in this embodiment is optimized using a hybrid learning algorithm that combines the least squares method and the back propagation method. Specifically:
[0152] When the input is passed to the fourth layer of the network, the antecedent parameters are first fixed, and the consequent parameters are optimized and updated using the least squares method;
[0153] After the output is obtained, the consequent parameters are fixed, the antecedent parameters are adjusted through error back propagation, and the antecedent parameters are gradually optimized through gradient descent.
[0154] Although the least square method and back propagation method can effectively update parameters, since this method is easy to fall into the local optimal solution and the search speed is relatively slow, this embodiment uses a genetic algorithm for further optimization. Through the global search capability of the genetic algorithm, combined with selection, crossover and mutation operations, the linear combination parameters are continuously iterated and updated, and finally the global optimal solution is found.
[0155] Through the optimization process of this embodiment, the genetic algorithm is combined with the ANFIS model, which greatly improves the accuracy of driving hazard prediction and the overall performance of the model.
[0156] In one example, for Figure 2For the intersection working condition shown, the established system is a four-input one-output system, with the fuzzy index set to 2 and the cluster center set to 5. Each input corresponds to 5 Gaussian membership functions. According to formula (3), each Gaussian membership function is determined by two parameters {c, σ}, so there are 20 groups of {c, σ}, that is, 40 antecedent parameters; the output is a linear combination. According to the form shown in formula (4), each rule has 5 parameters, with a total of 5 groups, that is, 25 consequent parameters, a total of 65 parameters. For this system, the extracted 65 parameters are optimized using the GA algorithm.
[0157] The iteratively optimized system can infer the current driving danger of the vehicle in real road traffic scenarios. Figure 2 As an example, we first use the real traffic data set to train the driving hazard inference model. Figure 4 After the training is completed, the method shown in (Travel Hazard Reasoning Model Training Flowchart) can be applied offline on smart vehicles. The system input is the four variables {x 1 ,x 2 ,x 3 ,x 4}, the output is a risk value between 0 and 1. The closer to 1, the lower the risk of the vehicle's current driving, and the vehicle can go first; the closer to 0, the higher the risk of the vehicle's current driving, and the vehicle should consider giving way. This can be applied to the formulation of subsequent decision-making strategies for smart cars.
[0158] According to the technical solution provided in the embodiment of the present application, the traffic hazard prediction model based on GA-ANFIS (genetic algorithm optimized adaptive fuzzy neural network) proposed in the present application significantly improves the accuracy and efficiency of traffic hazard assessment in the prior art. By combining principal component analysis (PCA) and genetic algorithm (GA), the technical solution of the present application has at least the following advantages:
[0159] 1) Improved model accuracy:
[0160] The principal component analysis (PCA) method is used to reduce the dimensionality of the multidimensional state variables in the vehicle driving process, screen out the key factors that affect driving hazards, and ensure the validity of the input variables. This method reduces data redundancy and enables the model to more accurately characterize the relationship between environmental information and driving hazards.
[0161] 2) Avoid local optimal traps and improve global search capabilities:
[0162] The traditional ANFIS model is prone to fall into local optimum during the optimization process, resulting in inaccurate output results. To solve this problem, the present application optimizes the antecedent and consequent parameters of the ANFIS network through a genetic algorithm (GA). The genetic algorithm has global search capabilities and can effectively avoid falling into local optimum, ensuring that the model parameters reach global optimum in a larger range, thereby improving the accuracy of driving hazard prediction.
[0163] 3) Optimized search speed:
[0164] Genetic algorithms significantly speed up the parameter optimization process of the ANFIS model through parallel search, multi-generation iteration, selection, crossover and mutation operations. Compared with the traditional gradient descent method or least squares method, GA optimization is not only faster, but also can more effectively handle nonlinear, complex and changeable traffic environments, greatly improving the computational efficiency of the model.
[0165] 4) Enhanced the adaptability and robustness of the model:
[0166] The GA-ANFIS model can adapt to the driving hazard prediction needs in different complex scenarios by optimizing the network structure and parameter settings. Whether it is a regular traffic environment or a more complex intersection or multi-vehicle interaction scenario, the model can maintain high prediction accuracy and stability.
[0167] 5) Improved decision support capabilities:
[0168] The optimized GA-ANFIS model performs well in real-time, can respond quickly to environmental changes, and output driving risk values in a timely manner, providing a reliable basis for vehicle driving decisions (such as slowing down, giving way, or speeding up), significantly improving the safety and decision-making support capabilities of the intelligent driving system.
[0169] Therefore, in summary, this application optimizes the network structure of the ANFIS model through GA, which not only improves the accuracy and efficiency of driving hazard prediction, but also enhances the adaptability of the model in different driving scenarios, and has important practical application value.
[0170] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0171] Figure 5 Schematic diagram of the structure of the driving hazard prediction device based on the adaptive fuzzy neural network provided in the embodiment of the present application. Figure 5 As shown, the driving hazard prediction device based on the adaptive fuzzy neural network includes:
[0172] The acquisition module 501 is configured to acquire original variables reflecting the vehicle state from the vehicle driving environment, and perform dimensionality reduction processing on the original variables to obtain key variables for predicting the driving risk value;
[0173] A construction module 502 is configured to construct a driving hazard prediction model based on an adaptive fuzzy neural network, wherein the driving hazard prediction model takes key variables as input and takes driving hazard values as output;
[0174] The optimization module 503 is configured to optimize the antecedent parameters and the consequent parameters of the traffic hazard prediction model using a genetic algorithm, wherein the optimization of the antecedent parameters includes optimizing the central position and the standard deviation of the membership function according to the selection, crossover and mutation operations of the genetic algorithm, and the optimization of the consequent parameters includes optimizing the linear combination parameters in the fuzzy inference rule;
[0175] The prediction module 504 is configured to input the vehicle status data acquired in real time into the optimized driving hazard prediction model, and output a driving hazard value for characterizing the driving hazard, wherein the driving hazard value is used to instruct the vehicle to slow down and yield or to accelerate and go first.
[0176] In some embodiments, Figure 5 The acquisition module 501 acquires the vehicle state information in the vehicle driving environment, and uses the acquired vehicle state information to form a road data set; according to the current driving road scene of the vehicle, the vehicle state information matching the current driving road scene is selected from the road data set, and the vehicle state information selected from the road data set is used as the original variable.
[0177] In some embodiments, Figure 5 The acquisition module 501 processes the original variables using the principal component analysis algorithm, converts the original variables into several principal components, and calculates the contribution rate of each original variable to each principal component; based on the contribution rate of each principal component, selects the first several principal components whose cumulative contribution rate reaches a preset threshold, and uses the comprehensive contribution rate calculation formula to quantitatively analyze the contribution rate of each original variable to determine the comprehensive contribution rate of each original variable; according to the comprehensive contribution rate and the total contribution rate of each original variable, calculates the ratio between the comprehensive contribution rate and the total contribution rate of the original variable, wherein the ratio is used to characterize the importance of the original variable; compares the comprehensive contribution rate and the ratio corresponding to each original variable, and screens out key variables according to the comparison results.
[0178] In some embodiments, Figure 5The construction module 502 constructs a driving hazard prediction model including a fuzzification layer, a fuzzy rule layer, a normalization layer, an inference layer and an output layer based on an adaptive fuzzy neural network; wherein the fuzzification layer is used to fuzzify the input key variables using a membership function, the fuzzy rule layer is used to calculate the trigger strength of each fuzzy rule based on predetermined fuzzy rules, the normalization layer is used to normalize the trigger strength of all fuzzy rules, the inference layer is used to calculate the output of the fuzzy rules based on the normalized trigger strength, and the output layer is used to weighted average the output of the fuzzy rules to obtain a driving hazard value.
[0179] In some embodiments, the membership function adopts a Gaussian membership function, and the Gaussian membership function is expressed by the following formula:
[0180]
[0181] Among them, c represents the center position of the membership function, and σ represents the standard deviation of the membership function, which is used to determine the shape and width of the membership function.
[0182] In some embodiments, Figure 5 The optimization module 503 initializes the structure of the adaptive fuzzy neural network and sets the initial parameters of the membership function, wherein the initial parameters include the center position and standard deviation of the membership function, and the center position and standard deviation are used as antecedent parameters; the genetic algorithm is used to randomly generate an initial population including multiple parameter combinations, and the parameter combination includes different setting values of the center position and standard deviation of the membership function; the fitness value of each parameter combination is calculated based on the fitness function, and the parameter combination as the next generation population is selected according to the fitness value, and the parameter combination as the next generation population is cross-operated to generate a new parameter combination; the new parameter combination is mutated to make a small-scale disturbance to the center position and standard deviation of the membership function; the mutated parameter combination is added to the population to form a new generation population, and the center position and standard deviation of the membership function are updated; the parameter combination is iteratively updated until the preset termination condition is met, and the center position and standard deviation of the membership function corresponding to the termination condition is output as output, and updated to the driving hazard prediction model.
[0183] In some embodiments, Figure 5The optimization module 503 initializes the linear combination parameters of each fuzzy rule, and the linear combination parameters include the weight coefficients and constant terms of each input variable in the output of the fuzzy inference rule, and constitute the linear equation form of the fuzzy inference rule; uses a genetic algorithm to generate an initial population containing multiple parameter combinations for the linear combination parameters of each fuzzy inference rule, and each individual in the initial population represents a different linear combination parameter setting; calculates the fitness value of each individual based on the fitness function, and selects excellent individuals from the initial population according to the fitness value; performs a crossover operation on the excellent individuals, exchanges the linear combination parameters of the excellent individuals, and generates new individuals; performs a mutation operation on the new individuals so as to randomly modify the linear combination parameters in the new individuals; forms a new generation population with the mutated individuals and the original individuals, and re-evaluates the fitness to determine the optimal linear combination parameters in the new generation population; iteratively updates the linear combination parameters of the fuzzy inference rules until the preset termination condition is met, outputs the optimal linear combination parameters corresponding to the termination condition, and applies the optimal linear combination parameters to the fuzzy inference rules.
[0184] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0185] Figure 6 Schematic diagram of the structure of the electronic device 6 provided in the embodiment of the present application. Figure 6 As shown, the electronic device 6 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the steps in the above-mentioned various method embodiments are implemented. Alternatively, when the processor 601 executes the computer program 603, the functions of each module / unit in the above-mentioned various device embodiments are implemented.
[0186] Exemplarily, the computer program 603 may be divided into one or more modules / units, which are stored in the memory 602 and executed by the processor 601 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 603 in the electronic device 6.
[0187] The electronic device 6 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 6It is only an example of the electronic device 6 and does not constitute a limitation of the electronic device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0188] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0189] The memory 602 may be an internal storage unit of the electronic device 6, for example, a hard disk or memory of the electronic device 6. The memory 602 may also be an external storage device of the electronic device 6, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 6. Further, the memory 602 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 602 is used to store computer programs and other programs and data required by the electronic device. The memory 602 may also be used to temporarily store data that has been output or is to be output.
[0190] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0191] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0192] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0193] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0194] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0195] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0196] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0197] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for predicting driving hazards based on an adaptive fuzzy neural network, characterized in that: include: Collecting original variables for reflecting vehicle status from the vehicle driving environment, and performing dimensionality reduction processing on the original variables to obtain key variables for predicting driving risk values; Constructing a driving hazard prediction model based on an adaptive fuzzy neural network, wherein the driving hazard prediction model uses the key variables as input and uses the driving hazard value as output; Optimizing the antecedent parameters and consequent parameters of the traffic hazard prediction model by using a genetic algorithm, wherein the optimization of the antecedent parameters includes optimizing the central position and standard deviation of the membership function according to the selection, crossover and mutation operations of the genetic algorithm, and the optimization of the consequent parameters includes optimizing the linear combination parameters in the fuzzy inference rules; The vehicle status data acquired in real time is input into the optimized driving hazard prediction model, and a driving hazard value for characterizing the driving hazard is output, wherein the driving hazard value is used to instruct the vehicle to slow down and yield or to speed up and go first.
2. The method according to claim 1, characterized in that The original variables collected from the vehicle driving environment to reflect the vehicle state include: Collecting vehicle status information in the vehicle driving environment, and using the collected vehicle status information to form a road data set; According to the current driving road scene of the vehicle, vehicle state information matching the current driving road scene is selected from the road data set, and the vehicle state information selected from the road data set is used as the original variable.
3. The method according to claim 1, characterized in that The dimensionality reduction process is performed on the original variables to obtain key variables that affect driving hazards, including: The original variables are processed by using a principal component analysis algorithm, the original variables are converted into a number of principal components, and the contribution rate of each original variable to each principal component is calculated; Based on the contribution rate of each principal component, select the first several principal components whose cumulative contribution rate reaches the preset threshold, and use the comprehensive contribution rate calculation formula to quantitatively analyze the contribution rate of each original variable to determine the comprehensive contribution rate of each original variable; According to the comprehensive contribution rate and the total contribution rate of each original variable, the ratio between the comprehensive contribution rate of the original variable and the total contribution rate is calculated, wherein the ratio is used to characterize the importance of the original variable; The comprehensive contribution rates and proportions corresponding to the original variables are compared, and the key variables are screened out based on the comparison results.
4. The method according to claim 1, characterized in that: The driving hazard prediction model based on the adaptive fuzzy neural network includes: Constructing the driving hazard prediction model including a fuzzification layer, a fuzzy rule layer, a normalization layer, an inference layer and an output layer based on an adaptive fuzzy neural network; Among them, the fuzzification layer is used to fuzzify the input key variables using the membership function, the fuzzy rule layer is used to calculate the trigger strength of each fuzzy rule based on the predetermined fuzzy rules, the normalization layer is used to normalize the trigger strength of all fuzzy rules, the inference layer is used to calculate the output of the fuzzy rules according to the normalized trigger strength, and the output layer is used to perform weighted averaging on the output of the fuzzy rules to obtain the driving risk value.
5. The method according to claim 4, characterized in that The membership function adopts a Gaussian membership function, and the Gaussian membership function is expressed by the following formula: Among them, c represents the center position of the membership function, and σ represents the standard deviation of the membership function, which is used to determine the shape and width of the membership function.
6. The method according to claim 1, characterized in that The optimization of the central position and standard deviation of the membership function according to the selection, crossover and mutation operations of the genetic algorithm includes: Initializing the structure of the adaptive fuzzy neural network, setting initial parameters of the membership function, wherein the initial parameters include the center position and standard deviation of the membership function, and using the center position and standard deviation as antecedent parameters; Using a genetic algorithm to randomly generate an initial population containing a plurality of parameter combinations, wherein the parameter combinations include different setting values of the center position and the standard deviation of the membership function; Calculating the fitness value of each parameter combination based on the fitness function, selecting the parameter combination as the next generation population according to the fitness value, performing a crossover operation on the parameter combination as the next generation population, and generating a new parameter combination; Performing a mutation operation on the new parameter combination so as to perform a small-range perturbation on the central position and standard deviation of the membership function; Add the mutated parameter combination to the population to form a new generation of population, and update the center position and standard deviation of the membership function; The parameter combination is iteratively updated until a preset termination condition is met, and the central position and standard deviation of the membership function corresponding to the termination condition being met are output as output and updated to the driving hazard prediction model.
7. The method according to claim 1, characterized in that The optimization of the linear combination parameters in the fuzzy inference rules includes: Initializing the linear combination parameters of each fuzzy rule, wherein the linear combination parameters include the weight coefficients and constant terms of each input variable in the fuzzy inference rule output, and the weight coefficients and constant terms of each input variable constitute the linear equation form of the fuzzy inference rule; Generate an initial population including multiple parameter combinations for the linear combination parameters of each fuzzy inference rule using a genetic algorithm, wherein each individual in the initial population represents a different linear combination parameter setting; Calculating the fitness value of each individual based on the fitness function, and selecting excellent individuals from the initial population according to the fitness value; Performing a crossover operation on the excellent individuals, exchanging the linear combination parameters of the excellent individuals, and generating new individuals; Performing a mutation operation on the new individual so as to randomly modify the linear combination parameters in the new individual; The mutated individuals and the original individuals are combined into a new generation population, and the fitness is re-evaluated to determine the optimal linear combination parameters in the new generation population; The linear combination parameters of the fuzzy inference rule are iteratively updated until a preset termination condition is met, the optimal linear combination parameters corresponding to the termination condition being met are output, and the optimal linear combination parameters are applied to the fuzzy inference rule.
8. A driving hazard prediction device based on an adaptive fuzzy neural network, characterized in that: include: A collection module is configured to collect original variables reflecting the vehicle state from the vehicle driving environment, and perform dimensionality reduction processing on the original variables to obtain key variables for predicting the driving risk value; A construction module is configured to construct a driving hazard prediction model based on an adaptive fuzzy neural network, wherein the driving hazard prediction model uses the key variables as input and uses a driving hazard value as output; an optimization module, configured to optimize the antecedent parameters and consequent parameters of the traffic hazard prediction model using a genetic algorithm, wherein the optimization of the antecedent parameters includes optimizing the central position and standard deviation of the membership function according to the selection, crossover and mutation operations of the genetic algorithm, and the optimization of the consequent parameters includes optimizing the linear combination parameters in the fuzzy inference rule; The prediction module is configured to input the vehicle status data obtained in real time into the optimized driving hazard prediction model, and output a driving hazard value for characterizing the driving hazard, wherein the driving hazard value is used to instruct the vehicle to slow down and yield or to accelerate and go first.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Inverse cavity scattering inversion method and system based on adaptive fuzzy inference system
CN119719699A
Inverse cavity scattering inversion method and system based on adaptive fuzzy inference system
CN119719699B