Power distribution network model mutual checking method based on SVG (scalable vector graphics) and XML (extensible markup language) model

By establishing the mapping relationship between SVG graphics and XML model, the topological structure and parameters of the distribution network model are automatically checked, the data inconsistency problem is solved, the verification efficiency and accuracy are improved, and data security is ensured.

CN120280890APending Publication Date: 2025-07-08HONGHE POWER SUPPLY BUREAU OF YUNNAN POWER GRID
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510285058.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The existing distribution network model is created and managed separately by SVG graphics and XML models, resulting in data inconsistency problems, manual verification is inefficient and error-prone, and lacks automated model verification functions.

Method used

By establishing the mapping relationship between SVG graphs and XML models, the topology and parameters are automatically checked, including the comparison of the number of nodes and connection lines and the attribute sets, and the verification results are output to ensure consistency.

Benefits of technology

The automated calibration process is realized, the calibration efficiency and accuracy are improved, data inconsistency is eliminated, reliable analysis basis is provided, and data security is ensured through encryption technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120280890A_ABST
    Figure CN120280890A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart power grids, provides a power distribution network model mutual checking method based on SVG (scalable vector graphics) and an XML (extensible markup language) model, and realizes quick and accurate checking of the power distribution network model by combining the visualization advantage of the SVG and the data processing capability of the XML. According to the method, the mapping relation between the SVG graph and the XML model is established, the topological structure and the parameters of the power distribution network are subjected to bidirectional verification, and the efficiency and the accuracy of model verification are effectively improved. Meanwhile, the encryption technology is adopted to ensure data security, the method is suitable for power distribution networks of various scales, powerful technical support is provided for stable operation of a power system, and the method has important practical application value and industry popularization significance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart grids, and in particular to a method for mutual verification of distribution network models based on SVG graphics and XML models. Background Art

[0002] With the development of social economy and the growth of energy demand, the scale and complexity of the distribution network are constantly increasing. The safe, stable and efficient operation of the distribution network is of great significance for ensuring social production and residents' lives. To achieve this goal, the planning, design, operation and maintenance of the distribution network need to rely on accurate distribution network models. However, due to the complexity of the distribution network model, ensuring the accuracy and consistency of model data has become a challenge.

[0003] Existing distribution network models are usually created and managed using a variety of software tools, and these tools often use different data formats and representation methods. For example, the graphical layout of the distribution network is usually represented using SVG (Scalable Vector Graphics), while the parameters and attributes of the distribution network are usually stored in XML (Extensible Markup Language) files. Each of these two representation methods has its own advantages, but in practical applications, the following problems exist: Data inconsistency: Since the SVG graphics and XML models are created and managed separately, inconsistencies may occur between the graphical representation and the data description, and this inconsistency will affect the analysis and decision-making of the distribution network. Manual verification is difficult: Traditional verification of distribution network models relies on manual comparison, which is inefficient and prone to errors, especially when facing large-scale and complex distribution network models. Lack of automated tools: Existing tools often lack the automated function of mutual verification of models and cannot effectively detect and correct errors in the models.

[0004] To solve the above problems, a method that can automatically compare the consistency between SVG graphics and XML models and ensure the accuracy of the distribution network model is needed. The existing technologies have not fully solved this problem. Therefore, the present invention proposes a method for mutual verification of distribution network models based on SVG graphics and XML models, aiming to improve the data quality and reliability of the distribution network model. Summary of the Invention

[0005] The purpose of the present invention is to solve the deficiencies of the existing technologies and provide a method for mutual verification of distribution network models based on SVG graphics and XML models, which can automatically compare the consistency between SVG graphics and XML models and ensure the accuracy of the distribution network model.

[0006] To achieve the above purpose, the present invention adopts the following technical solutions:

[0007] A method for mutual verification of distribution network models based on SVG graphics and XML models, comprising the following steps:

[0008] S1: Create an SVG graphic representation of the distribution network. The SVG graphic generates an overall graphic layout by defining node graphics and connection line styles and using the actual topological structure of the distribution network.

[0009] S2: Create an XML model corresponding to the SVG graphic. The XML model includes node attributes and connection line parameters of the distribution network and fills in the corresponding data according to the design data.

[0010] S3: Establish a mapping relationship between the SVG graphic and the XML model so that each element of the SVG graphic corresponds one-to-one with the corresponding data item in the XML model.

[0011] S4: Perform mutual verification on the SVG graphic and the XML model, mainly including:

[0012] Ⅰ. Topological structure verification, that is, compare the number of nodes and connection lines in the SVG graphic and the XML model.

[0013] Ⅱ. Data content verification, that is, compare the attribute set of each node and the parameter set of each connection line.

[0014] S5: Output verification information according to the verification results, where the verification results include a set of information passed in the verification and a set of error messages of verification errors.

[0015] Preferably, creating the SVG graphic representation of the distribution network in S1 includes the following steps:

[0016] S1.1: Define the graphic symbols of the distribution network nodes.

[0017] S1.11: Define a graphic symbol G for each node type t in the distribution network t , which is described by a set of parameter sets ζ t , including shape, size, and color.

[0018] S1.12: Use the following formula to represent the definition of the node graphic symbol:

[0019] G t = f(ζ t )

[0020] where f is a function used to generate the graphic symbol G according to the parameter set ζ t ; t ;

[0021] S1.2: Define the graphic styles of the distribution network connection lines.

[0022] S1.21: Define a graphic style L for each connection line type L in the distribution network l , and this style is composed of a set of attribute sets Φl Description, including line type, line width, color, etc.;

[0023] S1.22: Represent the definition of the connection line graphic style using the following formula:

[0024] L l = g(Φ l )

[0025] where g is a function used to generate the graphic style L according to the attribute set Φ l ; l ;

[0026] S1.3: Generate the graphic layout of nodes and connection lines according to the actual topological structure of the distribution network;

[0027] S1.31: Represent the topological structure of the distribution network as a graph G(V, E), where V is the set of nodes and E is the set of connection lines;

