Graph-model consistency verification method and device, computer equipment and storage medium

By obtaining and updating the graph model feature information, combining text recognition and network topology map information, calculating graph model consistency verification, the high cost problem caused by the extensive information in the wiring diagram of complex systems is solved, and the automation verification level and efficiency are improved.

CN119150044AActive Publication Date: 2024-12-17SHENZHEN POWER SUPPLY BUREAU
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411179082.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-17
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

The existing automated graph model consistency verification methods cannot effectively deal with the wide variety of information in complex system wiring diagrams, resulting in high manual verification costs.

Method used

By obtaining graph model feature information from power system operation files, constructing the mapping relationship between graph model coordinates and screen coordinates, obtaining target attribute box information, text recognition and supplementary feature information update, combining Levinstein distance and longest common subsequence The length calculates the character similarity, and the network topology graph information calculates the graph similarity to achieve graph model consistency verification.

Benefits of technology

Improve the automation level of graph model consistency verification, reduce the verification cost, accurately locate and consistency verification of the target attribute box content of graph model, assist in compensating for missing equipment information in power grid business files, and improve verification Efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150044A_ABST
    Figure CN119150044A_ABST
Patent Text Reader

Abstract

The invention relates to a graph-model consistency verification method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining to-be-verified graphic model feature information from a power system operation file; wherein the graphic model feature information comprises graphic model coordinate information; constructing a mapping relationship between the graphic model coordinate information and a current screen coordinate to obtain position mapping information, and obtaining target attribute box information corresponding to a to-be-verified graphic model according to the position mapping information; performing text recognition according to the target attribute box information to obtain supplementary feature information; and updating the to-be-verified graphic model feature information according to the supplementary feature information, and performing graphic model consistency verification according to the updated to-be-verified graphic model feature information. By adopting the method, the automation level of graph-model consistency verification can be improved, and the verification cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data identification and processing, and in particular to a method, device, computer equipment, storage medium and computer program product for pattern consistency verification. Background Art

[0002] As the scale of dispatching automation of power systems continues to expand, the operation and maintenance requirements of power automation systems are also increasing. In daily operation and maintenance monitoring, dispatching diagram and model consistency comparison is one of the key tasks of main grid dispatching inspection.

[0003] However, the current automated verification cannot take into account the wide variety of information in the system wiring diagram. When faced with a system wiring diagram with a complex background, the current related solution is to capture manual experience for inspection. However, due to the complex structure of the diagram and the large amount of information, the cost of manual verification is very high. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for image model consistency verification that can improve the automation level of image model consistency verification and reduce the verification cost in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for checking image consistency, comprising:

[0006] Acquire the pattern feature information to be verified from the power system operation file; wherein the pattern feature information includes pattern coordinate information;

[0007] Constructing a mapping relationship between the image model coordinate information and the current screen coordinates to obtain position mapping information, and acquiring target attribute box information corresponding to the image model to be verified according to the position mapping information;

[0008] Perform text recognition according to the target attribute box information to obtain supplementary feature information;

[0009] The feature information of the image model to be verified is updated according to the supplementary feature information, and the image model consistency verification is performed according to the updated feature information of the image model to be verified.

[0010] In one of the embodiments, obtaining target attribute box information corresponding to the image model to be verified according to the position mapping information includes:

[0011] Calculate the attribute box position information corresponding to the image model to be verified according to the position mapping information;

[0012] Acquire the attribute box data of the corresponding position according to the attribute box position information;

[0013] Eliminate noise data in the attribute frame data according to a preset grayscale threshold to obtain a target grayscale image;

[0014] The target attribute frame information is determined according to the target grayscale image.

[0015] In one embodiment, determining the target attribute frame information according to the target grayscale image includes:

[0016] For the target grayscale image, projections are performed in a first direction and a second direction in the same plane to obtain a target projection image; wherein the first direction and the second direction intersect;

[0017] Determine a preliminary attribute box according to the target projection image, and determine brightness data of each pixel in the preliminary attribute box;

[0018] Calculate the brightness ratio of the primary selection attribute box according to the brightness data; wherein the brightness ratio refers to the ratio of the number of pixels whose brightness data exceeds a preset brightness threshold to the total number of pixels in the primary selection box;

[0019] In the case where the brightness ratio is greater than a preset brightness ratio threshold, the initially selected attribute box is determined to be a target attribute box, and target attribute box information corresponding to the target attribute box is determined.

[0020] In one embodiment, the performing text recognition according to the target attribute box information to obtain supplementary feature information includes:

[0021] According to the target attribute box information, the information content in the target attribute box is detected to obtain text positioning information;

[0022] Text recognition is performed according to the text positioning information to obtain supplementary feature information.

[0023] In one embodiment, the updated feature information of the image model to be verified includes text character information; and performing image model consistency verification according to the updated feature information of the image model to be verified includes:

[0024] For the corresponding multiple patterns to be verified, respectively calculating the Levenshtein distance data and the longest common subsequence length according to the text character information;

[0025] Calculate the character similarity between the patterns to be verified according to the Levenshtein distance data and the longest common subsequence length;

[0026] A pattern consistency check is performed based on the character similarity.

[0027] In one embodiment, the updated feature information of the image model to be verified also includes network topology information; and the image model consistency verification based on the updated feature information of the image model to be verified also includes:

[0028] For the corresponding multiple graph models to be verified, respectively calculating the node similarity data and the edge similarity data according to the network topology information;

[0029] Calculating the graph similarity between the to-be-verified graph models according to the node similarity data and the edge similarity data;

