A machine tool form data processing method and system for electric power construction
By clustering the machine tool form images, constructing interception templates and judging the image recognition model, the problem of missing or wrong filling in the machine tool form data is solved, and the efficiency and accuracy of data processing are improved.
Patent Information
- Application Number
- CN202410780652.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-18
AI Technical Summary
In the existing technology, missing or incorrect filling in the machine tool form will increase the workload of semantic analysis and affect the data processing efficiency.
Divide the form images through preset clustering rules, build an interception template, determine the difference between the actual size of the text interval and the preset size, screen out abnormal form images, and use the image recognition model to determine the correctness of the text information before proceeding. Setup processing to reduce the workload of semantic analysis.
Effectively filter out missed or incorrectly filled form images, improve the efficiency of machine form data analysis, reduce unnecessary workload, and improve the accuracy of data processing.
Smart Images

Figure CN118366181B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of form data processing, and in particular relates to a method and system for processing machine form data for electric power construction. Background Art
[0002] At present, in order to change the current management status of internal leasing of machinery and equipment, improve the efficiency of internal leasing management of machinery and equipment, and ensure the normal operation of machinery and equipment, it is necessary to strengthen the optimization of the machinery and equipment use approval process and establish a complete information system to support machinery and equipment management. In the prior art, the content of each machinery and equipment form is identified, and then the filled-in content is analyzed based on the meaning of the identified characters to determine whether there are any errors. However, the method of analyzing whether there are any errors in the filling of the machinery and equipment form by means of identifying the meaning of characters requires a large amount of data processing.
[0003] Therefore, it is urgent to pre-process the machine form to filter out machine forms with missing or incorrect fillings as much as possible, so as to reduce the workload of semantic analysis of the machine form and improve the analysis efficiency as much as possible. Summary of the invention
[0004] The present invention provides a method and system for processing tool form data for electric power construction, which is used to solve the technical problem that if semantic analysis is performed on tool forms with missing or wrong filling, unnecessary workload will be increased, which may affect data processing efficiency.
[0005] In a first aspect, the present invention provides a method for processing machine tool form data for electric power construction, comprising:
[0006] Acquire each tool form data to be processed, wherein each tool form data includes at least one form image;
[0007] Dividing each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only includes at least one form image in the same size range;
[0008] Constructing a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window;
[0009] Acquire the actual size of a text interval of a form image in the form image set within a preset area based on a preset matching rule, and determine whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range;
[0010] If the first difference is not within the preset threshold range, obtaining other preset sizes in other interception templates corresponding to other form image sets, and continuing to determine whether the second difference between the actual size of the text interval and the other preset sizes is within the preset threshold range;
[0011] If the second difference is not within the preset threshold range, the form image is defined as an abnormal form image, and the abnormal form image is removed from the form image set to obtain an updated form image set;
[0012] Selecting any form image from a certain form image set after update, and judging whether the text information in any form image is correct according to the preset image recognition model;
[0013] If the text information is correct, the machine form data corresponding to all the form images in the updated form image set are directly stored.
[0014] In a second aspect, the present invention provides a machine tool form data processing system for electric power construction, comprising:
[0015] An acquisition module is configured to acquire each tool form data to be processed, wherein a tool form data includes at least one form image;
[0016] A division module, configured to divide each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only includes at least one form image in the same size range;
[0017] A construction module is configured to construct a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window;
[0018] a first judgment module configured to obtain an actual size of a text interval of a form image in the form image set within a preset area based on a preset matching rule, and to judge whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range;
[0019] a second judgment module configured to obtain other preset sizes in other interception templates corresponding to other form image sets if the first difference is not within a preset threshold range, and continue to judge whether a second difference between the actual size of the text interval and the other preset sizes is within a preset threshold range;
[0020] an updating module configured to define the certain form image as an abnormal form image if the second difference is not within a preset threshold range, and remove the abnormal form image from the certain form image set to obtain an updated certain form image set;
[0021] A third judgment module is configured to select any form image from a certain form image set after update, and judge whether the text information in any form image is correct according to the preset image recognition model;
[0022] The storage module is configured to directly store the machine form data corresponding to all the form images in the updated form image set if the text information is correct.
[0023] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the steps of the tool form data processing method for power construction according to any embodiment of the present invention.
[0024] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor is caused to execute the steps of a method for processing tool form data for electric power construction according to any embodiment of the present invention.
[0025] The machine form data processing method and system for electric power construction of the present application divide each form image according to a preset clustering rule to obtain at least one form image set, and construct a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, so that each form image set is provided with a corresponding interception template, which can reduce the situation that the form image size is inconsistent due to different shooting angles as much as possible, causing the complexity and difficulty of subsequent form image processing; and based on the preset matching rule, the actual size of the text interval of a certain form image in a certain form image set in a preset area is obtained, and it is judged whether the first difference between the actual size of the text interval and the first preset size is within the preset threshold range. If the first difference is not within the preset threshold range, other preset sizes in other interception templates corresponding to other form image sets are obtained, and it is further judged whether the second difference between the actual size of the text interval and the other preset sizes is within the preset threshold range, so that the form image can be pre-processed, so as to screen out form images with missing or wrong filling as much as possible, so as to reduce the workload of semantic analysis of machine form data, thereby improving the analysis efficiency as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 A flowchart of a method for processing machine tool form data for electric power construction provided by one embodiment of the present invention;
[0028] Figure 2 A structural block diagram of a machine form data processing system for electric power construction provided by an embodiment of the present invention;
[0029] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] See also Figure 1 , which shows a flow chart of a method for processing machine form data for electric power construction according to the present application.
[0032] like Figure 1 As shown, the data processing method of the machine form for electric power construction specifically includes the following steps:
[0033] Step S101, obtaining each tool form data to be processed, wherein a tool form data includes at least one form image.
[0034] For example, when equipment rental is required at a construction project site, the project manager fills in the project that requires rental equipment, the affiliated branch, contact information, rental instructions and other information in the "Equipment Rental Application" to generate a equipment rental form. The rental form is photographed through a mobile terminal to obtain a form image. After the system obtains the uploaded form image, it performs subsequent analysis and processing on the form image.
[0035] Step S102: dividing each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only includes at least one form image in the same size range.
[0036] In this step, since the different shooting angles and distances of the user may cause inconsistent sizes of the form images, the size of each form image is obtained, and at least one form image in the same size range is divided into a form image set to obtain at least one form image set.
[0037] Step S103, constructing a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window.
[0038] In this step, a preset area of a target form image in a form image set is subjected to image binarization processing to obtain a target text interval of the target form image in the preset area, wherein the target form image is a form image with the largest size in a form image set; a first background image having the same size as the target form image is cropped, and a window having the same position and size as the target text interval is cropped again in the cropped first background image, thereby obtaining a first capture template corresponding to a form image set.
[0039] It should be noted that first, a preset area of a target form image in a form image set is subjected to image binarization to obtain a binary image to distinguish between a non-text area and a text area. For example, the grayscale value of the non-text area is set to 0, and the grayscale value of the text area is set to 255, so that the non-text area will be pure black, and the text area will be pure white. Then, edge detection is performed on the binary image to determine the target text interval of the target form image in the preset area.
[0040] Step S104, obtaining the actual size of the text interval of a form image in the form image set within a preset area based on a preset matching rule, and determining whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range.
[0041] In this step, a preset area of a form image is subjected to image binarization processing to obtain a text area of the form image in the preset area, wherein the text area is composed of two long sides and two short sides; the form image is overlapped with the first interception template, and the first long side and the first short side of the text area are respectively overlapped with a long side and a short side of the window in the first interception template; the window is slid along the first long side for a first time until the other long side of the window overlaps with the second long side to obtain a first sliding distance, and the window is slid along the first short side for a second time until the other short side of the window overlaps with the second short side to obtain a second sliding distance; the actual length of the text area is determined according to the first sliding distance and the length of a long side of the window, and the actual width of the text area is determined according to the second sliding distance and the length of a short side of the window to obtain the actual size of the text area.
[0042] It should be noted that the first sliding distance can be calculated based on the sliding speed and sliding time of the window during the first sliding, and the second sliding distance can be calculated based on the sliding speed and sliding time of the window during the second sliding. In addition, the first sliding distance can also be calculated based on the initial position and the final position of the window during the first sliding, and the second sliding distance can also be calculated based on the initial position and the final position of the window during the second sliding. Among them, the initial position is the position at the beginning of the sliding, and the final position is the position after the sliding ends.
[0043] For example, by obtaining the position coordinates of the window in the first interception template, the width of the window is calculated to be 10 mm and the length is 90 mm. When the first long side and the first short side of a certain text interval are overlapped with the long side and the short side of the window in the first interception template respectively, the first sliding distance after the first sliding is calculated to be 5 mm according to the sliding speed V1 and the sliding time T1, and the second sliding distance after the second sliding is calculated to be 20 mm according to the sliding speed V1 and the sliding time T2. Therefore, the actual width of a certain text interval is 5 mm and the actual length is 70 mm.
[0044] In the present embodiment, since each form image in a form image set may be a photographed picture, when the photographed form images are not aligned, the text size in a certain direction may be different from that in other directions. Therefore, directly calculating the actual size of a text interval by the position coordinates of the pixel points of the text in a preset area of a form image may result in inaccurate actual size. Therefore, the actual width of a text interval is determined according to the second sliding distance and the length of a short side of the window to obtain the actual size of the text interval. This can improve the accuracy of the actual size as much as possible, thereby facilitating improving the accuracy of subsequent difference judgment as much as possible.
[0045] In a specific embodiment, after determining whether a first difference between the actual size of the text area and the first preset size is within a preset threshold range, if the first difference is within the preset threshold range, the certain form image is directly defined as a normal form image and retained in the certain form image set.
[0046] For example, determining whether a first difference between an actual size of a text interval and a first preset size is within a preset threshold range includes: determining whether a first length difference between an actual length of the text interval and a first preset length is within a first preset threshold range, and whether a first width difference between an actual width of the text interval and the first preset width is within a second preset threshold range.
[0047] Step S105, if the first difference is not within the preset threshold range, obtain other preset sizes in other clipping templates corresponding to other form image sets, and continue to determine whether the second difference between the actual size of the text area and the other preset sizes is within the preset threshold range.
[0048] In a specific embodiment, if the first difference is within a preset threshold range, the certain form image is directly defined as a normal form image and retained in the certain form image set.
[0049] Step S106, if the second difference is not within the preset threshold range, the form image is defined as an abnormal form image, and the abnormal form image is removed from the form image set to obtain an updated form image set;
[0050] Step S107 , selecting any form image from a certain form image set after update, and judging whether the text information in the any form image is correct according to the preset image recognition model.
[0051] Specifically, if the text information is incorrect, all form images in a certain form image set after update are input into a preset image recognition model for text information recognition, and each piece of text information is judged.
[0052] It should be noted that the image recognition model is a neural network model trained based on a sample database. The sample database contains form images and annotation information corresponding to the form images.
[0053] Step S108: If the text information is correct, directly store the machine form data corresponding to all the form images in the updated form image set.
[0054] In summary, the method of the present application divides each form image according to a preset clustering rule to obtain at least one form image set, and constructs a first clipping template corresponding to a certain form image set according to a target form image in a certain form image set, so that each form image set is provided with a corresponding clipping template, which can reduce the inconsistency of form image sizes caused by different shooting angles as much as possible, causing the complexity and difficulty of subsequent form image processing; and, based on the preset matching rule, obtain the actual size of the text interval in a preset area of a certain form image in a certain form image set, and judge whether the first difference between the actual size of the text interval and the first preset size is within the preset threshold range. If the first difference is not within the preset threshold range, obtain other preset sizes in other clipping templates corresponding to other form image sets, and continue to judge whether the second difference between the actual size of the text interval and the other preset sizes is within the preset threshold range. The form image can be pre-processed, so as to screen out form images with missing or wrong filling as much as possible, so as to reduce the workload of semantic analysis of machine form data, thereby improving the analysis efficiency as much as possible.
[0055] See also Figure 2 , which shows a structural block diagram of a machine form data processing system for electric power construction in the present application.
[0056] like Figure 2 As shown, the tool form data processing system 200 includes an acquisition module 210, a division module 220, a construction module 230, a first judgment module 240, a second judgment module 250, an update module 260, a third judgment module 270 and a storage module 280.
[0057] Among them, the acquisition module 210 is configured to obtain each machine form data to be processed, wherein a machine form data contains at least one form image; the division module 220 is configured to divide each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only contains at least one form image in the same size range; the construction module 230 is configured to construct a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window; the first judgment module 240 is configured to obtain the actual size of the text interval of a certain form image in the certain form image set within the preset area based on a preset matching rule, and judge whether the actual size of the text interval is consistent with the first preset size. The difference is within a preset threshold range; the second judgment module 250 is configured to obtain other preset sizes in other interception templates corresponding to other form image sets if the first difference is not within the preset threshold range, and continue to judge whether the second difference between the actual size of the text interval and the other preset sizes is within the preset threshold range; the update module 260 is configured to define the form image as an abnormal form image if the second difference is not within the preset threshold range, and remove the abnormal form image from the form image set to obtain an updated form image set; the third judgment module 270 is configured to select any form image from the updated form image set, and judge whether the text information in the form image is correct according to the preset image recognition model; the storage module 280 is configured to directly store the machine form data corresponding to all form images in the updated form image set if the text information is correct.
[0058] It should be understood that Figure 2 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects are also applicable to Figure 2 The modules in it will not be described in detail here.
[0059] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor is caused to execute the tool form data processing method for electric power construction in any of the above method embodiments;
[0060] As an implementation mode, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0061] Acquire each tool form data to be processed, wherein each tool form data includes at least one form image;
[0062] Dividing each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only includes at least one form image in the same size range;
[0063] Constructing a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window;
[0064] Acquire the actual size of a text interval of a form image in the form image set within a preset area based on a preset matching rule, and determine whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range;
[0065] If the first difference is not within the preset threshold range, obtaining other preset sizes in other interception templates corresponding to other form image sets, and continuing to determine whether the second difference between the actual size of the text interval and the other preset sizes is within the preset threshold range;
[0066] If the second difference is not within the preset threshold range, the form image is defined as an abnormal form image, and the abnormal form image is removed from the form image set to obtain an updated form image set;
[0067] Selecting any form image from a certain form image set after update, and judging whether the text information in any form image is correct according to the preset image recognition model;
[0068] If the text information is correct, the machine form data corresponding to all the form images in the updated form image set are directly stored.
[0069] The computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the tool form data processing system for electric power construction, etc. In addition, the computer-readable storage medium may include a high-speed random access memory, and may also include a memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the tool form data processing system for electric power construction via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0070] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 3 In the example, the connection through the bus is taken as an example. The memory 320 is the above-mentioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the machine form data processing method for power construction of the above-mentioned method embodiment is implemented. The input device 330 can receive input digital or character information, and generate key signal input related to user settings and function control of the machine form data processing system for power construction. The output device 340 may include display devices such as display screens.
[0071] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0072] As an embodiment, the electronic device is applied to a tool form data processing system for electric power construction, and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0073] Acquire each tool form data to be processed, wherein each tool form data includes at least one form image;
[0074] Dividing each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only includes at least one form image in the same size range;
[0075] Constructing a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window;
[0076] Acquire the actual size of a text interval of a form image in the form image set within a preset area based on a preset matching rule, and determine whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range;
[0077] If the first difference is not within the preset threshold range, obtaining other preset sizes in other interception templates corresponding to other form image sets, and continuing to determine whether the second difference between the actual size of the text interval and the other preset sizes is within the preset threshold range;
[0078] If the second difference is not within the preset threshold range, the form image is defined as an abnormal form image, and the abnormal form image is removed from the form image set to obtain an updated form image set;
[0079] Selecting any form image from a certain form image set after update, and judging whether the text information in any form image is correct according to the preset image recognition model;
[0080] If the text information is correct, the machine form data corresponding to all the form images in the updated form image set are directly stored.
[0081] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing machine tool form data for electric power construction, characterized in that: include: Acquire each tool form data to be processed, wherein each tool form data includes at least one form image; Dividing each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only includes at least one form image in the same size range; Constructing a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window; Acquire the actual size of a text interval of a form image in the form image set within a preset area based on a preset matching rule, and determine whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range; If the first difference is not within the preset threshold range, obtaining other preset sizes in other interception templates corresponding to other form image sets, and continuing to determine whether the second difference between the actual size of the text interval and the other preset sizes is within the preset threshold range; If the second difference is not within the preset threshold range, the form image is defined as an abnormal form image, and the abnormal form image is removed from the form image set to obtain an updated form image set; Selecting any form image from a certain form image set after update, and judging whether the text information in any form image is correct according to the preset image recognition model; If the text information is correct, the machine form data corresponding to all the form images in the updated form image set are directly stored.
2. A method for processing machine tool form data for electric power construction according to claim 1, characterized in that: The step of dividing each form image according to a preset clustering rule to obtain at least one form image set comprises: The size of each form image is obtained, and at least one form image in the same size range is divided into a form image set to obtain at least one form image set.
3. A method for processing machine tool form data for electric power construction according to claim 1, characterized in that: The target form image in a certain form image set is a form image with the largest size in the certain form image set; The step of constructing a first interception template corresponding to a certain form image set according to a target form image in a certain form image set comprises: Performing image binarization processing on a preset area of a target form image in the certain form image set to obtain a target text interval of the target form image in the preset area; A first background image having the same size as the target form image is cropped, and a window having the same position and size as the target text interval is cropped again from the cropped first background image, thereby obtaining a first clipping template corresponding to a certain form image set.
4. A method for processing machine tool form data for electric power construction according to claim 1, characterized in that: The obtaining, based on a preset matching rule, the actual size of a text section of a form image in the form image set within a preset area comprises: Performing image binarization processing on a preset area of the form image to obtain a text interval of the form image in the preset area, wherein the text interval is composed of two long sides and two short sides; Overlapping the form image with the first interception template, and overlapping the first long side and the first short side of the text interval with the long side and the short side of the window in the first interception template respectively; Slide the window along the first long side for a first time until the other long side of the window overlaps with the second long side, thereby obtaining a first sliding distance; and slide the window along the first short side for a second time until the other short side of the window overlaps with the second short side, thereby obtaining a second sliding distance; The actual length of the text interval is determined according to the first sliding distance and the length of a long side of the window, and the actual width of the text interval is determined according to the second sliding distance and the length of a short side of the window to obtain the actual size of the text interval.
5. A method for processing machine tool form data for electric power construction according to claim 1, characterized in that: The determining whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range includes: It is determined whether a first length difference between an actual length of the text interval and the first preset length is within a first preset threshold range, and whether a first width difference between an actual width of the text interval and the first preset width is within a second preset threshold range.
6. A method for processing machine tool form data for electric power construction according to claim 1, characterized in that: After determining whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range, the method further includes: If the first difference is within the preset threshold range, the certain form image is directly defined as a normal form image and retained in the certain form image set.
7. A method for processing machine tool form data for electric power construction according to claim 1, characterized in that: After continuing to determine whether a second difference between the actual size of the text interval and the other preset size is within a preset threshold range, the method further includes: If the second difference is within the preset threshold range, the certain form image is defined as a normal form image and retained in the certain form image set.
8. A machine tool form data processing system for electric power construction, characterized in that: include: An acquisition module is configured to acquire each tool form data to be processed, wherein a tool form data includes at least one form image; A division module, configured to divide each form image according to a preset clustering rule to obtain at least one form image set, wherein a form image set only includes at least one form image in the same size range; A construction module is configured to construct a first interception template corresponding to a certain form image set according to a target form image in a certain form image set, wherein the first interception template is a first background image with a window of a first preset size opened in a preset area, and the first preset size includes a first preset length and a first preset width of the window; a first judgment module configured to obtain an actual size of a text interval of a form image in the form image set within a preset area based on a preset matching rule, and to judge whether a first difference between the actual size of the text interval and the first preset size is within a preset threshold range; a second judgment module configured to obtain other preset sizes in other interception templates corresponding to other form image sets if the first difference is not within a preset threshold range, and continue to judge whether a second difference between the actual size of the text interval and the other preset sizes is within a preset threshold range; an updating module configured to define the certain form image as an abnormal form image if the second difference is not within a preset threshold range, and remove the abnormal form image from the certain form image set to obtain an updated certain form image set; A third judgment module is configured to select any form image from a certain form image set after update, and judge whether the text information in any form image is correct according to the preset image recognition model; The storage module is configured to directly store the machine form data corresponding to all the form images in the updated form image set if the text information is correct.
9. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Form identification method and system based on two-dimensional code positioning
CN112966537A
Information extraction method and device and electronic equipment
CN115223183A
Handwritten form automatic identification method and system based on deep learning
CN118135584A
Systems and methods for processing mobile images to identify and extract content from forms
US20130294697A1
Data extraction from form images
US20200272814A1
