Vehicle state monitoring method, device and equipment based on vehicle-mounted terminal and medium
By implementing vehicle status monitoring methods on power emergency power vehicles, using prediction models and LW-LSTM layer to process performance parameters, the problem of insufficient digitalization level of power emergency power vehicles is solved, timely monitoring and automatic adjustment of vehicle status is achieved, and emergency support capabilities are improved.
Patent Information
- Application Number
- CN202510398167.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-18
AI Technical Summary
The digitalization level of the power emergency power vehicle is insufficient during use, and it is impossible to monitor the vehicle's operating status in time and automatically adjust it.
The vehicle status monitoring method based on the vehicle terminal is adopted, and the performance parameters of the power special vehicles are obtained in real time, and the data is processed using a pre-trained prediction model and an arrayed LW-LSTM layer to predict the vehicle status in the future, and automatically adjust it according to the prediction results.
It realizes an advance prediction of the overall future status of electric special vehicles, can be adjusted automatically in a timely manner, and improves the vehicle's emergency support capabilities.
Smart Images

Figure CN120336847A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of the Internet of Electric Power, and particularly to a vehicle state monitoring method, device, electronic device and medium based on an in-vehicle terminal. Background Art
[0002] With the rapid development of society and the continuous increase in power demand, as an efficient and reliable power supply means, power emergency vehicles have received more and more attention and recognition. Especially in some remote areas and areas with weak infrastructure, the demand for power emergency vehicles is more urgent. Generally speaking, the current technology and performance of emergency power vehicles have been significantly improved, and the application fields are also constantly expanding. The emergency power vehicle adopts advanced diesel generator technology and an efficient control system, can provide stable and reliable power output, and has low noise and emissions.
[0003] However, the inventor finds that there is still a problem of insufficient digital level in the use of power emergency vehicles, and the power emergency vehicle cannot timely monitor the vehicle operation state and perform automatic adjustment. Summary of the Invention
[0004] To solve the problems in the related art, embodiments of the present disclosure provide a vehicle state monitoring method, device, electronic device and medium based on an in-vehicle terminal.
[0005] In a first aspect, embodiments of the present disclosure provide a vehicle state monitoring method based on an in-vehicle terminal, including:
[0006] Obtaining k performance parameters corresponding to a special electric vehicle in real time;
[0007] Inputting the k performance parameters obtained in real time into the input layer of a pre-trained prediction model to obtain k pieces of performance parameter time series data with a step size of m output by the input layer;
[0008] Inputting the k pieces of performance parameter time series data with a step size of m into the array-type LW-LSTM layer of the prediction model to obtain k performance parameter inference values at a future time output by the array-type LW-LSTM layer, where the array-type LW-LSTM layer includes m*k LSTM units;
[0009] Inputting the k performance parameter inference values into the output layer of the prediction model to obtain the future overall state of the special electric vehicle output by the output layer;
[0010] Wherein, both k and m are integers greater than 1.
[0011] In a possible implementation manner, the method further includes:
[0012] Obtain multiple sample data, where the sample data includes k sample performance parameter time series data corresponding to a sample time period of a sample electric special vehicle and the true overall state at a time after the sample time period;
[0013] Use the sample data for optimization among the multiple sample data to optimize the hyperparameters of the array LW-LSTM layer, and obtain the optimized hyperparameters;
[0014] Use the optimized hyperparameters to construct an initial array LW-LSTM layer;
[0015] Use the sample data for training among the multiple sample data to train the initial array LW-LSTM layer and the initial output layer, and obtain the trained array LW-LSTM layer and output layer.
[0016] In a possible implementation manner, the using the sample data for optimization among the multiple sample data to optimize the hyperparameters of the array LW-LSTM layer and obtain the optimized hyperparameters includes:
[0017] Use the sample data for optimization among the multiple sample data to optimize the hyperparameters of the array LW-LSTM layer by using the particle swarm optimization algorithm, and obtain the optimized hyperparameters.
[0018] In a possible implementation manner, the using the sample data for optimization among the multiple sample data to optimize the hyperparameters of the array LW-LSTM layer by using the particle swarm optimization algorithm and obtain the optimized hyperparameters includes:
[0019] Based on a preset hyperparameter range, randomly generate a particle swarm, where the position of each particle in the particle swarm is a set of hyperparameters of the array LW-LSTM layer;
[0020] Establish a particle fitness function, and the particle fitness function is the mean square normalized error performance function of the array LW-LSTM layer;
[0021] For each particle, use the sample data for optimization among the multiple sample data to train the array LW-LSTM layer constructed by the set of hyperparameters corresponding to the particle, and calculate the mean square normalized error performance function of the trained array LW-LSTM layer as the fitness value of the particle;
[0022] According to the fitness value of the particle, calculate the local optimal value and the global optimal value of the particle, and update the velocity and position of the particle based on the local optimal value and the global optimal value;
[0023] When the termination condition of the particle swarm optimization algorithm is reached, output the global optimal value as the optimized hyperparameters.
[0024] In a possible implementation, updating the velocity and position of the particle based on the local optimal value and the global optimal value includes:
[0025] Updating the velocity and position of the particle according to the following formula:
[0026]
[0027] where v i is the velocity of particle i, ω(n) is the inertia weight, and n represents the n-th iteration; x i is the position of particle i, x pbest is the local optimal value, and x gbest is the global optimal value; c1 and c2 are learning factors, and r1 and r2 are independent random numbers.
[0028] The structural formula of the LSTM cell is as follows:
[0029]
[0030] where x t is the input vector at the current time t, y t-1 is the output vector at the previous time t-1, y t is the output vector at the current time t, z t , i t , c t , o t are the input signal, input gate, state cell, and output gate at the current time t respectively; c t-1 is the state cell at the previous time t-1, W z is the input weight matrix in z t ; U z , U i , U o are the recurrence weight matrices in z t , i t , o t respectively; b z , b i , b o are the bias matrices of z t , i t , o t respectively; σ is the sigmoid activation function, and g() is the tanh activation function.
[0031] In a possible implementation, the method further includes:
[0032] Determining k performance states at a future time according to the inference values of k performance parameters at the future time;
[0033] Make an operation and maintenance decision based on the inferred values of the k performance parameters, the k performance states, and the future overall state at the future time.
[0034] In a second aspect, an embodiment of the present disclosure provides a method for training a prediction model. The method includes:
[0035] Obtain a plurality of sample data, where the sample data includes the time series data of the k sample performance parameters corresponding to the sample power special vehicle in the sample time period and the true overall state at the time after the sample time period, where k is an integer greater than 1;
[0036] Use the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array LW-LSTM layer, and obtain the optimized hyperparameters;
[0037] Construct an initial array LW-LSTM layer using the optimized hyperparameters;
[0038] Use the training sample data in the plurality of sample data to train the initial array LW-LSTM layer and the initial output layer, and obtain a trained array LW-LSTM layer and output layer. The prediction model includes the trained array LW-LSTM layer and output layer.
[0039] In a third aspect, an embodiment of the present disclosure provides a vehicle state monitoring device based on an in-vehicle terminal, including:
[0040] A parameter acquisition module configured to acquire k performance parameters corresponding to a power special vehicle in real time;
[0041] An input module configured to input the k performance parameters acquired in real time into the input layer of a pre-trained prediction model, and obtain the time series data of the k performance parameters with a step size of m output by the input layer;
[0042] An inference module configured to input the time series data of the k performance parameters with a step size of m into the array LW-LSTM layer of the prediction model, and obtain the inferred values of the k performance parameters at the future time output by the array LW-LSTM layer. The array LW-LSTM layer includes m*k LSTM units;
[0043] An output module configured to input the inferred values of the k performance parameters into the output layer of the prediction model, and obtain the future overall state of the power special vehicle output by the output layer;
[0044] Wherein, both k and m are integers greater than 1.
[0045] In a possible implementation manner, the device further includes:
[0046] A sample acquisition module, configured to acquire a plurality of sample data, where the sample data includes k sample performance parameter time series data corresponding to a sample time period of a sample special-purpose electric vehicle and the true overall state after the sample time period;
[0047] A parameter optimization module, configured to optimize the hyperparameters of an array LW-LSTM layer using the sample data for optimization among the plurality of sample data, to obtain optimized hyperparameters;
[0048] A model construction module, configured to construct an initial array LW-LSTM layer using the optimized hyperparameters;
[0049] A training module, configured to train the initial array LW-LSTM layer and an initial output layer using the sample data for training among the plurality of sample data, to obtain a trained array LW-LSTM layer and output layer.
[0050] In a possible implementation manner, the parameter optimization module is configured to:
[0051] Use the sample data for optimization among the plurality of sample data, and optimize the hyperparameters of the array LW-LSTM layer using a particle swarm algorithm, to obtain optimized hyperparameters.
[0052] In a possible implementation manner, the part of the parameter optimization module that uses the sample data for optimization among the plurality of sample data and optimizes the hyperparameters of the array LW-LSTM layer using a particle swarm algorithm to obtain optimized hyperparameters is configured to:
[0053] Based on a preset hyperparameter range, randomly generate a particle swarm, where the position of each particle in the particle swarm is a set of hyperparameters of the array LW-LSTM layer;
[0054] Establish a particle fitness function, where the particle fitness function is the mean square normalized error performance function of the array LW-LSTM layer;
[0055] For each particle, use the sample data for optimization among the plurality of sample data, train the array LW-LSTM layer constructed by the set of hyperparameters corresponding to the particle, and calculate the mean square normalized error performance function of the trained array LW-LSTM layer as the fitness value of the particle;
[0056] According to the fitness value of the particle, calculate the local optimal value and the global optimal value of the particle, and update the velocity and position of the particle based on the local optimal value and the global optimal value;
[0057] When the termination condition of the particle swarm algorithm is reached, the global optimal value is output as the optimized hyperparameter.
[0058] In a possible implementation manner, the part in the parameter optimization module for updating the velocity and position of the particle based on the local optimal value and the global optimal value is configured as:
[0059] Update the velocity and position of the particle according to the following formula:
[0060]
[0061] where v i is the velocity of particle i, ω(n) is the inertia weight, and n represents the nth iteration; x i is the position of particle i, x pbest is the local optimal value, x gbest is the global optimal value; c1 and c2 are learning factors, and r1 and r2 are independent random numbers.
[0062] In a possible implementation manner, the structural formula of the LSTM cell is as follows:
[0063]
[0064] where x t is the input vector at the current time t, y t-1 is the output vector at the previous time t - 1, y t is the output vector at the current time t, z t , i t , c t , o t are respectively the input signal, input gate, state unit, and output gate at the current time t; c t-1 is the state unit at the previous time t - 1, W z is the input weight matrix in z t ; U z , U i , U o are respectively the recurrence weight matrices in z t , i t , o t ; b z , b i , b o are respectively the bias matrices of z t , i t , o t ; σ is the sigmoid activation function, and g() is the tanh activation function.
[0065] In a possible implementation manner, the device further includes:
[0066] Determine k performance states at a future time according to the k inferred values of performance parameters at the future time;
[0067] Make an operation and maintenance decision according to the k inferred values of performance parameters, the k performance states at the future time, and the future overall state.
[0068] In a fourth aspect, an embodiment of the present disclosure provides a prediction model training device, where the device includes:
[0069] A sample acquisition module, configured to acquire a plurality of sample data, where the sample data includes k sample performance parameter time series data corresponding to a sample time period of a sample electric special vehicle and the true overall state at a time after the sample time period, where k is an integer greater than 1;
[0070] A parameter optimization module, configured to use the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array LW-LSTM layer, and obtain optimized hyperparameters;
[0071] A model construction module, configured to construct an initial array LW-LSTM layer by using the optimized hyperparameters;
[0072] A model training module, configured to use the sample data for training in the plurality of sample data to train the initial array LW-LSTM layer and the initial output layer, and obtain a trained array LW-LSTM layer and output layer, where the prediction model includes the trained array LW-LSTM layer and output layer.
[0073] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, where the memory is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the method according to any one of the first aspects.
[0074] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the method according to any one of the first aspects is implemented.
[0075] According to the technical solution provided by the embodiments of the present disclosure, k performance parameters corresponding to a special-purpose electric vehicle can be obtained in real time; the obtained k performance parameters are input into the input layer of a pre-trained prediction model to obtain k pieces of performance parameter time series data with a step size of m output by the input layer; the k pieces of performance parameter time series data with a step size of m are input into the array-type LW-LSTM layer of the prediction model to obtain k inference values of the performance parameters at a future time output by the array-type LW-LSTM layer, and the array-type LW-LSTM layer includes m*k LSTM units; the k inference values of the performance parameters are input into the output layer of the prediction model to obtain the future overall state of the special-purpose electric vehicle output by the output layer. In this way, the future overall state of the special-purpose electric vehicle can be predicted in advance, and then the special-purpose electric vehicle can be automatically adjusted in a timely manner according to the predicted future overall state, improving the emergency support ability of the vehicle.
[0076] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In combination with the drawings, through the following detailed description of non-limiting embodiments, other features, objects, and advantages of the present disclosure will become more obvious. In the drawings:
[0078] Figure 1 The flowchart of the vehicle state monitoring method based on an in-vehicle terminal provided by the embodiments of the present disclosure is shown.
[0079] Figure 2 The prediction flowchart of the prediction model provided by the embodiments of the present disclosure is shown.
[0080] Figure 3 The flowchart of a prediction model training method provided by the embodiments of the present disclosure is shown.
[0081] Figure 4 The structural block diagram of the vehicle state monitoring device based on an in-vehicle terminal provided by the embodiments of the present disclosure is shown.
[0082] Figure 5 The structural block diagram of the prediction model training device provided by the embodiments of the present disclosure is shown.
[0083] Figure 6 The structural block diagram of an electronic device according to the embodiments of the present disclosure is shown.
[0084] Figure 7 The structural schematic diagram of a computer system suitable for implementing the method of the embodiments of the present disclosure is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0085] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts unrelated to the description of the exemplary embodiments are omitted in the drawings.
[0086] In the present disclosure, it should be understood that terms such as "including" or "having" are intended to indicate the existence of features, numbers, steps, actions, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0087] It should be further noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the drawings and in combination with the embodiments.
[0088] Figure 1 The flowchart showing the vehicle state monitoring method based on an in-vehicle terminal provided by an embodiment of the present disclosure is as follows Figure 1 As shown, the vehicle state monitoring method based on the in-vehicle terminal includes the following steps S101 - S104:
[0089] In step S101, k performance parameters corresponding to the special-purpose electric vehicle are acquired in real time;
[0090] In step S102, the k performance parameters acquired in real time are input into the input layer of the pre-trained prediction model, and k pieces of performance parameter time series data with a step size of m output by the input layer are obtained;
[0091] In step S103, the k pieces of performance parameter time series data with a step size of m are input into the array-type LW-LSTM layer of the prediction model, and k performance parameter inference values at future times output by the array-type LW-LSTM layer are obtained. The array-type LW-LSTM layer includes m * k LSTM units;
[0092] In step S104, the k performance parameter inference values are input into the output layer of the prediction model, and the future overall state of the special-purpose electric vehicle output by the output layer is obtained.
[0093] In a possible implementation manner, this vehicle state monitoring method is applicable to a computer device capable of executing this vehicle state monitoring, such as an in-vehicle terminal (which can also be called an in-vehicle Internet of Things terminal) installed on the special-purpose electric vehicle, or a terminal located near the special-purpose electric vehicle and capable of communicating with the special-purpose electric vehicle. The following will be described by taking the in-vehicle terminal as an example.
[0094] In a possible implementation, various performance parameters corresponding to the electric special vehicle can be obtained through various monitoring devices mounted on the electric special vehicle. The performance parameters may include any one or more of vehicle environment monitoring parameters, vehicle body condition monitoring parameters, and vehicle feature monitoring parameters.
[0095] Among them, the vehicle environment monitoring parameters may include at least one of various environment parameters such as vehicle interior temperature / humidity, noise, smoke detection, and video. The vehicle environment monitoring parameters can be collected through corresponding sensors such as temperature / humidity, noise, and smoke detection sensors and cameras installed on the vehicle. The vehicle-mounted IoT terminal can obtain them from the corresponding sensors in real time through wireless communication, and accordingly monitor the working environment inside the vehicle in real time.
[0096] The vehicle body condition monitoring parameters include vehicle chassis-related parameters, such as the distance from the lowest point to the ground, climbing angle, turning radius, vibration and other parameters. The vehicle-mounted IoT terminal can communicate with the vehicle chassis through the CAN (Controller Area Network) bus. The vehicle-mounted IoT terminal has an OBD (On-Board Diagnostics) interface, and can collect vehicle chassis-related parameters in real time through this OBD interface.
[0097] The vehicle feature monitoring parameters can be monitoring parameters that can reflect the special functions of the electric special vehicle. For example, when the electric special vehicle is an electric emergency power supply vehicle, the vehicle feature monitoring parameters can be generator set monitoring parameters. The generator set monitoring parameters can be parameters such as voltage, current, power, frequency, power generation, circuit breaker opening / closing position, oil pressure, coolant temperature, working duration, battery voltage, etc. The vehicle-mounted IoT terminal can communicate with the generator set controller through an RS-485 (a standard serial communication interface) interface to collect generator set monitoring parameters and power grid data after grid connection. Of course, the electric special vehicle can also be a mobile ring main unit vehicle. At this time, the vehicle feature monitoring parameters can be related parameters of the ring main unit module. The electric special vehicle can also be a mobile energy storage vehicle. At this time, the vehicle feature monitoring parameters can be related parameters of the energy storage module, and so on.
[0098] In a possible implementation, Figure 2 The prediction flow chart of the prediction model provided by the embodiments of the present disclosure is shown. Assume that there are k (k is an integer greater than 1) performance parameters corresponding to the electric special vehicle obtained in real time, denoted as x1, x2... x k , The k performance parameters obtained in real time can be input into the input layer of the pre-trained prediction model. The input layer can divide the k performance parameters obtained in real time within a period of time according to time sequence, and output k time sequence data of performance parameters with a step size of m, such asFigure 2 As shown, it can be denoted as x 1,t , x 2,t ... x k,t . Then, k pieces of performance parameter time series data with a step size of m = 5 can be input into the array-type LW-LSTM (Light Weighted-Lokg Short-term Memory Ketworks, lightweight long short-term memory neural network) layer of the prediction model. As Figure 2 shown, this array-type LW-LSTM layer includes m * k LSTM units. Each piece of performance parameter time series data with a step size of m is processed by a group of m LSTM units to obtain an inference value of a performance parameter at a future time. In this way, k inference values of performance parameters at a future time can be correspondingly obtained for k pieces of performance parameter time series data with a step size of m. Finally, the k inference values of performance parameters output by this array-type LW-LSTM layer can be input into the output layer. Through the SoftMax classifier in this output layer, these k inference values of performance parameters can be mapped to the probability values of the operating state set of this special electric vehicle, and the future overall state of this special electric vehicle can be inferred according to the maximum probability criterion. For example, the operating state set of this special electric vehicle can be defined as S = {S1, S2, S3, S4}, where S1, S2, S3, S4 are divided into 4 levels: normal, deterioration, severity, and failure. S1 indicates that the values of all parameters meet the standards; S2 indicates that there is a deterioration situation in this special electric vehicle, but it does not affect operation; S3 indicates that this special electric vehicle already has a serious trend of deterioration to a failure situation; S4 indicates that this special electric vehicle has a failure and needs to be processed immediately. At this time, the future overall state of this special electric vehicle output by this output layer can be a certain state level in the operating state set S
[0099] This embodiment can obtain k performance parameters corresponding to the special electric vehicle in real time; input the obtained k performance parameters into the input layer of the pre-trained prediction model to obtain k pieces of performance parameter time series data with a step size of m output by the input layer; input the k pieces of performance parameter time series data with a step size of m into the array-type LW-LSTM layer of the prediction model to obtain k inference values of performance parameters at a future time output by the array-type LW-LSTM layer. The array-type LW-LSTM layer includes m * k LSTM units; input the k inference values of performance parameters into the output layer of the prediction model to obtain the future overall state of the special electric vehicle output by the output layer. In this way, the future overall state of this special electric vehicle can be predicted in advance, and then, according to the predicted future overall state in advance, this special electric vehicle can be automatically adjusted in time to improve the emergency support ability of the vehicle
[0100] In a possible implementation manner, the method further includes:
[0101] Obtain multiple sample data, where the sample data includes k sample performance parameter time series data corresponding to a sample period of a sample electric special vehicle and the true overall state at a time after the sample period;
[0102] Use the sample data for optimization in the multiple sample data to optimize the hyperparameters of the array LW-LSTM layer, and obtain the optimized hyperparameters;
[0103] Use the optimized hyperparameters to construct an initial array LW-LSTM layer;
[0104] Use the sample data for training in the multiple sample data to train the initial array LW-LSTM layer and the initial output layer, and obtain the trained array LW-LSTM layer and output layer.
[0105] In this embodiment, multiple sample data can be obtained, and these sample data are mainly used to train the array LW-LSTM layer and the output layer of the prediction model. The sample data includes k sample performance parameter time series data corresponding to a sample period of a sample electric special vehicle and the true overall state at a time after the sample period. Here, the time after the sample period refers to a future time relative to the sample period.
[0106] In this embodiment, the optimization of the hyperparameters of the array LW-LSTM layer is mainly to find a set of optimal hyperparameters to maximize the performance of the array LW-LSTM layer on the given sample data for optimization. The optimization methods that can be adopted include grid search, random search, Bayesian tuning, and so on.
[0107] In this embodiment, the hyperparameters of the array LW-LSTM layer include the number of hidden layer neurons in the LW-LSTM, the learning rate, the number of LSTM layers, that is, m, etc. The number of hidden layer neurons determines the capacity of the array LW-LSTM layer, that is, the number of complex features that the model can learn. Too few units may lead to underfitting, while too many units may lead to overfitting; the learning rate is one of the key hyperparameters in the training process and determines the step size of model parameter updates. Too high a learning rate may cause the model to not converge, while too low a learning rate may cause the training speed to be too slow. The number of LSTM layers affects the depth and complexity of the model. Increasing the number of layers can improve the expressive ability of the model, but at the same time, it will also increase the training difficulty and computational cost. Corresponding optimization methods can be used to obtain a set of optimized hyperparameters.
[0108] In this embodiment, after obtaining the optimized hyperparameters, an initial array LW-LSTM layer can be constructed according to the optimized hyperparameters. Then, using the sample data for training among the above-mentioned multiple sample data, the initial array LW-LSTM layer and the initial output layer are trained to obtain a trained array LW-LSTM layer and output layer. The specific training method is a common model training method, which will not be elaborated here. It should be noted that multiple validation samples different from the sample data for training can also be obtained, and the multiple validation samples are used to verify the model performance of the trained prediction model.
[0109] In a possible implementation manner, using the sample data for optimization among the multiple sample data to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters includes:
[0110] Using the sample data for optimization among the multiple sample data, the particle swarm optimization algorithm is used to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters.
[0111] In this embodiment, the Particle Swarm Optimization (PSO) algorithm is an optimization algorithm based on swarm intelligence. It simulates the foraging behavior of a bird flock and searches for the optimal solution through cooperation and information sharing among group members. A set of hyperparameters can be regarded as a particle, so a group of particles can be obtained. By searching for the optimal solution, that is, the optimal hyperparameters, in the solution space through a group of particles, the optimized hyperparameters can be obtained.
[0112] In a possible implementation manner, using the sample data for optimization among the multiple sample data, the particle swarm optimization algorithm is used to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters includes:
[0113] Based on a preset hyperparameter range, a particle swarm is randomly generated, where the position of each particle in the particle swarm is a set of hyperparameters of the array LW-LSTM layer;
[0114] A particle fitness function is established, and the particle fitness function is the mean square normalized error performance function of the array LW-LSTM layer;
[0115] For each particle, using the sample data for optimization among the multiple sample data, the array LW-LSTM layer constructed by the set of hyperparameters corresponding to the particle is trained, and the mean square normalized error performance function of the trained array LW-LSTM layer is calculated as the fitness value of the particle;
[0116] Calculate the local optimal value and the global optimal value of the particle according to the fitness value of the particle, and update the velocity and position of the particle based on the local optimal value and the global optimal value;
[0117] When the termination condition of the particle swarm algorithm is reached, output the global optimal value as the optimized hyperparameter.
[0118] In this embodiment, the hyperparameter range of each hyperparameter in the array LW-LSTM layer can be preset, and the parameter values of the corresponding hyperparameters can be generated within the corresponding hyperparameter range. In this way, a group of particles can be randomly generated, and each particle in the particle swarm represents a set of hyperparameters of the array LW-LSTM layer. The randomly generated particles include particle positions and particle velocities, and the particle position can be the parameter value of a set of hyperparameters.
[0119] In this embodiment, a particle fitness function can be established, and the particle fitness function is the normalized mean square error (NMSE) performance function of the array LW-LSTM layer.
[0120] In this embodiment, for the array LW-LSTM layer constructed by a set of hyperparameters represented by each particle, the array LW-LSTM layer can be trained using the multiple sample data for optimization, and the value of the normalized mean square error performance function of the trained array LW-LSTM layer, that is, the particle fitness function, can be calculated to obtain the fitness value corresponding to the particle.
[0121] In this embodiment, if the fitness value currently corresponding to the particle is better than the local optimal value, update the current position of the particle to the local optimal value, and find the particle with the best fitness value in the entire particle swarm and use its position as the global optimal value. The velocity and position of the particle can be updated according to the current position, velocity, local optimal value, and global optimal value of the particle. This is the core step of the PSO algorithm. By simulating the cooperative behavior between particles, the particles are moved in the direction of the global optimal solution. Repeatedly execute the above update iterations of the local optimal value, global optimal value, and the velocity and position of the particle until the predetermined number of iterations is reached or the best fitness value converges, and the obtained global optimal value is the optimal hyperparameter.
[0122] In a possible embodiment, the iteratively updating the velocity and position of the particle based on the local optimal value and the global optimal value includes:
[0123] Iteratively update the velocity and position of the particle according to the following formula:
[0124]
[0125] where, vi is the velocity of particle i, ω(n) is the inertia weight, and n represents the nth iteration; x i is the position of particle i, x pbest is the local optimal value, x gbest is the global optimal value; c1 and c2 are learning factors, and r1 and r2 are independent random numbers.
[0126] In a possible implementation manner, the structural formula of the LSTM cell is as follows:
[0127]
[0128] Among them, x t is the input vector at the current time t, y t-1 is the output vector at the previous time t - 1, y t is the output vector at the current time t, z t , i t , c t , o t are respectively the input signal, input gate, state cell, and output gate at the current time t; c t-1 is the state cell at the previous time t - 1, W z is the input weight matrix in z t ; U z , U i , U o are respectively the recursive weight matrices in z t , i t , o t ; b z , b i , b o are respectively the bias matrices of z t , i t , o t ; σ is the sigmoid activation function, and g() is the tanh activation function.
[0129] In this implementation manner, x t can be a time series data of performance parameters with a step size of m. After being processed by a group of m LSTM cells described by the above formulas, an inference value of the performance parameter at a future time can be obtained as the final output.
[0130] In this implementation manner, the parameters W, U z , U i , U o , b z , b i , b o and so on in the above formulas can all be obtained by training the initial array - type LW - LSTM layer with the above sample data.
[0131] In a possible implementation, the method further includes:
[0132] Determine k performance states at a future time according to the k inferred values of performance parameters at the future time;
[0133] Make an operation and maintenance decision according to the k inferred values of performance parameters, the k performance states at the future time, and the future overall state.
[0134] In this implementation, k performance states at a future time can also be determined according to the k inferred values of performance parameters at the future time. For example, the performance states can also be defined as 4 states: normal, deteriorated, severe, and faulty. The performance parameter ranges for each state can be set in advance. By comparing each inferred value of the performance parameter with the performance parameter range, the k performance states corresponding to the k inferred values of the performance parameter can be determined.
[0135] In this implementation, an operation and maintenance decision can be made in advance according to the k inferred values of performance parameters, the k performance states at the future time, and the future overall state. In this way, the running state of the vehicle is monitored in a timely manner and automatic operation and maintenance adjustment are performed, improving the running efficiency and reliability of the vehicle.
[0136] For example, a power generation equipment status monitoring APP can be installed on the in-vehicle Internet of Things terminal. The power generation equipment status monitoring APP can run the above method to obtain k = 6 performance parameters of the power generation equipment of the electric special vehicle. The k time-series data of the performance parameters with a step size of m of the power generation equipment can be input into the array LW-LSTM layer of the above prediction model. Then, through the output layer of the above prediction model, k inferred values of performance parameters at a future time can be output. Furthermore, k performance states at the future time can be obtained, and finally, the future overall state of the power generation equipment of the electric special vehicle is output. The specific data is shown in Table 1 below:
[0137]
[0138]
[0139] Table 1
[0140] Similarly, a vehicle body condition status monitoring APP can be installed on the in-vehicle Internet of Things terminal. The vehicle body condition status monitoring APP can also run the above method to predict the future overall state of the vehicle body condition equipment of the electric special vehicle through k performance parameters of the vehicle body condition equipment of the electric special vehicle.
[0141] The present disclosure also provides a method for training a prediction model. Figure 3 The flowchart showing a method for training a prediction model provided by an embodiment of the present disclosure is asFigure 3 As shown in Figure 3 , the method for training the prediction model includes the following steps:
[0142] In step S301, a plurality of sample data are obtained. The sample data include k sample performance parameter time series data corresponding to a sample time period of a sample electric special vehicle and the true overall state at a time after the sample time period.
[0143] In step S302, the hyperparameters of the array LW-LSTM layer are optimized using the sample data for optimization in the plurality of sample data, and the optimized hyperparameters are obtained.
[0144] In step S303, an initial array LW-LSTM layer is constructed using the optimized hyperparameters.
[0145] In step S304, the initial array LW-LSTM layer and the initial output layer are trained using the sample data for training in the plurality of sample data, and a trained array LW-LSTM layer and output layer are obtained. The prediction model includes the trained array LW-LSTM layer and output layer.
[0146] In a possible implementation manner, the method for training the prediction model is applicable to devices such as a computer and a server that can execute the training of the prediction model.
[0147] In a possible implementation manner, a plurality of sample data can be obtained, which are mainly used to train the array LW-LSTM layer and the output layer of the prediction model. The sample data include k sample performance parameter time series data corresponding to a sample time period of a sample electric special vehicle and the true overall state at a time after the sample time period. Here, the time after the sample time period refers to a future time relative to the sample time period. The meanings of the k sample performance parameters are the same as those of the above-mentioned k performance parameters and will not be elaborated here.
[0148] In a possible implementation manner, the optimization of the hyperparameters of the array LW-LSTM layer is mainly to find a set of optimal hyperparameters to maximize the performance of the array LW-LSTM layer on a given plurality of sample data for optimization. The optimization methods that can be adopted include grid search, random search, Bayesian tuning, and so on.
[0149] In a possible implementation, the hyperparameters of the array LW-LSTM layer include the number of neurons in the hidden layer of the LW-LSTM, the learning rate, the number of LSTM layers, i.e., m, etc. The number of neurons in the hidden layer determines the capacity of the array LW-LSTM layer, that is, the number of complex features that the model can learn. Too few units may lead to underfitting, while too many units may lead to overfitting. The learning rate is one of the key hyperparameters in the training process and determines the step size for updating the model parameters. Too high a learning rate may cause the model not to converge, while too low a learning rate may result in a too slow training speed. The number of LSTM layers affects the depth and complexity of the model. Increasing the number of layers can improve the expressive power of the model, but at the same time, it will also increase the training difficulty and computational cost. Appropriate optimization methods can be used to obtain a set of optimized hyperparameters.
[0150] In a possible implementation, after obtaining the optimized hyperparameters, an initial array LW-LSTM layer can be constructed according to the optimized hyperparameters. Then, using the sample data for training among the above-mentioned multiple sample data, the initial array LW-LSTM layer and the initial output layer are trained to obtain a trained array LW-LSTM layer and output layer. The specific training method is a general model training method and will not be elaborated here. It should be noted that multiple sample data different from the sample data for training can also be obtained as verification samples, and multiple verification samples are used to verify the model performance of the trained prediction model.
[0151] In a possible implementation, using the sample data for optimization among the multiple sample data to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters includes:
[0152] Using the sample data for optimization among the multiple sample data, the particle swarm algorithm is used to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters.
[0153] In this implementation, the particle swarm optimization algorithm (PSO) is an optimization algorithm based on swarm intelligence. It simulates the foraging behavior of bird flocks and searches for the optimal solution, that is, the optimal hyperparameters, through the cooperation and information sharing among group members. A set of hyperparameters can be regarded as a particle, and thus a group of particles can be obtained. By searching for the optimal solution, that is, the optimal hyperparameters, in the solution space through a group of particles, optimized hyperparameters can be obtained.
[0154] In a possible implementation, using the sample data for optimization among the multiple sample data, the particle swarm algorithm is used to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters includes:
[0155] Based on a preset hyperparameter range, randomly generate a particle swarm, where the position of each particle in the particle swarm is a set of hyperparameters of the array LW-LSTM layer;
[0156] Establish a particle fitness function, which is the normalized mean square error performance function of the array LW-LSTM layer;
[0157] For each particle, use the sample data for optimization in the multiple sample data to train the array LW-LSTM layer constructed by the set of hyperparameters corresponding to the particle, and calculate the normalized mean square error performance function of the trained array LW-LSTM layer as the fitness value of the particle;
[0158] According to the fitness value of the particle, calculate the local optimal value and the global optimal value of the particle, and update the velocity and position of the particle based on the local optimal value and the global optimal value;
[0159] When the termination condition of the particle swarm algorithm is reached, output the global optimal value as the optimized hyperparameters.
[0160] In this embodiment, the hyperparameter range of each hyperparameter in the array LW-LSTM layer can be preset, and the parameter values of the corresponding hyperparameters can be generated within the corresponding hyperparameter range, so that a group of particles can be randomly generated. Each particle in the particle swarm represents a set of hyperparameters of the array LW-LSTM layer. The randomly generated particles include particle positions and particle velocities, and the particle position can be the parameter values of a set of hyperparameters.
[0161] In this embodiment, a particle fitness function can be established, and the particle fitness function is the normalized mean square error (NMSE) performance function of the array LW-LSTM layer.
[0162] In this embodiment, for the array LW-LSTM layer constructed by a set of hyperparameters represented by each particle, the array LW-LSTM layer can be trained using the multiple sample data for optimization, and the normalized mean square error performance function of the trained array LW-LSTM layer, that is, the value of the particle fitness function, can be calculated to obtain the fitness value corresponding to the particle.
[0163] In this embodiment, if the fitness value currently corresponding to the particle is better than the local optimal value, the current position of the particle is updated to the local optimal value, and in the entire particle swarm, the particle with the best fitness value is found, and its position is used as the global optimal value. The velocity and position of the particle can be updated according to the current position, velocity, local optimal value, and global optimal value of the particle. This is the core step of the PSO algorithm. By simulating the cooperative behavior between particles, the particles are moved in the direction of the global optimal solution. Repeat the above update iterations of the local optimal value, global optimal value, and the velocity and position of the particle until the predetermined number of iterations is reached or the best fitness value converges, and the global optimal value obtained is the optimal hyperparameter.
[0164] In a possible implementation manner, the iterative update of the velocity and position of the particle based on the local optimal value and the global optimal value includes:
[0165] Iteratively update the velocity and position of the particle according to the following formula:
[0166]
[0167] where, v i is the velocity of particle i, ω(n) is the inertia weight, and n represents the nth iteration; x i is the position of particle i, x pbest is the local optimal value, x gbest is the global optimal value; c1 and c2 are learning factors, and r1 and r2 are independent random numbers.
[0168] In a possible implementation manner, the structural formula of the LSTM unit in the array LW-LSTM layer is as follows:
[0169]
[0170] where, x t is the input vector at the current time t, y t-1 is the output vector at the previous time t-1, y t is the output vector at the current time t, z t , i t , c t , o t are the input signal, input gate, state unit, and output gate at the current time t respectively; c t-1 is the state unit at the previous time t-1, W z is the input weight matrix in z t ; U z , U i , U o are the input weight matrices in z t , i t , ot recursive weight matrix in; b z , b i , b o are respectively the bias matrices of z t , i t , o t ; σ is the sigmoid activation function, and g() is the tanh activation function.
[0171] In this embodiment, x t can be a time series data of performance parameters with a step size of m. After being processed by a group of m LSTM units described by the above formulas, an inference value of the performance parameter at a future time of the final output can be obtained.
[0172] In this embodiment, the parameters W, U involved in the above formulas z , U i , U o , b z , b i , b o etc. can all be obtained by training the initial array LW-LSTM layer with the above sample data.
[0173] The present disclosure also provides a vehicle state monitoring device based on a vehicle-mounted terminal. Figure 4 shows a structural block diagram of the vehicle state monitoring device based on the vehicle-mounted terminal provided by the embodiment of the present disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As Figure 4 shown, the vehicle state monitoring device based on the vehicle-mounted terminal includes:
[0174] A parameter acquisition module 401, configured to acquire k performance parameters corresponding to a special-purpose electric vehicle in real time;
[0175] An input module 402, configured to input the k performance parameters acquired in real time into the input layer of a pre-trained prediction model to obtain k time series data of performance parameters with a step size of m output by the input layer;
[0176] An inference module 403, configured to input the k time series data of performance parameters with a step size of m into the array LW-LSTM layer of the prediction model to obtain k inference values of performance parameters at a future time output by the array LW-LSTM layer. The array LW-LSTM layer includes m*k LSTM units;
[0177] An output module 404, configured to input the k inference values of performance parameters into the output layer of the prediction model to obtain the future overall state of the special-purpose electric vehicle output by the output layer.
[0178] In a possible implementation, the device further includes:
[0179] A sample acquisition module, configured to acquire a plurality of sample data, where the sample data includes k sample performance parameter time series data corresponding to a sample period of a sample electric special vehicle and the true overall state at a time after the sample period;
[0180] A parameter optimization module, configured to optimize the hyperparameters of the array LW-LSTM layer using the sample data for optimization in the plurality of sample data to obtain optimized hyperparameters;
[0181] A model construction module, configured to construct an initial array LW-LSTM layer using the optimized hyperparameters;
[0182] A training module, configured to train the initial array LW-LSTM layer and the initial output layer using the sample data for training in the plurality of sample data to obtain a trained array LW-LSTM layer and output layer.
[0183] In a possible implementation, the parameter optimization module is configured to:
[0184] Optimize the hyperparameters of the array LW-LSTM layer using the particle swarm optimization algorithm to obtain optimized hyperparameters.
[0185] In a possible implementation, the part of the parameter optimization module that uses the particle swarm optimization algorithm to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters is configured to:
[0186] Based on a preset hyperparameter range, randomly generate a particle swarm, where the position of each particle in the particle swarm is a set of hyperparameters of the array LW-LSTM layer;
[0187] Establish a particle fitness function, where the particle fitness function is the mean square normalized error performance function of the array LW-LSTM layer;
[0188] For each particle, calculate the fitness value of the particle according to the particle fitness function of the array LW-LSTM layer constructed based on the set of hyperparameters corresponding to the particle;
[0189] According to the fitness value of the particle, calculate the local optimal value and the global optimal value of the particle, and update the speed and position of the particle based on the local optimal value and the global optimal value;
[0190] When the termination condition of the particle swarm optimization algorithm is reached, output the global optimal value as the optimized hyperparameter.
[0191] In a possible implementation, the part in the parameter optimization module that updates the velocity and position of the particle based on the local optimal value and the global optimal value is configured to:
[0192] Update the velocity and position of the particle according to the following formula:
[0193]
[0194] where v i is the velocity of particle i, ω(n) is the inertia weight, and n represents the nth iteration; x i is the position of particle i, x pbest is the local optimal value, and x gbest is the global optimal value; c1 and c2 are learning factors, and r1 and r2 are independent random numbers.
[0195] In a possible implementation, the structural formula of the LSTM cell is as follows:
[0196]
[0197] where x t is the input vector at the current time t, y t-1 is the output vector at the previous time t - 1, y t is the output vector at the current time t, z t , i t , c t , o t are the input signal, input gate, state unit, and output gate at the current time t respectively; c t-1 is the state unit at the previous time t - 1, W z is the input weight matrix in z t ; U z , U i , U o are the recurrence weight matrices in z t , i t , o t respectively; b z , b i , b o are the bias matrices of z t , i t , o t respectively; σ is the sigmoid activation function, and g() is the tanh activation function.
[0198] In a possible implementation, the device further includes:
[0199] Determine k performance states at future times according to the inference values of k performance parameters at future times;
[0200] Make an operation and maintenance decision based on the inferred values of the k performance parameters, the k performance states, and the future overall state at the future time.
[0201] The present disclosure also provides a prediction model training device. Figure 5 The structural block diagram of the prediction model training device provided by the embodiments of the present disclosure is shown. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. As Figure 5 shown, the prediction model training device includes:
[0202] A sample acquisition module 501, configured to acquire a plurality of sample data, where the sample data includes the time series data of the k sample performance parameters corresponding to the sample electric special vehicle in the sample time period and the true overall state at the time after the sample time period;
[0203] A parameter optimization module 502, configured to optimize the hyperparameters of the array LW-LSTM layer using the sample data for optimization in the plurality of sample data to obtain optimized hyperparameters;
[0204] A model construction module 503, configured to construct an initial array LW-LSTM layer using the optimized hyperparameters;
[0205] A model training module 504, configured to train the initial array LW-LSTM layer and the initial output layer using the sample data for training in the plurality of sample data to obtain a trained array LW-LSTM layer and output layer, where the prediction model includes the trained array LW-LSTM layer and output layer.
[0206] The technical terms and technical features mentioned in the embodiments of this device are the same as or similar to those mentioned in the above method embodiments. For the explanations and descriptions of the technical terms and technical features involved in this device, reference can be made to the explanations and descriptions of the above method embodiments, which will not be elaborated here.
[0207] The present disclosure also discloses an electronic device. Figure 6 The structural block diagram of the electronic device according to the embodiments of the present disclosure is shown.
[0208] As Figure 6 shown, the electronic device 600 includes a memory 601 and a processor 602. Among them, the memory 601 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 602 to implement the method according to the embodiments of the present disclosure.
[0209] Figure 7 The structural schematic diagram of a computer system suitable for implementing the method of the embodiments of the present disclosure is shown.
[0210] As Figure 7 shown, computer system 700 includes a processing unit 701 that can perform various processes in the above embodiments according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 are also stored. The processing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0211] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read from it can be installed into the storage section 708 as needed. Among them, the processing unit 701 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.
[0212] Specifically, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product that includes computer instructions that, when executed by a processor, implement the method steps described above. In such an embodiment, the computer program product can be downloaded and installed from a network via the communication section 709 and / or installed from the removable medium 711.
[0213] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0214] The units or modules involved in the embodiments described in the present disclosure can be implemented in software or in programmable hardware. The described units or modules can also be set in a processor, and the names of these units or modules do not constitute a limitation to the units or modules themselves in some cases.
[0215] As another aspect, the present disclosure also provides a computer-readable storage medium, which can be the computer-readable storage medium included in the electronic device or computer system in the above embodiments; or it can exist separately and be a computer-readable storage medium not assembled into the device. The computer-readable storage medium stores one or more programs, and the one or more processors are used to execute the methods described in the present disclosure.
[0216] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but also covers other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features with similar functions disclosed in the present disclosure.
Claims
1. A vehicle status monitoring method based on an in-vehicle terminal, characterized in that, Including: Obtaining k performance parameters corresponding to a power special vehicle in real time; Inputting the k performance parameters obtained in real time into the input layer of a pre-trained prediction model to obtain k time series data of performance parameters with a step size of m output by the input layer; Inputting the k time series data of performance parameters with a step size of m into the array lightweight long short-term memory neural network LW-LSTM layer of the prediction model to obtain k inference values of performance parameters at a future time output by the array LW-LSTM layer, and the array LW-LSTM layer includes m*k LSTM units; Inputting the k inference values of performance parameters into the output layer of the prediction model to obtain the future overall state of the power special vehicle output by the output layer; Wherein, both k and m are integers greater than 1.
2. The method according to claim 1, wherein The method further includes: Obtaining a plurality of sample data, where the sample data includes k time series data of sample performance parameters corresponding to a sample power special vehicle in a sample time period and the true overall state at a time after the sample time period; Using the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters; Using the optimized hyperparameters to construct an initial array LW-LSTM layer; Using the sample data for training in the plurality of sample data to train the initial array LW-LSTM layer and the initial output layer to obtain a trained array LW-LSTM layer and output layer.
3. The method according to claim 2, characterized in that, The using the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array LW-LSTM layer to obtain optimized hyperparameters includes: Using the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array LW-LSTM layer by using a particle swarm algorithm to obtain optimized hyperparameters.
4. The method according to claim 3, wherein The using the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array LW-LSTM layer by using a particle swarm algorithm to obtain optimized hyperparameters includes: Based on a preset hyperparameter range, randomly generating a particle swarm, where the position of each particle in the particle swarm is a set of hyperparameters of the array LW-LSTM layer; Establishing a particle fitness function, and the particle fitness function is the mean square normalized error performance function of the array LW-LSTM layer; For each particle, using the sample data for optimization in the plurality of sample data to train the array LW-LSTM layer constructed by a set of hyperparameters corresponding to the particle, and calculating the value of the mean square normalized error performance function of the trained array LW-LSTM layer as the fitness value of the particle; According to the fitness value of the particle, calculating the local optimal value and the global optimal value of the particle, and updating the speed and position of the particle based on the local optimal value and the global optimal value; When the termination condition of the particle swarm algorithm is reached, outputting the global optimal value as the optimized hyperparameters.
5. The method according to claim 4, wherein The updating the speed and position of the particle based on the local optimal value and the global optimal value includes: Updating the speed and position of the particle according to the following formula: Among them, v i is the velocity of particle i, ω(n) is the inertia weight, and n represents the n-th iteration; x i is the position of particle i, x pbest is the local optimal value, and x gbest is the global optimal value; c1 and c2 are learning factors, and r1 and r2 are independent random numbers.
6. The method according to claim 1, wherein The structural formula of the LSTM unit is as follows: Among them, x t is the input vector at the current moment t, y t-1 is the output vector at the previous moment t - 1, y t is the output vector at the current moment t, z t , i t , c t , o t are respectively the input signal, input gate, state cell, and output gate at the current moment t; c t-1 is the state cell at the previous moment t - 1, W z is the input weight matrix in z t ; U z , U i , U o are respectively the recurrent weight matrices in z t , i t , o t ; b z , b i , b o are respectively the bias matrices of z t , i t , o t ; σ is the sigmoid activation function, and g() is the tanh activation function.
7. The method according to claim 1, wherein The method further includes: Determining k performance states at future times according to the inference values of k performance parameters at future times; Making an operation and maintenance decision according to the inference values of k performance parameters, k performance states at future times, and the overall future state.
8. A method for training a prediction model, characterized in that, The method includes: Obtaining a plurality of sample data, where the sample data includes k sample performance parameter time series data corresponding to a sample period of a sample electric special vehicle and the true overall state at a time after the sample period, and k is an integer greater than 0; Using the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array lightweight long short-term memory neural network LW-LSTM layer, and obtaining optimized hyperparameters; Using the optimized hyperparameters to construct an initial array LW-LSTM layer; Using the sample data for training in the plurality of sample data to train the initial array LW-LSTM layer and the initial output layer, and obtaining a trained array LW-LSTM layer and output layer, where the prediction model includes the trained array LW-LSTM layer and output layer.
9. A vehicle status monitoring device based on an in-vehicle terminal, characterized in that Includes: A parameter acquisition module configured to acquire k performance parameters corresponding to an electric special vehicle in real time; An input module configured to input the k performance parameters acquired in real time into the input layer of a pre-trained prediction model to obtain k performance parameter time series data with a step size of m output by the input layer; An inference module configured to input the k performance parameter time series data with a step size of m into the array lightweight long short-term memory neural network LW-LSTM layer of the prediction model to obtain inference values of k performance parameters at future times output by the array LW-LSTM layer, and the array LW-LSTM layer includes m*k LSTM units; An output module configured to input the inference values of the k performance parameters into the output layer of the prediction model to obtain the overall future state of the electric special vehicle output by the output layer; Wherein, both k and m are integers greater than 1.
10. The device according to claim 9, characterized in that, The device further includes: An acquisition module configured to acquire a plurality of sample data, where the sample data includes k sample performance parameter time series data corresponding to a sample period of a sample electric special vehicle and the true overall state at a time after the sample period; An optimization module configured to use the sample data for optimization in the plurality of sample data to optimize the hyperparameters of the array LW-LSTM layer, and obtaining optimized hyperparameters; A construction module configured to use the optimized hyperparameters to construct an initial array LW-LSTM layer; A training module configured to use the sample data for training in the plurality of sample data to train the initial array LW-LSTM layer and the initial output layer, and obtaining a trained array LW-LSTM layer and output layer.
11. The device according to claim 10, wherein, The parameter optimization module is configured to: Using the sample data for optimization in the plurality of sample data, adopting a particle swarm algorithm to optimize the hyperparameters of the array LW-LSTM layer, and obtaining optimized hyperparameters.
12. The device according to claim 11, characterized in that In the parameter optimization module, the sample data for optimization in the multiple sample data is used, and the particle swarm algorithm is adopted to optimize the hyperparameters of the array LW-LSTM layer. The part of the optimized hyperparameters is configured as follows: Based on a preset hyperparameter range, a particle swarm is randomly generated. Among them, the position of each particle in the particle swarm is a set of hyperparameters of the array LW-LSTM layer; A particle fitness function is established, and the particle fitness function is the mean square normalized error performance function of the array LW-LSTM layer; For each particle, the sample data for optimization in the multiple sample data is used to train the array LW-LSTM layer constructed by a set of hyperparameters corresponding to the particle, and the mean square normalized error performance function of the trained array LW-LSTM layer is calculated as the fitness value of the particle; According to the fitness value of the particle, the local optimal value and the global optimal value of the particle are calculated, and the velocity and position of the particle are updated based on the local optimal value and the global optimal value; When the termination condition of the particle swarm algorithm is reached, the global optimal value is output as the optimized hyperparameters.
13. The device according to claim 12, characterized in that, The part in the parameter optimization module that updates the velocity and position of the particle based on the local optimal value and the global optimal value is configured as follows: Update the velocity and position of the particle according to the following formula: where, v i is the velocity of particle i, ω(n) is the inertia weight, and n represents the nth iteration; x i is the position of particle i, x pbest is the local optimal value, x gbest is the global optimal value; c1 and c2 are learning factors, and R1 and r2 are independent random numbers.
14. The device according to claim 9, characterized in that, The structural formula of the LSTM cell is as follows: Among them, x t is the input vector at the current moment t, y t-1 is the output vector at the previous moment t - 1, y t is the output vector at the current moment t, z t , i t , c t , o t are respectively the input signal, input gate, state cell, and output gate at the current moment t; c t-1 is the state cell at the previous moment t - 1, W z is the input weight matrix in z t ; U z , U i , U o are respectively the recurrent weight matrices in z t , i t , o t ; b z , b i , b o are respectively the bias matrices of z t , i t , o t ; σ is the sigmoid activation function, and g() is the tanh activation function.
15. The device according to claim 9, characterized in that, The device further includes: Determine k performance states at a future time according to the k performance parameter inference values at the future time; Make an operation and maintenance decision according to the k performance parameter inference values, k performance states at the future time, and the future overall state.
16. A prediction model training device, characterized in that The device includes: A sample acquisition module configured to acquire multiple sample data, where the sample data includes k sample performance parameter time series data of a sample time period corresponding to a sample electric special vehicle and the true overall state at a time after the sample time period, where k is an integer greater than 1; A parameter optimization module configured to use the sample data for optimization in the multiple sample data to optimize the hyperparameters of the array lightweight long short-term memory neural network LW-LSTM layer to obtain optimized hyperparameters; A model construction module configured to use the optimized hyperparameters to construct an initial array LW-LSTM layer; A model training module configured to use the sample data for training in the multiple sample data to train the initial array LW-LSTM layer and the initial output layer to obtain a trained array LW-LSTM layer and output layer, where the prediction model includes the trained array LW-LSTM layer and output layer.
17. An electronic device, characterized in that, It includes a memory and a processor. The memory is used to store one or more computer instructions. Among them, the one or more computer instructions are executed by the processor to implement the method according to any one of claims 1 to 8.
18. A readable storage medium, characterized in that, It stores computer instructions thereon, and when the computer instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.