Disclosure of Invention
(One) solving the technical problems
Aiming at the defects of the prior art, the invention provides a charging data real-time processing method and a charging data real-time processing system applied to a charging information platform, which realize the real-time and efficient processing of charging data by means of constructing topological structures of charging piles and a power network, calculating edge weights, dividing sub-networks, optimizing a data transmission path in real time and the like, improve the data processing capacity and the response speed of the charging information platform and provide higher-quality charging service for electric automobile users.
(II) technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme that the charging data real-time processing method applied to the charging information platform comprises the following steps:
Collecting geographic position information of all charging piles, including longitude and latitude coordinates, numbers of the charging piles and information of convergence points accessed to a power grid, and constructing a topological structure of a charging pile network;
Collecting historical charging data, calculating the weight of edges between the child nodes and the father nodes through the charging amount of the child nodes and the physical distance between the child nodes and the father nodes, calculating the weight of edges between the father nodes through the charging amount of the father nodes and the physical distance between the father nodes, and updating the weight of corresponding edges in the topological structure of the charging pile network;
selecting an initial parent node to construct a sub-network, expanding the sub-network based on the weight of edges between each parent node, dividing a charging pile network into a plurality of sub-networks, checking whether parent nodes which are not added to any sub-network exist, and determining a central parent node of each sub-network;
And collecting voltage and current data among father nodes in real time, calculating the fluctuation rate, determining an optimal path based on a network topology structure of the charging pile, collecting charging data during charging, calculating a charging data average value by using a sliding window, and reselecting the optimal path if the charging data average value exceeds a fluctuation threshold value.
Further, constructing a topology structure of the charging pile network, specifically including:
Defining each charging pile as a child node, allocating a unique identifier to each child node, defining a convergence point of the charging pile accessing the power grid as a father node, and allocating a unique identifier to each father node;
Determining edges between the child nodes and the father nodes according to the connection relation between the charging piles and the power grid convergence points, and determining edges between the father nodes according to the connection relation between the power grid convergence points, wherein each edge contains directional information;
Initializing an empty graph structure, wherein the graph structure is used for storing nodes and edges, adding child nodes and father nodes into the graph to serve as vertex sets of the graph, adding edges into the graph according to connection relations, and connecting the corresponding child nodes and father nodes.
Further, the weight of the edge between the child node and the parent node is calculated by the charge amount of the child node and the physical distance between the child node and the parent node: Wherein ωs,p represents the weight of the edge between the child node s and its parent node p, Es represents the historical average power consumption of the child node s, Ds,p represents the physical distance between the child node s and its parent node p, child (p) represents all the child node sets of the parent node p;
Further, the weights of the edges of the parent nodes are calculated by the charge amount of the parent nodes and the physical distance between the parent nodes: Wherein ωp1,p2 represents the weight of the edge between the parent nodes p1 and p2, Ep1 and Ep2 represent the historical average power consumption of the parent nodes p1 and p2, respectively, Dp1,p2 represents the physical distance between the parent nodes p1 and p2, and parent_ pairs represents the set of all parent node pairs.
Further, the charging pile network is divided into a plurality of sub-networks, which specifically comprises:
s1, creating an empty list for storing the divided sub-networks, initializing a variable for tracking the identifier of the current sub-network;
S2, randomly selecting a father node as a starting point of a current sub-network, and adding the father node and directly connected sub-nodes and edges thereof into the current sub-network;
S3, checking the weight of the edge between each father node and other father nodes in the current sub-network, and if the weight of the edge between the current father node and other father nodes in the current sub-network is lower than a preset weight threshold, adding the father node and the directly connected child nodes and edges thereof into the current sub-network until new father nodes and child nodes cannot be added into the current sub-network;
And S4, traversing all the father nodes, checking whether the father nodes which are not added to any child network exist or not, if so, repeating the steps S2-S3, and adding the father nodes and the child nodes and edges thereof into a new child network.
Further, determining a central parent node of each sub-network specifically includes:
For each divided sub-network, calculating the approximate centrality index of all the father nodes, selecting the father node with the highest approximate centrality index as the central father node of the sub-network, and adopting an approximate centrality index calculation formula: where Cc (p) represents a near centrality index for node p, N represents the total number of nodes in the subnetwork, and d (p, q) represents the shortest path length between node p and node q.
Further, determining an optimal path based on the network topology structure of the charging pile specifically includes:
Calculating the fluctuation rate of the father node pair according to the voltage and current data between each father node pair, generating data transmission paths between all father nodes based on the constructed charging pile network topology structure, and calculating the stability index of each candidate path according to the fluctuation rate of all father node pairs on the path: Wherein μ represents a stability index, σi represents a fluctuation rate of the ith parent node pair of the path, K represents the number of the parent node pairs of the path, and a path with the highest stability index is selected as an optimal path.
Further, the optimal path is reselected, specifically including:
when the electric automobile is connected to the charging pile and starts to charge, charging data in the charging process are collected in real time through a sensor arranged in the charging pile, the charging data are ordered according to time stamps, a charging data sequence is constructed, and the charging data are transmitted to a charging information platform through an optimal path by using a power line communication technology.
Further, setting the size and the step length of the sliding window, creating a first sliding window from the initial position of the charging data sequence, accumulating the charging data in the sliding window to obtain an accumulated sum, calculating the ratio of the accumulated sum to the window size to obtain the average value of the charging data in the sliding window, and if the average value of the charging data in the sliding window exceeds a preset fluctuation threshold value, re-determining the optimal path.
Charging data real-time processing system applied to charging information platform includes:
The network topology construction module is used for collecting geographic position information of all charging piles, including longitude and latitude coordinates, numbers of the charging piles and information of convergence points of an access power grid, and constructing a topology structure of a charging pile network;
The topological structure analysis module is used for collecting historical charging data, calculating the weight of the edge between the child node and the father node through the charging amount of the child node and the physical distance between the child node and the father node, calculating the weight of the edge between the father node through the charging amount of the father node and the physical distance between the father node, and updating the weight of the corresponding edge in the topological structure of the charging pile network;
The sub-network dividing module is used for selecting an initial parent node to construct a sub-network, dividing a charging pile network into a plurality of sub-networks based on the weight expansion sub-network of the edges between the parent nodes, checking whether the parent nodes which are not added to any sub-network exist or not, and determining the central parent node of each sub-network;
The data processing module is used for collecting voltage and current data among father nodes in real time, calculating the fluctuation rate, determining an optimal path based on a charging pile network topology structure, collecting charging data during charging, calculating a charging data average value by using a sliding window, and reselecting the optimal path if the charging data average value exceeds a fluctuation threshold value.
(III) beneficial effects
The invention provides a charging data real-time processing method and a system applied to a charging information platform, which have the following beneficial effects:
(1) By constructing the topological structure of the charging pile network, the connection relation between the charging pile and the power grid convergence point and the energy flow direction can be clearly displayed, which is helpful for optimizing the data transmission path, reducing the delay and loss of data in the transmission process, and by utilizing the characteristics of the topological structure, the rapid routing and forwarding of the data can be realized, and the real-time performance and reliability of the data transmission are improved.
(2) By collecting and processing historical charging data, the weights of the sides (connections) in the charging stake network are calculated and updated, the calculation of the weights taking into account the charge and physical distance, helping to identify critical paths for transmitting data in the network. By optimizing the data transmission on these critical paths, the transmission efficiency of the overall network can be improved.
(3) The whole charging pile network is divided into a plurality of sub-networks, the data processing amount in each sub-network is obviously reduced, the complexity of data processing is reduced, the data processing efficiency is improved, meanwhile, due to the fact that the number of nodes in the sub-networks is limited, the delay and the error rate of data transmission are correspondingly reduced, the division of the sub-networks is carried out according to factors such as charging characteristics and physical distances among father nodes, the fact that the nodes in each sub-network have stronger relevance is guaranteed, interference and noise in the data transmission process are reduced, and the reliability of data transmission is improved.
(4) The change of the state of the power grid can be found in time by collecting the voltage and current data among the father nodes in real time and calculating the fluctuation rate, and the stability index of the path is calculated based on the charging pile network topology structure and the fluctuation rate of the father nodes, so that the optimal data transmission path is selected, the network structure of power communication is optimized, and the stability and the reliability of data transmission are ensured.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1-2, the present invention provides a method for processing charging data in real time, which is applied to a charging information platform, and includes the following steps:
collecting geographical position information of all charging piles, including longitude and latitude coordinates, numbers of the charging piles and information of convergence points accessed to a power grid, and constructing a topological structure of a charging pile network;
The first step comprises the following steps:
step 101, collecting geographic position information of all charging piles, including longitude and latitude coordinates, numbers of the charging piles and information of convergence points (namely father node information) of an access power grid;
102, defining each charging pile as a child node, allocating a unique identifier (such as a charging pile number) to each child node, defining a convergence point of the charging pile accessing the power grid as a father node, and allocating a unique identifier to each father node;
Step 103, determining edges (connection) between the child nodes and the father nodes according to the connection relation between the charging piles and the power grid convergence points, and determining edges between the father nodes according to the connection relation between the power grid convergence points, wherein each edge comprises directivity information (such as the direction from the child node to the father node or the direction from the father node to the child node or the direction from the father node to the father node) so as to represent the direction of energy flow;
It should be noted that, the power grid convergence point refers to a convergence point of the charging piles accessing the power grid, usually is an output end of a transformer substation or a distribution substation, and is used as an electric power source of a plurality of charging piles, and has a function of distributing electric energy to each charging pile, and in a topology structure of the charging pile network, the power grid convergence point is abstracted into a father node and is connected with a child node (charging pile) through an edge;
The connection relation between the child node (charging pile) and the father node (power grid convergence point) represents a specific path of the charging pile connected to the power grid, in the topological structure, the connection relation is represented by a directional edge, and the direction of the edge points to the father node from the child node, so that electric energy flows to the charging pile from the power grid convergence point;
Connection relations between the grid convergence points can exist, which are usually used for realizing redundant backup, load balancing or optimizing electric energy distribution of the power grid, and in the topological structure of the charging pile network, the connection relations between the grid convergence points are also represented by directed edges, and the directions of the edges can be changed according to the actual running condition of the power grid, so that the flowing directions of electric energy among different grid convergence points are represented;
When determining the directional information of the edge, the directional information of the edge needs to be determined according to the actual operation condition of the power grid, for example, in normal conditions, electric energy flows from a power grid convergence point to a charging pile, so that the direction of the edge points to a child node from a father node, but in certain special conditions (such as power grid faults or maintenance), electric energy may need to flow back from other power grid convergence points or the charging pile, and at the moment, the direction of the edge may change;
Step 104, initializing an empty graph structure by using the basic concept of graph theory, wherein the graph structure can store nodes and edges, and the child nodes and the father nodes defined in the step 102 are added into the graph to be used as a vertex set of the graph;
It should be noted that, according to the connection relationship and the weight (the initial weight is set as the distance) between the charging pile and the power grid convergence point, an adjacency matrix or adjacency table is constructed to represent the topology structure of the charging pile network, the adjacency matrix is a two-dimensional array, wherein the elements represent the connection relationship and the weight between the nodes, the adjacency table is a list of lists, and each list comprises other nodes directly connected with the corresponding nodes and weights thereof.
Step 105, adding edges into the graph according to the connection relation defined in step 103, connecting corresponding child nodes and father nodes, and simplifying the adding process of the edges by using functions in a graph theory library or a framework;
and 106, verifying the correctness of the graph structure, ensuring that no isolated node or unconnected edge exists, and carrying out necessary adjustment on the graph structure according to actual conditions, such as correcting the wrong connection relationship or adding the missing edge, when all nodes and edges are correctly added into the graph, and after the graph structure is verified and adjusted, completing the topology structure construction of the charging pile network.
In use, the contents of steps 101 to 106 are combined:
By constructing the topological structure of the charging pile network, the connection relation between the charging pile and the power grid convergence point and the energy flow direction can be clearly displayed, which is helpful for optimizing the data transmission path, reducing the delay and loss of data in the transmission process, and by utilizing the characteristics of the topological structure, the rapid routing and forwarding of the data can be realized, and the real-time performance and reliability of the data transmission are improved.
Step two, collecting historical charging data, calculating the weight of the edge between the child node and the father node through the charging amount of the child node and the physical distance between the child node and the father node, calculating the weight of the edge between the father node through the charging amount of the father node and the physical distance between the father node, and updating the weight of the corresponding edge in the topological structure of the charging pile network;
The second step comprises the following steps:
Step 201 of collecting historical charge data including historical charge data of each child node (charge stake), historical charge data of each parent node (grid convergence point), physical distance data between child node and parent node, and physical distance data between parent nodes,
It should be noted that, the charge amount data of each charging pile (child node) recorded by the charge amount data at time intervals (such as day, week and month) and the total charge amount received or distributed by each grid convergence point (parent node), the charge amount data of the parent node needs to be summarized and calculated according to the charge amount data of the child node, the physical distance between the child node and the parent node is usually static and can be obtained through a Geographic Information System (GIS) or actual measurement, and the mutual distance between the parent nodes is also obtained in a similar way;
Step 202, calculating the weight of the edge between the child node and the father node through the charge amount of the child node and the physical distance between the child node and the father node: Wherein ωs,p represents the weight of the edge between the child node s and its parent node p, Es represents the historical average power consumption of the child node s, Ds,p represents the physical distance between the child node s and its parent node p, child (p) represents all the child node sets of the parent node p;
step 203, calculating the weight of the edges of the parent nodes by the charge amount of the parent nodes and the physical distance between the parent nodes: Wherein ωp1,p2 represents the weight of the edge between the parent nodes p1 and p2, Ep1 and Ep2 represent the historical average power consumption of the parent nodes p1 and p2, respectively, Dp1,p2 represents the physical distance between the parent nodes p1 and p2, and parent_ pairs represents the set of all parent node pairs;
step 204, using the weights obtained in step 202 and step 203 to update the weights of the corresponding edges in the graph structure constructed in step one.
It should be noted that, ensuring that each edge (whether the edge from the child node to the parent node or the edge between the parent nodes) has a weight correctly set, after updating the weight, verifying the correctness of the graph structure is required, and ensuring that there are no isolated nodes or edges with weights incorrectly set can be accomplished by traversing the graph structure and checking the weight value of each edge.
In use, the contents of steps 201 to 204 are combined:
By collecting and processing historical charging data, the weights of the sides (connections) in the charging stake network are calculated and updated, the calculation of the weights taking into account the charge and physical distance, helping to identify critical paths for transmitting data in the network. By optimizing the data transmission on these critical paths, the transmission efficiency of the overall network can be improved.
Selecting an initial parent node to construct a sub-network, dividing a charging pile network into a plurality of sub-networks based on the weight expansion sub-network of the edges between the parent nodes, checking whether the parent nodes which are not added to any sub-network exist or not, and determining the central parent node of each sub-network;
The third step comprises the following steps:
Step 301, creating an empty list or data structure for storing the divided sub-networks, initializing a variable for tracking the number or identifier of the current sub-network;
Step 302, selecting a parent node as a starting point of a current sub-network randomly or according to strategies such as charge amount size, geographical position distribution and the like, for example, selecting a parent node with the largest charge amount or a parent node with the most center of the geographical position as the starting point, and adding the parent node and the directly connected child nodes and edges thereof into the current sub-network;
Step 303, for each father node in the current sub-network, checking the weight of the edge between the father node and other father nodes, if the weight of the edge between the current father node and other father nodes in the current sub-network is lower than a preset weight threshold (which indicates that the charging characteristics of the father node and other father nodes are similar or the physical distance is closer), adding the father node and the directly connected child nodes and edges thereof into the current sub-network, and repeating the process until new father nodes and child nodes cannot be added into the current sub-network;
It should be noted that, the preset weight threshold plays an important role in the sub-network dividing process, if the threshold is set too high, the number of sub-networks may be too large and the scale may be too small;
Step 304, traversing all father nodes, checking whether there is a father node which is not added to any child network, if so, repeating steps 302 to 303, and adding the father node and child nodes and edges thereof to a new child network;
When the division of the sub-network is completed, checking the result of the division of the sub-network to ensure that each father node and the sub-node belong to only one sub-network and have no isolated node or sub-network, and if a problem is found, adjusting the division of the sub-network is needed;
Step 305, for each divided sub-network, calculating the centrality index of all father nodes, selecting the father node with the highest centrality index as the central father node of the sub-network, wherein the centrality index comprises centrality, proximity centrality, betweenness centrality and the like, for example, selecting the proximity centrality index as the centrality index, and the proximity centrality index calculating formula:
wherein Cc (p) represents a near centrality index of the node p, N represents a total number of nodes in the sub-network, and d (p, q) represents a shortest path length between the node p and the node q;
in use, the contents of steps 301 to 305 are combined:
The whole charging pile network is divided into a plurality of sub-networks, the data processing amount in each sub-network is obviously reduced, the complexity of data processing is reduced, the data processing efficiency is improved, meanwhile, due to the fact that the number of nodes in the sub-networks is limited, the delay and the error rate of data transmission are correspondingly reduced, the division of the sub-networks is carried out according to factors such as charging characteristics and physical distances among father nodes, the fact that the nodes in each sub-network have stronger relevance is guaranteed, interference and noise in the data transmission process are reduced, and the reliability of data transmission is improved.
And step four, collecting voltage and current data among father nodes in real time, calculating the fluctuation rate, determining an optimal path based on a network topology structure of the charging pile, collecting charging data during charging, calculating a charging data average value by using a sliding window, and re-selecting the optimal path if the charging data average value exceeds a fluctuation threshold value.
The fourth step comprises the following steps:
step 401, collecting voltage and current data between each father node (a power grid convergence point) in real time through a sensor or monitoring equipment installed in a power grid, and calculating the fluctuation rate of the father node pair according to the voltage and current data between each father node pair: Where σp1,p2 denotes the ripple ratio of the parent node pair, Vp1,p2 (t) and Ip1,p2 (t) denote the voltage and current between parent node p1 and parent node p2 at time t,AndRespectively representing the average value of the voltage and the current, and M represents the number of data points;
step 402, based on the charging pile network topology structure constructed in the step one, generating data transmission paths among all the father nodes, and for each candidate path, calculating a stability index of the path according to the fluctuation rate of all the father node pairs on the path: Wherein μ represents a stability index, σi represents a fluctuation rate of the ith father node pair of the path, K represents the number of the father node pairs of the path, and a path with the highest stability index is selected as an optimal path;
step 403, when the electric automobile is connected to the charging pile and starts charging, collecting charging data in the charging process in real time through a sensor arranged in the charging pile, including but not limited to current, voltage, charging duration, charging power and charging amount, sequencing the charging data according to a time stamp, constructing a charging data sequence, wherein the charging data sequence includes but not limited to a current data sequence, a voltage data sequence and a charging power data sequence, and transmitting the charging data to a charging information platform through an optimal path by using a power line communication technology;
Step 404, setting the size of the sliding window, namely the data amount processed each time, setting the step length of the sliding window, namely the distance of each movement of the window, wherein the window size and the step length of the sliding window are set according to the data processing requirement, for example, the step length is set to be 1, which means that one data point is moved each time, and other values can be set;
Step 405, creating a first sliding window from the initial position of the charging data sequence, accumulating the charging data in the sliding window to obtain an accumulated sum, calculating the ratio of the accumulated sum to the window size to obtain the average value of the charging data in the sliding window, and repeating the steps 401 to 402 to re-determine the optimal path if the average value of the charging data in the sliding window exceeds a preset fluctuation threshold;
It should be noted that, the average value calculation is performed for a specific charging data (such as current and voltage), in practical application, the average values of different charging data need to be calculated respectively, and corresponding comparison and analysis are performed, and the setting of the fluctuation threshold needs to be adjusted according to the practical application scene and the data characteristics, so as to ensure that the operation of reselecting the optimal path can be triggered in time when the data is abnormal;
in use, the contents of steps 401 to 405 are combined:
the change of the state of the power grid can be found in time by collecting the voltage and current data among the father nodes in real time and calculating the fluctuation rate, and the stability index of the path is calculated based on the charging pile network topology structure and the fluctuation rate of the father nodes, so that the optimal data transmission path is selected, the network structure of power communication is optimized, and the stability and the reliability of data transmission are ensured.
Referring to fig. 3, the invention also provides a charging data real-time processing system applied to the charging information platform, which comprises a network topology construction module, a topology analysis module, a sub-network division module and a data processing module, wherein,
The network topology construction module is used for collecting geographic position information of all charging piles, including longitude and latitude coordinates, numbers of the charging piles and information of convergence points of an access power grid, and constructing a topology structure of a charging pile network;
The topological structure analysis module is used for collecting historical charging data, calculating the weight of the edge between the child node and the father node through the charging amount of the child node and the physical distance between the child node and the father node, calculating the weight of the edge between the father node through the charging amount of the father node and the physical distance between the father node, and updating the weight of the corresponding edge in the topological structure of the charging pile network;
The sub-network dividing module is used for selecting an initial parent node to construct a sub-network, dividing a charging pile network into a plurality of sub-networks based on the weight expansion sub-network of the edges between the parent nodes, checking whether the parent nodes which are not added to any sub-network exist or not, and determining the central parent node of each sub-network;
The data processing module is used for collecting voltage and current data among father nodes in real time, calculating the fluctuation rate, determining an optimal path based on a charging pile network topology structure, collecting charging data during charging, calculating a charging data average value by using a sliding window, and reselecting the optimal path if the charging data average value exceeds a fluctuation threshold value.
In the application, the related formulas are all the numerical calculation after dimensionality removal, and the formulas are one formulas for obtaining the latest real situation by software simulation through collecting a large amount of data, and coefficients in the formulas are set by a person skilled in the art according to the actual situation.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application.