Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a Convolutional Neural Network (CNN) -based ECU program refreshing optimization method and a system, which are used for reducing the influence of hardware and software environments of a refreshing terminal device on the refreshing speed and improving the refreshing speed and success rate.
In a first aspect, the present invention provides a method for optimizing a brushing parameter of an ECU based on a convolutional neural network, applied to a brushing terminal device, including the steps of:
d1, acquiring hardware configuration parameters of the refreshing terminal equipment, and acquiring current refreshing time sequence parameters of an ECU refreshing program to be executed on the refreshing terminal equipment; the hardware configuration parameters comprise CPU occupancy rate of the terminal equipment to be refreshed, and the CPU occupancy rate is recorded as CPU occupancy rate z before being refreshed;
d2, taking the latest acquired hardware configuration parameters and the latest acquired refreshing time sequence parameters as inputs, and predicting the CPU occupancy rate of the refreshing terminal equipment by adopting a trained first convolutional neural network model to obtain a predicted CPU occupancy rate y;
d3, calculating the sum y+z of the CPU occupancy rate z before brushing and the predicted CPU occupancy rate y;
d4, judging whether y+z is smaller than m, if yes, continuing to execute the step D5, and if not, executing the step D7; wherein m is a preset CPU total occupancy rate threshold;
d5, the current value of the brushing time sequence parameter is self-subtracted according to a preset mode, the brushing time sequence parameter after self-subtraction adjustment and the hardware configuration parameter which is acquired latest in the step D1 are used as input, a second trained convolutional neural network is utilized to predict and output a predicted brushing time length t, and then the step D6 is executed;
D6, judging whether the brushing time t is smaller than n, if yes, turning to the step D8 to continue execution, otherwise, continuing to execute the step D7; wherein n is a preset threshold value of the brushing time length;
d7, self-adding the current value of the brushing time sequence parameter according to a preset mode, and then continuously executing the step D1;
and D8, controlling the ECU refreshing program to refresh according to the latest value of the refreshing time sequence parameter.
Further, the construction method of the first convolutional neural network model and the second convolutional neural network model comprises the following steps:
q1: acquiring a sample data set;
q2: establishing a first convolutional neural network and a second convolutional neural network;
the first convolutional neural network and the second convolutional neural network comprise five convolutional layers conv, three pooling layers pooling, two normalization layers Lrn and two full connection layers fc, and the corresponding network structures are all
In the above network structure, each ReLU is an activation function, and MSE is a loss function, where: the formula of the loss function MSE in the first convolutional neural network isWherein y' is the actual CPU occupancy rate before the acquisition and the writing, and y is the CPU occupancy rate predicted by the first convolutional neural network; the formula of the loss function MSE in the second convolutional neural network is +. >Wherein t' represents the actual brushing time length, and t represents the brushing time length predicted by the second convolutional neural network; n1 is the number of samples used to train the first convolutional neural network, and n2 is the number of samples used to train the second convolutional neural network;
q3: and training the first convolutional neural network and the second convolutional neural network respectively by using the constructed sample data set to obtain a trained first convolutional neural network model and a trained second convolutional neural network model.
Further, the implementation method of the step Q3 is as follows:
dividing the sample data set into a training set and a test set according to the ratio of 4:1, wherein the training set is divided into k parts according to a k-fold check method, wherein k-1 parts are used as training, and the other part is used as check;
training the established first convolutional neural network and the second convolutional neural network by using training sets respectively;
checking the established first convolutional neural network and the second convolutional neural network by using the test set respectively;
and calculating the difference between the predicted result and the actual result through the MSE in each training, respectively according to a predetermined minimum value of the check error, and adjusting the parameters to retrain the model according to the number of cyclic training until the calculated result of the MSE is smaller than or equal to the predetermined minimum value of the check error, thereby obtaining a trained corresponding convolutional neural network model.
Further, the implementation method of the step Q1 is as follows:
collecting a sample;
preprocessing each acquired sample to correspondingly obtain preprocessed samples of each sample;
collecting all the obtained preprocessed samples to form the sample data set;
the method for preprocessing each acquired sample comprises the following steps:
calculating average value average of all data in the sample;
calculating the standard deviation of each datum in the sample;
each piece of data x in the sample is preprocessed by using the formula H= |x-average|/sigma by using the average value average and the calculated standard deviation, and a preprocessed sample is obtained; wherein, H is the preprocessed data corresponding to the data x, and sigma is the standard deviation corresponding to the data x.
Further, the brushing time sequence parameters comprise a frame-to-frame brushing time interval CFMS, a packet-to-packet brushing time interval FFMS and a timeout time setting parameter RTMS corresponding to an ECU brushing program;
the hardware configuration parameters also comprise CPU processing frequency, memory bank size, current residual memory size, CPU occupancy rate corresponding to the refreshing and refreshing time length corresponding to the refreshing of the refreshing terminal equipment;
the corresponding CPU occupancy rate is the preset CPU occupancy rate difference; the CPU occupancy rate difference value is used for representing the difference value between the highest CPU occupancy rate during the writing and the latest value of the CPU occupancy rate before the writing;
The brushing time length corresponding to the brushing is a brushing time length preset according to experience and is used for representing the brushing time length used by the ECU brushing program to execute the brushing.
In a second aspect, the present invention provides a system for implementing optimization of an ECU handwriting parameter based on a convolutional neural network, applied to a handwriting terminal device, the system comprising:
the parameter acquisition unit is used for acquiring hardware configuration parameters of the refreshing terminal equipment and acquiring current refreshing time sequence parameters of an ECU refreshing program to be executed on the refreshing terminal equipment; the hardware configuration parameters comprise CPU occupancy rate of the terminal equipment to be refreshed, and the CPU occupancy rate is recorded as CPU occupancy rate z before being refreshed;
the CPU occupancy rate prediction unit is used for taking the hardware configuration parameters acquired by the parameter acquisition unit and the brushing time sequence parameters acquired by the parameter acquisition unit as input, and predicting the CPU occupancy rate of the brushing terminal equipment by adopting the trained first convolutional neural network model to obtain a predicted CPU occupancy rate y;
the computing unit is used for computing the sum y+z of the CPU occupancy rate z before the writing and the predicted CPU occupancy rate y;
a first judging unit configured to judge whether the sum y+z is smaller than m; m is a preset CPU total occupancy rate threshold;
The brushing time length prediction unit is used for automatically subtracting the current value of the brushing time sequence parameter according to a preset mode when the judgment result of the first judgment unit is yes, taking the brushing time sequence parameter after the self-subtraction adjustment and the hardware configuration parameter which is acquired by the parameter acquisition unit newly as input, and predicting and outputting the predicted brushing time length t by using the trained second convolutional neural network;
the second judging unit is used for judging whether the brushing time t is smaller than n, wherein n is a preset brushing time threshold;
the first execution unit is configured to execute, when the determination result of the first determination unit is no and when the determination result of the second determination unit is no: the current value of the brushing time sequence parameter is added automatically according to a preset mode, and then the parameter acquisition unit is called again;
and the second execution unit is used for controlling the ECU refreshing program to refresh according to the latest value of the refreshing time sequence parameter when the judgment result of the second judgment unit is yes.
Further, the construction method of the first convolutional neural network model and the second convolutional neural network model comprises the following steps:
q1: acquiring a sample data set;
Q2: establishing a first convolutional neural network and a second convolutional neural network;
the first convolutional neural network and the second convolutional neural network comprise five convolutional layers conv, three pooling layers pooling, two normalization layers LRN and two full connection layers fc, and the corresponding network structures are all
In the above network structure, each ReLU is an activation function, and MSE is a loss function, where: the formula of the loss function MSE in the first convolutional neural network isWherein y' is the actual CPU occupancy rate before the acquisition and the writing, and y is the CPU occupancy rate predicted by the first convolutional neural network; the formula of the loss function MSE in the second convolutional neural network is +.>Wherein t' represents the actual brushing time length, and t represents the brushing time length predicted by the second convolutional neural network; n1 is the number of samples used to train the first convolutional neural network, and n2 is the number of samples used to train the second convolutional neural network;
q3: and training the first convolutional neural network and the second convolutional neural network respectively by using the constructed sample data set to obtain a trained first convolutional neural network model and a trained second convolutional neural network model.
Further, the implementation method of the step Q3 is as follows:
dividing the sample data set into a training set and a test set according to the ratio of 4:1, wherein the training set is divided into k parts according to a k-fold check method, wherein k-1 parts are used as training, and the other part is used as check;
training the established first convolutional neural network and the second convolutional neural network by using training sets respectively;
checking the established first convolutional neural network and the second convolutional neural network by using the test set respectively;
and calculating the difference between the predicted result and the actual result through the MSE in each training, respectively according to a predetermined minimum value of the check error, and adjusting the parameters to retrain the model according to the number of cyclic training until the calculated result of the MSE is smaller than or equal to the predetermined minimum value of the check error, thereby obtaining a trained corresponding convolutional neural network model.
Further, the implementation method of the step Q1 is as follows:
collecting a sample;
preprocessing each acquired sample to correspondingly obtain preprocessed samples of each sample;
collecting all the obtained preprocessed samples to form the sample data set;
The method for preprocessing each acquired sample comprises the following steps:
calculating average value average of all data in the sample;
calculating the standard deviation of each datum in the sample;
each piece of data x in the sample is preprocessed by using the formula H= |x-average|/sigma by using the average value average and the calculated standard deviation, and a preprocessed sample is obtained; wherein, H is the preprocessed data corresponding to the data x, and sigma is the standard deviation corresponding to the data x.
Further, the brushing time sequence parameters comprise a frame-to-frame brushing time interval CFMS, a packet-to-packet brushing time interval FFMS and a timeout time setting parameter RTMS corresponding to an ECU brushing program;
the hardware configuration parameters also comprise CPU processing frequency, memory bank size, current residual memory size, CPU occupancy rate corresponding to the refreshing and refreshing time length corresponding to the refreshing of the refreshing terminal equipment;
the corresponding CPU occupancy rate is the preset CPU occupancy rate difference; the CPU occupancy rate difference value is used for representing the difference value between the highest CPU occupancy rate during the writing and the latest value of the CPU occupancy rate before the writing;
the brushing time length corresponding to the brushing is a brushing time length preset according to experience and is used for representing the brushing time length used by the ECU brushing program to execute the brushing.
The invention has the beneficial effects that:
the method and the system for realizing ECU (electronic control unit) refreshing parameter optimization based on the convolutional neural network are beneficial to pre-judging the CPU occupancy rate and the refreshing time according to various environment parameters of a computer (namely a refreshing terminal device) before refreshing, and can timely adjust the refreshing time sequence parameters when the CPU occupancy rate is pre-judged to be too high and the refreshing time is pre-judged to be too long, so that the refreshing time is prevented from being too long to a certain extent, and the program blocking overtime caused by the too high CPU occupancy rate is prevented from failing in the refreshing time process to a certain extent. Therefore, the invention can avoid the influence of the software and hardware environment of the computer on the program writing speed to a certain extent.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
FIG. 1 is a schematic flow chart of a method of one embodiment of the invention. The method is applied to the refreshing terminal equipment, the refreshing time length and the CPU occupancy rate can be predicted based on the convolutional neural network, when the CPU occupancy rate is too high, the refreshing time sequence parameter can be reduced, and when the refreshing time length is too long, the refreshing time sequence parameter can be increased. The swipe terminal device may be a computer.
As shown in fig. 1, the method 100 includes:
and 110, collecting hardware configuration parameters of the refreshing terminal equipment, and collecting current refreshing time sequence parameters of an ECU refreshing program to be executed on the refreshing terminal equipment.
The hardware configuration parameters comprise CPU occupancy rate of the terminal equipment to be refreshed, and the CPU occupancy rate is recorded as CPU occupancy rate z before being refreshed.
And 120, taking the latest acquired hardware configuration parameters and the latest acquired refreshing time sequence parameters as inputs, and predicting the CPU occupancy rate of the refreshing terminal equipment by adopting the trained first convolutional neural network model to obtain a predicted CPU occupancy rate y.
And 130, calculating the sum y+z of the CPU occupancy rate z before the brushing and the predicted CPU occupancy rate y.
Step 140, judging whether y+z is smaller than m, if yes, continuing to execute step 150, and if no, turning to execute step 170.
Wherein m is a preset CPU total occupancy rate threshold.
And 150, self-subtracting the current value of the brushing time sequence parameter according to a preset mode, taking the brushing time sequence parameter after self-subtracting adjustment and the hardware configuration parameter which is acquired latest in the step 110 as inputs, and predicting and outputting the predicted brushing time length t by using the trained second convolutional neural network.
Step 160 is then performed.
Step 160, judging whether the brushing duration t is less than n, if yes, turning to step 180 to continue execution, otherwise, continuing to execute step 170.
Wherein n is a preset threshold value of the brushing time length.
Step 170, the current value of the above-mentioned refresh timing parameter is self-added according to a preset manner, and then the process proceeds to step 110.
And 180, controlling the ECU flashing program to perform flashing according to the latest value of the flashing time sequence parameter.
Specifically, a brushing process is entered, and the ECU brushing program is controlled to brush according to the latest value of the brushing time sequence parameter.
Optionally, as an exemplary embodiment of the present invention, in step 110, the brushing timing parameters include a frame-to-frame brushing interval CFMS, a packet-to-packet brushing interval FFMS, and a timeout period setting parameter RTMS corresponding to the ECU brushing procedure; the hardware configuration parameters also comprise CPU processing frequency, memory bank size, current residual memory size, CPU occupancy rate corresponding to the refreshing and refreshing time length corresponding to the refreshing of the refreshing terminal equipment.
The corresponding CPU occupancy rate is the preset CPU occupancy rate difference; the CPU occupancy rate difference value is used for representing the difference value between the highest CPU occupancy rate during the writing and the latest value of the CPU occupancy rate before the writing.
The brushing time length corresponding to the brushing is a brushing time length preset according to experience and is used for representing the brushing time length used by the ECU brushing program to execute the brushing.
Optionally, as an exemplary embodiment of the present invention, the method for constructing the first convolutional neural network model and the second convolutional neural network model includes:
step one: a sample dataset is acquired.
Specifically, the implementation method of the first step comprises the following steps:
and (3) collecting a sample.
In implementation, the sample data may be obtained by continuously executing the ECU refresh program having refresh timing parameters of different values at the refresh terminal device. Specifically, for each execution of the ECU flashing program, the hardware configuration parameters of the one-time flashing terminal device and the flashing timing parameters (i.e., parameter values) of the ECU flashing program are collected as one sample, respectively. Wherein, the parameter types of the hardware configuration parameters of the refreshing terminal device and the parameter types of the refreshing time sequence parameters of the ECU refreshing program refer to the hardware configuration parameters and the refreshing time sequence parameters in the step 110, specifically: for each sample, the refresh timing parameters in the sample are a frame-to-frame refresh time interval CFMS, a packet-to-packet refresh time interval FFMS, and a timeout period setting parameter RTMS corresponding to the executed ECU refresh program, and the hardware configuration parameters in the sample are a CPU processing frequency of the terminal device for refresh, a memory bank size, a current remaining memory size, a CPU occupancy rate before refresh, a CPU occupancy rate corresponding to refresh, and a refresh duration corresponding to refresh, which are different from step 110:
The CPU occupancy rate before the refreshing in the sample is the CPU occupancy rate before the refreshing terminal equipment executes the ECU refreshing program corresponding to the sample, and the CPU occupancy rate is collected only once;
the CPU processing frequency, the memory bank size and the current residual memory size in the sample are all collected once (and are all collected before the ECU writing program corresponding to the sample is executed by the writing terminal equipment);
the calculation method of the CPU occupancy rate corresponding to the refreshing in the sample is that the CPU occupancy rate before refreshing in the sample is subtracted from the highest CPU occupancy rate of the refreshing terminal equipment in the process of actually executing the ECU refreshing program corresponding to the sample (for example, a sample A exists, the ECU refreshing program corresponding to the sample A is the ECU refreshing program B, and the calculation method of the CPU occupancy rate corresponding to the refreshing in the sample A is that the CPU occupancy rate before refreshing in the sample is subtracted from the highest CPU occupancy rate of the refreshing terminal equipment in the process of actually executing the ECU refreshing program B);
and the corresponding brushing time length of the brushing in the sample is the actual brushing time length of the brushing executed by the brushing terminal equipment by using the ECU brushing program corresponding to the sample.
The method comprises the steps that a brushing time sequence parameter in a sample is a frame-to-frame brushing time interval CFMS, a packet-to-packet brushing time interval FFMS and a timeout time setting parameter RTMS corresponding to an ECU brushing program corresponding to the sample, and the acquisition is carried out before the brushing terminal equipment executes the ECU brushing program corresponding to the sample and is carried out only once;
The hardware configuration parameters also comprise CPU processing frequency, memory bank size, current residual memory size, CPU occupancy rate corresponding to the refreshing and refreshing time length corresponding to the refreshing of the refreshing terminal equipment;
the corresponding CPU occupancy rate is the preset CPU occupancy rate difference; the CPU occupancy rate difference value is used for representing the difference value between the highest CPU occupancy rate during the writing and the latest value of the CPU occupancy rate before the writing;
the brushing time length corresponding to the brushing is a brushing time length preset according to experience and is used for representing the brushing time length used by the ECU brushing program to execute the brushing.
And (2) preprocessing each acquired sample, and correspondingly obtaining preprocessed samples of each sample.
Specifically, the method for preprocessing each acquired sample comprises the following steps:
calculating average value average of all data in the sample;
calculating the standard deviation of each datum in the sample;
each piece of data x in the sample is preprocessed by using the formula H= |x-average|/sigma by using the average value average and the calculated standard deviation, and a preprocessed sample is obtained; wherein, H is the preprocessed data corresponding to the data x, and sigma is the standard deviation corresponding to the data x.
And then executing the step (3).
And (3) collecting all obtained preprocessed samples to form the sample data set.
Step two: a first convolutional neural network and a second convolutional neural network are established.
The first convolutional neural network and the second convolutional neural network established in the second step each comprise five convolutional layers conv, three pooling layers pooling, two normalization layers LRN and two full connection layers fc, and specifically, the network structures of the first convolutional neural network and the second convolutional neural network are:
in the above network structure, each ReLU is an activation function, and MSE is a loss function, where:
the formula of the loss function MSE in the first convolutional neural network isWherein y' is the actual collected CPU occupancy rate before the writing, and y is the CPU occupancy rate predicted by the first convolutional neural network (corresponding to the predicted CPU occupancy rate); n1 is the number of samples used to train the first convolutional neural network;
the loss function MSE in the second convolutional neural network is formulated asWherein t' represents the actual brushing time length, and t represents the brushing time length predicted by the second convolutional neural network; n2 is the number of samples used to train the second convolutional neural network.
In this embodiment, n1 and n2 are equal in value and are equal to the number of samples in the sample dataset.
In addition, the first convolutional neural network and the second convolutional neural network established in the second step are provided with:
the first layer of convolution layer adopts convolution kernel with the size of 11 multiplied by 11 and the step length of 4;
the second layer of convolution layers, the third layer of convolution layers, the fourth layer of convolution layers and the fifth layer of convolution layers all adopt convolution kernels with the size of 3 multiplied by 3 and the step length of 1;
after pooling, the first and second convolution layers are normalized with the LRN;
the size of each pooling layer is 3×3, and the step size is 2.
The network structure schematic diagrams of the first convolutional neural network and the second convolutional neural network are shown in fig. 2.
In fig. 2, reference numerals 300, 400, 500, and 600 denote conv+relu (convolutional layer+activation function), full connected+relu (fully connected layer+activation function), full connected, pooling (pooling layer), in order.
Step three: and training the first convolutional neural network and the second convolutional neural network respectively by using the constructed sample data set to obtain a trained first convolutional neural network model and a trained second convolutional neural network model.
Training the established first convolutional neural network by using the constructed sample data set, wherein the obtained trained first convolutional neural network is a trained first convolutional neural network model; and training the established second convolutional neural network by using the constructed sample data set, wherein the obtained trained second convolutional neural network is the trained second convolutional neural network model.
The first convolutional neural network model extracts depth features of input samples through five convolutional layers, and finally utilizes a loss function MSE of the depth features to realize CPU occupancy prediction through two full-connection layers fc.
And the second convolutional neural network model extracts depth features of input samples through five convolutional layers, and finally realizes the prediction of the writing time by using a loss function MSE through two full connection layers fc.
Optionally, as an embodiment of the present invention, the specific implementation method of the third step is:
dividing the sample data set into a training set and a test set according to the ratio of 4:1, wherein the training set is divided into k parts according to a k-fold check method, wherein k-1 parts are used as training, and the other part is used as check;
Training the established first convolutional neural network and the second convolutional neural network by using training sets respectively;
checking the established first convolutional neural network and the second convolutional neural network by using the test set respectively;
and calculating the difference between the predicted result and the actual result through the MSE in each training, respectively according to a predetermined minimum value of the check error, and adjusting the parameters to retrain the model according to the number of cyclic training until the calculated result of the MSE is smaller than or equal to the predetermined minimum value of the check error, thereby obtaining a trained corresponding convolutional neural network model.
FIG. 3 is one embodiment of a system for ECU flooding parameter optimization based on convolutional neural networks in accordance with the present invention. As shown in fig. 3, the system 200 is applied to a terminal device for brushing, and specifically includes:
a parameter acquisition unit 201, configured to acquire hardware configuration parameters of the terminal device for writing, and acquire current writing time sequence parameters of an ECU writing program to be executed on the terminal device for writing; the hardware configuration parameters comprise CPU occupancy rate of the terminal equipment to be refreshed, and the CPU occupancy rate is recorded as CPU occupancy rate z before being refreshed;
the CPU occupancy rate prediction unit 202 is configured to use the hardware configuration parameter acquired by the parameter acquisition unit 201 and the refresh timing parameter acquired by the parameter acquisition unit 201 as input, and predict the CPU occupancy rate of the refresh terminal device by using the trained first convolutional neural network model to obtain a predicted CPU occupancy rate y;
A calculating unit 203, configured to calculate a sum y+z of the pre-brush CPU occupancy z and the predicted CPU occupancy y;
a first judging unit 204, configured to judge whether the sum y+z is smaller than m; m is a preset CPU total occupancy rate threshold;
a brushing duration prediction unit 205, configured to, when the determination result of the first determination unit 204 is yes, self-subtract the current value of the brushing timing parameter according to a preset manner, and use the brushing timing parameter after self-subtraction adjustment and the hardware configuration parameter that is newly acquired by the parameter acquisition unit 201 as input, predict and output a predicted brushing duration t by using the trained second convolutional neural network;
a second judging unit 206, configured to judge whether the brushing duration t is less than n, where n is a preset brushing duration threshold;
the first execution unit 207 is configured to execute, when the determination result of the first determination unit 204 is no and when the determination result of the second determination unit 206 is no: the current value of the brushing time sequence parameter is added by itself according to a preset mode, and then the parameter acquisition unit 201 is called again;
and a second execution unit 208, configured to control the ECU flashing program to perform flashing according to the latest value of the flashing timing parameter when the determination result of the second determination unit 206 is yes.
Optionally, as an embodiment of the present invention, the method for constructing the first convolutional neural network model and the second convolutional neural network model includes:
step Q1: acquiring a sample data set;
step Q2: establishing a first convolutional neural network and a second convolutional neural network;
the first convolutional neural network and the second convolutional neural network comprise five convolutional layers conv, three pooling layers pooling, two normalization layers LRN and two full connection layers fc, and the corresponding network structures are all
In the above network structure, each ReLU is an activation function, and MSE is a loss function, where: the formula of the loss function MSE in the first convolutional neural network isWherein y' is the actual CPU occupancy rate before the acquisition and the writing, and y is the CPU occupancy rate predicted by the first convolutional neural network; the formula of the loss function MSE in the second convolutional neural network is +.>Wherein t' represents the actual brushing time length, and t represents the brushing time length predicted by the second convolutional neural network; n1 is the number of samples used to train the first convolutional neural network, and n2 is the number of samples used to train the second convolutional neural network;
step Q3: and training the first convolutional neural network and the second convolutional neural network respectively by using the constructed sample data set to obtain a trained first convolutional neural network model and a trained second convolutional neural network model.
The first convolutional neural network and the second convolutional neural network established in the step Q2 are both:
the first layer of convolution layer adopts convolution kernel with the size of 11 multiplied by 11 and the step length of 4;
the second layer of convolution layers, the third layer of convolution layers, the fourth layer of convolution layers and the fifth layer of convolution layers all adopt convolution kernels with the size of 3 multiplied by 3 and the step length of 1;
after pooling, the first layer convolution layer and the second layer convolution layer are normalized by LRNs respectively;
the size of each pooling layer is 3×3, and the step size is 2.
Optionally, as an embodiment of the present invention, the implementation method of step Q3 is:
dividing the sample data set into a training set and a test set according to the ratio of 4:1, wherein the training set is divided into k parts according to a k-fold check method, wherein k-1 parts are used as training, and the other part is used as check;
training the established first convolutional neural network and the second convolutional neural network by using training sets respectively;
checking the established first convolutional neural network and the second convolutional neural network by using the test set respectively;
and calculating the difference between the predicted result and the actual result through the MSE in each training, respectively according to a predetermined minimum value of the check error, and adjusting the parameters to retrain the model according to the number of cyclic training until the calculated result of the MSE is smaller than or equal to the predetermined minimum value of the check error, and correspondingly obtaining the trained corresponding convolutional neural network model.
Optionally, as an embodiment of the present invention, the implementation method of step Q1 is:
collecting a sample;
preprocessing each acquired sample to correspondingly obtain preprocessed samples of each sample;
collecting all the obtained preprocessed samples to form the sample data set;
the method for preprocessing each acquired sample comprises the following steps:
calculating average value average of all data in the sample;
calculating the standard deviation of each datum in the sample;
each piece of data x in the sample is preprocessed by using the formula H= |x-average|/sigma by using the average value average and the calculated standard deviation, and a preprocessed sample is obtained; wherein, H is the preprocessed data corresponding to the data x, and sigma is the standard deviation corresponding to the data x.
Alternatively, as an embodiment of the present invention, in the parameter acquisition unit 201: the brushing time sequence parameters comprise a frame-to-frame brushing time interval CFMS, a packet-to-packet brushing time interval FFMS and a timeout time setting parameter RTMS corresponding to an ECU brushing program;
the hardware configuration parameters also comprise CPU processing frequency, memory bank size, current residual memory size, CPU occupancy rate corresponding to the refreshing and refreshing time length corresponding to the refreshing of the refreshing terminal equipment; wherein,,
The corresponding CPU occupancy rate is the preset CPU occupancy rate difference; the CPU occupancy rate difference value is used for representing the difference value between the highest CPU occupancy rate during the writing and the latest value of the CPU occupancy rate before the writing;
the brushing time length corresponding to the brushing is a brushing time length preset according to experience and is used for representing the brushing time length used by the ECU brushing program to execute the brushing.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as far as reference is made to the description in the method embodiments.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.