[0028] S1.32: For each node v i ∈ V in graph G, according to its type t i , apply the function f(ζ t ) defined in S1.1 to generate the node graphic symbol G v,i ;

[0029] S1.33: For each connection line e j ∈ E in graph G, according to its type l j , apply the function g(Φ l ) defined in S1.2 to generate the connection line graphic style L e,j ;

[0030] S1.34: Use the following algorithm to generate the layout of the entire S1.VG graphic:

[0031]

[0032] where Π represents the layout operation, which is used to arrange and combine the graphic symbols and styles of nodes and connection lines according to the topological structure G(V, E) to form the final S1.VG graphic layout S1.VG Layout .

[0033] Preferably, creating the corresponding XML model in S2 includes the following steps:

[0034] S2.1: Define the attribute structure of the distribution network nodes;

[0035] S2.11: Define an attribute structure A for the nodes in the distribution network. This structure consists of a set of attribute fields F A and includes, but is not limited to, node type, rated capacity, operating status;

[0036] S2.12: Represent the node attribute structure using the following data structure:

[0037] A = {f1, f2, …, f n}

[0038] where f i is an attribute field and n is the number of attribute fields;

[0039] S2.2: Define the parameter structure of the distribution network connection lines;

[0040] S2.21: Define a parameter structure P for the connection lines in the distribution network. This structure consists of a set of parameter fields F P including, but not limited to, line type, length, cross-sectional area, and resistance;

[0041] S2.22: Represent the connection line parameter structure using the following data structure:

[0042] P = {p1, p2, …, p m}

[0043] where p i is a parameter field and m is the number of parameter fields;

[0044] S2.3: Fill the node attributes and connection line parameters according to the design data of the distribution network;

[0045] S2.31: For each node v i in the distribution network, fill each field in the attribute structure A according to the design data D v,i to obtain the node attribute set A v,i ;

[0046] S2.32: For each connection line e j in the distribution network, fill each field in the parameter structure P according to the design data D e,j to obtain the connection line parameter set P e,j ;

[0047] S2.33: Use the following mathematical formulas to represent the filling process of the node attributes and connection line parameters:

[0048] A v,i = ρ(D v,i , A)P e,j = σ(D e,j , P)

[0049] where ρ is the node attribute filling function, σ is the connection line parameter filling function, D v,i and D e,j are the design data for node v iand connection line e j design data

[0050] Preferably, establishing the mapping relationship between the SVG graph and the XML model in S3 includes the following steps:

[0051] S3.1: Identify SVG elements and parse the XML structure of the SVG graph;

[0052] S3.2: Extract SVG identifiers and parse the attributes of the SVG graph;

[0053] S3.3: Search for XML elements and match the identifiers of SVG elements with the id attributes of nodes and connection lines in the XML model;

[0054] S3.4: Establish an SVG-XML relationship;

[0055] S3.41: Create a mapping table with the SVG element identifier as the key and the XML element identifier as the value to associate SVG elements with XML elements; the key of the mapping table is the SVG element ID, and the value is the XML element ID;

[0056] S3.42: Perform verification of node mapping, verification of connection line mapping, verification of topological structure, and verification of data integrity; for node mapping and connection line mapping, specifically use a hash table or dictionary data structure to associate SVG elements with XML elements through the identifiers of SVG elements and XML elements as keys;

[0057] S3.5: Record the mapping results;

[0058] S3.6: Output the results.

[0059] Preferably, the mutual verification of the SVG graph and the XML model in S4 includes the following steps:

[0060] S4.1: Perform topological structure verification, and verify the data integrity of the XML model according to the topological structure of the SVG graph;

[0061] S4.11: Determine the number of nodes N and the number of connection lines M in the SVG graph, denoted as N(SVG) and M(SVG) respectively;

[0062] S4.12: Extract the corresponding number of nodes N(XML) and the number of connection lines M(XML) from the XML model;

[0063] S4.13: Apply the following formula for topological structure verification:

[0064] N(SVG) = N(XML)

[0065] M(SVG) = M(XML)

[0066] If all of the above equations hold, it is considered that the data integrity check of the XML model passes; otherwise, record the error information of data inconsistency.

[0067] S4.2: Perform data content check, and check the accuracy of the SVG graph according to the data content of the XML model.

[0068] S4.21: For each node i in the SVG graph, extract its attribute set A i (SVG);

[0069] S4.22: Extract the attribute set A i (XML) of the corresponding node i from the XML model.

[0070] S4.23: Apply the following formula to check the node attributes:

[0071]

[0072] where a represents the node attribute field;

[0073] If the above conditions are satisfied for all nodes i, it is considered that the node attribute accuracy check of the SVG graph passes; otherwise, record the error information of attribute mismatch.

[0074] S4.24: For each connection line j in the SVG graph, extract its parameter set P j (SVG);

[0075] S4.25: Extract the parameter set P j (XML) of the corresponding connection line j from the XML model.

[0076] S4.26: Apply the following formula to check the connection line parameters:

[0077]

[0078] where p represents the connection line parameter field; ε p is the preset parameter tolerance threshold; if the above conditions are satisfied for all connection lines j, it is considered that the connection line parameter accuracy check of the SVG graph passes; otherwise, record the error information of parameter mismatch.

[0079] S4.3: Output the check result, and the check result includes the information of passing the check or the error prompt of failing the check.

[0080] S4.31: If all the checks in S4.1 and S4.2 pass, output the information of passing the check.

[0081] S4.32: If any verification fails, an error message including the error type and error location is output.

[0082] S4.33: The output of the verification result can be represented by the following mathematical formula:

[0083] R = {PassedSet, ErrorSet}

[0084] where R is the verification result set, PassedSet is the set of information passed in the verification, and ErrorSet is the set of error information that fails the verification. Preferably, the S4 further includes performing a data matching check between the SVG graph and the XML model, and the data matching check includes the following steps:

[0085] Step a: Node matching check:

[0086] Step a.1: Extract each node element n i , and extract its identifier ID n,i ;

[0087] Step a.2: Search for the node record R n,i corresponding to the identifier ID n,i in the XML model;

