Equipment connection diagram scoring optimization method based on data analysis

By using attribute graph modeling and graph editing distance calculation, combined with the Fruchterman-Reingold graph layout algorithm, the scoring method of the device connection networking assessment system was optimized. This solved the problems of unreasonable scoring and inability to intuitively view errors in existing technologies, and achieved higher scoring accuracy and node matching alignment.

CN120804354APending Publication Date: 2025-10-17CHINA SATELLITE MARITIME MEASUREMENT & CONTROL DEPT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510615684.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In existing equipment connection networking assessment systems, the scoring algorithm fails to consider the equipment topology and lacks an algorithm that matches the candidate's connection diagram with the standard answer's connection diagram, resulting in unreasonable scoring and an inability to intuitively view errors.

Method used

A data analysis-based device connectivity graph scoring optimization method is adopted. By using attribute graph modeling, the scoring problem is transformed into a problem of calculating the similarity between attribute graphs. By defining a cost function for graph edit distance, the DP-GED algorithm is used to calculate the graph edit distance, and the Fruchterman-Reingold graph layout algorithm is used to re-layout the graph to achieve clear contrast.

Benefits of technology

It improved the scoring accuracy and usability of the device connection networking assessment system, reduced calculation time, achieved clear comparison between node matching alignment and graphs, reduced scoring error by more than 7%, and is closer to expert scoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120804354A_ABST
    Figure CN120804354A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment connection diagram scoring optimization method based on data analysis, and relates to the technical field of scoring optimization, and the method comprises the steps: carrying out the modeling of a communication equipment connection diagram through employing an attribute diagram, and converting a scoring problem of an equipment connection networking examination system into a similarity calculation problem between calculation attribute diagrams; the score optimization method comprises the following steps: defining a cost function in a graph editing distance; calculating a graph editing distance by using a DP-GED algorithm; converting the graph editing distance into a score by using score mapping; performing re-layout on the graph B by utilizing a Fuchterman-Reingold graph layout algorithm and the vertex corresponding relation L so as to realize clear comparison between the graph A and the graph B; according to the GEDS scoring algorithm based on the graph editing distance, compared with a system original VECS scoring algorithm, the GEDS scoring algorithm based on the graph editing distance is closer to expert scoring in the aspect of test data, and meanwhile it is avoided that wrong answers heterogeneous with standard answers are marked as full scores.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of score optimization, and particularly relates to a device connection graph score optimization method based on data analysis. BACKGROUND

[0002] The device connection networking examination system currently developed is mainly used for investigating the communication signal process and device connection relationship mastered by communication professionals, however, the algorithm for scoring in the current system only considers the device and the number of connection types, and fails to consider the topology of the device; in addition, the device connection networking examination system lacks an algorithm for matching the connection graph of the examinee and the standard answer connection graph, and cannot directly view the correct part and the error part of the connection graph; therefore, a reasonable scoring algorithm and a matching algorithm are proposed for the device connection networking examination system, which can effectively improve the usability of the device connection networking examination system. SUMMARY

[0003] The present application aims to provide a device connection graph score optimization method based on data analysis to solve the problems in the prior art.

[0004] To achieve the above-mentioned purpose, the present application provides the following technical scheme: a device connection graph score optimization method based on data analysis, which uses an attribute graph to model the communication device connection graph, and converts the scoring problem of the device connection networking examination system into a similarity calculation problem between attribute graphs; the specific score optimization method includes the following steps:

[0005] S1, defining a cost function in the graph edit distance;

[0006] S2, calculating the graph edit distance by using the DP-GED algorithm;

[0007] S3, calculating the score according to the graph edit distance;

[0008] S4, using the Fruchterman-Reingold graph layout algorithm and the vertex correspondence relationship L to re-layout the graph B, so as to realize the clear comparison between the graph A and the graph B.

[0009] Further, the scoring problem of the device connection graph is essentially a problem of measuring the similarity between the examinee's answer and the standard answer graph, after the device connection graph is expressed by an attribute graph, the scoring problem of the device connection graph is converted into an attribute graph similarity problem, and the attribute graph similarity problem is a basic problem about the graph structure;

[0010] Graph is a widely used data form to represent many structured data in the real world by nodes and edges; attributed graph is a graph with attributes assigned to nodes and edges; communication device connection graph can be defined by attributed graph; similarity problem of attributed graph is a fundamental problem about graph structure, which has important applications in life science, drug development, pattern recognition, etc.; common similarity measures include graph edit distance and maximum common subgraph, where graph edit distance has advantages of robustness, flexibility, scalability, etc.