[0030] A graph model consistency check is performed based on the graph similarity.

[0031] In a second aspect, the present application also provides a pattern consistency verification device, comprising:

[0032] An information acquisition module is used to acquire the characteristic information of the pattern to be verified from the power system operation file; wherein the pattern characteristic information includes pattern coordinate information;

[0033] A position mapping module is used to construct a mapping relationship between the image model coordinate information and the current screen coordinates to obtain the position mapping information, and obtain the target attribute box information corresponding to the image model to be verified according to the position mapping information;

[0034] An information recognition module, used to perform text recognition according to the target attribute box information to obtain supplementary feature information;

[0035] The consistency verification module is used to update the feature information of the image model to be verified according to the supplementary feature information, and perform image model consistency verification according to the updated feature information of the image model to be verified.

[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0037] Acquire the pattern feature information to be verified from the power system operation file; wherein the pattern feature information includes pattern coordinate information;

[0038] Constructing a mapping relationship between the image model coordinate information and the current screen coordinates to obtain position mapping information, and acquiring target attribute box information corresponding to the image model to be verified according to the position mapping information;

[0039] Perform text recognition according to the target attribute box information to obtain supplementary feature information;

[0040] The feature information of the image model to be verified is updated according to the supplementary feature information, and the image model consistency verification is performed according to the updated feature information of the image model to be verified.

[0041] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0042] Acquire the image model feature information to be verified from the power system operation file; wherein the image model feature information includes image model coordinate information;

[0043] Constructing a mapping relationship between the image model coordinate information and the current screen coordinates to obtain position mapping information, and acquiring target attribute box information corresponding to the image model to be verified according to the position mapping information;

[0044] Perform text recognition according to the target attribute box information to obtain supplementary feature information;

[0045] The feature information of the image model to be verified is updated according to the supplementary feature information, and the image model consistency verification is performed according to the updated feature information of the image model to be verified.

[0046] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0047] Acquire the pattern feature information to be verified from the power system operation file; wherein the pattern feature information includes pattern coordinate information;

[0048] Constructing a mapping relationship between the image model coordinate information and the current screen coordinates to obtain position mapping information, and acquiring target attribute box information corresponding to the image model to be verified according to the position mapping information;

[0049] Perform text recognition according to the target attribute box information to obtain supplementary feature information;

[0050] The feature information of the image model to be verified is updated according to the supplementary feature information, and the image model consistency verification is performed according to the updated feature information of the image model to be verified.

[0051] The above-mentioned model consistency verification method, device, computer equipment, storage medium and computer program product obtain the model coordinate information by obtaining the model feature information to be verified from the power system operation file, thereby dynamically constructing the mapping relationship between the model coordinate information and the current screen coordinates, obtaining the position mapping information, and obtaining the target attribute box information corresponding to the model to be verified according to the position mapping information, so as to accurately locate the area to be verified, and perform consistency verification on the content corresponding to the target attribute box of the model to be verified, perform text recognition according to the target attribute box information, obtain supplementary feature information, update the model feature information to be verified according to the supplementary feature information, and then use the attribute box information to assist in completing the missing equipment information in the power grid business file, further improve the model feature information to be verified, and finally perform model consistency verification according to the updated model feature information to be verified, which can improve the automation level of model consistency verification and reduce verification costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 An application environment diagram of a method for checking consistency of a pattern in an embodiment;

[0054] Figure 2 A schematic diagram of a flow chart of a method for checking consistency of a pattern in an embodiment;

[0055] Figure 3 This is a flow chart of step S204 of a method for checking consistency of a pattern in an embodiment;

[0056] Figure 4 A structural block diagram of a device for checking image consistency in one embodiment;

[0057] Figure 5 is an internal structure diagram of a computer device in one embodiment;

[0058] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0060] The image model consistency verification method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The data storage system can be used to store data such as the feature information of the image model to be verified. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0061] In an exemplary embodiment, Figure 2 As shown, a method for checking the consistency of a pattern is provided, and the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S208. Among them:

[0062] Step S202, obtaining the feature information of the pattern to be verified from the power system operation file.

[0063] The model feature information includes model coordinate information. Model consistency comparison refers to checking the consistency of two or more scheduling diagram models (such as flow charts, timing diagrams or other scheduling plans) in structure and behavior by comparing them. The above-mentioned model feature information refers to the features used to characterize the multiple scheduling diagram models to be verified in terms of process, timing, connection relationship and attributes.

[0064] Exemplarily, the server 104 may obtain the feature information of the image model to be verified from the power system operation file by means of file scanning.

[0065] Step S204, constructing a mapping relationship between the image model coordinate information and the current screen coordinates to obtain position mapping information, and obtaining target attribute box information corresponding to the image model to be verified according to the position mapping information.

[0066] Exemplarily, the server 104 can calculate the attribute box position information corresponding to the image model to be verified based on the position mapping information, obtain the attribute box data of the corresponding position based on the attribute box position information, eliminate the noise data in the attribute box data according to a preset grayscale threshold, obtain the target grayscale image, and determine the target attribute box information based on the target grayscale image.

[0067] For example, taking the whole attribute box as white, the wiring diagram and indication data of the background part are mostly red or yellow, the server 104 can use the color filtering method to remove the parts other than white, and the server 104 can set the color threshold required in the specific case to the "white" attribute range obtained by consulting the data to generate a white area mask, and perform an AND operation on the original image and the mask. The opening and closing operations of the morphological processing operation are used to realize the opening and closing operations, and the structure S used for comparison is set to a square with a custom side length.

