Method for determining energy consumption anomaly of vehicle and related device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-21
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]但是,固定阈值是基于单一工况或理想环境设定的,无法自适应复杂地形条件下的能耗变化规律,易出现误判或漏判
[0040] Based on the above technical solution, this application provides a method and related apparatus for determining vehicle energy consumption anomalies. The method includes: firstly, acquiring the vehicle's current energy consumption data and reconstructing the channels to obtain a current energy consumption tensor; this enables structured integration of multi-source heterogeneous energy consumption data, providing a complete and standardized input foundation for subsequent feature extraction and ensuring the accuracy of subsequent analysis. Then, continuous cohomology analysis is performed on the current energy consumption tensor, and a current energy consumption feature vector is constructed based on the results of the continuous cohomology analysis; this effectively uncovers the inherent topological structure features of energy consumption changes under low-speed conditions, breaking through the limitation of traditional statistical models that can only capture linear correlations, and accurately characterizing the nonlinear coupling relationship between multi-source energy consumption data, adapting to the energy consumption fluctuation characteristics under complex terrain. Next, the historical energy consumption feature vector corresponding to the vehicle's historical operating conditions is obtained as a benchmark operating condition, and based on the current energy consumption feature vector and the historical energy consumption feature vector, the vehicle's energy consumption difference score is calculated using an optimal transmission algorithm; using the historical benchmark operating conditions as a reference, accurate quantification of energy consumption structure differences is achieved, avoiding the drawbacks of fixed thresholds being unable to adapt to different operating conditions, and reducing the occurrence of misjudgments and omissions. Based on the current energy consumption feature vector and the vehicle's energy consumption difference score, the current energy consumption embedding vector is determined. This maps high-dimensional energy consumption features to a more easily distinguishable space, further enhancing the difference between normal and abnormal energy consumption states and providing more discriminative feature support for subsequent anomaly probability calculation. Finally, the current energy consumption feature vector and the current energy consumption embedding vector are combined to calculate the energy consumption anomaly probability, achieving multi-dimensional feature fusion decision-making and significantly improving the accuracy of energy consumption anomaly identification in complex terrain.
Smart Images