[0011] Communication device attributes include model and interface, and the interfaces of two devices are connected by a connection cable; when modeling the communication device connection graph by attributed graph, the vertices of the attributed graph represent devices, the attributes of the vertices represent the types of the devices, the edges of the attributed graph represent the connection cables or links between the devices, and the attributes of the edges mark the types of a pair of ports connecting two devices.

[0012] Further, the edges and vertices of the attributed graph can be assigned attributes, V is a set of all vertices of the graph, and E is a set of all edges of the graph;

[0013] μ is a vertex attribute function that maps a vertex v to an attribute l corresponding to the vertex v v A vertex corresponds to a device or an abstract communication entity, and the attribute of the vertex represents the type of the device.

[0014] L v is a set of all vertex attributes, which is also a set of all device types;

[0015] Corresponding to the vertex, an attribute function ζ is used to map an edge e to an attribute ζ(e) corresponding to the edge e; an edge represents a connection cable or a link between devices, and the attribute of the edge marks the type of a pair of ports connecting two vertices, i.e., two devices;

[0016] L E is a set of all edge attributes, which is thus a set of all possible binary pairs such as device 1 port and device 2 port;

[0017] An attributed graph can be represented by a four-tuple:

[0018] AG=(V,E,μ,ζ);

[0019] wherein V is a vertex set, E is an edge set; L V is a vertex attribute set, and the attribute l v of a vertex v is μ(v); ζ is an edge attribute function, and L E is an edge attribute set, and the attribute l e of an edge e is ζ(e).

[0020] Furthermore, the attribute graph is used to depict the device connection relationship diagram in the device connection networking assessment system. Device attributes include model and interface. The interface between two devices is connected through a connecting cable or link. For example, the model is HuaweiS5720, which has interfaces such as Ethernet port and control port. The connection line between devices can be represented by the corresponding interface. For example, the No. 1 network port of HuaweiS5720 is connected to the No. 17 network port of another switch. The device is used as the vertex and the connecting cable between devices is used as the edge.

[0021] The vertices of the attribute graph represent communication devices, and the type of the corresponding device is the attribute of the vertex. In the examination system, there are n types of devices, represented by {κ1, κ2, κ3, ..., κ n} indicates that for a device κ j , and use the collection of all its interfaces to Represented as T, then the set of all attributes of the vertex is T = {κ1, κ2, κ3, ..., κ n}, so L V = T, then the set of ports of all types of devices is Then L E =I×I, where × represents the Cartesian product, and each element is a pair of ports;

[0022] All device models are grouped together Represents that the vertex attribute set L V =T; use Indicates the model is κ j The interface type set of the device, the interface set Γ of a random downconverter κ κ ={XS1, XS2, XS3, XS4, XS5}; thus the connection line attributes can be represented by a pair of interfaces.

[0023] Furthermore, in step S1: a cost function is defined for the device connection relationship diagram in the device connection networking assessment system; the addition and deletion operations of vertices and edges in the attribute graph are symmetrical, and the cost functions for adding and deleting devices or lines with the same attributes are consistent; therefore, the cost of adding and deleting all vertices is defined as a constant α1>0; the cost of adding and deleting edges is defined as a constant β1>0.

[0024] Furthermore, in step S1: the cost function rules constructed include the replacement costs of vertices and edges; in the process of constructing the cost function, the devices are classified into a model tree according to a hierarchical classification method to reflect the similarity between the devices; the cost function construction rules are specified as follows:

[0025] The replacement cost of a vertex is:

[0026] h. The replacement cost between devices of the same type is 0; for example: c(Huawei S5720→Huawei S5720)=0; here c is the cost function, representing the cost corresponding to the graph editing operation;

[0027] p. The replacement cost between devices of different types is α2; for example:

[0028] c(Program-controlled A2000→Huawei S5700)=α2;

[0029] q. The replacement cost between devices of the same type but different models is α3; where α3<α2; c(Huawei S5720→Huawei S5700)=α3;

[0030] The replacement cost of an edge is:

[0031] The replacement cost of an edge of different types is β1, and the replacement cost of an edge of the same type is 0;

[0032] α2, α3 and β1 are all positive numbers, and the importance of a correct vertex is higher than that of an edge, so β1<α2 is specified.

[0033] Further, in step S2: the graph editing distance problem is an NP-Hard combinatorial optimization problem, and it is difficult to accurately solve large-scale problems in polynomial time, but the device connection network examination system is used to examine the device connection relationship graph of the topology graph mastered by the trainee, which is usually relatively small in size, so the graph editing distance can be calculated by using the heuristic algorithm DP-GED. The DP-GED algorithm is a depth-first algorithm based on the upper and lower bound pruning strategy, which can accurately calculate the graph editing distance, and greatly reduces the set space to be expanded compared with the A* algorithm, and reduces the calculation time.