[0088] Step a.3: Apply the following formula to compare whether the attribute set A n,i of the node in the SVG graph is consistent with the attribute set A R,n,i of the corresponding node in the XML model:

[0089] A n,i ≡ A R,n,i ;

[0090] Step b: Connection line matching check:

[0091] Step b.1: Identify each connection line element l j in the SVG graph, and extract the identifiers of its start node ID start,j and end node ID end,j ;

[0092] Step b.2: Search for the connection line record R start,j corresponding to the start node ID end,j and end node ID l,j identifiers in the XML model;

[0093] Step b.3: Apply the following formula to compare whether the attribute set B l,j of the connection line in the SVG graph is consistent with the parameter set B R,l,j of the corresponding connection line in the XML model:

[0094] B l,j ≡B R,l,j ;

[0095] Step c: Topological structure consistency check:

[0096] Step c.1: Construct the topological structure diagram T of the SVG graph SVG , including the connection relationships of nodes and connecting lines;

[0097] Step c.2: Construct the topological structure diagram T of the XML model XML , based on the data relationships of nodes and connecting lines;

[0098] Step c.3: Apply the following algorithm to compare whether the two topological structure diagrams are exactly the same:

[0099]

[0100] Step d: Data integrity check:

[0101] Step d.1: Confirm that each node and connecting line in the XML model has a corresponding SVG graph element, and apply the following logical expression:

[0102]

[0103] where V XML and E XML are the sets of nodes and connecting lines in the XML model respectively, and N SVG and L SVG are the sets of nodes and connecting lines in the SVG graph respectively;

[0104] Step d.2: Confirm that each node and connecting line in the SVG graph has a corresponding XML model record, and apply the following logical expression:

[0105]

[0106] Step d.3: Check whether there are isolated nodes or connecting lines, and apply the following algorithm:

[0107]

[0108] where IsolatedElements is the set of isolated elements;

[0109] Step e: Attribute value check:

[0110] Step e.1: For the sets of attribute values C n,i and C l,j of nodes and connecting lines in the SVG graph and the data set C in the XML modelR,n,i and C R,l,j Compare item by item;

[0111] Step e.2: Use the following preset verification rules and algorithms to perform logical and numerical verification on the attribute values:

[0112] Validate(C n,i , C R,n,i ) → Result n,i

[0113] Validate(C l,j , C R,l,j ) → Result l,j

[0114] where Validate is the verification function and Result n,i and Result l,j are the verification results.

[0115] Preferably, the S4 further includes a step of verifying the data in the XML model based on the preset operation rules and design standards of the distribution network, and the verification step includes:

[0116] Step ①: Define the operation rule set of the distribution network as R rules and the design standard set as S standards ;

[0117] Step ②: For each element y ∈ V XML ∪E XML in the XML model, perform the following verification:

[0118] y ∈ V XML ∪E XML

[0119] where V validation (y) indicates whether the element y meets the operation rules and design standards;

[0120] If V XML (y) of all elements y ∈ V XML ∪E validation is true, it is considered that the data in the XML model conforms to the operation rules and design standards of the distribution network; otherwise, generate an error message including the error type, error location and error details, and output the verification result as part of the overall result of the cross-check.

[0121] Preferably, it further includes data encryption and decryption steps, and the steps include:

[0122] Step 1: Generate a public key according to the characteristics of the SVG graph or XML model or using a random number generator;

[0123] Step 2: Encrypt the distribution network model data using the public key to obtain encrypted data;

[0124] Step 3: Embed the encrypted data into the attributes or styles of the SVG graph and the nodes or attributes of the XML model respectively;

[0125] Step 4: Extract the embedded encrypted data from the SVG graph and the XML model, and decrypt them in turn using the SVG graph and the XML model as the private key to restore the original distribution network model data.

[0126] Preferably, the output of S5 includes: intuitively displaying the parts that pass the verification in the form of a graphical interface; recording in detail the error information found during the verification process in the form of a list or log, and the error information includes the error type and the error location.

[0127] The present invention discloses a method for mutual verification of a distribution network model based on an SVG graph and an XML model, which has the following beneficial effects.

[0128] The present invention realizes the bidirectional verification of the topological structure and parameters by establishing a mapping relationship between the SVG graph and the XML model, automates the verification process, avoids the low efficiency and human errors of manual comparison, and greatly improves the verification efficiency and accuracy; through the mutual verification mechanism, effectively eliminates the data inconsistency between the SVG graph and the XML model, ensures the consistency between the graphical representation and the data description, and provides a reliable basis for distribution network analysis and decision-making; this method is applicable to distribution networks of various scales, is not limited by complexity and scale, and has good versatility and scalability; the present invention uses encryption technology to ensure the security of the SVG graph and the XML model during transmission and storage, prevents data leakage and tampering, and guarantees the security of the distribution network model data; the verification result of the present invention is displayed in a graphical interface, which is convenient for users to intuitively understand the verification situation, and at the same time provides detailed error prompts to help users quickly locate and correct errors. Description of the Drawings

[0129] Figure 1 is a schematic diagram of the mutual verification process of the distribution network model based on the SVG graph and the XML model provided by the present invention;

[0130] Figure 2 is the bus structure diagram provided by the present invention;

[0131] Figure 3 is the flow chart for establishing the mapping relationship between the SVG graph and the XML model provided by the present invention;

[0132] Figure 4 is the data encryption and decryption flow chart provided by the present invention. Detailed Embodiment

[0133] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments.

[0134] Referring to "embodiments" herein means that the specific features, structures, or characteristics described in connection with the embodiments may be included in at least one embodiment of the present application. The term "embodiment" appearing in various positions in the specification does not necessarily refer to the same embodiment, nor does it particularly limit its independence or relevance to other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0135] Unless otherwise defined, the meanings of the technical terms used herein are the same as those commonly understood by those skilled in the technical field to which the present application belongs; the use of the relevant terms herein is only for describing specific embodiments, rather than aiming to limit the present application.

