Vehicle behavior abnormal mode identification method for vehicle-mounted terminal
Through the combination of tree ring bionic optimization, mask-enhanced autocoding and quantum chaotic neural network, the shortcomings of traditional networks in data generation, feature extraction and classification are solved, and more stable and flexible feature extraction and abnormal pattern recognition are achieved.
Patent Information
- Application Number
- CN202411587226.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-11-08
AI Technical Summary
Traditional generative adversarial networks are prone to pattern crashes during the generation process, resulting in unstable data quality; neural network structure is fixed and difficult to adapt to adapt; autoencoders do not use random masking technology, which limits the model's processing ability of complex data; Neural network classifiers lack sensitivity to minor changes, resulting in insufficient classification accuracy.
Feature extraction is performed using a fully connected neural network based on tree ring bionic optimization, combined with a self-encoding neural network based on mask enhancement for feature dimensionality reduction, and a classifier model is constructed using a fractional-order neural network based on quantum chaos theory, through self-healing The strategy generates and adversarial network for data augmentation.
Improve data quality, enhance the generalization ability and stability of the model, improve the accuracy and efficiency of feature extraction, maintain the characteristics of data structure, enhance the processing ability of complex data, and improve the identification of abnormal driving patterns. Accuracy.
Smart Images

Figure CN119089371A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a vehicle behavior abnormal pattern recognition method for a vehicle-mounted terminal. Background Art
[0002] The Chinese invention patent with application number CN202410552900.0 proposes a device and method for extracting and identifying features of an IoT terminal, which belongs to the field of IoT security protection technology. Without customizing and modifying the IoT terminal and ensuring that the terminal identity is not tampered with or forged, the physical characteristics of the IoT low-speed wired interface signal level are extracted to first distinguish the terminal connection line, and then identify the terminal characteristics, which are used as the terminal device fingerprint for terminal identity authentication.
[0003] The Chinese invention patent with application number CN202410345435.3 proposes an attack detection method, device, storage medium and electronic device for the Internet of Things. It relates to the field of artificial intelligence technology. Among them, the method includes: capturing a data packet in a first router to obtain a first data packet, wherein the first router includes: a router for exchanging data between the Internet of Things subnet and the external network; parsing the first data packet to obtain a first parsing result; inputting the first parsing result into a target detection model, and outputting a detection result, wherein the detection result is used to indicate whether the first data packet has a network attack behavior on the Internet of Things subnet, and the target detection model includes: a model obtained by training a machine learning model by simulating the network environment of the Internet of Things subnet.
[0004] The Chinese invention patent with application number CN202410281063.2 proposes an intelligent operation and maintenance system platform based on machine learning and industrial Internet of Things, involving the field of intelligent industrial control technology, including equipment management module, fault management module, report management module, system management module, monitoring module and data processing module; the monitoring module includes sensors and network equipment, which are used to collect and display the operating data of each device in the production process; the data processing module pre-processes the operating data, builds an LSTM model, and predicts the future data of each device based on the operating data to obtain the prediction of faults and the optimization plan of production methods, and adjusts the production equipment according to the predicted data to realize automatic optimization and intelligent scheduling of the production process.
[0005] The existing technology has the following problems that still need to be further solved:
[0006] (1) Traditional generative adversarial networks are prone to mode collapse during the generation process, resulting in unstable quality of generated data and unable to meet the needs of high-quality data expansion.
[0007] (2) Existing neural network structures are usually fixed and lack the ability to adaptively adjust according to data characteristics. When faced with complex and changeable IoT data, it is difficult to effectively extract features.
[0008] (3) Traditional autoencoders do not utilize random masking technology and may not be able to fully learn the implicit relationships in the data during the dimensionality reduction process, limiting the model’s ability to process complex data.
[0009] (4) Conventional neural network classifiers lack sensitivity to small changes, resulting in insufficient classification accuracy and sensitivity when dealing with abnormal patterns with small differences. Summary of the invention
[0010] In view of the above-mentioned deficiencies in the prior art, the present invention provides a vehicle behavior abnormal pattern recognition method for a vehicle-mounted terminal.
[0011] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0012] A vehicle behavior abnormal pattern recognition method for a vehicle terminal comprises the following steps:
[0013] Obtain sensor data from the vehicle terminal;
[0014] A fully connected neural network based on tree ring bionic optimization is used to extract features from the acquired data to obtain the first feature;
[0015] The first feature is reduced in dimension by using a mask-enhanced autoencoder neural network to obtain a second feature;
[0016] A fractional-order neural network based on quantum chaos theory is used to construct a classifier model, and the second feature is used to train the classifier model;
[0017] The trained classifier model is used to identify abnormal vehicle behavior patterns.
[0018] Preferably, a fully connected neural network based on tree ring bionic optimization is used to extract features from the acquired data to obtain the first feature, including:
[0019] Initialize the neural network and set the number of neurons in the primary layer;
[0020] Adjust the number of neurons and weights in each layer according to the distribution of training data;
[0021] Calculate the loss function after each training cycle and dynamically adjust the network structure based on the loss function;
[0022] Repeat the above steps until the preset stop iteration condition is met.
[0023] Preferably, the number and weight of neurons in each layer are adjusted according to the distribution of training data as follows:
[0024]
[0025]
[0026]
[0027]
[0028]
[0029] in, For the The learning rate of the neurons in the layer, is the basic learning rate, is the adjustment factor, is the Sigmoid activation function, is the cumulative gradient, For the The number of neurons in the layer, For the The number of neurons in the layer, For the The weights of the neurons in the layer, is the loss function exist The weights in the iteration The gradient of is the loss function In the The weights for the iteration The gradient of and Respectively The increment of the number of neurons in the layer and the adjustment of the weights; is the first expansion coefficient; is the second expansion coefficient, is the current layer number; For the The training error of the layer neurons; For the Input data of layer neurons; For the Entropy of layer data distribution; To control the rate; represents a normal distribution, Indicates that it obeys a specific distribution.
[0030] Preferably, a mask-enhanced autoencoder neural network is used to perform feature dimension reduction on the first feature to obtain the second feature, including:
[0031] Initialize the parameters of the autoencoder network;
[0032] According to the framework of the greedy algorithm, set the independent training cycle and learning rate for each layer;
[0033] At the beginning of each training cycle, for each input vector, a mask matrix is randomly generated;
[0034] The mask matrix is fed into the autoencoder, which compresses the data into a low-dimensional feature representation.
[0035] The low-dimensional feature representation is sent to the decoder, and the decoder is used to reconstruct the low-dimensional feature representation to obtain a reconstructed vector;
[0036] Use greedy algorithm to optimize the parameters of each layer;
[0037] After all layers are trained, the models of each layer are integrated to form a complete autoencoder model, and the autoencoder model is fine-tuned;
[0038] Repeat the above steps until the preset stop iteration condition is met.
[0039] Preferably, for each input vector, the mask matrix is randomly generated as follows:
[0040]
[0041]
[0042] in, is the mask vector No. elements, is the mask ratio; is the Bernoulli distribution discrete function, is the input vector The variance of is the preset variance threshold, is the minimum value function.
[0043] Preferably, fine-tuning the autoencoder model is specifically as follows:
[0044]
[0045] in, are the fine-tuned model parameters, is the number of training samples, For the training samples, The parameters are and The loss function of Represents the parameter value for which a function is minimized in its domain.
[0046] Preferably, a fractional-order neural network based on quantum chaos theory is used to construct a classifier model, and the second feature is used to train the classifier model, including:
[0047] Initialize the parameters of the fractional neural network;
[0048] The output vector of each layer is transformed through the quantum chaos activation function;
[0049] Calculate the loss function based on the difference between the predicted value of the output layer and the true label;
[0050] Calculate the gradient of each weight according to the loss function and update the weight using fractional calculus rules;
[0051] After each training cycle, the network status is checked by quantum state tomography, and the activation function parameters are adjusted by quantum state tomography.
[0052] Repeat the above steps until the preset stop iteration condition is met.
[0053] Preferably, the activation function parameters are adjusted as follows:
[0054]
[0055]
[0056] in, is the first modulation parameter, is the second modulation parameter, is the first adjustment coefficient, is the second adjustment coefficient, is the third adjustment factor; For the The variance of the output of the layer fractional-order neural network before activation, For the The skewness of the output of the fractional-order neural network before activation, For the The median output of the layer-wise neural network before activation.
[0057] Preferably, acquiring the sensor data of the vehicle-mounted terminal further includes:
[0058] A generative adversarial network based on a self-repair strategy is used to augment the acquired data.
[0059] Preferably, using a generative adversarial network based on a self-repair strategy to expand the acquired data includes:
[0060] Initialize the parameters of the generative adversarial network;
[0061] A self-repair module is used in the generator to monitor the quality of generated samples in real time and make self-adjustments;
[0062] In the training process of the generative adversarial network, an adaptive feature distillation strategy is used to optimize the feature generation process by analyzing the feedback at the feature level of the generated samples;
[0063] In the sample generation phase, the generator is used to generate new data samples based on the current network parameters;
[0064] Adopting adaptive threshold dynamic adjustment mechanism to optimize the discrimination process of new data samples generated by the generator;
[0065] Adaptive feature distillation loss and adversarial loss are used to optimize the generator and discriminator;
[0066] Repeat the above steps until the preset stop iteration condition is met.
[0067] The present invention has the following beneficial effects:
[0068] (1) The data quality expanded by the generative adversarial network algorithm with a self-repairing strategy is higher, which effectively avoids the quality degradation of the generated samples and enhances the generalization ability and stability of the model.
[0069] (2) The neural network based on the tree ring bionic strategy of the present invention can adaptively adjust its structure according to the complexity of the data, making the network more flexible and effectively improving the accuracy and efficiency of feature extraction.
[0070] (3) The mask-enhanced autoencoder of the present invention can maintain the structural characteristics of the data during feature dimensionality reduction, thereby enhancing the model's ability to interpret and process complex data.
[0071] (4) The fractional-order neural network of the present invention enhances the ability to capture subtle changes through quantum state tomography, thereby improving the system's accuracy in identifying abnormal driving patterns in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 The present invention is a flow chart of a method for identifying abnormal vehicle behavior patterns for vehicle-mounted terminals. DETAILED DESCRIPTION
[0073] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0074] like Figure 1 As shown, the embodiment of the present invention provides a vehicle behavior abnormal pattern recognition method for a vehicle terminal, comprising the following steps S1 to S5:
[0075] S1. Obtain sensor data from the vehicle terminal;
[0076] In an optional embodiment of the present invention, the data of the present invention is collected from internal sensors of the vehicle terminal, including temperature sensors, acceleration sensors, position sensors, etc., and the collected data is stored in JSON format. In one embodiment, the collected data attributes include: is the vehicle speed, in km / h; is the acceleration in m / s²; is the engine temperature in °C; is the vehicle position, expressed as latitude and longitude ; is the fuel efficiency, in km / L; The engine working status, such as start, stop; Is the battery power in percentage; is the external ambient temperature in °C; is the air quality index; Provides vehicle maintenance reminders, such as oil change, tire wear, etc.
[0077] It should be noted that this embodiment is only used to illustrate one data format and type of the present invention. In actual use, the attributes of the data are usually more than 10 attributes, and the number of attributes of the data may reach dozens or even hundreds.
[0078] Furthermore, the collected data is labeled. The labeling method of the present invention is manual labeling. In one embodiment, the labeled categories include: normal driving mode, sudden acceleration, sudden braking, and abnormal driving, a total of 4 categories.
[0079] It is understandable that in the task of the present invention, the collection, acquisition, labeling and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor generalization ability of the model and affect the accuracy of the model. The present invention adopts a generative adversarial network algorithm based on a self-repairing strategy to generate samples, thereby achieving data expansion. The generative adversarial network algorithm based on a self-repairing strategy includes two parts: a generator and the discriminator The generator is responsible for generating new data that is close to the real data distribution, and the discriminator tries to distinguish the generated new data from the real data.
[0080] In order to solve the problems of mode collapse and training instability in traditional generative adversarial networks, this paper adopts a self-repair strategy to embed a self-repair module in the generator. , this module can automatically adjust the generation strategy according to the feedback provided by the discriminator to optimize the quality of the generated samples.
[0081] Specifically, the training process of the generative adversarial network algorithm based on the self-repair strategy is as follows:
[0082] S101. Generator and the discriminator Perform parameter initialization. In one embodiment, the initialization method is expressed as follows:
[0083]
[0084]
[0085] In the formula, and are the parameters of the generator and the discriminator respectively; represents normal distribution; and are the number of neurons in the input layer of the generator and discriminator respectively; Indicates that it obeys a specific distribution.
[0086] S102. Using a self-repairing module in the generator Monitor the quality of generated samples in real time and make self-adjustments. The parameter adjustment of the self-repair strategy follows the following rules:
[0087]
[0088] In the formula, Represents the update amount of the generator parameters; is the partial derivative of the discriminator output with respect to its input; The input of the discriminator is the fake IoT data generated by the generator; is the partial derivative of the generator output with respect to its parameters; is the self-repair learning rate; is the random noise of the input; and Represent the network functions of the discriminator and the generator respectively. Preferably, Set to 0.01.
[0089] S103, in the training process of the generative adversarial network, an adaptive feature distillation strategy is used to optimize the feature generation process by analyzing the feedback at the feature level of the generated samples, so that the generated samples are more diverse and have higher quality. Specifically, the present invention uses feature distillation loss To optimize the key feature representation of the generated samples, the calculation method is:
[0090]
[0091] In the formula, is the characteristic distillation loss, is the number of sample features generated, is the number of network layers of the generator, Represents a generator Extracted from Features Indicates target features; is the adaptive weight; For the The weight of the layer; is the regularization parameter; is the L1 norm, is the L2 norm. Preferably, Set to 5, Set to 0.1.
[0092] In one embodiment, the adaptive weights Adaptively adjust according to the feature importance of the data, and the calculation method is expressed as:
[0093]
[0094] In the formula, is a hyperparameter that controls sensitivity; is the loss function of the previous round of training; Represents the loss function About weight The norm of the gradient of . Preferably, Set to 3.
[0095] S104. In the sample generation phase, the generator Generate new data samples based on the current network parameters, expressed as:
[0096]
[0097] In the formula, The new data generated by the generator according to the current parameters.
[0098] In the discrimination stage, the discriminator Evaluate the difference between the generated new data and the real data and provide feedback to the generator and self-repair module, expressed as:
[0099]
[0100] Furthermore, the self-repair module According to the feedback from the discriminator, the parameters are adaptively adjusted to correct the deviations that may occur in the generation process to optimize the quality of the generated samples, which can be expressed as:
[0101]
[0102] In the formula, is the adjustment coefficient. Preferably, Set to 0.05.
[0103] S105, using adaptive threshold dynamic adjustment mechanism for generator The discriminant process of the generated new data samples is optimized, especially when facing highly heterogeneous vehicle terminal data, and it can flexibly adapt to the characteristics of different data. Specifically, the discriminator Generate data and real data When evaluating, the threshold used to judge the authenticity of the data is dynamically adjusted through the adaptive threshold dynamic adjustment mechanism, and the baseline threshold is set to , the threshold is based on the average discriminator output value calculated from the initial training data set. In the initial stage, the threshold adjustment coefficient is set , which is initially 0.5. In each training iteration, the threshold is dynamically adjusted according to the discriminator output of the current data sample and the preset baseline threshold. The adjustment method is expressed as:
[0104]
[0105] In the formula, is the average value of the discriminator output of the current batch of generated data, is the adjusted threshold.
[0106] Furthermore, an update mechanism is used based on the ratio of correctly classified generated data Adjustment , the adjustment method is expressed as:
[0107]
[0108] In the formula, is the updated threshold adjustment coefficient, is a hyperparameter that controls the speed of adjustment, is the proportion of generated data correctly identified as “generated” or “real” in the current iteration, and its ideal value is 0.5, indicating that the discriminator and the generator are balanced. Set to 3.
[0109] Furthermore, the updated threshold is used in the discrimination stage Judging the authenticity of the generated data is expressed as:
[0110]
[0111] In the formula, Indicates the final judgment result.
[0112] S106, using adaptive feature distillation loss The performance of the generator and discriminator is optimized with adversarial loss, and the calculation method of the total loss function is expressed as:
[0113]
[0114] In the formula, represents the real data sample.
[0115] Further, The term reflects the discriminator's ability to evaluate the generated samples, and the calculation method is expressed as:
[0116]
[0117] In the formula, is the Sigmoid activation function; and are the weight and bias of the discriminator respectively.
[0118] Furthermore, the parameters are updated according to the total loss function, and the updating method is expressed as:
[0119]
[0120]
[0121] In the formula, are the updated generator parameters, is the updated discriminator parameter, is the gradient of the total loss function with respect to the discriminator parameters, is the gradient of the total loss function with respect to the generator parameters, is the updated learning rate. Preferably, Set to 0.03.
[0122] S107, repeat the above steps until the preset stop iteration condition is met, which means the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0123] This embodiment uses a generative adversarial network algorithm based on a self-repairing strategy for data expansion. The generator can automatically adjust the generation strategy according to the feedback of the discriminator, which solves the problems of mode collapse and instability that may occur in traditional generative adversarial networks during training. The data expanded by the generative adversarial network algorithm with a self-repairing strategy has higher quality, effectively avoiding the quality degradation of the generated samples and enhancing the generalization ability and stability of the model.
[0124] S2, using a fully connected neural network based on tree ring bionic optimization to extract features from the acquired data to obtain the first feature;
[0125] In an optional embodiment of the present invention, the expanded data is input into a feature extraction model to train the feature extraction model. The present invention uses a 3-layer fully connected neural network for feature extraction. In the prior art, some schemes use neural networks for feature extraction. In some neural network structures, problems such as gradient vanishing, gradient exploding, or falling into a local optimal solution may be encountered, affecting the stability of training and the performance of the model.
[0126] The feature extraction model training phase of the present invention adopts a tree ring-based bionic optimization strategy to simulate the growth pattern of tree rings, and gradually expands the depth and width of the network in a hierarchical manner to adapt to complex IoT data feature extraction tasks.
[0127] In traditional neural network training, the network structure is usually static, that is, the depth of the network and the number of neurons in each layer are determined before training. The present invention adopts a dynamic structure adjustment mechanism based on the tree ring pattern, which enables the network to adaptively adjust its structure according to the complexity of the data, so that the network can respond more flexibly to various IoT data characteristics.
[0128] Specifically, the training process of the neural network algorithm based on tree ring bionic optimization is as follows:
[0129] S201. Initialize the neural network. The neural network starts with only one layer, which is equivalent to the primary growth rings of a tree. It contains the most basic neuron settings and sets the number of neurons in the primary layer. and weight , expressed as:
[0130]
[0131]
[0132] In the formula, The number of neurons that are the basis; is the standard deviation of the initialization weight. Preferably, Set to 1.5 times the number of data features. Set to 0.01.
[0133] S202. Decide whether to add a new layer based on the complexity of the training data and the current performance of the model. The addition of a new layer simulates the growth of tree rings. With each new layer, the capacity and complexity of the network increase to adapt to more complex data features. The number of neurons and weights of each layer are adjusted as follows:
[0134]
[0135]
[0136]
[0137]
[0138]
[0139] In the formula, For the The learning rate of the layer, is the base learning rate, is the adjustment factor, is the Sigmoid function, Consider the past The cumulative gradient of the iterations, For the The number of neurons in the layer, For the The number of neurons in the layer, For the The weight of the layer, is the loss function exist In the iteration The gradient of is the loss function In the The iteration about The gradient of and Respectively represent The increment of the number of neurons in the layer and the adjustment of the weights; is the first expansion coefficient; is the second expansion coefficient, is the current layer number; It is The training error of the layer; It is The input data of the layer; Indicates Entropy of layer data distribution; Controls the rate at which weight increment decreases with layer depth. Preferably, Set to 0.2, Set the value to 3, Set the value to 5.
[0140] Further, It is used to evaluate the complexity and uncertainty of the data, so as to make the expansion of the network structure more refined and adaptable. The calculation method is expressed as:
[0141]
[0142] In the formula, It is The output data of the layer The probability of a class feature appearing.
[0143] S203. After each training cycle, the performance of the newly added layer is evaluated, and the network structure and parameters are adjusted according to the performance feedback. The performance evaluation is constrained by the loss function, that is, the evaluation is performed by comparing the actual output with the expected output. The method of calculating the loss function is expressed as:
[0144]
[0145] In the formula, is the actual output; It is the network prediction output, obtained by the preset Softmax function; is the total sample size.
[0146] Furthermore, the network structure is dynamically adjusted according to the result of the loss function. Specifically, when , the network is expanded to improve the model performance. is a performance threshold, preferably, Set the value to 0.2.
[0147] S204, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0148] In this embodiment, feature extraction adopts a three-layer fully connected neural network optimized based on the tree ring bionic strategy. By simulating the growth pattern of tree rings to dynamically adjust the network structure, it solves the problem that the traditional neural network structure is fixed and difficult to adapt to the variability of data characteristics when processing complex Internet of Things data. It can adaptively adjust its structure according to the complexity of the data, making the network more flexible and effectively improving the accuracy and efficiency of feature extraction.
[0149] S3, using a mask-enhanced autoencoder neural network to reduce the dimension of the first feature to obtain a second feature;
[0150] In an optional embodiment of the present invention, the data after feature extraction is input into a feature dimensionality reduction model to train the feature dimensionality reduction model. The present invention adopts a mask-enhanced autoencoder neural network as a feature dimensionality reduction algorithm. The mask-enhanced autoencoder neural network includes an encoder and a decoder, and realizes data compression and reconstruction by learning the effective expression of input data. On the basis of the traditional autoencoder, the present invention adopts a random mask in the input layer to selectively hide part of the features of the input data, forcing the network to reconstruct the complete output from the partially visible input data, thereby enhancing the model's ability to learn the implicit relationship in the data, so as to ensure that the data after dimensionality reduction can still maintain the original data structure characteristics.
[0151] Specifically, the training process of the mask-enhanced autoencoder neural network algorithm is as follows:
[0152] S301, initialize the parameters of the autoencoder network, including the weight and bias parameters of the autoencoder network, set For the The set of parameters of the layer, including weights and biases, is ,and For the The weight matrix of the layer, For the The bias vector of the layer. In one embodiment, the initialization method is random initialization.
[0153] S302, according to the framework of the greedy algorithm, set the independent training cycle and learning rate of each layer to ensure that each layer can reach the local optimum before joining the overall network. The number of independent training loop iterations for the layer Set to:
[0154]
[0155] In the formula, is the total number of iterations, is the total number of layers, is the Kronecker function, ensuring that the last layer can have more training cycles.
[0156] S303, at the beginning of each training cycle, for each input vector , randomly generate a mask matrix , used to randomly mask part of the input data, and the way to generate the mask is expressed as:
[0157]
[0158] In the formula, is the mask vector No. elements, is the mask ratio; is a Bernoulli distribution discrete function, which is used to generate a mask matrix, each element from An independent draw from the distribution indicates that the element has The probability of is set to 1 (i.e., selected or activated), The probability of is set to 0 (i.e. covered or inactive).
[0159] Furthermore, the mask ratio The calculation method is expressed as:
[0160]
[0161] In the formula, Represents input data The variance of is the preset variance threshold, Represents the minimum value function.
[0162] S304, after the input data is masked, it is sent to the autoencoder, which compresses the data into a low-dimensional feature representation after being processed by the activation function. The forward propagation method of the encoder is expressed as:
[0163]
[0164] In the formula, is the encoded feature vector, is the Sigmoid activation function, and are the encoder weights and biases, Denotes the Hadamard product.
[0165] S305, the low-dimensional features are sent to the decoder, and the decoder attempts to reconstruct the original input data. By calculating the loss function, the back propagation algorithm updates the parameters in the network. The output of the decoder is expressed as:
[0166]
[0167] In the formula, is the output of the decoder, that is, the reconstructed input data.
[0168] Furthermore, the calculation method of the loss function is expressed as:
[0169]
[0170] In the formula, is the total loss, is the reconstruction error, is the weight to control the isolated loss; is an isolated loss, indicating The number of non-zero elements of is used to measure the sparsity of the code. Preferably, Set to 0.3.
[0171] Furthermore, isolated losses The calculation method is expressed as:
[0172]
[0173] In the formula, is a vector Dimensions; For the The encoded feature vector of dimensions; is the indicator function, when The value is 1 when , otherwise it is 0.
[0174] S306. Optimize the parameters of each layer using a greedy algorithm. In one embodiment, the parameter update method uses an Adam optimizer, and the update method is expressed as:
[0175]
[0176] In the formula, and Respectively represent Tier Iterations and The parameters of the iterations, is the Adam optimizer function, is the learning rate, is the calculated loss, For the The gradient of the parameters of the layer at iteration t with respect to the loss function. Preferably, Set the dynamic adjustment strategy, and its initial value is set to 0.01.
[0177] In one embodiment, The learning rate for this iteration is , and its dynamic adjustment method is expressed as:
[0178]
[0179] In the formula, is the initial learning rate, is the initial reconstruction weight, For the The reconstruction weight of the iteration, is the adjustment influence coefficient. Preferably, Set to 3, Set to 5.
[0180] Further, The reconstruction weight of the iteration The adjustment of is based on the current effect of the reconstruction error and the sparsity weight, and is calculated as:
[0181]
[0182] In the formula, is the adjustment rate parameter, is the current reconstruction error, is the sparsity weight, For input data, For the The reconstructed output of the iterations. Preferably, Set to 0.3, Set to 5.
[0183] Furthermore, the gradient adjustment method in the Adam optimizer is expressed as:
[0184]
[0185] In the formula, and They are The bias-corrected first- and second-order moment estimates for the iterations, is a small constant. Preferably, Set to 0.0001.
[0186] Further, The bias-corrected first- and second-order moment estimates for the iterations and The calculation method is:
[0187]
[0188]
[0189] In the formula, and It is The exponential moving average and squared exponential moving average of the gradients of the iterations, and It is Preferably, and Set to 0.9 and 0.999 respectively.
[0190] S307. After the training of all layers is completed, the models of each layer are integrated to form a complete autoencoder model, and the overall fine-tuning is performed to optimize the global performance of the model. The fine-tuning method is expressed as:
[0191]
[0192] In the formula, is the fine-tuned parameter, is the number of training samples, It is training samples, Indicates that the parameter is and The loss function of .
[0193] S308, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0194] The feature dimensionality reduction of this embodiment uses a mask-enhanced autoencoder neural network, which forces the network to learn the complete data structure from part of the data through random masking technology, thereby improving the model's ability to learn implicit relationships in the data. The mask-enhanced autoencoder can maintain the structural characteristics of the data during feature dimensionality reduction, enhancing the model's ability to interpret and process complex data.
[0195] S4, using a fractional-order neural network based on quantum chaos theory to build a classifier model, and using the second feature to train the classifier model;
[0196] In an optional embodiment of the present invention, the reduced-dimensional data is input into a classifier to train the classifier model. The present invention adopts a fractional-order neural network based on quantum chaos theory as the classifier model, and adopts a quantum state tomography method in the activation function to simulate the nonlinear behavior of the activation function through the state transformation of quantum bits to capture subtle changes in the data, enhance the model's sensitivity to abnormal patterns, and improve classification accuracy.
[0197] Specifically, the training process of the fractional-order neural network algorithm based on quantum chaos theory is as follows:
[0198] S401, initialize the parameters of the fractional-order neural network, with For example, the first Layer weights and bias Set the initial value, expressed as:
[0199]
[0200]
[0201] In the formula, is the standard deviation of the weights and biases at initialization. Preferably, Set the value to 0.01.
[0202] S402, input data through the network, For example, the first The output of each layer is converted through the quantum chaos activation function and passed layer by layer until the output layer, which is expressed as:
[0203]
[0204]
[0205]
[0206] In the formula, is the input vector of the fractional-order neural network, For the The input vector of the fractional-order neural network of the layer, It is The linear transformation result of the layer, is the output of the previous layer, is an activation function modulated by quantum chaos theory, is the first modulation parameter, is the second modulation parameter.
[0207] S403, using the loss function to evaluate the difference between the predicted value of the output layer and the true label, the calculation method is:
[0208]
[0209] In the formula, is the loss function of the fractional-order neural network, It is The true labels of samples, The model is The predicted value of samples, is the total sample size, is the dynamic regularization factor, is the regularization term.
[0210] In one embodiment, the dynamic regularization factor is based on the loss of the current model and weight size Calculated, expressed as:
[0211]
[0212] In the formula, is the baseline regularization strength, is the cross entropy loss, is the loss sensitivity coefficient, is the Sigmoid activation function. Preferably, Set the value to 3, Set the value to 5.
[0213] S404. According to the result of the loss function, the gradient of each weight is calculated and updated using the fractional calculus rule. Specifically, For example, the first The weight update rule of the layer is expressed as:
[0214]
[0215]
[0216] In the formula, The fractional order neural network The amount of update to the layer weights, is the learning rate, is a weight update function based on fractional derivatives, is the loss function of the fractional-order neural network.
[0217] In one embodiment, the calculation method of the weight update function based on fractional derivatives is expressed as:
[0218]
[0219] In the formula, represents Caputo-type fractional differential; is the fractional-order adjustment factor, and , preferably, Set the value to .
[0220] Furthermore, the fractional derivative For non-integer derivatives, the calculation method is expressed as:
[0221]
[0222] In the formula, is the gamma function.
[0223] S405. After each training cycle, the network state is checked by quantum state tomography. The activation function parameters are adjusted to evaluate the performance by performing quantum state tomography. The calculation method is expressed as:
[0224]
[0225]
[0226] In the formula, is the first adjustment coefficient, is the second adjustment coefficient, is the third adjustment factor; For the The variance of the output of the layer fractional-order neural network before activation, For the The skewness of the output of the fractional-order neural network before activation, For the The median output of the layer fractional-order neural network before activation; The function is used to convert the median into a value between and Preferably, Set to 0.05, Set to 0.03, Set to 0.02.
[0227] S406, repeat the above steps until the preset stop iteration condition is met, which means the model training is completed. In one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, preferably, the preset maximum number of iterations is set to 1000 times.
[0228] The classifier model of this embodiment adopts a fractional-order neural network based on quantum chaos theory, and uses quantum state tomography to simulate the activation function to capture small data changes and improve the sensitivity to abnormal patterns and classification accuracy. The fractional-order neural network enhances the ability to capture subtle changes through quantum state tomography, and improves the system's recognition accuracy of abnormal driving patterns in practical applications.
[0229] S5. Use the trained classifier model to identify abnormal vehicle behavior patterns.
[0230] In an optional embodiment of the present invention, the trained model will be used to process new samples to identify and classify the behavior patterns of vehicles. In one embodiment, the collected raw data is input into the trained feature extraction and feature dimension reduction model for feature processing, and further, the processed features are input into the classifier model for classifier training to obtain classification results. In this embodiment, the classification categories include: normal driving mode, sudden acceleration, sudden braking, abnormal driving, a total of 4 categories.
[0231] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0232] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0233] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0234] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0235] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A vehicle behavior abnormal pattern recognition method for a vehicle terminal, characterized in that: The following steps are involved: Obtain sensor data from the vehicle terminal; A fully connected neural network based on tree ring bionic optimization is used to extract features from the acquired data to obtain the first feature; The first feature is reduced in dimension by using a mask-enhanced autoencoder neural network to obtain a second feature; A fractional-order neural network based on quantum chaos theory is used to construct a classifier model, and the second feature is used to train the classifier model; The trained classifier model is used to identify abnormal vehicle behavior patterns.
2. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 1 is characterized in that: The fully connected neural network based on tree ring bionic optimization is used to extract features from the acquired data to obtain the first feature, including: Initialize the neural network and set the number of neurons in the primary layer; Adjust the number of neurons and weights in each layer according to the distribution of training data; The loss function is calculated after each training cycle, and the network structure is dynamically adjusted according to the loss function; Repeat the above steps until the preset stop iteration condition is met.
3. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 2 is characterized in that: According to the distribution of training data, the number of neurons and weights of each layer are adjusted as follows: , , , , in, For the The learning rate of the neurons in the layer, is the basic learning rate, is the adjustment factor, is the Sigmoid activation function, is the cumulative gradient, For the The number of neurons in the layer, For the The number of neurons in the layer, For the The weights of the neurons in the layer, is the loss function exist The weights in the iteration The gradient of is the loss function In the The weights of the iteration The gradient of and Respectively The increment of the number of neurons in the layer and the adjustment of the weights; is the first expansion coefficient; is the second expansion coefficient, is the current layer number; For the The training error of the layer neurons; For the Input data of layer neurons; For the Entropy of layer data distribution; To control the rate; represents a normal distribution, Indicates compliance with a specific distribution; is the standard deviation of the initial weights.
4. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 1 is characterized in that: The first feature is reduced in dimension using a mask-enhanced autoencoder neural network to obtain the second feature, including: Initialize the parameters of the autoencoder network; According to the framework of the greedy algorithm, set the independent training cycle and learning rate for each layer; At the beginning of each training cycle, for each input vector, a mask matrix is randomly generated; The mask matrix is fed into the autoencoder, which compresses the data into a low-dimensional feature representation. The low-dimensional feature representation is sent to the decoder, and the decoder is used to reconstruct the low-dimensional feature representation to obtain a reconstructed vector; Use greedy algorithm to optimize the parameters of each layer; After all layers are trained, the models of each layer are integrated to form a complete autoencoder model, and the autoencoder model is fine-tuned; Repeat the above steps until the preset stop iteration condition is met.
5. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 4 is characterized in that: For each input vector, the mask matrix is randomly generated as follows: , in, is the mask vector No. elements, is the mask ratio; is the Bernoulli distribution discrete function, is the input vector The variance of is the preset variance threshold, is the minimum value function.
6. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 4 is characterized in that: Fine-tuning the autoencoder model is as follows: in, are the fine-tuned model parameters, is the number of training samples, For the training samples, For parameters and The loss function of Represents the parameter value for which a function is minimized in its domain.
7. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 1 is characterized in that: A fractional-order neural network based on quantum chaos theory is used to construct a classifier model, and the second feature is used to train the classifier model, including: Initialize the parameters of the fractional neural network; The output vector of each layer is transformed through the quantum chaos activation function; Calculate the loss function based on the difference between the predicted value of the output layer and the true label; Calculate the gradient of each weight according to the loss function and update the weight using fractional calculus rules; After each training cycle, the network status is checked by quantum state tomography, and the activation function parameters are adjusted by quantum state tomography. Repeat the above steps until the preset stop iteration condition is met.
8. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 7, characterized in that: The activation function parameters are adjusted as follows: , in, is the first modulation parameter, is the second modulation parameter, is the first adjustment coefficient, is the second adjustment coefficient, is the third adjustment factor; For the The variance of the output of the layer fractional-order neural network before activation, For the The skewness of the output of the fractional-order neural network before activation, For the The median output of the layer-wise neural network before activation.
9. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 1, characterized in that: Acquiring sensor data from the vehicle terminal also includes: A generative adversarial network based on a self-repair strategy is used to augment the acquired data.
10. The vehicle behavior abnormal pattern recognition method for a vehicle terminal according to claim 9, characterized in that: The data expansion of the acquired data using a generative adversarial network based on a self-repair strategy includes: Initialize the parameters of the generative adversarial network; A self-repair module is used in the generator to monitor the quality of generated samples in real time and make self-adjustments; In the training process of the generative adversarial network, an adaptive feature distillation strategy is used to optimize the feature generation process by analyzing the feedback at the feature level of the generated samples; In the sample generation phase, the generator is used to generate new data samples based on the current network parameters; Adopting adaptive threshold dynamic adjustment mechanism to optimize the discrimination process of new data samples generated by the generator; Adaptive feature distillation loss and adversarial loss are used to optimize the generator and discriminator; Repeat the above steps until the preset stop iteration condition is met.
Citation Information
Patent Citations
Internet of Things terminal feature extraction and recognition device and method
CN118132998A
Intelligent operation and maintenance system platform based on machine learning and industrial Internet of Things
CN118170099A
Attack detection method and device for Internet of Things, storage medium and electronic equipment
CN118264449A
Drilling fluid performance evaluation method based on multi-source measurement data fusion
CN118690155A
Medical monitoring data expansion method and auxiliary classification method
CN118690202A
Cited By
Intelligent question answering method and system based on multi-module collaborative optimization
CN119557409A
Intelligent question answering method and system based on multi-module collaborative optimization
CN119557409B
Intelligent safety helmet operation fatigue risk early warning classification method based on fractional order long short-term memory network
CN120408296A
Intelligent safety helmet operation fatigue risk early warning classification method based on fractional order long short-term memory network
CN120408296B
Automatic driving strategy generation method and device and vehicle-mounted large model deployment method and device
CN120671782A