[0034] Further, in step S2: the graph editing distance is defined as the total cost of the minimum editing operation required to edit the source graph into the target graph; the graph A can be converted into the graph B by adding, deleting and replacing the vertices and edges of the graph A, where the graph A represents the source graph, and the graph B represents the target graph. For example, all the edges and nodes of A can be deleted and the edges and nodes of B can be newly added. The editing operation sequence from the graph A to the graph B is called an editing path; after defining the cost of the editing operation of the vertices and edges, the editing path is the total operation cost; and the editing path with the minimum cost is called the optimal editing path, and the corresponding cost is called the graph editing distance;

[0035] g1 and g2 respectively represent the source attribute graph and the target attribute graph, and the source attribute graph g1 becomes the target attribute graph g2 after editing operation; the graph editing distance of g1 and g2 is:

[0036]

[0037] where GED(g1, g2) denotes the graph edit distance between g1 and g2, g1 = (V1, E1, μ1, ζ1), g2 = (V2, E2, μ2, ζ2), γ(g1, g2) denotes the set of edit operations from g1 to g2, c is a cost function measuring the operation e i i c(e i ) denotes the cost of operation e A ; the allowed edit operations include addition, deletion and replacement of vertices and edges.

[0038] Further, in step S3: the graph edit distance is converted into a score using a score mapping;

[0039] After obtaining the edit distance of graph A and graph B, the graph edit distance is converted into a score in percentage; in this scoring mechanism, graph A represents the standard answer graph, and graph B represents the examinee answer graph. For the case that graph B is an empty graph, GED(A, φ) is calculated, where is an empty graph, i.e. the cost of adding all edges and nodes from the empty graph to graph A is: U = |V A |α1+|E A |β1, where |V A | and |E A | represent the number of nodes and edges of A respectively; assuming that the full score is F, then for any graph B, the scoring formula is:

[0040]

[0041] where Score(B|A) represents the score of the examinee answer graph B when the standard answer is A; U is GED(A, φ), representing the graph edit distance between the standard answer A and the empty graph ; max represents the maximum value; F is the full score constant, generally F = 100, i.e. the full score of the question is 100; for example, for isomorphic graphs GED(A, B) = 0, the score is F; for the empty graph GED(A, B) = U, the score is 0; when GED(A, B) ≥ u, the score is 0.

[0042] The VECS scoring algorithm is the original algorithm of the examination system; the consideration is that if the examinee answer is recorded as a topological graph B and the standard answer is recorded as a topological graph A, then:

[0043] m. the number of devices and the number of connections of graph B are consistent with graph A;

[0044] n. the device types and the connection types of graph B are consistent with graph A;

[0045] However, simultaneously satisfying conditions m and n is only a necessary but not sufficient condition for A and B to be isomorphic.

[0046] The calculation method of the score is as follows: if the number of devices of figure B is consistent with that of figure A, a score a is added; if the number of connection lines of figure B is consistent with that of figure A, a score b is added; if there is one device type of figure B consistent with that of figure A, a score c is added; if there is one connection line type of figure B consistent with that of figure A, a score d is added; finally, the scores of the examinees are normalized to calculate the scores under the percentage system; when the standard answer is figure A, the score of figure B calculated by the scoring algorithm is:

[0047] wherein, |χ| is the number of elements contained in set χ, a, b, c and d are parameters of the VECS algorithm, and are positive numbers; |X| represents the number of elements in set X;

[0048] μ(v) represents the attribute of the vertex, that is, the type of the device, wherein v is a vertex; and V A is a set composed of all vertices of figure A, and μ(v A ) represents a set composed of all device types of figure A, wherein the elements of the set are allowed to be repeated, that is, a multiple set; ζ(E A ) represents a set composed of all connection line types of figure A; therefore, |μ(V A )∩μ(V B )| is a set of the same device types in figure A and figure B; |μ(V A )∩μ(V B )| is the number of the same devices in figure A and figure B;

[0049] The limitation of the VECS scoring algorithm is that the characteristics of the graph are too simplified, so that the wrong answer can also get full score, and the scoring standard constructed on this basis lacks rationality. In addition, since the algorithm cannot obtain the matching relationship between the devices of figure A and figure B, the examinee cannot directly view the wrong part. Therefore, the GEDS scoring algorithm is used for scoring calculation, and node matching alignment is realized.