[0136] In the description of the present application, the term "and / or" is an expression used to describe the logical relationship between objects, indicating that there can be three relationships. For example, A and / or B means: the existence of A, the existence of B, and the simultaneous existence of A and B. In addition, the character " / " herein generally represents an "or" logical relationship between the related objects before and after.

[0137] Unless otherwise clearly specified or limited, in the description of the embodiments of the present application, the terms "installed", "connected"

[0138] "Connected", "fixed", "set", etc. should be understood in a broad sense. For example, the "connection" can be a fixed connection, a detachable connection, or an integral setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be directly connected, or indirectly connected through an intermediate medium; it can be the internal communication of two components or the interaction relationship between two components. For those skilled in the technical field to which the present application belongs, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0139] As Figure 1 shown, a method for mutual verification of a distribution network model based on SVG graphics and XML models includes the following steps:

[0140] S1: Create an SVG graphic representation of the distribution network. The SVG graphic generates an overall graphic layout by defining node graphics and connection line styles and using the actual topological structure of the distribution network;

[0141] Preferably, in this embodiment, creating the SVG graphical representation of the distribution network in S1 includes the following steps:

[0142] S1.1: Define the graphical symbols of the distribution network nodes;

[0143] S1.11: Define a graphical symbol G for each node type t in the distribution network t , which is described by a set of parameter sets ζ t , including shape, size, and color;

[0144] S1.12: Represent the definition of the node graphical symbol using the following formula:

[0145] G t = f(ζ t )

[0146] where f is a function used to generate the graphical symbol G according to the parameter set ζ t ; t ;

[0147] S1.2: Define the graphical styles of the distribution network connection lines;

[0148] S1.21: Define a graphical style L for each connection line type L in the distribution network l , which is described by a set of attribute sets Φ l , including line type, line width, color, etc.;

[0149] S1.22: Represent the definition of the connection line graphical style using the following formula:

[0150] L l = g(Φ l )

[0151] where g is a function used to generate the graphical style L according to the attribute set Φ l ; l ;

[0152] S1.3: Generate the graphical layout of the nodes and connection lines according to the actual topological structure of the distribution network;

[0153] S1.31: Represent the topological structure of the distribution network as a graph G(V, E), where V is the set of nodes and E is the set of connection lines;

[0154] S1.32: For each node v in the graph G i ∈V, according to its type t i , apply the function f(ζ t ) defined in S1.1 to generate the node graphical symbol G v,i ;

[0155] S1.33: For each connection line e in graph G j ∈E, according to its type l j , apply the function g(Φ l ) defined in S1.2 to generate the connection line graphic style L e,j ;

[0156] S1.34: Use the following algorithm to generate the layout of the entire S1.VG graphic:

[0157]

[0158] where Π represents the layout operation, which is used to arrange the graphic symbols and styles of nodes and connection lines according to the topological structure G(V, E) to form the final S1.VG graphic layout S1.VG Layout .

[0159] The Π algorithm adopts a force-directed graph layout algorithm. By simulating the interaction between springs and charges in a physical system, the nodes and connection lines are placed in appropriate positions to optimize the graphic layout.

[0160] S2: Create an XML model corresponding to the SVG graphic. The XML model includes the node attributes and connection line parameters of the distribution network, and fills in the corresponding data according to the design data;

[0161] Preferably, in this embodiment, creating the corresponding XML model in S2 includes the following steps:

[0162] S2.1: Define the attribute structure of the distribution network nodes;

[0163] S2.11: Define an attribute structure A for the nodes in the distribution network. This structure consists of a set of attribute fields F A , including but not limited to node type, rated capacity, and operating status;

[0164] S2.12: Use the following data structure to represent the node attribute structure:

[0165] A = {f1, f2,..., f n}

[0166] where f i is the attribute field and n is the number of attribute fields;

[0167] S2.2: Define the parameter structure of the distribution network connection lines;

[0168] S2.21: Define a parameter structure P for the connection lines in the distribution network. This structure consists of a set of parameter fields F P , including but not limited to line type, length, cross-sectional area, and resistance;

[0169] S2.22: Represent the connection line parameter structure using the following data structure:

[0170] P = {p1, p2, …, p m}

[0171] where p i is a parameter field and m is the number of parameter fields;

[0172] S2.3: Fill in the node attributes and connection line parameters according to the design data of the distribution network;

[0173] S2.31: For each node v i in the distribution network, fill in each field in the attribute structure A according to the design data D v,i to obtain the node attribute set A v,i ;

[0174] S2.32: For each connection line e j in the distribution network, fill in each field in the parameter structure P according to the design data D e,j to obtain the connection line parameter set P e,j ;

[0175] S2.33: Represent the filling process of the node attributes and connection line parameters using the following mathematical formulas:

[0176] A v,i = ρ(D v,i , A)P e,j = σ(D e,j , P)

[0177] where ρ is the node attribute filling function, σ is the connection line parameter filling function, and D v,i and D e,j are the design data of node v i and connection line e j respectively.

[0178] ρ and σ are as follows: For node attributes, fill in the corresponding values into each field in the node attribute structure A according to information such as the node type, rated capacity, and operating status in the design data; for connection line parameters, fill in the corresponding values into each field in the connection line parameter structure P according to information such as the line type, length, cross-sectional area, and resistance in the design data.

[0179] As Figure 3 shown, S3: Establish a mapping relationship between the SVG graph and the XML model so that each element of the SVG graph corresponds one-to-one with the corresponding data item in the XML model;

[0180] Preferably, in this embodiment, establishing the mapping relationship between the SVG graph and the XML model in S3 includes the following steps:

[0181] S3.1: Identify SVG elements and parse the XML structure of the SVG graph;

[0182] S3.2: Extract SVG identifiers and parse the attributes of the SVG graph;

[0183] S3.3: Search for XML elements and match the identifiers of SVG elements with the id attributes of nodes and connection lines in the XML model;

[0184] S3.4: Establish the SVG-XML relationship;

