Electric vehicle charging identification method and device based on dynamic load event context relation
By constructing a knowledge graph and graph neural network model of dynamic load event context relationship, the problem of high misjudgment rate in electric vehicle charging recognition is solved, and high-precision recognition in complex environments is achieved to adapt to grid fluctuations and interference.
Patent Information
- Application Number
- CN202510613617.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-19
AI Technical Summary
When identifying the charging load of electric vehicles, the error judgment rate is high, making it difficult to adapt to the dynamic changes of the charging mode, and the contextual relationship between different load events is not considered, resulting in low recognition accuracy.
By monitoring the cycle of high-frequency current and voltage, multi-dimensional load characteristics are extracted, a knowledge graph of dynamic load event context relationship is constructed, and a graph neural network model is used for learning, and a graph database storage and graph attention mechanism is used to identify electric vehicle charging events.
In complex electricity use environments, the accuracy of identification of charging events is improved, the misjudgment rate is reduced, the interference of three-phase unbalanced power grids and distributed new energy sources is achieved, and the perception and identification ability of hidden charging loads on the grid side is improved.
Smart Images

Figure CN120508804A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric vehicle charging load monitoring, and in particular to an electric vehicle charging identification method and device based on dynamic load event contextual relationships. Background Art
[0002] With the exponential growth in the number of electric vehicles, the accurate identification of their charging load has become a core technical bottleneck in the construction of smart grids, power dispatch optimization, and demand-side management. For the identification of electric vehicle charging loads, existing technologies generally adopt methods based on threshold detection, simple pattern matching, or time series classification models. The threshold detection method sets specific thresholds for electrical parameters such as current, voltage, and power. When the parameters exceed or fall below the set thresholds, it is judged that an electric vehicle charging event has occurred or ended. The simple pattern matching method utilizes the fact that the electric vehicle charging load has certain pattern characteristics in the time series changes of parameters such as current, voltage, and power. By matching the collected load data with the pre-defined electric vehicle charging pattern, the electric vehicle charging event is identified. The time series classification model method uses a time series classification model such as LSTM (Long Short-Term Memory Network) to model and classify the time series characteristics of the electric vehicle charging load.
[0003] However, in household electricity scenarios, there is significant overlap between periodic high-power appliances such as air conditioners and electric water heaters and electric vehicle charging loads in terms of power amplitude and duration, resulting in a very high misjudgment rate for traditional algorithms based on threshold detection or simple pattern matching. Furthermore, the charging protocols used by different types of electric vehicles may vary, and user charging behavior has significant temporal and spatial randomness (such as slow charging at night, fast charging during the day, plug-and-play charging, etc.). Traditional methods based on time series classification models are difficult to adapt to the dynamic changes in charging patterns. In addition, neither traditional recognition methods based on threshold detection and simple pattern matching, nor traditional recognition methods based on time series classification models, consider the contextual associations between different load events (the relationships between different load events in time, space, and other aspects). For example, complex interactions such as the impact of distributed photovoltaic output fluctuations on charging behavior and the synergistic effects of staggered charging of multiple electric vehicles result in low actual recognition accuracy and are prone to misjudgment. Summary of the Invention
[0004] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides an electric vehicle charging identification method and device based on the dynamic load event context relationship, which has a simple implementation method, low cost, high recognition accuracy and reliability, and strong environmental adaptability. It can effectively improve the accuracy of charging event identification in complex power consumption environments and reduce the misjudgment rate.
[0005] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0006] A method for identifying electric vehicle charging based on dynamic load event context, comprising the following steps:
[0007] Monitor the high-frequency current and voltage cycles of different types of electric vehicle charging loads and different types of electrical equipment during power consumption, extract multi-dimensional load characteristics from the high-frequency current and voltage cycles, extract high-frequency characteristics from the load characteristics to form high-frequency feature vectors, and extract power consumption data with cumulative power reaching a preset value from the high-frequency current and voltage cycles as corresponding power consumption event data, extract low-frequency power parameters from the power consumption event data, and splice the high-frequency feature vectors and the low-frequency power parameters in the same time period to form event characteristics corresponding to each device type;
[0008] A knowledge graph of dynamic load event context relationships is constructed to model the association relationships between different power-consuming devices, and a graph database is used to store the knowledge graph. In the knowledge graph, power consumption events are used as nodes, and relationship edges between nodes are constructed based on the timing relationship, power correlation, and parallel operation status between power consumption events. The attributes of each node include device type, event characteristics, and operating status. The device types include electric vehicle charging loads and different types of electrical equipment.
[0009] The constructed knowledge graph is used to train a graph neural network model, wherein the input of the model is event features, device type, and graph structure information, and the output is a classification result of whether the event is an electric vehicle charging event;
[0010] The event features corresponding to the power consumption event to be tested are extracted and input into the trained graph neural network model. The graph neural network model infers the knowledge graph and identifies whether the power consumption event to be tested is an electric vehicle charging event.
[0011] Furthermore, the low-frequency power parameters include any of the maximum power, minimum power, power change rate, event occurrence time and event duration, and the load characteristics include time domain characteristics, transient characteristics, steady-state characteristics and
[0012] Any multiple of the frequency domain features, the time domain features include any one or more of the mean, variance, kurtosis coefficient and pulse factor, the transient features include the starting current peak ratio and rise time, the steady-state features include the power fluctuation entropy value and dynamic response coefficient within the operating cycle, the dynamic response coefficient is the response characteristic of the charging system to the grid voltage fluctuation according to the power of the charger, the frequency domain features include the FFT spectrum center of gravity offset, the impedance characteristic spectrum of the characteristic frequency band, the odd harmonic THD-I index and the harmonic characteristics.
[0013] Furthermore, extracting the power consumption data when the cumulative power reaches a preset value as the corresponding power consumption event data includes:
[0014] Calculate the low-frequency power value of the high-frequency cyclic current and voltage once at a specified interval, and store the calculated power value in a buffer;
[0015] Calculate the current active power cumulative sum and reactive power cumulative sum respectively according to the stored data in the buffer;
[0016] If the current active power accumulation sum is greater than the preset active power threshold and the current reactive power accumulation sum is greater than the preset reactive power threshold, it is determined that there is a power consumption event, and the power consumption data between the start time of the current round and the current time is extracted as the power consumption event data.
[0017] Furthermore, the timing relationship is used to indicate the order in which events occur, the power correlation is used to indicate the power fluctuation trend between different events, and the parallel operation status is used to indicate whether different devices are running simultaneously;
[0018] When constructing the relationship edge of the temporal relationship in the knowledge graph, the weight w of the temporal relationship between the power consumption events is defined as follows: AB :
[0019]
[0020] Among them, α is a positive constant used to adjust the speed of change of weight with time interval, and Δt represents the time interval between different electricity consumption events;
[0021] When constructing the power correlation edge in the knowledge graph, the power correlation between the power devices is represented by the correlation coefficient between the power data of the power devices;
[0022] When constructing the relationship edge of concurrent relations in the knowledge graph, the strength s of the concurrent relations is defined as follows: AB :
[0023]
[0024] in, Respectively represent the start time of electricity consumption of two different devices, Respectively represent the end time of power consumption of two different devices.
[0025] Furthermore, it also includes updating the attribute information of the corresponding node or the attribute information of the relationship edge in the knowledge graph when the operating status or event attributes of the node in the constructed knowledge graph change, and the event attributes include occurrence time and power data; when a new power consumption event is detected, the knowledge graph is updated according to the equipment type, event characteristics and operating status of the new power consumption event, and each relationship edge is updated according to the timing relationship, power correlation and concurrency relationship between the new power consumption event and other power consumption events.
[0026] Furthermore, in the graph neural network model, the event features and device types of each event node in the knowledge graph are spliced to form a node feature vector for input feature embedding. When edge feature embedding is performed, the initial weight value of each relationship edge is generated according to the relationship type between the power consumption events; multiple attention heads are used to calculate the attention coefficient of each node in the knowledge graph to its neighbors, and a multi-head attention mechanism is used to splice the outputs of multiple attention heads and perform nonlinear transformation to obtain a fusion output result; when using the constructed knowledge graph to train the graph neural network model, a multi-task learning architecture is adopted, and the main task is configured to classify whether it is an electric vehicle charging event, and the auxiliary task is to classify the interference The devices are classified, and the auxiliary tasks of the graph neural network model are trained using a pre-built interference event feature library to obtain an interference detection GNN model. In the process of training the auxiliary tasks of the graph neural network model, an interference-aware graph attention mechanism is adopted, and the attention weight of the graph attention network is set according to the device type. If the correlation between two target nodes is lower than a preset correlation value and one of the nodes is an interference device, the attention weight between the two target nodes is reduced. The features in the interference event feature library include any one or more of the steady-state power baseline, transient power spike, power periodicity, daily cycle activity and whether there is a concurrent relationship with other power consumption events of the interference device.
[0027] Furthermore, the attention weight of node i to node j is calculated as follows:
[0028]
[0029] Among them, ρ0 represents the preset correlation value, M ij represents the interference mask matrix, W q 、W k Represent the learnable weight matrices, hi, h j Represent the feature vectors of nodes i and j respectively, and d usually represents the dimension of the feature vector.
[0030] Furthermore, the graph neural network model reasoning on the knowledge graph to identify whether the power usage event to be tested is an electric vehicle charging event includes:
[0031] Pre-establish multiple corresponding judgment rules for determining whether an event is an electric vehicle charging event based on the timing relationship, power correlation, and dependency relationship between devices of each node in the knowledge graph, and calculate the confidence level of the rule judgment results. The judgment rules include whether the actual total power is greater than the line capacity;
[0032] The confidence of each judgment rule is weighted and aggregated into the total rule confidence. The final classification coverage is calculated using the total rule confidence and the output probability of the graph neural network model to determine whether the current power consumption event to be tested is an electric vehicle charging event. If the non-charging event rule is triggered, it is judged as a non-charging event and the corresponding event features are added to the interference feature database.
[0033] Furthermore, after training the graph neural network model, the model is optimized using a layered adaptive optimization mechanism, including the following steps:
[0034] Calculate new event V new The similarity with historical charging events is used to obtain the node-level similarity value;
[0035] Extract the k-hop subgraph centered on the new event V_new and calculate the similarity between the k-hop subgraph and the historical charging subgraph to obtain the subgraph-level similarity value;
[0036] If both the node-level similarity value and the subgraph-level similarity value exceed the preset threshold, then the current new event V new Generate pseudo labels, that is, mark them as charging events.
[0037] An electric vehicle charging identification device based on dynamic load event context includes a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.
[0038] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed by a processor.
[0039] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention constructs a knowledge graph of dynamic load event contextual relationships, takes power consumption events as nodes, and constructs relationship edges according to the timing relationship, power correlation and parallel operation status between power consumption events. It can dynamically contextualize the association relationship between different power-consuming devices, and learn the knowledge graph in combination with the graph neural network model. It can deeply integrate the charging characteristics of electric vehicles and user behavior patterns, and capture the dynamic changes of different load events and the association relationship between each load in real time. It can not only accurately identify charging load signals in complex environments, but also be compatible with the characteristics of three-phase unbalanced power grids, effectively deal with the interference of power grid fluctuations on charging identification after the access of distributed new energy, and greatly improve the grid side's perception and identification capabilities of implicit charging loads, thereby improving the identification accuracy and reliability of electric vehicle charging loads in complex application environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is a schematic diagram of the implementation flow of the electric vehicle charging identification method based on the dynamic load event context relationship of this embodiment.
[0041] Figure 2 Schematic diagram of the electric vehicle charging power curve obtained in a specific application embodiment.
[0042] Figure 3 3200 Hz sampling frequency obtained in a specific application embodiment. DETAILED DESCRIPTION
[0043] The present invention will be further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the scope of protection of the present invention is not limited thereby.
[0044] The current electricity consumption environment in homes, commercial buildings, and charging station microgrids is becoming increasingly complex. When multiple electric vehicles are charging simultaneously, their charging signals are susceptible to high-density interference devices, resulting in signal blur and high misjudgment rates. Furthermore, the unbalanced three-phase power grid and the integration of distributed renewable energy sources further complicate identification, making it difficult to accurately perceive hidden charging loads. Different load events are interrelated in time and space. Therefore, considering the contextual correlation between load events can more accurately identify EV charging loads.
[0045] The present invention uses electricity consumption events as nodes, constructs relationship edges based on the timing relationship, power correlation and parallel operation status between electricity consumption events, constructs a knowledge graph that forms the contextual relationship of dynamic load events, performs dynamic context modeling on the association relationship between different electricity-consuming devices, and combines the graph neural network model to learn the knowledge graph. It can deeply integrate the charging characteristics of electric vehicles and user behavior patterns to construct a multi-dimensional dynamic context model. The model can capture the dynamic changes of different load events in real time and explore the association relationship between each load. It can not only accurately identify charging load signals in complex environments where multiple electric vehicles are charging in parallel and high-density interference equipment coexist, but also be compatible with the characteristics of three-phase unbalanced power grids, effectively cope with the interference of power grid fluctuations on charging identification after the access of distributed new energy, and greatly improve the grid side's perception and identification capabilities of implicit charging loads, thereby realizing accurate monitoring of electric vehicle charging loads in complex application environments, which is conducive to promoting the development of power load monitoring technology towards intelligence and refinement.
[0046] like Figure 1 As shown, the steps of the electric vehicle charging identification method based on the dynamic load event context in this embodiment include:
[0047] Step S01. Monitor the high-frequency current and voltage cycles of different types of electric vehicle charging loads and different types of electrical equipment during power consumption, extract multi-dimensional load characteristics from the high-frequency current and voltage cycles, extract high-frequency characteristics in the load characteristics to form high-frequency feature vectors, and extract power consumption data with cumulative power reaching a preset value from the high-frequency current and voltage cycles as corresponding power consumption event data, extract low-frequency power parameters from the power consumption event data, and splice the high-frequency feature vectors and low-frequency power parameters of the same time period to form event characteristics corresponding to each device type.
[0048] In this embodiment, the user's voltage and current data are synchronously collected through high-frequency data acquisition equipment (such as smart meters, non-invasive load monitoring equipment, etc.), with a sampling frequency of not less than 3200Hz to ensure the integrity of the charging load characteristics. Multi-dimensional load feature extraction is performed on the collected high-frequency current and voltage cycles. The load features include time domain features, transient features, steady-state features, and frequency domain features. The specific feature types can be configured according to actual needs. Among them, the time domain features include mean, variance, kurtosis coefficient, and pulse factor. The mean and variance can reflect the average power level and fluctuation degree of the charging load. Electric vehicle charging has a stable power plateau period, which is significantly different from periodic loads such as air conditioners. In turn, it is possible to distinguish electric vehicle charging events from periodic loads. The kurtosis coefficient is used to characterize the peak characteristics of the power signal. The change in SOC during the charging process will cause the kurtosis value to show a specific change trend. The pulse factor is used to detect short-term impact loads and can effectively distinguish between fast charging and slow charging modes.
[0049] In a specific application embodiment, the kurtosis coefficient can be calculated according to the formula The pulse factor can be calculated according to the formula Calculated, where E represents the expectation of the random variable It, μ represents the mean, and σ represents the standard deviation.
[0050] Specifically, transient characteristics include the starting current peak ratio Rise time t r =t 0.9 I peak -t 0.1 I peak etc., among which I peak Indicates the peak current, I rated Indicates rated current, t 0.9 I peak Indicates the moment when the current is 90% of the peak current, t 0.1 I peak Indicates the moment when the current reaches 10% of its peak current. Electric vehicles typically experience a brief current spike (typically about 1.2-1.5 times the rated current) during initial charging. This characteristic differs significantly from the startup characteristics of inductive loads such as air conditioners, making it useful for distinguishing between EV charging and inductive loads. The transient current rise time reflects the time required for the current to rise from 10% to 90% of its peak value. For example, the rise time for fast-charging devices is typically less than 100ms, while for slow-charging devices it can exceed 300ms.
[0051] Specifically, the steady-state characteristics include the power fluctuation entropy value and the dynamic response coefficient within the operation cycle. The calculation expression of the power fluctuation entropy value is: in The dynamic response coefficient is a measure of the charging system's response to grid voltage fluctuations based on the charger's power. Calculated as , where P represents active power and V represents voltage. The power fluctuation entropy quantifies the complexity of power fluctuations during steady-state operation. During charging, the entropy decreases in a step-like manner as the SOC increases. The dynamic response coefficient reflects the charging system's response to grid voltage fluctuations and is directly related to the charger's power regulation strategy.
[0052] Specifically, the frequency domain features include the FFT spectrum center of gravity offset, the impedance characteristic spectrum of the characteristic frequency band, the odd harmonic THD-I index, and the harmonic characteristics. The calculation expression of the FFT center of gravity offset is:
[0053]
[0054] Among them, fk represents the frequency value of the kth frequency component, X(f k) represents the spectral component of the signal at frequency fk, |X(f k )| represents X(f k ) model.
[0055] The expression of the impedance characteristic in the characteristic frequency band (375Hz / 750Hz) is:
[0056]
[0057] Wherein, V(f) and I(f) represent the voltage and current at frequency band f, respectively.
[0058] The calculation expression of odd harmonic THD-I index is:
[0059]
[0060] Where Ih represents the amplitude of each harmonic (1, 3, 5, ..., H) in the current signal, and I1 represents the fundamental current.
[0061] The spectral center of the charging load is typically concentrated in the 100-300Hz range, significantly different from the spectral distribution of other household appliances, making it possible to distinguish EV charging loads from household appliances. Switching power supply chargers produce characteristic impedance peaks at multiple frequencies (e.g., 375Hz = 3 x 125Hz), which can be used to identify the type of charging device.
[0062] This embodiment extracts the above-mentioned multi-dimensional load features to form a high-frequency feature vector, which can fully explore the signal feature differences between the electric vehicle charging load and other electrical equipment from various dimensions, so that the electric vehicle charging load and other electrical equipment can be accurately distinguished based on the multi-dimensional features.
[0063] To accurately identify device types, this embodiment also uses smart meters to collect device electricity usage data. This data includes information such as power, current, and voltage during device operation. Low-frequency power parameters are then extracted, including maximum power, minimum power, power change rate, event occurrence time, and event duration. Different types of devices have unique power curves during operation. For example, during the charging process of an electric vehicle charging station, the power typically remains relatively stable and high for a period of time. Meanwhile, an air conditioner experiences a large power peak upon startup, followed by slow fluctuations as the indoor temperature is adjusted.
[0064] In order to extract low-frequency power parameters, this embodiment first extracts power consumption events. When an appliance starts, its electromagnetic conversion process will cause significant changes in reactive power. At the moment the appliance starts, the stator winding of the motor needs to establish a rotating magnetic field. This process requires a large amount of reactive current to support it, causing a sharp increase in reactive power. The charging power of the electric vehicle obtained in the specific application embodiment is as follows: Figure 2 As shown, the current and voltage images at 3200Hz sampling frequency (where the blue line is voltage and the yellow line is current) are as follows Figure 3 This example utilizes the significant characteristics of reactive power when some electrical appliances are started, identifies and extracts key events in electrical appliance operation through comprehensive determination of reactive power and active power.
[0065] In this embodiment, the electricity consumption data in which the accumulated power reaches a preset value is extracted as the electricity consumption event data. The specific steps include:
[0066] Step S101. Calculate the low-frequency power value of the high-frequency cyclic current and voltage once at a specified interval, and store the calculated power value in a buffer;
[0067] Step S102. Calculate the current active power cumulative sum and reactive power cumulative sum respectively according to the stored data in the buffer;
[0068] Step S103: If the current active power accumulation sum is greater than the preset active power threshold and the current reactive power accumulation sum is greater than the preset reactive power threshold, it is determined that there is a power consumption event, and the power consumption data between the start time of the current round and the current time is extracted as the power consumption event data.
[0069] The following takes the implementation of an event extraction in a specific application embodiment as an example, and the detailed steps are as follows:
[0070] Buffer design: Initialize a ring buffer with a length of 300s (configurable) (300 points in total), each of which stores an element consisting of an active power value and a reactive power value.
[0071] Buffer filling: Calculate the low-frequency power value of the high-frequency cyclic current and voltage once every 1s (configurable), and fill the power value calculated in this time step into the buffer.
[0072] Comprehensive active and reactive event judgment: Assume that the active power array is P = [P0, P1, P2, ...., P n ], the reactive power array is Q=[Q0,Q1,Q2,.....,Q n ], where n represents the number of array elements, P i Indicates the active power value at the i-th moment, Q iRepresents the reactive power value at the i-th moment. Subtract the initial value from the active power and reactive power arrays, that is, use P i -P0 and Q i -Q0 represents the power value after processing.
[0073] Define the active power accumulation sum and reactive power accumulation sum. For the active power accumulation sum S P(i) With the reactive power accumulation S Q(i) , the cumulative sum calculation formula is as follows:
[0074]
[0075] If there is a position m (1 <= m <= n) that satisfies the following two conditions, then the mth position and the 0th position are considered to constitute an event:
[0076]
[0077] Among them, P0 and P1 are preset thresholds set corresponding to the active power cumulative sum and the reactive power cumulative sum, respectively.
[0078] After extracting the electrical appliance events, the low-frequency key characteristic parameters are extracted from the electrical appliance event sequence, namely the low-frequency power parameters, including the maximum power value, minimum power value and power change rate. The specific calculation expression is:
[0079]
[0080] P max =max t∈[0,T] P(z) (8)
[0081] P min =min t∈[0,T] P(t) (9)
[0082]
[0083] Where P(t) represents the power of the device at time t, and T represents the observation time period.
[0084] After extracting the low-frequency power parameters, they are combined with the high-frequency cyclic current and voltage features within the time period. For example, the combination can be as follows: the original high-frequency signal is P(t), the sampling frequency is 3200 Hz, that is, 3200 data points are collected per second, and the high-frequency features involved in load feature extraction are calculated every 0.02 seconds, that is, 50 high-frequency feature vectors can be obtained in 1 second. A window with a window length of 1 second and a step length of 1 second is slid along the time dimension, and the feature data within each window is averaged to obtain a downsampled feature sequence, that is, one feature vector is obtained every 1 second. The high-frequency feature vectors and low-frequency power features after downsampling in the same time period are then concatenated in the feature dimension to obtain a "high- and low-frequency combined feature vector" for subsequent machine learning model training.
[0085] In this embodiment, to construct a knowledge graph, the extracted high- and low-frequency combined feature vectors are used to train a machine learning model (e.g., Xgboost). The trained model can be used to roughly classify different types of electrical equipment, thereby accurately determining the type of equipment based on the input device data, and distinguishing periodic high-power appliances such as air conditioners and electric water heaters from electric vehicle charging loads. Specifically, the extracted event features can be used as model input, and the output is a specific appliance type (0 represents other appliances, 1 represents electric vehicles, 2 represents water heaters, 3 represents electric kettles, 4 represents electric heaters, etc.). The results of this rough classification are then incorporated into the knowledge graph, ultimately constructing a knowledge graph with each load event as a node.
[0086] Preferably, when collecting high-frequency current and voltage cycles, the CEEMDAN algorithm is also used for noise reduction processing. The collected voltage and current signals are first decomposed using the CEEMDAN algorithm to obtain multiple intrinsic mode functions (IMFs); the first three high-frequency IMF components (mainly containing noise components) are selected and denoised using wavelet thresholding; the denoised high-frequency IMF and the remaining low-frequency IMF are reconstructed to obtain a denoised load signal.
[0087] CEEMDAN is an adaptive signal decomposition method that is improved based on EEMD (Ensemble Empirical Mode Decomposition) and can effectively solve the problem of modal aliasing. The detailed steps of using the CEEMDAN algorithm for noise reduction in this embodiment include:
[0088] 1. Initialization. Set the total number of ensemble averages N and the standard deviation of the added white noise σ.
[0089] 2. Perform the first decomposition of EEMD. For the i-th ensemble average (i=1,2,…,N), add white noise to the original signal x(t) to obtain the noisy signal X i(t) = x t +σn i (t). i (t) Perform EMD (Empirical Mode Decomposition) decomposition to obtain the first intrinsic mode function IMF 1i (t). Calculate IMF 1i (t) all average values to obtain the first intrinsic mode function IMF1(t). The first residual signal r1(t) = x(t) - IMF1(t) is calculated.
[0090] 3. Decomposition of subsequent IMFs. For the kth IMF (k = 2, 3, ...), the residual signal r k-1 (t) is added with the white noise of the first IMF component obtained after EMD decomposition ∈ k-1 E1(n i (t))(where ∈ k-1 is the adaptive coefficient, E1 represents the operation of performing the first EMD decomposition of the signal to obtain the first IMF component, and the noisy residual signal r is obtained. k-1,i (t) = r k-1 (t)+∈ k-1 E1(n i (t))). k-1,i (t) Perform EMD decomposition to obtain the i-th ensemble mean component IMF of the k-th IMF ki (t). Calculate all IMF ki The average value of (t) is used to obtain the kth natural mode number: Calculate the kth residual signal. k (t) = r k-1 (t)-IMF k (t)
[0091] Repeat the above steps until the residual signal r k (t) becomes a monotonic function. Finally, the original signal x(t) can be expressed as:
[0092] Where K is the number of IMFs, r K (t) is the final residual signal.
[0093] 4. Select high-frequency IMF components. From the multiple IMFs obtained by decomposition, select the first three IMF components IMF1(t),
[0094] IMF2(t), IMF3(t) because they mainly contain noise components.
[0095] 5. Wavelet threshold denoising. For each selected high frequency IMF component IMF j(t)(j=1,2,3) performs wavelet transform to obtain the wavelet coefficient W j (m,n). In the present invention, the custom wavelet threshold function is:
[0096]
[0097] Where λ is a threshold value. In the present invention, σ is the standard deviation of signal noise, and N is the signal length.
[0098] The denoised high-frequency IMF component IMF 1* (t), IMF 2* (t), IMF 3x (t) and the remaining low-frequency IMF components IMF4(t), IMF5(t)…, IMF k (t) and the residual signal r K (t) is reconstructed to obtain the load signal X after noise reduction * (t).
[0099] The traditional CEEMDAN algorithm adds Gaussian white noise with a fixed standard deviation (σ is a preset constant) in each order of decomposition, and the noise is directly superimposed on the residual signal, which may cause noise residue. This embodiment uses the above-mentioned CEEMDAN algorithm to perform noise reduction processing, and introduces an adaptive coefficient (∈ k-1 ) Adjusting the noise intensity according to the dynamic characteristics of the current residual signal can avoid excessive interference of fixed noise on the signal structure. The noise source comes from the IMF component of EMD decomposition in the previous stage rather than pure Gaussian white noise, which makes it more consistent with the noise distribution characteristics of the signal itself; at the same time, the noise is weighted by the IMF component after EMD decomposition, and the local characteristics of IMF are used to enhance the matching of noise and signal, and the invalid noise component can also be reduced. The adaptive segmented threshold function is used to determine the wavelet threshold, which can also improve environmental adaptability and robustness.
[0100] Step S02. Construct a knowledge graph of dynamic load event context relationships to model the association relationships between different electrical devices, and use a graph database to store the knowledge graph; in the knowledge graph, electrical events are used as nodes, and relationship edges between nodes are constructed based on the timing relationship, power correlation, and parallel operation status between electrical events. The attributes of each node include device type, event characteristics, and operating status. Device types include electric vehicle charging loads and different types of electrical equipment.
[0101] In a household electricity environment, there are a large number of various electrical devices with complex operating conditions, and there are intricate relationships between the devices. This embodiment can clearly and accurately model the relationships between different electrical devices by constructing a dynamic load event contextual relationship knowledge graph. In the process of constructing the knowledge graph, load events (Event) are used as nodes in the knowledge graph. The attributes of each node include: device type, event characteristics and operating status (on / off). Device types include electric vehicle charging piles and electrical equipment such as air conditioners and water heaters. Event characteristics include load characteristics and low-frequency power characteristics such as power changes, timestamps, and duration. Relation edges are used to describe the relationships between nodes. This embodiment constructs three types of relationship edges: temporal relations, power correlations, and concurrent relations. Temporal relations (Temporal Relation) represent the order in which events occur, power correlations (Power Relation) represent the power fluctuation trend between different events, and concurrent relations (Concurrent Relation): are used to model the situation where multiple devices are running at the same time.
[0102] Specifically, the temporal relationship represents the order in which events occur. When constructing the temporal relationship, the timestamps of the load events need to be sorted first. In order to quantify the strength of the temporal relationship between events, this embodiment introduces the weight of the time interval. Suppose the end time of event A is Event B starts at Then the time interval Δt between them is: The shorter the time interval, the stronger the strength of the temporal relationship, and the longer the time interval, the weaker the strength of the temporal relationship.
[0103] For example, when constructing the relationship edge of the temporal relationship in the knowledge graph, the weight w of the temporal relationship between electricity consumption events can be defined as follows: AB :
[0104]
[0105] Wherein, α is a positive constant used to adjust the speed at which the weight changes with the time interval. Preferably, α=0.6, and Δt represents the time interval between different power consumption events.
[0106] Power correlation indicates the power fluctuation trend between different events. In this embodiment, when constructing the power correlation edge in the knowledge graph, the correlation coefficient between the power data of the electrical devices is used to represent the power correlation between the electrical devices.
[0107] Specifically, to analyze power correlation, when processing and analyzing the power data within the event time of each device, the power data is first smoothed to remove the influence of noise and outliers. Specifically, the moving average method can be used for smoothing. Let the original power data be P(t) and the size of the moving average window be N. The smoothed power data P(t) can be calculated using the following formula:
[0108]
[0109] Then, the correlation coefficient between the power data of different devices is calculated. For example, the Pearson correlation coefficient r can be used, and its calculation formula is:
[0110]
[0111] Here, P1(t) and P2(t) represent the power of the two devices at time t, respectively, and T represents the event length. The correlation coefficient ranges from -1 to 1. A value closer to 1 indicates a more similar power fluctuation trend between the two devices; a value closer to 0 indicates a less correlated power fluctuation trend between the two devices.
[0112] Concurrency is used to model the situation where multiple devices are running at the same time. In this embodiment, in order to determine whether two devices are running at the same time, the running time intervals of the two devices are compared. Suppose the running time interval of device A is The operating time interval of device B is Then the overlapping length L of their time intervals can be calculated by the following formula:
[0113]
[0114] If L>0, it means that the two devices are running concurrently.
[0115] For example, when constructing the relationship edge of a concurrent relationship in a knowledge graph, the strength s of the concurrent relationship can be defined as follows: AB :
[0116]
[0117] in, Respectively represent the start time of electricity consumption of two different devices, The values of the concurrency relationship strength range from 0 to 1. A larger value indicates a higher degree of concurrent operation of the two devices.
[0118] Furthermore, after constructing the knowledge graph, a dynamic update step of the knowledge graph is also included. Whenever the attributes of a node or a relationship edge in the knowledge graph change, the attributes of the corresponding node and the relationship edge are updated. When a new load event occurs, the nodes and edges are dynamically updated to maintain the timeliness of the graph. Among them, when the operating status of a node or the event attribute in the constructed knowledge graph changes, the attribute information of the corresponding node or the relationship edge in the knowledge graph is updated. The event attributes include the time of occurrence and power data. When a new power consumption event is detected, the knowledge graph is updated according to the device type, event characteristics and operating status of the new power consumption event, and each relationship edge is updated according to the timing relationship, power correlation and concurrency relationship between the new power consumption event and other power consumption events. A graph database is used to store the knowledge graph, and real-time updates are supported. Whenever a new load event occurs, the nodes and edges are dynamically updated to maintain the timeliness of the graph. In order to ensure that the knowledge graph can reflect the association relationship between household electrical appliances in real time, the present invention uses a graph database to store the knowledge graph and supports real-time updates.
[0119] Specifically, when a new load event is detected, a new node is created and added to the knowledge graph according to the method of event node construction. At the same time, the attribute information of the node is updated, such as device type, event characteristics, and operating status. If the operating status of the device corresponding to an existing node changes, such as from an on state to an off state, or the power changes significantly, the attribute information of the node needs to be updated. For newly occurring load events, the timing relationship, power correlation, and concurrency relationship between the event and other events are calculated according to the method of relationship edge construction, and the corresponding relationship edges are updated. If the event attributes corresponding to an existing relationship edge change, such as timestamp, power data, etc., the weight or strength of the relationship edge needs to be recalculated, and the attribute information of the edge needs to be updated.
[0120] Step S03. Use the constructed knowledge graph to train the graph neural network model, where the input of the model is event features, device type, and graph structure information, and the output is the classification result of whether it is an electric vehicle charging event.
[0121] The Graph Attention Network (GAT) is used to capture the importance relationships between different load events. This embodiment builds a knowledge graph and combines it with a graph neural network model for learning and reasoning, forming a graph neural network (GNN)-based event dynamic reasoning method. This method integrates the contextual relationships of the knowledge graph with dynamic event features to achieve high-precision recognition of electric vehicle charging events.
[0122] In the graph neural network model of this embodiment, the event features and device types of each event node in the knowledge graph are spliced to form a node feature vector for input feature embedding. When edge feature embedding is performed, the initial weight value of each relationship edge is generated according to the relationship type between power consumption events; multiple attention heads are used to calculate the attention coefficient of each node in the knowledge graph to its neighbors, and a multi-head attention mechanism is used to splice the outputs of multiple attention heads and perform a nonlinear transformation to obtain a fused output result. Traditional GNNs (such as GCNs) aggregate neighbor node information with equal weights, making it difficult to capture the complex correlations between dynamic load events. The present invention dynamically learns the importance weights between nodes through an attention mechanism, which is particularly suitable for knowledge graph scenarios where timing, power fluctuations, and concurrency relationships coexist.
[0123] Specifically, the input feature embedding of the graph neural network model includes:
[0124] Node feature vector: Normalize the feature vector (including low-frequency power features and high-frequency current and voltage features), time features (timestamp, duration, cycle mode) and device type (One-Hot encoding) of each event node in the knowledge graph and splice them into a high-dimensional feature vector h i ∈R d Each event node h i The input feature vector h i It is obtained by concatenating and normalizing the following four types of features:
[0125] h i =Concat(f low ,f high ,f time ,f device )∈R d
[0126] Edge feature embedding: Generate the initial value of edge weight according to the relationship type (time series, power, concurrency). The time series relationship is calculated by the decay factor of the time interval, and the power relationship is modeled by the covariance matrix. Each edge e ij The initial weight r ij Dynamically generated based on the relationship type.
[0127] For example, the time decay factor can be calculated as follows to represent the timing relationship:
[0128]
[0129] Among them, γ is a learnable parameter, t i , t j Respectively represent the time of two event nodes.
[0130] The covariance correlation is calculated as follows to represent the power relationship:
[0131]
[0132] Among them, P i ,P j Represent the power of the two event nodes respectively.
[0133] For concurrent relations, binary markings can be used, where if there is overlap in event time, it is marked as 1, and if there is no overlap, it is marked as 0.
[0134] In this embodiment, based on the graph neural network model, a single-head attention mechanism is used to calculate the attention coefficient between adjacent nodes, where for the Kth attention head, the node v is calculated. i To the neighbor v j Attention coefficient:
[0135]
[0136] Among them, W k ∈R d*d' is the learnable feature transformation matrix. k ∈R 2d’+1 is the attention parameter vector, and “||” is the concatenation operation to fuse node features with edge features.
[0137] We further adopt the multi-head fusion output method, and based on the multi-head attention mechanism, we splice the outputs of K attention heads and perform nonlinear transformation to obtain the fusion output, namely:
[0138]
[0139] Among them, h i ′ represents the fusion output, h j Represents the output of a single attention head.
[0140] In this embodiment, the model psychology process adopts supervised learning and uses labeled electric vehicle charging event data for training. During the training process, the loss function can use cross-entropy loss (Cross-Entropy Loss) to optimize the classification performance, and the Adam optimizer is used for optimization. Specifically, during the training process, the initial learning rate can be set to 10 -3 , decaying by 50% every 20 rounds, and terminating the training when the validation set F1 score does not improve for 10 consecutive rounds. At the same time, the gradient norm is limited to prevent gradient explosion.
[0141] Step S04. Extract the event features corresponding to the power consumption event to be tested, input them into the trained graph neural network model, and use the graph neural network model to infer the knowledge graph to identify whether the power consumption event to be tested is an electric vehicle charging event.
[0142] This embodiment uses the trained graph neural network model to perform charging event inference. For newly occurring electricity consumption events, the trained GNN model is input into the knowledge graph, and the adjacency relationship, influencing factors (timing influencing factors and power influencing factors) and classification probability of the event are calculated. Finally, the output is whether the event is an electric vehicle charging event. The adjacency relationship is whether there is a concurrent relationship between load event nodes or load events, that is, whether the event occurrence time overlaps. The timing influencing factor is the influencing factor corresponding to the timing relationship, and the power influencing factor is the influencing factor corresponding to the power relationship.
[0143] As an optional implementation method, the influence weight of historical power consumption events on current power consumption events can be calculated based on the time decay function to obtain the time series influence factor; the power covariance factor is obtained by using the power covariance of the current power consumption event and the neighboring power consumption events; the output node of the graph neural network model is embedded in h′ new The classification probability is generated through the fully connected layer and the Softmax function, and then it is determined whether the power consumption event to be tested is an electric vehicle charging event based on the classification probability.
[0144] Specifically, when a new event V new When it occurs, first update the knowledge graph according to its timestamp and power characteristics, and extract the V new A k-hop subgraph (k=2) centered on is constructed to reduce computational overhead.
[0145] Then, we calculate the impact factor. For the time series impact factor, we can calculate the impact weight of the historical event on the current event based on the time decay function according to the following formula:
[0146] β temp (t i ,t new )=exp(-γ|t i -t new |) (20)
[0147] Where γ is the decay coefficient (learnable parameter).
[0148] For the power covariance factor, the power covariance between the current event and the neighboring events can be calculated as follows, which serves as a supplementary feature of the power correlation:
[0149]
[0150] The output node of the improved graph neural network model of this embodiment is embedded into h′ new Input the fully connected layer and Softmax function to generate classification probability:
[0151] P(y EV |v new)=Softmax(W c h′ new +b c ) (twenty two)
[0152] Set dynamic threshold τ = 0.7 * Precision val (configurable), only when p(y EV )>τ, it is determined as a charging event.
[0153] Furthermore, when this embodiment uses the constructed knowledge graph to train the graph neural network model, a multi-task learning architecture can also be adopted. The main task is configured to classify whether it is an electric vehicle charging event, and the auxiliary task is to classify the interference device. The auxiliary task of the graph neural network model is trained using a pre-built interference event feature library to obtain an interference detection GNN model. In the process of training the auxiliary task of the graph neural network model, an interference-aware graph attention mechanism is adopted. The attention weight of the graph attention network is set according to the device type. If the correlation between two target nodes is lower than a preset correlation value and one of the nodes is an interference device, the attention weight between the two target nodes is reduced. The features in the interference event feature library include the steady-state power baseline, transient power spike, power periodicity, daily cycle activity of the interference device, and whether there is a concurrent relationship with other power consumption events. By adopting the above-mentioned interference event detection mechanism based on the graph neural network, by comparing the event context, it is possible to automatically identify interference signals of high-power equipment such as air conditioners and water heaters, thereby eliminating non-charging events and improving the recognition accuracy.
[0154] Specifically, a multi-task learning architecture is adopted, with the main task being charging event classification and the auxiliary task being interference device classification: Output y interference ∈{0,1}, marking types such as air conditioners and water heaters, and using the joint loss function:
[0155] L=L EV +λL interference (twenty three)
[0156] Among them L EV is the weighted cross entropy, L interference is the multi-class cross entropy.
[0157] We further adopt an interference-aware graph attention mechanism, introduce interference type priors into the attention weights of GAT, and force the model to ignore low-correlation interference nodes through masks. For example, the attention weight of node i to node j can be calculated as follows:
[0158]
[0159] Among them, ρ0 represents the preset correlation value, M ijrepresents the interference mask matrix, W q , Wk represent the learnable weight matrix, h i 、h j Represents the feature vectors of nodes i and j respectively, d usually represents the dimension of the feature vector, M ij is the interference mask matrix.
[0160] In this embodiment, the specific steps of implementing electric vehicle charging event classification using a multi-task learning architecture include:
[0161] Construct an event causal chain in advance based on the timing relationship, power correlation, and dependency relationship between devices of each node in the knowledge graph, calculate the deviation between the charging power and total power of the electric vehicle event, and convert the deviation into confidence;
[0162] Calculate the difference between the actual total power and the line capacity, and determine whether the capacity is exceeded based on the calculated difference;
[0163] The confidence of each rule is weighted and aggregated into the total rule confidence. The final classification coverage is calculated using the total rule confidence and the output probability of the graph-graph neural network model to determine whether the current power consumption event to be tested is an electric vehicle charging event. If the non-charging event rule is triggered, it is judged as a non-charging event and the corresponding event features are added to the interference feature database.
[0164] This embodiment uses non-charging event rules based on event context to eliminate non-charging events, and combines the graph neural network model to reason on the knowledge graph, which can accurately identify whether the power consumption event to be tested is an electric vehicle charging event.
[0165] In a specific application embodiment, the detailed steps of adopting a multi-task learning architecture to implement electric vehicle charging event classification are as follows:
[0166] Through the timing, power, and device dependency relationships in the knowledge graph, a variety of corresponding judgment rules for determining whether it is an electric vehicle charging event are constructed, and the confidence of the rule judgment results (C rule ), build a causal chain of events (confidence (C rule ) calculation process) to further verify the consistency of charging events. Judgment rules include whether the actual total power is greater than the line capacity (whether it is overcapacity).
[0167] Define a normalized measure of total power deviation, where P EV To predict the charging power of electric vehicles, P total is the total power, P k is the interference event power.
[0168]
[0169] Use exponential decay function to convert the deviation into confidence C power ∈[0,1]:
[0170]
[0171] Wherein σ controls the decay rate. In the present invention, σ=0.2.
[0172] The gap between the actual total power and the line capacity (the line downstream of the meter) is calculated, and then the gap is converted into whether the capacity is exceeded based on the gap between the actual total power and the line capacity to determine whether the current line allows electric vehicles to operate. If the capacity is exceeded, operation is not allowed. Simple rules can be used to filter out model misjudgments and further improve the accuracy of model judgments.
[0173] Specifically, the expression for calculating the gap between the actual total power and the line capacity can be expressed as:
[0174] ΔP=P max -(P EV +P interf ) (28)
[0175]
[0176] When ΔP>0, (not exceeding capacity), C mute Approaching 1 (allowed to run)
[0177] When ΔP<0, (overcapacitance), C mute Approaching 0 (conflict)
[0178] When ΔP=0, (critical), C mute =0.5
[0179] Then the confidence of each judgment rule is integrated: the confidence of each rule is weighted and aggregated into the total rule confidence C rule :
[0180]
[0181] Finally, the final fusion is performed with the GNN probability: the rule confidence C rule And GNN output probability P EV Combined with:
[0182] P final =P EV *C rule (31)
[0183] When pfinal>0.5, the event is determined to be electric vehicle charging.
[0184] Then, the feature library is updated by feedback drive: when the non-charging event rule based on the event context is triggered, if it is confirmed to be an interference event, its feature f new Add interference feature library: M<-M∪{f new}.
[0185] Further analysis of the historical features f in the feature library old Perform smoothing iterations:
[0186]
[0187] To address dynamic changes in household electricity usage patterns (such as new devices and seasonal load fluctuations), this embodiment further employs a hierarchical adaptive optimization mechanism, combining self-supervised learning with dynamic parameter adjustment to ensure the robustness of the model in long-term deployment. Traditional supervised learning relies on labeled data and is difficult to adapt to new devices or unknown electricity usage patterns. This embodiment generates pseudo-labels through the contextual relationships of the knowledge graph, enabling unsupervised incremental learning.
[0188] In this embodiment, after training the graph neural network model, the step of optimizing the model using a layered adaptive optimization mechanism includes:
[0189] Calculate new event V new The similarity with historical charging events is used to obtain the node-level similarity value;
[0190] Extract the k-hop subgraph centered on the new event V_new and calculate the similarity between the k-hop subgraph and the historical charging subgraph to obtain the subgraph-level similarity value;
[0191] If both the node-level similarity value and the subgraph-level similarity value exceed the preset threshold, it is the current new event V new Generate pseudo labels, that is, mark them as charging events.
[0192] Specifically, in the process of generating pseudo labels using feature similarity measurement, the new event V can be calculated according to the following formula: new With historical charging events V EV Cosine similarity (node-level similarity):
[0193]
[0194] Extract V new The k-hop subgraph (k=2) centered on the graph is compared with the edit distance (subgraph-level similarity) of its topology and the historical charging subgraph, namely:
[0195]
[0196] If the following conditions are met at the same time, generate a pseudo label y *= 1 (charging event) to achieve pseudo-annotation for knowledge graph enhancement:
[0197]
[0198] This embodiment uses self-supervised learning to calculate the feature similarity (such as cosine similarity) between new events and historical charging events, combines it with knowledge graph reasoning to automatically generate pseudo labels (PseudoLabels), and optimizes the GNN model by continuously learning new data, thereby improving long-term stability.
[0199] This embodiment further adopts an adaptive parameter adjustment method. When the recognition accuracy decreases, the hyperparameters such as the number of GNN layers and learning rate are automatically adjusted, and the feature weights are adaptively adjusted according to the electricity consumption patterns of different households. For example, a sliding window is used to calculate the validation set index (F1 score). If the score drops by more than a predetermined threshold value Δ th (Δ th =0.1), then the parameter adjustment is triggered:
[0200]
[0201] You can also take the Bayesian optimization strategy: define the hyperparameter space (learning rate η∈[10 -5 , 10 -4 , 10 -3 ]、
[0202] GAT layer number L∈[2,3,4,5]), maximize the validation set F1, the model only fine-tunes the parameters of the fully connected layer, that is: η * , L * =argmax η,L F1(η,L)
[0203] This embodiment establishes a charging event recognition framework based on spatiotemporal feature analysis by analyzing multi-source information such as the time-varying power characteristics of the charging load and user usage habits. It comprehensively utilizes knowledge graphs, graph neural networks (GNNs), and adaptive optimization mechanisms to fully explore the contextual relationships of dynamic load events to achieve electric vehicle charging recognition. This can accurately identify electric vehicle charging loads, effectively improve the accuracy of charging event recognition in complex household power consumption environments, and reduce misjudgments. This can provide key technical support for implementing electric vehicle load aggregation and control and optimizing power resource allocation on the grid side. The above-mentioned method of the present invention was used for testing in a specific application embodiment. Experimental data show that in a typical residential community scenario, the present invention can increase the accuracy of charging event recognition to 98.7% and reduce the false alarm rate to 1.2%, which is significantly better than traditional recognition methods.
[0204] This embodiment further provides an electric vehicle charging identification device based on dynamic load event context, including a processor and a memory, the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.
[0205] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing relevant programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other application programs. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.
[0206] This embodiment further provides a computer-readable storage medium storing a computer program, which implements the above method when executed by a processor.
[0207] Those skilled in the art will appreciate that the above-mentioned embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions described in the process. Figure 1 a process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including the instruction device, which implements the function specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0208] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed above with reference to the preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modifications, equivalent variations, and modifications to the above embodiment that do not depart from the technical solution of the present invention and are based on the technical essence of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for identifying electric vehicle charging based on dynamic load event context, characterized in that the steps include: Monitor the high-frequency current and voltage cycles of different types of electric vehicle charging loads and different types of electrical equipment during power consumption, extract multi-dimensional load characteristics from the high-frequency current and voltage cycles, extract high-frequency characteristics from the load characteristics to form high-frequency feature vectors, and extract power consumption data with cumulative power reaching a preset value from the high-frequency current and voltage cycles as corresponding power consumption event data, extract low-frequency power parameters from the power consumption event data, and splice the high-frequency feature vectors and the low-frequency power parameters in the same time period to form event characteristics corresponding to each device type; A knowledge graph of dynamic load event context relationships is constructed to model the association relationships between different power-consuming devices, and a graph database is used to store the knowledge graph. In the knowledge graph, power consumption events are used as nodes, and relationship edges between nodes are constructed based on the timing relationship, power correlation, and parallel operation status between power consumption events. The attributes of each node include device type, event characteristics, and operating status. The device types include electric vehicle charging loads and different types of electrical equipment. The constructed knowledge graph is used to train a graph neural network model, wherein the input of the model is event features, device type, and graph structure information, and the output is a classification result of whether the event is an electric vehicle charging event; The event features corresponding to the power consumption event to be tested are extracted and input into the trained graph neural network model. The graph neural network model infers the knowledge graph and identifies whether the power consumption event to be tested is an electric vehicle charging event.
2. The electric vehicle charging identification method based on dynamic load event context according to claim 1 is characterized in that: The low-frequency power parameters include any of the maximum power, minimum power, power change rate, event occurrence time and event duration; the load characteristics include any of the time domain characteristics, transient characteristics, steady-state characteristics and frequency domain characteristics; the time domain characteristics include any one or more of the mean, variance, kurtosis coefficient and pulse factor; the transient characteristics include the starting current peak ratio and rise time; the steady-state characteristics include the power fluctuation entropy value and dynamic response coefficient within the operating cycle; the dynamic response coefficient characterizes the response characteristics of the charging system to grid voltage fluctuations based on the power of the charger; the frequency domain characteristics include the FFT spectrum center of gravity offset, the impedance characteristic spectrum of the characteristic frequency band, the odd harmonic THD-I index and the harmonic characteristics.
3. The electric vehicle charging identification method based on dynamic load event context according to claim 1 is characterized in that: The step of extracting the electricity consumption data whose cumulative power reaches a preset value as corresponding electricity consumption event data includes: Calculate the low-frequency power value of the high-frequency cyclic current and voltage once at a specified interval, and store the calculated power value in a buffer; Calculate the current active power cumulative sum and reactive power cumulative sum respectively according to the stored data in the buffer; If the current active power accumulation sum is greater than the preset active power threshold and the current reactive power accumulation sum is greater than the preset reactive power threshold, it is determined that there is a power consumption event, and the power consumption data between the start time of the current round and the current time is extracted as the power consumption event data.
4. The electric vehicle charging identification method based on dynamic load event context according to claim 1 is characterized in that: The timing relationship is used to indicate the order in which events occur, the power correlation is used to indicate the power fluctuation trend between different events, and the parallel operation status is used to indicate whether different devices are running simultaneously; When constructing the relationship edge of the temporal relationship in the knowledge graph, the weight w of the temporal relationship between the power consumption events is defined as follows: AB : Among them, α is a positive constant used to adjust the speed of change of weight with time interval, and Δt represents the time interval between different electricity consumption events; When constructing the power correlation edge in the knowledge graph, the power correlation between the power devices is represented by the correlation coefficient between the power data of the power devices; When constructing the relationship edge of concurrent relations in the knowledge graph, the strength s of the concurrent relations is defined as follows: AB : in, Respectively represent the start time of electricity consumption of two different devices, Respectively represent the end time of power consumption of two different devices.
5. The electric vehicle charging identification method based on dynamic load event context according to claim 1 is characterized in that: It also includes updating the attribute information of the corresponding node or the attribute information of the relationship edge in the knowledge graph when the operating status or event attributes of the node in the constructed knowledge graph change, and the event attributes include occurrence time and power data; when a new power consumption event is detected, the knowledge graph is updated according to the device type, event characteristics and operating status of the new power consumption event, and each relationship edge is updated according to the timing relationship, power correlation and concurrency relationship between the new power consumption event and other power consumption events; in the graph neural network model, the event characteristics and device type of each event node in the knowledge graph are spliced to form a node feature vector for input feature embedding, and when edge feature embedding is performed, the initial weight value of each relationship edge is generated according to the relationship type between the power consumption events; multiple attention heads are used to calculate the attention coefficient of each node in the knowledge graph to its neighbors, and a multi-head attention mechanism is used to splice the outputs of multiple attention heads and perform nonlinear transformation to obtain a fusion output result.
6. The electric vehicle charging identification method based on dynamic load event context according to any one of claims 1 to 5, characterized in that: When using the constructed knowledge graph to train the graph neural network model, a multi-task learning architecture is adopted, and the main task is configured to classify whether it is an electric vehicle charging event, and the auxiliary task is to classify the interference equipment. The auxiliary task of the graph neural network model is trained using a pre-built interference event feature library to obtain an interference detection GNN model. In the process of training the auxiliary task of the graph neural network model, an interference-aware graph attention mechanism is adopted, and the attention weight of the graph attention network is set according to the device type. If the correlation between two target nodes is lower than a preset correlation value and one of the nodes is an interference device, the attention weight between the two target nodes is reduced. The features in the interference event feature library include any one or more of the steady-state power baseline, transient power spike, power periodicity, daily cycle activity and whether there is a concurrent relationship with other power consumption events of the interference equipment.
7. The electric vehicle charging identification method based on dynamic load event context according to claim 6 is characterized in that: The attention weight of node i to node j is calculated as follows: Among them, ρ0 represents the preset correlation value, M ij represents the interference mask matrix, W q 、W k Represent the learnable weight matrices, hi, h j Represent the feature vectors of nodes i and j respectively, and d usually represents the dimension of the feature vector.
8. The electric vehicle charging identification method based on dynamic load event context according to claim 7 is characterized in that: The graph neural network model is used to infer the knowledge graph to identify whether the power consumption event to be tested is an electric vehicle charging event, including: Pre-establish multiple corresponding judgment rules for determining whether an event is an electric vehicle charging event based on the timing relationship, power correlation, and dependency relationship between devices of each node in the knowledge graph, and calculate the confidence level of the rule judgment results. The judgment rules include whether the actual total power is greater than the line capacity; The confidence of each judgment rule is weighted and aggregated into the total rule confidence. The final classification coverage is calculated using the total rule confidence and the output probability of the graph neural network model to determine whether the current power consumption event to be tested is an electric vehicle charging event. If the non-charging event rule is triggered, it is judged as a non-charging event and the corresponding event features are added to the interference feature database.
9. The electric vehicle charging identification method based on dynamic load event context according to any one of claims 1 to 5, characterized in that: After training the graph neural network model, the model is optimized using a layered adaptive optimization mechanism, including the following steps: Calculate new event V new The similarity with historical charging events is used to obtain the node-level similarity value; Extract the k-hop subgraph centered on the new event V_new and calculate the similarity between the k-hop subgraph and the historical charging subgraph to obtain the subgraph-level similarity value; If both the node-level similarity value and the subgraph-level similarity value exceed the preset threshold, then the current new event V new Generate pseudo labels, that is, mark them as charging events.
10. An electric vehicle charging identification device based on dynamic load event context, comprising a processor and a memory, wherein the memory is used to store a computer program, characterized in that: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 9.