A multi-device parallel charging state recognition method based on a graph neural network
By using the Mamba-2 network and the improved GATv2 model, neighbor information is dynamically aggregated, which solves the problem of inaccurate modeling of coupling relationships between devices in multi-device parallel charging systems, and achieves efficient and accurate charging status identification and visual alarms.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN REMAX TECH CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-07-21
AI Technical Summary
Existing graph neural networks struggle to effectively distinguish interaction patterns between devices in multi-device parallel charging systems. The models exhibit poor adaptability to complex operating conditions, low computational efficiency, and insufficient interpretability and real-time performance of the recognition results.
We employ a Mamba-2 network for parallel processing of time-series data and introduce a hybrid expert mechanism by combining an improved GATv2 model. Through a gating network, we dynamically select expert subnetworks to aggregate neighbor information, deeply explore the spatial coupling relationship between devices, and achieve accurate identification of charging status.
It significantly improves the accuracy and real-time performance of charging status identification, enhances the model's adaptability and robustness in complex scenarios, and provides intuitive visual decision-making support.
Smart Images

Figure CN121643146B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning and graph neural network technology, and in particular to a method for identifying the parallel charging status of multiple devices based on graph neural networks. Background Technology
[0002] Graph neural networks, due to their powerful non-Euclidean data processing and relational reasoning capabilities, have been widely applied in recent years in fields such as smart grids, industrial IoT, and transportation networks, becoming a key technology for monitoring the state of complex systems. However, in practical applications, the state identification of multi-device parallel charging systems faces many challenges, such as complex coupling relationships between devices, dramatic spatiotemporal dynamic evolution, and diverse abnormal operating conditions. The deployment effectiveness of traditional graph neural networks is still constrained by many factors.
[0003] Most current charging status identification methods rely on a single model to uniformly encode global information, making it difficult to fully distinguish the interaction patterns between devices under different charging conditions. This results in a lack of specificity in modeling spatial coupling relationships. Some systems only use general modules such as residual connections or gating mechanisms to optimize feature transfer, ignoring the dynamic and specific nature of neighbor information aggregation strategies under different states such as overcurrent, overtemperature, and saturation. This limits the model's adaptability to complex operating conditions. Furthermore, the model's decision-making process lacks transparent logic regarding expert division of labor, making it difficult to explain to maintenance personnel why a specific computational path was activated under a particular state, affecting the reliability and interpretability of the identification results.
[0004] In addition, existing graph neural networks generally suffer from low computational efficiency or forgetting of key information when processing long time-series data. They fail to efficiently integrate the historical evolution patterns of the device itself with global spatial dependencies, resulting in the model being slow to respond to slowly evolving fault trends or instantaneous abnormal fluctuations. This makes it difficult to adapt to the rapidly changing temporal characteristics in charging scenarios, seriously affecting the model's real-time performance and accuracy in real charging networks.
[0005] Therefore, how to provide a method for identifying the charging status of multiple devices in parallel based on graph neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a multi-device parallel charging status identification method based on graph neural networks. This invention fully integrates key steps such as temporal dynamic coding, spatial relationship aggregation, and expert dynamic routing to construct an intelligent charging status identification process with parallel processing of temporal data, deep spatial coupling relationship mining, and multi-condition adaptive aggregation. This achieves comprehensive perception and accurate identification of the status of each device under complex topology structures. By introducing a Mamba-2 network, this invention efficiently captures the temporal dynamic evolution patterns and global context information of each device. Simultaneously, through an improved GATv2 model, a hybrid expert mechanism is introduced to dynamically select expert subnetworks to aggregate neighbor information based on the real-time status of nodes, solving the problems of traditional methods' single spatial relationship modeling and poor adaptability to complex operating conditions. This invention possesses advantages such as high temporal feature fusion depth, accurate spatial relationship mining, and self-reinforcing adaptive operating conditions, significantly improving the timeliness and accuracy of charging status identification, thereby effectively solving the problems of insufficient utilization of temporal information and inaccurate modeling of inter-device coupling relationships in existing methods.
[0007] A method for identifying the parallel charging status of multiple devices based on a graph neural network according to an embodiment of the present invention includes the following steps: 1. A method for identifying the parallel charging status of multiple devices based on graph neural networks, characterized by comprising the following steps: S1. Synchronously collect real-time running data, and obtain the initial feature vector after preprocessing; S2. Based on the topology of the parallel charging network, construct a graph structure and use the initial feature vectors as the initial features of the corresponding graph nodes to generate the graph input dataset. S3. Input the graph input dataset into the Mamba-2 network, use the state space dual framework to process the temporal sequence of each graph node in parallel, independently encode the time dynamic evolution mode of each charging device, and output the graph node feature vector. S4. Input the graph node feature vectors into the improved GATv2 model and introduce a hybrid expert mechanism. Through the gating network, different expert sub-networks are dynamically selected and activated to aggregate neighbor information based on the real-time status of each graph node. This deeply mines and encodes the mutual influence and spatial coupling relationship between charging devices and outputs high-dimensional feature vectors. S5. Decode and pattern recognize each high-dimensional feature vector, map it to the preset charging state category, generate graph node state recognition results, and obtain the overall charging state recognition results of all graph nodes. S6. Based on the overall charging status identification results, generate and output the corresponding visual status map, and highlight the charging device nodes in abnormal status in a graphical manner.
[0008] Optionally, S1 specifically includes: S11. Real-time operating data of each charging device in the parallel charging network are collected synchronously by voltage sensors, current sensors and temperature sensors deployed inside each charging device. S12. Perform data normalization processing on the collected voltage, current and temperature time series data of each charging device, and perform sliding window truncation processing on the normalized time series data. According to the preset time window length and step size, the continuous time series data is divided into multiple data segments of a set length. S13. Concatenate the voltage, current and temperature data in each data segment in chronological order to generate an initial feature vector corresponding to each data segment.
[0009] Optionally, S2 specifically includes: S21. Read a pre-stored topology connection table with a two-column, multi-row structure. Each row contains unique identifiers for two charging devices, indicating that there is an electrical connection between the two charging devices. S22. Create an empty list of graph nodes, iterate through all unique identifiers in the topology connection table, add each unique identifier as an independent graph node to the list of graph nodes, create an empty list of edges, iterate through each row of the topology connection table, add the graph nodes corresponding to the two unique identifiers in the row as a graph node pair, and add the graph node pair as a tuple to the list of edges. S23. Assign the initial feature vector to the graph nodes with the same unique identifier in the graph node list one by one according to the unique identifier of the corresponding charging device, as the initial feature attribute of the graph node. Then, concatenate the graph node list, edge list and the initial feature attributes attached to each graph node in order to form the graph input dataset.
[0010] Optionally, S3 specifically includes: S31. Input the graph input dataset into the Mamba-2 network, and process the initial feature vector of the graph input dataset as an independent temporal sequence in the input layer; S32. After the time series of each graph node enters the scanning layer of the Mamba-2 network, a selective scanning mechanism is executed. The initial feature vector of each time step in the time series is mapped to a time step vector and a data projection vector through a preset independent linear projection layer. Each element of the time step vector is activated by a Softplus function to generate a time step parameter vector. S33. Multiply each element of the time step parameter vector with each corresponding element of the preset state transition matrix to obtain a first intermediate matrix. Calculate the exponential function with base e for each element of the first intermediate matrix to obtain the discretized state transition matrix. S34. Multiply each element of the time step parameter vector with each corresponding element of the input matrix to obtain a second intermediate matrix. Subtract the corresponding element of the identity matrix from each element of the discretized state transition matrix to obtain a difference matrix. Calculate the inverse of the first intermediate matrix and perform matrix multiplication with the difference matrix, then perform matrix multiplication with the second intermediate matrix to obtain the discretized input matrix. S35. Perform matrix multiplication between the hidden state of the previous time step and the discretized state transition matrix to obtain the state transfer result. Perform matrix multiplication between the discretized input matrix and the data projection vector to obtain an input influence result. Add the state transfer result and the input influence result element by element to obtain the hidden state of the current time step. S36. The initial feature vector of the current time step is dynamically generated into an output matrix through another preset independent linear projection layer. The hidden state of the current time step is multiplied with the dynamically generated output matrix to obtain the output of the current time step. S37. Input the initial hidden state into the state space dual framework of the Mamba-2 network, which contains a forward propagation path and a backward propagation path. The forward propagation path traverses the initial hidden state in ascending time order, and the backward propagation path traverses the initial hidden state in reverse time order. The two-way parallel execution captures the past dependencies and future context in the time series data. S38. Concatenate the outputs of the forward propagation path and the backward propagation path into vectors to generate a fused hidden state. Input the fused hidden state into a gated linear unit to perform a linear transformation on the fused hidden state and multiply it element-wise with the original fused hidden state to generate the final encoding result of the graph node. Perform the same steps in parallel on all graph nodes and summarize the final encoding results of all graph nodes to form the graph node feature vector.
[0011] Optionally, the input matrix specifically includes: reading a pre-stored topology connection table, where each row of the topology connection table records the unique identifiers of two charging devices that are electrically connected; creating an empty matrix equal to the total number of charging devices, where the rows and columns of the empty matrix correspond to all charging devices, forming the initial input matrix; traversing each row of the topology connection table, finding the corresponding row and column numbers in the input matrix based on the unique identifiers of the two charging devices in the row, and setting the value of the element at the intersection position to 1, indicating that there is a connection between the two charging devices; and obtaining the input matrix after traversal.
[0012] Optionally, S4 specifically includes: S41. Input the graph node feature vector into the gated network of the improved GATv2 model and treat it as a row vector. Multiply it with the preset weight matrix of the gated network to obtain an intermediate vector. The dimension of the intermediate vector is equal to the total number of preset expert subnetworks. Calculate the Sigmoid function for each element in the intermediate vector to generate the expert selection weight vector. S42. Perform Top-k sparsity operation on the expert selection weight vector. Find the top k elements with the largest values in the expert selection weight vector, where k is a preset positive integer hyperparameter. Create a new vector with the same dimension as the expert selection weight vector and all elements are zero. Copy the top k largest elements to the same position in this all-zero vector according to their positions in the expert selection weight vector to obtain a sparsified expert selection weight vector. S43. For each non-zero element in the sparse expert selection weight vector, the corresponding expert subnetwork is computed in parallel. The expert subnetwork obtains the graph node feature vectors of the central graph node and all neighboring graph nodes directly connected to the central graph node, and multiplies them by the expert subnetwork’s proprietary preset weight matrix to obtain two transformed graph node feature vectors. S44. Concatenate the two transformed graph node feature vectors into a long vector in sequence. Perform a dot product operation between the long vector and the expert subnetwork’s proprietary preset attention weight vector to obtain an intermediate value. Add this intermediate value to the preset attention bias scalar to obtain the unactivated attention score and execute the LeakyReLU activation function. If the score is negative, multiply it by a preset positive slope of less than 1; otherwise, leave it unchanged to obtain the unnormalized attention coefficient. S45. After performing weighted summation and activation on all neighbor nodes, put all the obtained unnormalized attention coefficients together and normalize them using the Softmax function to obtain normalized attention coefficients. Multiply each normalized attention coefficient by the graph node feature vector of the corresponding neighbor node after transformation, and add all the product results element by element to obtain the neighbor aggregation feature vector output by the expert subnetwork. S46. Multiply the neighbor aggregation feature vector output by each activated expert subnetwork by a scalar multiplication with the corresponding non-zero element in the sparse expert selection weight vector to obtain the weighted neighbor aggregation feature vector. Add all the weighted neighbor aggregation feature vectors element by element to obtain the final neighbor aggregation feature vector. S47. The final neighbor aggregation feature vector is input into the graph node feature vector of the improved GATv2 model without any processing. The vector is added element by element, and residual connections are performed. The vector of addition is input into a normalization layer. The arithmetic mean of all elements of the vector of addition is calculated, and the square of the difference between each element and the mean is calculated. The variance is obtained by adding all the squared differences and dividing by the number of elements. S48. For each element in the summed vector, subtract the mean and divide by the square root of the variance to obtain a standardized vector. Multiply the standardized vector by a preset scaling parameter and add a preset translation parameter to obtain a high-dimensional feature vector.
[0013] Optionally, S5 specifically includes: S51. Input the high-dimensional feature vector into the preset fully connected layer, perform multiplication with the preset weight matrix of the fully connected layer to obtain the intermediate classification vector, and perform a preset Dropout operation on each element in the intermediate classification vector to randomly set the element to zero with a preset probability to obtain the regularized classification vector. S52. Input the classification vector into the preset Softmax activation layer, calculate the exponential function with base e for all elements in the classification vector, and divide each exponential result by the sum of all exponential results to obtain the probability distribution vector. S53. Read the preset charging state category list, which includes normal charging state, overcurrent state, overtemperature state, charging saturation state and connection abnormal state. Find the element with the largest value in the probability distribution vector, record the index position of the element, and search for the corresponding charging state category in the charging state category list according to the index position to obtain the graph node state recognition result. S54. After performing the same operation on the high-dimensional feature vectors of all graph nodes, the state recognition results of all graph nodes are obtained and output as the overall charging state recognition results.
[0014] Optionally, S6 specifically includes: traversing all device graph nodes in a blank visualization map, reading the overall charging status identification result, comparing the status identification result of each node in the overall charging status identification result with a preset charging status category list, and if the node status identification result is in an overcurrent state, overtemperature state, charging saturation state, or connection abnormal state, then setting the color of the device graph node in the visualization map to the corresponding preset warning color; if the node status identification result is in a normal charging state, then setting it to the preset normal color, and generating a visualization status map.
[0015] The beneficial effects of this invention are: First, by collecting time-series data on voltage, current, and temperature of each charging device, a graph structure with devices as nodes and electrical connections as edges is constructed, effectively restoring the physical topology and coupling relationship of the parallel charging network, providing high-precision basic support for deep state recognition.
[0016] Secondly, parallel encoding and deep feature extraction of the temporal sequences of each node are achieved based on the Mamba-2 network. Its state-space dual framework efficiently captures the device's own temporal dynamic evolution patterns and global historical information, solving the computational bottleneck and information forgetting problem of traditional recurrent neural networks in long sequence processing. In the feature aggregation stage, a hybrid expert mechanism is introduced through an improved GATv2 model. A gating network dynamically selects and activates expert sub-networks dedicated to different charging conditions based on the real-time state of the nodes, achieving adaptive optimization of the neighbor information aggregation strategy and enhancing the model's spatial relationship modeling capability under complex conditions such as overcurrent and overtemperature. This combination of technologies significantly improves the temporal perception depth, spatial relationship mining accuracy, and operating condition adaptability of the state recognition model, effectively addressing the challenges of multi-source disturbances and rapid state evolution in charging networks.
[0017] Furthermore, during the status identification process, the specific status category of each device node can be output in real time, driving the generation of a visual status map. Abnormal device nodes are highlighted graphically, providing maintenance personnel with intuitive and accurate decision-making support. By integrating the Mamba-2 network with an improved GATv2 model, the method significantly improves the real-time performance, accuracy, and interpretability of charging status identification, enhancing the system's robustness and practical value in real-world, complex charging scenarios.
[0018] In summary, this invention, by integrating graph neural network modeling, Mamba-2 temporal coding, and hybrid expert space aggregation, can improve the depth, accuracy, and intelligence level of charging status identification, providing a reliable technical guarantee for the safe and stable operation of multi-device parallel charging systems. Attached Figure Description
[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for identifying the parallel charging status of multiple devices based on graph neural networks proposed in this invention; Figure 2 This is a flowchart of the temporal feature encoding of graph nodes based on the Mamba-2 network proposed in this invention; Figure 3 This is a flowchart of the spatial relationship aggregation process of the improved GATv2 model based on a hybrid expert mechanism proposed in this invention. Detailed Implementation
[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0021] refer to Figures 1-3 A method for identifying the parallel charging status of multiple devices based on graph neural networks includes the following steps: S1. Synchronously collect real-time operating data of each charging device in the parallel charging network, including the voltage, current and temperature time series data of each charging device, and obtain the initial feature vector after preprocessing. S2. Based on the physical topology of the parallel charging network, construct a graph structure with each charging device as a graph node and the electrical connection relationship between charging devices as an edge, and use the initial feature vector as the initial feature of the corresponding graph node to generate the graph input dataset. S3. Input the graph input dataset into the Mamba-2 network, use the state space dual framework to process the temporal sequence of each graph node in parallel, independently encode the time dynamic evolution mode of each charging device, and achieve efficient fusion of global context and key historical information, outputting graph node feature vectors containing temporal depth information. S4. Input the graph node feature vectors into the improved GATv2 model and introduce a hybrid expert mechanism. Through a gated network, based on the real-time status of each graph node, the expert sub-networks dedicated to different charging conditions are dynamically selected and activated to aggregate neighbor information, deeply mine and encode the mutual influence and spatial coupling relationship between charging devices, and output a high-dimensional feature vector representing the global state of the entire charging network. S5. Input the high-dimensional feature vector into the state classifier, decode and pattern recognize the high-dimensional feature vector, map it to the preset charging state category, and obtain the graph node state recognition result. After performing the same operation on all graph nodes, the overall charging state recognition result is obtained. The charging state categories include normal charging state, overcurrent state, overtemperature state, charging saturation state and connection abnormal state. S6. Based on the overall charging status identification results, generate and output the corresponding visual status map. The visual status map highlights the charging device nodes in abnormal status in a graphical way.
[0022] This implementation significantly improves the accuracy and real-time performance of multi-device parallel charging status identification. By constructing a graph structure, the physical topology of the charging network and the temporal data of the devices are modeled in a unified manner, effectively enhancing the expressive power of state features. The Mamba-2 network is used to efficiently fuse global historical information, accurately capturing the temporal evolution patterns of each device. An improved GATv2 model with a hybrid expert mechanism is introduced, which can dynamically aggregate neighbor information based on real-time operating conditions, deeply mining the spatial coupling relationships between devices, significantly improving the model's adaptability and robustness in complex scenarios. Finally, abnormal nodes are intuitively presented through a visual graph, realizing a shift from passive alarm to proactive prediction, greatly enhancing the intelligence level and security assurance capabilities of charging network operation and maintenance.
[0023] In this embodiment, S1 specifically includes: S11. Real-time operating data of each charging device in the parallel charging network are collected synchronously by voltage sensors, current sensors and temperature sensors deployed inside each charging device. S12. Perform data normalization processing on the collected voltage, current and temperature time series data of each charging device, linearly map the value of each data item to between 0 and 1, perform sliding window truncation processing on the normalized time series data, and divide the continuous time series data into multiple data segments of a set length according to the preset time window length and step size. S13. Concatenate the voltage, current and temperature data in each data segment in chronological order to generate an initial feature vector corresponding to each data segment.
[0024] In this embodiment, S2 specifically includes: S21. Read a pre-stored topology connection table with a two-column, multi-row structure. Each row contains unique identifiers for two charging devices, indicating that there is an electrical connection between the two charging devices. S22. Create an empty list of graph nodes, iterate through all unique identifiers in the topology connection table, add each unique identifier as an independent graph node to the list of graph nodes, create an empty list of edges, iterate through each row of the topology connection table, add the graph nodes corresponding to the two unique identifiers in the row as a graph node pair, and add the graph node pair as a tuple to the list of edges. S23. Assign the initial feature vector to the graph nodes with the same unique identifier in the graph node list one by one according to the unique identifier of the corresponding charging device, as the initial feature attribute of the graph node. Then, concatenate the graph node list, edge list and the initial feature attributes attached to each graph node in order to form the graph input dataset.
[0025] This implementation constructs a graph structure that accurately reflects the physical connections of the charging network by parsing the topology connection table. This method maps each charging device to a graph node, transforms electrical connections into edges, and uses real-time operational data as node features, achieving a deep fusion of device status and network topology. This approach ensures the structured and standardized nature of the input data, providing high-quality input to the subsequent graph neural network model that includes both temporal features of the devices and spatial coupling relationships, thus forming the foundation for accurate status recognition.
[0026] In this embodiment, S3 specifically includes: S31. Input the graph input dataset into the Mamba-2 network, and process the initial feature vector of the graph input dataset as an independent temporal sequence in the input layer; S32. After the time series of each graph node enters the scanning layer of the Mamba-2 network, a selective scanning mechanism is executed. The initial feature vector of each time step in the time series is mapped to a time step vector and a data projection vector through a preset independent linear projection layer. Each element of the time step vector is activated by a Softplus function to generate a time step parameter vector. S33. Multiply each element of the time step parameter vector with each corresponding element of the preset state transition matrix to obtain a first intermediate matrix. Calculate the exponential function with base e for each element of the first intermediate matrix to obtain the discretized state transition matrix. S34. Multiply each element of the time step parameter vector with each corresponding element of the input matrix to obtain a second intermediate matrix. Subtract the corresponding element of the identity matrix from each element of the discretized state transition matrix to obtain a difference matrix. Calculate the inverse of the first intermediate matrix and perform matrix multiplication with the difference matrix, then perform matrix multiplication with the second intermediate matrix to obtain the discretized input matrix. S35. Perform matrix multiplication between the hidden state of the previous time step and the discretized state transition matrix to obtain the state transfer result. Perform matrix multiplication between the discretized input matrix and the data projection vector to obtain an input influence result. Add the state transfer result and the input influence result element by element to obtain the hidden state of the current time step. S36. The initial feature vector of the current time step is dynamically generated into an output matrix through another preset independent linear projection layer. The hidden state of the current time step is multiplied with the dynamically generated output matrix to obtain the output of the current time step. S37. Input the initial hidden state into the state space dual framework of the Mamba-2 network, which contains a forward propagation path and a backward propagation path. The forward propagation path traverses the initial hidden state in ascending time order, and the backward propagation path traverses the initial hidden state in reverse time order. The two-way parallel execution captures the past dependencies and future context in the time series data. S38. Concatenate the outputs of the forward propagation path and the backward propagation path into vectors to generate a fused hidden state. Input the fused hidden state into a gated linear unit to perform a linear transformation on the fused hidden state and multiply it element-wise with the original fused hidden state to generate the final encoding result of the graph node. Perform the same steps in parallel on all graph nodes and summarize the final encoding results of all graph nodes to form the graph node feature vector.
[0027] This implementation introduces the Mamba-2 network as an innovative technology, which has significant differences and advantages compared to traditional time-series modeling techniques such as RNN, LSTM, and Transformer. Traditional RNN and LSTM are difficult to compute in parallel and are prone to gradient vanishing in long sequences, making it impossible to effectively capture the long-term temporal dependencies of charging devices. Although the standard Transformer improves long-distance modeling capabilities through self-attention mechanisms, its computational complexity increases quadratically with the sequence length, facing huge computational resource consumption and inference latency bottlenecks when processing massive historical data.
[0028] This invention achieves efficient parallel processing of long sequence data while maintaining linear computational complexity through the state-space model and selective scanning mechanism of the Mamba-2 network. In particular, the state-space dual framework employed in S37, through bidirectional parallel traversal of forward and backward directions, integrates past dependencies and future contextual information, greatly enriching the completeness of feature representation. This mechanism can accurately capture the subtle evolutionary patterns of device states under complex disturbances, significantly reducing computational costs and improving inference speed while significantly enhancing the model's accuracy and robustness in extracting temporal dynamic features.
[0029] In this embodiment, the input matrix specifically includes: reading a pre-stored topology connection table, where each row of the topology connection table records the unique identifiers of two charging devices that are electrically connected; creating an empty matrix equal to the total number of charging devices, where the rows and columns of the empty matrix correspond to all charging devices, forming an initial input matrix; traversing each row of the topology connection table, finding the corresponding row and column numbers in the input matrix based on the unique identifiers of the two charging devices in the row, and setting the value of the element at the intersection position to 1, indicating that there is a connection between the two charging devices; and obtaining the input matrix after traversal.
[0030] In this embodiment, S4 specifically includes: S41. Input the graph node feature vector into the gated network of the improved GATv2 model and treat it as a row vector. Multiply it with the preset weight matrix of the gated network to obtain an intermediate vector. The dimension of the intermediate vector is equal to the total number of preset expert subnetworks. Calculate the Sigmoid function for each element in the intermediate vector to generate the expert selection weight vector. S42. Perform Top-k sparsity operation on the expert selection weight vector. Find the top k elements with the largest values in the expert selection weight vector, where k is a preset positive integer hyperparameter. Create a new vector with the same dimension as the expert selection weight vector and all elements are zero. Copy the top k largest elements to the same position in this all-zero vector according to their positions in the expert selection weight vector to obtain a sparsified expert selection weight vector. S43. For each non-zero element in the sparse expert selection weight vector, the corresponding expert subnetwork is computed in parallel. The expert subnetwork obtains the graph node feature vectors of the central graph node and all neighboring graph nodes directly connected to the central graph node, and multiplies them by the expert subnetwork’s proprietary preset weight matrix to obtain two transformed graph node feature vectors. S44. Concatenate the two transformed graph node feature vectors into a long vector in sequence. Perform a dot product operation between the long vector and the expert subnetwork’s proprietary preset attention weight vector to obtain an intermediate value. Add this intermediate value to the preset attention bias scalar to obtain the unactivated attention score and execute the LeakyReLU activation function. If the score is negative, multiply it by a preset positive slope of less than 1; otherwise, leave it unchanged to obtain the unnormalized attention coefficient. S45. After performing weighted summation and activation on all neighbor nodes, put all the obtained unnormalized attention coefficients together and normalize them using the Softmax function to obtain normalized attention coefficients. Multiply each normalized attention coefficient by the graph node feature vector of the corresponding neighbor node after transformation, and add all the product results element by element to obtain the neighbor aggregation feature vector output by the expert subnetwork. S46. Multiply the neighbor aggregation feature vector output by each activated expert subnetwork by a scalar multiplication with the corresponding non-zero element in the sparse expert selection weight vector to obtain the weighted neighbor aggregation feature vector. Add all the weighted neighbor aggregation feature vectors element by element to obtain the final neighbor aggregation feature vector. S47. The final neighbor aggregation feature vector is input into the graph node feature vector of the improved GATv2 model without any processing. The vector is added element by element, and residual connections are performed. The vector of addition is input into a normalization layer. The arithmetic mean of all elements of the vector of addition is calculated, and the square of the difference between each element and the mean is calculated. The variance is obtained by adding all the squared differences and dividing by the number of elements. S48. For each element in the summed vector, subtract the mean and divide by the square root of the variance to obtain a standardized vector. Multiply the standardized vector by a preset scaling parameter and add a preset translation parameter to obtain a high-dimensional feature vector.
[0031] This implementation introduces a hybrid expert mechanism to dynamically optimize and enhance the spatial relationship aggregation capability of the improved GATv2 model. By generating sparse expert selection weights through a gating network, the model can intelligently select and activate the most suitable expert sub-network for computation based on the real-time state of nodes. Each expert sub-network independently executes a multi-head attention mechanism to deeply mine the influence patterns of neighboring nodes under specific operating conditions. Finally, the outputs of each expert are weighted and fused, achieving efficient allocation of computing resources and a significant enhancement of the model's expressive power. This approach can adaptively handle diverse charging network coupling relationships, avoiding the limitations of a single attention mechanism in complex scenarios. The output high-dimensional feature vector more accurately encodes the spatial dependencies between devices, providing higher-quality input for subsequent state classification and significantly improving the model's recognition accuracy and robustness under complex operating conditions.
[0032] The improved GATv2 model of this invention is similar to the original GATv2 model in that both retain the core architecture of the graph attention network, namely, calculating the attention coefficient through the feature interaction between the center node and the neighbor nodes, normalizing it using the Softmax function, and finally aggregating the neighbor information based on a weighted sum. Both also use LeakyReLU as the activation function for the attention score.
[0033] The difference lies in that this invention breaks the limitation of the original GATv2 model, which uses a single static attention calculation method for all nodes. It introduces a hybrid expert mechanism and constructs a hierarchical dynamic decision-making system. Building upon the original model's direct calculation of attention coefficients, this invention pre-implements a gating network in step S41. This network, acting as an independent routing module, deeply analyzes the real-time state characteristics of the central graph nodes and outputs a weight vector with the same dimension as the total number of experts to evaluate the applicability of different experts. Next, in step S42, a strict Top-k sparsity operation is performed. By retaining only the k elements with the highest weights and setting the rest to zero, the model is forced to activate only a very small number of optimal expert sub-networks in each round of computation, while the remaining experts remain dormant. Subsequently, in steps S43 to S45, the selected expert sub-networks independently perform attention calculations and neighbor feature aggregation using their own proprietary preset attention weight vectors, rather than sharing the same set of parameters. Finally, in step S46, the aggregated features output by the activated experts are weighted and summed using the sparsified weight vectors, rather than simply averaging or outputting a single value.
[0034] The beneficial effects of the improvements are that, through gated routing and sparse activation, the improved GATv2 model can adaptively select a dedicated expert subnetwork for feature processing under different charging conditions, such as overcurrent, overtemperature, or saturation. This breaks the limitation of the original GATv2 model, which uses a single static weight matrix to process all nodes, and realizes dynamic aggregation strategy and multimodal differentiation. This design significantly enhances the depth of the GATv2 model in mining complex spatial coupling relationships between devices, and can more accurately capture key dependency information under specific states. Parallel expert computing combined with the sparse routing mechanism not only improves the model's expressive power and recognition accuracy, but also effectively optimizes the allocation of computing resources, enhancing the system's robustness and real-time response capability under complex and variable charging scenarios.
[0035] In this embodiment, S5 specifically includes: S51. Input the high-dimensional feature vector into the preset fully connected layer, perform multiplication with the preset weight matrix of the fully connected layer to obtain the intermediate classification vector, and perform a preset Dropout operation on each element in the intermediate classification vector to randomly set the element to zero with a preset probability to obtain the regularized classification vector. S52. Input the classification vector into the preset Softmax activation layer, calculate the exponential function with base e for all elements in the classification vector, and divide each exponential result by the sum of all exponential results to obtain the probability distribution vector. S53. Read the preset charging state category list, which includes normal charging state, overcurrent state, overtemperature state, charging saturation state and connection abnormal state. Find the element with the largest value in the probability distribution vector, record the index position of the element, and search for the corresponding charging state category in the charging state category list according to the index position to obtain the graph node state recognition result. S54. After performing the same operation on the high-dimensional feature vectors of all graph nodes, the state recognition results of all graph nodes are obtained and output as the overall charging state recognition results.
[0036] In this embodiment, S6 specifically includes: traversing all device graph nodes in a blank visualization map, reading the overall charging status identification result, comparing the status identification result of each node in the overall charging status identification result with a preset charging status category list, and if the node status identification result is in an overcurrent state, overtemperature state, charging saturation state, or connection abnormal state, then setting the color of the device graph node in the visualization map to the corresponding preset warning color; if the node status identification result is in a normal charging state, then setting it to the preset normal color, and generating a visualization status map.
[0037] Example 1: To verify the feasibility of this invention in practice, it was applied to a "Smart Charging Network Operation and Maintenance Management Platform" deployed by a leading domestic new energy vehicle charging service operator. This platform manages charging networks covering eight large cities in the core area of the Yangtze River Delta economic zone, including over 450 public fast charging stations and nearly 6,000 DC fast charging piles, serving over 80,000 vehicles daily, with peak concurrent charging devices exceeding 3,500. The charging scenarios are extremely complex, encompassing various vehicle types such as private cars, taxis, ride-hailing vehicles, and logistics vehicles, with charging power ranging from 60kW to 360kW. Furthermore, it is affected by multiple factors such as grid load fluctuations, ambient temperature changes, and battery aging, leading to frequent equipment failures and abnormal states. Traditional charging monitoring systems mainly rely on independent threshold alarm mechanisms for each charging pile, such as triggering alarms when the voltage exceeds 4.2V, the current exceeds 250A, or the temperature exceeds 65℃. This single-dimensional static judgment method has serious lag and cannot identify coupled faults between devices. The false alarm rate remains high, especially in extreme weather conditions such as high temperatures in summer or low temperatures in winter. The system is almost in a state of alarm storm, and maintenance personnel are overwhelmed and unable to deal with truly dangerous faults in a timely and effective manner.
[0038] In practical deployment, the method of this invention completely changes the original monitoring paradigm. The platform first synchronously collects real-time voltage, current, and battery temperature time-series data of all charging devices at a frequency of 10 Hz through BMS communication modules, high-precision Hall sensors, and NTC thermistors deployed inside each charging pile. Subsequently, based on the physical layout of the charging station and the power distribution topology, the system automatically constructs a dynamic graph structure with charging piles as graph nodes and DC buses and AC input feeders as edges. The voltage, current, and temperature time-series data of each charging pile, after preprocessing, are assigned the initial characteristics of the corresponding graph node. This graph input dataset is fed into the core model of this invention in real time. The Mamba-2 network performs deep temporal encoding on the historical operating status of each charging pile, capturing early signs of performance degradation or abnormal fluctuations. Next, the improved GATv2 model, incorporating a hybrid expert mechanism, dynamically schedules sub-networks such as overcurrent experts, overtemperature experts, and connection anomaly experts based on the real-time operating conditions of each node. This accurately analyzes the interaction between the charging pile and its physically connected neighboring piles, for example, whether an overcurrent in a pile is caused by a voltage sag due to the sudden start-up of a neighboring pile. Finally, the state classifier outputs the precise status of each charging pile, which is highlighted in different colors on the visualization interface of the operation and maintenance platform.
[0039] During a three-month continuous comparative test, we meticulously recorded the performance of our invention's method and the traditional threshold alarm method within the same city's charging network. Table 1 below shows the performance comparison data of the two methods under four typical charging anomaly scenarios during the test period: Table 1. Performance Comparison Data Between the Invention and Traditional Thresholding Methods
[0040] Based on the comparative data shown in Table 1, it can be seen that the state recognition method based on graph neural network proposed in this invention has significant performance advantages over the traditional threshold method in monitoring parallel charging of multiple devices, especially in terms of recognition accuracy, early warning timeliness, and control of false alarms and missed alarms.
[0041] In terms of recognition accuracy, this invention achieved a high level of over 95% in all four types of abnormal scenarios, far exceeding the average accuracy of approximately 69% for traditional methods. For example, in connection anomaly scenarios, traditional methods rely solely on current surges for judgment, resulting in extremely weak ability to identify complex situations such as poor contact, with an accuracy of only 54.5%. In contrast, this invention, by integrating the temporal correlation between voltage, current, and temperature, accurately captures subtle feature fluctuations, improving the accuracy to 95.4% and effectively avoiding potential heat accumulation risks.
[0042] The advantages of this invention are particularly prominent in terms of early warning timeliness. Traditional methods are essentially reactive, with response times often being negative, while this invention achieves proactive early warning. For example, in an "over-temperature state" scenario, this invention can issue an early warning on average 45.6 seconds in advance, buying valuable time for the system to take intervention measures such as reducing power or initiating heat dissipation, thus nipping many potential accidents in the bud.
[0043] The invention also demonstrates significant advantages in controlling false alarm and false negative rates. The average false alarm rate is controlled at approximately 2.2%, and the false negative rate is as low as 2.4%. Compared to the nearly 25% false alarm rate and 31% false negative rate of traditional methods, this greatly improves the effectiveness of alarms and the reliability of the system, allowing maintenance personnel to focus on handling truly valuable alarms. Overall, this invention achieves intelligent and proactive identification of charging status through precise spatiotemporal dynamic modeling, possessing extremely high practical application value.
[0044] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for identifying the parallel charging status of multiple devices based on graph neural networks, characterized in that, Includes the following steps: S1. Synchronously collect real-time running data, and obtain the initial feature vector after preprocessing; S2. Based on the topology of the parallel charging network, construct a graph structure and use the initial feature vectors as the initial features of the corresponding graph nodes to generate the graph input dataset. S3. Input the graph input dataset into the Mamba-2 network, use the state space dual framework to process the temporal sequence of each graph node in parallel, independently encode the time dynamic evolution mode of each charging device, and output the graph node feature vector. S4. Input the graph node feature vectors into the improved GATv2 model and introduce a hybrid expert mechanism. Through the gating network, different expert sub-networks are dynamically selected and activated to aggregate neighbor information based on the real-time status of each graph node. This deeply mines and encodes the mutual influence and spatial coupling relationship between charging devices and outputs high-dimensional feature vectors. S5. Decode and pattern recognize each high-dimensional feature vector, map it to the preset charging state category, generate graph node state recognition results, and obtain the overall charging state recognition results of all graph nodes. S6. Based on the overall charging status identification results, generate and output the corresponding visual status map, and highlight the charging device nodes in abnormal status in a graphical manner.
2. The method for identifying the parallel charging status of multiple devices based on graph neural networks according to claim 1, characterized in that, S1 specifically includes: S11. Real-time operating data of each charging device in the parallel charging network are collected synchronously by voltage sensors, current sensors and temperature sensors deployed inside each charging device. S12. Perform data normalization processing on the collected voltage, current and temperature time series data of each charging device, and perform sliding window truncation processing on the normalized time series data. According to the preset time window length and step size, the continuous time series data is divided into multiple data segments of a set length. S13. Concatenate the voltage, current and temperature data in each data segment in chronological order to generate an initial feature vector corresponding to each data segment.
3. The method for identifying the parallel charging status of multiple devices based on graph neural networks according to claim 1, characterized in that, S2 specifically includes: S21. Read a pre-stored topology connection table with a two-column, multi-row structure. Each row contains unique identifiers for two charging devices, indicating that there is an electrical connection between the two charging devices. S22. Create an empty list of graph nodes, iterate through all unique identifiers in the topology connection table, add each unique identifier as an independent graph node to the list of graph nodes, create an empty list of edges, iterate through each row of the topology connection table, add the graph nodes corresponding to the two unique identifiers in the row as a graph node pair, and add the graph node pair as a tuple to the list of edges. S23. Assign the initial feature vector to the graph nodes with the same unique identifier in the graph node list one by one according to the unique identifier of the corresponding charging device, as the initial feature attribute of the graph node. Then, concatenate the graph node list, edge list and the initial feature attributes attached to each graph node in order to form the graph input dataset.
4. The method for identifying the parallel charging status of multiple devices based on graph neural networks according to claim 1, characterized in that, S3 specifically includes: S31. Input the graph input dataset into the Mamba-2 network, and process the initial feature vector of the graph input dataset as an independent temporal sequence in the input layer; S32. After the time series of each graph node enters the scanning layer of the Mamba-2 network, a selective scanning mechanism is executed. The initial feature vector of each time step in the time series is mapped to a time step vector and a data projection vector through a preset independent linear projection layer. Each element of the time step vector is activated by a Softplus function to generate a time step parameter vector. S33. Multiply each element of the time step parameter vector with each corresponding element of the preset state transition matrix to obtain a first intermediate matrix. Calculate the exponential function with base e for each element of the first intermediate matrix to obtain the discretized state transition matrix. S34. Multiply each element of the time step parameter vector with each corresponding element of the input matrix to obtain a second intermediate matrix. Subtract the corresponding element of the identity matrix from each element of the discretized state transition matrix to obtain a difference matrix. Calculate the inverse of the first intermediate matrix and perform matrix multiplication with the difference matrix, then perform matrix multiplication with the second intermediate matrix to obtain the discretized input matrix. S35. Perform matrix multiplication between the hidden state of the previous time step and the discretized state transition matrix to obtain the state transfer result. Perform matrix multiplication between the discretized input matrix and the data projection vector to obtain an input influence result. Add the state transfer result and the input influence result element by element to obtain the hidden state of the current time step. S36. The initial feature vector of the current time step is dynamically generated into an output matrix through another preset independent linear projection layer. The hidden state of the current time step is multiplied with the dynamically generated output matrix to obtain the output of the current time step. S37. Input the initial hidden state into the state space dual framework of the Mamba-2 network, which contains a forward propagation path and a backward propagation path. The forward propagation path traverses the initial hidden state in ascending time order, and the backward propagation path traverses the initial hidden state in reverse time order. The two-way parallel execution captures the past dependencies and future context in the time series data. S38. Concatenate the outputs of the forward propagation path and the backward propagation path into vectors to generate a fused hidden state. Input the fused hidden state into a gated linear unit to perform a linear transformation on the fused hidden state and multiply it element-wise with the original fused hidden state to generate the final encoding result of the graph node. Perform the same steps in parallel on all graph nodes and summarize the final encoding results of all graph nodes to form the graph node feature vector.
5. The method for identifying the parallel charging status of multiple devices based on graph neural networks according to claim 4, characterized in that, The input matrix specifically includes: reading a pre-stored topology connection table, where each row of the topology connection table records the unique identifiers of two charging devices that are electrically connected; creating an empty matrix equal to the total number of charging devices, with the rows and columns of the empty matrix corresponding to all charging devices, forming the initial input matrix; traversing each row of the topology connection table, finding the corresponding row and column numbers in the input matrix based on the unique identifiers of the two charging devices in the row, and setting the value of the element at the intersection position to 1, indicating that there is a connection between the two charging devices; and obtaining the input matrix after traversal.
6. The method for identifying the parallel charging status of multiple devices based on graph neural networks according to claim 1, characterized in that, S4 specifically includes: S41. Input the graph node feature vector into the gated network of the improved GATv2 model and treat it as a row vector. Multiply it with the preset weight matrix of the gated network to obtain an intermediate vector. The dimension of the intermediate vector is equal to the total number of preset expert subnetworks. Calculate the Sigmoid function for each element in the intermediate vector to generate the expert selection weight vector. S42. Perform Top-k sparsity operation on the expert selection weight vector. Find the top k elements with the largest values in the expert selection weight vector, where k is a preset positive integer hyperparameter. Create a new vector with the same dimension as the expert selection weight vector and all elements are zero. Copy the top k largest elements to the same position in this all-zero vector according to their positions in the expert selection weight vector to obtain a sparsified expert selection weight vector. S43. For each non-zero element in the sparse expert selection weight vector, the corresponding expert subnetwork is computed in parallel. The expert subnetwork obtains the graph node feature vectors of the central graph node and all neighboring graph nodes directly connected to the central graph node, and multiplies them by the expert subnetwork’s proprietary preset weight matrix to obtain two transformed graph node feature vectors. S44. Concatenate the two transformed graph node feature vectors into a long vector in sequence. Perform a dot product operation between the long vector and the expert subnetwork’s proprietary preset attention weight vector to obtain an intermediate value. Add this intermediate value to the preset attention bias scalar to obtain the unactivated attention score and execute the LeakyReLU activation function. If the score is negative, multiply it by a preset positive slope of less than 1; otherwise, leave it unchanged to obtain the unnormalized attention coefficient. S45. After performing weighted summation and activation on all neighbor nodes, put all the obtained unnormalized attention coefficients together and normalize them using the Softmax function to obtain normalized attention coefficients. Multiply each normalized attention coefficient by the graph node feature vector of the corresponding neighbor node after transformation, and add all the product results element by element to obtain the neighbor aggregation feature vector output by the expert subnetwork. S46. Multiply the neighbor aggregation feature vector output by each activated expert subnetwork by a scalar multiplication with the corresponding non-zero element in the sparse expert selection weight vector to obtain the weighted neighbor aggregation feature vector. Add all the weighted neighbor aggregation feature vectors element by element to obtain the final neighbor aggregation feature vector. S47. The final neighbor aggregation feature vector is input into the graph node feature vector of the improved GATv2 model without any processing. The vector is added element by element, and residual connections are performed. The vector of addition is input into a normalization layer. The arithmetic mean of all elements of the vector of addition is calculated, and the square of the difference between each element and the mean is calculated. The variance is obtained by adding all the squared differences and dividing by the number of elements. S48. For each element in the summed vector, subtract the mean and divide by the square root of the variance to obtain a standardized vector. Multiply the standardized vector by a preset scaling parameter and add a preset translation parameter to obtain a high-dimensional feature vector.
7. The method for identifying the parallel charging status of multiple devices based on graph neural networks according to claim 1, characterized in that, S5 specifically includes: S51. Input the high-dimensional feature vector into the preset fully connected layer, perform multiplication with the preset weight matrix of the fully connected layer to obtain the intermediate classification vector, and perform a preset Dropout operation on each element in the intermediate classification vector to randomly set the element to zero with a preset probability to obtain the regularized classification vector. S52. Input the classification vector into the preset Softmax activation layer, calculate the exponential function with base e for all elements in the classification vector, and divide each exponential result by the sum of all exponential results to obtain the probability distribution vector. S53. Read the preset charging state category list, which includes normal charging state, overcurrent state, overtemperature state, charging saturation state and connection abnormal state. Find the element with the largest value in the probability distribution vector, record the index position of the element, and search for the corresponding charging state category in the charging state category list according to the index position to obtain the graph node state recognition result. S54. After performing the same operation on the high-dimensional feature vectors of all graph nodes, the state recognition results of all graph nodes are obtained and output as the overall charging state recognition results.
8. The method for identifying the parallel charging status of multiple devices based on graph neural networks according to claim 1, characterized in that, S6 specifically includes: in the blank visualization map, traversing all device map nodes, reading the overall charging status identification result, comparing the status identification result of each node in the overall charging status identification result with the preset charging status category list, if the node status identification result is in the overcurrent state, overtemperature state, charging saturation state or connection abnormal state, then setting the color of the device map node in the visualization map to the corresponding preset warning color, if the node status identification result is in the normal charging state, then setting it to the preset normal color, and generating a visualization status map.
Citation Information
Patent Citations
Power system emergency control method and system fusing DRL and STGNN
CN120810558A
New energy charging SaaS operation management method based on artificial intelligence
CN121073235A