[0185] S3.41: Create a mapping table with the SVG element identifier as the key and the XML element identifier as the value to associate SVG elements with XML elements; the key of the mapping table is the SVG element ID, and the value is the XML element ID.

[0186] S3.42: Perform verification of node mapping, verification of connection line mapping, verification of topological structure, and verification of data integrity; verifying node mapping and verifying connection line mapping are to verify whether SVG elements match XML elements by comparing relevant attributes of SVG elements and XML elements, such as node type, device type, line type, etc. Verifying the topological structure is to verify whether the topological structures of the SVG graph and the XML model are consistent by comparing the topological structure of the SVG graph with the topological structure of the XML model, such as the connection relationship between nodes and the direction of lines. Verifying data integrity is to verify whether the data in the XML model is complete by comparing the number of nodes and connection lines in the SVG graph and the XML model. The node mapping and connection line mapping adopt a hash table or dictionary data structure, and associate SVG elements with XML elements using the identifiers of SVG elements and XML elements as keys

[0187] S3.5: Record the mapping results;

[0188] S3.6: Output the mapping relationship and results of SVG elements and XML elements.

[0189] S4: Perform mutual verification on the SVG graph and the XML model, mainly including:

[0190] Ⅰ. Topological structure verification, that is, compare the number of nodes and connection lines in the SVG graph and the XML model;

[0191] Ⅱ. Data content verification, that is, compare the attribute set of each node and the parameter set of each connection line;

[0192] Preferably, in this embodiment, the mutual verification between the SVG graph and the XML model in S4 includes the following steps:

[0193] S4.1: Perform topological structure verification, and verify the data integrity of the XML model according to the topological structure of the SVG graph;

[0194] S4.11: Determine the number of nodes N and the number of connection lines M in the SVG graph, denoted as N(SVG) and M(SVG) respectively;

[0195] S4.12: Extract the corresponding number of nodes N(XML) and the number of connection lines M(XML) from the XML model;

[0196] S4.13: Apply the following formula for topological structure verification:

[0197] N(SVG) = N(XML)

[0198] M(SVG) = M(XML)

[0199] If the above equations all hold, it is considered that the data integrity verification of the XML model passes; otherwise, record the error information of data inconsistency;

[0200] S4.2: Perform data content verification, and verify the accuracy of the SVG graph according to the data content of the XML model;

[0201] S4.21: For each node i in the SVG graph, extract its attribute set A i (SVG);

[0202] S4.22: Extract the attribute set A of the corresponding node i from the XML model i (XML);

[0203] S4.23: Apply the following formula for node attribute verification:

[0204]

[0205] where a represents the node attribute field (such as rated capacity, operating status).

[0206] If the above conditions are all satisfied for all nodes i, it is considered that the node attribute accuracy verification of the SVG graph passes; otherwise, record the error information of attribute mismatch;

[0207] S4.24: For each connection line j in the SVG graph, extract its parameter set P j (SVG);

[0208] S4.25: Extract the parameter set P of the corresponding connection line j from the XML modelj (XML);

[0209] S4.26: Check the parameters of the connection lines using the following formula:

[0210]

[0211] where p represents the connection line parameter field (such as resistance, cross-sectional area). ε p is the preset parameter tolerance threshold; if the above conditions are met for all connection lines j, it is considered that the accuracy check of the connection line parameters of the SVG graph passes; otherwise, record the error information of parameter mismatch; ε p is the preset parameter tolerance threshold, and its value can be adjusted according to the actual situation, for example, set to 1% or 5% of the actual parameter value, etc.

[0212] S4.3: Output the check result, and the check result includes the information of passing the check or the error prompt of not passing the check;

[0213] S4.31: If all the checks in S4.1 and S4.2 pass, output the information of passing the check;

[0214] S4.32: If any check fails, output the error prompt including the error type and error location;

[0215] S4.33: The output of the check result can be represented by the following mathematical formula:

[0216] R = {PassedSet, ErrorSet}

[0217] where R is the check result set, PassedSet is the information set of passing the check, and ErrorSet is the error information set of not passing the check.

[0218] Preferably, in this embodiment, S4 further includes performing a data matching check between the SVG graph and the XML model, and the data matching check includes the following steps:

[0219] Step a: Node matching check:

[0220] Step a.1: Extract each node element n i from the SVG graph, and extract its identifier ID n,i ;

[0221] Step a.2: Search for the node record R n,i corresponding to this identifier ID n,i in the XML model;

[0222] Step a.3: Compare the set of attributes A of the nodes in the SVG graph n,i with the set of attributes A of the corresponding nodes in the XML model R,n,i to check for consistency:

[0223] A n,i ≡ A R,n,i ;

[0224] Step b: Connection line matching verification:

[0225] Step b.1: Identify each connection line element l in the SVG graph j and extract the identifiers of its start node ID start,j and end node ID end,j ;

[0226] Step b.2: Search in the XML model for the connection line record R start,j corresponding to the start node ID end,j and end node ID l,j identifiers;

[0227] Step b.3: Compare the set of attributes B of the connection lines in the SVG graph l,j with the set of parameters B of the corresponding connection lines in the XML model R,l,j to check for consistency:

[0228] B l,j ≡ B R,l,j ;

[0229] Step c: Topological structure consistency verification:

[0230] Step c.1: Construct the topological structure graph T of the SVG graph SVG including the connection relationships of nodes and connection lines;

[0231] Step c.2: Construct the topological structure graph T of the XML model XML based on the data relationships of nodes and connection lines;

[0232] Step c.3: Apply the following algorithm to compare whether the two topological structure graphs are exactly the same:

[0233]

[0234] Step d: Data integrity verification:

[0235] Step d.1: Confirm that each node and connection line in the XML model has a corresponding SVG graph element, and apply the following logical expression:

[0236]

[0237] Among them, V XML and E XML are respectively the sets of nodes and connection lines in the XML model, and N SVG and L SVG are respectively the sets of nodes and connection lines in the SVG graph;

[0238] Step d.2: Confirm that each node and connection line in the SVG graph has a corresponding XML model record, and apply the following logical expression:

[0239]