[0068] Step S206, performing text recognition according to the target attribute box information to obtain supplementary feature information.

[0069] Exemplarily, the server 104 may detect the information content in the target attribute box according to the target attribute box information to obtain text positioning information; and perform text recognition according to the text positioning information to obtain supplementary feature information.

[0070] For example, in actual tasks, the wiring diagram background is complex, including component icons, component names, text information, etc., which can easily interfere with the text positioning problem of traditional text recognition algorithms. The server 104 can adopt a two-stage OCR (Optical Character Recognition) algorithm that connects text detection and text recognition in series.

[0071] Among them, the server 104 can use PPOCR (Paddle Paddle OCR) combined with the network architecture of MobileNet-v3 as a text detection algorithm to detect the information content in the target attribute box. The PPOCR model is divided into a backbone network, a neck, and a head. The backbone network adopts the MobileNet-v3 structure. The network is mainly composed of structures such as convolution, pooling, residual and activation, and is divided into multiple stages. Each stage of the network contains one or more residual units. After receiving the input, each residual unit obtains a new feature through the process of "dimensionality increase-feature processing-compression activation-dimensionality reduction", and the new feature is added to the original input to obtain the output. The "dimensionality increase-feature processing-compression activation-dimensionality reduction" process is composed of the following sub-modules:

[0072] First, the feature dimension is increased through point-by-point convolution, and then the spatial scale feature processing is performed through a deep convolution layer with a convolution kernel of 3×3 or 5×5. If a compression activation module is used, the features obtained by the deep convolution will be copied twice, one of which is compressed into a feature sequence of size 1×1 through an average pooling layer, and then converted into a set of weight sequences through a series of point-by-point convolutions and nonlinear activations. The weight sequence is dot-convolved with the other feature map copied before to enhance attention, and finally the dimension is increased through point-by-point convolution. Among them, deep convolution refers to the convolution operation of each channel of the feature with a one-dimensional convolution kernel. Compared with traditional convolution, the amount of operation is smaller but the correlation information between channels is not processed. Point-by-point convolution refers to the convolution operation of a convolution kernel with a convolution kernel size of 1×1. This operation is only performed on the feature dimension without using the information of the spatial dimension. It is complementary to deep convolution and is also commonly called separation convolution.

[0073] Furthermore, the neck adopts a feature pyramid structure, which upsamples and concatenates the feature maps of different sizes output by different stages of the backbone network from small to large, and finally unifies them to the same size through upsampling at different ratios and concatenates them together in dimension. The purpose of the feature pyramid is to strengthen feature information. The features extracted by different perceptions contain target information of different sizes, and the feature pyramid integrates this information together.

[0074] The head uses the DBHead classification head, which is divided into a threshold detection head and a boundary detection head. The two use the enhanced features of the neck output to detect targets and boundaries respectively. The difference map of the two outputs of the detection head and the boundary head is obtained through a differentiable binarization module to obtain the third output. The three outputs are trained by calculating the loss respectively. The goal is to make the prediction of the image and boundary as accurate as possible while reducing the two overlapping areas. Only the output of the threshold detection head is used in the prediction stage.

[0075] Exemplarily, in the text recognition algorithm, this embodiment embeds the professional knowledge in the electric power field into the text recognition, and the server 104 can use the PPOCRv4-rec model to perform text recognition according to the text positioning information.

[0076] Among them, the PPOCRv4-rec model is also divided into multiple parts: trunk, neck, and head. The trunk network adopts the PPHGNet-small (Small Multi-stage Sparse Pyramid Network) structure, the neck adopts the SVTR (Sequence-to-Visual Transformer) structure, and the head adopts the CTCHead (Connectionist Temporal Classification Head) structure. The PPHGNet-small structure takes computational density into consideration in its design, and uses 3×3 convolution kernels as much as possible. The overall structure is improved on the basis of VovNet, mainly composed of multi-stage stacking, each layer includes a learnable downsampling layer (LDSLayer) and a key structure HG-Block. The main function of the HG-Block structure is a kind of attention. The different feature maps obtained by multiple convolutions are spliced ​​by dimension, and then averaged and convolved point by point to obtain weights. The weights are multiplied by the original input by dimension, thereby giving corresponding attention to different dimensions.

[0077] First, the features obtained from the head are divided into blocks and embedded with position information, and different hybrid modules are used to extract the morphological information within the characters and the text dependency information between characters. The neck SVTR structure designs a global / local information mixing (Global / LocalMixing) algorithm based on a multi-head attention mechanism for the information within and between characters, and obtains the optimal arrangement order of these algorithms through ablation experiments. SVTR uses two methods, Merge and Combine, for feature map downsampling. The former uses a convolution with a step size of 1:2 in the length and width direction to compress the height information, and the latter pools the height to 1. Since the text layout is usually nearly horizontal, the two methods compress the information while avoiding interference with the horizontal inter-character information.

[0078] Finally, the head uses the CTC structure to directly project the sequence features obtained from the neck to the output dimension, and uses CTC post-processing to remove duplications to obtain the recognition result.

[0079] Step S208, updating the feature information of the image model to be verified according to the supplementary feature information, and performing image model consistency verification according to the updated feature information of the image model to be verified.

[0080] The updated feature information of the image model to be verified may include text character information and network topology information.

[0081] Exemplarily, for the corresponding multiple patterns to be verified, the Levenshtein distance data (LD) and the longest common subsequence (LCS) length are calculated according to the text character information; the character similarity between the patterns to be verified is calculated according to the Levenshtein distance data and the longest common subsequence length; and the pattern consistency check is performed according to the character similarity.

