Method for intelligently identifying power failure range of distribution network maintenance single line diagram based on OCS system
By applying image recognition and layout algorithms in the OCS system, combined with artificial intelligence recognition power outage scope, the problem of time -consuming and easy errors in the existing technologies to report power outage applications, and the power outage range and power outage range and power outage range and power outage range and power outage range and power outage range. The one -click generation of security measures improves the accuracy and efficiency of the maintenance application.
Patent Information
- Application Number
- CN202411366391.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
The existing power distribution network maintenance technology relies on manual filing of power outage applications and power outage ranges, which leads to time-consuming and labor-consuming and prone to inaccurate equipment identification and errors in judgment of power outage ranges, and lacks intelligent auxiliary tools.
The method of intelligent identification of the power outage range based on the OCS system is used to intelligently identify the power outage range. The single -line diagram equipment information is obtained through the image recognition and layout algorithm, and the power outage range is combined with artificial intelligence identification.
It has significantly improved the accuracy and efficiency of filling in the application application, reduced the complexity of user operation, improved the user experience, and reduced human errors, and improved the security and reliability of the power grid operation.
Smart Images

Figure CN119360084A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of power distribution network maintenance, and in particular relates to a method for intelligently identifying a power outage range based on a distribution network maintenance single-line diagram of an OCS system. Background Art
[0002] In the field of power distribution network maintenance, existing technologies mainly rely on manual filling of power outage applications and power outage scope. Maintenance personnel need to manually consult the complex distribution network single-line diagram, judge the equipment to be repaired and its related lines based on experience, and then determine the power outage scope. This process is not only time-consuming and labor-intensive, but also prone to errors due to human factors, such as inaccurate equipment identification and misjudgment of the power outage scope. In addition, the existing technology lacks intelligent auxiliary tools, making it difficult to effectively improve the efficiency and accuracy of maintenance application filling. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method for intelligently identifying the power outage range of the distribution network maintenance single-line diagram based on the OCS system, which can realize one-click generation of the power outage range and safety measures from the distribution network maintenance single-line diagram, significantly improving the accuracy and efficiency of filling in the maintenance application; at the same time, reducing the complexity of user operations and improving user experience.
[0004] The technical solution of the present invention is: a method for intelligently identifying the power outage range of a distribution network maintenance single-line diagram based on an OCS system, comprising: automatically generating a single-line diagram based on image recognition and layout algorithm to obtain single-line diagram equipment information and identifying the power outage range based on artificial intelligence, wherein the method of automatically generating a single-line diagram based on image recognition and layout algorithm to obtain single-line diagram equipment information includes the following steps:
[0005] (1) Initialization: Collect the location, type and electrical connection relationship information of all equipment from the electrical single-line diagram, extract, classify and process these data, integrate geographic information with equipment data, and construct a preliminary layout space. The layout of the electrical single-line diagram adopts the functional layout method or the location layout method;
[0006] (2) Obtaining the device structure relationship: Using the DOM-API based on the tree model, the entire XML document is loaded into the memory in a tree structure;
[0007] (3) Topological relationship preservation: Use the connection point-device-device class type-connection point model to describe the connection relationship between devices. The parsed structural relationship is recorded in the common element topology relationship table, the station building internal topology relationship table, and the station building external topology relationship table according to the device type. When processing station building elements, the station building internal topology relationship table is used for connection. After the layout is completed, the common element topology relationship table and the station building external topology relationship table are used for connection.
[0008] (4) Initialize the graph model:
[0009] S1. Initialization: Let the connected network N = (V, E), where V represents the vertex set and E represents the edge set;
[0010] S2, sorting: sort all edges from small to large cost;
[0011] S3. Select edges: Select the edges with the smallest cost in turn. For each edge, check whether the two vertices connected by it belong to different connected components. If they belong to different connected components, add the edge to the minimum spanning tree and merge the two connected components. If the two vertices are on the same connected component, discard the edge and select the next smallest edge.
[0012] S4, repeat selection: repeat step S3 until all vertices are in the same connected component, that is, a connected minimum spanning tree is formed;
[0013] (5) Trunk line identification:
[0014] S1. Trunk line identification: starting from the source point and ending at the leaf node, find the longest branch line as the trunk line;
[0015] S2. Construct other branches: Starting from the bifurcation node on the main line, construct other branches at all levels step by step;
[0016] S3, establish mapping relationship: establish a one-to-many mapping relationship between the parent branch and the child branch;
[0017] (6) Node coordinate setting: Set the coordinates of nodes on the branch line. Odd-numbered branches are placed horizontally, even-numbered branches are placed vertically, and branches of the same level are placed alternately in the up-down or left-right direction. Determine the number of columns and rows to be displayed, set the width, height and spacing of the first element, and calculate the width and spacing of each column based on the number of columns and element size. For each element, calculate its row and column number based on its sequence number in the list. Calculate the X and Y coordinates of the element based on the row and column number and the element's width, height, spacing and other parameters, and perform positioning.
[0018] (7) Handling intersections and overlaps: Using a breadth-first search algorithm. The programming idea of the breadth-first search algorithm is to use an array q to simulate queue operations, with front as the head pointer and rear as the tail pointer. Initially, front = rear = 0. The queue entry operation is q[rear++] = cur; the queue exit operation is cur = q[front++]; the position coordinates (x, y) of the square brick are defined as Node type in the program, and an array int is defined. visit[N][N] marks whether a brick has been walked through, visit[i][j]=0 means that the brick at the coordinate (i, j) has not been walked through, visit[i][j]=1 means that the brick at the coordinate (i, j) has been walked through, and initially all element values of the visit array are 0; the algorithm steps of the breadth-first search algorithm are: put the starting point (startx, starty) into the queue q, and set visit[startx][starty]=1, indicating that the brick at this location has been processed and will not be searched again; pop the head element of the queue q to obtain a current device cur and a device count (sum++), search for untraveled devices and lines in the four directions of up, down, left, and right, and put the coordinates of the found devices and lines into the queue q; repeat the previous step until the queue q is empty, and all the devices and lines that can be walked through are found;
[0019] (8) Generate an interactive single-line diagram: According to the nodes, branches and layout information generated in steps (1) to (7), a distribution single-line diagram is automatically generated, and a greedy algorithm based on 8 neighborhoods is used to add annotations to the equipment. The algorithm steps of the greedy algorithm are as follows:
[0020] S1. Initialization: Set the coordinate set of the device D = {(x1, y1), (x2, y2), ..., (x n ,y n )}, where each coordinate represents the position of a device, sets the default size and rotation angle of the annotation, and creates an empty data structure to store the position and properties of the annotation;
[0021] S2, define 8 neighborhoods: for a device (x i ,y i ), whose 8 neighborhoods include the positions in the top, bottom, left, right and four diagonal directions, and the position in each direction is adjusted according to the size of the device and the size of the annotation, so that the annotation does not overlap with the device and does not exceed the preset boundaries;
[0022] S3, Greedy Selection Strategy: For each device (x i ,y i), traverse each possible position in its 8-neighborhood, evaluate the feasibility of each position, and consider the following factors: space constraints: the label cannot exceed the preset boundary, non-overlapping: the label cannot overlap with the placed labels or devices, readability: the label is far away from other labels, based on the above evaluation, select an optimal position to place the label;
[0023] S4. Place annotation: place annotation at the selected optimal position and record its position, direction and equipment information;
[0024] S5, iterative processing: repeat steps S2 to S4 for each device in set D until all devices are labeled, optimized and adjusted: after all devices are labeled, re-evaluate the positions of adjacent labels and exchange the positions of adjacent labels, and output a final layout diagram or data structure containing all devices and their labels;
[0025] The artificial intelligence-based power outage range identification includes the following steps:
[0026] (1) Establish a switch temporal database: store the status of switches on each line at a certain time point. The data sources include monitoring points on the switches and the switch positions of the distribution system.
[0027] (2) Real-time or timed analysis: The single-line diagram corresponding to the line is retrieved from the single-line diagram database, and the status of all switches on the line at this moment is retrieved from the switch temporal database. Based on the station-line-transformer-user topology relationship on the single-line diagram and the switch status at this moment, the line equipment status ST1 is calculated;
[0028] (3) Simulate the disconnected state of the device: simulate setting the specified device to the disconnected state, recalculate the line device state ST2, compare the line device state ST2 with ST1, and find out the set of devices that cause power outage due to the disconnection of the specified device;
[0029] (4) Determine the scope of the power outage area: Combine the geographical location information of the equipment and map the power outage equipment set onto the geographic map to obtain the scope of the power outage area;
[0030] (5) Data collection and preprocessing: Collect the single-line diagram data of the power system, including the line topology, equipment type and location, and switch status, and preprocess the single-line diagram data, including data cleaning, format conversion, and standardization;
[0031] (6) Real-time monitoring and fault detection: Use machine learning and deep learning to monitor the operating status of the power grid in real time, including current, voltage, and frequency, and identify possible fault points or abnormal conditions by comparing them with preset thresholds or models;
[0032] (7) Prediction of power outage scope: Combine the single-line diagram data and real-time monitoring results, use the gradient boosting decision tree algorithm to analyze the impact range of the fault point, use the training set data to train the model, adjust the model parameters to optimize the model performance, the model parameters include: learning rate, number of trees and tree depth, use the validation set data to verify the model, use the test set data to evaluate the performance of the model, including accuracy and recall, and finally use the precision rate to measure the accuracy of the model: calculate the F1 score. The higher the F1 score, the better the overall performance of the model. Through continuous model optimization training, adjust the F1 score to the ideal value. The F1 score indicates that the accuracy of the power outage range has reached the effective range. Apply the model to the OCS system software for calling, and the power outage range can be predicted;
[0033] The calculation formula of the accuracy is as follows:
[0034]
[0035] Among them, TP represents the number of samples that are actually positive and predicted as positive, and TN represents the number of samples that are actually negative and predicted as negative;
[0036] The calculation formula of the recall rate is as follows:
[0037]
[0038] Among them, TP represents the number of samples that are actually positive and predicted as positive, TN represents the number of samples that are actually negative and predicted as negative, and FN represents the number of samples that are actually positive but mistakenly predicted as negative.
[0039] The calculation formula of the F1 score is as follows:
[0040]
[0041] Among them, precision is the ratio of the number of positive samples correctly predicted by the model to the number of all predicted positive samples, and recall is the ratio of the number of samples correctly predicted by the model to the number of actual positive samples.
[0042] Furthermore, the common graphic element topology relationship table records the connection relationship between switches, distribution transformers and circuit breakers; the station topology relationship table records the connection relationship between the bus in the station building and the switches and transformers in the station; the station building external topology relationship table records the connection relationship between the internal equipment in the station building and the external equipment.
[0043] Furthermore, the path optimization method of the initialization graph model is:
[0044] S1. Assume that there is an arc (u,v) in the graph, and for the path (v0,v k )If (v0,u)+(u,vk )<(v0,v k ), then use the path (v0,u,v k ) instead of (v0,v k );
[0045] S2. Find the shortest path among all adjusted paths to further optimize connectivity and the weight of the spanning tree.
[0046] Furthermore, the expression of the mapping relationship is:
[0047] M[P k ]={P k1 , P k2 , ..., P km},
[0048] Among them, M represents the mapping table, P k Indicates the parent branch, P k1 , P k2 , ..., P km represents a sub-branch set, and m represents the number of sub-branches.
[0049] Furthermore, the calculation formula for the width and spacing of each column is:
[0050] W c =W e +S x ,
[0051] Among them, C represents the number of columns, W e Indicates the width of each element, S x Indicates the horizontal spacing, W c Indicates the width of each column;
[0052] The calculation formula for the row number and column number of each element is:
[0053]
[0054] L n = n mod C,
[0055] Among them, R n represents the row number, n represents the sequence number of the element and starts counting from 0, C represents the number of columns, L n Indicates the column number, Indicates rounding down, mod is the modulus operation, indicating the remainder;
[0056] The X and Y coordinates of the element are calculated as:
[0057] X n =L n ×(W e +Sx ),
[0058] Y n =R n ×(H e +S y ),
[0059] Among them, X n Indicates X coordinate, Y n Indicates the Y coordinate, L n Indicates the column number, W e Indicates the width of each element, S x Represents the horizontal spacing, R n Indicates the row number, H e Indicates the height of each element, S y Indicates the vertical spacing.
[0060] Furthermore, the selection of the optimal position is based on a cost function, and the steps of the method for selecting the optimal position are:
[0061] S1. Initialization: For each device position (x i ,y i ), define 8 neighborhood positions: top, bottom, left, right, and four diagonal placement points, set the size, default direction, and rotation angle of the annotation;
[0062] S2, evaluation area: for each device (x i ,y i ), traverse every possible position (x,y) in its 8-neighborhood (x i ,y i ) For each possible angle θ, for each combination (x, y, θ), calculate the cost function C(x, y, θ);
[0063] S3, Greedy selection: Select the combination that minimizes the cost function (x opt ,y opt ,θ opt ):
[0064]
[0065] Among them, x opt Indicates the optimal X coordinate position, y opt represents the optimal Y coordinate position, θ opt represents the optimal angle;
[0066] S4. Place the annotation: At the calculated optimal position (x opt ,y opt ) and direction θ opt Place annotations on the equipment and record and document their location, orientation, and equipment information;
[0067] S5. Iterative processing: Repeat steps S1 to S4 for all devices, and add annotations for each device one by one.
[0068] Furthermore, the cost function C(x, y, θ) is expressed as:
[0069] C(x, y, θ) = C boundary (x,y)+C overlap (x,y)+C readability (x,y)+C aesthetic (x, y, θ),
[0070] C overlap (x, y) = K overlap ×Overlap Factor,
[0071]
[0072] C aesthetic (x, y, θ) = K aesthetic ×Aesthetic Score,
[0073] Among them, C boundary represents the space constraint cost, C overlap represents the overlapping cost, C readability represents the readability cost, C aesthetic represents the aesthetic cost, K boundary represents the boundary penalty coefficient, K overlap Indicates the overlap penalty coefficient, Overlap Factor indicates the degree of overlap, K readability represents the readability penalty coefficient, d represents the minimum distance between the current annotation and other annotations, and K aesthetic represents the aesthetic penalty coefficient, and Aesthetic Score represents the aesthetic score.
[0074] Furthermore, the calculation factors of the aesthetic score Aesthetic Score include:
[0075] Alignment: Is the annotation aligned with the device or other annotations?
[0076] Directionality: The smaller the angle deviation of the annotation in the set direction, the higher the score;
[0077] Balance: When the annotations are evenly distributed and symmetrical, the score is high; when the annotations are concentrated or unbalanced, the score is low;
[0078] Space utilization: The less space the annotation occupies, the less interference it causes to other devices or annotations, and the more compact the overall layout;
[0079] The expression of the aesthetic score Aesthetic Score is:
[0080] Aesthetic Score=w1×Alignment Score+w2×Direction Score+w3×BalanceScore+w4×Space Utilization Score,
[0081] Among them, Alignment Score represents the alignment score, Direction Score represents the directional score, Balance Score represents the balance score, Space Utilization Score represents the space utilization score, w1 represents the alignment score weight, w2 represents the directional score weight, w3 represents the balance score weight, and w4 represents the space utilization score weight.
[0082] Furthermore, the comparison method of the line device status ST2 and ST1 is as follows: for each device D i , compared with S i and S i ′:
[0083] ΔS i =S i -S′ i ,
[0084] Among them, S i Indicates device D i In the state ST1, S i ' indicates device D i In state ST2, ΔS i Indicates device D i The state difference between state ST1 and state ST2;
[0085] If S i =1 indicates that the device is powered on in state ST1, S i ′=0 means that the device is powered off in state ST2, then:
[0086] ΔS i =1-0=1,
[0087] This result indicates that due to the disconnection of the specified device, device D i From power on to power off;
[0088] According to the comparison results, find all ΔS i = 1, forming the outage device set OutageSet:
[0089] OutageSet={D i |ΔS i =1},
[0090] Finally, the power outage equipment set OutageSet is output.
[0091] Beneficial effects of the invention: The method for intelligently identifying the power outage scope based on the distribution network maintenance single-line diagram of the OCS system of the invention automatically parses and processes the distribution network single-line diagram in the OCS system by utilizing advanced image recognition algorithms and deep learning technologies, and constructs a structured data model of the distribution network by identifying key elements such as equipment and lines in the diagram, thereby achieving fast and accurate equipment positioning and identification, and providing a reliable data basis for subsequent power outage scope calculation and maintenance application filling; by designing and implementing a set of efficient equipment full information acquisition mechanisms, by querying the database, calling the interface or using the built-in rule library, etc., the detailed information such as the associated lines, substations, and intervals of the target equipment is automatically obtained, thereby reducing the workload of manual query and input and improving the accuracy of information acquisition. The method improves the efficiency and safety of the power outage scope and provides comprehensive data support for the calculation of the power outage scope; by simulating the power outage process, the power outage scope is automatically calculated and generated, thereby realizing the fast and accurate calculation of the power outage scope, avoiding human misjudgment and improving the safety and efficiency of maintenance work; in summary, the method for intelligently identifying the power outage scope of the distribution network maintenance single-line diagram based on the OCS system of the present invention realizes the one-key generation of the distribution network maintenance single-line diagram to the power outage scope and safety measures through intelligent and automated means, thereby significantly improving the accuracy and efficiency of filling in the maintenance application; at the same time, by simplifying equipment information, hiding unnecessary elements and other methods, the complexity of user operation is reduced and the user experience is improved. In addition, the implementation of the scheme of the present invention also helps to reduce human errors and improve the safety and reliability of power grid operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention.
[0093] Figure 1 The present invention is a schematic diagram of the process steps of a method for intelligently identifying a power outage range based on a distribution network maintenance single-line diagram of an OCS system.
[0094] Figure 2 The present invention is a schematic diagram of a user interface for automatically identifying power outage equipment according to a method for intelligently identifying a power outage range based on a distribution network maintenance single-line diagram of an OCS system.
[0095] Figure 3The invention discloses a method for intelligently identifying a power outage range based on a distribution network maintenance single-line diagram of an OCS system, and a schematic diagram of a user interface for inputting information about a power outage range and power outage equipment. DETAILED DESCRIPTION
[0096] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0097] like Figure 1-3 As shown, a method for intelligently identifying the power outage range of a distribution network maintenance single-line diagram based on an OCS system includes: obtaining single-line diagram equipment information based on image recognition and layout algorithm to automatically generate a single-line diagram and identifying the power outage range based on artificial intelligence, wherein the method of automatically generating a single-line diagram based on image recognition and layout algorithm to obtain single-line diagram equipment information includes the following steps:
[0098] (1) Initialization: Collect the location, type and electrical connection relationship information of all equipment from the electrical single-line diagram, extract, classify and process these data, integrate geographic information with equipment data, and construct a preliminary layout space. The layout of the electrical single-line diagram adopts the functional layout method or the location layout method;
[0099] (2) Obtaining the device structure relationship: Using the DOM-API based on the tree model, the entire XML document is loaded into the memory in a tree structure;
[0100] (3) Topological relationship preservation: Use the connection point-device-device class type-connection point model to describe the connection relationship between devices. The parsed structural relationship is recorded in the common element topology relationship table, the station building internal topology relationship table, and the station building external topology relationship table according to the device type. When processing station building elements, the station building internal topology relationship table is used for connection. After the layout is completed, the common element topology relationship table and the station building external topology relationship table are used for connection.
[0101] (4) Initialize the graph model:
[0102] S1. Initialization: Let the connected network N = (V, E), where V represents the vertex set and E represents the edge set;
[0103] S2, sorting: sort all edges from small to large cost;
[0104] S3. Select edges: Select the edges with the smallest cost in turn. For each edge, check whether the two vertices connected by it belong to different connected components. If they belong to different connected components, add the edge to the minimum spanning tree and merge the two connected components. If the two vertices are on the same connected component, discard the edge and select the next smallest edge.
[0105] S4, repeat selection: repeat step S3 until all vertices are in the same connected component, that is, a connected minimum spanning tree is formed;
[0106] (5) Trunk line identification:
[0107] S1. Trunk line identification: starting from the source point and ending at the leaf node, find the longest branch line as the trunk line;
[0108] S2. Construct other branches: Starting from the bifurcation node on the main line, construct other branches at all levels step by step;
[0109] S3, establish mapping relationship: establish a one-to-many mapping relationship between the parent branch and the child branch;
[0110] (6) Node coordinate setting: Set the coordinates of nodes on the branch line. Odd-numbered branches are placed horizontally, even-numbered branches are placed vertically, and branches of the same level are placed alternately in the up-down or left-right direction. Determine the number of columns and rows to be displayed, set the width, height and spacing of the first element, and calculate the width and spacing of each column based on the number of columns and element size. For each element, calculate its row and column number based on its sequence number in the list. Calculate the X and Y coordinates of the element based on the row and column number and the element's width, height, spacing and other parameters, and perform positioning.
[0111] (7) Handling intersections and overlaps: Using a breadth-first search algorithm. The programming idea of the breadth-first search algorithm is to use an array q to simulate queue operations, with front as the head pointer and rear as the tail pointer. Initially, front = rear = 0. The queue entry operation is q[rear++] = cur; the queue exit operation is cur = q[front++]; the position coordinates (x, y) of the square brick are defined as Node type in the program, and an array int is defined. visit[N][N] marks whether a brick has been walked through, visit[i][j]=0 means that the brick at the coordinate (i, j) has not been walked through, visit[i][j]=1 means that the brick at the coordinate (i, j) has been walked through, and initially all element values of the visit array are 0; the algorithm steps of the breadth-first search algorithm are: put the starting point (startx, starty) into the queue q, and set visit[startx][starty]=1, indicating that the brick at this location has been processed and will not be searched again; pop the head element of the queue q to obtain a current device cur and a device count (sum++), search for untraveled devices and lines in the four directions of up, down, left, and right, and put the coordinates of the found devices and lines into the queue q; repeat the previous step until the queue q is empty, and all the devices and lines that can be walked through are found;
[0112] (8) Generate an interactive single-line diagram: According to the nodes, branches and layout information generated in steps (1) to (7), a distribution single-line diagram is automatically generated, and a greedy algorithm based on 8 neighborhoods is used to add annotations to the equipment. The algorithm steps of the greedy algorithm are as follows:
[0113] S1. Initialization: Set the coordinate set of the device D = {(x1, y1), (x2, y2), ..., (x n ,y n )}, where each coordinate represents the position of a device, sets the default size and rotation angle of the annotation, and creates an empty data structure to store the position and properties of the annotation;
[0114] S2, define 8 neighborhoods: for a device (x i ,y i ), whose 8 neighborhoods include the positions in the top, bottom, left, right and four diagonal directions, and the position in each direction is adjusted according to the size of the device and the size of the annotation, so that the annotation does not overlap with the device and does not exceed the preset boundaries;
[0115] S3, Greedy Selection Strategy: For each device (x i ,y i ), traverse each possible position in its 8-neighborhood, evaluate the feasibility of each position, and consider the following factors: space constraints: the label cannot exceed the preset boundary, non-overlapping: the label cannot overlap with the placed labels or devices, readability: the label is far away from other labels, based on the above evaluation, select an optimal position to place the label;
[0116] S4. Place annotation: place annotation at the selected optimal position and record its position, direction and equipment information;
[0117] S5, iterative processing: repeat steps S2 to S4 for each device in set D until all devices are labeled, optimized and adjusted: after all devices are labeled, re-evaluate the positions of adjacent labels and exchange the positions of adjacent labels, and output a final layout diagram or data structure containing all devices and their labels;
[0118] The artificial intelligence-based power outage range identification includes the following steps:
[0119] (1) Establish a switch temporal database: store the status of switches on each line at a certain time point. The data sources include monitoring points on the switches and the switch positions of the distribution system.
[0120] (2) Real-time or timed analysis: The single-line diagram corresponding to the line is retrieved from the single-line diagram database, and the status of all switches on the line at this moment is retrieved from the switch temporal database. Based on the station-line-transformer-user topology relationship on the single-line diagram and the switch status at this moment, the line equipment status ST1 is calculated;
[0121] (3) Simulate the disconnected state of the device: simulate setting the specified device to the disconnected state, recalculate the line device state ST2, compare the line device state ST2 with ST1, and find out the set of devices that cause power outage due to the disconnection of the specified device;
[0122] (4) Determine the scope of the power outage area: Combine the geographical location information of the equipment and map the power outage equipment set onto the geographic map to obtain the scope of the power outage area;
[0123] (5) Data collection and preprocessing: Collect the single-line diagram data of the power system, including the line topology, equipment type and location, and switch status, and preprocess the single-line diagram data, including data cleaning, format conversion, and standardization;
[0124] (6) Real-time monitoring and fault detection: Use machine learning and deep learning to monitor the operating status of the power grid in real time, including current, voltage, and frequency, and identify possible fault points or abnormal conditions by comparing them with preset thresholds or models;
[0125] (7) Prediction of power outage scope: Combine the single-line diagram data and real-time monitoring results, use the gradient boosting decision tree algorithm to analyze the impact range of the fault point, use the training set data to train the model, adjust the model parameters to optimize the model performance, the model parameters include: learning rate, number of trees and tree depth, use the validation set data to verify the model, use the test set data to evaluate the performance of the model, including accuracy and recall, and finally use the precision rate to measure the accuracy of the model: calculate the F1 score. The higher the F1 score, the better the overall performance of the model. Through continuous model optimization training, adjust the F1 score to the ideal value. The F1 score indicates that the accuracy of the power outage range has reached the effective range. Apply the model to the OCS system software for calling, and the power outage range can be predicted;
[0126] The calculation formula of the accuracy is as follows:
[0127]
[0128] Among them, TP represents the number of samples that are actually positive and predicted as positive, and TN represents the number of samples that are actually negative and predicted as negative;
[0129] The calculation formula of the recall rate is as follows:
[0130]
[0131] Among them, TP represents the number of samples that are actually positive and predicted as positive, TN represents the number of samples that are actually negative and predicted as negative, and FN represents the number of samples that are actually positive but mistakenly predicted as negative.
[0132] The calculation formula of the F1 score is as follows:
[0133]
[0134] Among them, precision is the ratio of the number of positive samples correctly predicted by the model to the number of all predicted positive samples, and recall is the ratio of the number of samples correctly predicted by the model to the number of actual positive samples.
[0135] Preferably, the common graphic element topology relationship table records the connection relationship between switches, distribution transformers and circuit breakers; the in-station topology relationship table records the connection relationship between the bus in the station building and the switches and transformers in the station; the external topology relationship table of the station building records the connection relationship between the internal equipment of the station building and the external equipment.
[0136] Preferably, the path optimization method of the initialization graph model is:
[0137] S1. Assume that there is an arc (u,v) in the graph, and for the path (v0,v k )If (v0,u)+(u,v k )<(v0,v k ), then use the path (v0,u,v k ) instead of (v0,v k );
[0138] S2. Find the shortest path among all adjusted paths to further optimize connectivity and the weight of the spanning tree.
[0139] Preferably, the expression of the mapping relationship is:
[0140] M[P k ]={P k1 , P k2 , ..., P km},
[0141] Among them, M represents the mapping table, P k Indicates the parent branch, P k1 , P k2 , ..., P km represents a sub-branch set, and m represents the number of sub-branches.
[0142] Preferably, the calculation formula for the width and spacing of each column is:
[0143] W c=W e +S x ,
[0144] Among them, C represents the number of columns, W e Indicates the width of each element, S x Indicates the horizontal spacing, W c Indicates the width of each column;
[0145] The calculation formula for the row number and column number of each element is:
[0146]
[0147] L n = n mod C,
[0148] Among them, R n represents the row number, n represents the sequence number of the element and starts counting from 0, C represents the number of columns, L n Indicates the column number, Indicates rounding down, mod is the modulus operation, indicating the remainder;
[0149] The X and Y coordinates of the element are calculated as:
[0150] X n =L n ×(W e +S x ),
[0151] Y n =R n ×(H e +S y ),
[0152] Among them, X n Indicates X coordinate, Y n Indicates the Y coordinate, L n Indicates the column number, W e Indicates the width of each element, S x Represents the horizontal spacing, R n Indicates the row number, H e Indicates the height of each element, S y Indicates the vertical spacing.
[0153] Preferably, the selection of the optimal position is based on a cost function, and the steps of the method for selecting the optimal position are:
[0154] S1. Initialization: For each device position (x i ,y i ), define 8 neighborhood positions: top, bottom, left, right, and four diagonal placement points, set the size, default direction, and rotation angle of the annotation;
[0155] S2, evaluation area: for each device (x i ,y i ), traverse every possible position (x,y) in its 8-neighborhood (x i ,y i ) For each possible angle θ, for each combination (x, y, θ), calculate the cost function C(x, y, θ);
[0156] S3, Greedy selection: Select the combination that minimizes the cost function (x opt ,y opt ,θ opt ):
[0157]
[0158] Among them, x opt Indicates the optimal X coordinate position, y opt represents the optimal Y coordinate position, θ opt represents the optimal angle;
[0159] S4. Place the annotation: At the calculated optimal position (x opt ,y opt ) and direction θ opt Place annotations on the equipment and record and document their location, orientation, and equipment information;
[0160] S5. Iterative processing: Repeat steps S1 to S4 for all devices, and add annotations for each device one by one.
[0161] More preferably, the cost function C(x, y, θ) is expressed as:
[0162] C(x, y, θ) = C boundary (x,y)+C overlap (x,y)+C readability (x,y)+C aesthetic (x, y, θ),
[0163] C overlap (x, y) = K overlap ×O verlap Factor,
[0164]
[0165] C aesthetic (x, y, θ) = K aesthetic ×Aesthetic Score,
[0166] Among them, C boundary represents the space constraint cost, Coverlap represents the overlapping cost, C readability represents the readability cost, C aesthetic represents the aesthetic cost, K boundary represents the boundary penalty coefficient, K overlap Indicates the overlap penalty coefficient, Overlap Factor indicates the degree of overlap, K readability represents the readability penalty coefficient, d represents the minimum distance between the current annotation and other annotations, and K aesthetic represents the aesthetic penalty coefficient, and Aesthetic Score represents the aesthetic score.
[0167] More preferably, the calculation factors of the aesthetic score Aesthetic Score include:
[0168] Alignment: Is the annotation aligned with the device or other annotations?
[0169] Directionality: The smaller the angle deviation of the annotation in the set direction, the higher the score;
[0170] Balance: When the annotations are evenly distributed and symmetrical, the score is high; when the annotations are concentrated or unbalanced, the score is low;
[0171] Space utilization: The less space the annotation occupies, the less interference it causes to other devices or annotations, and the more compact the overall layout;
[0172] The expression of the aesthetic score Aesthetic Score is:
[0173] Aesthetic Score=w1×Alignment Score+w2×Direction Score+w3×BalanceScore+w4×Space Utilization Score,
[0174] Among them, Alignment Score represents the alignment score, Direction Score represents the directional score, Balance Score represents the balance score, Space Utilization Score represents the space utilization score, w1 represents the alignment score weight, w2 represents the directional score weight, w3 represents the balance score weight, and w4 represents the space utilization score weight.
[0175] Preferably, the comparison method of the line device status ST2 and ST1 is: for each device D i , compared with S i and S i ′:
[0176] ΔS i =S i -S′ i ,
[0177] Among them, S i Indicates device D i In the state ST1, S i ' indicates device D i In state ST2, ΔS i Indicates device D i The state difference between state ST1 and state ST2;
[0178] If S i =1 indicates that the device is powered on in state ST1, S i ′=0 means that the device is powered off in state ST2, then:
[0179] ΔS i =1-0=1,
[0180] This result indicates that due to the disconnection of the specified device, device D i From power on to power off;
[0181] According to the comparison results, find all ΔS i = 1, forming the outage device set OutageSet:
[0182] OutageSet={D i |ΔS i =1},
[0183] Finally, the power outage equipment set OutageSet is output.
[0184] The actual deployment and application steps are as follows:
[0185] 1. Project preparation stage
[0186] Data collection and compilation:
[0187] Export the distribution network single-line diagram from the OCS system, including the layout, connection relationship and attribute information of all devices;
[0188] The collected single-line diagrams are preprocessed, such as denoising and standardized format, to ensure the accuracy and consistency of the data.
[0189] Technology selection and platform construction:
[0190] Select image recognition algorithms and deep learning frameworks;
[0191] Build the software and hardware platforms required for the project, including servers, databases, development environments, etc.
[0192] 2. Algorithm Writing
[0193] Work closely with the power distribution network maintenance department to clarify project requirements and design the core algorithms of the system, including image recognition module, equipment information acquisition module, power outage range calculation module, safety measures generation module, etc.
[0194] 3. Model Training
[0195] Image recognition module development:
[0196] Deep learning technology is used to train the image recognition model so that it can accurately identify equipment, lines and other elements in the distribution network single-line diagram. Through a large amount of sample collection and training, the parameters are continuously adjusted until the F1 score reaches the set value. The developed model will be put into practical application to test its accuracy.
[0197] 3. System Testing and Optimization Phase
[0198] 1. Test system construction
[0199] Design an intuitive and easy-to-use user interface, including functions such as equipment diagram display, equipment selection, and power outage range viewing.
[0200] Implement convenient operations such as drag-and-drop selection and one-click generation to perform predictive testing and improve accuracy.
[0201] 2. User Testing:
[0202] Invite personnel from the power distribution network maintenance department to conduct system testing, collect feedback and make optimizations.
[0203] 3. Optimization and adjustment:
[0204] Based on the test results and user feedback, the system is optimized and adjusted, including algorithm optimization, interface improvement, etc.
[0205] 4. System deployment and operation and maintenance stage
[0206] System deployment:
[0207] Deploy the system to the production environment and perform final debugging and verification.
[0208] User Training:
[0209] Provide system usage training to personnel in the power distribution network maintenance department to ensure that they can operate the system proficiently.
[0210] Operation and maintenance support:
[0211] Provide system operation and maintenance support services, including system monitoring, troubleshooting, upgrade and maintenance, etc.
[0212] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system, characterized in that: include: The method of automatically generating a single-line diagram based on image recognition and layout algorithm to obtain single-line diagram equipment information and identifying the power outage range based on artificial intelligence, wherein the method of automatically generating a single-line diagram based on image recognition and layout algorithm to obtain single-line diagram equipment information comprises the following steps: (1) Initialization: Collect the location, type and electrical connection relationship information of all equipment from the electrical single-line diagram, extract, classify and process these data, integrate geographic information with equipment data, and construct a preliminary layout space. The layout of the electrical single-line diagram adopts the functional layout method or the location layout method; (2) Obtaining the device structure relationship: Using the DOM-API based on the tree model, the entire XML document is loaded into the memory in a tree structure; (3) Topological relationship preservation: Use the connection point-device-device class type-connection point model to describe the connection relationship between devices. The parsed structural relationship is recorded in the common element topology relationship table, the station building internal topology relationship table, and the station building external topology relationship table according to the device type. When processing station building elements, the station building internal topology relationship table is used for connection. After the layout is completed, the common element topology relationship table and the station building external topology relationship table are used for connection. (4) Initialize the graph model: S1. Initialization: Let the connected network N = (V, E), where V represents the vertex set and E represents the edge set; S2, sorting: sort all edges from small to large cost; S3. Select edges: Select the edges with the smallest cost in turn. For each edge, check whether the two vertices connected by it belong to different connected components. If they belong to different connected components, add the edge to the minimum spanning tree and merge the two connected components. If the two vertices are on the same connected component, discard the edge and select the next smallest edge. S4, repeat selection: repeat step S3 until all vertices are in the same connected component, that is, a connected minimum spanning tree is formed; (5) Trunk line identification: S1. Trunk line identification: starting from the source point and ending at the leaf node, find the longest branch line as the trunk line; S2. Construct other branches: Starting from the bifurcation node on the main line, construct other branches at all levels step by step; S3, establish mapping relationship: establish a one-to-many mapping relationship between the parent branch and the child branch; (6) Node coordinate setting: Set the coordinates of nodes on the branch line. Odd-numbered branches are placed horizontally, even-numbered branches are placed vertically, and branches of the same level are placed alternately in the up-down or left-right direction. Determine the number of columns and rows to be displayed, set the width, height and spacing of the first element, and calculate the width and spacing of each column based on the number of columns and element size. For each element, calculate its row and column number based on its sequence number in the list. Calculate the X and Y coordinates of the element based on the row and column number and the element's width, height, spacing and other parameters, and perform positioning. (7) Handling intersections and overlaps: Using a breadth-first search algorithm. The programming idea of the breadth-first search algorithm is to use an array q to simulate queue operations, with front as the head pointer and rear as the tail pointer. Initially, front = rear = 0. The queue entry operation is q[rear++] = cur; the queue exit operation is cur = q[front++]; the position coordinates (x, y) of the square brick are defined as Node type in the program, and an array int is defined. visit[N][N] marks whether a brick has been walked through, visit[i][j]=0 means that the brick at the coordinate (i, j) has not been walked through, visit[i][j]=1 means that the brick at the coordinate (i, j) has been walked through, and initially all element values of the visit array are 0; the algorithm steps of the breadth-first search algorithm are: put the starting point (startx, starty) into the queue q, and set visit[startx][starty]=1, indicating that the brick at this location has been processed and will not be searched again; pop the head element of the queue q to obtain a current device cur and a device count (sum++), search for untraveled devices and lines in the four directions of up, down, left, and right, and put the coordinates of the found devices and lines into the queue q; repeat the previous step until the queue q is empty, and all the devices and lines that can be walked through are found; (8) Generate an interactive single-line diagram: According to the nodes, branches and layout information generated in steps (1) to (7), a distribution single-line diagram is automatically generated, and a greedy algorithm based on 8 neighborhoods is used to add annotations to the equipment. The algorithm steps of the greedy algorithm are as follows: S1. Initialization: Set the coordinate set of the device D = {(x1, y1), (x2, y2), ..., (x n ,y n )}, where each coordinate represents the position of a device, sets the default size and rotation angle of the annotation, and creates an empty data structure to store the position and properties of the annotation; S2, define 8 neighborhoods: for a device (x i ,y i ), whose 8 neighborhoods include the positions in the top, bottom, left, right and four diagonal directions, and the positions in each direction are adjusted according to the size of the device and the size of the annotation, so that the annotation does not overlap with the device and does not exceed the preset boundaries; S3, Greedy Selection Strategy: For each device (x i ,y i ), traverse each possible position in its 8-neighborhood, evaluate the feasibility of each position, and consider the following factors: space constraints: the label cannot exceed the preset boundary, non-overlapping: the label cannot overlap with the placed labels or devices, readability: the label is far away from other labels, based on the above evaluation, select an optimal position to place the label; S4. Place annotation: place annotation at the selected optimal position and record its position, direction and equipment information; S5, iterative processing: repeat steps S2 to S4 for each device in set D until all devices are labeled, optimized and adjusted: after all devices are labeled, re-evaluate the positions of adjacent labels and exchange the positions of adjacent labels, and output a final layout diagram or data structure containing all devices and their labels; The artificial intelligence-based power outage range identification includes the following steps: (1) Establish a switch temporal database: store the status of switches on each line at a certain time point. The data sources include monitoring points on the switches and the switch positions of the distribution system. (2) Real-time or timed analysis: The single-line diagram corresponding to the line is retrieved from the single-line diagram database, and the status of all switches on the line at this moment is retrieved from the switch temporal database. Based on the station-line-transformer-user topology relationship on the single-line diagram and the switch status at this moment, the line equipment status ST1 is calculated; (3) Simulate the disconnected state of the device: simulate setting the specified device to the disconnected state, recalculate the line device state ST2, compare the line device state ST2 with ST1, and find out the set of devices that cause power outage due to the disconnection of the specified device; (4) Determine the scope of the power outage area: Combine the geographical location information of the equipment and map the power outage equipment set onto the geographic map to obtain the scope of the power outage area; (5) Data collection and preprocessing: Collect the single-line diagram data of the power system, including the line topology, equipment type and location, and switch status, and preprocess the single-line diagram data, including data cleaning, format conversion, and standardization; (6) Real-time monitoring and fault detection: Use machine learning and deep learning to monitor the operating status of the power grid in real time, including current, voltage, and frequency, and identify possible fault points or abnormal conditions by comparing them with preset thresholds or models; (7) Prediction of power outage scope: Combine the single-line diagram data and real-time monitoring results, use the gradient boosting decision tree algorithm to analyze the impact range of the fault point, use the training set data to train the model, adjust the model parameters to optimize the model performance, the model parameters include: learning rate, number of trees and tree depth, use the validation set data to verify the model, use the test set data to evaluate the performance of the model, including accuracy and recall, and finally use the precision rate to measure the accuracy of the model: calculate the F1 score. The higher the F1 score, the better the overall performance of the model. Through continuous model optimization training, adjust the F1 score to the ideal value. The F1 score indicates that the accuracy of the power outage range has reached the effective range. Apply the model to the OCS system software for calling, and the power outage range can be predicted; The calculation formula of the accuracy is as follows: Among them, TP represents the number of samples that are actually positive and predicted as positive, and TN represents the number of samples that are actually negative and predicted as negative; The calculation formula of the recall rate is as follows: Among them, TP represents the number of samples that are actually positive and predicted as positive, TN represents the number of samples that are actually negative and predicted as negative, and FN represents the number of samples that are actually positive but mistakenly predicted as negative. The calculation formula of the F1 score is as follows: Among them, precision is the ratio of the number of positive samples correctly predicted by the model to the number of all predicted positive samples, and recall is the ratio of the number of samples correctly predicted by the model to the number of actual positive samples.
2. According to claim 1, a method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system is characterized in that: The common graphic element topology relationship table records the connection relationship between switches, distribution transformers and circuit breakers; the station topology relationship table records the connection relationship between the busbar in the station building and the switches and transformers in the station; the station building external topology relationship table records the connection relationship between the internal equipment of the station building and the external equipment.
3. According to claim 1, a method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system is characterized in that: The path optimization method of the initialization graph model is: S1. Assume that there is an arc (u,v) in the graph, and for the path (v0,v k )If (v0,u)+(u,v k )<(v0,v k ), then use the path (v0, u, v k ) instead of (v0, v k ); S2. Find the shortest path among all adjusted paths to further optimize connectivity and the weight of the spanning tree.
4. According to claim 1, a method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system is characterized in that: The expression of the mapping relationship is: M[P k ]=[P k1 ,P k2 ,...,P km }, Among them, M represents the mapping table, P k Indicates the parent branch, P k1 , P k2 ,···,P km represents a sub-branch set, and m represents the number of sub-branches.
5. The method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system according to claim 1 is characterized in that: The calculation formula for the width and spacing of each column is: W c =W e +S x , Among them, C represents the number of columns, W e Indicates the width of each element, S x Indicates the horizontal spacing, W c Indicates the width of each column; The calculation formula for the row number and column number of each element is: L n =n mod C, Among them, R n represents the row number, n represents the sequence number of the element and starts counting from 0, C represents the number of columns, L n Indicates the column number, Indicates rounding down, mod is the modulus operation, indicating the remainder; The X and Y coordinates of the element are calculated as: X n =L n ×(W e +S x ), Y n =R n ×(H e +S y ), Among them, X n Indicates X coordinate, Y n Indicates the Y coordinate, L n Indicates the column number, W e Indicates the width of each element, S x Represents the horizontal spacing, R n Indicates the row number, H e Indicates the height of each element, S y Indicates the vertical spacing.
6. The method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system according to claim 1 is characterized in that: The selection of the optimal position is based on a cost function, and the steps of the method for selecting the optimal position are: S1. Initialization: For each device position (x i ,y i ), define 8 neighborhood positions: top, bottom, left, right, and four diagonal placement points, set the size, default direction, and rotation angle of the annotation; S2, evaluation area: for each device (x i ,y i ), traverse every possible position (x, y) in its 8-neighborhood (x i ,y i ) For each possible angle θ, for each combination (x, y, θ), calculate the cost function C(x, y, θ); S3, Greedy selection: Select the combination that minimizes the cost function (x opt ,y opt ,θ opt ): Among them, x opt Indicates the optimal X coordinate position, y opt represents the optimal Y coordinate position, θ opt represents the optimal angle; S4. Place the annotation: At the calculated optimal position (x opt ,y opt ) and direction θ opt Place annotations on the equipment and record and document their location, orientation, and equipment information; S5. Iterative processing: Repeat steps S1 to S4 for all devices, and add annotations for each device one by one.
7. The method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system according to claim 6 is characterized in that: The expression of the cost function C(x, y, θ) is: C(x,y,θ)=C boundary (x,y)+C overlap (x,y)+C readability (x,y)+C aesthetic (x,y,θ), C overlap (x,y)=K overlap ×Overlap Factor, C aesthetic (x,y,θ)=K aesthetic ×Aesthetic Score, Among them, C boundary represents the space constraint cost, C overlap represents the overlapping cost, C readability represents the readability cost, C aesthetic represents the aesthetic cost, K boundary represents the boundary penalty coefficient, K overlap represents the overlap penalty coefficient, OverlapFactor represents the degree of overlap, K readability represents the readability penalty coefficient, d represents the minimum distance between the current annotation and other annotations, and K aesthetic represents the aesthetic penalty coefficient, and Aesthetic Score represents the aesthetic score.
8. The method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system according to claim 7 is characterized in that: The calculation factors of the aesthetic score Aesthetic Score include: alignment: whether the annotation is arranged in a straight line with the device or other annotations; Directionality: The smaller the angle deviation of the annotation in the set direction, the higher the score; Balance: When the annotations are evenly distributed and symmetrical, the score is high; when the annotations are concentrated or unbalanced, the score is low; Space utilization: The less space the annotation occupies, the less interference it causes to other devices or annotations, and the more compact the overall layout; The expression of the aesthetic score Aesthetic Scorre is: Aesthetic Score=w1×Alignment Score+w2×Direction Scorew3×Balance Score+ww4×Space Utilization Score, Among them, Alignment Score represents the alignment score, Direction Score represents the directional score, BalanceScore represents the balance score, Space Utilization Score represents the space utilization score, w1 represents the alignment score weight, w2 represents the directional score weight, w3 represents the balance score weight, and w4 represents the space utilization score weight.
9. The method for intelligently identifying the power outage range based on the single-line diagram of the distribution network maintenance of the OCS system according to claim 1 is characterized in that: The comparison method of the line equipment status ST2 and ST1 is as follows: for each equipment D i , compared with S i and S i ′: ΔS i =S i -S′ i , Among them, S i Indicates device D i In the state ST1, S i ' indicates device D i In state ST2, ΔS i Indicates device D i The state difference between state ST1 and state ST2; If S i =1 indicates that the device is powered on in state ST1, S i ′=0 means that the device is powered off in state ST2, then: ΔS i =1-0=1, This result indicates that due to the disconnection of the specified device, device D i From power on to power off; According to the comparison results, find all ΔS i = 1, forming the outage device set OutageSet: OutageSet={D i |ΔS i =1}, Finally, the power outage equipment set OutageSet is output.
Citation Information
Cited By
A circuit diagram modeling simulation analysis method, device, storage medium and equipment
CN119783624A
A method, device, storage medium and equipment for modeling, simulating and analyzing a circuit diagram
CN119783624B
Method for standardization and topology analysis of electrical one-line diagram based on data rule mining
CN122715200A
Method for standardization and topology analysis of electrical one-line diagram based on data rule mining
CN122715200B