A method for reconstructing, entering and storing warning limit value tables for power grid equipment
Through OCR technology and table style definition in this article, the warning limit table of power grid equipment is automatically identified and reconstructed, which solves the problem of misidentification of text formats and row merging, realizes efficient early warning limit entry, and improves the business processing efficiency of the regulation center.
Patent Information
- Application Number
- CN202211126696.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-16
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-09-16
AI Technical Summary
Traditional manual comparison of the early warning limit table for power grid equipment is time-consuming and prone to errors. The existing table reconstruction methods are difficult to deal with the misidentification of text formats and row merging, resulting in inefficient entry.
OCR technology is used to identify the warning limit table pictures, extract the cross-column text boxes through the coordinates and content of the text detection box, combine the column merging rules defined in this article, and adjust the row merging cell layout to realize automatic reconstruction and entry of the warning limit table.
It improves the automatic entry efficiency of early warning limits of power grid equipment and improves the daily business processing capabilities of the regulation center.
Smart Images

Figure CN115600570B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for reconstructing a warning limit table of power grid equipment, an input method and a device, and belongs to the technical field of power systems. Background Art
[0002] As the construction of new power systems deepens, the physical structure and operation mode of the power grid are becoming increasingly complex. The power grid dispatching and control system realizes panoramic monitoring, intelligent early warning and fault analysis and diagnosis of power grid operation through real-time collection and processing of measurement data such as telesignaling and telemetering of power equipment.
[0003] The warning limit of power grid equipment is an important information reflecting that the voltage, current and other remote measurement of equipment exceed the upper and lower limit of the warning range. Most of the control centers use manual comparison and manual input to convert the warning limit table in the paper document (see Figure 1 ) to the warning limit data table of the control system. Traditional manual comparison and data entry methods are labor-intensive, time-consuming, and prone to errors, making it difficult to meet the increasingly demanding business processing requirements of the control center.
[0004] Currently, optical character recognition (OCR) technology is widely used in printed data file recognition, effectively resolving the conflict between inefficient information input and the need for efficient information processing. Therefore, by introducing OCR technology, we can achieve automated batch recognition, table reconstruction, and automatic entry of warning limit table images, improving the efficiency of power grid equipment warning limit entry.
[0005] Image recognition based on OCR is relatively accurate in digital recognition, but some text may be misrecognized. There are two types of misrecognition: one is the misrecognition of the text itself, which can be corrected by manual modification after the table is reconstructed; the other is the misrecognition of the text format. Figure 1 For example, in actual recognition, the limit column may experience text formatting errors. Due to the large spacing between the text in the limit column, "upper," "lower," "limit," "upper limit," and "lower limit" are often recognized simultaneously. Furthermore, the table contains numerous merged rows in the plant and busbar columns. With these misidentified text and numerous merged rows, existing table reconstruction methods struggle to accurately reconstruct the warning limit table. Summary of the Invention
[0006] The present invention provides a method for reconstructing a warning limit table of power grid equipment, an input method and a device, which solve the problems disclosed in the background technology.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] A method for reconstructing a power grid equipment warning limit table, comprising:
[0009] Extract the text detection frames that span columns based on the top corner coordinates of the text detection frames and the content in the text detection frames in the image text recognition results, and divide the remaining text detection frames into columns and rows to construct a first table; wherein the image is an image of a warning limit table, and a text detection frame is set in each cell of the table;
[0010] If the number of columns in the first table is greater than the number of columns in the warning limit table defined in the preset table style herein, the columns in the first table are merged according to the content in the text detection box and the column names of the warning limit table defined in the preset table style herein to obtain a second table; wherein the preset table style herein further defines the column numbers involved in the merged cells of the warning limit table columns, the column numbers involved in the merged cells of the rows, and the column numbers of the content-related columns; the content-related columns are two adjacent columns, and the cell format or content of the previous column can be generated based on the content of the latter column;
[0011] Inserting the cross-column text detection box into the second table according to the column numbers involved in the column merge and the top corner coordinates of the cross-column text detection box to obtain a third table;
[0012] According to the spacing between text detection boxes of adjacent rows in the same column, the column numbers involved in the row merged cells, the adjacent and content-related column numbers, and the text detection box contents corresponding to the adjacent and content-related column numbers, the layout of the columns involved in the row merged cells in the third table is adjusted, and the contents or cell formats of the adjacent and content-related columns in the third table are adjusted to obtain a reconstructed warning limit table.
[0013] According to the top corner coordinates of the text detection frames and the content in the text detection frames in the image text recognition results, the text detection frames that span columns are extracted, and the remaining text detection frames are divided into columns and rows to construct the first table, including:
[0014] Extract the text detection frames that span columns based on the coordinates of the upper left and upper right corners of the text detection frames in the image text recognition results and the content of the text detection frames, and divide the remaining text detection frames into columns;
[0015] Sort the upper left corner coordinates / upper right corner coordinates of the text detection boxes in the column, and divide the text detection boxes in the column into rows;
[0016] A first table is constructed according to the column division results and the row division results.
[0017] Based on the coordinates of the upper left and upper right corners of the text detection boxes in the image text recognition results and the content in the text detection boxes, we extract the text detection boxes that span columns and divide the remaining text detection boxes into columns, including:
[0018] Traverse all text detection frames, and if text detection frame A meets preset condition 1 and / or preset condition 2, determine that text detection frame A is a cross-column text detection frame, and extract text detection frame A; wherein preset condition 1 is that the content in text detection frame A contains preset content, and preset condition 2 is that the horizontal coordinate of the upper left corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame B, the horizontal coordinate of the upper right corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame C, and the horizontal coordinate of the upper right corner of text detection frame B is smaller than the horizontal coordinate of the upper left corner of text detection frame C;
[0019] Sort the remaining text detection frames from small to large according to the horizontal coordinates of their upper left corners;
[0020] Traverse the remaining text detection frames after sorting and divide them into columns according to the preset rules; the preset rules are: if the horizontal coordinate of the upper left corner of the current text detection frame is greater than the horizontal coordinate of the upper right corner of the previous text detection frame, then the current text detection frame is determined to be a new column.
[0021] According to the spacing between text detection boxes of adjacent rows in the same column, the column numbers involved in the row merge, the numbers of adjacent and content-related columns, and the text detection box contents corresponding to the adjacent and content-related column numbers, the layout of the columns involved in the row merge in the third table is adjusted, and the contents or cell formats of the adjacent and content-related columns in the third table are adjusted to obtain a reconstructed warning limit table, including:
[0022] According to the spacing between text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells, an empty text box is used to adjust the layout of the columns involved in the row merged cells in the third table;
[0023] According to the adjacent and content-related column numbers and the text detection box contents corresponding to the adjacent and content-related column numbers, the contents or cell formats of the adjacent and content-related columns in the third table are adjusted to obtain a reconstructed warning limit table.
[0024] Based on the spacing between text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells, an empty text box is used to adjust the layout of the columns involved in the row merged cells in the third table, including:
[0025] 1) For the columns involved in the row merge, calculate the distance between the centers of the text detection boxes of adjacent rows;
[0026] 2) Remove the intervals larger than the threshold, calculate the mean of the remaining intervals, and use the mean as the benchmark interval, with parameter i = 1;
[0027] 3) If the distance between the centers of the text detection boxes of the i-th row and the i+1-th row is less than a preset multiple of the reference distance, the i-th row and the i+1-th row are in the form of minimum cells, and go to 4);
[0028] Otherwise, insert an empty text box between the i-th row and the i+1-th row, use the empty text box as the new i+1-th row text detection box, the original i+1-th row text detection box as the i+2-th row text detection box, and use the vertical coordinates of each vertex of the i-th row text detection box plus the reference spacing as the vertical coordinates of each vertex of the empty text box, and go to step 5);
[0029] 4) If the i+1th row is the last row of the column involved in the row merge, then end the layout adjustment of the column. Otherwise, use the distance between the centers of the text detection boxes in the i-th row and the i+1th row as the reference distance, parameter i = i+1, and go to 3);
[0030] 5) If the i+2th row is the last row of the column involved in the row merge, end the layout adjustment of the column, otherwise go to 4).
[0031] A device for reconstructing a warning limit table of power grid equipment, comprising:
[0032] The first table module extracts the text detection frames that span columns based on the top corner coordinates of the text detection frames and the content in the text detection frames in the image text recognition results, and divides the remaining text detection frames into columns and rows to construct a first table; wherein the image is a warning limit table image, and a text detection frame is set in each cell of the table;
[0033] The second table module, if the number of columns of the first table is greater than the number of columns of the warning limit table defined in the preset table style in this article, merge the columns in the first table according to the content in the text detection box and the warning limit table column name defined in the preset table style in this article to obtain the second table; wherein, the preset table style in this article also defines the column numbers involved in the merged cells of the warning limit table columns, the column numbers involved in the merged cells of the rows, and the column numbers of the content-related columns; the content-related columns are two adjacent columns, and the cell format or content of the previous column can be generated based on the content of the latter column;
[0034] The third table module inserts the cross-column text detection box into the second table according to the column number involved in the column merge and the top corner coordinates of the cross-column text detection box to obtain a third table;
[0035] The warning limit table reconstruction module adjusts the layout of the columns involved in the row merged cells in the third table according to the spacing between the text detection boxes of adjacent rows in the same column, the column numbers involved in the row merged cells, the adjacent and content-related column numbers, and the text detection box contents corresponding to the adjacent and content-related column numbers, and adjusts the contents or cell formats of the adjacent and content-related columns in the third table to obtain a reconstructed warning limit table.
[0036] The first table module extracts text detection frames that span columns based on the upper left corner coordinates and upper right corner coordinates of the text detection frames in the image text recognition results and the content of the text detection frames, divides the remaining text detection frames into columns, sorts the upper left corner coordinates / upper right corner coordinates of the text detection frames in the columns, divides the text detection frames in the columns into rows, and constructs the first table based on the column division results and the row division results.
[0037] In the first table module, based on the coordinates of the upper left and upper right corners of the text detection frames in the image text recognition results and the content in the text detection frames, the text detection frames that span columns are extracted, and the remaining text detection frames are divided into columns, including:
[0038] Traverse all text detection frames, and if text detection frame A meets preset condition 1 and / or preset condition 2, determine that text detection frame A is a cross-column text detection frame, and extract text detection frame A; wherein preset condition 1 is that the content in text detection frame A contains preset content, and preset condition 2 is that the horizontal coordinate of the upper left corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame B, the horizontal coordinate of the upper right corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame C, and the horizontal coordinate of the upper right corner of text detection frame B is smaller than the horizontal coordinate of the upper left corner of text detection frame C;
[0039] Sort the remaining text detection frames from small to large according to the horizontal coordinates of their upper left corners;
[0040] Traverse the remaining text detection frames after sorting and divide them into columns according to the preset rules; the preset rules are: if the horizontal coordinate of the upper left corner of the current text detection frame is greater than the horizontal coordinate of the upper right corner of the previous text detection frame, then the current text detection frame is determined to be a new column.
[0041] A warning limit table reconstruction module is used to adjust the layout of the columns involved in the row merged cells in the third table using empty text boxes according to the spacing between the text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells. According to the adjacent and content-related column numbers and the text detection box contents corresponding to the adjacent and content-related column numbers, the content or cell format of the adjacent and content-related columns in the third table is adjusted to obtain a reconstructed warning limit table.
[0042] In the Reconstruct Warning Limit Table module, based on the spacing between text detection boxes in adjacent rows of the same column and the column numbers involved in the row merged cells, empty text boxes are used to adjust the layout of the columns involved in the row merged cells in the third table, including:
[0043] 1) For the columns involved in the row merge, calculate the distance between the centers of the text detection boxes of adjacent rows;
[0044] 2) Remove the intervals larger than the threshold, calculate the mean of the remaining intervals, and use the mean as the benchmark interval, with parameter i = 1;
[0045] 3) If the distance between the centers of the text detection boxes of the i-th row and the i+1-th row is less than a preset multiple of the reference distance, the i-th row and the i+1-th row are in the form of minimum cells, and go to 4);
[0046] Otherwise, insert an empty text box between the i-th row and the i+1-th row, use the empty text box as the new i+1-th row text detection box, the original i+1-th row text detection box as the i+2-th row text detection box, and use the vertical coordinates of each vertex of the i-th row text detection box plus the reference spacing as the vertical coordinates of each vertex of the empty text box, and go to step 5);
[0047] 4) If the i+1th row is the last row of the column involved in the row merge, then end the layout adjustment of the column. Otherwise, use the distance between the centers of the text detection boxes in the i-th row and the i+1th row as the reference distance, parameter i = i+1, and go to 3);
[0048] 5) If the i+2th row is the last row of the column involved in the row merge, then end the layout adjustment of the column, otherwise go to 4).
[0049] The method for automatically entering early warning limits of power grid equipment includes:
[0050] Get an image of the warning limit table;
[0051] Detect and recognize the text in the image in turn;
[0052] According to the identification results, the early warning limit table of power grid equipment is reconstructed using the early warning limit table reconstruction method;
[0053] Check and revise the reconstructed warning limit value table in turn;
[0054] Enter the warning limits for power grid equipment according to the revised warning limit table.
[0055] Automatic input device for early warning limit of power grid equipment, including:
[0056] Image acquisition module, obtains the image of the warning limit table;
[0057] The detection and recognition module detects and recognizes the text in the image in turn;
[0058] The table reconstruction module reconstructs the warning limit table based on the recognition results using the power grid equipment warning limit table reconstruction method;
[0059] The verification and correction module verifies and corrects the reconstructed warning limit table in turn;
[0060] The input module enters the warning limit values of the power grid equipment according to the revised warning limit value table.
[0061] A computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, enable the computing device to execute a method for reconstructing a grid equipment warning limit table or a method for automatically entering grid equipment warning limits.
[0062] A computing device includes one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a method for reconstructing a grid equipment warning limit table or a method for automatically entering grid equipment warning limits.
[0063] The beneficial effects achieved by the present invention are as follows: the present invention pre-sets a table style text, uses the top corner coordinates of the text detection box and the content in the text detection box to extract the cross-column text detection box, divides the remaining text detection boxes into rows and columns, constructs a first table, merges the columns of the first table according to the table style text, generates a second table, inserts the extracted cross-column text detection box into the second table, and adjusts the layout of the columns involved in the row merged cells, the content or cell format of the adjacent and content-related columns through the spacing of the text detection boxes, the column numbers involved in the row merged cells, and the adjacent and content-related column numbers, to achieve text format misrecognition and reconstruction of the warning limit table in the case of a large number of row merges, thereby further realizing automatic entry of warning limits and improving the daily business processing efficiency of the control center. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 This is the warning limit table;
[0065] Figure 2 Reconstructed the flow chart for the early warning limit table of power grid equipment;
[0066] Figure 3 Automatically enter process control diagrams for early warning limits of power grid equipment;
[0067] Figure 4Schematic diagram of the table reconstruction process for automatic entry of warning limits for power grid equipment;
[0068] Figure 5 Schematic diagram of data verification during automatic entry of early warning limit values for power grid equipment;
[0069] Figure 6 Schematic diagram for entering difference data in automatic entry of warning limits for power grid equipment;
[0070] Figure 7 Automatically enter the device architecture diagram for early warning limits of power grid equipment. DETAILED DESCRIPTION
[0071] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0072] like Figure 2 As shown, a method for reconstructing a grid equipment warning limit table includes the following steps:
[0073] Step 1: Extract text detection frames that span columns based on the top corner coordinates and content of the text detection frames in the image text recognition results, and divide the remaining text detection frames into columns and rows to construct a first table; wherein the image is a warning limit table image, and a text detection frame is set in each cell of the table;
[0074] Step 2: If the number of columns in the first table is greater than the number of columns in the warning limit table defined in the preset table style herein, merge the columns in the first table according to the content in the text detection box and the warning limit table column names defined in the preset table style herein to obtain a second table; wherein the preset table style herein further defines the column numbers involved in the merged cells of the warning limit table columns, the column numbers involved in the merged cells of the rows, and the column numbers of the content-related columns; the content-related columns are two adjacent columns, and the cell format or content of the previous column can be generated based on the content of the next column;
[0075] Step 3: insert the cross-column text detection box into the second table according to the column number involved in the column merge and the top corner coordinates of the cross-column text detection box to obtain a third table;
[0076] Step 4: Adjust the layout of the columns involved in the row merged cells in the third table based on the spacing between the text detection boxes of adjacent rows in the same column, the column numbers involved in the row merged cells, the adjacent and content-related column numbers, and the text detection box contents corresponding to the adjacent and content-related column numbers, adjust the contents or cell formats of the adjacent and content-related columns in the third table, and obtain a reconstructed warning limit table.
[0077] The above method pre-sets a table style. It uses the top corner coordinates and the content within the text detection frames to extract cross-column text detection frames. The remaining text detection frames are then divided into rows and columns to construct a first table. The columns of the first table are then merged according to the table style to generate a second table. The extracted cross-column text detection frames are then inserted into the second table. The method then adjusts the layout of the columns involved in the merged cells, the content of adjacent and related columns, or the cell format based on the spacing between the text detection frames, the column numbers involved in the merged cells, and the numbers of adjacent and related columns. This allows for reconstruction of the warning limit table in the event of text format misrecognition and large-scale row merging. This further enables automatic entry of warning limits, improving the efficiency of daily operations in the control center.
[0078] Image text recognition mainly identifies the coordinates of the top corners of the text detection frame and the content of the text detection frame. Figure 1 For example, the number recognition is relatively accurate, while the text recognition has certain errors, such as "thousand" may be recognized as the number "4". Figure 1 There may be two text detection boxes if the spaces between the words in the "Limit" column are large. For example, one text detection box is used for "upper" or "lower", and another text detection box is used for "limit". Figure 1 There are also column merging and row merging. Column merging is mainly “not assessed yet”, and row merging is mainly busbar column and plant station column. These are row and column merging that cannot be accurately identified.
[0079] In order to facilitate subsequent reconstruction, the table style article can be set in advance. The table style article defines the number of warning limit table columns, the warning limit table column names, the column numbers involved in column merged cells, the column numbers involved in row merged cells, and the column numbers of content-related columns; content-related columns are two adjacent columns, and the cell format or content of the previous column can be generated based on the content of the next column.
[0080] The table style of this article is as follows:
[0081]
[0082]
[0083]
[0084] Based on the current warning limit table, there are relatively few column merges in the table, mainly because the "Not assessed yet" cells are column merged cells. Therefore, based on the upper left corner coordinates and upper right corner coordinates of the text detection box in the image text recognition results and the content in the text detection box, the text detection box that spans columns can be extracted, and then the remaining text detection boxes can be divided into columns.
[0085] Since there may be errors in the recognition of text, a dual judgment condition is adopted here, that is, all text detection frames are traversed first. If the text detection frame A meets the preset condition 1 and / or preset condition 2, the text detection frame A is determined to be a cross-column text detection frame, and the text detection frame A is extracted; among which, the preset condition 1 is that the content in the text detection frame A contains "not tested", and the preset condition 2 is that the horizontal coordinate of the upper left corner of the text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of the text detection frame B, the horizontal coordinate of the upper right corner of the text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of the text detection frame C, and the horizontal coordinate of the upper right corner of the text detection frame B is smaller than the horizontal coordinate of the upper left corner of the text detection frame C.
[0086] Then, the remaining text detection frames are sorted from small to large according to the horizontal coordinates of their upper left corners. Finally, the sorted remaining text detection frames are traversed and divided into columns according to a preset rule. The preset rule is: if the horizontal coordinate of the upper left corner of the current text detection frame is greater than the horizontal coordinate of the upper right corner of the previous text detection frame, the current text detection frame is determined to be a new column.
[0087] The upper left corner coordinates / upper right corner coordinates of the text detection boxes in the column are sorted, and the text detection boxes in the column are divided into rows. According to the column division results and the row division results, a first table can be constructed.
[0088] In the warning limit table, generally only the "limit" column is easily identified as two columns. Therefore, if the number of columns in the first table is equal to the number of columns in the warning limit table defined in the preset table style article, no further column merging is required; if the number of columns in the first table is greater than the number of columns in the warning limit table defined in the preset table style article, the columns in the first table are merged according to the content in the text detection box and the column names of the warning limit table defined in the preset table style article to obtain the second table; if the column name in the table style article contains "limit", but the column name in the first table only includes "limit" and "value", then the two columns can be merged; because the limit column is in the middle column of the table, it is identified as two columns and is still in the middle position after column division, so the two middle columns can be directly merged.
[0089] On the basis of the second table, according to the column numbers and the vertex coordinates of the cross-column text detection box involved in the column merge cells defined in this table style article, the cross-column text detection box is inserted into the second table to obtain the third table; if the "Not assessed yet" text detection box involves the 4th and 5th columns, then it can be inserted into the second table according to the vertex coordinates of the cross-column text detection box to obtain the third table.
[0090] In the third table, all columns no longer need to be adjusted, but rows need to be further adjusted. That is, based on the spacing between text detection boxes of adjacent rows in the same column, the column numbers involved in the merged cells, the numbers of adjacent and content-related columns, and the text detection box contents corresponding to the adjacent and content-related column numbers, the layout of the columns involved in the merged cells in the third table is adjusted, and the contents or cell formats of adjacent and content-related columns in the third table are adjusted to obtain a reconstructed warning limit table. The specific process is as follows:
[0091] S1) adjusting the layout of the columns involved in the row merged cells in the third table using empty text boxes according to the spacing between text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells;
[0092] 1) For the columns involved in the row merge, calculate the distance between the centers of the text detection boxes of adjacent rows;
[0093] 2) Remove the spacing larger than the threshold, generally remove 20% of the spacing with larger values, calculate the mean of the remaining spacing, and use the mean as the benchmark spacing, parameter i = 1
[0094] Warning limit table images are usually captured with a camera, which often doesn't allow for proper alignment. This can result in smaller spacing between cells at the top and larger spacing at the bottom, or vice versa. Furthermore, for columns that don't share the same merge pattern, the spacing between text boxes is relatively discrete. Therefore, we remove excessive spacing and then calculate the average to ensure the stability of the spacing benchmark for merged cells.
[0095] 3) If the distance between the centers of the text detection frames of the i-th row and the i+1-th row is less than a preset multiple of the reference spacing, which is generally set to 1.5 times, then the i-th row and the i+1-th row are in the smallest cell form, and the process proceeds to 4). Otherwise, an empty text frame is inserted between the i-th row and the i+1-th row, and the empty text frame is used as the new text detection frame of the i+1-th row. The original text detection frame of the i+1-th row is used as the text detection frame of the i+2-th row. The vertical coordinates of each vertex of the text detection frame of the i-th row plus the reference spacing are used as the vertical coordinates of each vertex of the empty text frame, and the process proceeds to 5).
[0096] 4) If the i+1th row is the last row of the column involved in the row merge, then end the layout adjustment of the column. Otherwise, use the distance between the centers of the text detection boxes in the i-th row and the i+1th row as the reference distance, parameter i = i+1, and go to 3);
[0097] 5) If the i+2th row is the last row of the column involved in the row merge, then end the layout adjustment of the column, otherwise go to 4).
[0098] S2) adjusting the content or cell format of adjacent and content-related columns in the third table according to the adjacent and content-related column numbers and the text detection box contents corresponding to the adjacent and content-related column numbers to obtain a reconstructed warning limit table;
[0099] Since text recognition is more accurate for numbers, it is generally used as the starting column to adjust the related columns forward. For example, in the table style, the related columns are columns 1 and 2, columns 2 and 3, and columns 3 and 4. Since the fourth column contains only numerical values except the column name, it can be adjusted from the fourth column forward.
[0100] From the description of the relyInfos field in this table style, we can see that the format and content of the third column (limit) can be generated based on the content of the fourth column (valley load). In addition, the third column is not mentioned in the mergeInfos field, indicating that the content of the third column corresponds one-to-one with the fourth column, and there is no merged cell. If the first number in the fourth column is greater than the second, the content of the first cell in the third column is the "upper limit", otherwise it is the "lower limit". According to this rule, the format and content of the third column can be adjusted based on the results of S1.
[0101] Based on the description of the relyInfos field in this table style, the format and content of the second column (busbar) can be generated based on the content of the third column (limit), and the mergeInfos field indicates that there are cells in the second column that are merged across multiple columns horizontally. The simultaneous appearance of "upper limit" and "lower limit" in the third column corresponds to a merged busbar type cell in the second column. If there is no matching "upper limit" or "lower limit", it corresponds to a basic cell in the second column and does not need to be merged. According to this rule, the format and content of the second column can be adjusted based on the results of S1.
[0102] Based on the description of the relyInfos field in this table style, it can be seen that the format and content of the first column (plant station) can be generated based on the content of the second column (busbar), and the mergeInfos field indicates that there are cells in the first column that are merged horizontally across multiple columns; the rule for generating the plant station column is to compare the contents of the busbar column up and down. If the number (1000) in the previous row (1000 kV) is greater than the number (500) in the next row (500 kV), it means that a plant station corresponds to at least two busbar types. The specific types are determined according to the voltage level type in the busbar type. Until the number in the previous row is less than the number in the next row, it means that the busbar type in the next row corresponds to a new plant station. According to this rule, the format and content of the first column can be adjusted based on the S1 result.
[0103] The above method realizes the reconstruction of the warning limit table in the case of text format misrecognition and large-scale row merging, which can further realize the automatic entry of warning limits and improve the daily business processing efficiency of the control center.
[0104] Based on the same technical solution, the present invention also discloses a software device for the above method, a device for reconstructing a warning limit table of power grid equipment, comprising:
[0105] The first table module extracts the text detection frames that span columns based on the upper left corner coordinates and the upper right corner coordinates of the text detection frames in the image text recognition results and the content in the text detection frames, divides the remaining text detection frames into columns, sorts the upper left corner coordinates / upper right corner coordinates of the text detection frames in the columns, divides the text detection frames in the columns into rows, and constructs the first table based on the column division results and the row division results; wherein the image is a warning limit table image, and a text detection frame is set in each cell in the table.
[0106] In the first table module, based on the coordinates of the upper left and upper right corners of the text detection frames in the image text recognition results and the content in the text detection frames, the text detection frames that span columns are extracted, and the remaining text detection frames are divided into columns, including:
[0107] Traverse all text detection frames. If text detection frame A meets preset condition 1 and / or preset condition 2, determine that text detection frame A is a cross-column text detection frame and extract text detection frame A; wherein preset condition 1 is that the content in text detection frame A contains "not assessed", and preset condition 2 is that the horizontal coordinate of the upper left corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame B, the horizontal coordinate of the upper right corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame C, and the horizontal coordinate of the upper right corner of text detection frame B is smaller than the horizontal coordinate of the upper left corner of text detection frame C;
[0108] Sort the remaining text detection frames from small to large according to the horizontal coordinates of their upper left corners;
[0109] Traverse the remaining text detection frames after sorting and divide them into columns according to the preset rules; the preset rules are: if the horizontal coordinate of the upper left corner of the current text detection frame is greater than the horizontal coordinate of the upper right corner of the previous text detection frame, then the current text detection frame is determined to be a new column.
[0110] The second table module, if the number of columns of the first table is greater than the number of columns of the warning limit table defined in the preset table style in this article, the columns in the first table are merged according to the content in the text detection box and the warning limit table column name defined in the preset table style in this article to obtain the second table; wherein, the preset table style in this article also defines the column numbers involved in the merged cells of the warning limit table columns, the column numbers involved in the merged cells of the rows, and the column numbers of the content-related columns; the content-related columns are two adjacent columns, and the cell format or content of the previous column can be generated based on the content of the latter column.
[0111] The third table module inserts the cross-column text detection box into the second table according to the column number involved in the column merge cell and the top corner coordinates of the cross-column text detection box to obtain the third table.
[0112] A warning limit table reconstruction module is used to adjust the layout of the columns involved in the row merged cells in the third table using empty text boxes according to the spacing between the text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells. According to the adjacent and content-related column numbers and the text detection box contents corresponding to the adjacent and content-related column numbers, the content or cell format of the adjacent and content-related columns in the third table is adjusted to obtain a reconstructed warning limit table.
[0113] In the Reconstruct Warning Limit Table module, based on the spacing between text detection boxes in adjacent rows of the same column and the column numbers involved in the row merged cells, empty text boxes are used to adjust the layout of the columns involved in the row merged cells in the third table, including:
[0114] 1) For the columns involved in the row merge, calculate the distance between the centers of the text detection boxes of adjacent rows;
[0115] 2) Remove the intervals larger than the threshold, calculate the mean of the remaining intervals, and use the mean as the benchmark interval, with parameter i = 1;
[0116] 3) If the distance between the centers of the text detection boxes of the i-th row and the i+1-th row is less than a preset multiple of the reference distance, the i-th row and the i+1-th row are in the form of minimum cells, and go to 4);
[0117] Otherwise, insert an empty text box between the i-th row and the i+1-th row, use the empty text box as the new i+1-th row text detection box, the original i+1-th row text detection box as the i+2-th row text detection box, and use the vertical coordinates of each vertex of the i-th row text detection box plus the reference spacing as the vertical coordinates of each vertex of the empty text box, and go to step 5);
[0118] 4) If the i+1th row is the last row of the column involved in the row merge, then end the layout adjustment of the column. Otherwise, use the distance between the centers of the text detection boxes in the i-th row and the i+1th row as the reference distance, parameter i = i+1, and go to 3);
[0119] 5) If the i+2th row is the last row of the column involved in the row merge, end the layout adjustment of the column, otherwise go to 4).
[0120] On the basis of the above method, the present invention further discloses a method for automatically entering warning limits of power grid equipment, see Figure 3 ,include:
[0121] A1) Obtain an image of the warning limit table and preprocess the image.
[0122] Preprocessing mainly includes grayscale, binarization, tilt correction, layout division, and table frame removal.
[0123] A grayscale image refers to an image that contains only brightness information but no color information. Its characteristic is that the brightness changes continuously from dark to bright, and it can better reflect the overall and local color and brightness level distribution characteristics of the image.
[0124] Images captured by peripherals are typically color images, where the color information of each pixel is determined by three components: R, G, and B. The OCR text recognition implemented in this invention does not consider the color information of images. Therefore, grayscale processing is used to ensure that every pixel element in the pixel matrix satisfies the relationship R = G = B. Each pixel's color information is represented by a grayscale value between 0 and 255, thus reducing the amount of image data. The system uses floating-point arithmetic to calculate the grayscale value: Gray = R*0.2 + G*0.69 + B*0.11.
[0125] Binarization is to make the grayscale value of each element in the pixel matrix of the image 0 (black) or 255 (white), that is, to make the entire image appear only black and white. First, calculate the average grayscale value P of all pixels in the pixel matrix of the entire image. avg , less than or equal to P avg The pixel point is set to 0, which is greater than P avg The pixel count is set to 255.
[0126] The Hough transform method is used to achieve automatic image tilt and rotation correction: all straight lines in the image are detected using the Hough transform, a virtual straight line is used as a reference line, the inclination angle between each straight line and the virtual straight line is calculated, the average value of the inclination angle is obtained, and the image is rotated and corrected according to the inclination angle.
[0127] Table border removal: Layout-Parser text layout analysis toolkit is used to identify four major types of blocks from the image: titles, text paragraphs, tables, and pictures using interfaces such as layout detection and layout analysis. Based on the coordinate range of the table area, a distance of several pixels is expanded to extract only the table area from the original image file, generating a pre-processed result image file that only contains the table area and meets the conditions for subsequent image content recognition.
[0128] A2) Detect and recognize the text in the image in sequence.
[0129] Text detection: The VGG16 convolutional neural network is used to extract image features to be identified. Sequence features are extracted through a bidirectional LSTM recurrent network. The vertical coordinate, predicted label score, and horizontal coordinate offset are obtained through three fully connected layer branches. Finally, the NMS method is used to filter and suppress redundant text boxes.
[0130] Text Recognition: Based on the horizontal and vertical coordinates of the text regions returned by text detection, several text detection boxes are located in the image. A CRNN model is used as a text recognizer to identify text sequences within these boxes. A CRNN is a convolutional recurrent neural network. A CNN first extracts feature sequences from the input image. A bidirectional LSTM recurrent network then predicts the label distribution corresponding to the feature sequences obtained from the convolutional layer. Finally, a CTC method is introduced to de-dupe and integrate the label distribution predicted by the recurrent network layer.
[0131] A3) Based on the identification results, the above-mentioned power grid equipment warning limit table reconstruction method is used to reconstruct the warning limit table; the reconstructed warning limit table can be stored in EXCEL file format, see Figure 4 .
[0132] A4) Check and revise the reconstructed warning limit table in turn, i.e. check the completeness, consistency, accuracy and rationality of the table. Figure 5 .
[0133] The integrity check can verify the empty value of different types of cells such as table header, plant name, equipment type, equipment name, voltage level, warning limit, etc.
[0134] The consistency check compares the table contents in an interface, supporting business reviewers to manually review and correct them.
[0135] Accuracy verification verifies the existence and accuracy of information such as plant name, equipment type, and equipment name in the table by querying the power grid model information in the business system mirror database;
[0136] The rationality check uses the isolation forest algorithm to check the stock limit data of business system equipment, obtains the reasonable value range of the limit for different equipment types and voltage levels, and performs rationality check on the limit participation in the table based on the reasonable value range of the limit.
[0137] A5) Enter the power grid equipment warning limit values according to the revised warning limit value table, and perform data difference comparison, difference information submission and entry trace archiving in sequence. Figure 6 .
[0138] Based on the plant name, equipment type, voltage level, equipment name and other information in the reconstruction table, the equipment ID, the telemetry ID of the equipment and the formula ID involved in the calculation of the telemetry ID are retrieved from the mirror database of the business system management area, and the above ID information is associated with the limit ID that actually needs to be updated.
[0139] According to the above-mentioned associated limit ID, the limit data in the current business system is queried, and a floating-point data consistency comparison is performed with the limit in the reconstructed table to generate a difference information description file and its MD5 check code file, and transmit it across the network isolation device to the business system production environment.
[0140] The format of the difference information description file is as follows:
[0141]
[0142]
[0143] After receiving the aforementioned files, the data submission service in the business system's production environment verifies the integrity of the difference information description file using an MD5 checksum. Once the integrity check passes, the difference information description file is parsed and the data is stored. The system classifies projects that have completed the final data submission stage as historically operational and locks them. Users are only allowed to view information such as operation traces and submitted data; further editing and data submission are prohibited.
[0144] The automatic data entry method of the present invention completes the tasks of data identification, verification and correction, difference comparison, and update submission in the form of a workflow, effectively solving the problem of manual comparison and data entry, and reducing the original time for entering a business form from 2 to 3 days to about half an hour, significantly improving the daily business processing efficiency of the control center.
[0145] Based on the same technical solution, the present invention also discloses a software device of the above method, a device for automatically entering warning limits for power grid equipment, comprising:
[0146] Image acquisition module, which obtains images of the warning limit table;
[0147] The detection and recognition module detects and recognizes the text in the image in turn;
[0148] A table reconstruction module reconstructs the warning limit table based on the recognition result using the above-mentioned power grid equipment warning limit table reconstruction method;
[0149] The verification and correction module verifies and corrects the reconstructed warning limit table in turn;
[0150] The input module enters the warning limit values of the power grid equipment according to the revised warning limit value table.
[0151] The data processing procedures and methods of the above modules are consistent and will not be repeated here.
[0152] like Figure 7 As shown, the logical architecture of the above device is mainly composed of basic support, image preprocessing, image content recognition, data verification, and data entry layers.
[0153] The basic support layer serves as the technical foundation for the automatic entry device of warning limits for power grid equipment. It provides the device with an indispensable vocabulary library in the field of regulation and control, and a business-specific model that undergoes secondary training based on the mainstream open source OCR model framework, thereby improving the overall recognition accuracy of special symbols and special words in the power grid field. It also implements fine-grained division and workflow closed-loop management of the process, work content, and operators of warning limit entry, and logically merges the links from limit image input to entry trace archiving into a limit entry project, and conducts integrated project management in the application and time dimensions.
[0154] The image preprocessing layer supports the generation of high-quality image files that meet the requirements of image content recognition. It is used to eliminate irrelevant information in images captured by external devices, enhance and restore effective information in the images, and thus improve the accuracy and reliability of feature extraction, image segmentation, matching and recognition.
[0155] The image content recognition layer uses text detection and recognition to obtain the coordinates and content of text within the image. The template adaptation engine loads business form style files for each application scenario, determines the business scenario to which the text reset result belongs, and then restructures the table structure to convert the coordinates and text content into an Excel file format, generating a recognition result file with a standard file name.
[0156] The data verification layer provides two methods: manual interactive interface verification and background service automated verification, to verify the integrity, consistency, accuracy and rationality of the structured files of the recognition results.
[0157] The data entry layer associates the device ID information with the actual limit ID that needs to be updated, queries the limit data in the current business system for consistency comparison, generates a difference information description file and sends it to the data submission module to complete the difference limit data entry
[0158] Based on the same technical solution, the present invention also discloses a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, enable the computing device to execute a method for reconstructing a grid equipment warning limit table or a method for automatically entering grid equipment warning limits.
[0159] Based on the same technical solution, the present invention also discloses a computing device, including one or more processors, one or more memories and one or more programs, wherein the one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a method for reconstructing a grid equipment warning limit table or a method for automatically entering grid equipment warning limits.
[0160] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0161] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0162] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0164] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A method for reconstructing a power grid equipment warning limit table, characterized in that: include: Extract the text detection frames that span columns based on the top corner coordinates of the text detection frames and the content in the text detection frames in the image text recognition results, and divide the remaining text detection frames into columns and rows to construct a first table; wherein the image is an image of a warning limit table, and a text detection frame is set in each cell of the table; If the number of columns in the first table is greater than the number of columns in the warning limit table defined in the preset table style herein, the columns in the first table are merged according to the content in the text detection box and the column names of the warning limit table defined in the preset table style herein to obtain a second table; wherein the preset table style herein further defines the column numbers involved in the merged cells of the warning limit table columns, the column numbers involved in the merged cells of the rows, and the column numbers of the content-related columns; the content-related columns are two adjacent columns, and the cell format or content of the previous column can be generated based on the content of the latter column; Inserting the cross-column text detection box into the second table according to the column numbers involved in the column merge and the top corner coordinates of the cross-column text detection box to obtain a third table; According to the spacing between the text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells, empty text boxes are used to adjust the layout of the columns involved in the row merged cells in the third table. According to the adjacent and content-related column numbers and the text detection box contents corresponding to the adjacent and content-related column numbers, the contents or cell formats of the adjacent and content-related columns in the third table are adjusted to obtain a reconstructed warning limit table.
2. A method for reconstructing a power grid equipment warning limit table according to claim 1, characterized in that: According to the top corner coordinates of the text detection frames and the content in the text detection frames in the image text recognition results, the text detection frames that span columns are extracted, and the remaining text detection frames are divided into columns and rows to construct the first table, including: Extract the text detection frames that span columns based on the coordinates of the upper left and upper right corners of the text detection frames in the image text recognition results and the content of the text detection frames, and divide the remaining text detection frames into columns; Sort the upper left corner coordinates / upper right corner coordinates of the text detection boxes in the column, and divide the text detection boxes in the column into rows; A first table is constructed according to the column division results and the row division results.
3. A method for reconstructing a power grid equipment warning limit table according to claim 2, characterized in that: Based on the coordinates of the upper left and upper right corners of the text detection boxes in the image text recognition results and the content in the text detection boxes, we extract the text detection boxes that span columns and divide the remaining text detection boxes into columns, including: Traverse all text detection frames, and if text detection frame A meets preset condition 1 and / or preset condition 2, determine that text detection frame A is a cross-column text detection frame, and extract text detection frame A; wherein preset condition 1 is that the content in text detection frame A contains preset content, and preset condition 2 is that the horizontal coordinate of the upper left corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame B, the horizontal coordinate of the upper right corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame C, and the horizontal coordinate of the upper right corner of text detection frame B is smaller than the horizontal coordinate of the upper left corner of text detection frame C; Sort the remaining text detection frames from small to large according to the horizontal coordinates of their upper left corners; Traverse the remaining text detection frames after sorting and divide them into columns according to the preset rules; the preset rules are: if the horizontal coordinate of the upper left corner of the current text detection frame is greater than the horizontal coordinate of the upper right corner of the previous text detection frame, then the current text detection frame is determined to be a new column.
4. A method for reconstructing a power grid equipment warning limit table according to claim 1, characterized in that: Based on the spacing between text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells, an empty text box is used to adjust the layout of the columns involved in the row merged cells in the third table, including: 1) For the columns involved in the row merge, calculate the distance between the centers of the text detection boxes of adjacent rows; 2) Remove the intervals larger than the threshold, calculate the mean of the remaining intervals, and use the mean as the benchmark interval, with parameter i = 1; 3) If the distance between the centers of the text detection boxes of row i and row i+1 is less than a preset multiple of the reference distance, then row i and row i+1 are in the smallest cell form, and go to step 4); Otherwise, insert an empty text box between the i-th row and the i+1-th row, use the empty text box as the new i+1-th row text detection box, the original i+1-th row text detection box as the i+2-th row text detection box, and use the vertical coordinates of each vertex of the i-th row text detection box plus the reference spacing as the vertical coordinates of each vertex of the empty text box, and go to step 5); 4) If row i+1 is the last row in the column involved in the row merge, then end the layout adjustment of the column. Otherwise, use the distance between the centers of the text detection boxes in rows i and i+1 as the reference distance, parameter i=i+1, and go to step 3); 5) If the i+2th row is the last row of the column involved in the row merge, end the layout adjustment of the column; otherwise, go to 4).
5. A device for reconstructing a warning limit table of power grid equipment, characterized in that: include: The first table module extracts the text detection frames that span columns based on the top corner coordinates of the text detection frames and the content in the text detection frames in the image text recognition results, and divides the remaining text detection frames into columns and rows to construct a first table; wherein the image is a warning limit table image, and a text detection frame is set in each cell of the table; The second table module, if the number of columns of the first table is greater than the number of columns of the warning limit table defined in the preset table style in this article, merge the columns in the first table according to the content in the text detection box and the warning limit table column name defined in the preset table style in this article to obtain the second table; wherein, the preset table style in this article also defines the column numbers involved in the merged cells of the warning limit table columns, the column numbers involved in the merged cells of the rows, and the column numbers of the content-related columns; the content-related columns are two adjacent columns, and the cell format or content of the previous column can be generated based on the content of the latter column; The third table module inserts the cross-column text detection box into the second table according to the column number involved in the column merge and the top corner coordinates of the cross-column text detection box to obtain a third table; A warning limit table reconstruction module is used to adjust the layout of the columns involved in the row merged cells in the third table using empty text boxes according to the spacing between the text detection boxes of adjacent rows in the same column and the column numbers involved in the row merged cells. According to the adjacent and content-related column numbers and the text detection box contents corresponding to the adjacent and content-related column numbers, the content or cell format of the adjacent and content-related columns in the third table is adjusted to obtain a reconstructed warning limit table.
6. A device for reconstructing a power grid equipment warning limit table according to claim 5, characterized in that: The first table module extracts text detection frames that span columns based on the upper left corner coordinates and upper right corner coordinates of the text detection frames in the image text recognition results and the content of the text detection frames, divides the remaining text detection frames into columns, sorts the upper left corner coordinates / upper right corner coordinates of the text detection frames in the columns, divides the text detection frames in the columns into rows, and constructs the first table based on the column division results and the row division results.
7. A device for reconstructing a power grid equipment warning limit table according to claim 6, characterized in that: In the first table module, based on the coordinates of the upper left and upper right corners of the text detection frames in the image text recognition results and the content in the text detection frames, the text detection frames that span columns are extracted, and the remaining text detection frames are divided into columns, including: Traverse all text detection frames, and if text detection frame A meets preset condition 1 and / or preset condition 2, determine that text detection frame A is a cross-column text detection frame, and extract text detection frame A; wherein preset condition 1 is that the content in text detection frame A contains preset content, and preset condition 2 is that the horizontal coordinate of the upper left corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame B, the horizontal coordinate of the upper right corner of text detection frame A is between the horizontal coordinates of the upper left corner and the upper right corner of text detection frame C, and the horizontal coordinate of the upper right corner of text detection frame B is smaller than the horizontal coordinate of the upper left corner of text detection frame C; Sort the remaining text detection frames from small to large according to the horizontal coordinates of their upper left corners; Traverse the remaining text detection frames after sorting and divide them into columns according to the preset rules; the preset rules are: if the horizontal coordinate of the upper left corner of the current text detection frame is greater than the horizontal coordinate of the upper right corner of the previous text detection frame, then the current text detection frame is determined to be a new column.
8. The device for reconstructing a power grid equipment warning limit table according to claim 5, characterized in that: In the Reconstruct Warning Limit Table module, based on the spacing between text detection boxes in adjacent rows of the same column and the column numbers involved in the row merged cells, empty text boxes are used to adjust the layout of the columns involved in the row merged cells in the third table, including: 1) For the columns involved in the row merge, calculate the distance between the centers of the text detection boxes of adjacent rows; 2) Remove the intervals larger than the threshold, calculate the mean of the remaining intervals, and use the mean as the benchmark interval, with parameter i = 1; 3) If the distance between the centers of the text detection boxes of row i and row i+1 is less than a preset multiple of the reference distance, then row i and row i+1 are in the smallest cell form, and go to step 4); Otherwise, insert an empty text box between the i-th row and the i+1-th row, use the empty text box as the new i+1-th row text detection box, the original i+1-th row text detection box as the i+2-th row text detection box, and use the vertical coordinates of each vertex of the i-th row text detection box plus the reference spacing as the vertical coordinates of each vertex of the empty text box, and go to step 5); 4) If row i+1 is the last row in the column involved in the row merge, then end the layout adjustment of the column. Otherwise, use the distance between the centers of the text detection boxes in rows i and i+1 as the reference distance, parameter i=i+1, and go to step 3); 5) If the i+2th row is the last row of the column involved in the row merge, end the layout adjustment of the column; otherwise, go to 4).
9. A method for automatically entering warning limits for power grid equipment, characterized in that: include: Get an image of the warning limit table; Detect and recognize the text in the image in turn; According to the recognition result, the warning limit table is reconstructed using the power grid equipment warning limit table reconstruction method according to any one of claims 1 to 4; Check and revise the reconstructed warning limit value table in turn; Enter the warning limits for power grid equipment according to the revised warning limit table.
10. Automatic input device for warning limit of power grid equipment, characterized by: include: Image acquisition module, which obtains images of the warning limit table; The detection and recognition module detects and recognizes the text in the image in turn; a table reconstruction module, which reconstructs the warning limit table based on the recognition result by using the power grid equipment warning limit table reconstruction method according to any one of claims 1 to 4; The verification and correction module verifies and corrects the reconstructed warning limit table in turn; The input module enters the warning limit values of the power grid equipment according to the revised warning limit value table.
11. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods according to claims 1 to 4 and 9.
12. A computing device, characterized in that include: One or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods according to claims 1 to 4 and 9.
Citation Information
Patent Citations
Artificial intelligence-based table image reconstruction method and device, equipment and medium
CN113869017A
Table reconstruction method and device, computer equipment and readable storage medium
CN114005126A