[0082] For example, with characters as editing units, the server 104 can calculate the minimum number of operations (deletion, insertion, replacement) from one string to another for string similarity calculation. For example, two strings S = S1S2S3 ... Sm and T = T1T2T3 ... Tn, construct a matrix LD[m+1, n+1], use the idea of ​​dynamic programming to loop and calculate the value of each cell LD(i, j) in the matrix, and the LD(m, n) in the lower right corner is the required edit distance. The calculation formula is as follows:

[0083]

[0084] Min=min{LD(i-1,j)+1,LD(i,j-1)+1,LD(i-1,j-1)+f(i,j)}

[0085] Among them, when the i-th word of S is not equal to the j-th word of T, f(i,j) = 1; otherwise, f(i,j) = 0. LD itself can represent the similarity between two strings. Intuitively, the larger the LD, the smaller the similarity. The calculation formula for the similarity Sim(S, T) is as follows:

[0086] Sim(S,T)=1-LD / max(m,n)

[0087] Furthermore, the server 104 can use an exhaustive method to solve the longest common subsequence length: check whether all subsequences of the T string are subsequences of S, thereby determining whether they are common subsequences, and then select the longest one. However, for two strings of lengths m and n respectively, the time complexity is exponential: O(2n*2m).

[0088] The server 104 may also use dynamic programming and recursive method to solve the longest common subsequence length: use L[i,j] to record the length of the longest common subsequence of sequences Si and Tj, and finally, the length of the LCS of S and T is recorded in L[i,j], and the recursive relationship is established as follows:

[0089]

[0090] When comparing the similarity between two strings S and T, the similarity calculation formula is given by combining LD and LCS as follows:

[0091] Sim(S,T) = LCS / (LCS + LD)

[0092] Furthermore, the space and time complexity of the traditional edit distance algorithm are both O(m*n). Considering that only LD(i,j - 1), LD(i - 1,j), and LD(i - 1,j - 1) are needed for each calculation of LD(i,j), that is, only the current column and the previous column are required for the calculation. By using two column vectors instead of a matrix, Server 104 can save only the current state and the state of the previous operation each time. Without significantly affecting the result and time complexity, the space complexity is reduced to O(min(m,n)). Server 104 can take the strings S and T as input and output the length of LD:

[0093] Exemplarily, Server 104 can set n as the length of S and m as the length of T (assuming n < m). If m = 0, return n; if n = 0, return m; create two vectors v0[m + 1] and v1[m + 1]; initialize the values of v0[m + 1] to 0...m; check each character in S (i from 1 to n) and each character in T (j from 1 to m); let cost be the edit cost. If s[i] == t[j], then cost = 0; if s[i]!= t[j], then cost = 1; set the cell v1[j] to one of the following minimum values: +1 above the adjacent cell: v1[j - 1]+1, +1 to the left of the adjacent cell: v0[j]+1, +cost at the top-left diagonal of the cell: v0[j - 1]+cost. After iterating through the above steps, v1[m] is the value of the edit distance. Considering that when calculating L[i,j], it is directly related only to L[i - 1,j - 1], L[i,j - 1], and L[i - 1,j], that is, when calculating the sub-problems of the i-th row of L[i], only the values of the (i - 1)-th row of L[i - 1] and the previous element L[i,j - 1] of L[i,j] are needed. At this time, without changing the time complexity, the space complexity is reduced from O(m*n) to O(n). Define an array base[] of length m + 1 and initialize it to 0, a recurrence leading value front = 0, and a currently calculated element pre (L[i,j] in terms of meaning). After each calculation of L[i,j], update the value of front to base[j - 1], then update pre to front, and then continue to scan backward, noting the update of the last element. After iterating n times, the value of base[m] is the value of LCS.

[0094] Similarly, the server 104 can input strings S and T, and output the LCS length: the server 104 can input two strings S and T; define the size of the array base[] as T.length()+1, define the recursive leading front=0, and the current element pre=0; initialize base[] to 0, base[i]=0; check each character of S(ifrom1toS.length()); check each character of T(ifrom1toT.length()); loop check if S[i-1]=T[j-1] then pre=base[j-1]+1; otherwise pre=max(front,base[j]); loop update base and front, base[j-1]=front, front=pre; update base[T.length()]=front, check base[j](jfrom1toT.length()) and output the base[] value; after looping the above steps, base[T.length()] is the value of LCS. When solving LCS, server 104 first constructs a two-dimensional matrix L[m+1][n+1] and initializes it. If Si=Tj, then L[i][j]=1. Finally, the longest string of 1s on the diagonal line of the matrix is ​​found to be LCCS (Longest Common Contiguous Subsequence). Considering the trouble of searching, when the matrix needs to be filled with 1, it is directly made equal to the upper left corner value plus 1. In this way, the largest element in the matrix is ​​the length of LCCS, and the first character position of LCCS is the coordinate output of the first cell that changes.

[0095] This embodiment comprehensively considers the length and occurrence position of LCCS, and introduces a variable p to represent the first position of the longest continuous common substring in the target string S. When the LCS length and LD size are the same, the larger the LCCS value, the greater the similarity; when the LCCS length is the same, considering that the predecessor character (the character before the current processing character) has a greater impact on the similarity than the successor character (the character after the current processing character), the smaller p means that the closer the first character position of LCCS is, the greater the similarity. μ is a variable that balances this factor and can be set manually according to the strictness of the LCCS requirements. Define a new similarity calculation formula as:

[0096]