[0050] Further, in step S4: the optimal editing path can solve the corresponding problem between the nodes of the graph; by checking the corresponding node pair in the optimal editing path, whether the cost function is 0 is calculated again to judge the corresponding relationship between the nodes of two graphs; for example, for the node u in figure A and the node v in figure B, the optimal editing distance contains the replacement operation u→v, if the replacement cost c(u→v) = 0, u and v are completely matched; if c(u→v) = α2, it indicates that the two are different types of devices and are completely unmatched; if c(u→v) = α3, it indicates that the two are the same type but different models of devices and are partially matched; in actual presentation, the matching relationship between the two graphs also needs to be presented by intuitive means; the Fruchterman-Reingold graph layout algorithm is used to rearrange the examinee's answer.

[0051] Compared with the prior art, the present application has the beneficial effects that:

[0052] The present application aims at the obvious defects of the device connection network examination system VECS scoring algorithm and the difficulty of comparing the differences between the examinee's answers and the standard answers, studies the similarity measurement problem between connection graphs, and proposes a GEDS scoring algorithm based on graph edit distance, realizes node matching alignment, and simultaneously realizes the re-layout of the examinee's answers by using the Fruchterman-Reingold graph layout algorithm; on the test data set, the average relative error of the GEDS scoring algorithm is reduced by more than 7% compared with the VECS scoring method of the examination system, is closer to the expert scoring, and the GEDS algorithm can intuitively display the differences between the examinee's answers and the standard answers. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 The device connection diagram of the device connection diagram scoring optimization method based on data analysis of the present application;

[0054] Figure 2 The graph edit distance diagram of the device connection diagram scoring optimization method based on data analysis of the present application;

[0055] Figure 3 The conversion curve diagram of the scoring and the graph edit distance of the device connection diagram scoring optimization method based on data analysis of the present application;

[0056] Figure 4 The diagram after the intermediate graph is re-laid out by using the re-layout algorithm of the device connection diagram scoring optimization method based on data analysis of the present application;

[0057] Figure 5 The sample diagram of the device connection diagram scoring optimization method based on data analysis of the present application, which is heterogeneous but evaluated as homogeneous by the VECS algorithm;

[0058] Figure 6 The diagram B re-layout diagram in sample 3 of the device connection diagram scoring optimization method based on data analysis of the present application. DETAILED DESCRIPTION

[0059] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.

[0060] As Figures 1-6As shown, the present application provides a technical solution, a device connection graph scoring optimization method based on data analysis, which models the communication device connection graph by using the attribute graph, and converts the scoring problem of the device connection network examination system into the similarity calculation problem between the attribute graphs; the specific scoring optimization method includes the following steps:

[0061] S1, define the cost function in the graph edit distance;

[0062] S2, calculate the graph edit distance by using the DP-GED algorithm;

[0063] S3, calculate the score according to the graph edit distance;

[0064] S4, re-layout the graph B by using the Fruchterman-Reingold graph layout algorithm and the vertex correspondence L, so as to realize the clear contrast between the graph A and the graph B.

[0065] The scoring problem of the device connection graph is essentially a problem of measuring the similarity between the examinee's answer and the standard answer graph. After the device connection graph is represented by the attribute graph, the scoring problem of the device connection graph is converted into the similarity problem of the attribute graph. The similarity problem of the attribute graph is a basic problem about the graph structure;

[0066] Graph is a widely existing data form, which represents many structured data in the real world through nodes and edges. The attribute graph gives attributes to nodes and edges on the basis of the graph structure. The communication device connection graph can be defined by the attribute graph. The similarity problem of the attribute graph is a basic problem about the graph structure, which has important applications in the fields of life science, drug research and development, pattern recognition, etc. Common similarity measures include graph edit distance and maximum common subgraph, wherein the graph edit distance has advantages such as robustness, flexibility and scalability;

[0067] The communication device attributes include model and interface. The interfaces of two devices are connected by a connection cable. When the communication device connection graph is modeled by using the attribute graph, the vertices of the attribute graph represent devices, the attributes of the vertices represent the types of the devices, the edges of the attribute graph represent the connection cables or links between the devices, and the attributes of the edges mark the types of a pair of ports connecting two devices.

[0068] The edges and vertices of the attribute graph can be given attributes. V is a set of all vertices of the graph, and E is a set of all edges of the graph;

[0069] μ is a vertex attribute function, which maps a vertex v to the attribute l corresponding to the vertex v v =μ(v); a vertex corresponds to a device or an abstract communication entity, and the attribute of the vertex represents the type of the device;

[0070] LV It is the set of all vertex attributes and also the set of all device types;

[0071] Corresponding to the vertex, an edge e is mapped to the attribute ζ(e) corresponding to the edge e using the attribute function ζ. The edge represents the connecting cable or link between devices, and the edge attribute marks the type of the pair of ports of the two connected vertices, i.e., the two devices.

