Method, device, electronic equipment, vehicle and program product for assisting driving of a vehicle
By adaptively adjusting the neural network model, the problems of insufficient sensor accuracy and limited data processing capabilities are solved, enabling efficient recognition and response of vehicle assisted driving in complex environments, thereby improving the safety and application scope of assisted driving.
Patent Information
- Application Number
- CN202411599927.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-11-11
AI Technical Summary
Existing vehicle driver assistance technologies suffer from insufficient sensor accuracy and limited data processing capabilities, resulting in limited recognition and reaction capabilities in complex or ever-changing road environments, thus restricting the application scope of driver assistance.
By training a pre-defined neural network model, iteratively evaluating the model's output error data, and dynamically adjusting the model parameters and the number of nodes in the hidden layer, the model can be adaptively adjusted to obtain a vehicle-assisted driving model.
It improves the accuracy and efficiency of model training, enabling it to adapt to new traffic environments and driving habits, achieve rapid and timely vehicle driving status recognition, and enhance the safety and application scope of assisted driving.
Smart Images

Figure CN119636765B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicle control, and in particular to a vehicle assisted driving method and device, electronic equipment, vehicle and program product. BACKGROUND
[0002] Assisted driving refers to the process of providing assistance to the driver while driving the vehicle through various devices and systems, making driving easier and safer. It is usually achieved through sensors (such as cameras, radars, etc.) and computer systems on the vehicle, which can detect road conditions, traffic signals, pedestrians and other vehicles, and provide real-time information and suggestions to the driver.
[0003] Currently, existing vehicle assisted driving technology often faces problems such as insufficient sensor accuracy and limited data processing capability, which limits the recognition and response capability in complex or changing road environments, thus limiting the application range of assisted driving. SUMMARY
[0004] The main purpose of the embodiments of the present application is to provide a vehicle assisted driving method, device, electronic equipment, vehicle and program product, which aims to improve the application range of vehicle assisted driving.
[0005] In a first aspect, the present application provides a vehicle assisted driving method, which comprises:
[0006] Obtaining vehicle driving data samples, the vehicle driving data samples comprising vehicle driving data, road traffic data and corresponding state mode identifiers of sample vehicles, the state mode identifiers being used to indicate whether the vehicle is driving normally;
[0007] Inputting the vehicle driving data samples into a preset neural network model to iteratively evaluate the model output error data for the vehicle driving data samples, and adjusting the model parameters configured by the neural network model and the number of nodes of the hidden layers arranged by the neural network model based on the model output error data until a preset iteration stopping condition is reached, to obtain a vehicle assisted driving model;
[0008] Obtaining vehicle driving data of a target vehicle;
[0009] Analyzing the vehicle driving data through the vehicle assisted driving model to obtain the vehicle driving state result of the target vehicle.
[0010] In a possible implementation manner, the neural network model comprises a feature extraction network and a classification network in a cascaded order, and the feature extraction network and the classification network each comprise a plurality of hidden layers arranged in a cascaded order;
[0011] The following steps are performed using the feature extraction network and the classification network, including:
[0012] The feature extraction network is used to perform feature dimensionality reduction on the vehicle driving data samples input to the neural network model to obtain vehicle feature information;
[0013] The vehicle feature information is classified by the classification network to obtain the vehicle driving status result of the sample vehicle, which is then used as the output of the neural network model.
[0014] In one possible implementation, the step of inputting the vehicle driving data sample into a preset neural network model to iteratively evaluate the model output error data for the vehicle driving data sample, and adjusting the model parameters configured in the neural network model and the number of nodes in the hidden layer of the neural network model based on the model output error data, until a preset iteration stopping condition is reached to obtain a vehicle assisted driving model, includes:
[0015] Initialize the model parameters of the neural network model, including weights, biases, and learning rate;
[0016] For any given iteration, based on the output of the neural network model in the previous iteration, the corresponding model output error data is determined, which includes the model error and the change in error from the previous iteration.
[0017] The learning rate for this iteration is updated based on the learning rate of the neural network model described in the previous iteration and the change in error in the previous iteration.
[0018] The weights for this iteration are updated based on the learning rate of this iteration, the weights of the neural network model in the previous iteration, and the model error.
[0019] In one possible implementation, initializing the model parameters of the neural network model, the model parameters including weights, biases, and learning rate, includes:
[0020] The weights of the neural network model are initialized using the following formula (1), including:
[0021] W p,0 =μ p +σ p ·N(0,I) (1)
[0022] Among them, W p,0 μ is the initial value of the weights of the neural network model. p σ is the mean offset of the weights of the neural network model. pThe standard deviation for weight initialization is N(0, I), which represents a normal distribution with a mean of 0 and a standard deviation of a unit matrix, and I is a unit matrix.
[0023] The learning rate of the current iteration is updated based on the learning rate of the neural network model in the last iteration and the error change of the last iteration, and the learning rate of the current iteration is updated, including:
[0024] The learning rate of the current iteration is determined by the following formula (2), including:
[0025] η p,t =η p,t-1 ·exp(-γ p ·ΔE p,t-1 ) (2)
[0026] Where η p,t is the learning rate of the tth iteration, η p,t-1 is the learning rate of the neural network model in the t-1th iteration, ΔE p,t-1 is the error change of the t-1th iteration, and γ p is a preset model adjustment factor.
[0027] The weights of the current iteration are updated based on the learning rate of the current iteration, the weights of the neural network model in the last iteration, and the model error, including:
[0028] The weights of the current iteration are determined by the following formula (3), including:
[0029]
[0030] Where W p,t is the weight of the tth iteration, W p,t-1 is the weight of the neural network model in the t-1th iteration, and E p is the model error.
[0031] In one possible implementation, the vehicle driving data sample is input into a preset neural network model to iteratively evaluate the model output error data for the vehicle driving data sample, and based on the model output error data, the model parameters configured by the neural network model and the number of nodes of the hidden layer arranged by the neural network model are adjusted until a preset iteration stopping condition is reached, obtaining a vehicle assisted driving model, and further comprising:
[0032] A node adjustment step is obtained, which is associated with the hidden layer arranged by the neural network model.
[0033] For each iteration, based on the number of nodes of the hidden layer contained in the neural network model in the last iteration, the node adjustment step length, and the error change amount of the last iteration, the number of nodes of the hidden layer in the current iteration is updated;
[0034] The number of nodes of the hidden layer in the current iteration is determined by the following formula (4), including:
[0035] N p,t = N p,t-1 + sgn (ΔE p,t-1 )·β p (4)
[0036] In the formula, N p,t is the number of nodes of the hidden layer in the tth iteration, N p,t-1 is the number of nodes of the hidden layer in the (t-1)th iteration, β p is the node adjustment step length, and sgn (*) represents the sign function of the error change.
[0037] In a possible implementation, the node adjustment step length is obtained, including:
[0038] The node adjustment step length is determined by the following formula (5), including:
[0039]
[0040] In the formula, α p is a preset influence coefficient, d p is a model depth determined by the hidden layer of the neural network model, and Int cs (*) represents the rounding operation.
[0041] In a second aspect, the present application provides a device for vehicle assisted driving, including:
[0042] A first obtaining module is configured to obtain vehicle driving data samples, wherein the vehicle driving data samples include vehicle driving data, road traffic data and corresponding state mode identifiers of sample vehicles, and the state mode identifiers are used to indicate whether the vehicles are normally driven;
[0043] A model training module is configured to input the vehicle driving data samples into a preset neural network model, iteratively evaluate model output error data for the vehicle driving data samples, and adjust model parameters configured by the neural network model and the number of nodes of the hidden layer arranged by the neural network model based on the model output error data until a preset iteration stopping condition is reached, thereby obtaining a vehicle assisted driving model.
[0044] A second obtaining module is configured to obtain vehicle driving data of a target vehicle.
[0045] an analysis module, configured to analyze the vehicle driving data by using the vehicle auxiliary driving model, to obtain a vehicle driving state result of the target vehicle.
[0046] In a third aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the vehicle auxiliary driving method in the first aspect or any possible implementation manner of the first aspect.
[0047] In a fourth aspect, the present application provides a vehicle, comprising the vehicle auxiliary driving device in the second aspect or the electronic device in the third aspect.
[0048] In a fifth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the vehicle auxiliary driving method in the first aspect or any possible implementation manner of the first aspect.
[0049] The vehicle auxiliary driving method, device, electronic device, vehicle and program product provided by the present application can train a preset neural network model by using vehicle driving data samples containing vehicle driving data, road traffic data and state mode identification, i.e. iteratively evaluate model output error data for the vehicle driving data samples, and adjust model parameters configured by the neural network model and the number of nodes of the hidden layer arranged by the neural network model based on the model output error data, to realize adaptive adjustment of the model, so that a vehicle auxiliary driving model is obtained, which can continuously adapt to new traffic environment and driving habits, and improve the accuracy and efficiency of model training. The vehicle driving state result of the vehicle is identified by using the vehicle auxiliary driving model, which can cope with complex or variable driving environment, and realize rapid and timely identification of the vehicle driving state, improve the efficiency and accuracy of the vehicle auxiliary driving, and thus improve the safety of the auxiliary driving and the application range of the vehicle auxiliary driving. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 A flowchart of a vehicle auxiliary driving method provided by an embodiment of the present application is shown in the figure;
[0051] Figure 2 A structure diagram of a neural network model provided by an exemplary embodiment of the present application is shown in the figure;
[0052] Figure 3 A flowchart of adjusting model parameters of a neural network model provided by an embodiment of the present application is shown in the figure;
[0053] Figure 4A structural schematic diagram of a device for vehicle auxiliary driving provided by an embodiment of the present application is shown in FIG. 1.
[0054] Figure 5 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 1. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0056] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification and claims and the above-described drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.
[0058] First, the several terms involved in the present application are analyzed:
[0059] Neural Network (NN): is a complex network system formed by a large number of simple processing units (called neurons) widely interconnected, which reflects many basic characteristics of brain function, and is a highly complex nonlinear dynamic learning system. Neural networks have large-scale parallelism, distributed storage and processing, self-organization, self-adaptation and self-learning ability, and are particularly suitable for processing information processing problems that need to consider many factors and conditions, and are imprecise and fuzzy.
[0060] Hidden Layer: is a key component in neural networks, which is located between the input layer and the output layer. The functions and roles of the hidden layer mainly include feature extraction and transformation, nonlinear modeling and reduction of parameter quantity, etc.
[0061] Weights: are the connection strengths between neurons in a neural network. In a fully connected layer, each neuron is connected to all neurons in the previous layer, and each connection has a weight value. In a convolutional layer, weights exist in the form of convolutional kernels (or filters), each of which contains a set of weight values used to extract specific features from the input data. Weights are usually randomly generated at initialization and then updated during the training process through the backpropagation algorithm.
[0062] Biases: are additional parameters for each neuron that adjust the neuron's output.
[0063] Learning Rate: is a crucial hyperparameter that determines the magnitude of parameter updates in each iteration (or each training step) of the model. The choice of learning rate has a direct and significant impact on the training effectiveness of the model.
[0064] Currently, existing vehicle assisted driving technologies often face problems such as insufficient sensor accuracy and limited data processing capabilities, which limit the recognition and response capabilities in complex or changing road environments, thus limiting the application range of assisted driving.
[0065] Based on the above problems, the present application realizes dynamic adjustment of model parameters and the number of nodes in the hidden layer through model self-adaptive adjustment, so that the vehicle assisted driving model trained can continuously adapt to new traffic environments and driving habits. Using the vehicle assisted driving model to identify the vehicle driving state result can cope with complex or variable driving environments, realize rapid and timely identification of vehicle driving state, improve the safety of assisted driving, and improve the application range of vehicle assisted driving.
[0066] The vehicle assisted driving method, device, electronic equipment, vehicle and program product provided by the embodiments of the present application are specifically explained through the following embodiments. First, the vehicle assisted driving method in the embodiments of the present application is described.
[0067] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Artificial intelligence (AI) is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0068] The artificial intelligence basic technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. The artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric identification technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0069] The method for vehicle auxiliary driving provided by the embodiments of the present application can be related to the field of artificial intelligence. The method for vehicle auxiliary driving provided by the embodiments of the present application can be applied to a terminal, can be applied to a server end, and can also be software running in a terminal or a server end. In some embodiments, the terminal can be a smartphone, a tablet computer, a notebook computer, a desktop computer, a vehicle-mounted terminal, etc.; the server end can be configured as an independent physical server, can be configured as a server cluster or a distributed system composed of multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and the software can be an application implementing the method for vehicle auxiliary driving, etc., but is not limited to the above forms.
[0070] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0071] It should be noted that in various specific embodiments of the present application, when relevant processing needs to be performed on data related to the identity or characteristics of the user, such as user information, user behavior data, user history data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the user's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page, and after obtaining the user's separate permission or separate consent, the necessary user-related data for the normal operation of the embodiments of the present application will be obtained.
[0072] Figure 1 A flowchart of a method for vehicle assisted driving provided by an embodiment of the present application, Figure 1 The method in the method for vehicle assisted driving provided by an embodiment of the present application can include but is not limited to steps S101-S104.
[0073] S101, obtaining vehicle driving data samples, the vehicle driving data samples including vehicle driving data, road traffic data, and corresponding state mode identifiers of sample vehicles, the state mode identifiers being used to indicate whether the vehicle is normally driven.
[0074] In the present application, the vehicle driving data is used to describe the driving situation of the vehicle and the situation of the vehicle itself during driving, and the vehicle driving data includes vehicle speed, vehicle position coordinates, and vehicle internal state, but is not limited thereto. The vehicle internal state includes engine state, gearbox state, brake system state, etc. For example, the vehicle speed V a = 60 km / h, the vehicle position coordinates (X a , Y a ) = (34.05, -118.25), and the vehicle internal state is normal, etc.
[0075] The road traffic data is used to describe the road conditions, traffic signals, pedestrians, and other vehicles related data during driving of the vehicle, and exemplary road traffic data includes traffic data and environmental data. The traffic data can be road conditions, congestion, traffic accidents, etc., and the environmental data includes temperature, humidity, rainfall, snowfall, and other weather information, which has a certain influence on the safety of assisted driving. Specifically, the traffic data includes lane type, traffic signal, number of nearby vehicles, and number of nearby pedestrians, and the environmental data includes environmental lighting, weather conditions, and road conditions. For example, the lane type is a highway, the traffic signal is a green light, the number of nearby vehicles is 5, the number of nearby pedestrians is 2, the environmental lighting is bright, the weather conditions are sunny, and the road conditions are dry.
[0076] The state mode identifier is used to indicate whether the vehicle is driving normally, and the label is used to train the vehicle assisted driving model to correctly identify and respond to different driving environments and conditions. For example, the state mode identifier includes a normal driving mode and an abnormal driving mode.
[0077] Optionally, the vehicle driving data sample is collected from multiple sensors of the vehicle, and the data is stored in a structured manner, specifically in JSON format.
[0078] S102, input the vehicle driving data sample into the preset neural network model, iteratively evaluate the model output error data for the vehicle driving data sample, and based on the model output error data, adjust the model parameters configured by the neural network model and the number of nodes of the hidden layer arranged by the neural network model until a preset iteration stopping condition is reached, and obtain a vehicle assisted driving model.
[0079] It should be noted that the neural network model in the present application is used to extract feature data of input data and classify the input data based on the feature data. At present, neural networks are commonly used for feature extraction. In some neural network structures, problems such as gradient disappearance, gradient explosion or falling into local optimal solution may be encountered, which affects the stability of training and the performance of the model. Based on this, the model parameters and the number of hidden layer nodes of the neural network model are optimized based on the chaotic optimization algorithm to realize the training of the model. Specifically, the self-adjusting mechanism is used to train the neural network model in the present application, the model parameters of the neural network model are dynamically adjusted according to the error of the previous training period (i.e. the last iteration), and the sensitivity in the chaos theory is used to enhance the response ability of the model to the initial conditions and parameter changes.
[0080] In the present application, the model parameters of the neural network model include weights, biases and learning rates. Specifically, the vehicle driving data sample is input into the neural network model to obtain the model output result for the vehicle driving data sample in the last iteration for each iteration, and to evaluate the model output error data of the last iteration. Based on the model output error data, the current model parameters (i.e. the model parameters acting on the last iteration) and the current number of hidden layer nodes (i.e. the number of hidden layer nodes acting on the last iteration) of the neural network model are adjusted to obtain the model parameters and the number of hidden layer nodes acting on the current iteration, so that the vehicle driving data sample is classified after feature extraction according to the model parameters and the number of hidden layer nodes of the current iteration, and the model output result of the current iteration is output. In this way, the iteration stopping condition is reached until the model training is completed, and the vehicle assisted driving model is obtained.
[0081] The iteration stop condition is used to represent a stop condition of the iteration of the neural network model, i.e., indicating that the model training is completed. Optionally, the iteration stop condition can be that a preset maximum iteration number is reached. For example, the maximum iteration number is set to 1000 times.
[0082] Therefore, by adaptively dynamically adjusting the model parameters and the number of hidden layers of the neural network model, the vehicle auxiliary driving model is obtained, which can continuously adapt to new traffic environments and driving habits, and improves the accuracy and efficiency of model training.
[0083] In some embodiments, Figure 2 A structural diagram of a neural network model provided for an exemplary embodiment of the present application is shown in FIG. 2. The neural network model 200 includes a feature extraction network 201 and a classification network 202 arranged in cascade. The feature extraction network 201 and the classification network 202 each include a plurality of hidden layers arranged in cascade.
[0084] Specifically, the following steps are performed by the feature extraction network and the classification network, including:
[0085] The feature extraction network is used to perform feature dimension reduction on the vehicle driving data samples input into the neural network model, to obtain vehicle feature information.
[0086] The classification network is used to classify the vehicle feature information, to obtain a vehicle driving state result of a sample vehicle, and the result is used as an output of the neural network model.
[0087] In this embodiment, the feature extraction network can be a 6-layer fully connected neural network. The feature extraction network is used to perform feature dimension reduction on the input data to obtain vehicle feature information. The feature dimension reduction can reduce the number of features (i.e., dimensions) while retaining as much effective information as possible. Therefore, by setting the feature extraction network to perform feature dimension reduction, the computational complexity can be reduced, the algorithm efficiency can be improved, and the feature extraction network can be applied to electronic devices such as vehicle terminals with limited data processing capabilities, thereby improving the application range of the auxiliary driving.
[0088] The reduced dimension data is input into the classification network connected to the feature extraction network, to be classified, so as to identify the vehicle driving state (e.g., a state mode indicating whether the vehicle is normally driven). Optionally, the classification network can use a support vector machine classifier.
[0089] S103, obtaining vehicle driving data of a target vehicle.
[0090] S104, analyzing the vehicle driving data by using the vehicle auxiliary driving model, to obtain a vehicle driving state result of the target vehicle.
[0091] The vehicle driving data includes vehicle driving data, road traffic data, and the like as described above. The vehicle auxiliary driving model includes a trained feature extraction network and a trained classification network. The vehicle driving data is input into the vehicle auxiliary driving model. The vehicle driving data is subjected to feature dimension reduction by the trained feature extraction network to obtain vehicle feature information. The vehicle feature information is classified by the trained classification network. A vehicle driving state result is output. The vehicle driving state result can include a state mode (i.e., whether the vehicle is normally driven).
[0092] Therefore, the vehicle driving state result of the vehicle is identified by using the vehicle auxiliary driving model. The complex or changeable driving environment can be coped with. The vehicle driving state can be quickly and timely identified. The efficiency and accuracy of the vehicle auxiliary driving are improved. The safety of the auxiliary driving is improved. The application range of the vehicle auxiliary driving is improved. Meanwhile, the vehicle auxiliary driving model is used. A large amount of data processing is not required. The hardware configuration difficulty is reduced.
[0093] The method, the device, the electronic equipment, the vehicle, and the program product for the vehicle auxiliary driving are used to train the preset neural network model by using the vehicle driving data sample including the vehicle driving data, the road traffic data, and the state mode identifier. The model output error data for the vehicle driving data sample is iteratively evaluated. The model parameters of the neural network model and the number of nodes of the hidden layer of the neural network model are adjusted based on the model output error data. The model is adaptively adjusted. The vehicle auxiliary driving model is obtained. The new traffic environment and the driving habit can be continuously adapted. The accuracy and the efficiency of the model training are improved. The vehicle driving state result of the vehicle is identified by using the vehicle auxiliary driving model. The complex or changeable driving environment can be coped with. The vehicle driving state can be quickly and timely identified. The efficiency and accuracy of the vehicle auxiliary driving are improved. The safety of the auxiliary driving is improved. The application range of the vehicle auxiliary driving is improved.
[0094] In some embodiments, Figure 3 The flowchart for adjusting the model parameters of the neural network model is provided for the embodiments. The method for adjusting the model parameters of the neural network model is provided. Step S102 can include, but is not limited to, steps S301 to S304.
[0095] S301, initializing the model parameters of the neural network model. The model parameters include weights, biases, and learning rates.
[0096] S302, for each iteration, determining corresponding model output error data based on the output of the neural network model in the last iteration. The model output error data includes model errors and error change amounts of the last iteration.
[0097] S303, updating the learning rate of the current iteration based on the learning rate of the neural network model in the last iteration and the error change amount of the last iteration;
[0098] S304, updating the weight of the current iteration based on the learning rate of the current iteration, the weight of the neural network model in the last iteration and the model error.
[0099] In the embodiment, the weight and bias of the neural network model are initialized, i.e. the initial value of the weight and the initial value of the bias are obtained. Optionally, for step S301, the weight of the neural network model is initialized by the following formula (1), including:
[0100] W p,0 = μ p + σ p · N(0, I) (1)
[0101] wherein W p,0 is the initial value of the weight of the neural network model, μ p is the mean shift amount about the weight of the neural network model, σ p is the standard deviation of weight initialization, N(0, I) represents the normal distribution with mean 0 and standard deviation of unit matrix, and I is the unit matrix.
[0102] The bias of the neural network model is initialized by the following formula, including:
[0103] b p,0 = v p · N(0, I)
[0104] wherein b p,0 is the initial value of the bias, and v p is the mean shift amount about the bias of the neural network model.
[0105] For example, μ p is set to 0.01, v p is set to 0.05, and σ p is set to 0.001.
[0106] Further, for any iteration, the model output result for the vehicle driving data sample in the last iteration is obtained, and the error change amount of the last iteration and the model error are evaluated, and the current weight and learning rate of the neural network model are adjusted based on the error change amount of the last iteration (i.e. the weight and learning rate of the last iteration), to obtain the weight and learning rate of the current iteration.
[0107] Optionally, the model error of the neural network model is calculated by a preset Softmax function on the output features of the last layer of the neural network.
[0108] In some embodiments, the error variation of the neural network model is evaluated, and the learning rate is adjusted through a chaotic feedback mechanism to avoid overfitting or underfitting, and the learning rate is self-adjusted. Specifically, the learning rate of this iteration is determined by the following formula (2), including:
[0109] η p,t = η p,t-1 · exp(- γ p · ΔE p,t-1 ) (2)
[0110] Wherein, η p,t is the learning rate of the tthiteration, η p,t-1 is the learning rate of the neural network model in the (t-1)thiteration, ΔE p,t-1 is the error variation of the (t-1)thiteration, γ p is a preset model adjustment factor, which controls the sensitivity of the learning rate variation.
[0111] Further, the weights are updated according to the updated learning rate. In some embodiments, the weights of this iteration are determined by the following formula (3), including:
[0112]
[0113] Wherein, W p,t is the weight of the tthiteration, W p,t-1 is the weight of the neural network model in the (t-1)thiteration, E p is the model error. is the derivative symbol.
[0114] Therefore, the present embodiment adjusts the learning rate of the neural network model by evaluating the model output error data of the last iteration, and adjusts the weights based on the adjusted learning rate, obtains the learning rate and weights for this iteration, realizes the self-adaptive adjustment of the model, can continuously adapt to the new traffic environment and driving habits, improves the accuracy and efficiency of the model training, and improves the application range of the model.
[0115] In some embodiments, during the training process, overfitting is prevented by adopting a regularization strategy to ensure the generalization ability of the model. Specifically, the number of nodes in the hidden layer of the neural network is dynamically adjusted for regularization sparsity. Specifically, step S102 further includes:
[0116] Obtaining a node adjustment step, the node adjustment step being associated with a hidden layer arranged by the neural network model;
[0117] For each iteration, the number of nodes of the hidden layer in the current iteration is updated based on the number of nodes of the hidden layer contained in the neural network model in the last iteration, the node adjustment step length, and the error change amount of the last iteration.
[0118] In the embodiment, the node adjustment step length of the hidden layer of the neural network model depends on a function of the network level. Optionally, the node adjustment step length is determined by the following formula (5), which includes:
[0119]
[0120] wherein, a p is a preset influence coefficient (i.e., the influence coefficient for adjusting the adjustment step length), d p is the model depth (i.e., the depth of the current network level) determined by the hidden layer arranged by the neural network model; and Int cs (*) represents the rounding operation. For example, when d p is 6 and a p is set to 2.5.
[0121] Further, the number of nodes of the hidden layer in the current iteration is updated based on the number of nodes of the hidden layer in the last iteration, the node adjustment step length, and the error change amount of the last iteration. Optionally, the number of nodes of the hidden layer in the current iteration is determined by the following formula (4), which includes:
[0122] N p,t = N p,t-1 + sgn (ΔE p,t-1 ) · β p (4)
[0123] wherein, N p,t is the number of nodes of the hidden layer in the tthiteration, N p,t-1 is the number of nodes of the hidden layer in the (t-1)thiteration, and β p is the node adjustment step length. Wherein, sgn (*) represents the sign function of the error change, which is used to determine whether to increase or decrease the number of nodes, i.e., for sgn (ΔE p,t-1 ), when ΔE p,t-1 is greater than zero, sgn (ΔE p,t-1 ) is 1, and when ΔE p,t-1 is less than or equal to zero, sgn (ΔE p,t-1 ) is -1.
[0124] Therefore, the embodiment prevents overfitting by the regularization strategy and dynamically adjusts the number of nodes of the hidden layer, thereby improving the accuracy of model training.
[0125] Further, the vehicle driving data sample is input into the neural network model to update the feature extraction network and the classification network according to the adjusted model parameters and the number of hidden layer nodes for each iteration, so as to classify the vehicle driving data sample after feature extraction, and output the model output result of this iteration. In this way, the vehicle driving data is input into the vehicle assisted driving model to perform feature dimension reduction on the vehicle driving data by the trained feature extraction network, obtain vehicle feature information, and classify the vehicle feature information by the trained classification network, and output the vehicle driving state result.
[0126] Therefore, the vehicle driving state result of the vehicle is identified by using the vehicle assisted driving model, which can cope with complex or variable driving environments, and quickly and timely identify the vehicle driving state, improve the efficiency and accuracy of vehicle assisted driving, thereby improving the safety of assisted driving and the application range of vehicle assisted driving. At the same time, with the help of the vehicle assisted driving model, a large amount of data processing is not required, and the hardware configuration difficulty is reduced.
[0127] Figure 4 A structural schematic diagram of a vehicle assisted driving device provided by an embodiment of the present application is provided, and the vehicle assisted driving device 400 includes:
[0128] The first acquisition module 401 is configured to acquire vehicle driving data samples, wherein the vehicle driving data samples include vehicle driving data, road traffic data and corresponding state mode identifiers of a sample vehicle, and the state mode identifier is used to indicate whether the vehicle is normally driven;
[0129] The model training module 402 is configured to input the vehicle driving data samples into a preset neural network model to iteratively evaluate model output error data for the vehicle driving data samples, and adjust model parameters configured by the neural network model and the number of nodes of a hidden layer arranged by the neural network model based on the model output error data, until a preset iteration stopping condition is reached, and a vehicle assisted driving model is obtained;
[0130] The second acquisition module 403 is configured to acquire vehicle driving data of a target vehicle;
[0131] The analysis module 404 is configured to analyze the vehicle driving data by using the vehicle assisted driving model to obtain a vehicle driving state result of the target vehicle.
[0132] In some embodiments, the neural network model includes a feature extraction network and a classification network arranged in cascade, and the feature extraction network and the classification network each include a plurality of hidden layers arranged in cascade;
[0133] The model training module 402 comprises:
[0134] a feature extraction unit configured to perform feature dimension reduction on a vehicle driving data sample input to the neural network model by the feature extraction network to obtain vehicle feature information;
[0135] a classification unit configured to classify the vehicle feature information by the classification network to obtain a vehicle driving state result of the sample vehicle and as an output of the neural network model.
[0136] In some embodiments, the model training module 402 comprises:
[0137] an initialization unit configured to initialize model parameters of the neural network model, the model parameters comprising weights, biases, and learning rates;
[0138] an error calculation unit configured to determine, for each iteration, a corresponding model output error data based on an output of the neural network model in a previous iteration, the model output error data comprising a model error and an error change amount of the previous iteration;
[0139] a learning rate updating unit configured to update a learning rate of the current iteration based on a learning rate of the neural network model in the previous iteration and the error change amount of the previous iteration;
[0140] a weight updating unit configured to update a weight of the current iteration based on the learning rate of the current iteration, a weight of the neural network model in the previous iteration, and the model error.
[0141] In some embodiments, the initialization unit comprises:
[0142] a weight initialization unit configured to initialize the weight of the neural network model by the following formula (1), comprising:
[0143] W p,0 = μ p + σ p · N(0, I) (1)
[0144] wherein W p,0 is an initial value of the weight of the neural network model, μ p is a mean value offset of the weight of the neural network model, σ p is a standard deviation of weight initialization, N(0, I) represents a normal distribution with a mean value of 0 and a standard deviation of an identity matrix, and I is an identity matrix.
[0145] In some embodiments, the learning rate updating unit comprises:
[0146] a learning rate calculation unit configured to determine a learning rate of the current iteration by using the following formula (2), comprising:
[0147] η p,t = η p,t-1 · exp(- γ p · ΔE p,t-1 ) (2)
[0148] wherein η p,t is the learning rate of the tthiteration, η p,t-1 is the learning rate of the (t-1)thiteration of the neural network model, ΔE p,t-1 is the error change of the (t-1)thiteration, and γ p is a preset model adjustment factor.
[0149] In some embodiments, the weight updating unit comprises:
[0150] a weight calculation unit configured to determine a weight of the current iteration by using the following formula (3), comprising:
[0151]
[0152] wherein W p,t is the weight of the tthiteration, W p,t-1 is the weight of the (t-1)thiteration of the neural network model, and E p is the model error.
[0153] In some embodiments, the model training module 402 further comprises:
[0154] a node adjustment step size obtaining unit configured to obtain a node adjustment step size, the node adjustment step size being associated with a hidden layer arranged by the neural network model;
[0155] a node number updating unit configured to, for any iteration, update a node number of a hidden layer in the current iteration based on a node number of a hidden layer contained in the neural network model in the last iteration, the node adjustment step size, and an error change of the last iteration;
[0156] wherein the node number of the hidden layer in the current iteration is determined by using the following formula (4), comprising:
[0157] N p,t = N p,t-1 + sgn(ΔE p,t-1 ) · β p (4)
[0158] wherein N p,t is the node number of the hidden layer in the tthiteration, and N p,t-1is the number of nodes of the hidden layer in the t-1th iteration, and β is a preset influence coefficient. p is the step size for adjusting the node, and sgn(*) represents a sign function of error change.
[0159] In some embodiments, the node step size obtaining unit comprises:
[0160] The node step size calculating unit is configured to determine the node step size by using the following formula (5), which comprises:
[0161]
[0162] wherein, α is a preset influence coefficient, d is the model depth determined by the hidden layer arranged by the neural network model, and Int(*) represents an integer operation. p is a preset influence coefficient, d p is the model depth determined by the hidden layer arranged by the neural network model, and Int cs (*) represents an integer operation.
[0163] The device provided in the embodiments of the present application can execute the method provided in the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of the embodiments of the present application are corresponding to the steps in the method of the embodiments of the present application. The detailed function description of each module of the device can be found in the description of the corresponding method in the foregoing description, and will not be repeated here.
[0164] The embodiments of the present application also provide an electronic device. The electronic device comprises a memory and a processor. The memory stores a computer program. The processor implements the method of vehicle assisted driving when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or a vehicle-mounted computer.
[0165] Please refer to Figure 5 , Figure 5 The hardware structure of the electronic device of another embodiment is shown, which comprises:
[0166] The processor 501 can be implemented in the form of a general CPU (Central Processing Unit, central processor), a microprocessor, an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided in the embodiments of the present application.
[0167] The memory 502 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 502 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present specification are implemented by software or firmware, the related program codes are stored in the memory 502 and are called and executed by the processor 501 to implement a method of vehicle auxiliary driving according to an embodiment of the present application;
[0168] The input / output interface 503 is configured to realize information input and output.
[0169] The communication interface 504 is configured to realize communication interaction between the device and other devices. The communication can be realized by a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0170] The bus 505 is configured to transmit information between various components (for example, the processor 501, the memory 502, the input / output interface 503, and the communication interface 504) of the device.
[0171] The processor 501, the memory 502, the input / output interface 503, and the communication interface 504 are connected to each other through the bus 505 to realize communication connection between the device.
[0172] The embodiments of the present application also provide a vehicle, which comprises the vehicle auxiliary driving device or the electronic device described above.
[0173] The embodiments of the present application also provide a computer program product, which comprises a computer program. When the computer program is executed by a processor, the method of vehicle auxiliary driving described above is realized.
[0174] The embodiments described in the present application are used to more clearly illustrate the technical solutions of the present application and do not constitute a limitation on the technical solutions provided by the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.
[0175] Those skilled in the art can understand that the technical solutions shown in the figure do not constitute a limitation on the present application. More or fewer steps can be included, or some steps can be combined or different steps can be included.
[0176] The apparatus embodiments described above are merely exemplary, and the units described as separate units can or can not be physically separate, i.e., can be located in one place, or can be distributed over multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.
[0177] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.
[0178] The terms "first", "second", "third", "fourth" and the like in the description of the application and in the claims of the foregoing drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so construed can be interchanged, such that, for example, without departing from the scope of the application, the embodiments described herein can be carried out in a different order than the one illustrated or described herein. In addition, the terms "comprising", "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or units not necessarily limited to those explicitly listed, but can include other not expressly listed or inherent to such processes, methods, products or apparatus.
[0179] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the relationship between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases: only A, only B, and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0180] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.
[0181] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they can be located in one place or distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0182] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0183] If the integrated unit is realized 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 technical solutions of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0184] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modification, equivalent replacement and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method of assisting driving of a vehicle, characterized by, The method comprises: acquiring vehicle driving data samples, the vehicle driving data samples comprising vehicle driving data, road traffic data and corresponding state mode identifiers of sample vehicles, the state mode identifiers being used to indicate whether the vehicles are normally driven; inputting the vehicle driving data samples into a preset neural network model to iteratively evaluate model output error data for the vehicle driving data samples, and adjusting model parameters configured by the neural network model and the number of nodes of hidden layers arranged by the neural network model based on the model output error data until a preset iteration stopping condition is reached to obtain a vehicle assisted driving model, comprising: initializing model parameters of the neural network model, the model parameters comprising weights, biases and learning rates, comprising: initializing the weights of the neural network model by using the following formula (1), comprising: (1) wherein is an initial value for a weight of the neural network model, is a mean shift amount with respect to a weight of the neural network model, is a standard deviation for weight initialization, denotes a normal distribution with mean 0 and standard deviation the identity matrix, is the identity matrix; for each iteration, determining corresponding model output error data based on the output of the neural network model in the last iteration, the model output error data comprising a model error and an error change amount of the last iteration; updating the learning rate of the current iteration based on the learning rate of the neural network model in the last iteration and the error change amount of the last iteration, comprising: determining the learning rate of the current iteration by using the following formula (2), comprising: (2) wherein, is a learning rate for the tth iteration, is a learning rate of the neural network model in the (t-1)th iteration, is an error change amount of the (t-1)th iteration, is a preset model adjustment factor; updating the weights of the current iteration based on the learning rate of the current iteration, the weights of the neural network model in the last iteration and the model error, comprising: determining the weights of the current iteration by using the following formula (3), comprising: (3) wherein, is the weight for the tth iteration, is the weight of the neural network model in the t-1th iteration, is the model error; acquiring vehicle driving data of a target vehicle; analyzing the vehicle driving data by using the vehicle assisted driving model to obtain a vehicle driving state result of the target vehicle.
2. The method of claim 1, wherein, The neural network model comprises a feature extraction network and a classification network arranged in cascade, and the feature extraction network and the classification network each comprise a plurality of hidden layers arranged in cascade; The following steps are performed by using the feature extraction network and the classification network, comprising: performing feature dimension reduction on vehicle driving data samples input into the neural network model by using the feature extraction network to obtain vehicle feature information; performing classification on the vehicle feature information by using the classification network to obtain a vehicle driving state result of a sample vehicle, and taking the vehicle driving state result as the output of the neural network model.
3. The method of claim 1, wherein, The inputting of the vehicle driving data samples into the preset neural network model to iteratively evaluate model output error data for the vehicle driving data samples, and the adjusting of the model parameters configured by the neural network model and the number of nodes of hidden layers arranged by the neural network model based on the model output error data until the preset iteration stopping condition is reached to obtain the vehicle assisted driving model further comprises: acquiring a node adjustment step, the node adjustment step being associated with the hidden layers arranged by the neural network model; for each iteration, updating the number of nodes of hidden layers in the current iteration based on the number of nodes of the hidden layers contained in the neural network model in the last iteration, the node adjustment step and the error change amount of the last iteration; Wherein, the number of nodes of the hidden layer in the current iteration is determined by the following formula (4), including: (4) wherein is the number of nodes in the hidden layer in the tth iteration, is the number of nodes in the hidden layer in the (t-1)th iteration, is the step size adjustment for the node, is a sign function that indicates the change in error.
4. The method of claim 3, wherein, The node adjustment step is obtained, including: The node adjustment step is determined by the following formula (5), including: (5) wherein, is a preset influence coefficient, is a model depth determined by a hidden layer arranged by the neural network model, denotes a rounding operation.
5. An apparatus for assisting driving of a vehicle, characterized by comprising: The device includes: The first obtaining module is configured to obtain vehicle driving data samples, wherein the vehicle driving data samples include vehicle driving data, road traffic data and corresponding state mode identifiers of sample vehicles, and the state mode identifiers are used to indicate whether the vehicles are normally driven. The model training module is configured to input the vehicle driving data samples into a preset neural network model, iteratively evaluate model output error data for the vehicle driving data samples, and adjust model parameters configured by the neural network model and the number of nodes of a hidden layer arranged by the neural network model based on the model output error data until a preset iteration stopping condition is reached, thereby obtaining a vehicle assisted driving model, including: The model parameters of the neural network model are initialized, including weights, biases and learning rates, including: The weights of the neural network model are initialized by the following formula (1), including: (1) wherein is an initial value for a weight of the neural network model, is a mean value shift for a weight of the neural network model, is a standard deviation for weight initialization, denotes a normal distribution with mean 0 and standard deviation the identity matrix, is the identity matrix; For each iteration, based on the output of the neural network model in the last iteration, corresponding model output error data is determined, including model errors and error change amounts of the last iteration; The learning rate of the current iteration is updated based on the learning rate of the neural network model in the last iteration and the error change amount of the last iteration, including: The learning rate of the current iteration is determined by the following formula (2), including: (2) wherein, is a learning rate for the tth iteration, is a learning rate of the neural network model in the (t-1)th iteration, is an error change amount of the (t-1)th iteration, is a preset model adjustment factor; The weights of the current iteration are updated based on the learning rate of the current iteration, the weights of the neural network model in the last iteration and the model error, including: The weights of the current iteration are determined by the following formula (3), including: (3) wherein, is the weight for the tth iteration, is the weight of the neural network model in the t-1th iteration, is the model error; The second obtaining module is configured to obtain vehicle driving data of a target vehicle. The analysis module is configured to analyze the vehicle driving data by using the vehicle assisted driving model to obtain a vehicle driving state result of the target vehicle.
6. An electronic device, comprising: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the vehicle assisted driving method of any one of claims 1-4 when executing the computer program.
7. A vehicle characterized by comprising: The vehicle includes the vehicle assisted driving device of claim 5 or the electronic device of claim 6.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the vehicle assisted driving method of any one of claims 1-4. The computer program is executed by the processor to implement the vehicle assisted driving method of any one of claims 1-4.
Citation Information
Patent Citations
ESC intelligent control system and method based on deep learning and vehicle dynamics
CN118494457A