[0097] Assume that the lengths of strings S and T are m and n respectively, and follow the optimization algorithm steps introduced in the previous article to obtain the edit distance size LD(S, T) and the longest common subsequence length LCS(S, T). Follow the LCCS algorithm steps to obtain the longest common substring length LCCS(S, T) and the substring first character position p, which filters out meaningless full symbol comparisons, which is more conducive to the comparison of power wiring diagram topology texts.

[0098] Exemplarily, for the corresponding multiple graph models to be verified, the node similarity data and the edge similarity data are calculated according to the network topology information respectively; the graph similarity between the graph models to be verified is calculated according to the node similarity data and the edge similarity data; and the graph model consistency check is performed according to the graph similarity.

[0099] For example, the server 104 may define the network topology as a four-tuple in Represents the characteristics of the node, d p represents the feature dimension, and n represents the number of nodes Represents the characteristics of the edge, d q represents the feature dimension, and m represents the number of edges. For example, if the length and direction of an edge are used to describe the feature of an edge, then the feature of the edge is a two-dimensional vector. G,H∈{0,1} n×m It describes the correspondence between nodes and edges, or how the nodes are connected, that is, the structure of the graph. G represents the starting point of the edge, and H represents the end point of the edge. Specifically, if g ic =h jc =1, then it means that the cth edge in the graph points from node i to node j.

[0100] Given two graphs and And define two affinity matrices K p ∈R n1×n2 and K q ∈R m1×m2 Respectively represent the similarity between nodes and between edges in two graphs. It means the picture The i1th node in The similarity between the i2th nodes in Describes the graph The c1th edge and graph in The graph matching problem then becomes finding the optimal matching relationship X between the two graphs, so that the sum of the similarity between nodes and the similarity between edges is maximized.

[0101]

[0102] The first term represents the sum of similarities between matching nodes, and the second term represents the sum of similarities between matching edges. i1,i2 =1 means the graph The i 1th node and graph in The matching relationship between nodes must satisfy the one-to-one correspondence constraint, that is, X∈∏ is a permutation matrix (Permutation Matrix)

[0103] ∏={X|X∈{0,1} n1×n2 ,X1 n2 ≤1 n1 ,X T 1 n1 =1 n2}

[0104] Among them, 1 n represents a column vector of length n with all elements being 1. We allow the graph and The sizes of are different (i.e. the number of nodes is different). To maintain generality, we agree that n1≥n2. Each point in The points in have a unique corresponding matching relationship.

[0105] In order to more clearly describe and express the goal of graph matching, we unify the node and edge association matrices into one association matrix K∈R n1n2×n1n2 , the diagonal elements in K represent the similarity between nodes, that is, the original K p The off-diagonal elements represent the similarity between edges, that is, K q For example, the off-diagonal elements k i1i2,j1j2 It shows the picture The edge between nodes i1 and j1 in The similarity of the edge between nodes i2 and j2 in .

[0106] For example, the server 104 may use a factorization-based graph matching algorithm to compare the topological relationships between the wiring diagram and the design diagram. p ) and off-diagonal elements (edge-incidence matrix K q ), as shown above. Excluding the diagonal elements, K is a sparse block matrix consisting of n2×n2 smaller blocks K ij ∈R n1×n1 Composition, some blocks K ij is a zero matrix, which means There is no edge connection between the i-th and j-th nodes in the matrix. These zero matrices can be obtained by To retrieve, that is, if The corresponding block K ij = 0, for non-zero blocks K ij There is a closed form solution Among them, c is the graph Based on the above structural characteristics, the association matrix K can be decomposed into:

[0107]

[0108] in Denotes the Kronecker product of the matrix. Using the above formula, the large matrix K is decomposed into a combination of 6 small matrices, which makes the algorithm complexity reduced by It drops to O(n1m1+n2m2+n1n2+m1m2). Thus we get the equivalent graph matching objective function

[0109]

[0110] in, Denotes the Hadamard product of the matrix Y∈{0,1} m1×m2 Represents the correspondence matrix y between edges c1c2 =1 represents the graph The c1th edge matches the c2th edge in the diagram. Based on the above graph matching algorithm, the topological matching relationship between the design diagram and the wiring diagram can be constructed, and then the conclusion of whether the topology of the diagram and the model is consistent can be drawn.

[0111] In the above-mentioned model consistency verification method, the model coordinate information is obtained by obtaining the model feature information of the model to be verified from the power system operation file, thereby dynamically constructing the mapping relationship between the model coordinate information and the current screen coordinates to obtain the position mapping information, and obtaining the target attribute box information corresponding to the model to be verified according to the position mapping information, so as to accurately locate the area to be verified, and perform consistency verification on the content corresponding to the target attribute box of the model to be verified, perform text recognition according to the target attribute box information, obtain supplementary feature information, update the model feature information to be verified according to the supplementary feature information, and then use the attribute box information to assist in completing the missing equipment information in the power grid business file, further improve the model feature information to be verified, and finally perform model consistency verification according to the updated model feature information to be verified, which can improve the automation level of model consistency verification and reduce the verification cost.

[0112] In an exemplary embodiment, Figure 3 As shown, the step of determining the target attribute frame information according to the target grayscale image may include steps S302 to S308. Among them:

[0113] Step S302 : Projecting the target grayscale image in a first direction and a second direction in the same plane to obtain a target projection image.

[0114] The first direction and the second direction intersect. Exemplarily, the first direction may be a horizontal direction in the image where the target grayscale image is located, and the second direction may be a vertical direction in the image where the target grayscale image is located.