Figure CN122548481A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle control technology, and in particular to a method and related apparatus for determining abnormal energy consumption of a vehicle. Background Technology
[0002] Vehicles are prone to abnormally high energy consumption when operating at low speeds, especially in off-road low-speed driving scenarios. Due to complex and varied terrain and significant fluctuations in road resistance, vehicles operate in a continuously unstable state, which can lead to issues such as tire spin and increased component friction, resulting in abnormally high energy consumption. This not only significantly reduces the vehicle's range but may also affect its operational safety. Therefore, identifying abnormal energy consumption is crucial.
[0003] Currently, judgments are usually made based on fixed threshold rules, that is, when a parameter is detected to exceed a preset threshold, it is directly judged as an abnormal energy consumption; or they are made based on traditional statistical models, that is, by performing simple statistical analysis on historical energy consumption data, a regression model or clustering model is constructed, and the difference in statistical distribution of the data is used to determine whether the energy consumption is abnormal.
[0004] However, fixed thresholds are set based on a single operating condition or ideal environment, and cannot adapt to the energy consumption variation patterns under complex terrain conditions, easily leading to misjudgments or omissions. Traditional statistical models can only capture the linear relationship between energy consumption data, and cannot adapt to the energy consumption fluctuation characteristics of operating conditions under complex terrain, easily leading to misjudgments or omissions. Therefore, relying on fixed threshold rules or traditional statistical models for judgment has obvious limitations, easily leading to low accuracy in identifying energy consumption anomalies. Summary of the Invention
[0005] In view of the above problems, this application provides a method and related device for determining abnormal energy consumption in a vehicle, in order to improve the accuracy of the determined abnormal energy consumption. The specific solution is as follows:
[0006] The first aspect of this application provides a method for determining abnormal energy consumption in a vehicle, comprising:
[0007] Obtain the vehicle's current energy consumption data and reconstruct the channels of the vehicle's current energy consumption data to obtain the vehicle's current energy consumption tensor;
[0008] Perform continuous homology analysis on the vehicle's current energy consumption tensor, and construct the vehicle's current energy consumption feature vector based on the results of the continuous homology analysis;
[0009] The vehicle's historical energy consumption feature vector is obtained, and the vehicle's energy consumption difference score is calculated using the optimal transmission algorithm based on the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector. The historical operating conditions corresponding to the historical energy consumption feature vector are the benchmark operating conditions.
[0010] Based on the vehicle's current energy consumption feature vector and the vehicle's energy consumption difference score, the vehicle's current energy consumption embedding vector is determined.
[0011] The probability of abnormal energy consumption of a vehicle is calculated based on the vehicle's current energy consumption feature vector and the vehicle's current energy consumption embedding vector.
[0012] In one possible implementation, a continuous cohomology analysis is performed on the vehicle's current energy consumption tensor, and a current energy consumption feature vector of the vehicle is constructed based on the results of the continuous cohomology analysis, including:
[0013] Spatial mapping is performed on the vehicle's current energy consumption tensor to obtain the vehicle's current energy consumption point cloud;
[0014] Continuous coherence analysis is performed on the current energy consumption point cloud of the vehicle to obtain the current energy consumption topology barcode of the vehicle.
[0015] Based on the maximum persistence value, zero-dimensional persistence value, and one-dimensional persistence value extracted from the vehicle's current energy consumption topology barcode, a current energy consumption feature vector of the vehicle is constructed.
[0016] In one possible implementation, based on the vehicle's current energy consumption feature vector and its historical energy consumption feature vector, an optimal transmission algorithm is used to calculate the vehicle's energy consumption difference score, including:
[0017] Optimal transmission calculations are performed on the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector to obtain the optimal mapping matrix between the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector.
[0018] Based on the optimal mapping matrix, the transmission distance between the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector is calculated.
[0019] The transmission distance between the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector is determined as the vehicle's energy consumption difference score.
[0020] In one possible implementation, the vehicle's current energy consumption embedding vector is determined based on the vehicle's current energy consumption feature vector and the vehicle's energy consumption difference score, including:
[0021] The vehicle's current energy consumption feature vector and the vehicle's energy consumption difference score are input into a pre-trained energy consumption mapping embedding network to obtain the vehicle's first energy consumption embedding vector.
[0022] The first energy consumption embedding vector of the vehicle is input into the pre-trained energy consumption spherical constraint embedding network to obtain the second energy consumption embedding vector of the vehicle.
[0023] The vehicle's second energy consumption embedding vector is determined as the vehicle's current energy consumption embedding vector.
[0024] In one possible implementation, the method also includes:
[0025] Obtain the first reference embedding vector corresponding to the reference working condition in the energy consumption mapping embedding network and the second reference embedding vector corresponding to the reference working condition in the energy consumption spherical constraint embedding network;
[0026] Calculate the first angular distance between the vehicle's first energy consumption embedding vector and the first reference embedding vector, and determine the vehicle's first energy consumption anomaly score based on the vehicle's first angular distance;
[0027] Calculate the second angular distance between the vehicle's second energy consumption embedding vector and the second reference embedding vector, and determine the vehicle's second energy consumption anomaly score based on the vehicle's second angular distance.
[0028] In one possible implementation, the probability of abnormal energy consumption of the vehicle is calculated based on the vehicle's current energy consumption feature vector and the vehicle's current energy consumption embedding vector, including:
[0029] The attention mechanism is used to perform feature co-alignment between the vehicle's current energy consumption feature vector and the vehicle's current energy consumption embedding vector to obtain a weighted current energy consumption feature vector and a weighted current energy consumption embedding vector.
[0030] The weighted current energy consumption feature vector and the weighted current energy consumption embedding vector are input into the pre-trained energy consumption anomaly score determination model to obtain the vehicle's third energy consumption anomaly score.
[0031] The probability of energy consumption anomaly of a vehicle is calculated based on the vehicle's first energy consumption anomaly score, second energy consumption anomaly score, and third energy consumption anomaly score.
[0032] In one possible implementation, the method also includes:
[0033] Determine whether the vehicle's abnormal energy consumption probability falls within the preset abnormal energy consumption probability range;
[0034] If the vehicle's energy consumption anomaly probability does not fall within the preset energy consumption anomaly probability range, an energy consumption anomaly signal is generated to trigger the vehicle's control response.
[0035] The second aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the first aspect or any implementation thereof, a method for determining an abnormal energy consumption of a vehicle.
[0036] A third aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0037] Memory is used to store computer programs;
[0038] The processor is used to execute computer programs to enable electronic devices to implement the method for determining energy consumption anomalies in vehicles that implement the first aspect or any implementation of the first aspect described above.
[0039] The fourth aspect of this application provides a vehicle including an electronic device that implements the first aspect or any implementation thereof.
[0040] Based on the above technical solution, this application provides a method and related apparatus for determining vehicle energy consumption anomalies. The method includes: firstly, acquiring the vehicle's current energy consumption data and reconstructing the channels to obtain a current energy consumption tensor; this enables structured integration of multi-source heterogeneous energy consumption data, providing a complete and standardized input foundation for subsequent feature extraction and ensuring the accuracy of subsequent analysis. Then, continuous cohomology analysis is performed on the current energy consumption tensor, and a current energy consumption feature vector is constructed based on the results of the continuous cohomology analysis; this effectively uncovers the inherent topological structure features of energy consumption changes under low-speed conditions, breaking through the limitation of traditional statistical models that can only capture linear correlations, and accurately characterizing the nonlinear coupling relationship between multi-source energy consumption data, adapting to the energy consumption fluctuation characteristics under complex terrain. Next, the historical energy consumption feature vector corresponding to the vehicle's historical operating conditions is obtained as a benchmark operating condition, and based on the current energy consumption feature vector and the historical energy consumption feature vector, the vehicle's energy consumption difference score is calculated using an optimal transmission algorithm; using the historical benchmark operating conditions as a reference, accurate quantification of energy consumption structure differences is achieved, avoiding the drawbacks of fixed thresholds being unable to adapt to different operating conditions, and reducing the occurrence of misjudgments and omissions. Based on the current energy consumption feature vector and the vehicle's energy consumption difference score, the current energy consumption embedding vector is determined. This maps high-dimensional energy consumption features to a more easily distinguishable space, further enhancing the difference between normal and abnormal energy consumption states and providing more discriminative feature support for subsequent anomaly probability calculation. Finally, the current energy consumption feature vector and the current energy consumption embedding vector are combined to calculate the energy consumption anomaly probability, achieving multi-dimensional feature fusion decision-making and significantly improving the accuracy of energy consumption anomaly identification in complex terrain. Attached Figure Description
[0041] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0042] Figure 1 A flowchart illustrating a method for determining abnormal energy consumption in a vehicle, provided in an embodiment of this application;
[0043] Figure 2 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0044] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0045] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0046] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0047] To improve the accuracy of identified energy consumption anomalies, this application provides a method for determining vehicle energy consumption anomalies. The method for determining vehicle energy consumption anomalies provided in this application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] Please see the appendix Figure 1 , Figure 1 This is a flowchart illustrating a method for determining abnormal energy consumption in a vehicle, provided in an embodiment of this application. The method may include the following steps:
[0049] Step S101: Obtain the current energy consumption data of the vehicle and reconstruct the channel of the current energy consumption data of the vehicle to obtain the current energy consumption tensor of the vehicle.
[0050] In this application, this step serves as the foundational data layer of the entire energy consumption anomaly determination method. It is the core data foundation layer of the entire system, aiming to provide complete, accurate, and time-synchronized high-quality input data for subsequent topology modeling and energy consumption anomaly detection.
[0051] Specifically, the core scenario is low-speed off-road driving, which allows for the acquisition of current energy consumption data. This data is multi-source, encompassing data from the vehicle's powertrain, chassis, electric drive, and sensor systems, as well as auxiliary information for obtaining high-fidelity road condition background information. Specifically, the current energy consumption data can include data from the following four systems: Powertrain data: This includes motor output power and motor speed. Motor output power reflects the real-time work capacity of the vehicle's power unit, while motor speed reflects the rotational state of the power unit; together, they characterize the vehicle's power output level under current conditions. Electric drive system data: This includes current, voltage, and SOC (State of Charge). Current and voltage reflect the real-time electrical operating state of the electric drive system, while SOC reflects the remaining battery charge level; these three together constitute the core electrical parameter set of the electric drive system. Chassis system data: This includes vehicle speed, wheel speed, wheel-end torque, and drive axle temperature. Overall vehicle speed reflects the vehicle's macroscopic motion state, wheel speed reflects the independent rotation state of each wheel, wheel-end torque reflects the transmission of driving force at the wheel ends, and drive axle temperature reflects the thermal load state of the transmission system. These four factors collectively characterize the mechanical transmission and motion characteristics of the chassis system. Sensor system data includes electronic control system status indicators, vehicle attitude (IMU, Inertial Measurement Unit), GPS waypoints, and vehicle attitude angles. Electronic control system status indicators reflect the operating mode of the electronic control system; vehicle attitude reflects the vehicle's tilt and acceleration state in three-dimensional space; GPS waypoints reflect the vehicle's geographical location trajectory; and vehicle attitude angles reflect the vehicle's pitch, roll, and yaw angles relative to the horizontal plane. These four factors together provide comprehensive perception information about the vehicle's operating status.
[0052] Furthermore, to obtain high-fidelity road condition background information, the current energy consumption data can also include auxiliary information. This auxiliary information includes terrain slope, height variation, estimated surface friction coefficient, and road disturbance characteristics. Specifically, terrain slope and height variation reflect the geometric characteristics of the road surface the vehicle is traveling on; the estimated surface friction coefficient reflects the adhesion between the tires and the road surface; and the road disturbance characteristics, derived from the IMU's high-frequency vibration modes, reflect the unevenness and bumpiness of the road surface. The introduction of auxiliary information allows subsequent models to correlate energy consumption changes with road conditions, thereby improving the accuracy and interpretability of energy consumption anomaly detection.
[0053] After acquiring the current energy consumption data, channel reconstruction is performed on the vehicle's current energy consumption data to address the issues of heterogeneity and inconsistent sampling frequencies. Channel reconstruction is a comprehensive data preprocessing workflow comprising three sub-processes: timestamp alignment, sliding window alignment, and data cleaning. Its purpose is to transform heterogeneous multi-source data into a standardized, synchronized, and high-quality data representation. Specifically, in the timestamp alignment sub-process, a timestamp alignment strategy is used to perform time-series fusion preprocessing on the current energy consumption data. Since the current energy consumption data originates from multiple different sensors and systems, the sampling frequencies of each data source differ significantly. Specifically, high-frequency data, such as wheel speed and IMU data, are primarily sampled at millisecond-level frequencies, i.e., data is collected once every millisecond; low-frequency data, such as battery management system SOC, voltage, and current data, are sampled at second-level resolution, i.e., data is collected once per second. This difference in sampling frequencies leads to time misalignment and data loss issues during direct fusion analysis. Therefore, a timestamp alignment strategy is needed to unify all types of signals to a standard sampling frequency. The timestamp alignment strategy uses timestamps as a reference to interpolate or downsample data streams with different sampling frequencies, aligning all data points on the time axis. For high-frequency data, downsampling or average pooling is used to reduce the sampling frequency to the standard frequency; for low-frequency data, linear interpolation or spline interpolation is used to fill the gaps between sampling points, raising the sampling frequency to the standard frequency. This timestamp alignment strategy constructs a unified time series input structure, enabling joint analysis of data from different systems and frequencies under the same time reference.
[0054] After timestamp alignment, a sliding window alignment mechanism is used to further process the current energy consumption data. This mechanism segments and aligns the data within fixed time windows. Specifically, a fixed-length time window (e.g., 10 or 30 seconds) is set, and the window slides across the complete time series in steps of 1 or 5 seconds, extracting a sample from each time window. This mechanism ensures that each sample contains the same number of time steps and data dimensions, making different samples comparable. Simultaneously, the sliding window alignment mechanism increases the number of samples through overlapping sampling (i.e., overlapping areas between adjacent windows), improving the sufficiency of subsequent model training. After sliding window alignment, the current energy consumption data is organized into a series of regular sample sequences, each representing a complete state record within a fixed time window, providing a regular input format for constructing the current energy consumption tensor.
[0055] After sliding window alignment, the current energy consumption data undergoes data cleaning to eliminate noise and anomalies, ensuring signal stability and reliability. Data cleaning includes two operations: removing obvious sensor noise data and sampling outliers, and processing the current energy consumption data using a dual data smoothing strategy based on median filtering and adaptive threshold correction. In the operation of removing sensor noise data and sampling outliers, outliers in the current energy consumption data are first identified through statistical analysis. Specifically, the mean and standard deviation of each data dimension within a sliding window are calculated, and data points exceeding the range of the mean plus or minus three times the standard deviation are identified as sampling outliers and removed. For continuous abnormal data segments caused by sensor failure or communication interruption, linear interpolation of adjacent normal data segments is used to fill in the gaps. In the dual data smoothing strategy, median filtering is first used to process the current energy consumption data. Median filtering takes each data point as the center and takes the median of all data points within its neighborhood window as the new value for that point, effectively removing impulse noise and spike interference while preserving the signal's edge characteristics. Then, an adaptive threshold correction strategy is employed to further smooth the median-filtered data. This strategy dynamically adjusts the smoothing intensity based on the signal's local fluctuation characteristics: a larger smoothing window is used in regions of gentle signal change to suppress random noise, while a smaller smoothing window is used in regions of rapid signal change to preserve detailed features. This dual processing of median filtering and adaptive threshold correction ensures the signal stability of the current energy consumption data, providing a reliable data foundation for subsequent feature extraction and model training.
[0056] Step S102: Perform continuous cohomology analysis on the vehicle's current energy consumption tensor, and construct the vehicle's current energy consumption feature vector based on the continuous cohomology analysis results.
[0057] In this application, the current energy consumption tensor of the vehicle is first spatially mapped to obtain the current energy consumption point cloud of the vehicle. Then, continuous cohomology analysis is performed on the current energy consumption point cloud of the vehicle to obtain the current energy consumption topology barcode of the vehicle. Finally, the current energy consumption feature vector of the vehicle can be constructed based on the maximum duration value, zero-dimensional duration value, and one-dimensional duration value extracted from the current energy consumption topology barcode of the vehicle.
[0058] Specifically, firstly, the current energy consumption tensor of the vehicle from step S101 is received. The current energy consumption tensor is a multi-dimensional vehicle state time-series data with a fixed window length, and its data structure includes three dimensions: sample dimension, time dimension, and channel dimension. The time dimension records a continuous sequence of time steps within a fixed time window, while the channel dimension records various data types such as motor output power, motor speed, current, voltage, SOC, vehicle speed, wheel speed, wheel-end torque, drive axle temperature, electronic control operating status indicators, vehicle attitude, GPS waypoints, vehicle attitude angles, terrain slope, height change, estimated surface friction coefficient, and road disturbance characteristics. Then, the current energy consumption tensor of the vehicle is spatially mapped to obtain the current energy consumption point cloud of the vehicle. The essence of spatial mapping is to transform the time-series data into a spatial data representation, that is, to represent each segment of multi-dimensional energy consumption time-series data within a fixed window as a high-dimensional point cloud. Specifically, for each time step in the current energy consumption tensor, all channel data corresponding to that time step (i.e., all sensor data at that moment) are combined to form a multi-dimensional vector, and the dimension of the multi-dimensional vector is equal to the number of channel dimensions. In mathematics, a multidimensional vector corresponds to a point in a high-dimensional space, and the coordinates of the point are determined by the values of all sensor data at that moment. Therefore, the multidimensional vectors corresponding to all time steps within a fixed time window together constitute a high-dimensional point cloud. Each point in the high-dimensional point cloud represents the system state at a specific moment, and the dimension of the point is determined by all sensor data at that moment. To improve the efficiency of automotive-grade deployment, a lightweight point cloud construction strategy is designed during the spatial mapping of the vehicle's current energy consumption tensor. Specifically, only the dominant variables related to energy consumption are retained as the dimensions of the high-dimensional point cloud. The dominant variables include torque, electric power, SOC decline rate, and vehicle speed coupling rate. By selecting the dominant variables, a sparse point cloud space is constructed, reducing the dimensionality of the high-dimensional point cloud while retaining key energy consumption information, thereby reducing the computational burden of subsequent continuous coherence analysis and improving the deployment efficiency of the model on automotive-grade embedded devices. After spatial mapping, the vehicle's current energy consumption tensor is transformed into the vehicle's current energy consumption point cloud. The current energy consumption point cloud is a set of points in a high-dimensional space, where each point corresponds to the vehicle system state at a specific moment. All points are arranged in chronological order, forming the trajectory distribution of the vehicle energy consumption state in a multi-dimensional feature space.
[0059] After obtaining the current energy consumption point cloud of the vehicle, continuous cohomology analysis is performed on the current energy consumption point cloud to obtain the vehicle's current energy consumption topological barcode. Continuous cohomology analysis is a topological data analysis method. Its core idea is to extract the topological structure features contained in the point cloud by observing the connection relationships of the point cloud at different scales.
[0060] Specifically, persistent cohomology analysis can include the following operations:
[0061] For each point in the current energy consumption point cloud of the vehicle, spheres are drawn with that point as the center and gradually increasing radii. When the intersection of two spheres is non-empty, the corresponding two points are connected to form an edge; when the common intersection of three spheres is non-empty, the corresponding three points are connected to form a triangular face; and so on, constructing simple complex structures at different scales, namely Vietoris-Rips complexes. As the radius value gradually increases, the structure of the Vietoris-Rips complex gradually evolves from a discrete set of points into a connected network, and may eventually form a fully connected simplex.
[0062] For each radius value corresponding to the Vietoris-Rips complex, compute its homology group. A homology group is a concept in algebraic topology used to describe the hole structure of a topological space. Specifically, a zero-dimensional homology group describes the number and distribution of connected components in the current energy consumption point cloud, i.e., how many separate point clusters there are; a one-dimensional homology group describes the number and distribution of loop structures in the current energy consumption point cloud, i.e., how many closed loops there are; a two-dimensional homology group describes the number and distribution of void structures in the current energy consumption point cloud, i.e., how many hollow cavities there are. Homology groups of higher dimensions follow the same pattern.
[0063] The lifetime of a topological feature (connected components, cycles, holes, etc.) is calculated by tracking its birth and death times at different radius values. The birth time refers to the radius value at which the topological feature first appears, and the death time refers to the radius value at which the topological feature disappears due to being filled by a higher-dimensional structure. The lifetime equals the death time minus the birth time, reflecting the stability and significance of the topological feature. Topological features with longer lifetimes represent stable structural patterns in the data, while those with shorter lifetimes may represent noise or transient fluctuations.
[0064] The duration of life of all topological features is visualized as a barcode, resulting in the vehicle's current energy consumption topology barcode. In this barcode, each horizontal line represents a topological feature; the starting point corresponds to the creation time, the ending point to the extinction time, and the length of the line corresponds to its duration. By observing the distribution and length of the horizontal lines in the current energy consumption topology barcode, the topological structure characteristics of the current energy consumption point cloud can be intuitively determined. For example, a large number of long horizontal lines indicate the presence of a stable topological structure in the data, while a large number of short horizontal lines indicate the presence of more noise or transient features.
[0065] Furthermore, during the persistent homology analysis, a topological summary (persistence diagram) is generated as an auxiliary output. The topological summary represents each topological feature as a point on a two-dimensional plane, with the x-axis representing the birth time and the y-axis representing the extinction time. Points located above the diagonal represent true topological features with positive persistent lifetimes, while points near the diagonal represent noise features. The topological summary contains equivalent topological information to the current energy consumption topology barcode but provides a different visualization perspective, facilitating engineering verification and model interpretation.
[0066] After obtaining the vehicle's current energy consumption topology barcode, the vehicle's current energy consumption feature vector is constructed based on the maximum persistence value, zero-dimensional persistence value, and one-dimensional persistence value extracted from the barcode. This current energy consumption feature vector is a structured topology feature vector, and its construction process is as follows:
[0067] The maximum persistence value refers to the maximum lifetime of all topological features in the current energy consumption topology barcode. The maximum persistence value reflects the duration of the most stable topological structure in the current energy consumption point cloud, representing the most significant structural pattern in the current energy consumption state. A larger maximum persistence value indicates a more stable energy flow pattern in the current energy consumption state; a smaller maximum persistence value indicates a less stable structural pattern or one subject to stronger perturbations in the current energy consumption state.
[0068] Zero-dimensional persistence refers to the persistence index extracted from the topological features corresponding to zero-dimensional homology groups, reflecting the evolutionary characteristics of connected components in the current energy consumption point cloud. Specifically, zero-dimensional persistence includes maximum connectivity persistence, i.e., the maximum persistence time among all connected components, and the distribution characteristics of the number of connected components. Zero-dimensional persistence reflects the degree of clustering and separation of energy consumption data at different scales: when the zero-dimensional persistence is large, it indicates the existence of multiple clearly separated stable state clusters in the energy consumption data; when the zero-dimensional persistence is small, it indicates that the state distribution in the energy consumption data is relatively uniform or mixed.
[0069] One-dimensional persistence is a persistence index extracted from the topological features corresponding to a one-dimensional homology group, reflecting the evolutionary characteristics of ring structures in the current energy consumption point cloud. Specifically, one-dimensional persistence includes principal component path stability, i.e., the maximum persistence time among all ring structures, as well as the number and distribution characteristics of ring structures. One-dimensional persistence reflects the existence of periodic or cyclical energy flow patterns in energy consumption data: a large one-dimensional persistence indicates stable periodic behavior in the energy consumption data; a small one-dimensional persistence indicates weak or disrupted periodic behavior in the energy consumption data.
[0070] The maximum persistence value, zero-dimensional persistence value, and one-dimensional persistence value are arranged in a predetermined order to form a multi-dimensional vector, namely the vehicle's current energy consumption feature vector. Furthermore, depending on actual needs, other topological indicators can be extracted from the current energy consumption topological barcode, such as topological lifetime (a statistical measure of the lifetime of all topological features, such as mean, variance, median, etc.) and two-dimensional persistence values (reflecting void structure characteristics), collectively forming a higher-dimensional current energy consumption feature vector. The dimension of the current energy consumption feature vector depends on the number of extracted topological indicators, typically set to tens to hundreds of dimensions to fully characterize the topological structure characteristics of the energy consumption data.
[0071] To capture the stable correlation between topological structure and behavioral patterns, a sliding window mechanism is introduced to extract the topological evolution trajectory over different time periods during the construction of the current energy consumption feature vector. Specifically, a fixed time window is slid across the complete time series with a certain step size. The spatial mapping, continuous homology analysis, and feature vector construction processes are repeatedly performed on the data within each window to obtain a series of current energy consumption feature vectors that change over time. By analyzing the changing trends of this series of current energy consumption feature vectors, the magnitude of changes in the topological trajectory and the frequency of abrupt changes can be calculated, thereby characterizing the degree of energy consumption anomalies. For example, when the topological trajectory undergoes drastic changes or the frequency of abrupt changes increases significantly, it indicates that an abnormal abrupt change in the energy consumption state may have occurred. To verify the ability to represent the topological structure, after constructing the current energy consumption feature vector, clustering verification is performed using labeled abnormal samples. Specifically, the current energy consumption feature vectors under normal operating conditions and those under abnormal operating conditions are input into a clustering algorithm (such as K-means clustering or DBSCAN density clustering) to examine whether the two types of feature vectors form obvious segregating clusters in the feature space. If the current energy consumption feature vectors of normal samples and abnormal samples can be clearly separated, it indicates that the extracted topological features have good discriminative ability and can effectively support subsequent energy consumption anomaly detection tasks.
[0072] Furthermore, to facilitate engineering verification and model interpretation, a graph visualization approach is introduced, embedding the current energy consumption topology barcode into a two-dimensional space for visualization. Specifically, each horizontal line in the current energy consumption topology barcode is mapped to a line segment on a two-dimensional plane. Different dimensions of topological features are distinguished by color coding (e.g., zero-dimensional features are represented by blue, one-dimensional features by red, and two-dimensional features by green), and all line segments are sorted and displayed according to their duration of existence. By observing the visualized graph structure, engineers can intuitively determine the topological characteristics of the current energy consumption state, identify any abnormal topological patterns, and thus provide a basis for model debugging and system optimization.
[0073] Step S103: Obtain the vehicle's historical energy consumption feature vector, and calculate the vehicle's energy consumption difference score based on the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector using the optimal transmission algorithm. The historical operating conditions corresponding to the historical energy consumption feature vector are the benchmark operating conditions.
[0074] In this application, the historical energy consumption feature vector of the vehicle is first obtained. Then, optimal transmission calculation is performed on the current energy consumption feature vector and the historical energy consumption feature vector to obtain the optimal mapping matrix between them. Based on the optimal mapping matrix, the transmission distance between the current and historical energy consumption feature vectors is calculated. This transmission distance is defined as the vehicle's energy consumption difference score. The historical operating condition corresponding to the historical energy consumption feature vector is the baseline operating condition.
[0075] Specifically, firstly, the vehicle's historical energy consumption feature vector can be obtained. This historical energy consumption feature vector is a topological structure feature vector extracted from historical normal operating condition samples. Its extraction method is the same as that used in step S102 for extracting the current energy consumption feature vector, i.e., it is obtained through spatial mapping, continuous homology analysis, and topological feature extraction of historical energy consumption data. The historical operating condition corresponding to the historical energy consumption feature vector is the baseline operating condition, which refers to the vehicle's driving condition under normal energy consumption, i.e., the standard operating condition without abnormal increases in energy consumption.
[0076] To improve modeling accuracy, during the acquisition of historical energy consumption feature vectors, historical normal samples were grouped according to dimensions such as terrain type, slope grade, and drive mode to construct multiple reference distributions. Specifically, terrain types include different road surface types such as flat land, hills, mountains, sand, and mud; slope grades include different inclinations such as zero slope, gentle slope, medium slope, and steep slope; and drive modes include different power distribution methods such as two-wheel drive, four-wheel drive, and low-speed four-wheel drive. By cross-grouping historical normal samples according to the above dimensions, dozens or even hundreds of different working condition combinations can be constructed, with each working condition combination corresponding to a set of historical normal samples. Historical energy consumption feature vectors are extracted from each set of historical normal samples to construct multiple reference distributions. The construction of multiple reference distributions allows subsequent optimal transmission calculations to compare energy consumption structures under the same or similar working conditions, avoiding differences in energy consumption benchmarks caused by different working conditions, thereby achieving a more granular comparison of energy consumption structures. The acquisition of historical energy consumption feature vectors was completed using an offline training method. Specifically, a large amount of historical off-road data from real vehicles is used, and various low-speed operating condition scenarios are constructed. For normal driving data in each scenario, the same topological feature extraction process as in step S102 is performed to obtain the corresponding historical energy consumption feature vectors. Simultaneously, each set of historical energy consumption feature vectors is labeled with operating condition labels (including terrain type labels, slope level labels, and drive mode labels) and status labels (normal / abnormal), which are used for constructing positive and negative samples for subsequent modeling training. The historical energy consumption feature vectors and their corresponding operating condition and status labels together constitute the historical energy consumption feature database, serving as a benchmark reference for subsequent optimal transmission calculations.
[0077] After obtaining the historical energy consumption feature vector, optimal transmission calculation is performed on the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector to obtain the optimal mapping matrix between the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector. The optimal transmission calculation is based on optimal transport theory. Its core idea is to represent the vehicle's current energy consumption feature vector as one energy consumption state distribution, denoted as the target distribution, and the vehicle's historical energy consumption feature vector as another energy consumption state distribution, denoted as the source distribution. The goal is to find the mapping path with the minimum transmission cost between the target distribution and the source distribution. Specifically, the optimal transmission calculation includes the following operations:
[0078] The vehicle's current energy consumption feature vector is transformed into a probability distribution, i.e., the target distribution. The target distribution is constructed as follows: the high-dimensional feature space containing the current energy consumption feature vector is divided into several discrete intervals (bins). The frequency of each dimension of the current energy consumption feature vector falling within each interval is counted, and the normalized frequency is used as the probability value of the target distribution in the corresponding interval. Similarly, the vehicle's historical energy consumption feature vector is transformed into a probability distribution, i.e., the source distribution. By transforming the feature vector into a probability distribution, distance metrics in optimal transport theory (such as Wasserstein distance) can be applied to compare energy consumption structures.
[0079] Calculate the cost matrix between the target distribution and the source distribution. Each element in the cost matrix represents the transmission cost between a certain interval in the target distribution and a certain interval in the source distribution. The transmission cost is typically measured using Euclidean distance or Mahalanobis distance. Specifically, for the i-th interval in the target distribution and the j-th interval in the source distribution, the Euclidean distance between the center points of the two intervals is calculated as the transmission cost c(i,j). The cost matrix has a dimension of M×N, where M is the number of intervals in the target distribution and N is the number of intervals in the source distribution. The construction of the cost matrix ensures that the transmission cost corresponds to the geometric distance in the feature space, giving the subsequent optimal mapping physical meaning.
[0080] The optimal mapping matrix is solved using the Sinkhorn iterative optimization mechanism. Sinkhorn iterative optimization is a regularized optimal transport solution method that transforms the classical optimal transport problem into a convex optimization problem solvable efficiently by introducing an entropy regularization term. Specifically, the objective function of Sinkhorn iterative optimization is to minimize the total transport cost between the target and source distributions, while adding a regularization term proportional to the entropy of the mapping matrix. The introduction of the regularization term makes the element distribution in the optimal mapping matrix smoother, avoiding the sparse solution problem that may occur in classical optimal transport, thus improving the physical interpretability and numerical stability of the optimal mapping matrix. The iterative process of Sinkhorn iterative optimization is as follows: First, a uniformly distributed mapping matrix is initialized; then, row normalization and column normalization operations are performed alternately, that is, each row of the mapping matrix is normalized to satisfy the marginal constraints of the target distribution, and each column of the mapping matrix is normalized to satisfy the marginal constraints of the source distribution; this alternating normalization operation is repeated until convergence, yielding the optimal mapping matrix. Sinkhorn iterative optimization converges quickly, typically requiring only a few dozen iterations to achieve high accuracy, thus obtaining a smooth and physically meaningful optimal mapping matrix while ensuring computational efficiency.
[0081] After Sinkhorn iteration optimization, the optimal mapping matrix between the vehicle's current energy consumption feature vector and its historical energy consumption feature vector is obtained. The optimal mapping matrix is an M×N non-negative matrix, where each element represents the optimal transmission amount between the corresponding interval in the target distribution and the corresponding interval in the source distribution. In addition to representing the matching relationship between the two topologies, the optimal mapping matrix also contains structural correspondence information between the target and source distributions, i.e., which structural patterns in the current energy consumption state correspond to which structural patterns in the historical normal energy consumption state, and the corresponding transmission strength.
[0082] After obtaining the optimal mapping matrix, the transmission distance between the vehicle's current energy consumption feature vector and its historical energy consumption feature vector is calculated based on this matrix. The transmission distance is a measure of the structural difference between the current state and the historical normal state. It is calculated as follows: multiply each element of the optimal mapping matrix by the corresponding element in the cost matrix, and then sum all the products to obtain the transmission distance. Mathematically, the transmission distance is equal to the Frobenius dot product of the optimal mapping matrix and the cost matrix, i.e.: Transmission distance = Σ(i,j)P(i,j)×c(i,j), where P(i,j) is the (i,j)th element of the optimal mapping matrix, and c(i,j) is the (i,j)th element of the cost matrix. The dimensions of the transmission distance are consistent with the distance dimensions in the cost matrix, and its magnitude reflects the overall degree of difference between the target distribution and the source distribution.
[0083] The physical meaning of transmission distance is the minimum total cost required to transform the energy consumption state distribution represented by the vehicle's current energy consumption feature vector into the energy consumption state distribution represented by the vehicle's historical energy consumption feature vector. A shorter transmission distance indicates a smaller structural difference between the current energy consumption state and the historical normal energy consumption state, suggesting that the current energy consumption state is relatively normal. Conversely, a longer transmission distance indicates a larger structural difference between the current energy consumption state and the historical normal energy consumption state, suggesting that the current energy consumption state may be abnormal. Therefore, transmission distance, as a measure of structural difference, can effectively quantify the degree of deviation of the current energy consumption state from the historical normal baseline.
[0084] For cases with multiple reference distributions, where the historical energy consumption feature vector contains multiple sets of historical normal samples under different operating conditions, the transmission distance between the vehicle's current energy consumption feature vector and each set of historical energy consumption feature vectors is calculated separately, resulting in multiple transmission distance values. Then, based on the vehicle's actual operating conditions (such as current terrain type, current slope level, and current driving mode), the transmission distance corresponding to the most matching reference distribution set is selected as the final transmission distance, or multiple transmission distance values are weighted and fused (the weights are determined according to the degree of matching of operating conditions) to obtain a comprehensive transmission distance. The introduction of multiple reference distributions allows the calculation of transmission distance to adaptively adapt to different operating conditions, avoiding the misjudgment problem under a single benchmark operating condition.
[0085] After calculating the transmission distance, the transmission distance between the vehicle's current energy consumption feature vector and its historical energy consumption feature vector is determined as the vehicle's energy consumption difference score. The energy consumption difference score is a scalar value equal to the transmission distance, used to directly measure the structural difference between the vehicle's current energy consumption state and its historical normal energy consumption state under baseline conditions. The numerical range of the energy consumption difference score depends on the construction method of the cost matrix and the scale of the feature space. To improve the comparability and interpretability of the energy consumption difference score, the transmission distance can be normalized. Specifically, the ratio of the transmission distance to the target distribution's self-transmission distance (i.e., the transmission distance between the target distribution and itself) is calculated, and this ratio is used as the normalized energy consumption difference score. The normalized energy consumption difference score ranges from [0,1], where 0 indicates that the current energy consumption state is completely consistent with the historical normal energy consumption state, and 1 indicates that the current energy consumption state is completely different from the historical normal energy consumption state. Normalization ensures that the energy consumption difference scores of different vehicles and under different operating conditions have a unified dimension and comparability. The energy consumption difference score, as a measure of the structural difference between the current state and the historical normal state, directly reflects the degree of deviation of the current energy consumption state from the historical normal baseline. In subsequent steps, the energy consumption difference score will serve as one of the important input features, participating in the calculation of the energy consumption anomaly probability along with other features (such as the current energy consumption feature vector and the current energy consumption embedding vector). Specifically, the magnitude of the energy consumption difference score will affect the subsequent fusion classification model's judgment of the degree of anomaly in the current energy consumption state: when the energy consumption difference score is large, it indicates that the current energy consumption state differs significantly from the historical normal state, and the subsequent model will tend to determine that the current state is abnormal; when the energy consumption difference score is small, it indicates that the current energy consumption state is relatively close to the historical normal state, and the subsequent model will tend to determine that the current state is normal.
[0086] Furthermore, energy consumption variance scores can also be used for visualization. Specifically, by plotting the energy consumption variance scores as a curve in chronological order, and observing the fluctuation trend of the curve, the changing patterns of energy consumption status can be intuitively determined. When the curve shows obvious peaks or abrupt changes, it indicates that the energy consumption status at the corresponding moment has changed significantly, and there may be an abnormal event. Visualization provides engineers with an intuitive means of monitoring energy consumption status, facilitating the timely detection and handling of energy consumption anomalies.
[0087] Step S104: Determine the vehicle's current energy consumption embedding vector based on the vehicle's current energy consumption feature vector and the vehicle's energy consumption difference score.
[0088] In this application, the vehicle's current energy consumption feature vector and energy consumption difference score are first input into a pre-trained energy consumption mapping embedding network to obtain the vehicle's first energy consumption embedding vector. Then, the first energy consumption embedding vector is input into a pre-trained energy consumption spherical constraint embedding network to obtain the vehicle's second energy consumption embedding vector. Finally, the vehicle's second energy consumption embedding vector is determined as the vehicle's current energy consumption embedding vector.
[0089] Specifically, firstly, the system receives the current energy consumption feature vector from the vehicle in step S102 and the energy consumption difference score from the vehicle in step S103. The current energy consumption feature vector contains topological structural feature information of the current energy consumption state, and the energy consumption difference score contains structural difference measurement information between the current energy consumption state and the historical normal energy consumption state. The current energy consumption feature vector and the energy consumption difference score are combined to form a topological feature-transmission distance pair, which serves as the input to the energy consumption mapping embedding network. The energy consumption mapping embedding network is a pre-trained neural network whose function is to map the input topological feature-transmission distance pair into a high-dimensional embedding space. The network structure of the energy consumption mapping embedding network is a residual multilayer perceptron. The residual multilayer perceptron alleviates the gradient vanishing problem in deep networks by introducing a skip connection mechanism, thereby improving the training stability and feature transfer efficiency of the network. The energy consumption mapping embedding network contains multiple fully connected layers, each followed by a nonlinear activation function (such as ReLU or LeakyReLU) to learn the nonlinear relationship between input features. Specifically, the current energy consumption feature vector and the energy consumption difference score are concatenated or weighted and fused before being input into the first layer of the energy consumption mapping embedding network. The energy consumption mapping embedding network performs layer-by-layer nonlinear transformations on the input features, with the output of each layer serving as the input to the next, gradually extracting higher-level abstract features through multiple transformations. In the last layer of the energy consumption mapping embedding network, an n-dimensional vector is output, which is the vehicle's first energy consumption embedding vector. This first energy consumption embedding vector is an intermediate representation of the energy consumption state in the embedding space, and its dimension n is typically set to 64, 128, or 256 dimensions, chosen based on actual computing resources and accuracy requirements.
[0090] The training process of the energy consumption mapping embedding network is as follows: Offline training is employed, using a large amount of historical real-vehicle off-road data to construct a training sample set. The training sample set includes normal samples and abnormal samples. Normal samples are derived from low-speed operation data of real off-road vehicles under different terrain, temperature, humidity, and load conditions. Abnormal samples include simulated fault states, tire slippage, inefficient drive, and abnormal electronic control responses. For each training sample, its topological feature vector and optimal transmission distance are extracted and input into the energy consumption mapping embedding network. The first energy consumption embedding vector is obtained through the network's forward propagation. During training, labeled normal and abnormal samples are jointly trained, and the network parameters are updated through a backpropagation algorithm, enabling the first energy consumption embedding vector to effectively distinguish between normal and abnormal states.
[0091] After obtaining the first energy consumption embedding vector of the vehicle, the first energy consumption embedding vector is input into a pre-trained energy consumption spherical constraint embedding network to obtain the second energy consumption embedding vector of the vehicle. The energy consumption spherical constraint embedding network is a subsequent processing module of the energy consumption mapping embedding network. Its core function is to apply spherical constraints to the first energy consumption embedding vector so that the output vector maintains the unit norm and has angular separability in the embedding space.
[0092] The network structure of the energy-constrained spherical embedding network is also based on a residual multilayer perceptron, but L2 constraints and angle regularization terms are added after each layer. L2 constraints normalize the L2 norm of the network output vector, forcing the magnitude of the output vector to be 1, thus projecting the output vector onto a unit sphere. Specifically, for each layer's output vector v of the energy-constrained spherical embedding network, its L2 norm ||v||2 is calculated, and then the output vector is divided by its L2 norm to obtain the normalized vector v. ' =v / ||v||2, the normalized vector v 'The modulus is 1, and it lies on a unit sphere. Angle regularization enhances the angular separation between output vectors by introducing an angle-related penalty term into the loss function. The angle regularization term is calculated as follows: for any two output vectors, the cosine of the angle between them is calculated. When the cosine is close to 1 (i.e., the two vectors are close in direction), a larger penalty is applied; when the cosine is close to 0 or negative (i.e., the two vectors are perpendicular or opposite in direction), a smaller penalty or no penalty is applied. Through the constraint of the angle regularization term, the embedding vectors of normal samples cluster in a stable central region on the sphere, while the embedding vectors of abnormal samples are scattered in the edge regions, thus geometrically forcing a separation in the angular distribution between normal and potentially abnormal states. The training process of the energy-constrained spherical embedding network adopts a joint training strategy. The loss function consists of three parts: Spherical center loss: The spherical center loss ensures that the second energy-constrained embedding vectors of all normal samples cluster within a stable central region on the embedding sphere. Specifically, the centroid positions of the second energy consumption embedding vectors of all normal samples on the sphere are calculated. Then, the spherical distance between the second energy consumption embedding vector of each normal sample and the centroid position is calculated, and the mean or maximum value of the spherical distance is used as the spherical center loss. By minimizing the spherical center loss, the embedding representations of normal samples form a compact cluster structure on the sphere. Abnormal Sample Boundary Spread Loss: The abnormal sample boundary spread loss forces the second energy consumption embedding vectors of abnormal samples to distribute towards the edge of the sphere, thereby forming a stable discrete distribution of abnormal angles. Specifically, the spherical distance between the second energy consumption embedding vector of each abnormal sample and the central region of normal samples is calculated, encouraging the spherical distance to be maximized, so that abnormal samples are as far away from the central region of normal samples as possible. By maximizing the distance between abnormal samples and the central region of normal samples, a clear normal-abnormal boundary is formed on the sphere. Angle Distribution Consistency Loss: The angle distribution consistency loss is used to maintain the consistency of the sample angle distribution between different time points, preventing model drift caused by perturbations. Specifically, the change in the angle between the second energy consumption embedding vectors of adjacent time windows is calculated, and a penalty term is applied when the change in angle exceeds a preset threshold. By constraining the angular distribution consistency loss, we ensure the smooth evolution of energy consumption state over time, avoiding drastic fluctuations in the embedded representation caused by sensor noise or instantaneous disturbances.
[0093] After processing by the energy consumption spherical constraint embedding network, the second energy consumption embedding vector of the vehicle is obtained. The second energy consumption embedding vector is an n-dimensional vector located on a unit sphere, with a magnitude of 1, and its direction represents the position of the current energy consumption state in the embedding space. The second energy consumption embedding vector possesses the following characteristics: unit norm, meaning the magnitude is always 1, eliminating the influence of the vector magnitude on distance metrics; angular separability, meaning that the angular distributions of normal and abnormal samples on the sphere are significantly different; and geometric interpretability, meaning that the angles between vectors directly reflect the similarity between energy consumption states.
[0094] After obtaining the vehicle's second energy consumption embedding vector, this vector is designated as the vehicle's current energy consumption embedding vector. The current energy consumption embedding vector is a direct assignment of the second energy consumption embedding vector; that is, current energy consumption embedding vector = second energy consumption embedding vector. As the final output of this step, the current energy consumption embedding vector is an n-dimensional coordinate vector located on a unit sphere, representing the structured representation of the current energy consumption state in a high-dimensional spherical embedding space. The physical meaning of the current energy consumption embedding vector is that its direction represents the characteristic pattern of the current energy consumption state, and its angular distance from the center region of the sphere represents the degree to which the current energy consumption state deviates from the historical normal energy consumption structure. When the current energy consumption embedding vector is close to the center region of the sphere, it indicates that the current energy consumption state is similar to the historical normal state; when the current energy consumption embedding vector is far from the center region of the sphere and close to the edge of the sphere, it indicates that the current energy consumption state may be abnormal. The current energy consumption embedding vector provides a consistent embedding interface and structural standard for the final multi-model fusion. Specifically, in subsequent steps, the current energy consumption embedding vector will be fused with other features such as the current energy consumption feature vector and energy consumption difference score to jointly participate in the calculation of energy consumption anomaly probability. The introduction of the current energy consumption embedding vector enables the subsequent fusion model to utilize geometric structural information in high-dimensional spherical space, thereby improving the accuracy and robustness of anomaly detection.
[0095] Step S105: Calculate the probability of abnormal energy consumption of the vehicle based on the vehicle's current energy consumption feature vector and the vehicle's current energy consumption embedding vector.
[0096] In this application, an attention mechanism is first used to perform feature co-alignment on the vehicle's current energy consumption feature vector and current energy consumption embedding vector, resulting in a weighted current energy consumption feature vector and a weighted current energy consumption embedding vector. Then, these weighted current energy consumption feature vectors and weighted current energy consumption embedding vectors are input into a pre-trained energy consumption anomaly score determination model to obtain the vehicle's third energy consumption anomaly score. Finally, based on the vehicle's first, second, and third energy consumption anomaly scores, the vehicle's energy consumption anomaly probability is calculated.
[0097] Furthermore, the energy consumption difference score can be combined again. First, an attention mechanism can be used to perform feature co-alignment on the vehicle's current energy consumption feature vector, energy consumption difference score, and current energy consumption embedding vector, resulting in a weighted current energy consumption feature vector, a weighted energy consumption difference score, and a weighted current energy consumption embedding vector. Then, these weighted current energy consumption feature vectors, weighted energy consumption difference scores, and weighted current energy consumption embedding vectors can be input into a pre-trained energy consumption anomaly score determination model to obtain the vehicle's third energy consumption anomaly score. Finally, based on the vehicle's first, second, and third energy consumption anomaly scores, the vehicle's energy consumption anomaly probability can be calculated.
[0098] Specifically, firstly, the system can receive three types of feature inputs from previous steps: the vehicle's current energy consumption feature vector from step S102, the vehicle's energy consumption difference score from step S103, and the vehicle's current energy consumption embedding vector from step S104. These three types of features represent energy consumption state information in different dimensions: the current energy consumption feature vector contains the topological structure feature information of the current energy consumption state, the energy consumption difference score contains the structural difference measurement information between the current energy consumption state and the historical normal state, and the current energy consumption embedding vector contains the geometric position information of the current energy consumption state in a high-dimensional spherical space. Then, an attention mechanism is used to perform feature co-alignment on the vehicle's current energy consumption feature vector, the vehicle's energy consumption difference score, and the vehicle's current energy consumption embedding vector. The purpose of feature co-alignment is to unify the scale and distribution of the outputs of different models, ensure that the three types of features are fused at a unified scale, and learn the weight relationships between various features to dynamically allocate the contribution of each type of feature under different operating conditions.
[0099] Feature co-alignment involves two key steps: normalizing the vehicle's current energy consumption feature vector, energy consumption difference score, and current energy consumption embedding vector to ensure all three feature classes are trained on a uniform scale. Specifically, for the current energy consumption feature vector, the mean and standard deviation of each dimension are calculated, and Z-score normalization is used to transform it into a standard distribution with a mean of 0 and a standard deviation of 1. For the energy consumption difference score, Min-Max normalization is used to map it to the [0, 1] interval. For the current energy consumption embedding vector, since it is already located on a unit sphere and the numerical range of each dimension is relatively uniform, only centering is required. Normalization eliminates the imbalance caused by differences in scale and numerical range among the three feature classes, allowing the subsequent fusion model to treat each feature class fairly. An attention block is used to learn the weight relationships between various features, dynamically allocating the contribution of each feature class under different operating conditions. The core idea of the attention block is to assign an adaptive weight coefficient to each feature class, reflecting the importance and discriminative power of that feature class under the current operating condition. Specifically, the normalized three types of features are concatenated into a fused feature vector, which is then input into the attention module. The attention module contains a fully connected layer and a softmax layer. The fully connected layer performs a non-linear transformation on the fused feature vector to extract the correlation information between features. The softmax layer converts the output of the fully connected layer into three weight values, the sum of which is 1. These three weight values correspond to the weights of the current energy consumption feature vector, the energy consumption difference score, and the current energy consumption embedding vector, respectively.
[0100] The dynamic weight allocation of the attention mechanism is illustrated below: In highly disturbed terrain, due to complex road conditions and high sensor noise, topological features may be strongly affected. Since spherical embedding representations have good robustness through geometric constraints, the attention mechanism may assign higher weights to the current energy consumption embedding vector. In road segments with high path repetition rates, the energy consumption difference score may have high discriminative power because historical structure mapping results can fully utilize historical normal samples on repeated paths. Therefore, the attention mechanism may assign higher weights to the energy consumption difference score. In scenarios where energy consumption patterns change abruptly, topological features can promptly capture the topological changes in energy flow. Therefore, the attention mechanism may assign higher weights to the current energy consumption feature vector. Through dynamic weight allocation, adaptive adjustment of feature contribution is achieved, improving the generalization ability of the fusion model under different operating conditions. After feature co-alignment, the weighted current energy consumption feature vector, the weighted energy consumption difference score, and the weighted current energy consumption embedding vector are obtained. The weighted current energy consumption feature vector is equal to the current energy consumption feature vector multiplied by the corresponding attention weight; the weighted energy consumption difference score is equal to the energy consumption difference score multiplied by the corresponding attention weight; and the weighted current energy consumption embedding vector is equal to the current energy consumption embedding vector multiplied by the corresponding attention weight. The three types of features maintain a uniform numerical scale after weighting, and their respective importance is reflected by the weight coefficients, providing high-quality fusion input for subsequent integrated decision-making.
[0101] After obtaining the weighted current energy consumption feature vector, the weighted energy consumption difference score, and the weighted current energy consumption embedding vector, these three elements are input into a pre-trained energy consumption anomaly score determination model to obtain the vehicle's third energy consumption anomaly score. The energy consumption anomaly score determination model, also known as the Ensemble Decision Network, maps the unified fused vector to a continuous anomaly probability score.
[0102] The network structure of the energy consumption anomaly score determination model consists of two deep residual layers and one sigmoid output layer. The two deep residual layers are responsible for extracting high-level abstract features from the fused vector. Each deep residual layer contains multiple residual blocks, and each residual block consists of two fully connected layers and one skip connection. The skip connection alleviates the gradient vanishing problem in deep networks, improving the model's training efficiency and feature transfer capability. Between the two deep residual layers, Dropout and BatchNorm mechanisms are introduced: Dropout randomly discards some neurons with a certain probability to prevent overfitting; BatchNorm performs batch normalization on the input of each layer, accelerating model convergence and improving generalization ability.
[0103] The Sigmoid output layer is the last layer in the energy consumption anomaly score determination model, responsible for mapping the output of the two-layer deep residual structure to the [0,1] interval. Specifically, the Sigmoid output layer calculates the Sigmoid function value of the input value, i.e., output = 1 / (1 + exp(-x)), where x is the output of the two-layer deep residual structure. The output value of the Sigmoid function ranges from (0,1), and its magnitude reflects the degree of anomaly in the current energy consumption state: when the output value is close to 1, it indicates that the current energy consumption state is highly abnormal; when the output value is close to 0, it indicates that the current energy consumption state is highly normal. The output of the Sigmoid output layer is the vehicle's third energy consumption anomaly score.
[0104] The training process of the energy consumption anomaly score determination model is optimized using the Focal Loss function. The Focal Loss function is an improvement on the standard cross-entropy loss. By introducing a modulation factor, it reduces the loss weight of easily classified samples (i.e., normal samples) while increasing the loss weight of difficult-to-classify samples (i.e., anomaly samples). Specifically, the Focal Loss function is calculated as: FL(pt) = -αt(1-pt)^γlog(pt), where pt is the model's predicted probability for the correct class, αt is the class weight coefficient, and γ is the focusing parameter. Through the optimization of the Focal Loss function, the energy consumption anomaly score determination model focuses on low-frequency but highly harmful high-energy consumption anomaly samples during training, improving the model's ability to identify minority anomaly samples and avoiding model bias caused by an excessive number of normal samples.
[0105] The third energy consumption anomaly score is a continuous value between [0,1], representing the comprehensive anomaly assessment result based on multi-model fusion. Compared with the first energy consumption anomaly score (based on the angular distance of the energy consumption mapping embedded network) and the second energy consumption anomaly score (based on the angular distance of the energy consumption spherical constraint embedded network), the third energy consumption anomaly score integrates three types of information: topological features, historical structure mapping, and high-dimensional spherical embedding, thus exhibiting stronger comprehensive discriminative power and robustness.
[0106] After obtaining the vehicle's third energy consumption anomaly score, the vehicle's energy consumption anomaly probability is calculated based on the vehicle's first, second, and third energy consumption anomaly scores. The energy consumption anomaly probability is the fusion result of the first, second, and third energy consumption anomaly scores, and its calculation method is as follows:
[0107] Linear weighted fusion: The first, second, and third energy consumption anomaly scores are linearly weighted and summed according to predetermined weight coefficients to obtain the energy consumption anomaly probability. Specifically, the energy consumption anomaly probability = w1 × first energy consumption anomaly score + w2 × second energy consumption anomaly score + w3 × third energy consumption anomaly score, where w1, w2, and w3 are weight coefficients, satisfying w1 + w2 + w3 = 1. The weight coefficients can be adjusted according to the actual application scenario: when geometric interpretability needs to be emphasized, the value of w2 can be increased; when comprehensive discriminative power needs to be emphasized, the value of w3 can be increased; when topological sensitivity needs to be emphasized, the value of w1 can be increased. By default, equal weight fusion can be used, i.e., w1 = w2 = w3 = 1 / 3.
[0108] Nonlinear fusion: In addition to linear weighted fusion, nonlinear fusion methods can also be used to calculate the probability of energy consumption anomalies. For example, using a product fusion method: Energy consumption anomaly probability = 1 - (1 - first energy consumption anomaly score) × (1 - second energy consumption anomaly score) × (1 - third energy consumption anomaly score). The characteristic of the product fusion method is that when any one of the energy consumption anomaly scores is high, the probability of energy consumption anomalies will increase significantly, thereby enhancing the model's sensitivity to abnormal states. Another example is the maximum value fusion method: Energy consumption anomaly probability = max(first energy consumption anomaly score, second energy consumption anomaly score, third energy consumption anomaly score). The characteristic of the maximum value fusion method is that the maximum value among the three energy consumption anomaly scores is used as the final judgment criterion, suitable for scenarios with zero tolerance for abnormal states.
[0109] Confidence Interval Assessment: After calculating the probability of energy consumption anomalies, a confidence interval assessment can be performed on this probability. Specifically, based on the magnitude of the probability of energy consumption anomalies, it is divided into three confidence intervals: a high-confidence normal interval (e.g., [0, 0.3]), indicating that the current energy consumption status is highly normal; an uncertain interval (e.g., (0.3, 0.7)), indicating that the current energy consumption status is in a transitional zone between normal and abnormal, requiring further observation or manual confirmation; and a high-confidence anomaly interval (e.g., [0.7, 1]), indicating that the current energy consumption status is highly abnormal, requiring immediate control measures. Confidence interval assessment provides more refined information support for subsequent decision-making.
[0110] The energy consumption anomaly probability, as the core output of this step, provides a quantitative assessment of the abnormal state of the current vehicle's energy consumption behavior in each time window. The energy consumption anomaly probability ranges from [0,1], where 0 represents completely normal and 1 represents completely abnormal. The energy consumption anomaly probability not only reflects the degree of abnormality of the current energy consumption state, but also comprehensively considers three types of information—topological structure features, historical structure mapping, and high-dimensional spherical embedding—by fusing anomaly scores from three different dimensions. This avoids the misjudgment or omission problems that may exist in a single model, and significantly improves the recognition accuracy of low-speed, high-energy-consumption anomalies in complex off-road scenarios.
[0111] Furthermore, based on the above embodiments, the method may further include the following steps:
[0112] First, the first reference embedding vector corresponding to the baseline operating condition in the energy consumption mapping embedding network and the second reference embedding vector corresponding to the baseline operating condition in the energy consumption spherical constraint embedding network can be obtained. Then, the first angular distance between the vehicle's first energy consumption embedding vector and the first reference embedding vector can be calculated, and the vehicle's first energy consumption anomaly score can be determined based on the vehicle's first angular distance. Simultaneously, the second angular distance between the vehicle's second energy consumption embedding vector and the second reference embedding vector can be calculated, and the vehicle's second energy consumption anomaly score can be determined based on the vehicle's second angular distance.
[0113] Obtain the first reference embedding vector corresponding to the reference operating condition in the energy consumption mapping embedding network and the second reference embedding vector corresponding to the reference operating condition in the energy consumption spherical constraint embedding network. The reference operating condition refers to the operating condition corresponding to the historical normal energy consumption state, that is, the reference operating condition in step S103.
[0114] The first baseline embedding vector is obtained as follows: The topological feature vectors of historical normal samples under the baseline operating condition and the optimal transmission distance (which is close to zero under the baseline operating condition) are input into the energy consumption mapping embedding network, and the corresponding embedding vectors are obtained through the forward propagation of the network. Then, the mean or median of the embedding vectors of all historical normal samples under the baseline operating condition is calculated, and the mean or median is used as the first baseline embedding vector. The first baseline embedding vector represents the center position of the normal energy consumption state in the output space of the energy consumption mapping embedding network.
[0115] The second reference embedding vector is obtained as follows: the first reference embedding vector is input into the energy consumption spherical constraint embedding network, and the corresponding spherical embedding vector is obtained through the forward propagation of the network. Since the output of the energy consumption spherical constraint embedding network has a unit norm property, the second reference embedding vector is also located on a unit sphere. The second reference embedding vector represents the center position of the sphere in the output space of the energy consumption spherical constraint embedding network for the normal energy consumption state, that is, the center of the sphere for normal energy consumption behavior.
[0116] After obtaining the first reference embedding vector, the first angular distance between the vehicle's first energy consumption embedding vector and the first reference embedding vector is calculated. The first angular distance refers to the angle between the two vectors and is used to measure the degree of difference in direction between the first energy consumption embedding vector and the first reference embedding vector.
[0117] The first angular distance is calculated as follows: First, calculate the dot product of the first energy consumption embedding vector and the first reference embedding vector, i.e., dot = v1·v b1 Where v1 is the first energy consumption embedding vector, v b1 Let be the first reference embedding vector. Then, calculate the ratio of the dot product to the magnitudes of the two vectors, i.e., cos(θ) = dot / (||v1||2×||v). b1 ||2), the ratio is the cosine of the angle between the two vectors. Finally, the angle is calculated using the inverse cosine function, i.e., θ = arccos(cos(θ)), and the angle θ is the first angular distance. The range of the first angular distance is [0, π], where 0 indicates that the two vectors are in the same direction, and π indicates that the two vectors are in opposite directions.
[0118] After calculating the first angular distance, a first energy consumption anomaly score is determined based on this first angular distance. The first energy consumption anomaly score is a function of the first angular distance and is used to quantify the degree of anomaly in the current energy consumption state relative to the baseline normal state. The first energy consumption anomaly score is calculated as follows: the first angular distance is normalized to the interval [0,1], i.e., score1 = θ / π, where θ is the first angular distance. The value range of the first energy consumption anomaly score is [0,1], where 0 indicates that the current state is completely consistent with the normal state, and 1 indicates that the current state is completely opposite to the normal state. When the first energy consumption anomaly score is large, it indicates that the direction difference between the first energy consumption embedding vector and the first baseline embedding vector is significant, and the current energy consumption state may be abnormal. After obtaining the second baseline embedding vector, a second angular distance is simultaneously calculated between the vehicle's second energy consumption embedding vector and the second baseline embedding vector. The second angular distance refers to the angle between two unit vectors and is used to measure the degree of angular difference between the second energy consumption embedding vector and the second baseline embedding vector on a sphere.
[0119] Since both the second energy consumption embedding vector and the second reference embedding vector lie on a unit sphere and have a magnitude of 1, the calculation of the second angular distance can be simplified. Specifically, the dot product of the second energy consumption embedding vector and the second reference embedding vector can be directly calculated, i.e., dot = v²·v b2 Where v2 is the second energy consumption embedding vector, v b2Let φ be the second reference embedding vector. Since the magnitude of both vectors is 1, the dot product is the cosine of the angle between the two vectors, i.e., cos(φ) = dot. Then, the angle is calculated using the inverse cosine function, i.e., φ = arccos(cos(φ)), and the angle φ is the second angular distance. The range of the second angular distance is [0, π], where 0 indicates that the two vectors have the same direction (both pointing to the center region of the sphere), and π indicates that the two vectors have completely opposite directions.
[0120] After calculating the second angular distance, a second energy consumption anomaly score is determined based on this distance. The second energy consumption anomaly score is a function of the second angular distance and is used to quantify the degree of anomaly in the current energy consumption state relative to the baseline normal state; that is, the energy consumption anomaly angle score. The second energy consumption anomaly score is calculated as follows: the second angular distance is normalized to the interval [0,1], i.e., score2 = φ / π, where φ is the second angular distance. The value range of the second energy consumption anomaly score is [0,1], where 0 indicates that the current state is completely consistent with the normal state, and 1 indicates that the current state is completely opposite to the normal state.
[0121] The second energy consumption anomaly score, serving as a score from the perspective of energy consumption anomalies, is a key criterion for subsequent anomaly classification and visualization. Specifically, a larger second energy consumption anomaly score indicates that the second energy consumption embedding vector is far from the center region of the sphere and close to the edge of the sphere, indicating a significant deviation between the current energy consumption state and the historical normal energy consumption structure. The subsequent model will tend to classify the current state as anomaly. Conversely, a smaller second energy consumption anomaly score indicates that the second energy consumption embedding vector is close to the center region of the sphere, indicating that the current energy consumption state is relatively close to the historical normal energy consumption structure. The subsequent model will tend to classify the current state as normal. The continuous nature of the second energy consumption anomaly score allows it to reflect the gradual process of energy consumption anomalies, rather than a simple binary judgment, thus providing a foundation for subsequent refined anomaly assessment and graded early warning.
[0122] Furthermore, to further enhance the model's generalization ability under unseen anomaly conditions, a random rotation data augmentation mechanism on the sphere is introduced during the training process of the energy consumption spherical constraint embedding network. Specifically, during the training phase, a random spherical rotation operation is performed on the second energy consumption embedding vector, i.e., rotating it around a random axis by a random angle within the spherical space to generate a new synthetic embedding vector. The spherical rotation operation maintains the unit norm property of the vector while changing its direction, thereby simulating potential unseen states within the spherical space. Through this random rotation data augmentation mechanism, the diversity of training samples is expanded, improving the network's ability to identify unknown anomalies, ensuring that the second energy consumption anomaly score maintains high discriminative power even when facing unseen anomaly patterns.
[0123] Furthermore, based on the above embodiments, the method may further include: determining whether the vehicle's energy consumption anomaly probability falls within a preset energy consumption anomaly probability range. If the vehicle's energy consumption anomaly probability does not fall within the preset energy consumption anomaly probability range, then generating an energy consumption anomaly signal to trigger the vehicle's control response.
[0124] Specifically, it determines whether the probability of abnormal energy consumption of a vehicle falls within a preset range. The preset range is a threshold interval for abnormal energy consumption probability, pre-set based on actual application needs and safety standards, used to distinguish between normal, uncertain, and abnormal states.
[0125] The preset energy consumption anomaly probability range is set as follows: Set a lower threshold θ. low and an upper limit threshold θ high Lower threshold θ low Used to distinguish between normal and uncertain states, upper limit threshold θ high Used to distinguish between uncertain and abnormal states. The preset energy consumption abnormality probability range includes three sub-intervals: the normal interval [0, θ] low Uncertain interval (θ) low ,θ high ), and the abnormal interval [θ high ,1]. Lower limit threshold θ low and upper limit threshold θ high The value of θ can be determined based on statistical analysis of historical data. For example, the 95th percentile of the probability of abnormal energy consumption in historical normal samples can be taken as θ. low θ is taken as the 5th percentile of the probability of abnormal energy consumption in historical abnormal samples. high .
[0126] If the vehicle's energy consumption anomaly probability does not fall within the preset energy consumption anomaly probability range, an energy consumption anomaly signal is generated to trigger the vehicle's control response. Specifically, when the energy consumption anomaly probability is within the anomaly interval [θ], an energy consumption anomaly signal is generated. high If the energy consumption anomaly probability falls within the preset range of normal or uncertain intervals, the current energy consumption state is determined to be abnormal, and an energy consumption anomaly signal is generated. The energy consumption anomaly signal is a binary signal (0 or 1). When the energy consumption anomaly probability is within the abnormal interval, the energy consumption anomaly signal is 1 (indicating anomaly); when the energy consumption anomaly probability is within the normal or uncertain interval, the energy consumption anomaly signal is 0 (indicating normal or pending observation).
[0127] The triggering logic for the energy consumption anomaly signal is as follows: when the energy consumption anomaly probability ≥ θ high When θ is triggered, a high-confidence anomaly response is generated, an energy consumption anomaly signal is generated, and corresponding control actions are executed; when θ low <Probability of abnormal energy consumption<θ highWhen the current state is in an uncertain range, no energy consumption anomaly signal is generated, but the energy consumption data for this time window is recorded for subsequent analysis; when the energy consumption anomaly probability ≤ θ low When the current state is normal, no energy consumption anomaly signal is generated, and normal monitoring continues.
[0128] Once an abnormal energy consumption signal is generated, it triggers the vehicle's control response. The control response includes the following actions: First, driver assistance alerts, which issue an abnormal energy consumption warning to the driver via the in-vehicle display or voice prompts, suggesting that the driver adjust their driving behavior or check the vehicle's status; second, drive mode adjustment, which automatically switches the vehicle's drive mode (e.g., from two-wheel drive to four-wheel drive, or from sport mode to economy mode) to adapt to current road conditions and reduce energy consumption; third, background alarm upload, which uploads the abnormality detection log to the cloud-based strategy management platform via the CAN bus for subsequent data analysis and model optimization. The specific execution method of the control response can be flexibly configured according to the severity of the abnormality and the vehicle configuration.
[0129] Furthermore, to enhance the online adaptability of the energy consumption anomaly score determination model, a self-supervised feedback adjustment mechanism was designed in this step. This mechanism monitors the confidence distribution of the model output during vehicle operation. When the probability of energy consumption anomalies remains continuously within an uncertain range (e.g., between 0.4 and 0.6) within a certain time window, and the actual energy consumption of the vehicle significantly deviates from the normal range, the system automatically marks this segment as a potentially uncovered abnormal operating condition and updates the weight allocation strategy of the attention module by embedding features. Simultaneously, it supports uploading such data to the cloud or OTA system for subsequent training, achieving closed-loop iteration of the system. The self-supervised feedback adjustment mechanism ensures that the model can continuously optimize the fusion strategy during deployment, improving system stability and online adaptability.
[0130] In summary, this application provides a method for determining vehicle energy consumption anomalies. First, the method acquires the vehicle's current energy consumption data and performs channel reconstruction to obtain the current energy consumption tensor. This enables the structured integration of multi-source heterogeneous energy consumption data, providing a complete and standardized input foundation for subsequent feature extraction and ensuring the accuracy of subsequent analysis. Then, continuous cohomology analysis is performed on the current energy consumption tensor, and a current energy consumption feature vector is constructed based on the results. This effectively uncovers the inherent topological structure features of energy consumption changes under low-speed conditions, overcoming the limitation of traditional statistical models that can only capture linear correlations. It can accurately characterize the nonlinear coupling relationship between multi-source energy consumption data and adapt to the energy consumption fluctuation characteristics under complex terrain. Next, the historical energy consumption feature vector corresponding to the vehicle's historical operating conditions is obtained as the benchmark operating condition. Based on the current energy consumption feature vector and the historical energy consumption feature vector, the optimal transmission algorithm is used to calculate the vehicle's energy consumption difference score. Using the historical benchmark operating conditions as a reference, accurate quantification of energy consumption structure differences is achieved, avoiding the drawbacks of fixed thresholds being unable to adapt to different operating conditions and reducing the occurrence of misjudgments and omissions. Based on the current energy consumption feature vector and the vehicle's energy consumption difference score, the current energy consumption embedding vector is determined. This maps high-dimensional energy consumption features to a more easily distinguishable space, further enhancing the difference between normal and abnormal energy consumption states and providing more discriminative feature support for subsequent anomaly probability calculation. Finally, the energy consumption anomaly probability is calculated by combining the current energy consumption feature vector, energy consumption difference score, and current energy consumption embedding vector, achieving multi-dimensional feature fusion decision-making and significantly improving the accuracy of energy consumption anomaly identification in complex terrain.
[0131] This application also provides an electronic device in its embodiments. (See reference...) Figure 2 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 2 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0132] like Figure 2 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 202 or a program loaded from a storage device 208 into a random access memory (RAM) 203. When the electronic device is powered on, the RAM 203 also stores various programs and data required for the operation of the electronic device. The processing unit 201, ROM 202, and RAM 203 are interconnected via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0133] Typically, the following devices can be connected to I / O interface 205: input devices 206 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 207 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 208 including, for example, memory cards, hard drives, etc.; and communication devices 209. Communication device 209 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 2 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0134] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the methods for determining abnormal energy consumption of a vehicle provided in this application.
[0135] This application also provides a vehicle, including the electronic equipment provided in this application embodiment.
[0136] This application also provides a computer-readable storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the methods for determining abnormal energy consumption of a vehicle provided in this application.
[0137] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0139] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0140] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method of determining an energy consumption anomaly of a vehicle, characterized in that, include: Obtain the current energy consumption data of the vehicle, and reconstruct the channel of the current energy consumption data of the vehicle to obtain the current energy consumption tensor of the vehicle. A continuous homology analysis is performed on the current energy consumption tensor of the vehicle, and the current energy consumption feature vector of the vehicle is constructed based on the results of the continuous homology analysis. The historical energy consumption feature vector of the vehicle is obtained, and based on the current energy consumption feature vector of the vehicle and the historical energy consumption feature vector of the vehicle, the energy consumption difference score of the vehicle is calculated using the optimal transmission algorithm. The historical operating condition corresponding to the historical energy consumption feature vector is the benchmark operating condition. Based on the vehicle's current energy consumption feature vector and the vehicle's energy consumption difference score, the vehicle's current energy consumption embedding vector is determined. Based on the vehicle's current energy consumption feature vector and the vehicle's current energy consumption embedding vector, the probability of abnormal energy consumption of the vehicle is calculated.
2. The method of determining an energy consumption abnormality of a vehicle according to claim 1, characterized by, The step of performing continuous homology analysis on the vehicle's current energy consumption tensor and constructing the vehicle's current energy consumption feature vector based on the continuous homology analysis results includes: Spatial mapping is performed on the current energy consumption tensor of the vehicle to obtain the current energy consumption point cloud of the vehicle; Continuous coherence analysis is performed on the current energy consumption point cloud of the vehicle to obtain the current energy consumption topology barcode of the vehicle. Based on the maximum persistence value, zero-dimensional persistence value, and one-dimensional persistence value extracted from the current energy consumption topology barcode of the vehicle, the current energy consumption feature vector of the vehicle is constructed.
3. The method of determining an energy consumption anomaly of a vehicle according to claim 1, characterized by, The energy consumption difference score of the vehicle is calculated using an optimal transmission algorithm based on the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector, including: Optimal transmission calculation is performed on the current energy consumption feature vector and the historical energy consumption feature vector of the vehicle to obtain the optimal mapping matrix between the current energy consumption feature vector and the historical energy consumption feature vector of the vehicle. Based on the optimal mapping matrix, the transmission distance between the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector is calculated; The transmission distance between the vehicle's current energy consumption feature vector and the vehicle's historical energy consumption feature vector is determined as the vehicle's energy consumption difference score.
4. The method for determining abnormal energy consumption of a vehicle according to claim 1, characterized in that, The step of determining the vehicle's current energy consumption embedding vector based on the vehicle's current energy consumption feature vector and the vehicle's energy consumption difference score includes: The current energy consumption feature vector of the vehicle and the energy consumption difference score of the vehicle are input into a pre-trained energy consumption mapping embedding network to obtain the first energy consumption embedding vector of the vehicle. The first energy consumption embedding vector of the vehicle is input into a pre-trained energy consumption spherical constraint embedding network to obtain the second energy consumption embedding vector of the vehicle. The second energy consumption embedding vector of the vehicle is determined as the current energy consumption embedding vector of the vehicle.
5. The method for determining abnormal energy consumption of a vehicle according to claim 4, characterized in that, The method further includes: Obtain the first reference embedding vector corresponding to the reference operating condition in the energy consumption mapping embedding network and the second reference embedding vector corresponding to the reference operating condition in the energy consumption spherical constraint embedding network; Calculate the first angular distance between the first energy consumption embedding vector of the vehicle and the first reference embedding vector, and determine the first energy consumption anomaly score of the vehicle based on the first angular distance of the vehicle; Calculate the second angular distance between the vehicle's second energy consumption embedding vector and the second reference embedding vector, and determine the vehicle's second energy consumption anomaly score based on the vehicle's second angular distance.
6. The method for determining abnormal energy consumption of a vehicle according to claim 5, characterized in that, The calculation of the vehicle's energy consumption anomaly probability based on the vehicle's current energy consumption feature vector and the vehicle's current energy consumption embedding vector includes: The current energy consumption feature vector and the current energy consumption embedding vector of the vehicle are co-aligned using an attention mechanism to obtain a weighted current energy consumption feature vector and a weighted current energy consumption embedding vector. The weighted current energy consumption feature vector and the weighted current energy consumption embedding vector are input into the pre-trained energy consumption anomaly score determination model to obtain the third energy consumption anomaly score of the vehicle. The probability of energy consumption anomaly of the vehicle is calculated based on the vehicle's first energy consumption anomaly score, the vehicle's second energy consumption anomaly score, and the vehicle's third energy consumption anomaly score.
7. The method for determining abnormal energy consumption of a vehicle according to claim 6, characterized in that, The method further includes: Determine whether the probability of abnormal energy consumption of the vehicle falls within a preset range of abnormal energy consumption probabilities; If the energy consumption anomaly probability of the vehicle does not fall within the preset energy consumption anomaly probability range, an energy consumption anomaly signal is generated to trigger the control response of the vehicle.
8. A computer program product, characterized in that, Includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the method for determining anomalies in vehicle energy consumption as described in any one of claims 1 to 7.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to enable the electronic device to implement the method for determining vehicle energy consumption anomalies as described in any one of claims 1 to 7.
10. A vehicle, characterized in that, Includes the electronic device as described in claim 9.