Method, device and storage medium for generating table in image combining RPA and AI
By combining RPA and AI, identifying and generating tables in images, the problem of not being able to automatically extract table information in the prior art is solved, and work efficiency is improved.
Patent Information
- Application Number
- CN202010863736.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-25
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2040-08-25
AI Technical Summary
In the prior art, image recognition technology cannot effectively extract table information in images, resulting in users needing to manually construct tables, reducing work efficiency.
Combining RPA and AI, by identifying the row position, column position and content information of the image table in the image, determining the rendering position, generating corresponding table cells, and filling in the table cells with content information, realizing the accurate extraction of the image table.
It improves the work efficiency of table editing and other scenarios, and realizes the precise extraction and generation of tables in the image.
Smart Images

Figure CN112149506B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and specifically to a method, device and storage medium for generating a table in an image that combines RPA (Robotic Process Automation) and AI (Artificial Intelligence). Background Art
[0002] Robotic Process Automation (RPA) uses specific "robot software" to simulate human operations on computers and automatically execute process tasks according to rules.
[0003] Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. Artificial Intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems.
[0004] In the prior art, in order to improve work efficiency, text information in an image is usually extracted based on image recognition technology, and the extracted text information is copied. However, this method of only extracting text cannot retain the positional relationship of the text on the image. For example, when the image contains table information, the table in the image cannot be obtained. Therefore, the user needs to manually compare the image to construct the table, resulting in low work efficiency. Summary of the invention
[0005] The embodiments of the present application apply for a method, device and storage medium for generating a table in an image that combines RPA and AI, thereby achieving accurate extraction of tables in images and improving work efficiency in scenarios such as table editing.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a table in an image by combining RPA and AI, including: identifying the row position, column position, and content information of each picture cell in a picture table in an image; determining the rendering position of each picture cell according to the row position and column position; rendering and generating a table cell corresponding to each picture cell according to the rendering position; and filling the content information of the corresponding picture cell in the table cell to generate a table corresponding to the picture table.
[0007] Optionally, the identifying of the row position, column position and content information of each picture cell in the picture table in the image includes: identifying the contour features and content features of the icon table; determining the row position and column position of each picture cell according to the contour features; and determining the content information according to the content features.
[0008] Optionally, determining the rendering position of each image cell according to the row position and the column position includes: obtaining a rendering starting point, a unit row height, and a unit column height; and determining a rendering row position corresponding to the row position, and a rendering column position corresponding to the column position according to the rendering starting point, the unit row height, and the unit column height.
[0009] Optionally, before determining the rendering row position corresponding to the row position and the rendering column position corresponding to the column position, it also includes: counting the number of bytes contained in the content information; determining whether the number of bytes exceeds a preset threshold; if it exceeds the preset threshold, calculating the difference between the number of bytes and the preset threshold; determining a row width growth value and / or a column height growth value corresponding to the difference, and adjusting the bit row height and unit column height according to the row width growth value and / or the column height growth value.
[0010] Optionally, determining the rendering position of each image cell according to the row position and the column position includes: extracting a starting row number and an ending row number of the row position, and extracting a starting column number and an ending column number of the column position.
[0011] Optionally, the rendering and generating table cells corresponding to each image cell according to the rendering position includes: determining the cell row starting position of the table cell corresponding to each image cell according to the starting row number; determining the cell row ending position of the table cell corresponding to each image cell according to the ending row number; determining the cell column starting position of the table cell corresponding to each image cell according to the starting column number; determining the cell column ending position of the table cell corresponding to each image cell according to the ending column number; and rendering and generating table cells corresponding to each image cell according to the cell row starting position, the cell row ending position, the cell column starting position and the cell column ending position.
[0012] In the second aspect, an embodiment of the present application also provides a device for generating a table in an image that combines RPA and AI, including: an identification module for identifying the row position, column position and content information of each picture cell in a picture table in an image; a determination module for determining the rendering position of each picture cell according to the row position and column position; a generation module for rendering and generating a table cell corresponding to each picture cell according to the rendering position; and a filling module for filling the content information of the corresponding picture cell in the table cell to generate a table corresponding to the picture table.
[0013] Optionally, the determination module is specifically used to: obtain a rendering starting point, a unit row height, and a unit column height;
[0014] The rendering row position corresponding to the row position and the rendering column position corresponding to the column position are determined according to the rendering starting point, the unit row height and the unit column height.
[0015] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory and a processor; wherein the memory is used to store executable instructions of the processor, and when the instructions are executed by the processor, the processor executes the method of the first aspect above.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect above.
[0017] The technical solution in the embodiment of the present application includes at least the following beneficial technical effects:
[0018] Identify the row position, column position and content information of each picture cell in the picture table in the image, determine the rendering position of each picture cell according to the row position and column position, and then render and generate table cells corresponding to each picture cell according to the rendering position, and finally fill the content information of the corresponding picture cell in the table cell to generate a table corresponding to the picture table. In this way, the table in the image is accurately extracted, and the work efficiency of the table editing and other scenes is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1is a flowchart of a method for generating a table in an image combining RPA and AI according to an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a picture cell according to an embodiment of the present application;
[0022] Figure 3 is a flowchart of a method for generating a table in an image combining RPA and AI according to another embodiment of the present application;
[0023] Figure 4 This is a schematic diagram of a table generation scenario in an image combining RPA and AI according to an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a table generation scenario in an image combining RPA and AI according to another embodiment of the present application;
[0025] Figure 6 is a flowchart of a method for generating a table in an image combining RPA and AI according to yet another embodiment of the present application;
[0026] Figure 7 is a schematic diagram of a table generation scenario in an image combining RPA and AI according to yet another embodiment of the present application;
[0027] Figure 8 is a structural schematic diagram of a table generation device in an image combining RPA and AI according to an embodiment of the present application; and
[0028] Fig. 9 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0031] The following describes a method, device, and storage medium for generating a table in an image combining RPA and AI in an embodiment of the present application with reference to the accompanying drawings.
[0032] Specifically, Figure 1 is a flowchart of a method for generating a table in an image by combining RPA and AI according to an embodiment of the present application. Figure 1 As shown, the method includes:
[0033] Step 101, identifying the row position, column position and content information of each picture cell in a picture table in an image.
[0034] In this embodiment, OCR technology can be used to identify the row position, column position and content information of each picture cell in the picture table in the image, wherein the row position and column position may include the row number and column number of each picture cell, or the row coordinates and column coordinates of the cell outer frame, etc., wherein, Figure 2 As shown, each picture cell is each cell in the image.
[0035] As a possible implementation method, the outline features and content features of the icon table are identified, where the outline features can be identified based on image processing technologies such as binarization, and the outline features include the coordinate information of the outer contour of the cell, etc. The content features can be text content identified based on OCR technology, as well as the coordinate information of the text content, etc.
[0036] Furthermore, the row position and column position of each image cell are determined according to the contour features. The row position and column position can be understood as the sequential number of the row corresponding to the contour line of each image cell in the row contour lines corresponding to the contour features in all the identified image cells, or the coordinate position of the row contour in the image, etc. Similarly, the sequential number of the column corresponding to the column contour of each image cell in the column contour lines corresponding to the contour features in all the identified image cells, or the coordinate position of the column contour in the image, etc.
[0037] Content information is determined according to the content feature, and the content information includes text content corresponding to the coordinate information of the content.
[0038] As another possible implementation method, a table recognition model may be pre-trained, and the row position, column position and content information of each image cell may be extracted based on the table recognition model.
[0039] Step 102, determining the rendering position of each image cell according to the row position and the column position.
[0040] It should be understood that when the row position and column position are determined, the cell layout in the picture table is clearly reflected, and thus the rendering position of each picture cell can be determined according to the row position and column position.
[0041] It should be noted that in different application scenarios, the method of determining the rendering position of each image cell according to the row position and column position is different. The examples are as follows:
[0042] As a possible implementation, Figure 3 As shown, the rendering position of each image cell is determined according to the row position and column position, including:
[0043] Step 201, obtain the rendering starting point, unit row height and unit column height.
[0044] Among them, the rendering starting point can be understood as the coordinate starting point where the table can be filled in the current working scene. For example, when the working scene is to draw a corresponding table on the front end of the web page, the rendering starting point is the table insertion starting point that matches the page layout under the corresponding page, where the unit row height and unit column height are the default row height and column height in the current working scene.
[0045] The above rendering starting point corresponds to two extension directions, one is the extension direction of the column, and the other is the extension direction of the row.
[0046] Step 202 : Determine the rendering row position corresponding to the row position and the rendering column position corresponding to the column position according to the rendering starting point, the unit row height, and the unit column height.
[0047] In this embodiment, the rendering row position corresponding to the row position and the rendering column position corresponding to the column position are determined according to the rendering starting point, the unit row height and the unit column height.
[0048] like Figure 4 As shown, when the row position is a row number, the row number corresponding to the row position can be determined. For example, if the row position is a row number, the corresponding row number is 1. The column position is a column number. For example, if the column position is 1, the rendered row position is determined to be the first row and the rendered column position is the first column.
[0049] Of course, in this embodiment, the row numbering may also be multiple rows, such as row numbering 1-2, column numbering 1-3, and the rendering row position and the rendering column position are as follows: Figure 5 shown.
[0050] In the actual implementation process, when there is a lot of content information, it is obvious that drawing a table with pre-set unit row height and unit column height will cause the content information to be displayed unsafely. Therefore, in one fact of the present application, the unit row height and unit column height of the corresponding cell can also be adjusted according to the content information.
[0051] In this embodiment, if Figure 6 As shown, before determining the rendering row position corresponding to the row position and the rendering column position corresponding to the column position, the following is also included:
[0052] Step 301: Count the number of bytes included in the content information.
[0053] In this embodiment, after the content information is acquired, the number of bytes included in the content information is determined.
[0054] Step 302, determining whether the number of bytes exceeds a preset threshold.
[0055] The above-mentioned preset threshold can be understood to correspond to the size of the display area of one row and one column. For example, when the table cell is not one row and one column, the ratio of the occupied area to the display area of one row and one column is obtained by multiplying the ratio by the preset unit preset threshold of one row and one column.
[0056] Step 303: If it exceeds the preset threshold, the difference between the number of bytes and the preset threshold is calculated.
[0057] In this embodiment, if the preset threshold is not exceeded, the row height and column height are not adjusted.
[0058] If it exceeds the preset threshold, the difference between the number of bytes and the preset threshold is calculated to adjust the row height or column height according to the difference.
[0059] Step 304, determine the row width growth value and / or the column height growth value corresponding to the difference, adjust the unit row height according to the row width growth value, and / or adjust the unit column height according to the column height growth value.
[0060] In this embodiment, a row width growth value and / or a column height growth value corresponding to the difference is determined, and the row height and / or the unit column height is adjusted according to the row width growth value and / or the column height growth value.
[0061] It should be noted that in different application scenarios, the methods for determining the row width growth value and / or the column height growth value corresponding to the difference are different, as shown in the following examples:
[0062] Example 1:
[0063] In this example, in order to ensure the display effect of the table, the unit row width and unit column height are adjusted at the same time, that is, the difference range and the growth value of the unit row width and unit column height are pre-constructed, wherein the growth value of the unit row width and the growth value of the unit column height can be the same or different, and can be customized by the user. Then, the above-mentioned pre-constructed relationship is queried to determine the growth value of the unit row width and unit column height.
[0064] Example 2:
[0065] In this example, in order to meet personalized table requirements, it can be determined whether the difference belongs to the preset first range or the second range. If it belongs to the first range, the preset first corresponding relationship is queried to determine the row width growth value corresponding to the difference, and only the row width is adjusted. If the difference belongs to the preset second range, the preset second corresponding relationship is queried to determine the column height growth value corresponding to the difference.
[0066] As another possible implementation, the starting row number and the ending row number in the row position are extracted, and the starting column number and the ending column number in the column position are extracted, wherein the determination method of the row number and the column number can refer to the above embodiment and will not be repeated here. The row number and the column number are obtained based on the contour features of the image cell based on the image recognition technology.
[0067] In this embodiment, the rows and columns spanned by each image cell in the corresponding table are identified. According to the minimum row number and the maximum row number spanned, the number of rows spanned by the corresponding image cell can be obtained. Similarly, according to the minimum column number and the maximum column number spanned, the number of columns spanned by the corresponding image cell can be obtained. Figure 7 As shown, for the picture table 1, the display area of each cell can be determined according to the contour features, the cell with the smallest display area is used as the unit cell of the picture table, the column height of the unit cell is used as the reference unit column height, and the row width of the unit cell is used as the reference unit row width to determine the actual row width and actual column height of each picture cell, and then, the starting row number, ending row number, starting column number and ending column number are determined for the boundary contour line of each picture cell and the corresponding reference unit column height and reference unit row width.
[0068] Continue with Figure 7 For example, for picture cell A, the width between its upper border 1 and the upper border of the picture table is a, the width between its lower border 2 and the upper border of the picture table is b, the width between its left border 3 and the left border of the picture table is c, and the width between its right border 4 and the right border of the picture table is d. The ratio of a to the reference unit row width is used as the starting row number, the ratio of b to the reference unit row width is used as the ending row number, the ratio of c to the reference unit column width is used as the starting column number, and the ratio of d to the reference unit column width is used as the ending column number.
[0069] Step 103, generating a table cell corresponding to each image cell by rendering according to the rendering position.
[0070] After the rendering position is determined, a table cell corresponding to each image cell is generated by rendering according to the rendering position.
[0071] As a possible implementation method, when the rendering position is the row number and column number mentioned above, the cell row starting position of the table cell corresponding to each image cell is determined according to the starting row number. For example, the row starting drawing position and the starting positions from the first row to the bottom N rows are marked in advance, where N is the total number of rows in the image table. Thus, according to the preset marked starting position of each row, the starting position corresponding to the starting row number is determined as the cell row starting position.
[0072] Furthermore, according to the start position of each row marked by the preset mark, the start position corresponding to the end row number is determined as the end position of the cell row.
[0073] The starting positions from the first column to the bottom M columns are also marked in advance, where M is the total number of columns in the picture table. Therefore, according to the starting position of each column marked in advance, the starting position corresponding to the starting column number is determined as the starting position of the cell column.
[0074] Furthermore, according to the start position of each column marked by the preset mark, the start position corresponding to the end column number is determined as the end position of the cell column.
[0075] Then, according to the cell row start position, the cell row end position, the cell column start position and the cell column end position, a table cell corresponding to each image cell is rendered and generated.
[0076] Among them, in order to further improve the rendering efficiency of the table, it is also possible to record the table rendered row by row, determine whether the end column number of the currently rendered table cell is M, and whether the end row number is N, etc. If it is M, but not N, switch the row to render the next column of the table, etc. Among them, when rendering table cells, for table cells spanning multiple rows or columns, a merge operation is performed to retain only the outermost contour lines of the cells.
[0077] Step 104, filling the table cells with the content information of the corresponding picture cells to generate a table corresponding to the picture table.
[0078] As mentioned above, the content information corresponds to the picture cell, so the content information corresponding to the picture cell is filled in the table cell to generate a table corresponding to the picture table. Since the table is no longer in picture format, it can meet the editing requirements of the table, greatly improving work efficiency.
[0079] It should be noted that in this embodiment, specific content information is filled in after rendering a specific table unit, which will not cause the content information to be overwritten, and in actual applications, the OCR data can be converted into a table in the front-end visualization page. This table recognition method is simple to implement in the code, and the implementation cost is low as long as the employees master the method. This method is applicable to all OCR recognition data, solving the problem that the front end could not generate certain specific forms of tables. Enterprises can use this table recognition technology to efficiently and universally generate all table pages.
[0080] In summary, the table generation method in an image that combines RPA and AI in the embodiment of the present application identifies the row position, column position and content information of each picture cell in the picture table in the image, determines the rendering position of each picture cell according to the row position and column position, and then generates a table cell corresponding to each picture cell according to the rendering position, and finally fills the content information of the corresponding picture cell in the table cell to generate a table corresponding to the picture table. In this way, the accurate extraction of the table in the image is achieved, and the work efficiency of the editing of the table and other scenes is improved.
[0081] In order to implement the above embodiments, the present application also proposes a table generation device in an image that combines RPA and AI. Figure 8 is a structural diagram of a table generation device in an image combining RPA and AI according to an embodiment of the present application, such as Figure 8 As shown, the table generation device in the image combining RPA and AI includes: an identification module 810, a determination module 820, a generation module 830 and a filling module 840, wherein:
[0082] An identification module 810 is used to identify the row position, column position and content information of each picture cell of the picture table in the image;
[0083] A determination module 820, configured to determine a rendering position of each image cell according to the row position and the column position;
[0084] A generating module 830, configured to generate a table cell corresponding to each image cell by rendering according to the rendering position;
[0085] The filling module 840 is used to fill the table cells with the content information of the corresponding picture cells to generate a table corresponding to the picture table.
[0086] In one embodiment of the present application, the determination module 820 is specifically configured to:
[0087] Get the rendering starting point, unit row height, and unit column height;
[0088] The rendering row position corresponding to the row position and the rendering column position corresponding to the column position are determined according to the rendering starting point, the unit row height and the unit column height.
[0089] It should be noted that the aforementioned explanation of the method is also applicable to the explanation of the device in the embodiment of the present application. The implementation principles are similar and will not be repeated here.
[0090] In summary, the table generation device in the image combined with RPA and AI in the embodiment of the present application identifies the row position, column position and content information of each picture cell in the picture table in the image, determines the rendering position of each picture cell according to the row position and column position, and then generates a table cell corresponding to each picture cell according to the rendering position, and finally fills the content information of the corresponding picture cell in the table cell to generate a table corresponding to the picture table. In this way, the accurate extraction of the table in the image is achieved, and the work efficiency of the editing of the table and other scenes is improved.
[0091] Fig. 9 9 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 90 includes a memory 91 and a processor 92; wherein the memory 91 is used to store executable instructions of the processor 52, and when the instructions are executed by the processor 92, the processor 92 executes the method provided in the above method embodiment.
[0092] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the above method embodiment.
[0093] It should be noted that the computer-readable storage medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable storage medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0094] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0095] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0096] The computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0097] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0098] The units involved in the embodiments described in the present application may be implemented by software or hardware. The name of the unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0099] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0100] In the context of the present application, a machine-readable storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable storage medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.
[0102] In addition, although each operation is described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or to be performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the application. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0103] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
[0104] In order to make the purpose, technical solution and advantages of this embodiment clearer, the technical solution in the embodiment of this application will be clearly and completely described below in conjunction with the drawings in the embodiment of this application. Obviously, the described embodiment is a part of the embodiment of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
Claims
1. A method for generating a table in an image by combining RPA and AI, characterized in that: include: Identify the row position, column position and content information of each image cell of the image table in the image; Determine the rendering position of each image cell according to the row position and the column position; Generating a table cell corresponding to each image cell by rendering according to the rendering position; Filling the table cells with the content information of the corresponding picture cells to generate a table corresponding to the picture table; The row position, column position and content information of each picture cell in the picture table in the identified image include: Identify the outline features and content features of the picture table, wherein the outline features include coordinate information of the outer outline of the cell; Determine the row position and column position of each image cell according to the contour feature; Determining the content information according to the content feature; The determining the rendering position of each image cell according to the row position and the column position includes: Get the rendering starting point, unit row height and unit column height, wherein the unit row height and the unit column height are the default row height and column height in the current working scenario; The rendering row position corresponding to the row position and the rendering column position corresponding to the column position are determined according to the rendering starting point, the unit row height and the unit column height.
2. The method according to claim 1, characterized in that Before determining the rendering row position corresponding to the row position and the rendering column position corresponding to the column position, the method further includes: Counting the number of bytes included in the content information; Determining whether the number of bytes exceeds a preset threshold; If it exceeds the preset threshold, the difference between the number of bytes and the preset threshold is calculated; Determine a row width growth value and / or a column height growth value corresponding to the difference, adjust the unit row height according to the row width growth value, and / or adjust the unit column height according to the column height growth value.
3. The method according to claim 1, characterized in that The determining the rendering position of each image cell according to the row position and the column position includes: The starting row number and the ending row number of the row position are extracted, and the starting column number and the ending column number of the column position are extracted.
4. The method according to claim 3, characterized in that The generating a table cell corresponding to each image cell according to the rendering position rendering includes: Determine the cell row starting position of the table cell corresponding to each image cell according to the starting row number; Determine the cell row end position of the table cell corresponding to each image cell according to the end row number; Determine the starting position of the cell column of the table cell corresponding to each image cell according to the starting column number; Determine the cell column end position of the table cell corresponding to each image cell according to the end column number; According to the cell row starting position, the cell row ending position, the cell column starting position and the cell column ending position, a table cell corresponding to each of the image cells is rendered and generated.
5. A table generation device in an image combining RPA and AI, characterized in that: include: A recognition module, used to recognize the row position, column position and content information of each picture cell of the picture table in the image; A determination module, used to determine the rendering position of each image cell according to the row position and the column position; A generating module, used for generating a table cell corresponding to each image cell by rendering according to the rendering position; A filling module, used to fill the table cells with the content information of the corresponding picture cells to generate a table corresponding to the picture table; Wherein, the identification module is specifically used for: Identify the outline features and content features of the picture table, wherein the outline features include coordinate information of the outer outline of the cell; Determine the row position and column position of each image cell according to the contour feature; Determining the content information according to the content feature; The determination module is specifically used for: Get the rendering starting point, unit row height and unit column height, where the unit row height and the unit column height are the default row height and column height in the current working scenario; The rendering row position corresponding to the row position and the rendering column position corresponding to the column position are determined according to the rendering starting point, the unit row height and the unit column height.
6. A computer device, characterized in that: include: Memory and processor; The memory is used to store executable instructions of the processor. When the instructions are executed by the processor, the processor executes the table generation method in an image combining RPA and AI as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for generating a table in an image combining RPA and AI as described in any one of claims 1 to 4.