[0240] Step d.3: Check whether there are isolated nodes or connection lines, and apply the following algorithm:

[0241]

[0242] where IsolatedElements is the set of isolated elements;

[0243] Step e: Attribute value verification:

[0244] Step e.1: Compare the sets of attribute values C n,i and C l,j of the nodes and connection lines in the SVG graph with the data sets C R,n,i and C R,l,j in the XML model item by item;

[0245] Step e.2: Use the following preset verification rules and algorithms to perform logical and numerical verification on the attribute values:

[0246] Validate(C n,i , C R,n,i ) → Result n,i

[0247] Validate(C l,j , C R,l,j ) → Result l,j

[0248] where Validate is the verification function, and Result n,i and Result l,j are the verification results.

[0249] Preferably, in this embodiment, S4 further includes the step of verifying the data in the XML model based on the preset operation rules and design standards of the distribution network, and the verification step includes:

[0250] Step ①: Define the set of operation rules of the distribution network as R rulesand the set of design criteria is S standards ;

[0251] Step ②: For each element y ∈ V XML ∪E XML in the XML model, perform the following verifications:

[0252] y ∈ V XML ∪E XML

[0253] where V validation (y) indicates whether the element y meets the operating rules and design criteria;

[0254] If V XML ∪E XML for all elements y ∈ V validation (y) is true, then the data in the XML model is considered to conform to the operating rules and design criteria of the distribution network; otherwise, generate error information including the error type, error location, and error details, and output this verification result as part of the overall result of the cross-check.

[0255] S5: Output the cross-check information according to the cross-check result, where the cross-check result includes the set of information passed in the cross-check and the set of error information for cross-check errors; output the cross-check result, including the information passed in the cross-check or the error prompt for non-pass, so that the user can understand the model cross-check situation and take corresponding measures. For example, if the cross-check result is passed, it can be considered that the SVG graph and the XML model are consistent, and subsequent distribution network analysis and decision-making can be carried out. If the cross-check result is not passed, the error cause needs to be found according to the error prompt and corrected.

[0256] Preferably, in this embodiment, the output of S5 includes: visually displaying the part passed in the cross-check in the form of a graphical interface; recording in detail the error information found during the cross-check process in the form of a list or log, and the error information includes the error type and error location. The error information format is: [error type]:[error location]-[details], for example: parameter mismatch: connection line L12 - resistance value deviation exceeds 5%.

[0257] Such as Figure 2As shown in the figure, it should be noted that in this embodiment, the data range used covers all the substations within the distribution network of the research area. The data sources include multiple channels such as the distribution automation system and the power consumption collection system to ensure the diversity and integrity of the data. The content of data collection covers multiple aspects. First, it is the power consumption data of the substation users, such as the power consumption, power usage, and power consumption time of each user, to reflect the power consumption demand of the substation users and is an important basis for the planning and design of the distribution network. Second, it is the renewable energy power generation data of the substation, such as the power generation, power generation capacity, and power generation time of renewable energy sources such as solar energy and wind energy, to reflect the power generation capacity and potential of renewable energy in the substation. Finally, it is the real-time operation data of the distribution network, such as the node voltage, current, and power factor, to reflect the operation status and efficiency of the distribution network. The time span of data collection is at least one year to obtain historical data for a long enough time for data analysis and model establishment. The time resolution of the data is usually 288 points or 96 points per day, that is, data is collected every 5 minutes or 15 minutes.

[0258] Embodiment 2

[0259] As Figure 4 shown, a method for cross-checking distribution network models based on SVG graphics and XML models further includes data encryption and decryption steps to ensure the security of distribution network model data during transmission and storage. The steps include:

[0260] Step 1: Generate a public key according to the characteristics of the SVG graphic or XML model or using a random number generator; use the hash value of the SVG graphic as part of the public key to ensure the uniqueness of the public key and the SVG graphic. At the same time, generate another public key according to the characteristics of the XML model and use the feature vector of the XML model as part of the public key to ensure the uniqueness of the public key and the XML model.

[0261] Step 2: Encrypt the distribution network model data using the public key to obtain encrypted data; use a symmetric encryption algorithm or an asymmetric encryption algorithm, and use the AES algorithm or RSA algorithm for encryption.

[0262] Step 3: Embed the encrypted data into the attributes or styles of the SVG graphic and the nodes or attributes of the XML model respectively; embed the encrypted data as the attribute value of the node or the attribute value of the style, or embed the encrypted data as a comment in the SVG graphic. At the same time, embed the encrypted data into the nodes or attribute values of the XML model and embed the encrypted data as the attribute value of the node or the attribute value of the attribute value.

[0263] Step 4: Extract the embedded encrypted data from the SVG graph and the XML model, and decrypt them successively using the SVG graph and the XML model as private keys to restore the original distribution network model data. When extracting and decrypting data, first obtain the embedded encrypted data from the SVG graph, and use the method of parsing the XML structure of the SVG graph to extract the encrypted data, extract the encrypted data in the node attribute values or style attribute values, or extract the encrypted data in the comments of the SVG graph. At the same time, extract the corresponding encrypted data from the XML model, and use the method of parsing the XML model to extract the encrypted data, extract the encrypted data in the node attribute values or the attribute values of the attribute values. Then, use the private key of the SVG graph to perform a preliminary decryption on the extracted data, decrypt using the private key corresponding to the public key, decrypt using the AES private key corresponding to the AES public key, or decrypt using the RSA private key corresponding to the RSA public key. Immediately afterwards, use the private key of the XML model to perform a further decryption operation on the decrypted data, decrypt using the private key corresponding to the public key, decrypt using the AES private key corresponding to the AES public key, or decrypt using the RSA private key corresponding to the RSA public key. Finally, merge the data decrypted in the two steps to obtain the complete, decrypted distribution network model data. This ensures the security, integrity, and recoverability of the data, prevents problems such as data leakage and data tampering, and can also ensure that the data will not be lost or damaged during transmission and storage, and can also ensure that the data can be restored to its original state after decryption.

