Wind resistance coefficient prediction method and system, electronic equipment and storage medium
The three-dimensional structural data is processed through vertex clustering and mesh simplification algorithms, and a multi-layer neural network is used to predict the drag coefficient, which solves the problem of time and resource consumption in the current technology of wind drag coefficient prediction, and achieves fast and accurate wind drag coefficient prediction. , which meets the need for rapid iteration of vehicle exterior styling.
Patent Information
- Application Number
- CN202410672618.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-23
AI Technical Summary
The existing wind resistance coefficient prediction method consumes a lot of time and resources, and cannot meet the needs of rapid iteration of vehicle exterior styling.
Vertex clustering algorithm and mesh simplification algorithm are used to process the three-dimensional structural data to generate at least two sets of vertex structure data, which are input into the pre-trained drag coefficient prediction model, and a multi-layer neural network is used to conduct end-to-end drag coefficient predict.
It achieves fast and accurate prediction of wind resistance coefficient, reduces the use of resources and time, and meets the needs of rapid iteration of vehicle exterior styling.
Smart Images

Figure CN118536666A
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle dynamics technology, and in particular to a method, system, electronic device and storage medium for predicting a drag coefficient. Background Art
[0002] The drag coefficient is an important indicator for measuring aerodynamic performance. At present, the main methods for determining the vehicle's drag coefficient are wind tunnel tests and computational fluid dynamics (CFD) simulation. The aerodynamic performance indicators obtained by wind tunnel tests are relatively accurate, but the preparation cycle is long and the test cost is high; CFD simulation obtains aerodynamic performance indicators by solving fluid mechanics differential equations, simplifying the process of determining the drag coefficient, but due to the large amount of data, each prediction still takes a lot of time.
[0003] However, the above two methods consume a lot of time and resources, and both cannot meet the needs of rapid iteration of vehicle exterior styling. Summary of the invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present application aims to provide a drag coefficient prediction method, system, electronic device and storage medium to achieve end-to-end drag coefficient prediction, improve the efficiency of drag coefficient prediction, and reduce the resources used for drag coefficient prediction.
[0005] The present application provides a method for predicting a drag coefficient, the method comprising:
[0006] Acquire three-dimensional structure data of a vehicle to be predicted, and process the three-dimensional structure data based on a vertex clustering algorithm and a mesh simplification algorithm to obtain at least two groups of vertex structure data;
[0007] Inputting the three-dimensional structure data and at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain a predicted drag coefficient of the vehicle to be predicted;
[0008] Among them, the drag coefficient prediction model includes at least two hidden layers connected in sequence and a fully connected layer connected to the last hidden layer, the number of the hidden layers is the same as the number of groups of the vertex structure data, and the drag coefficient prediction model is trained based on sample three-dimensional data and sample vertex data and sample drag coefficient corresponding to the sample three-dimensional data.
[0009] According to the technical solution provided in the embodiment of the present application, optionally, the vertex structure data includes vertex clustering data and vertex simplification data; the three-dimensional structure data is processed based on the vertex clustering algorithm and the mesh simplification algorithm to obtain at least two groups of vertex structure data, including:
[0010] Based on a vertex clustering algorithm and a preset first ratio, the three-dimensional structure data is processed to obtain vertex clustering data;
[0011] Taking the vertex clustering data as data to be simplified, processing the data to be simplified based on a mesh simplification algorithm and a preset second ratio, updating the data to be simplified, and taking the updated data to be simplified as a group of vertex simplification data to determine the current number of groups of the vertex simplification data;
[0012] In response to the current number of groups being less than the target number of groups of the vertex simplification data, returning to execute the mesh simplification algorithm and the preset second ratio, processing the data to be simplified, updating the data to be simplified, and using the updated data to be simplified as a group of vertex simplification data, determining the current number of groups of the vertex simplification data, until the current number of groups is equal to the target number of groups.
[0013] According to the technical solution provided in the embodiment of the present application, optionally, the inputting the three-dimensional structure data and the at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain the predicted drag coefficient of the vehicle to be predicted includes:
[0014] According to the number of vertices in each set of vertex structure data from large to small, determine the arrangement order of each set of vertex structure data, and determine the connection order of each hidden layer;
[0015] Determine two sets of input data for each hidden layer according to the three-dimensional structure data, at least two sets of vertex structure data, the arrangement order of each set of vertex structure data, and the connection order of each hidden layer;
[0016] Process the two sets of input data corresponding to each hidden layer in turn to obtain the output data of each hidden layer;
[0017] The output data of the last hidden layer is input into the fully connected layer connected to the last hidden layer to obtain the predicted drag coefficient of the vehicle to be predicted.
[0018] According to the technical solution provided in the embodiment of the present application, optionally, determining two sets of input data of each hidden layer according to the three-dimensional structure data, at least two sets of vertex structure data, the arrangement order of each set of vertex structure data, and the connection order of each hidden layer includes:
[0019] For each hidden layer, determining whether the connection order of the hidden layer is first;
[0020] If yes, the three-dimensional structure data and the vertex structure data with the first arrangement order are used as two sets of input data of the hidden layer;
[0021] If not, the output data of the previous layer of the hidden layer is used as the first group of input data of the hidden layer, and the vertex structure data corresponding to the same arrangement order as the connection order of the hidden layer is used as the second group of input data of the hidden layer.
[0022] According to the technical solution provided in the embodiment of the present application, optionally, the two sets of input data corresponding to each hidden layer are processed in sequence to obtain the output data of each hidden layer, including:
[0023] For each hidden layer, each set of input data is convolved based on the convolution layer to obtain two sets of convolution data;
[0024] After the two sets of convolution data are concatenated, they are input into the average pooling layer to obtain the output data of the hidden layer.
[0025] According to the technical solution provided in the embodiment of the present application, optionally, the convolution layer is used to perform convolution processing on each group of input data to obtain two groups of convolution data, including:
[0026] For each group of input data, performing geometric space convolution processing on the input data to obtain first convolution data;
[0027] Performing Euclidean spatial convolution processing on the input data to obtain second convolution data;
[0028] The first convolution data and the second convolution data are concatenated to obtain convolution data corresponding to the input data.
[0029] According to the technical solution provided in the embodiment of the present application, optionally, the pre-trained drag coefficient prediction model is trained based on the following method:
[0030] Inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into an untrained drag coefficient prediction model to obtain an output drag coefficient corresponding to each sample three-dimensional data;
[0031] Based on a preset loss function, the output drag coefficient corresponding to each sample three-dimensional data and the sample drag coefficient are calculated to determine the target loss of the untrained drag coefficient prediction model and the number of iterations;
[0032] If the target loss is less than the preset loss or the number of iterations is equal to the preset number, the untrained drag coefficient prediction model is used as the pre-trained drag coefficient prediction model;
[0033] If the number of iterations is less than the preset number and the target loss is greater than or equal to the preset loss, the model parameters of the untrained drag coefficient prediction model are adjusted, the untrained drag coefficient prediction model is updated, and the step of inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into the untrained drag coefficient prediction model to obtain the output drag coefficient corresponding to each sample three-dimensional data is returned to execute until the target loss is less than the preset loss or the number of iterations is equal to the preset number.
[0034] The embodiment of the present application also provides a drag coefficient prediction system, the system comprising:
[0035] An acquisition module, used for acquiring three-dimensional structure data of a vehicle to be predicted, and processing the three-dimensional structure data based on a vertex clustering algorithm and a mesh simplification algorithm to obtain at least two groups of vertex structure data;
[0036] A prediction module is used to input the three-dimensional structure data and at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain the predicted drag coefficient of the vehicle to be predicted; wherein the drag coefficient prediction model includes at least two hidden layers connected in sequence and a fully connected layer connected to the last hidden layer, the number of the hidden layers is the same as the number of groups of the vertex structure data, and the drag coefficient prediction model is trained based on sample three-dimensional data and sample vertex data and sample drag coefficient corresponding to the sample three-dimensional data.
[0037] The present application also provides an electronic device, the electronic device comprising:
[0038] Processor and memory;
[0039] The processor is used to execute the steps of the drag coefficient prediction method as described in any embodiment by calling the program or instruction stored in the memory.
[0040] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the steps of the drag coefficient prediction method as described in any embodiment.
[0041] In summary, the present application proposes a method for predicting a drag coefficient, by acquiring three-dimensional structural data of a vehicle to be predicted, processing the three-dimensional structural data based on a vertex clustering algorithm and a mesh simplification algorithm, obtaining at least two groups of vertex structure data, and performing hierarchical simplification processing on the three-dimensional structural data. The three-dimensional structure data and at least two groups of vertex structure data are input into a pre-trained drag coefficient prediction model to obtain the predicted drag coefficient of the vehicle to be predicted, thereby realizing end-to-end drag coefficient prediction. Compared with the existing technology, the drag coefficient can be predicted quickly, the accuracy of the data is guaranteed, and the use of resources and time is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a flow chart of a method for predicting a drag coefficient provided in an embodiment of the present application;
[0043] Figure 2 is a flow chart of another method for predicting a drag coefficient provided in an embodiment of the present application;
[0044] Figure 3 It is a structural schematic diagram of a drag coefficient prediction model provided in an embodiment of the present application;
[0045] Figure 4 is a structural schematic diagram of a drag coefficient prediction system provided in an embodiment of the present application;
[0046] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant inventions, rather than to limit the inventions. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0048] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0049] The drag coefficient prediction method provided by the embodiment of the present invention is mainly applicable to the case where the drag coefficient is predicted for a vehicle with only a digital vehicle model. The drag coefficient prediction method provided by the embodiment of the present invention can be executed by an electronic device.
[0050] Figure 1 is a flow chart of a method for predicting a drag coefficient provided in an embodiment of the present application. Figure 1 , the drag coefficient prediction method specifically includes:
[0051] S110 , obtaining three-dimensional structure data of a vehicle to be predicted, and processing the three-dimensional structure data based on a vertex clustering algorithm and a mesh simplification algorithm to obtain at least two groups of vertex structure data.
[0052] Among them, the vehicle to be predicted is the vehicle whose drag coefficient is to be predicted. The three-dimensional structure data is the various structural data corresponding to the vehicle in the three-dimensional space, which may include point data, line data, and surface data. The vertex clustering algorithm is an algorithm that discovers potential associations by grouping the three-dimensional structure data according to their similarity or connectivity. The mesh simplification algorithm (Quadic Error Metrics, QEM) is an optimization algorithm based on quadratic metric error. It is based on quaternion optimization and edge folding strategy to reduce the amount of data. The vertex structure data is the data obtained after processing by the vertex clustering algorithm and the mesh simplification algorithm.
[0053] Specifically, for the vehicle to be predicted, the corresponding three-dimensional structure data can be obtained. Since the amount of three-dimensional structure data is too large, the three-dimensional structure data can be simplified by at least two layers through a vertex clustering algorithm and a mesh simplification algorithm, and the output of each layer is used as a set of vertex structure data.
[0054] For example, the format of the three-dimensional structure data can be obj format, and the format can also be converted into ply three-dimensional data format. The three-dimensional structure data is usually composed of 500,000 to 550,000 points, and also includes the surface formed by these points and the normal vector corresponding to the surface, etc. Therefore, these three-dimensional structure data constitute the outer shell surface of the vehicle to be predicted, which is closely related to the wind resistance.
[0055] S120, inputting the three-dimensional structure data and at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain a predicted drag coefficient of the vehicle to be predicted.
[0056] The drag coefficient prediction model is used to predict the drag coefficient of the vehicle to be predicted. The drag coefficient prediction model includes at least two hidden layers connected in sequence and a fully connected layer connected to the last hidden layer, and the number of hidden layers is the same as the number of groups of vertex structure data. The drag coefficient prediction model is trained based on sample three-dimensional data and sample vertex data and sample drag coefficient corresponding to the sample three-dimensional data. The predicted drag coefficient is the output result of the pre-trained drag coefficient prediction model, that is, the predicted drag coefficient of the vehicle to be predicted.
[0057] Specifically, the three-dimensional structure data and each group of vertex structure data are input into a pre-trained drag coefficient prediction model, and the three-dimensional structure data and each group of vertex structure data are processed and integrated through the hidden layers in the drag coefficient prediction model. The data is reduced in dimension based on the fully connected layer in the drag coefficient prediction model, and after being reduced to one dimension, it is used as the output of the drag coefficient prediction model, that is, the predicted drag coefficient of the vehicle to be predicted.
[0058] Based on the above example, model training can be performed in the following manner to obtain a pre-trained drag coefficient prediction model:
[0059] Inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into an untrained drag coefficient prediction model to obtain an output drag coefficient corresponding to each sample three-dimensional data;
[0060] Based on the preset loss function, the output drag coefficient corresponding to each sample three-dimensional data and the sample drag coefficient are calculated to determine the target loss of the untrained drag coefficient prediction model and the number of iterations;
[0061] If the target loss is less than the preset loss or the number of iterations is equal to the preset number, the untrained drag coefficient prediction model is used as the pre-trained drag coefficient prediction model;
[0062] If the number of iterations is less than the preset number and the target loss is greater than or equal to the preset loss, the model parameters of the untrained drag coefficient prediction model are adjusted, the untrained drag coefficient prediction model is updated, and the step of inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into the untrained drag coefficient prediction model is returned to execute, so as to obtain the output drag coefficient corresponding to each sample three-dimensional data, until the target loss is less than the preset loss or the number of iterations is equal to the preset number.
[0063] Among them, the sample three-dimensional data is the original structural data collected in advance for training the drag coefficient prediction model. The sample vertex data corresponding to the sample three-dimensional data is the simplified data after processing the sample three-dimensional data based on the vertex clustering algorithm and the mesh simplification algorithm. The output drag coefficient is the output result of the untrained drag coefficient prediction model, that is, the drag coefficient predicted for the sample three-dimensional data. The preset loss function is a pre-constructed function for calculating the drag coefficient loss, which can be set according to requirements. The sample drag coefficient is the drag coefficient obtained by the actual measurement corresponding to the sample three-dimensional data. The target loss is the model loss calculated based on the preset loss function. The number of iterations is the number of times the current model iterates to adjust the model parameters. The preset loss is the loss value used to end the model training. When the target loss is less than the preset loss, it can be considered that the model effect meets the use requirements. The preset number of times is the preset number of iterations used to end the model training to avoid the model training falling into the local optimum and being difficult to exit the training.
[0064] Specifically, by grouping each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data, multiple groups of training data can be obtained, and each group of training data is respectively input into the untrained drag coefficient prediction model, and the output drag coefficient corresponding to each group of training data can be output. Then, the output drag coefficient corresponding to each group of training data and the sample drag coefficient are input into the preset loss function to comprehensively calculate the model loss, obtain the target loss, and count the number of iterations. If the target loss is less than the preset loss, it means that the current drag coefficient prediction model can meet the use requirements, and the untrained drag coefficient prediction model can be used as the pre-trained drag coefficient prediction model. If the number of iterations is equal to the preset number, it means that the model iteration number is sufficient, and the target loss cannot be reduced to the preset loss or below the preset loss. Therefore, the model training is forced to end, and the current untrained drag coefficient prediction model is used as the pre-trained drag coefficient prediction model. If the number of iterations is less than the preset number and the target loss is greater than or equal to the preset loss, it means that the current drag coefficient prediction model does not meet the usage requirements and needs to be further adjusted. Therefore, the model parameters of the untrained drag coefficient prediction model are adjusted to update the untrained drag coefficient prediction model, and the step of inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into the untrained drag coefficient prediction model is returned to execute, so as to obtain the output drag coefficient corresponding to each sample three-dimensional data, until the target loss is less than the preset loss or the number of iterations is equal to the preset number, and the pre-trained drag coefficient prediction model is obtained.
[0065] Based on the above example, after the three-dimensional structure data and at least two sets of vertex structure data are input into the pre-trained drag coefficient prediction model to obtain the predicted drag coefficient of the vehicle to be predicted, it can also be determined whether the predicted drag coefficient meets the design requirements. If it does not meet the design requirements, the vehicle model of the vehicle to be predicted can be adjusted to redesign and re-predict the drag coefficient:
[0066] In response to the predicted drag coefficient being outside the drag coefficient range of the vehicle to be predicted, adjusting a vehicle model of the vehicle to be predicted based on the predicted drag coefficient;
[0067] Based on the adjusted vehicle model, the three-dimensional structure data of the vehicle to be predicted is obtained, and the three-dimensional structure data is processed based on the vertex clustering algorithm and the mesh simplification algorithm to obtain at least two sets of vertex structure data until the predicted drag coefficient is within the range of the drag coefficient of the vehicle to be predicted.
[0068] Among them, the drag coefficient range is the drag coefficient requirement for the vehicle to be predicted.
[0069] Specifically, the predicted drag coefficient is compared with the drag coefficient range of the vehicle to be predicted. If the predicted drag coefficient is within the drag coefficient range of the vehicle to be predicted, it means that the drag coefficient of the vehicle to be predicted currently designed meets the requirements, and further verification and other operations can be performed. If the predicted drag coefficient is outside the drag coefficient range of the vehicle to be predicted, it means that it does not meet the design requirements. Therefore, based on the predicted drag coefficient, the vehicle model of the vehicle to be predicted is adjusted, and the three-dimensional structure data corresponding to the adjusted vehicle model is re-acquired, and the step of processing the three-dimensional structure data based on the vertex clustering algorithm and the mesh simplification algorithm to obtain at least two sets of vertex structure data is returned until the predicted drag coefficient is within the drag coefficient range of the vehicle to be predicted.
[0070] The drag coefficient prediction method provided in the embodiment of the present application obtains the three-dimensional structure data of the vehicle to be predicted, processes the three-dimensional structure data based on the vertex clustering algorithm and the mesh simplification algorithm, obtains at least two groups of vertex structure data, performs hierarchical simplification processing on the three-dimensional structure data, inputs the three-dimensional structure data and the at least two groups of vertex structure data into a pre-trained drag coefficient prediction model, obtains the predicted drag coefficient of the vehicle to be predicted, and realizes end-to-end drag coefficient prediction. Compared with the existing technology, it can quickly predict the drag coefficient, ensure the accuracy of the data, and reduce the use of resources and time.
[0071] Figure 2is a flow chart of another drag coefficient prediction method provided by an embodiment of the present application. Based on the above embodiments, the vertex structure data includes vertex clustering data and vertex simplification data, and an exemplary description is given of the process of obtaining at least two sets of vertex structure data, and an exemplary description is given of the process of processing three-dimensional structure data and at least two sets of vertex structure data using a pre-trained drag coefficient prediction model. Figure 2 , the drag coefficient prediction method specifically includes:
[0072] S210: Acquire three-dimensional structural data of the vehicle to be predicted.
[0073] S220 , based on a vertex clustering algorithm and a preset first ratio, the three-dimensional structure data is processed to obtain vertex clustering data.
[0074] The preset first ratio is a preset data ratio when the vertex clustering algorithm is used to simplify the data.
[0075] Specifically, the three-dimensional structure data is clustered and simplified according to a preset first ratio through a vertex clustering algorithm, and the obtained result is vertex clustering data.
[0076] S230, taking the vertex clustering data as the data to be simplified, processing the data to be simplified based on the mesh simplification algorithm and the preset second ratio, updating the data to be simplified, taking the updated data to be simplified as a group of vertex simplification data, and determining the current number of groups of vertex simplification data.
[0077] The data to be simplified is the data to be simplified by the mesh simplification algorithm. The preset second ratio is the preset data ratio when simplifying the data using the mesh simplification algorithm. The vertex simplification data is the output data after each use of the mesh simplification algorithm. The current number of groups is the number of groups of the current vertex simplification data output.
[0078] Specifically, vertex clustering data is used as data to be simplified, and the data to be simplified is simplified according to a preset second ratio through a mesh simplification algorithm. The result is new data to be simplified, and the group of new data to be simplified is used as a group of vertex simplification data, and the current number of groups of the group of vertex simplification data is determined.
[0079] S240, in response to the current number of groups being less than the target number of groups of vertex simplification data, returning to the step of executing based on the mesh simplification algorithm and the preset second ratio, processing the data to be simplified, updating the data to be simplified, and using the updated data to be simplified as a group of vertex simplification data to determine the current number of groups of vertex simplification data, until the current number of groups is equal to the target number of groups.
[0080] The target number of groups is the final number of groups of output vertex simplification data required.
[0081] Specifically, if the current number of groups is equal to the target number of groups, it means that the simplification process based on the mesh simplification algorithm has been completed, and the target number of groups of vertex simplification data is obtained. If the current number of groups is less than the target number of groups of vertex simplification data, it means that further simplification processing is required, so the process returns to the step of processing the updated data to be simplified based on the mesh simplification algorithm and the preset second ratio, updating the data to be simplified, and using the updated data to be simplified as a group of vertex simplification data to determine the current number of groups of vertex simplification data until the current number of groups is equal to the target number of groups.
[0082] Exemplarily, the three-dimensional structure data can be voxelized through the filter of the vertex clustering algorithm and aggregated into a table, thereby reducing the number of vertices and obtaining vertex clustering data. The number of polygons can be significantly reduced through the mesh simplification algorithm. Furthermore, the vertex clustering data and vertex simplification data after each simplification can be saved as a csv file.
[0083] Exemplarily, the three-dimensional structure data is simplified by a layer of vertex clustering algorithm and a three-layer mesh simplification algorithm, and the target number of groups is 3. The specific simplification process may be: 500,000 to 550,000 three-dimensional structure data are simplified into a group of vertex clustering data, including 10,000 to 15,000 data, by a vertex clustering algorithm; the vertex clustering data are simplified by a first layer of mesh simplification algorithm to obtain vertex simplified data with a current group number of 1, including 3,000 to 45,000 data; the vertex simplified data with a current group number of 1 is simplified by a second layer of mesh simplification algorithm to obtain vertex simplified data with a current group number of 2, including 900 to 1,350 data; the vertex simplified data with a current group number of 2 is simplified by a third layer of mesh simplification algorithm to obtain vertex simplified data with a current group number of 3, including 270 to 405 data. At this time, the current number of groups is the same as the target number of groups, and one group of vertex clustering data and three groups of vertex simplified data are output.
[0084] S250 , determining the arrangement order of each group of vertex structure data according to the number of vertices in each group of vertex structure data from large to small, and determining the connection order of each hidden layer.
[0085] The larger the number of vertices in each set of vertex structure data, the higher the arrangement order. The connection order is the order in which each hidden layer processes data.
[0086] S260, determining two groups of input data of each hidden layer according to the three-dimensional structure data, at least two groups of vertex structure data, the arrangement order of each group of vertex structure data, and the connection order of each hidden layer.
[0087] Specifically, for the first set of input data, the three-dimensional structure data is used as the first set of input data of the first hidden layer, and the output of the previous hidden layer of the other hidden layers except the first hidden layer is used as the first set of input data of the other hidden layers. For the second set of input data, each set of vertex structure data is matched with the connection order of each hidden layer according to the arrangement order, and the vertex structure data that is successfully matched is determined as the second set of input data of the corresponding hidden layer.
[0088] Based on the above example, two sets of input data of each hidden layer can be determined according to the three-dimensional structure data, at least two sets of vertex structure data, the arrangement order of each set of vertex structure data, and the connection order of each hidden layer in the following manner:
[0089] For each hidden layer, determine whether the connection order of the hidden layer is the first;
[0090] If yes, the three-dimensional structure data and the vertex structure data arranged in the first order are used as two sets of input data of the hidden layer;
[0091] If not, the output data of the previous layer of the hidden layer is used as the first group of input data of the hidden layer, and the vertex structure data corresponding to the arrangement order that is the same as the connection order of the hidden layer is used as the second group of input data of the hidden layer.
[0092] Specifically, if the connection order of the hidden layer is the first, that is, the first hidden layer, the three-dimensional structure data and the vertex structure data with the first arrangement order, that is, the vertex clustering data, can be used as two sets of input data for the hidden layer. If the connection order of the hidden layer is not the first, that is, other hidden layers except the first hidden layer, it means that the hidden layer has a corresponding previous hidden layer, so the output data of the previous layer of the hidden layer can be used as the first set of input data for the hidden layer, and the connection order and arrangement order of the hidden layer are matched, and the successfully matched vertex structure data are used as the second set of input data for the hidden layer.
[0093] S270, sequentially process the two sets of input data corresponding to each hidden layer to obtain output data of each hidden layer.
[0094] Among them, the output data is the data obtained after the corresponding hidden layer processes the two sets of input data.
[0095] Specifically, each hidden layer is used in turn to process data, and each hidden layer is used to process two sets of input data corresponding to the hidden layer, and the output data is input to the next hidden layer until the output of the last hidden layer is obtained.
[0096] Based on the above example, the two sets of input data corresponding to the hidden layer can be processed in the following way to obtain the output data of the hidden layer:
[0097] For each hidden layer, each set of input data is convolved based on the convolution layer to obtain two sets of convolution data;
[0098] After concatenating the two sets of convolution data, they are input into the average pooling layer to obtain the output data of the hidden layer.
[0099] Among them, the convolution layer is used to extract the features of each set of input data. The convolution data is the data after each convolution layer performs convolution processing. The average pooling layer is used to adjust the data dimension.
[0100] Specifically, each hidden layer can be processed in the same way. Taking one of them as an example, the two sets of input data of the hidden layer are convolved through the convolution layer to obtain convolution data corresponding to each set of input data. Then, the two sets of convolution data are concatenated to obtain concatenated data, which are input to the average pooling layer for dimensionality adjustment to obtain the output data of the hidden layer.
[0101] Based on the above example, each set of input data can be convolved based on the convolution layer in the following way to obtain two sets of convolution data:
[0102] For each group of input data, geometric space convolution processing is performed on the input data to obtain first convolution data;
[0103] Performing Euclidean spatial convolution processing on the input data to obtain second convolution data;
[0104] The first convolution data and the second convolution data are concatenated to obtain convolution data corresponding to the input data.
[0105] Among them, geometric space convolution (Geodesic) and Euclidean space convolution (Euclidean) are two convolution operation modes. The first convolution data is the convolution result of geometric space convolution. The second convolution data is the convolution result of Euclidean space convolution.
[0106] Specifically, the same convolution processing can be performed on each of the two groups of input data, specifically: the group of input data is subjected to geometric space convolution processing and Euclidean space convolution processing respectively, to obtain first convolution data corresponding to the geometric space convolution processing and second convolution data corresponding to the Euclidean space convolution processing. The first convolution data and the second convolution data are concatenated to obtain convolution data corresponding to the group of input data.
[0107] S280, inputting the output data of the last hidden layer into the fully connected layer connected to the last hidden layer to obtain the predicted drag coefficient of the vehicle to be predicted.
[0108] The fully connected layer is used to map the data to achieve the purpose of dimensionality reduction. The fully connected layer may include at least one dimensionality reduction processing layer.
[0109] Specifically, the output data of the last hidden layer is input into the fully connected layer connected to the last hidden layer, and the output data of the last hidden layer is mapped and reduced in dimension using each dimensionality reduction processing layer in the fully connected layer in turn, and the final output one-dimensional data is used as the predicted drag coefficient of the vehicle to be predicted.
[0110] For example, Figure 3 The structural diagram of the drag coefficient prediction model shown in FIG. 1 is a diagram showing a structure of a drag coefficient prediction model, wherein the number of hidden layers is 4, and the vertex structure data includes a layer of vertex clustering data and three layers of vertex simplification data, which are arranged in the following order: vertex clustering data, vertex simplification data 1, vertex simplification data 2, and vertex simplification data 3. The output data of hidden layer 4 is input into the fully connected layer, which can be converted into one dimension and output the predicted drag coefficient.
[0111] The drag coefficient prediction method provided in the embodiment of the present application processes the three-dimensional structure data based on the vertex clustering algorithm and the preset first ratio to obtain the vertex clustering data, uses the vertex clustering data as the data to be simplified, processes the data to be simplified based on the mesh simplification algorithm and the preset second ratio, updates the data to be simplified, and uses the updated data to be simplified as a group of vertex simplified data to determine the current number of groups of the vertex simplified data. In response to the current number of groups being less than the target number of groups of the vertex simplified data, returns to execute the steps of processing the data to be simplified based on the mesh simplification algorithm and the preset second ratio, updating the data to be simplified, and using the updated data to be simplified as a group of vertex simplified data to determine the current number of groups of the vertex simplified data, until the current number of groups is equal to the target number of groups, so as to use a layer of vertex clustering algorithm and at least one layer of mesh simplification. The algorithm performs multi-level simplification processing on the three-dimensional structure data to obtain multi-scale vertex structure data, and then determines the arrangement order of each group of vertex structure data from large to small according to the number of vertices in each group of vertex structure data, and determines the connection order of each hidden layer. According to the three-dimensional structure data, at least two groups of vertex structure data, the arrangement order of each group of vertex structure data and the connection order of each hidden layer, two groups of input data of each hidden layer are determined, and the two groups of input data corresponding to each hidden layer are processed in turn to obtain the output data of each hidden layer. The output data of the last hidden layer is input into the fully connected layer connected to the last hidden layer to obtain the predicted drag coefficient of the vehicle to be predicted, so as to process the three-dimensional structure data and vertex structure data through a specific model structure, so as to achieve the effect of quickly and accurately predicting the drag coefficient.
[0112] Figure 44 is a schematic diagram of a drag coefficient prediction system provided in an embodiment of the present application. The system includes: an acquisition module 410 and a prediction module 420.
[0113] Among them, the acquisition module 410 is used to obtain the three-dimensional structure data of the vehicle to be predicted, and based on the vertex clustering algorithm and the mesh simplification algorithm, the three-dimensional structure data is processed to obtain at least two groups of vertex structure data; the prediction module 420 is used to input the three-dimensional structure data and at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain the predicted drag coefficient of the vehicle to be predicted; wherein the drag coefficient prediction model includes at least two hidden layers connected in sequence and a fully connected layer connected to the last hidden layer, the number of the hidden layers is the same as the number of groups of the vertex structure data, and the drag coefficient prediction model is trained based on sample three-dimensional data and sample vertex data and sample drag coefficient corresponding to the sample three-dimensional data.
[0114] Optionally, the vertex structure data includes vertex clustering data and vertex simplification data; the acquisition module 410 is also used to process the three-dimensional structure data based on a vertex clustering algorithm and a preset first ratio to obtain vertex clustering data; using the vertex clustering data as the data to be simplified, based on a mesh simplification algorithm and a preset second ratio, processing the data to be simplified, updating the data to be simplified, and using the updated data to be simplified as a group of vertex simplification data to determine the current number of groups of the vertex simplification data; in response to the current number of groups being less than the target number of groups of the vertex simplification data, returning to execute the step of processing the data to be simplified based on the mesh simplification algorithm and the preset second ratio, updating the data to be simplified, and using the updated data to be simplified as a group of vertex simplification data to determine the current number of groups of the vertex simplification data, until the current number of groups is equal to the target number of groups.
[0115] Optionally, the prediction module 420 is also used to determine the arrangement order of each group of vertex structure data from large to small according to the number of vertices in each group of vertex structure data, and determine the connection order of each hidden layer; determine two groups of input data of each hidden layer according to the three-dimensional structure data, at least two groups of vertex structure data, the arrangement order of each group of vertex structure data and the connection order of each hidden layer; process the two groups of input data corresponding to each hidden layer in turn to obtain output data of each hidden layer; input the output data of the last hidden layer into the fully connected layer connected to the last hidden layer to obtain the predicted drag coefficient of the vehicle to be predicted.
[0116] Optionally, the prediction module 420 is also used to determine, for each hidden layer, whether the connection order of the hidden layer is the first; if so, the three-dimensional structure data and the vertex structure data with the first arrangement order are used as two sets of input data for the hidden layer; if not, the output data of the previous layer of the hidden layer is used as the first set of input data for the hidden layer, and the vertex structure data corresponding to the arrangement order that is the same as the connection order of the hidden layer is used as the second set of input data for the hidden layer.
[0117] Optionally, the prediction module 420 is also used to perform convolution processing on each set of input data based on the convolution layer for each hidden layer to obtain two sets of convolution data; after splicing the two sets of convolution data, input them into the average pooling layer to obtain the output data of the hidden layer.
[0118] Optionally, the prediction module 420 is also used to perform geometric space convolution processing on each group of input data to obtain first convolution data; perform Euclidean space convolution processing on the input data to obtain second convolution data; and concatenate the first convolution data and the second convolution data to obtain convolution data corresponding to the input data.
[0119] Optionally, the pre-trained drag coefficient prediction model is trained based on the following training module, which is used to input each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into the untrained drag coefficient prediction model, so as to obtain the output drag coefficient corresponding to each sample three-dimensional data; based on a preset loss function, the output drag coefficient corresponding to each sample three-dimensional data and the sample drag coefficient are calculated to determine the target loss of the untrained drag coefficient prediction model and the number of iterations; if the target loss is less than the preset loss or the number of iterations is equal to the preset number, the untrained The trained drag coefficient prediction model is used as the pre-trained drag coefficient prediction model; if the number of iterations is less than the preset number and the target loss is greater than or equal to the preset loss, the model parameters of the untrained drag coefficient prediction model are adjusted, the untrained drag coefficient prediction model is updated, and the step of inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into the untrained drag coefficient prediction model respectively to obtain the output drag coefficient corresponding to each sample three-dimensional data is returned to execute, until the target loss is less than the preset loss or the number of iterations is equal to the preset number.
[0120] The drag coefficient prediction system provided in the embodiments of the present application can execute the vehicle power battery heating method of any embodiment of the present application, and can have the same technical effect as the drag coefficient prediction method in the above-mentioned embodiments.
[0121] Figure 5 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown, the electronic device 500 includes one or more processors 501 and a memory 502 .
[0122] The processor 501 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions.
[0123] The memory 502 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 501 may run the program instructions to implement the drag coefficient prediction method of any embodiment of the present application described above and / or other desired functions. Various contents such as initial external parameters, thresholds, etc. may also be stored in the computer-readable storage medium.
[0124] In one example, the electronic device 500 may further include: an input device 503 and an output device 504, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown). The input device 503 may include, for example, a keyboard, a mouse, etc. The output device 504 may output various information to the outside, including early warning information, braking force, etc. The output device 504 may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0125] Of course, to simplify, Figure 5 Only some of the components related to the present application in the electronic device 500 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 500 may also include any other appropriate components.
[0126] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the drag coefficient prediction method provided in any embodiment of the present application.
[0127] The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0128] In addition, the embodiments of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the drag coefficient prediction method provided by any embodiment of the present application.
[0129] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0130] It should be noted that the terms used in this application are only for describing specific embodiments, rather than limiting the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "a", "a kind of" and / or "the" do not specifically refer to the singular, but may also include the plural. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method 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 or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements.
[0131] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0132] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and its core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression and the objective existence of infinite specific structures, ordinary technicians in this technical field can make several improvements, modifications or changes without departing from the principles of the present invention, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the scope of protection of this application.
Claims
1. A method for predicting a drag coefficient, characterized in that: include: Acquire three-dimensional structure data of a vehicle to be predicted, and process the three-dimensional structure data based on a vertex clustering algorithm and a mesh simplification algorithm to obtain at least two groups of vertex structure data; Inputting the three-dimensional structure data and at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain a predicted drag coefficient of the vehicle to be predicted; Among them, the drag coefficient prediction model includes at least two hidden layers connected in sequence and a fully connected layer connected to the last hidden layer, the number of the hidden layers is the same as the number of groups of the vertex structure data, and the drag coefficient prediction model is trained based on sample three-dimensional data and sample vertex data and sample drag coefficient corresponding to the sample three-dimensional data.
2. The method according to claim 1, characterized in that The vertex structure data includes vertex clustering data and vertex simplification data; the three-dimensional structure data is processed based on the vertex clustering algorithm and the mesh simplification algorithm to obtain at least two groups of vertex structure data, including: Based on a vertex clustering algorithm and a preset first ratio, the three-dimensional structure data is processed to obtain vertex clustering data; Taking the vertex clustering data as data to be simplified, processing the data to be simplified based on a mesh simplification algorithm and a preset second ratio, updating the data to be simplified, and taking the updated data to be simplified as a group of vertex simplification data to determine the current number of groups of the vertex simplification data; In response to the current number of groups being less than the target number of groups of the vertex simplification data, returning to execute the mesh simplification algorithm and the preset second ratio, processing the data to be simplified, updating the data to be simplified, and using the updated data to be simplified as a group of vertex simplification data, determining the current number of groups of the vertex simplification data, until the current number of groups is equal to the target number of groups.
3. The method according to claim 1, characterized in that The step of inputting the three-dimensional structure data and at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain a predicted drag coefficient of the vehicle to be predicted includes: According to the number of vertices in each set of vertex structure data from large to small, determine the arrangement order of each set of vertex structure data, and determine the connection order of each hidden layer; Determine two sets of input data for each hidden layer according to the three-dimensional structure data, at least two sets of vertex structure data, the arrangement order of each set of vertex structure data, and the connection order of each hidden layer; Process the two sets of input data corresponding to each hidden layer in turn to obtain the output data of each hidden layer; The output data of the last hidden layer is input into the fully connected layer connected to the last hidden layer to obtain the predicted drag coefficient of the vehicle to be predicted.
4. The method according to claim 3, characterized in that Determining two sets of input data for each hidden layer according to the three-dimensional structure data, at least two sets of vertex structure data, the arrangement order of each set of vertex structure data, and the connection order of each hidden layer includes: For each hidden layer, determining whether the connection order of the hidden layer is first; If yes, the three-dimensional structure data and the vertex structure data arranged in the first order are used as two sets of input data of the hidden layer; If not, the output data of the previous layer of the hidden layer is used as the first group of input data of the hidden layer, and the vertex structure data corresponding to the arrangement order that is the same as the connection order of the hidden layer is used as the second group of input data of the hidden layer.
5. The method according to claim 3, characterized in that: The two sets of input data corresponding to each hidden layer are processed in sequence to obtain output data of each hidden layer, including: For each hidden layer, each set of input data is convolved based on the convolution layer to obtain two sets of convolution data; After the two sets of convolution data are concatenated, they are input into the average pooling layer to obtain the output data of the hidden layer.
6. The method according to claim 5, characterized in that The convolution layer performs convolution processing on each set of input data respectively to obtain two sets of convolution data, including: For each group of input data, performing geometric space convolution processing on the input data to obtain first convolution data; Performing Euclidean spatial convolution processing on the input data to obtain second convolution data; The first convolution data and the second convolution data are concatenated to obtain convolution data corresponding to the input data.
7. The method according to claim 1, characterized in that The pre-trained drag coefficient prediction model is trained based on the following method: Inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into an untrained drag coefficient prediction model to obtain an output drag coefficient corresponding to each sample three-dimensional data; Based on a preset loss function, the output drag coefficient corresponding to each sample three-dimensional data and the sample drag coefficient are calculated to determine the target loss of the untrained drag coefficient prediction model and the number of iterations; If the target loss is less than the preset loss or the number of iterations is equal to the preset number, the untrained drag coefficient prediction model is used as the pre-trained drag coefficient prediction model; If the number of iterations is less than the preset number and the target loss is greater than or equal to the preset loss, the model parameters of the untrained drag coefficient prediction model are adjusted, the untrained drag coefficient prediction model is updated, and the step of inputting each sample three-dimensional data and the sample vertex data corresponding to each sample three-dimensional data into the untrained drag coefficient prediction model to obtain the output drag coefficient corresponding to each sample three-dimensional data is returned to execute until the target loss is less than the preset loss or the number of iterations is equal to the preset number.
8. A drag coefficient prediction system, characterized in that: The system comprises: An acquisition module, used for acquiring three-dimensional structure data of a vehicle to be predicted, and processing the three-dimensional structure data based on a vertex clustering algorithm and a mesh simplification algorithm to obtain at least two groups of vertex structure data; A prediction module is used to input the three-dimensional structure data and at least two groups of vertex structure data into a pre-trained drag coefficient prediction model to obtain the predicted drag coefficient of the vehicle to be predicted; wherein the drag coefficient prediction model includes at least two hidden layers connected in sequence and a fully connected layer connected to the last hidden layer, the number of the hidden layers is the same as the number of groups of the vertex structure data, and the drag coefficient prediction model is trained based on sample three-dimensional data and sample vertex data and sample drag coefficient corresponding to the sample three-dimensional data.
9. An electronic device, characterized in that: The electronic device comprises: Processor and memory; The processor is used to execute the steps of the drag coefficient prediction method according to any one of claims 1 to 7 by calling the program or instruction stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the drag coefficient prediction method according to any one of claims 1 to 7.