[0115] Exemplarily, the server 104 may first use a morphological image processing method for the target attribute box to further reduce background noise, return a binary grayscale image as a new target grayscale image, and then perform binary projection on the obtained target grayscale image in the horizontal and vertical directions to obtain horizontal and vertical projection histograms, thereby obtaining a target projection image.

[0116] Step S304: determining a preliminary attribute box according to the target projection image, and determining brightness data of each pixel in the preliminary attribute box.

[0117] Exemplarily, the server 104 may traverse the histogram in the horizontal and vertical directions respectively, bridge the shorter zero-value gaps, and find the maximum continuous interval that meets the preset requirements, which may include the center area position, the length range of the continuous area, etc. Next, the server 104 may merge the two maximum intervals obtained in the two directions in two dimensions to obtain the coordinates of the four corner points of the rectangle, obtain the preliminary attribute box and the corresponding preliminary attribute box information, and further, the server 104 may determine the brightness data of each pixel in the preliminary attribute box according to the preliminary attribute box information.

[0118] Among them, the horizontal and vertical histograms can be obtained through the np.sum function, which can specify the summation condition such as img>240 to count valid pixels, and the axis parameter can be set to specify the statistical direction. In order to avoid interference from the interface operation toolbar and sidebar, the number of valid pixels in this range needs to be deleted from the histogram.

[0119] Step S306, calculating the brightness ratio of the primary selected attribute box according to the brightness data.

[0120] The brightness ratio refers to the ratio of the number of pixels whose brightness data exceeds a preset brightness threshold to the total number of pixels in the primary selection box. For example, the server 104 may obtain the brightness data of all pixels in the current primary selection attribute box, or may extract pixels in the primary selection attribute box in different regions to obtain brightness data, thereby calculating the brightness ratio.

[0121] Step S308, when the brightness ratio is greater than the preset brightness ratio threshold, determine the initially selected attribute box as the target attribute box, and according to the target attribute box corresponding to the target attribute box.

[0122] Exemplarily, the server 104 can determine whether the current preliminary attribute box contains irrelevant background by determining whether the ratio of the number of pixels whose brightness data exceeds a preset brightness threshold within the range of the preliminary attribute box to the total number of pixels exceeds a preset range; if the brightness ratio is too low, it can be said that the current preliminary attribute box contains irrelevant background, and the preliminary attribute box needs to be reselected.

[0123] Furthermore, after obtaining the target attribute frame information, the server 104 may output the feature point coordinates (eg, corner point coordinates) of the target attribute frame, and perform image segmentation according to the coordinates.

[0124] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0125] Based on the same inventive concept, the embodiment of the present application also provides a pattern consistency verification device for implementing the pattern consistency verification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more pattern consistency verification device embodiments provided below can refer to the limitations of the pattern consistency verification method above, and will not be repeated here.

[0126] In an exemplary embodiment, Figure 4 As shown, a pattern consistency verification device is provided, including: an information acquisition module 402, a position mapping module 404, an information identification module 406 and a consistency verification module 408, wherein:

[0127] The information acquisition module 402 is used to acquire the characteristic information of the pattern to be verified from the power system operation file; wherein the characteristic information of the pattern includes the coordinate information of the pattern;

[0128] The position mapping module 404 is used to construct a mapping relationship between the image model coordinate information and the current screen coordinates, obtain the position mapping information, and obtain the target attribute box information corresponding to the image model to be verified according to the position mapping information;

[0129] The information recognition module 406 is used to perform text recognition according to the target attribute box information to obtain supplementary feature information;

[0130] The consistency check module 408 is used to update the feature information of the image model to be checked according to the supplementary feature information, and perform image model consistency check according to the updated feature information of the image model to be checked.

[0131] In one embodiment, the location mapping module 404 includes:

[0132] A position analysis unit, used to calculate the position information of the attribute box corresponding to the image to be verified according to the position mapping information;

[0133] A data matching unit, used for acquiring the attribute box data at the corresponding position according to the attribute box position information;

[0134] A data processing unit, used to remove noise data in the attribute frame data according to a preset grayscale threshold to obtain a target grayscale image;

[0135] The information determination unit is used to determine the target attribute frame information according to the target grayscale image.

[0136] In one of the embodiments, the information determination unit is specifically used to: for the target grayscale image, perform projections in the first direction and the second direction in the same plane respectively to obtain a target projection image; wherein the first direction and the second direction intersect; determine a preliminary attribute box according to the target projection image, and determine the brightness data of each pixel in the preliminary attribute box; calculate the brightness ratio of the preliminary attribute box according to the brightness data; wherein the brightness ratio refers to the ratio of the number of pixels in the preliminary attribute box whose brightness data exceeds a preset brightness threshold to the total number of pixels; when the brightness ratio is greater than the preset brightness ratio threshold, determine that the preliminary attribute box is the target attribute box, and according to the target attribute box information corresponding to the target attribute box.

[0137] In one embodiment, the information recognition module 406 is specifically used to: detect the information content in the target attribute box according to the target attribute box information to obtain text positioning information; perform text recognition according to the text positioning information to obtain supplementary feature information.

[0138] In one embodiment, the updated feature information of the image model to be verified includes text character information; the consistency verification module 408 includes:

[0139] A first calculation unit is used to calculate the Levenshtein distance data and the longest common subsequence length according to the text character information for the corresponding multiple patterns to be verified;

[0140] A first analysis unit is used to calculate the character similarity between the patterns to be verified based on the Levenshtein distance data and the longest common subsequence length;

[0141] The first verification unit is used to perform pattern consistency verification based on character similarity.