[0072] L E is the set of all edge attributes, and thus the set of all possible binary pairs such as device 1 port and device 2 port.

[0073] The property graph can be represented using a quadruple:

[0074] AG=((V,E,μ,ζ);

[0075] Where V is the vertex set, is the edge set; L V is the vertex attribute set, the attribute l of vertex v v =μ(v); ζ is the edge attribute function, L E is the edge attribute set, the attribute l of edge e e =ζ(e).

[0076] Use attribute graphs to depict the device connection relationship diagram in the device connection networking assessment system. Device attributes include model and interface. The interface between two devices is connected through a connecting cable or link. For example, the model is HuaweiS5720, which has interfaces such as Ethernet port and control port. The connection lines between devices can be represented by corresponding interfaces. For example, the No. 1 network port of HuaweiS5720 is connected to the No. 17 network port of another switch. Devices are used as vertices, and the connecting cables between devices are used as edges.

[0077] The vertices of the attribute graph represent communication devices, and the type of the corresponding device is the attribute of the vertex. In the examination system, there are n types of devices, represented by {κ1, κ2, κ3, ..., κ n} indicates that for a device κ j , and use the collection of all its interfaces to Represented as T, then the set of all attributes of the vertex is T = {κ1, κ2, κ3, ..., κ n}, so L V = T, then the set of ports of all types of devices is Then L E =I×I, where × represents the Cartesian product, and each element is a pair of ports;

[0078] All device models are grouped together L = {L1, L2, L3, L4, L5} ; L represents the vertex attribute set L V = T; the interface type set of the device of model κ j represents the interface type set of the device of model κ κ = {XS1, XS2, XS3, XS4, XS5} ; thus, the connection line attribute can be represented by a pair of interfaces.

[0079] In step S1: the definition of the cost function for the device connection relationship graph in the device connection networking assessment system; the addition and deletion operations of the vertices and edges in the attribute graph are symmetrical, and the cost functions of the addition and deletion of the same attribute devices or connection lines are consistent; therefore, the addition and deletion cost definitions of all vertices are set as constants α1>0; the addition and deletion cost definitions of edges are set as constants β1>0.

[0080] Further, in step S1: the cost function rules include the replacement cost of vertices and the replacement cost of edges; in the process of constructing the cost function, the devices are classified according to the hierarchical classification method to form a model tree, which is used to reflect the similarity between devices; the construction cost function rules are defined as follows:

[0081] The replacement cost of vertices is:

[0082] h. The replacement cost between devices of the same model is 0; for example: c(Huawei S5720→Huawei S5720)=0; here, c is the cost function, representing the cost corresponding to the graph editing operation;

[0083] p. The replacement cost between devices of different types is α2; for example:

[0084] c(Programmed A2000→Huawei S5700)=α2;

[0085] q. The replacement cost between devices of the same type and different models is α3; where, α3<α2; c(Huawei S5720→Huawei S5700)=α3;

[0086] The replacement cost of edges is:

[0087] The replacement cost of edges of different types is β1, and the replacement cost of edges of the same type is 0;

[0088] α2, α3 and β1 are positive numbers, and the importance of correct vertices is higher than that of edges, so β1<α2 is defined.

[0089] ​In step S2: the graph edit distance problem is an NP-Hard combinatorial optimization problem, which is difficult to solve accurately in polynomial time for large-scale problems, but the device connection network examination system is used to examine the device connection relationship graph of the topology graph mastered by the trainee, which is usually relatively small in size, so a heuristic algorithm DP-GED can be used to calculate the graph edit distance. The DP-GED algorithm is a depth-first algorithm based on the upper and lower bound pruning strategy, which can accurately calculate the graph edit distance, and greatly reduces the set space to be expanded compared with the A* algorithm, and reduces the calculation time.

[0090] In step S2: the graph edit distance is defined as the total cost of the minimum editing operation required to edit the source graph into the target graph; graph A can be converted into graph B through vertex and edge addition, deletion, and replacement operations, where graph A represents the source graph and graph B represents the target graph. For example, all edges and nodes of A can be deleted and then the edges and nodes of B can be added. The editing operation sequence from graph A to graph B is called an editing path. After defining the cost of vertex and edge editing operations, the editing path is the total operation cost. The editing path with the minimum cost is called the optimal editing path, and the corresponding cost is called the graph edit distance.

[0091] g1 and g2 represent the source attribute graph and the target attribute graph, respectively, and the source attribute graph g1 is edited into the target attribute graph g2 through editing operations. The graph edit distance of g1 and g2 is:

[0092]

[0093] wherein, |χ| is the number of elements in set χ, a, b, c, and d are parameters of the VECS algorithm, all of which are positive numbers; |X| represents the number of elements in set X.

[0094] In step S3: the graph edit distance is converted into a score using a scoring mapping.

[0095] After obtaining the edit distance of graph A and graph B, the graph edit distance is converted into a score in the percentage system. In this scoring mechanism, graph A represents the standard answer graph, and graph B represents the examinee's answer graph. For the case where graph B is an empty graph, GED(A, φ) is calculated, where is an empty graph, i.e., the cost of adding all edges and nodes from the empty graph to graph A is: A |α1+|E A |β1, wherein, |V A | and |E A | represent the number of nodes and edges of A, respectively. Assuming that the full score is F, then for any graph B, the scoring formula is:

[0096]

[0097] where Score(B|A) represents the score of the examinee's answer graph B when the standard answer is A; U is GED(A, φ), which represents the graph edit distance between the standard answer A and the empty graph ; max represents the maximum value; F is the full score constant, which is generally F = 100, i.e., the full score of the question is 100; for example, for isomorphic graphs, GED(A, B) = 0, and the score is F; for the empty graph, GED(A, B) = U, and the score is 0; when GED(A, B) ≥ U, the score is 0.

[0098] The VECS scoring algorithm is the original algorithm of the examination system; the consideration is that if the examinee's answer is recorded as a topological graph B and the standard answer is recorded as a topological graph A, then:

[0099] m. The number of devices and the number of connections of graph B are consistent with graph A;

[0100] n. The device type and the connection type of graph B are consistent with graph A;

[0101] However, simultaneously satisfying conditions m and n is only a necessary but insufficient condition for A and B to be isomorphic.

[0102] The calculation method of the score is as follows: if the number of devices of graph B is consistent with graph A, then add a score a; if the number of connections of graph B is consistent with graph A, then add a score b; for each device type of graph B that is the same as graph A, add a score c; for each connection type of graph B that is the same as graph A, add a score d; finally, the score of the examinee is normalized to calculate the score under the percentage system; when the standard answer is graph A, the scoring algorithm calculates the score of graph B as:

[0103]

[0104] wherein, |χ| is the number of elements contained in set χ, a, b, c, d are algorithm parameters; a, b, c, d are parameters of the VECS algorithm, and are all positive constants; |X| represents the number of elements in set X;

[0105] μ(v) represents the attribute of the vertex, i.e., the type of the device, where ν is a vertex; and V A here is the set of all vertices of graph A, μ(V A ) represents the set of all device types of graph A, and the elements of the set are allowed to be repeated, i.e., a multiple set; ζ(E A ) represents the set of all connection types of graph A; therefore, μ(V A )∩μ(V B ) is the set of the same device types in graphs A and B; |μ(v A )∩μ(VB ) is the number of the same devices in figure A and figure B;

[0106] The limitation of the VECS scoring algorithm is that it oversimplifies the characteristics of the figure, leading to the possibility that an incorrect answer can also get a full score, and the scoring standard built on this basis lacks natural rationality. In addition, since the algorithm cannot obtain the matching relationship between the devices of figure A and figure B, the examinee cannot intuitively view the wrong part. Therefore, the GEDS scoring algorithm is used for scoring calculation in the present application, and node matching alignment is realized.

[0107] In step S4: the optimal edit path can solve the correspondence problem between the nodes of the figure; by checking the corresponding node pair in the optimal edit path, it can be judged whether the cost function is 0, that is, the corresponding relationship between the nodes of the two figures can be judged; for example, for the node u in figure A and the node v in figure B, the optimal edit distance contains the replacement operation u→v, if the replacement cost c(u→v)=0, then u and v are completely matched; if c(u→v)=α2, it means that the two are different types of devices and are completely unmatched; if c(u→v)=α3, it means that the two are the same type but different models of devices and are partially matched; in actual presentation, it is also necessary to present the matching relationship between the two figures by intuitive means; in this paper, the Fruchterman-Reingold graph layout algorithm is used to rearrange the examinee's answer.

[0108] Real-time example one:

[0109] The experiment is run on a Windows Server 2012R2 X64 operating system, a 4-core Intel Xeon CPU E5-2660 processor; the program language is Python3.8, and the main algorithm library is NetworkX 2.5;

[0110] The present application compares the differences in scoring between the VECS algorithm and the GEDS algorithm proposed in this paper on two test data sets; data set 1 contains 16 groups of heterogeneous graphs that meet the conditions m, n of the VECS algorithm, wherein the graph pair contains 1 standard answer graph and 1 examinee answer graph, Figure 5 Two examples are listed; the VECS algorithm will evaluate all answers as full score 2 data set 2 contains 20 groups, which are taken from the actual communication equipment connection topology graph;

[0111] In the VECS algorithm, a=b=5; c=d=1; in the GEDS algorithm, the cost function parameters are α1=2, β1=1, α2=2, α3=1; Figure 5 Two examples in data set 1 are shown in the table: example 1 and example 2; the devices are divided into three types: square, triangle and circle, and the connection lines are divided into solid line and dashed line; one example in data set 2 is shown in the table: example 3;

[0112] Table 1 compares the GEDS algorithm and the VECS algorithm on test examples 1-3. The results show that the GEDS algorithm is closer to the expert score than the VECS algorithm, and achieves node matching between graphs; in the matching relationship column of Table 1, a->1 represents that node 1 of graph A and node a of graph B are matched, where graph A and graph B represent the standard answer and the examinee answer respectively, and ε->12 represents that node 12 of graph A needs to be added in graph B;

[0113] Table 1 comparison of scores of algorithms on test examples

[0114]

[0115] In addition, the VECS algorithm cannot give the matching relationship between graph nodes, while the GEDS algorithm can find the matching relationship between graph nodes, and further achieve the re-layout of the examinee answer graph B. Figure 6 The matching alignment capability of the GEDS algorithm is shown, and the similarities and differences between the examinee answer and the standard answer graph A can be clearly viewed;

[0116] Table 2 comparison of algorithms on test data sets

[0117]

[0118] The average relative error on data set 1 and data set 2 is presented in Table 2, where the expert score is used as the score standard (Ground Truth), and the results show that the average error of the GEDS algorithm is significantly lower than that of the VECS algorithm, and is closer to the expert score result.

[0119] It is apparent to those skilled in the art that the present application is not limited to the details of the foregoing exemplary embodiments, and that the present application can be implemented in other particular forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered in all respects as illustrative and not restrictive, and the scope of the present application should be defined by the appended claims rather than the above description, and it is intended to include all changes falling within the meaning and range of equivalents of the claims. Any reference signs in the claims should not be considered as limiting the claims involved.

Claims

1. A device connection graph scoring optimization method based on data analysis, characterized by: The communication equipment connection graph is modeled using the attribute graph, and the scoring problem of the equipment connection networking assessment system is transformed into a similarity calculation problem between attribute graphs. The specific scoring optimization method includes the following steps: S1. Define the cost function in graph edit distance; S2. Calculate the graph edit distance using the DP-GED algorithm; S3. Calculate the score based on the graph edit distance; S4. Relayout graph B using the Fruchterman-Reingold graph layout algorithm and vertex correspondence L.

2. The device connection diagram scoring optimization method based on data analysis according to claim 1, characterized in that: After the device connection graph is represented by an attribute graph, the scoring problem of the device connection graph is transformed into an attribute graph similarity problem; The attributes of communication devices include model and interface. The interfaces of two devices are connected by connecting cables. When using an attribute graph to model the communication device connection graph, the vertices of the attribute graph represent devices, and the attributes of the vertices represent the types of devices. The edges of the attribute graph represent the connecting cables or links between the devices, and the attributes of the edges mark the types of a pair of ports connecting the two devices.

3. The device connection diagram scoring optimization method based on data analysis according to claim 1, characterized in that: The edges and vertices of the attribute graph can be assigned attributes, V is the set of all vertices of the graph, and E is the set of all edges of the graph; μ is the vertex attribute function, which maps a vertex v to the attribute l corresponding to the vertex v v =μ(v); Correspondingly, an edge e is mapped to the attribute ζ(e) corresponding to the edge e using the attribute function ζ; The property graph can be represented using a quadruple: AG = (V, E, μ, ζ); Where V is the vertex set, is the edge set; L V is the vertex attribute set, the attribute l of vertex v v =μ(v); ζ is the edge attribute function, L E is the edge attribute set, the attribute l of edge e e =ζ(e).

4. The device connection diagram scoring optimization method based on data analysis according to claim 1, characterized in that: The attribute graph is used to depict the device connection relationship diagram in the device connection networking assessment system. The device attributes include model and interface. The interface between two devices is connected through a connecting cable or link. The device is used as a vertex and the connecting cable between the devices is used as an edge. The vertices of the attribute graph represent communication devices, and the type of the corresponding device is the attribute of the vertex. In the examination system, there are n types of devices, represented by {κ1, κ2, κ3, ..., κ n } indicates that for a device κ j , and use the collection of all its interfaces to Represented as T, then the set of all attributes of the vertex is T = {κ1, κ2, κ3, ..., κ n }, so L V = T, then the set of ports of all types of devices is Then L E =I×I, where × represents the Cartesian product, and each element is a pair of ports; All device models are grouped together Represents that the vertex attribute set L V =T; use Indicates the model is κ j The interface type set of the device, the interface set Γ of a random downconverter κ κ ={XS1, XS2, XS3, XS4, XS5}; The connection line attributes can be represented by a pair of interfaces.

5. The device connection diagram scoring optimization method based on data analysis according to claim 1 is characterized in that: In step S1: defining a cost function for the device connection relationship diagram in the device connection networking assessment system; The adding and deleting operations for vertices and edges in the attribute graph are symmetrical, and the cost functions for adding and deleting devices or links with the same attribute are consistent; therefore, the adding and deleting costs of all vertices are defined as a constant α1>0; the adding and deleting costs of edges are defined as a constant β1>0.

6. The device connection diagram scoring optimization method based on data analysis according to claim 1, characterized in that: In step S1: the cost function rule constructed includes the replacement cost of the vertex and the replacement cost of the edge; in the process of constructing the cost function, the devices are classified into a model tree according to a hierarchical classification method to reflect the similarity between the devices; The rules for constructing the cost function are as follows: The replacement cost of a vertex is: h. The replacement cost between devices of the same model is 0; p. The replacement cost for different types of equipment is α2; q. The replacement cost for different models of equipment of the same type is α3, where α3 < α2; The replacement cost of an edge is: The replacement cost for edges of different types is β1, and the replacement cost for edges of the same type is 0; α2, α3 and β1 are all positive numbers, and the correctness of vertices is more important than that of edges, so β1 is required to be less than α2.

7. The device connection diagram scoring optimization method based on data analysis according to claim 1 is characterized in that: In step S2: the heuristic algorithm DP-GED is used to calculate the graph edit distance. The DP-GED algorithm is a depth-first algorithm based on the upper and lower bound pruning strategy, so it can be used to calculate the graph edit distance.

8. The device connection diagram scoring optimization method based on data analysis according to claim 1 is characterized in that: In step S2: After the device connection graph is represented using the attribute graph, the graph edit distance is defined as the sum of the minimum edit operation costs required to edit the source graph into the target graph. Graph A can be transformed into graph B by adding, deleting, and replacing vertices and edges, where graph A represents the source graph and graph B represents the target graph. The sequence of edit operations from graph A to graph B is called an edit path. After defining the costs of the vertex and edge edit operations, the edit path is the total operation cost. The edit path with the minimum cost is called the optimal edit path, and the corresponding cost is called the graph edit distance. g1 and g2 represent the source attribute graph and the target attribute graph respectively. After the source attribute graph g1 is edited, it becomes the target attribute graph g2. Then the graph edit distance between g1 and g2 is: in, represents the graph edit distance between g1 and g2, g1 = (V1, E1, μ1, ζ1), g2 = (V2, E2, μ2, ζ2), γ(g1, g2) represents the set of edit operations from g1 to g2, and c is the measure of the operation e i The cost function, c(e i ) represents the operation e i The allowed editing operations include adding, deleting, and replacing vertices and edges.

9. The device connection diagram scoring optimization method based on data analysis according to claim 1, characterized in that: In step S3: using the score mapping, the graph edit distance is converted into a score; After obtaining the edit distance between graphs A and B, the graph edit distance is converted into a percentage score. In this scoring mechanism, graph A represents the standard answer graph, and graph B represents the candidate's answer graph. If graph B is an empty graph, calculate GED(A, φ), where It is an empty graph, that is, the cost of adding all edges and nodes from the empty graph to graph A is: U = |V A |α1+|E A |β1, where |V A | and |E A | represents the number of nodes and edges of A respectively; assuming the full score is F, then for any graph B, its scoring formula is: Among them, Score(B|A) represents the score of the candidate's answer diagram B when the standard answer is A; U is GED(A, φ), which represents the score of the candidate's answer diagram B when the standard answer is A. The graph edit distance of ; max means taking the maximum value.

10. The device connection diagram scoring optimization method based on data analysis according to claim 1, characterized in that: In step S4: the optimal editing path can be used to solve the correspondence problem between graph nodes; by checking the corresponding node pairs in the optimal editing path and then calculating whether its cost function is 0, the correspondence between the nodes of the two graphs can be determined; for node u in graph A and node v in graph B, the optimal editing distance includes the replacement operation u→v. If the replacement cost c(u→v) = 0, then u and v are completely matched; if c(u→v) = α2, it means that the two are different types of devices and are completely mismatched; if c(u→v) = α3, it means that the two are the same type but different models of devices and are partially matched; in the actual presentation, the Fruchterman-Reingold graph layout algorithm is used to rearrange the candidates' answers.