Method and system for improving computing power of intelligent networked vehicle based on quantification technology and vehicle
By using quantitative technology in intelligent connected vehicles to quantify the parameters of the deep learning model, the problem of insufficient computing power of intelligent connected vehicles is solved, significant storage and computing resource savings are achieved, computing power is improved, and the demand for high computing power is met.
Patent Information
- Application Number
- CN202510099505.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-23
AI Technical Summary
When dealing with computing-intensive tasks such as deep learning models, intelligent connected vehicles often face insufficient computing power, which is difficult to deal with huge and complex computing power challenges, which limits the performance of their functions and performance improvement.
Using a method based on quantization technology, by acquiring and dividing data sets, training preset deep learning models, configuring quantization elements, executing quantitative strategies, obtaining quantitative models, and deploying them to the target vehicle, optimizing the quantization model to improve computing power.
It significantly reduces the storage and computing needs of the model, reduces the computing resource occupation and memory needs of the on-board computing platform, improves the computing power of intelligent connected vehicles, solves the problem of insufficient computing power, and meets the demand for high computing power.
Smart Images

Figure CN120030386A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of intelligent connected vehicles, and specifically relates to a method, system and vehicle for improving computing power of intelligent connected vehicles based on quantization technology. Background Art
[0002] Intelligent connected vehicles achieve intelligent information exchange and sharing with people, vehicles, roads, clouds, etc. through advanced in-vehicle devices and communication technologies, aiming to provide a safer, more comfortable, energy-saving and efficient travel mode. However, with the continuous development of technologies such as autonomous driving, intelligent cockpits and vehicle networking, intelligent connected vehicles have higher and higher requirements for computing power. For example, the in-vehicle computing platform of intelligent connected hybrid vehicles often faces the problem of insufficient computing power when processing computationally intensive tasks such as deep learning models, and it is difficult to cope with huge and complex computing challenges. This not only restricts the full play of various advanced functions of intelligent connected vehicles, but also restricts the further improvement of their performance and the expansion of application scenarios. Summary of the Invention
[0003] The purpose of this application is to provide a method, system and vehicle for improving the computing power of intelligent connected vehicles based on quantization technology, which can achieve, thereby solving the problem.
[0004] In order to solve the above technical problems, this application is implemented as follows: In the first aspect, this application provides a method for improving the computing power of intelligent connected vehicles based on quantization technology, and the method includes: Obtain a data set, and divide the data set into a training set, a validation set and a test set; Based on the training set, train a preset deep learning model to obtain a floating-point model; According to the application scenario of the floating-point model, configure the quantization elements of the floating-point model; Based on the quantization elements and the validation set, execute the first quantization strategy or the second quantization strategy to obtain a quantization model; Deploy the quantization model to the target vehicle, and based on the test set, obtain the quantization test result of the quantization model; Based on the quantization test result, select a preset optimization method to optimize the quantization model.
[0005] Further, obtaining a data set and dividing the data set into a training set, a validation set and a test set includes: the data set includes a public data set and / or a self-built data set; obtain the first data; preprocess the first data to obtain a public data set; and / or, according to a preset data acquisition scheme, collect the second data, label the second data; preprocess the labeled second data to obtain a self-built data set; wherein, the first data and the second data cover data under various driving scenarios and traffic conditions.
[0006] Furthermore, based on the quantization elements and the verification set, the first quantization strategy or the second quantization strategy is executed to obtain the step of the quantization model, wherein the execution of the first quantization strategy includes: based on the quantization elements, quantizing the weight parameters and activation values of the floating-point model to obtain the quantization model; based on the verification set, obtaining the accuracy difference between the floating-point model and the quantization model; determining whether the accuracy difference is within a preset range; and if so, outputting the quantization model.
[0007] Furthermore, the step of determining whether the accuracy difference is within a preset range further includes: if not, adjusting the quantization factor and re-executing the first quantization strategy; or if not, executing the second quantization strategy.
[0008] Further, if not, adjust the quantization factors and re-execute the first quantization strategy; or if not, execute the second quantization strategy, including: presetting the hyperparameters of the floating-point model; training the floating-point model based on the training set and the hyperparameters, and executing the second quantization strategy to obtain the quantization model.
[0009] Furthermore, based on the training set and the hyperparameters, the floating-point model is trained, and the second quantization strategy is executed to obtain the step of the quantized model. The execution of the second quantization strategy includes: inserting a pseudo-quantization node into the floating-point model, simulating the quantization of the weight parameters and activation values of the floating-point model, and constructing a loss function; according to the loss function, the gradients of the weight parameters and activation values are obtained to update the model parameters of the floating-point model; based on the validation set, whether the performance of the floating-point model meets the preset expected performance; if so, the training is terminated, and the weight parameters and activation values of the floating-point model after the training are quantized to obtain the quantized model.
[0010] Furthermore, based on the validation set, the step of determining whether the model performance of the floating-point model meets the preset expected performance also includes: if not, adjusting the hyperparameters of the floating-point model and re-executing the second quantization strategy.
[0011] Compared with the prior art, the above technical solution provided by this application includes at least the following technical effects: The present application provides a method for improving the computing power of intelligent networked vehicles based on quantization technology. The method provided by the present application can convert the high-precision floating-point parameters of the model into low-precision integer parameters, which can significantly reduce the storage and computing requirements required by the model. The present application can deploy the quantization model to the target vehicle, which can significantly reduce the computing resource occupation and memory requirements of the on-board computing platform of the target vehicle to improve the computing power, and can effectively solve the problem of insufficient computing power of intelligent networked vehicles and meet the demand for high computing power of intelligent networked vehicles.
[0012] In the second aspect, the present application provides a system for improving computing power of intelligent connected vehicles based on quantization technology, the system comprising: A data set acquisition module is used to acquire a data set and divide the data set into a training set, a validation set, and a test set; The model preparation module is used to train the preset deep learning model based on the training set to obtain a floating-point model; A model quantization module, used to configure the quantization elements of the floating-point model according to the application scenario of the floating-point model; used to execute the first quantization strategy or the second quantization strategy based on the quantization elements to obtain a quantization model; The model deployment module is used to deploy the quantitative model to the target vehicle and obtain the quantitative test results of the quantitative model based on the test set; The model optimization module is used to select a preset optimization method based on the quantitative test results to optimize the quantitative model.
[0013] In a third aspect, the present application provides a vehicle comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the method for improving the computing power of an intelligent connected vehicle based on quantization technology as in the first aspect is implemented.
[0014] In a fourth aspect, the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the method for improving the computing power of an intelligent connected vehicle based on quantization technology as in the first aspect is implemented.
[0015] It can be understood that the technical effects of the technical solutions provided in the second, third and fourth aspects can be found in the relevant description of the first aspect, and will not be repeated here.
[0016] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of a method for improving computing power of an intelligent connected vehicle based on quantization technology provided in an embodiment of the present application; Figure 2 It is a structural block diagram of a system for improving computing power of intelligent connected vehicles based on quantization technology provided in an embodiment of the present application; Figure 3 It is a structural block diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here. In addition, the "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.
[0020] The following is combined with Figure 1 The method for improving the computing power of intelligent connected vehicles based on quantization technology provided in the embodiment of the present application is described in detail through specific embodiments and their application scenarios.
[0021] See also Figure 1 , shown is a method for improving computing power of an intelligent connected vehicle based on quantization technology provided in the first aspect of an embodiment of the present application. The method may include but is not limited to steps S101 to S106.
[0022] S101: Obtain a data set, and divide the data set into a training set, a validation set, and a test set.
[0023] In this embodiment, the division ratio of the data set can be adjusted according to the size of the data set and the complexity of the task. Exemplarily, the division ratio of the data set can be 70:15:15 or 80:10:10, etc. The training set is used to train the model; the validation set is used to adjust the hyperparameters of the model and monitor the training process of the model; the test set is used to finally evaluate the performance of the model, that is, the prediction accuracy of the model on new data. The data set can be divided into simple random splits, that is, the data set is randomly split according to the preset division ratio; or the data set can also be divided into stratified sampling, and the data samples of each category are sampled separately to ensure that each category has enough data samples.
[0024] S102: Based on the training set, train a preset deep learning model to obtain a floating-point model.
[0025] In this embodiment, the preset deep learning model can select models such as Faster R-CNN, YOLO or SSD in the field of target detection, or semantic segmentation models based on full convolutional networks, dilated convolutions, attention mechanisms or Transformers, or models in the field of image classification. The deep learning model can be selected according to actual needs and trained using the corresponding training set to obtain a floating-point model.
[0026] S103: According to the application scenario of the floating-point model, configure the quantization elements of the floating-point model.
[0027] In this embodiment, the vehicle computing platform usually uses an embedded processor or a relatively weak GPU, whose computing power and storage capacity cannot be compared with high-performance servers. Therefore, the quantization elements of the floating-point model can be configured according to the application scenario of the floating-point model and the characteristics of the vehicle computing platform to ensure that reliable perception and decision support can be provided while meeting the performance requirements of the vehicle computing platform of the target vehicle, wherein the quantization elements include but are not limited to quantization accuracy, quantization range and quantization parameters.
[0028] For example, for most in-vehicle applications, the configuration of quantization accuracy can select 8-bit quantization to significantly reduce the computational workload and memory usage of the model. Taking the target detection model (such as YOLO or SSD) deployed on the in-vehicle computing platform as an example, converting the model parameters originally stored and calculated in 32-bit floating point numbers to 8-bit integers can compress the storage size of the model to one-fourth of the original, greatly reducing the storage pressure on the in-vehicle computing platform. Using 8-bit quantization can significantly reduce the model size, reduce storage requirements, reduce dependence on computing resources of the in-vehicle computing platform, and significantly improve the inference speed. For some in-vehicle applications with high precision requirements, such as high-precision map construction or complex semantic segmentation tasks in advanced driver assistance systems (such as using DeepLabv3+ for accurate road scene element segmentation), the configuration of quantization accuracy can select 16-bit quantization to balance model size and accuracy. While ensuring a certain degree of model compression and inference acceleration, 16-bit quantization can better retain the accuracy of the model, ensuring that when processing the above example tasks, there will be no serious loss of accuracy due to quantization.
[0029] Exemplarily, the configuration of the quantization range can select a static quantization range or a dynamic quantization range. When some data has a relatively fixed range after preprocessing, the static quantization range can be selected. For example, the image data of the vehicle-mounted camera can be normalized and the pixel value can be mapped to the range of [0, 1] or [-1, 1]. The static quantization range can simplify the operation process of quantization, improve the efficiency and reasoning speed of quantization, and effectively reduce the quantization error when processing data with a relatively fixed range. When some data are affected by environmental factors such as lighting, weather, etc., resulting in changes in the data range, the use of the dynamic quantization range can dynamically adjust the quantization range according to the actual distribution of the data, which can enhance the adaptability of the model to different driving scenarios and traffic conditions. The quantization range covers the specific content and boundaries involved in the quantization process, ensuring that the quantization process can cover all important information. By clarifying the quantization range, information loss and accumulation of quantization errors can be avoided.
[0030] Exemplarily, quantization parameters mainly involve the quantization of weights and activation values. Quantization parameters are used to map floating-point numbers to fixed-point numbers, and to restore fixed-point numbers to floating-point numbers during the dequantization process. Quantization parameters usually include quantization scales and zero points, which can be determined based on the range of weights so that weights are quantized to an appropriate range. Reasonable determination of quantization parameters can ensure that the quantized weights and activation values can retain the original information to the greatest extent while meeting the quantization accuracy requirements and reducing quantization errors.
[0031] S104: Based on the quantization factors and the validation set, execute the first quantization strategy or the second quantization strategy to obtain a quantization model.
[0032] In this embodiment, based on the quantization factors and the validation set, the first quantization strategy or the second quantization strategy can be selected and executed to improve the performance of the quantization model. By executing the first quantization strategy or the second quantization strategy, the storage size of the model is compressed, the memory usage is significantly reduced, and the hardware acceleration function can be used to greatly improve the reasoning speed of the quantization model. For the vehicle-mounted computing platform, faster target detection or image recognition functions can be achieved under the premise of ensuring a certain accuracy, ensuring that the target vehicle can respond intelligently to the surrounding environment. After executing the above quantization strategy, the above quantization strategy can be adjusted and optimized according to the performance evaluation results of the quantization model on the validation set. For the first quantization strategy, if the performance of the quantization model of the first quantization strategy does not achieve the expected effect, the second quantization strategy can be considered, or the quantization factors such as the quantization range and quantization accuracy can be adjusted; for the second quantization strategy, if the performance of the quantization model of the second quantization strategy does not achieve the expected effect, the relevant parameters can also be adjusted. By executing the first quantization strategy or the second quantization strategy, the floating-point model can be converted into a quantization model, which significantly reduces the size and calculation amount of the model, which is conducive to subsequent deployment to resource-constrained vehicle computing platforms or edge devices. It is understandable that the model performance after quantization by the first quantization strategy is different from that by the second quantization strategy. The first quantization strategy and the second quantization strategy each have their own advantages and disadvantages, and can be selected according to actual conditions.
[0033] Exemplarily, the first quantization strategy may be Post-Training Quantization (PTQ), and the second quantization strategy may be Quantization Aware Training (QAT). PTQ is to perform quantization operations on the trained floating-point model after the floating-point model training is completed. PTQ does not require retraining of the floating-point model, but is based on the trained floating-point model. QAT introduces quantization simulation in the floating-point model training stage, considers the impact of quantization during the training process of the floating-point model, and is closely integrated with the training process of the floating-point model. During the training process of the floating-point model, the floating-point model is processed in a quantized manner, and the quantization error is simulated through a specific mechanism, so that the floating-point model can learn to adapt to the quantization error to obtain better model performance.
[0034] S105: Deploy the quantization model to the target vehicle, and obtain a quantization test result of the quantization model based on the test set.
[0035] In this embodiment, the quantization model still maintains a high detection and recognition accuracy. Deploying the quantization model to the target vehicle can significantly reduce the computing resource usage and memory requirements, thereby improving the performance of intelligent connected vehicles in autonomous driving; it can improve the real-time response capability and overall performance of intelligent connected vehicles; it can make full use of the computing power of the on-board hardware to achieve more efficient model reasoning. At the same time, the smaller size of the quantization model is also easier to store and transmit. For example, in terms of data processing before and after quantization, the lidar data processing speed is increased from 100Hz to 120Hz, the camera data processing speed is increased from 50Hz to 60Hz, and the millimeter wave radar data processing speed is increased from 200Hz to 240Hz.
[0036] For example, using PyTorch for quantization, the quantized model can be converted into a format suitable for deployment, such as ONNX or TFLite format, when deployed. To deploy the quantized model to the target vehicle, you can use an embedded platform, such as the NVIDIA Jetson series or other dedicated vehicle computing platforms, and select the appropriate deep learning framework and deployment tools based on the vehicle computing platform of the target vehicle. For example, if you use the NVIDIA Jetson series of vehicle computing platforms, you can use TensorRT for model deployment, and you can also optimize and accelerate the quantized model.
[0037] In this embodiment, for the vehicle-mounted applications of the vehicle-mounted computing platform, its data usually comes from various sensors, such as cameras, radars, etc. Taking camera image data as an example, the image data needs to be preprocessed to meet the input requirements of the model. The test set should contain data from various driving scenarios and traffic conditions. The test set can use a data set similar to the previous model training and verification stage to ensure that it covers various situations that the vehicle may encounter. For each sample in the test set, it is input into the quantization model deployed on the vehicle-mounted computing platform, and reasoning is performed and the results are obtained. According to the task type (such as classification, detection, segmentation, etc.), the performance of the quantization model is evaluated using the corresponding evaluation indicators. For classification tasks, accuracy can be used as an evaluation indicator; for target detection tasks, average precision can be used as an evaluation indicator to calculate the intersection and union ratio of the predicted box and the real box, etc. For semantic segmentation tasks, the average intersection and union ratio can be used as an evaluation indicator. According to the above evaluation indicators, the quantitative test results of the quantization model can be obtained to further optimize the quantization model or adjust the deployment strategy.
[0038] S106: Based on the quantitative test results, a preset optimization method is selected to optimize the quantitative model.
[0039] In this embodiment, based on the quantization test results, techniques such as model pruning or knowledge distillation can be adopted to further compress the quantized model, further improve the running efficiency of the quantized model, and meet the real-time requirements of intelligent connected vehicles. Model pruning can reduce the number of parameters and computational amount of the quantized model, and at the same time may reduce the quantization error, improve the inference speed and storage efficiency of the quantized model, and alleviate the situation of limited resources on the in-vehicle computing platform. If it is necessary to improve the performance of the quantized model without increasing the model complexity, the knowledge distillation technique can also be adopted to transfer the knowledge of a complex high-precision teacher model to the quantized student model. Knowledge distillation can use the knowledge of the teacher model to help the quantized student model learn and improve its performance, while maintaining the lightweight characteristics of the quantized model, which is suitable for scenarios where the in-vehicle computing platform has limited resources but requires high performance.
[0040] It can be understood that the embodiment of the present application can also redeploy the optimized quantized model to the in-vehicle computing platform and retest it using the test set to evaluate the optimization effect, and finally obtain a quantized model with better performance to meet the requirements of the in-vehicle computing platform.
[0041] In some embodiments, a data set is obtained and divided into a training set, a validation set, and a test set, including: the data set includes a public data set and / or a self-built data set; the first data is obtained; the first data is preprocessed to obtain the public data set; and / or, according to a preset data acquisition scheme, the second data is collected, and the second data is labeled; the labeled second data is preprocessed to obtain the self-built data set; wherein, the first data and the second data cover data under various driving scenarios and traffic conditions.
[0042] In this embodiment, for the field of autonomous driving of intelligent connected vehicles, common public data sets include the KITTI data set, the Cityscapes data set, etc. The first data can be obtained through the above data sets. The KITTI data set contains a large amount of image data of real driving scenarios, such as images in different environments such as cities, villages, and highways, and at the same time provides lidar point cloud data and annotation information of vehicles and pedestrians, which can be used for tasks such as object detection and semantic segmentation. The Cityscapes data set is suitable for semantic segmentation of urban street scenes and can provide high-quality images and fine pixel-level annotations, including different categories such as pedestrians, vehicles, roads, and buildings. It can be understood that the second data is similar to the first data, but requires additional data collection and annotation steps.
[0043] In this embodiment, preprocessing the first data and the annotated second data includes operations such as data cleaning, format conversion, and alignment of annotation information. For example, the lidar point cloud data needs to be converted into a unified coordinate system to remove invalid point clouds. The camera image data needs to be adjusted in resolution and color corrected. In order to increase the diversity of the data, data enhancement operations such as rotation, flipping, cropping, adding noise, etc. can also be performed on the data set to improve the generalization ability of the model. The preset data collection scheme may include sensor configuration, collection route, and collection time. At the same time, the collection process must ensure the diversity and coverage of the data, and must cover multiple types of driving scenarios and traffic conditions. The second data is annotated, for example, target detection and classification annotation are performed on the lidar point cloud data; target box annotation and semantic segmentation annotation are performed on the camera image data.
[0044] Exemplarily, sensors such as vehicle-mounted cameras, lidars, millimeter-wave radars, etc. can be used for the second data collection. Plan the collection route to cover a variety of driving scenarios, such as urban congested roads, highways, mountain roads, underground parking lots, etc., as well as different traffic conditions, such as sunny days, rainy days, foggy days, nights, etc. For the collected image data, use annotation tools to annotate. For target detection tasks, the LabelImg tool can be used to annotate the bounding boxes of vehicles, pedestrians, traffic signs and other targets in the image; for semantic segmentation tasks, tools such as VGG Image Annotator can be used for pixel-level annotation. After the annotation is completed, the annotation information can be saved in XML, JSON or other formats to facilitate subsequent reading and parsing of the annotation information and converting it into a format acceptable to the model.
[0045] In some embodiments, based on the quantization elements and the validation set, the first quantization strategy or the second quantization strategy is executed to obtain the step of the quantization model, wherein the execution of the first quantization strategy includes: based on the quantization elements, quantizing the weight parameters and activation values of the floating-point model to obtain the quantization model; based on the validation set, obtaining the accuracy difference between the floating-point model and the quantization model; determining whether the accuracy difference is within a preset range; and if so, outputting the quantization model.
[0046] In this embodiment, an acceptable accuracy difference range can be preset according to task requirements and application scenarios. For example, for certain vehicle-mounted applications of the vehicle-mounted computing platform, the acceptable accuracy difference range can be 5%. By judging whether the accuracy difference is within the preset range, it can be ensured that the quantization model is within an acceptable performance range and the effectiveness of the quantization model in practical applications is guaranteed. Among them, the accuracy difference between the floating-point model and the quantization model can be evaluated by the mean square error (MSE) formula and the signal-to-noise ratio (SNR) formula.
[0047] In some embodiments, the step of determining whether the accuracy difference is within a preset range further includes: if not, adjusting the quantization factor and re-executing the first quantization strategy; or if not, executing the second quantization strategy.
[0048] In this embodiment, if the accuracy difference is not within the preset range, it may be that the current quantization accuracy is too coarse, resulting in excessive information loss. The quantization accuracy can be appropriately increased, or the quantization range does not match the actual distribution of the data, and the quantization range can be adjusted. After re-executing the first quantization strategy, the performance of the quantization model after adjusting the quantization elements can be re-evaluated with the verification set, and the accuracy difference can be judged again. The second quantization strategy can be a more complex quantization strategy, which can make up for the accuracy loss caused by quantization to a certain extent and improve the performance of the quantization model on the verification set. It is understandable that when adjusting the quantization elements or executing a new quantization strategy, it is necessary to weigh performance and resource consumption. For example, improving quantization accuracy and executing more complex quantization strategies will increase computing and storage requirements, which need to be comprehensively considered according to the actual deployment environment to achieve better performance.
[0049] In some embodiments, if not, the quantization factors are adjusted and the first quantization strategy is re-executed; or if not, the second quantization strategy is executed, including: presetting the hyperparameters of the floating-point model; training the floating-point model based on the training set and the hyperparameters, and executing the second quantization strategy to obtain the quantization model.
[0050] In this embodiment, the selection of hyperparameters needs to be adjusted according to the specific task and model, and different data sets and models may need to select different hyperparameters. Hyperparameters include but are not limited to learning rate, optimizer type, training rounds, and batch size. By presetting reasonable hyperparameters, the floating-point model can converge faster during training to avoid underfitting or overfitting. Executing the second quantization strategy can reduce the performance loss caused by quantization to a certain extent and improve the performance of the quantized model.
[0051] In some embodiments, based on the training set and hyperparameters, a floating-point model is trained, and a second quantization strategy is executed to obtain a quantized model. In the step of executing the second quantization strategy, the pseudo-quantization node is inserted into the floating-point model, the weight parameters and activation values of the floating-point model are simulated and quantized, and a loss function is constructed; according to the loss function, the gradients of the weight parameters and activation values are obtained to update the model parameters of the floating-point model; based on the validation set, whether the performance of the floating-point model meets the preset expected performance is determined; if so, the training is terminated, and the weight parameters and activation values of the floating-point model after the training are quantized to obtain a quantized model.
[0052] In this embodiment, a pseudo-quantization node is inserted into the floating-point model, and the pseudo-quantization node simulates the quantization of the weights and activation values. The simulated quantized model will adapt to the errors caused by quantization during training to improve the performance of the quantized model. For example, for the weights and activation functions of the convolutional layer and the linear layer, pseudo-quantization operations are added before and after these layers to achieve the effect of simulated quantization. For classification tasks, a cross entropy loss function can be constructed; for target detection tasks, bounding box regression loss and classification loss functions can be constructed; for semantic segmentation tasks, cross entropy loss or Dice loss functions can be constructed. Multiple rounds of training can be performed. During the training process, the pseudo-quantization node simulates quantization and updates the model parameters of the floating-point model through back propagation. According to the task type, a suitable evaluation indicator is selected. If the performance of the floating-point model meets the preset expected performance, the trained floating-point model is converted into a quantized model. In some embodiments, based on the validation set, the step of judging whether the model performance of the floating-point model meets the preset expected performance also includes: if not, adjusting the hyperparameters of the floating-point model and re-executing the second quantization strategy.
[0053] In this embodiment, if the performance of the floating-point model on the validation set does not meet the preset expected performance, the following situations may exist: the learning rate causes the floating-point model to converge too slowly or oscillate; the batch size affects the training stability and convergence speed of the floating-point model, resulting in insufficient memory or unstable training; the optimizer is not effective; the number of training rounds is insufficient or too many. Using the adjusted hyperparameters, re-execute the second quantization strategy, and it may also be necessary to go through multiple hyperparameter adjustment and retraining processes until the model performance meets the preset expected performance or reaches the maximum number of attempts. For different tasks and models, the degree of influence of different hyperparameters may be different and the adjustment of different hyperparameters may affect each other, so it is necessary to experiment and adjust according to the specific situation. Through the above multiple iterative adjustments, the model can be continuously optimized and gradually approach the expected performance.
[0054] See also Figure 2 , shown is a structural block diagram of a system for improving computing power of intelligent connected vehicles based on quantization technology provided in an embodiment of the second aspect of the present application.
[0055] It should be noted that the method for improving computing power of intelligent connected vehicles based on quantization technology provided in the embodiment of the present application can be executed by a system for improving computing power of intelligent connected vehicles based on quantization technology, or a module in the system for executing the method for improving computing power of intelligent connected vehicles based on quantization technology. In the embodiment of the present application, the method for controlling vehicle brake redundancy provided in the embodiment of the present application is explained by taking the method for loading vehicle brake redundancy in a system for improving computing power of intelligent connected vehicles based on quantization technology as an example.
[0056] In some embodiments of the present application, the system for improving computing power of intelligent connected vehicles based on quantization technology includes: The data set acquisition module 201 is used to acquire a data set and divide the data set into a training set, a validation set and a test set; A model preparation module 202 is used to train a preset deep learning model based on a training set to obtain a floating-point model; The model quantization module 203 is used to configure the quantization elements of the floating-point model according to the application scenario of the floating-point model; and to execute the first quantization strategy or the second quantization strategy based on the quantization elements to obtain a quantization model; A model deployment module 204 is used to deploy the quantitative model to the target vehicle and obtain a quantitative test result of the quantitative model based on the test set; The model optimization module 205 is used to select a preset optimization method based on the quantitative test results to optimize the quantitative model.
[0057] The system for improving the computing power of intelligent networked vehicles based on quantitative technology in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), or a personal computer (PC), etc., which is not specifically limited in the embodiment of the present application.
[0058] The system for improving computing power of intelligent connected vehicles based on quantization technology provided in the embodiment of the present application can achieve Figure 1 In the embodiments of the present invention, the various processes of implementing the method for improving the computing power of intelligent connected vehicles based on quantization technology will not be described here to avoid repetition.
[0059] Alternatively, if Figure 3 As shown, an embodiment of the present application also provides a vehicle, including a processor 301, a memory 302, and a program or instruction 303 stored in the memory and executable on the processor. When the program or instruction is executed by the processor, each process of the above-mentioned method embodiment for improving the computing power of an intelligent connected vehicle based on quantization technology is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0060] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned method embodiment for improving the computing power of an intelligent connected vehicle based on quantization technology is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0061] The processor is the processor in the target vehicle in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0062] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0063] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0064] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for improving computing power of intelligent connected vehicles based on quantization technology, characterized in that: The method comprises: Obtain a data set, and divide the data set into a training set, a validation set, and a test set; Based on the training set, training a preset deep learning model to obtain a floating-point model; According to the application scenario of the floating-point model, configuring the quantization elements of the floating-point model; Based on the quantization elements and the validation set, executing the first quantization strategy or the second quantization strategy to obtain a quantization model; Deploy the quantitative model to a target vehicle, and obtain a quantitative test result of the quantitative model based on the test set; Based on the quantitative test results, a preset optimization method is selected to optimize the quantitative model.
2. The method for improving computing power of intelligent connected vehicles based on quantization technology according to claim 1 is characterized in that: The step of obtaining a data set and dividing the data set into a training set, a validation set, and a test set includes: The data set includes a public data set and / or a self-built data set; Acquire first data; pre-process the first data to obtain the public data set; And / or, according to a preset data collection scheme, collect second data and label the second data; pre-process the labeled second data to obtain the self-built data set; wherein the first data and the second data cover data under a variety of driving scenarios and traffic conditions.
3. The method for improving computing power of intelligent connected vehicles based on quantization technology according to claim 1 is characterized in that: In the step of executing the first quantization strategy or the second quantization strategy based on the quantization elements and the validation set to obtain a quantization model, executing the first quantization strategy includes: quantizing the weight parameters and activation values of the floating-point model based on the quantization elements to obtain the quantization model; Based on the validation set, obtaining the accuracy difference between the floating point model and the quantized model; Determining whether the accuracy difference is within a preset range; If so, the quantization model is output.
4. The method for improving computing power of intelligent connected vehicles based on quantization technology according to claim 3 is characterized in that: The step of determining whether the accuracy difference is within a preset range further includes: If not, the quantization factor is adjusted and the first quantization strategy is re-executed; or if not, the second quantization strategy is executed.
5. The method for improving computing power of intelligent connected vehicles based on quantization technology according to claim 4 is characterized in that: If not, adjusting the quantization factor and re-executing the first quantization strategy; Or if not, executing the second quantization strategy, including: Presetting hyperparameters of the floating point model; Based on the training set and the hyperparameters, the floating-point model is trained, and the second quantization strategy is executed to obtain the quantization model.
6. The method for improving computing power of intelligent connected vehicles based on quantization technology according to claim 5 is characterized in that: In the step of training the floating-point model based on the training set and the hyperparameters, and executing the second quantization strategy to obtain the quantization model, executing the second quantization strategy includes: Inserting a pseudo quantization node into the floating-point model, performing simulated quantization on weight parameters and activation values of the floating-point model, and constructing a loss function; According to the loss function, obtaining the gradient of the weight parameter and the activation value to update the model parameters of the floating-point model; Based on the validation set, determining whether the performance of the floating-point model meets the preset expected performance; If so, the training is terminated, and the weight parameters and the activation values of the floating-point model after the training are quantized to obtain the quantized model.
7. The method for improving computing power of intelligent connected vehicles based on quantization technology according to claim 6 is characterized in that: The step of judging whether the model performance of the floating-point model meets the preset expected performance based on the validation set further includes: If not, adjust the hyperparameters of the floating-point model and re-execute the second quantization strategy.
8. A system for improving computing power of intelligent connected vehicles based on quantization technology, characterized in that: The system comprises: A data set acquisition module, used to acquire a data set and divide the data set into a training set, a validation set and a test set; A model preparation module, used to train a preset deep learning model based on the training set to obtain a floating-point model; A model quantization module, configured to configure the quantization elements of the floating-point model according to the application scenario of the floating-point model; and to execute the first quantization strategy or the second quantization strategy based on the quantization elements to obtain a quantization model; A model deployment module, used to deploy the quantitative model to a target vehicle and obtain a quantitative test result of the quantitative model based on the test set; The model optimization module is used to select a preset optimization method based on the quantitative test results to optimize the quantitative model.
9. A vehicle, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the method for improving the computing power of an intelligent connected vehicle based on quantization technology as described in any one of claims 1 to 7 is implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the method for improving the computing power of an intelligent connected vehicle based on quantization technology as described in any one of claims 1 to 7 are implemented.