[0142] In one embodiment, the updated feature information of the image model to be verified also includes network topology information; and performing the image model consistency check according to the updated feature information of the image model to be verified also includes:

[0143] A second calculation unit is used to calculate the node similarity data and the edge similarity data according to the network topology information for the corresponding multiple graph models to be verified;

[0144] A second analysis unit, used for calculating the graph similarity between the graph models to be verified according to the node similarity data and the edge similarity data;

[0145] The second verification unit is used to perform a graph model consistency check based on graph similarity.

[0146] Each module in the above-mentioned image consistency verification device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0147] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as feature information of the image to be verified. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for verifying the consistency of the image is implemented.

[0148] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for checking the consistency of a pattern is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0149] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0150] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining feature information of a model to be verified from a power system operation file; wherein the feature information of the model includes model coordinate information; constructing a mapping relationship between the model coordinate information and the current screen coordinates to obtain position mapping information, and obtaining target attribute box information corresponding to the model to be verified based on the position mapping information; performing text recognition based on the target attribute box information to obtain supplementary feature information; updating the feature information of the model to be verified based on the supplementary feature information, and performing model consistency verification based on the updated feature information of the model to be verified.

[0151] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the attribute box position information corresponding to the image model to be verified based on the position mapping information; obtaining the attribute box data of the corresponding position based on the attribute box position information; eliminating the noise data in the attribute box data according to a preset grayscale threshold to obtain a target grayscale image; and determining the target attribute box information based on the target grayscale image.

[0152] In one embodiment, the processor further implements the following steps when executing the computer program: for the target grayscale image, projections are performed in the first direction and the second direction in the same plane respectively to obtain a target projection image; wherein the first direction and the second direction intersect; a preliminary attribute box is determined according to the target projection image, and brightness data of each pixel in the preliminary attribute box is determined; the brightness ratio of the preliminary attribute box is calculated according to the brightness data; wherein the brightness ratio refers to the ratio of the number of pixels in the preliminary attribute box whose brightness data exceeds a preset brightness threshold to the total number of pixels; when the brightness ratio is greater than the preset brightness ratio threshold, the preliminary attribute box is determined to be the target attribute box, and the target attribute box information corresponding to the target attribute box is calculated.

[0153] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the target attribute box information, the information content in the target attribute box is detected to obtain text positioning information; according to the text positioning information, text recognition is performed to obtain supplementary feature information.

[0154] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for the corresponding multiple patterns to be verified, the Levenshtein distance data and the longest common subsequence length are calculated according to the text character information; the character similarity between the patterns to be verified is calculated according to the Levenshtein distance data and the longest common subsequence length; and the pattern consistency check is performed according to the character similarity.

[0155] In one embodiment, when the processor executes the computer program, the following steps are also implemented: for the corresponding multiple graph models to be verified, the node similarity data and the edge similarity data are calculated according to the network topology map information; the graph similarity between the graph models to be verified is calculated according to the node similarity data and the edge similarity data; and the graph model consistency check is performed according to the graph similarity.

[0156] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining feature information of a model to be verified from a power system operation file; wherein the feature information of the model includes model coordinate information; constructing a mapping relationship between the model coordinate information and the current screen coordinates to obtain position mapping information, and obtaining target attribute box information corresponding to the model to be verified based on the position mapping information; performing text recognition based on the target attribute box information to obtain supplementary feature information; updating the feature information of the model to be verified based on the supplementary feature information, and performing model consistency verification based on the updated feature information of the model to be verified.

[0157] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the attribute box position information corresponding to the image model to be verified based on the position mapping information; obtaining the attribute box data of the corresponding position based on the attribute box position information; eliminating the noise data in the attribute box data according to a preset grayscale threshold to obtain a target grayscale image; and determining the target attribute box information based on the target grayscale image.

[0158] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the target grayscale image, projections are performed in the first direction and the second direction in the same plane respectively to obtain a target projection image; wherein the first direction and the second direction intersect; a preliminary attribute box is determined according to the target projection image, and the brightness data of each pixel in the preliminary attribute box is determined; the brightness ratio of the preliminary attribute box is calculated according to the brightness data; wherein the brightness ratio refers to the ratio of the number of pixels in the preliminary attribute box whose brightness data exceeds a preset brightness threshold to the total number of pixels; when the brightness ratio is greater than the preset brightness ratio threshold, the preliminary attribute box is determined to be the target attribute box, and the target attribute box information corresponding to the target attribute box is calculated.

[0159] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the target attribute box information, the information content in the target attribute box is detected to obtain text positioning information; according to the text positioning information, text recognition is performed to obtain supplementary feature information.

[0160] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the corresponding multiple patterns to be verified, the Levenshtein distance data and the longest common subsequence length are calculated according to the text character information; the character similarity between the patterns to be verified is calculated according to the Levenshtein distance data and the longest common subsequence length; and the pattern consistency check is performed according to the character similarity.

[0161] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the corresponding multiple graph models to be verified, the node similarity data and the edge similarity data are calculated according to the network topology information respectively; the graph similarity between the graph models to be verified is calculated according to the node similarity data and the edge similarity data; and the graph model consistency check is performed according to the graph similarity.

[0162] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining feature information of a model to be verified from a power system operation file; wherein the feature information of the model includes model coordinate information; constructing a mapping relationship between the model coordinate information and the current screen coordinates to obtain position mapping information, and obtaining target attribute box information corresponding to the model to be verified based on the position mapping information; performing text recognition based on the target attribute box information to obtain supplementary feature information; updating the feature information of the model to be verified based on the supplementary feature information, and performing model consistency verification based on the updated feature information of the model to be verified.