[0264] The above are only preferred specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The substitution can be the substitution of some structures, devices, and method steps, or the substitution of a complete technical solution. Any equivalent substitution or change made according to the technical solution and inventive concept of the present invention should be covered within the protection scope of the present invention.

Claims

1. A mutual verification method for distribution network models based on SVG graphics and XML models, characterized in that, It includes the following steps: S1: Create an SVG graphical representation of the distribution network. The SVG graph generates an overall graphical layout by defining node graphics and connection line styles and using the actual topological structure of the distribution network; S2: Create an XML model corresponding to the SVG graph. The XML model includes node attributes and connection line parameters of the distribution network and fills in the corresponding data according to the design data; S3: Establish a mapping relationship between the SVG graph and the XML model so that each element of the SVG graph corresponds one-to-one with the corresponding data item in the XML model; S4: Perform mutual verification on the SVG graph and the XML model, mainly including: Ⅰ: Topological structure verification, that is, compare the number of nodes and connection lines in the SVG graph and the XML model; Ⅱ: Data content verification, that is, compare the attribute set of each node and the parameter set of each connection line; S5: Output verification information according to the verification results, where the verification results include a set of information passing the verification and a set of error information with verification errors.

2. The method for cross-checking the distribution network model based on SVG graphics and XML model according to claim 1, wherein The creation of the SVG graphical representation of the distribution network in S1 includes the following steps: S1.1: Define the graphical symbols of the distribution network nodes; S1.11: Define a graphical symbol G for each node type t in the distribution network t , which is described by a set of parameters ζ t , including shape, size, and color; S1.12: Use the following formula to represent the definition of the node graphical symbols: G t = f(ζ t ) where f is a function for generating a graphical symbol G according to a parameter set ζ t generate a graphical symbol G t ; S1.2: Define the graphical styles of the distribution network connection lines; S1.21: Define a graphical style L for each type of connection line L in the distribution network l , which is described by a set of attribute sets Φ l , including line type, line width, color, etc.; S1.22: Use the following formula to represent the definition of the connection line graphical styles: L l = g(Φ l ) where g is a function for generating a graphic style L according to an attribute set Φ l generate a graphic style L l ; S1.3: Generate the graphical layout of nodes and connection lines according to the actual topological structure of the distribution network; S1.31: Represent the topological structure of the distribution network as a graph G(V, E), where V is the set of nodes and E is the set of connection lines; S1.32: For each node v in graph G i ∈ V, according to its type t i , apply the function f(ζ t ) defined in S1.1 to generate the node graphic symbol G v,i ; S1.33: For each connection line e in graph G j ∈ E, according to its type l j , apply the function g(Φ l ) defined in S1.2 to generate the connection line graphic style L e,j ; S1.34: Use the following algorithm to generate the layout of the entire S1.VG graph: Among them, Π represents a layout operation, which is used to arrange and combine the graphic symbols and styles of nodes and connection lines according to the topological structure G(V, E) to form the final S1.VG graphic layout S1.VG Layout .

3. The method for mutual verification of distribution network models based on SVG graphics and XML models according to claim 1, characterized in that, The creation of the corresponding XML model in S2 includes the following steps: S2.1: Define the attribute structure of the distribution network nodes; S2.11: Define an attribute structure A for the nodes in the distribution network, which consists of a set of attribute fields F A including, but not limited to, node type, rated capacity, and operating status; S2.12: Use the following data structure to represent the node attribute structure: A = {f1, f2, …, f n} where f i is an attribute field, and n is the number of attribute fields; S2.2: Define the parameter structure of the distribution network connection lines; S2.21: Define a parameter structure P for the connection lines in the distribution network, which consists of a set of parameter fields F P and includes, but is not limited to, line type, length, cross-sectional area, and resistance; S2.22: Use the following data structure to represent the connection line parameter structure: P = {p1, p2, …, p m} where p i is a parameter field, and m is the number of parameter fields; S2.3: Fill in the node attributes and connection line parameters according to the design data of the distribution network; S2.31: For each node v in the distribution network i , fill each field in the attribute structure A according to the design data D v,i , and obtain the node attribute set A v,i ; S2.32: For each connection line e in the distribution network j , fill each field in the parameter structure P according to the design data D e,j to obtain the connection line parameter set P e,j ; S2.33: Use the following mathematical formula to represent the filling process of node attributes and connection line parameters: A v,i = ρ(D v,i , A)P e,j = σ(D e,j , P) Among them, ρ is the node attribute filling function, σ is the connection line parameter filling function, D v,i and D e,j are respectively the design data of node v i and connection line e j respectively.

4. The method for mutual verification of distribution network models based on SVG graphics and XML models according to claim 1, wherein The establishment of the mapping relationship between the SVG graph and the XML model in S3 includes the following steps: S3.1: Identify SVG elements and parse the XML structure of the SVG graph; S3.2: Extract SVG identifiers and parse the attributes of the SVG graph; S3.3: Find XML elements and match the identifiers of SVG elements with the id attributes of nodes and connection lines in the XML model; S3.4: Establish an SVG-XML relationship; S3.41: Create a mapping table with the SVG element identifier as the key and the XML element identifier as the value to associate SVG elements with XML elements; the key of the mapping table is the SVG element ID and the value is the XML element ID; S3.42: Perform verification of node mapping, verification of connection line mapping, verification of topological structure, and verification of data integrity; for node mapping and connection line mapping, specifically use a hash table or dictionary data structure, and associate SVG elements with XML elements by using the identifiers of SVG elements and XML elements as keys; S3.5: Record the mapping result; S3.6: Output the result.