[0163] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: calculating the attribute box position information corresponding to the image model to be verified based on the position mapping information; obtaining the attribute box data of the corresponding position based on the attribute box position information; eliminating the noise data in the attribute box data according to a preset grayscale threshold to obtain a target grayscale image; and determining the target attribute box information based on the target grayscale image.

[0164] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the target grayscale image, projections are performed in the first direction and the second direction in the same plane respectively to obtain a target projection image; wherein the first direction and the second direction intersect; a preliminary attribute box is determined according to the target projection image, and the brightness data of each pixel in the preliminary attribute box is determined; the brightness ratio of the preliminary attribute box is calculated according to the brightness data; wherein the brightness ratio refers to the ratio of the number of pixels in the preliminary attribute box whose brightness data exceeds a preset brightness threshold to the total number of pixels; when the brightness ratio is greater than the preset brightness ratio threshold, the preliminary attribute box is determined to be the target attribute box, and the target attribute box information corresponding to the target attribute box is calculated.

[0165] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the target attribute box information, the information content in the target attribute box is detected to obtain text positioning information; according to the text positioning information, text recognition is performed to obtain supplementary feature information.

[0166] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the corresponding multiple patterns to be verified, the Levenshtein distance data and the longest common subsequence length are calculated according to the text character information; the character similarity between the patterns to be verified is calculated according to the Levenshtein distance data and the longest common subsequence length; and the pattern consistency check is performed according to the character similarity.

[0167] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: for the corresponding multiple graph models to be verified, the node similarity data and the edge similarity data are calculated according to the network topology information respectively; the graph similarity between the graph models to be verified is calculated according to the node similarity data and the edge similarity data; and the graph model consistency check is performed according to the graph similarity.

[0168] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for checking the consistency of a pattern, characterized in that: The method comprises: Acquire the pattern feature information to be verified from the power system operation file; wherein the pattern feature information includes pattern coordinate information; Constructing a mapping relationship between the image model coordinate information and the current screen coordinates to obtain position mapping information, and acquiring target attribute box information corresponding to the image model to be verified according to the position mapping information; Perform text recognition according to the target attribute box information to obtain supplementary feature information; The feature information of the image model to be verified is updated according to the supplementary feature information, and the image model consistency verification is performed according to the updated feature information of the image model to be verified.

2. The method according to claim 1, characterized in that The step of obtaining target attribute frame information corresponding to the image model to be verified according to the position mapping information includes: Calculate the attribute box position information corresponding to the image model to be verified according to the position mapping information; Acquire the attribute box data of the corresponding position according to the attribute box position information; Eliminate noise data in the attribute frame data according to a preset grayscale threshold to obtain a target grayscale image; The target attribute frame information is determined according to the target grayscale image.

3. The method according to claim 2, characterized in that Determining the target attribute frame information according to the target grayscale image includes: For the target grayscale image, projections are performed in a first direction and a second direction in the same plane to obtain a target projection image; wherein the first direction and the second direction intersect; Determine a preliminary attribute box according to the target projection image, and determine brightness data of each pixel in the preliminary attribute box; Calculate the brightness ratio of the primary selection attribute box according to the brightness data; wherein the brightness ratio refers to the ratio of the number of pixels whose brightness data exceeds a preset brightness threshold to the total number of pixels in the primary selection box; In the case where the brightness ratio is greater than a preset brightness ratio threshold, the initially selected attribute box is determined to be a target attribute box, and target attribute box information corresponding to the target attribute box is determined.

4. The method according to claim 1, characterized in that The performing text recognition according to the target attribute box information to obtain supplementary feature information includes: According to the target attribute box information, the information content in the target attribute box is detected to obtain text positioning information; Text recognition is performed according to the text positioning information to obtain supplementary feature information.

5. The method according to any one of claims 1 to 4, characterized in that: The updated feature information of the image model to be verified includes text character information; and performing image model consistency verification according to the updated feature information of the image model to be verified includes: For the corresponding multiple patterns to be verified, respectively calculating the Levenshtein distance data and the longest common subsequence length according to the text character information; Calculate the character similarity between the patterns to be verified according to the Levenshtein distance data and the longest common subsequence length; A pattern consistency check is performed based on the character similarity.

6. The method according to claim 5, characterized in that The updated feature information of the image model to be verified also includes network topology information; and the image model consistency verification based on the updated feature information of the image model to be verified also includes: For the corresponding multiple graph models to be verified, respectively calculating the node similarity data and the edge similarity data according to the network topology information; Calculating the graph similarity between the to-be-verified graph models according to the node similarity data and the edge similarity data; A graph model consistency check is performed based on the graph similarity.

7. A pattern consistency checking device, characterized in that: The device comprises: An information acquisition module is used to acquire the characteristic information of the pattern to be verified from the power system operation file; wherein the pattern characteristic information includes pattern coordinate information; A position mapping module is used to construct a mapping relationship between the image model coordinate information and the current screen coordinates to obtain the position mapping information, and obtain the target attribute box information corresponding to the image model to be verified according to the position mapping information; An information recognition module, used to perform text recognition according to the target attribute box information to obtain supplementary feature information; The consistency verification module is used to update the feature information of the image model to be verified according to the supplementary feature information, and perform image model consistency verification according to the updated feature information of the image model to be verified.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Object information verification method and device, computer equipment and storage medium

    CN117095400A

  • System and method for displaying and using non-numeric graphic elements to control and monitor a vision system

    US20060107211A1