5. The method for mutual verification of distribution network models based on SVG graphics and XML models according to claim 1, characterized in that The mutual verification between the SVG graph and the XML model in S4 includes the following steps: S4.1: Perform topological structure verification, and verify the data integrity of the XML model according to the topological structure of the SVG graph; S4.11: Determine the number of nodes N and the number of connection lines M in the SVG graph, denoted as N(SVG) and M(SVG) respectively; S4.12: Extract the corresponding number of nodes N(XML) and the number of connection lines M(XML) from the XML model; S4.13: Apply the following formula for topological structure verification: N(SVG) = N(XML) M(SVG) = M(XML) If the above equalities all hold, it is considered that the data integrity verification of the XML model passes; otherwise, record the error information of data inconsistency; S4.2: Perform data content verification, and verify the accuracy of the SVG graph according to the data content of the XML model; S4.21: For each node i in the SVG graph, extract its set of attributes A i (SVG); S4.22: Extract the set of attributes A corresponding to node i from the XML model i (XML); S4.23: Apply the following formula for node attribute verification: Make a = a' where a represents the node attribute field; If for all nodes i, the above conditions are all satisfied, it is considered that the node attribute accuracy verification of the SVG graph passes; otherwise, record the error information of attribute mismatch; S4.24: For each connection line j in the SVG graph, extract its parameter set P j (SVG); S4.25: Extract the parameter set P corresponding to the connection line j from the XML model j (XML); S4.26: Apply the following formula for connection line parameter verification: such that |p - p'| ≤ ε p where p represents the connection line parameter field; ε p is a preset parameter tolerance threshold; if the above conditions are satisfied for all connection lines j, it is considered that the accuracy verification of the connection line parameters of the SVG graph passes; otherwise, an error message of parameter mismatch is recorded; S4.3: Output the verification result, and the verification result includes the information of passing the verification or the error prompt of failing to pass the verification; S4.31: If all verifications in S4.1 and S4.2 pass, output the information of passing the verification; S4.32: If any verification fails, output the error prompt including the error type and error location; S4.33: The output of the verification result can be represented by the following mathematical formula: R = {PassedSet, ErrorSet} where R is the verification result set, PassedSet is the set of information passing the verification, and ErrorSet is the set of error information failing to pass the verification.

6. The method for mutual verification and calibration of a distribution network model based on SVG graphics and XML models according to claim 1, wherein, S4 further includes performing matching verification on the data between the SVG graph and the XML model, and the data matching verification includes the following steps: Step a: Node matching verification: Step a.1: Extract each node element n from the SVG graph i and extract its identifier ID n,i ; Step a.2: Search for the node record R corresponding to the identifier ID in the XML model n,i in the XML model n,i ; Step a.3: Compare the set of attributes A of the nodes in the SVG graph n,i with the set of attributes A of the corresponding nodes in the XML model R,n,i to check if they are consistent: A n,i ≡A R,n,i ; Step b: Connection line matching verification: Step b.1: Identify each connection line element l in the SVG graph j , and extract the identifier of its starting node ID start,j and the identifier of the ending node ID end,j ; Step b.2: Search in the XML model for the connection line record R start,j corresponding to the start node ID end,j and the end node ID l,j identifiers; Step b.3: Compare the set of attributes B of the connecting lines in the SVG graph l,j with the set of parameters B of the corresponding connecting lines in the XML model R,l,j to check if they are consistent: B l,j ≡B R,l,j ; Step c: Topological structure consistency verification: Step c.1: Construct the topological structure diagram T of the SVG graph SVG , including the connection relationship between nodes and connection lines; Step c.2: Construct the topological structure diagram T of the XML model XML , based on the data relationship between nodes and connection lines Step c.3: Apply the following algorithm to compare whether the two topological structure diagrams are exactly the same: Step d: Data integrity verification: Step d.1: Confirm that each node and connection line in the XML model has a corresponding SVG graph element, and apply the following logical expression: Among them, V XML and E XML are respectively the sets of nodes and connection lines in the XML model, and N SVG and L SVG are respectively the sets of nodes and connection lines in the SVG graph; Step d.2: Confirm that each node and connection line in the SVG graph has a corresponding XML model record, and apply the following logical expression: Step d.3: Check whether there are isolated nodes or connection lines, and apply the following algorithm: Among them, IsolatedElements is the set of isolated elements; Step e: Attribute value verification: Step e.1: Compare the set of attribute values C of the nodes and connection lines in the SVG graph n,i and C l,j with the data sets C R,n,i and C R,l,j in the XML model item by item; Step e.2: Use the following preset verification rules and algorithms to perform logical and numerical verification on the attribute values: Validate(C n,i ,C R,n,i )→Result n,i Validate(C l,j , C R,l,j ) → Result l,j Among them, Validate is the verification function, and Result n,i and Result l,j is the verification result.

7. The method for mutual verification and calibration of a distribution network model based on SVG graphics and XML models according to claim 1, wherein The S4 further includes a step of verifying the data in the XML model based on the preset operation rules and design standards of the distribution network, and the verification step includes: Step ①: Define the set of operation rules of the distribution network as R rules and the set of design standards as S standards ; Step ②: For each element y ∈ V XML ∪ E XML in the XML model, perform the following checks: y ∈ V XML ∪ E XML Among them, V validation (y) indicates whether the element y meets the operating rules and design criteria; If for all elements y ∈ V XML ∪ E XML of V validation (y) is true, it is considered that the data in the XML model conforms to the operation rules and design standards of the distribution network; otherwise, an error message including the error type, error location, and error details is generated, and this verification result is output as part of the overall result of the cross-checking.

8. The method for cross-checking distribution network models based on SVG graphics and XML models according to claim 1, wherein It further includes steps of data encryption and decryption, and the steps include: Step 1: Generate a public key according to the characteristics of the SVG graph or XML model or by using a random number generator; Step 2: Encrypt the distribution network model data by using the public key to obtain encrypted data; Step 3: Embed the encrypted data into the attributes or styles of the SVG graph and the nodes or attributes of the XML model respectively; Step 4: Extract the embedded encrypted data from the SVG graph and XML model, and decrypt it in turn by using the SVG graph and XML model as the private key to restore the original distribution network model data.

9. The method for mutual verification and calibration of a distribution network model based on SVG graphics and XML models according to claim 1, wherein The output of the S5 includes: visually displaying the parts that pass the verification in the form of a graphical interface; detailed recording of the error information found during the verification process in the form of a list or log, and the error information includes the error type and error location.