Methods and apparatus for generating online forms, storage media and electronic devices
By performing character recognition and delimiter generation on the target image, the problem of complex and low-accuracy online table generation is solved, and fast and accurate online table generation is achieved.
Patent Information
- Application Number
- CN202210148469.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-17
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-02-17
AI Technical Summary
Existing technologies for generating online forms are complex, have low recognition accuracy, and cannot identify form boundaries, resulting in low accuracy in content recognition.
By acquiring cells and border lines in the target image, character recognition is performed to generate a set of character recognition results and separators. Based on these results and separators, an online table is generated, which includes concatenating character recognition results and separators row by row or column by column.
It enables the rapid and accurate conversion of captured images into online tables, improving the recognition accuracy of online tables and optimizing the generation method.
Smart Images

Figure CN116663510B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for generating online forms, a storage medium, and an electronic device. Background Technology
[0002] Currently, common character recognition methods generally include OCR (Optical Character Recognition) pattern recognition. The recognition process typically involves selecting the area containing the character to be recognized, performing OCR recognition to obtain all the characters that can be recognized in the selected area, and then copying the recognized characters to the clipboard. When the user needs to use the above text in other documents, they still need to re-enter it in other documents separately by pasting or other means.
[0003] In other words, the related technologies have technical problems such as low input efficiency and complex operation process when re-entering the recognized text into online documents. In the process of recognizing tables, the boundaries of the tables cannot be identified, resulting in low accuracy of the recognized content.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides a method and apparatus for generating online forms, a storage medium, and an electronic device to at least solve the technical problems of complex online form generation methods and low recognition accuracy in related technologies.
[0006] According to one aspect of the embodiments of this application, a method for generating an online table is provided, comprising: acquiring a target image sent by a target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between the adjacent cells; performing character recognition on the target image to obtain a set of character recognition results and a set of separators, wherein the set of character recognition results includes character recognition results obtained by performing character recognition on each cell in the set of cells displayed in the target image, and the set of separators includes separators obtained by performing character recognition on the border lines displayed in the target image, the set of separators being used to separate adjacent character recognition results in the set of character recognition results; generating an online table based on the set of character recognition results and the set of separators, wherein the online table includes the set of character recognition results arranged according to the set of separators.
[0007] According to another aspect of the embodiments of this application, an online table generation apparatus is also provided, comprising: an acquisition module, configured to acquire a target image sent by a target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between the adjacent cells; a recognition module, configured to perform character recognition on the target image to obtain a set of character recognition results and a set of separators, wherein the set of character recognition results includes character recognition results obtained by performing character recognition on each cell in the set of cells displayed in the target image, and the set of separators includes separators obtained by performing character recognition on the border lines displayed in the target image, and the set of separators is used to separate adjacent character recognition results in the set of character recognition results; and a generation module, configured to generate an online table based on the set of character recognition results and the set of separators, wherein the online table includes the set of character recognition results arranged according to the set of separators.
[0008] Optionally, the device is configured to generate an online table based on the set of character recognition results and the set of separators in the following manner: concatenating the set of character recognition results and the set of separators line by line to obtain a first set of sequences, wherein each sequence in the first set of sequences is a sequence concatenated based on a corresponding row of recognition information from the set of character recognition results and the set of separators, the corresponding row of recognition information including character recognition results obtained by character recognition of a corresponding row cell and the border lines between the row cells in the target table, and separators, the number of sequences in the first set of sequences being equal to the number of rows in the target table. The online table is generated based on the first set of sequences, or the character recognition results and the separators are concatenated column by column to obtain a second set of sequences. Each sequence in the second set of sequences is a sequence concatenated based on a corresponding column of recognition information from the character recognition results and the separators. The corresponding column of recognition information includes character recognition results and separators obtained by character recognition of a corresponding column of cells and the border lines between the cells in the target table. The number of sequences in the first set of sequences is the same as the number of columns in the target table. The online table is generated based on the second set of sequences.
[0009] Optionally, the device is used to concatenate the set of character recognition results and the set of separators line by line in the following manner: For each line of recognition information in the set of character recognition results and the set of separators, the following steps are performed, wherein, when performing the following steps, each line of recognition information is the current line of recognition information: obtaining the current line of recognition information from the set of character recognition results and the set of separators, wherein the current line of recognition information includes character recognition results and separators obtained by character recognition of the current line cell and the border lines between the current line cells in the target table; the current line of recognition information contains characters indicating that no characters were recognized. In the case of character recognition results, delete the character recognition results indicating that no character was recognized in the current row of recognition information to obtain the target row of recognition information; according to the arrangement order determined by the character recognition, concatenate the character recognition results and the separator in the target row of recognition information to obtain the sequence in the first group of sequences corresponding to the current row cell; if there are no character recognition results indicating that no character was recognized in the current row of recognition information, concatenate the character recognition results and the separator in the current row of recognition information according to the arrangement order determined by the character recognition to obtain the sequence in the first group of sequences corresponding to the current row cell.
[0010] Optionally, the device is used to generate the online table based on the first set of sequences in the following manner: according to the delimiter in each sequence of the first set of sequences, the character recognition result in each sequence is written into the corresponding cell in a preset online table template to obtain the online table.
[0011] Optionally, the device is configured to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the first group of sequences, thereby obtaining the online table: For each sequence in the first group of sequences, the following steps are performed, wherein each sequence is the current sequence: determining the current row cell corresponding to the current sequence in the online table template, wherein the current row cell corresponding to the current sequence is the next row cell of the target row cell, and the target row cell is the row cell corresponding to the previous sequence of the current sequence; writing the content between every two delimiters in the current sequence into the cell of the current row cell according to the arrangement order in the current sequence, wherein when the content between two delimiters in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the cell corresponding to the current row cell; when the content between two delimiters in the current sequence is empty, the cell corresponding to the current row cell is set to empty.
[0012] Optionally, the device is used to write the character recognition result of each sequence in the first set of sequences into the corresponding cell of a preset online table template according to the delimiter in each sequence, to obtain the online table: For each sequence in the first set of sequences, the following steps are performed, wherein each sequence is the current sequence when performing the following steps: determining the starting cell corresponding to the current sequence in the online table template, wherein the starting cell is the j-th cell in the i-th row of the online table template, the number of cells that can be written to in each row of the online table template is N, and the starting cell corresponding to the current sequence is the next cell after the target cell, wherein the target cell is the next cell after the target cell. The label cell is the ending cell corresponding to the previous sequence of the current sequence, and i, j, and N are positive integers greater than or equal to 1. Starting from the starting cell, according to the arrangement order in the current sequence, the content between every two separators in the current sequence is written line by line into the corresponding cells in the online table template that allow data to be written. When the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online table template that allows data to be written. When the content between two separators in the current sequence is empty, the corresponding cell in the online table template that allows data to be written is set to empty.
[0013] Optionally, the device is used to concatenate the set of character recognition results and the set of separators column by column in the following manner: For each column of recognition information in the set of character recognition results and the set of separators, the following steps are performed, wherein, when performing the following steps, each column of recognition information is the current column of recognition information: obtaining the current column of recognition information from the set of character recognition results and the set of separators, wherein the current column of recognition information includes character recognition results and separators obtained by character recognition of the current column cells and the border lines between the current column cells in the target table; the current column of recognition information contains characters indicating that no characters were recognized. If the character recognition result is not found, delete the character recognition result indicating that no character was recognized in the current column of recognition information to obtain the target column of recognition information; according to the arrangement order determined by the character recognition, concatenate the character recognition result and the separator in the target column of recognition information to obtain the sequence in the second group sequence corresponding to the cell in the current column; if there is no character recognition result indicating that no character was recognized in the current column of recognition information, concatenate the character recognition result and the separator in the current column of recognition information according to the arrangement order determined by the character recognition to obtain the sequence in the second group sequence corresponding to the cell in the current column.
[0014] Optionally, the device is used to generate the online table based on the second set of sequences in the following manner: according to the delimiter in each sequence of the second set of sequences, the character recognition result in each sequence is written into the corresponding cell in a preset online table template to obtain the online table.
[0015] Optionally, the device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the second group of sequences, to obtain the online table: For each sequence in the second group of sequences, the following steps are performed, wherein each sequence is the current sequence: determining the current column cell corresponding to the current sequence in the online table template, wherein the current column cell corresponding to the current sequence is the next column cell of the target column cell, and the target column cell is the column cell corresponding to the previous sequence of the current sequence; writing the content between every two delimiters in the current sequence into the cell of the current column cell according to the arrangement order in the current sequence, wherein when the content between two delimiters in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current column cell, and when the content between two delimiters in the current sequence is empty, the corresponding cell of the current column cell is set to empty.
[0016] Optionally, the device is used to write the character recognition result of each sequence in the second set of sequences into the corresponding cell of a preset online table template according to the delimiter in each sequence, thereby obtaining the online table: For each sequence in the second set of sequences, the following steps are performed, wherein each sequence is the current sequence when performing the following steps: determining the starting cell corresponding to the current sequence in the online table template, wherein the starting cell is the i-th cell in the j-th column of the online table template, the number of cells in each column of the online table template that can be written with data is M, and the starting cell corresponding to the current sequence is the next cell of the target cell, wherein the target cell is the next cell of the target cell. The label cell is the ending cell corresponding to the previous sequence of the current sequence, and i, j, and M are positive integers greater than or equal to 1. Starting from the starting cell, according to the arrangement order in the current sequence, the content between every two separators in the current sequence is written column by column into the corresponding cells in the online table template that allow data to be written. When the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online table template that allows data to be written. When the content between two separators in the current sequence is empty, the corresponding cell in the online table template that allows data to be written is set to empty.
[0017] Optionally, the device is used to perform character recognition on the target image in the following manner to obtain a set of character recognition results and a set of separators: performing optical character recognition on each cell in the set of cells displayed in the target image to obtain the set of character recognition results; performing optical character recognition on the left border line and / or right border line of each cell displayed in the target image, and converting the recognized results into the separators to obtain the set of separators.
[0018] Optionally, the device is further configured to: push target prompt information to the group of accounts when the online form is set to allow a group of accounts to edit the online form online, wherein the target prompt information is used to prompt that the online form has been generated; in response to a first online editing instruction from a first account in the group of accounts, edit the online form online to obtain an edited first form, wherein the first form is set to allow the group of accounts to edit the first form online; and in response to a second online editing instruction from a second account in the group of accounts, edit the first form online to obtain an edited second form, wherein the second form is set to allow the group of accounts to edit the second form online.
[0019] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, which is configured to execute the above-described method for generating online forms when it is run.
[0020] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the online table generation method as described above.
[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described method for generating online forms through the computer program.
[0022] In this embodiment, a target image sent by a target terminal is acquired. The target image includes a target table, which comprises a set of cells. Adjacent cells in the set of cells are separated by border lines. Character recognition is performed on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by recognizing each cell in the set of cells displayed in the target image. The set of separators includes the separators obtained by recognizing the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results. An online table is generated based on the set of character recognition results and the set of separators. The online table includes a set of character recognition results arranged according to the set of separators. By recognizing the captured image, extracting the character recognition results of the cells in the image and the separators between the cells, and generating an online table based on the character recognition results and separators, the captured image is quickly and accurately converted into an online table. This achieves the technical effect of improving the character recognition accuracy in the online table and optimizing the generation method of the online table, thereby solving the technical problems of complex generation methods and low recognition accuracy of online tables in related technologies. Attached Figure Description
[0023] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0024] Figure 1 This is a schematic diagram of an application environment for an optional online form generation method according to an embodiment of this application;
[0025] Figure 2 This is a flowchart illustrating an optional method for generating an online form according to an embodiment of this application;
[0026] Figure 3 This is a schematic diagram of an optional online form generation method according to an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of another optional method for generating an online form according to an embodiment of this application;
[0028] Figure 5 This is a schematic diagram of another optional method for generating an online form according to an embodiment of this application;
[0029] Figure 6 This is a schematic diagram of another optional method for generating an online form according to an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of another optional method for generating an online form according to an embodiment of this application;
[0031] Figure 8 This is a schematic diagram of another optional method for generating an online form according to an embodiment of this application;
[0032] Figure 9 This is a schematic diagram of another optional method for generating an online form according to an embodiment of this application;
[0033] Figure 10 This is a schematic diagram of the structure of an optional online form generation apparatus according to an embodiment of this application;
[0034] Figure 11 This is a schematic diagram of the structure of an optional online form generation product according to an embodiment of this application;
[0035] Figure 12 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0036] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0038] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0039] Convolutional Neural Networks (CNNs): These are feedforward neural networks whose artificial neurons can respond to surrounding units within a certain coverage area, making them excellent for large-scale image processing. A CNN consists of one or more convolutional layers and a fully connected layer at the top (corresponding to a classic neural network), as well as associated weights and pooling layers.
[0040] OCR (Optical Character Recognition) is a mathematical technique that uses computers to study the automatic processing and interpretation of patterns.
[0041] Online document: A type of document built on a cloud-based backend system that allows multiple people to edit online simultaneously.
[0042] The present application will be described below with reference to embodiments:
[0043] According to one aspect of the embodiments of this application, a method for generating online tables is provided. Optionally, in this embodiment, the above-described method for generating online tables can be applied to, for example... Figure 1 The hardware environment shown consists of server 101 and terminal device 103. For example... Figure 1 As shown, server 101 connects to terminal 103 via a network and can be used to provide services for terminal devices or applications installed on terminal devices. Applications can be video applications, instant messaging applications, browser applications, educational applications, game applications, etc. Database 105 can be set up on the server or independently of the server to provide data storage services for server 101, such as a text data storage server. The network can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes Bluetooth, Wi-Fi, and other networks that enable wireless communication. Terminal device 103 can be a terminal configured with applications and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, PDAs, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, and other computer devices. The server can be a single server, a server cluster consisting of multiple servers, or a cloud server.
[0044] Combination Figure 1 As shown, the above-mentioned method for generating online forms can be implemented on terminal device 103 through the following steps:
[0045] S1, the target image sent by the target terminal is acquired on the terminal device 103, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between adjacent cells;
[0046] S2, On the terminal device 103, character recognition is performed on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by recognizing each cell in a set of cells displayed in the target image. The set of separators includes the separators obtained by recognizing the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results.
[0047] S3, an online table is generated on the terminal device 103 based on a set of character recognition results and a set of delimiters, wherein the online table includes a set of character recognition results arranged according to a set of delimiters.
[0048] Optionally, in this embodiment, the method for generating the online form described above can also be implemented via a server, for example, Figure 1 It can be implemented in server 101 shown; or it can be implemented jointly by the user terminal and the server.
[0049] The above is merely an example, and this embodiment does not impose any specific limitations.
[0050] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the method for generating the above online forms includes:
[0051] S202, acquire the target image sent by the target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between adjacent cells;
[0052] S204, Perform character recognition on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by performing character recognition on each cell in a set of cells displayed in the target image. The set of separators includes the separators obtained by performing character recognition on the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results.
[0053] S206, Generate an online table based on a set of character recognition results and a set of delimiters, wherein the online table includes a set of character recognition results arranged according to a set of delimiters.
[0054] Optionally, in this embodiment, the target terminal may include, but is not limited to, mobile phones with image acquisition capabilities (such as Android phones, iOS phones, etc.), laptops, tablets, handheld computers, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, wearable devices, in-vehicle devices, and other computer equipment.
[0055] Optionally, in this embodiment, the target image may include, but is not limited to, images captured by image acquisition devices such as cameras, images received from other image acquisition devices and sent by the recipient, or images including the target table stored locally or on a server. The target table may include, but is not limited to, a table composed of cells and border lines between cells. Specifically, it may include, but is not limited to, various types of tables such as personnel information statistics tables, financial tables, and data tables.
[0056] Optionally, in this embodiment, the aforementioned group of cells may include, but is not limited to, displaying characters to be recognized in each cell, including but not limited to text characters, numeric characters, symbol characters, etc. Adjacent cells are separated by the aforementioned border lines.
[0057] For example, Figure 3 This is a schematic diagram of an optional online form generation method according to an embodiment of this application, such as... Figure 3 As shown, taking the above target table as a personnel information statistics table as an example:
[0058] Each row of cells in the target image displays the personnel information to be counted, arranged by name. For example, the second row includes information for people named Zhang San. Each column of cells displays the personnel information to be counted, arranged by information type. For example, the second column includes information for people whose information type is gender. Cell 302 represents the cell located in the first row and second column, and border lines 304 and 306 represent the border lines of cell 302. It should be noted that border line 304 is the border line between cell 302 and the adjacent cell 308.
[0059] The above is merely an example, and this embodiment does not impose any specific limitations.
[0060] Optionally, in this embodiment, the above-mentioned character recognition of the target image may include, but is not limited to, recognition using OCR. OCR refers to the process by which an electronic device (such as a scanner or digital camera) examines the characters printed on paper, determines their shape by detecting dark and light patterns, and then translates the shape into computer text using a character recognition method; that is, for printed characters, optical methods are used to convert the text in the paper document into a black and white dot matrix image file, and recognition software is used to convert the text in the image into text format for further editing and processing by word processing software.
[0061] Optionally, in this embodiment, a set of character recognition results may include, but are not limited to, the character recognition results obtained by recognizing each cell displayed in the target image. Specifically, in addition to characters such as text and numbers, image feature information may also be used as character recognition results. For example, the image feature information of the target image can be extracted using a CNN network model as a character recognition result. When generating the table, the corresponding network model restores the image feature information into an image and displays it in the online table. The above-mentioned separators may include, but are not limited to, semicolons ";", commas ",", and vertical bars "|".
[0062] For example, Figure 4 This is a schematic diagram of another optional method for generating online forms according to an embodiment of this application, such as... Figure 4 As shown, taking the above target table as a personnel information statistics table as an example:
[0063] Character recognition is performed on the target image to obtain the character recognition result of each cell in each row and the separator corresponding to the border line of each cell. Taking the first row as an example, the first column is blank. Two adjacent "|" symbols represent blank cells between the separators. The content between each subsequent "|" symbol is the character recognition result of the corresponding cell. Each row forms a character recognition sequence, and multiple rows of character recognition sequences form the character recognition matrix corresponding to the target image. A set of separators is used to separate adjacent character recognition results within a set of character recognition results. Figure 4 For example, “|Zhang San|Male|” means that “Zhang San” and “Male” are the character recognition results in adjacent cells in the same row.
[0064] The above is merely an example, and this embodiment does not impose any specific limitations.
[0065] Optionally, in this embodiment, the online form may include, but is not limited to, a form that allows multiple users to edit and modify simultaneously, or a form that allows multiple users with modification permissions to edit and modify in a preset order. The online form is generated based on the aforementioned set of character recognition results and a set of separators. Specifically, it may include, but is not limited to, filling a set of character recognition results and a set of separators into a preset form template to generate an online form.
[0066] For example, Figure 5 This is a schematic diagram of another optional method for generating online forms according to an embodiment of this application, such as... Figure 5 As shown, taking the above target table as a personnel information statistics table as an example:
[0067] Fill the first row of the table template with a set of character recognition results and a set of separators corresponding to the first row. Then, fill the table template with a set of character recognition results and a set of separators respectively to generate the above online table.
[0068] For example, Figure 6 This is a schematic diagram of another optional method for generating online forms according to an embodiment of this application, such as... Figure 6 As shown, taking the above target table as a personnel information statistics table as an example:
[0069] The online form is displayed in group A, which includes user a, user b, and user c. Users a, b, and c can edit and modify the online form in a preset order or simultaneously.
[0070] This embodiment acquires a target image sent by a target terminal. The target image includes a target table, which comprises a set of cells separated by border lines. Character recognition is performed on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by recognizing each cell in the set of cells displayed in the target image. The set of separators includes the separators obtained by recognizing the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results. An online table is generated based on the set of character recognition results and the set of separators. The online table includes a set of character recognition results arranged according to the set of separators. By recognizing the captured image, extracting the character recognition results of the cells and the separators between the cells, and generating an online table based on the character recognition results and separators, the captured image is quickly and accurately converted into an online table. This achieves the technical effect of improving the character recognition accuracy in the online table and optimizing the generation method of the online table, thereby solving the technical problems of complex online table generation methods and low recognition accuracy in related technologies.
[0071] As an optional approach, an online table is generated based on a set of character recognition results and a set of delimiters, including:
[0072] A set of character recognition results and a set of separators are concatenated line by line to obtain the first set of sequences. Each sequence in the first set is formed by concatenating a corresponding row of character recognition information from the set of character recognition results and the set of separators. The corresponding row of recognition information includes the character recognition results obtained from character recognition of the corresponding row of cells and the border lines between those cells in the target table, as well as the separators. The number of sequences in the first set is the same as the number of rows in the target table. An online table is then generated based on the first set of sequences, or...
[0073] The first set of sequences is formed by concatenating a set of character recognition results and a set of separators column by column. Each sequence in the second set is a sequence concatenated based on a set of character recognition results and a corresponding column of recognition information from a set of separators. The corresponding column of recognition information includes the character recognition results obtained by character recognition of the corresponding column of cells in the target table and the border lines between the columns of cells, as well as the separators. The number of sequences in the first set of sequences is the same as the number of columns in the target table. An online table is then generated based on the second set of sequences.
[0074] Optionally, in this embodiment, the above-mentioned concatenation of a set of character recognition results and a set of separators line by line may include, but is not limited to, concatenating the character recognition result corresponding to each cell in a set of character recognition results with the separator corresponding to that row; and the concatenation of a set of character recognition results and a set of separators column by column may include, but is not limited to, concatenating the character recognition result corresponding to each cell in a set of character recognition results with the separator corresponding to that column.
[0075] Optionally, in this embodiment, each sequence in the first group of sequences may include, but is not limited to, a sequence representing the character recognition result of a row concatenated with a separator, and each sequence in the second group of sequences may include, but is not limited to, a sequence representing the character recognition result of a column concatenated with a separator.
[0076] Optionally, in this embodiment, the method may include, but is not limited to, extracting image features of the target image using a CNN algorithm, and using a pattern recognition algorithm (OCR algorithm) to extract the content of each cell in the table document image as the above set of character recognition results. The method may also include, by recognizing the left and right sides of the cell, converting them into separators (semicolon “;”, comma “,”, vertical line “|”, etc.), and obtaining the separators as the above set of separators.
[0077] As an optional approach, a set of character recognition results and a set of delimiters are concatenated line by line, including:
[0078] For each line of recognition information in a set of character recognition results and a set of delimiters, perform the following steps, where each line of recognition information is the current line of recognition information:
[0079] The current row recognition information is obtained from a set of character recognition results and a set of delimiters. The current row recognition information includes the character recognition results and delimiters obtained by character recognition of the current row cell and the border lines between the current row cells in the target table.
[0080] If there are character recognition results in the current row of recognition information that indicate that no character was recognized, delete the character recognition results in the current row of recognition information that indicate that no character was recognized, and obtain the target row of recognition information; according to the arrangement order determined by character recognition, concatenate the character recognition results and separators in the target row of recognition information to obtain the sequence in the first set of sequences corresponding to the current row of cells;
[0081] If there is no character recognition result indicating that no character was recognized in the current row of recognition information, the character recognition results and separators in the current row of recognition information are concatenated according to the arrangement order determined by character recognition to obtain the sequence corresponding to the cell in the current row in the first group of sequences.
[0082] Optionally, in this embodiment, the character recognition results of the above-mentioned unrecognized characters may include, but are not limited to, the corresponding cell content being empty or unrecognizable. In this case, the character recognition results indicating that the characters were not recognized in the current row of recognition information are deleted.
[0083] For example, Figure 7 This is a schematic diagram of another optional method for generating online forms according to an embodiment of this application, such as... Figure 7 As shown, taking the above target table as a personnel information statistics table as an example:
[0084] Character recognition is performed on the target image to obtain recognition information 702, including the recognition information of the first row cell which consists of 5 separators and 3 character recognition results ("gender", "extension number", "department"). At this time, according to the arrangement order in the target image, it is concatenated into the first set of sequences representing the first row cell, sequence 704 "||gender|extension number|department|". It should be noted that if the character recognition result of the cell located in the first row and first column is empty (corresponding to the aforementioned character recognition result of no recognized character), then the separators are arranged adjacently to indicate that the cell at that position is empty (corresponding to the aforementioned target row recognition information indicating the character recognition result of no recognized character).
[0085] As an optional approach, an online table is generated based on the first set of sequences, including:
[0086] Based on the delimiter in each sequence of the first set of sequences, the character recognition result of each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
[0087] Optionally, in this embodiment, the above-mentioned method of determining the column number of the character recognition result in each sequence in the first set of sequences based on the separator in each sequence may include, but is not limited to, determining the column number of the character recognition result in each sequence in the preset online table template based on the separator in each sequence, so as to write the character recognition result in each sequence into the corresponding cell in the preset online table template to obtain an online table.
[0088] For example, Figure 8 This is a schematic diagram of another optional method for generating online forms according to an embodiment of this application, such as... Figure 8 As shown, taking the above target table as a personnel information statistics table as an example:
[0089] After identifying the target image to obtain the first set of sequences, the row number corresponding to each sequence in the first set of sequences can be determined based on the identified set of separators. Sequence 802 corresponds to the first row, sequence 804 corresponds to the second row, sequence 806 corresponds to the third row, and sequence 808 corresponds to the fourth row. The different sequences are then filled into the cells corresponding to the preset online table template to obtain the online table.
[0090] As an optional approach, based on the delimiter in each sequence of the first set of sequences, the character recognition result of each sequence is written into the corresponding cell in a preset online table template, resulting in an online table, including:
[0091] For each sequence in the first group, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0092] In the online table template, determine the current row cell corresponding to the current sequence, where the current row cell corresponding to the current sequence is the next row cell of the target row cell, and the target row cell is the row cell corresponding to the previous sequence of the current sequence.
[0093] Following the order of the current sequence, the content between every two separators in the current sequence is written into the cell of the current row. Specifically, if the content between two separators in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current row. If the content between two separators in the current sequence is empty, the corresponding cell of the current row is set to empty.
[0094] Optionally, in this embodiment, the online table template can be configured to have the same size as the target table, such as... Figure 8 As shown, the current sequence can be, but is not limited to, sequence 804. In this case, the current row in the online table template is the second row, the target row cell is the first row cell, and the previous sequence is sequence 802. The above-mentioned writing the content between every two separators in the current sequence into the cells of the current row according to the arrangement order in the current sequence can include, but is not limited to, writing "Zhang San" into the first column of the second row, writing "Male" into the second column of the second row, writing "01" into the third column of the second row, and writing "Human Resources" into the fourth column of the second row.
[0095] It should be noted that when the content between two separators in the current sequence is empty (for example, sequence 802), the corresponding cell in the current row will be set to empty.
[0096] As an optional approach, based on the delimiter in each sequence of the first set of sequences, the character recognition result of each sequence is written into the corresponding cell in a preset online table template, resulting in an online table, including:
[0097] For each sequence in the first group, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0098] In the online table template, determine the starting cell corresponding to the current sequence. The starting cell is the j-th cell in the i-th row of the online table template. The number of cells that can be written to in each row of the online table template is N. The starting cell corresponding to the current sequence is the cell after the target cell. The target cell is the ending cell corresponding to the previous sequence of the current sequence. i, j, and N are positive integers greater than or equal to 1.
[0099] Starting from the initial cell, following the order in the current sequence, the content between every two delimiters in the current sequence is written line by line into the corresponding cells in the online spreadsheet template that are allowed to write data. Specifically, if the content between two delimiters in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online spreadsheet template that is allowed to write data. If the content between two delimiters in the current sequence is empty, the corresponding cell in the online spreadsheet template that is allowed to write data is set to empty.
[0100] Optionally, in this embodiment, the online table template can be configured to be a template with a size larger than the target table. In this case, the size of the table in the online table template to be used is determined according to the number of delimiters in the current sequence. The character recognition content corresponding to the current sequence is written line by line into the corresponding cells in the online table template that allow data to be written, starting from the starting cell and following the arrangement order in the current sequence.
[0101] As an optional approach, a set of character recognition results and a set of delimiters are concatenated column by column, including:
[0102] For a set of character recognition results and each column of recognition information in a set of delimiters, perform the following steps, wherein each column of recognition information is the current column of recognition information when performing the following steps:
[0103] The current column recognition information is obtained from a set of character recognition results and a set of delimiters. The current column recognition information includes the character recognition results and delimiters obtained by character recognition of the current column cells and the border lines between the current column cells in the target table.
[0104] If there are character recognition results in the current column of recognition information that indicate that no character was recognized, delete the character recognition results in the current column of recognition information that indicate that no character was recognized, and obtain the target column of recognition information; according to the arrangement order determined by character recognition, concatenate the character recognition results and separators in the target column of recognition information to obtain the sequence in the second set of sequences corresponding to the cells in the current column;
[0105] If there is no character recognition result indicating that no character was recognized in the current column of recognition information, the character recognition results and separators in the current column of recognition information are concatenated according to the arrangement order determined by character recognition to obtain the sequence in the second set of sequences corresponding to the cells in the current column.
[0106] Optionally, in this embodiment, the character recognition results of the above-mentioned unrecognized characters may include, but are not limited to, the corresponding cell content being empty or unrecognizable. In this case, the character recognition results indicating that the characters were not recognized in the current column of recognition information are deleted.
[0107] As an optional approach, an online table is generated based on the second set of sequences, including:
[0108] Based on the delimiter in each sequence of the second set of sequences, the character recognition result in each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
[0109] Optionally, in this embodiment, the above-mentioned method of determining the row number of the character recognition result in each sequence in the second set of sequences based on the separator in each sequence may include, but is not limited to, determining the row number of the character recognition result in each sequence in the preset online table template based on the separator in each sequence, so as to write the character recognition result in each sequence into the corresponding cell in the preset online table template to obtain an online table.
[0110] As an optional approach, based on the delimiter in each sequence of the second set of sequences, the character recognition result of each sequence is written into the corresponding cell in a preset online table template, resulting in an online table, including:
[0111] For each sequence in the second set of sequences, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0112] In the online table template, determine the current column cell corresponding to the current sequence, where the current column cell corresponding to the current sequence is the next column cell of the target column cell, and the target column cell is the column cell corresponding to the previous sequence of the current sequence.
[0113] Following the order of the current sequence, the content between every two delimiters in the current sequence is written into the cells of the current column. Specifically, if the content between two delimiters in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current column. If the content between two delimiters in the current sequence is empty, the corresponding cell of the current column is set to empty.
[0114] Optionally, in this embodiment, the online table template can be configured to have the same size as the target table. The current sequence can be, but is not limited to, the sequence corresponding to the second column. In this case, the current column in the online table template is the second column, the target column cell is the first column cell, and the previous sequence of the current sequence is the sequence corresponding to the first column. The above-mentioned method of writing the content between every two separators in the current sequence into the cells of the current column according to the arrangement order in the current sequence can include, but is not limited to, the following: Figure 3 As shown, write "Zhang San" into the first column of the second row, "Li Si" into the first column of the third row, and "Wang Wu" into the first column of the fourth row.
[0115] It should be noted that when the content between two delimiters in the current sequence is empty (e.g., Figure 3 (As shown in the first column and first row), set the corresponding cell in the current row to empty.
[0116] As an optional approach, based on the delimiter in each sequence of the second set of sequences, the character recognition result of each sequence is written into the corresponding cell in a preset online table template, resulting in an online table, including:
[0117] For each sequence in the second set of sequences, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0118] In the online table template, determine the starting cell corresponding to the current sequence. The starting cell is the i-th cell in the j-th column of the online table template. The number of cells that can be written to in each column of the online table template is M. The starting cell corresponding to the current sequence is the cell after the target cell. The target cell is the ending cell corresponding to the previous sequence of the current sequence. i, j, and M are positive integers greater than or equal to 1.
[0119] Starting from the initial cell, following the order in the current sequence, the content between every two delimiters in the current sequence is sequentially written column by column into the corresponding cells in the online spreadsheet template that are allowed to write data. Specifically, if the content between two delimiters in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online spreadsheet template that is allowed to write data. If the content between two delimiters in the current sequence is empty, the corresponding cell in the online spreadsheet template that is allowed to write data is set to empty.
[0120] Optionally, in this embodiment, the online table template can be configured to be a template with a size larger than the target table. In this case, the size of the table in the online table template to be used is determined according to the number of delimiters in the current sequence. The character recognition content corresponding to the current sequence is written column by column into the corresponding cells in the online table template that allow data to be written, starting from the starting cell and following the arrangement order in the current sequence.
[0121] As an optional approach, character recognition is performed on the target image to obtain a set of character recognition results and a set of delimiters, including:
[0122] Optical character recognition is performed on each cell in a set of cells displayed in the target image to obtain a set of character recognition results;
[0123] Optical character recognition is performed on the left and / or right border lines of each cell displayed in the target image, and the recognition results are converted into delimiters to obtain a set of delimiters.
[0124] Optionally, in this embodiment, the above recognition method may include, but is not limited to, optical character recognition, specifically used to recognize the left border line and / or right border line of each cell displayed in the target image, or the top border line and / or bottom border line of each cell displayed in the target image.
[0125] As an alternative approach, the method also includes:
[0126] When an online form is set to allow a group of accounts to edit the online form online, a target notification message is pushed to the group of accounts, whereby the target notification message is used to indicate that the online form has been generated;
[0127] In response to a first online editing command from the first account in a group of accounts, the online form is edited online to obtain an edited first form, wherein the first form is set to allow a group of accounts to edit the first form online;
[0128] In response to a second online editing instruction from a second account in a set of accounts, the first form is edited online to obtain an edited second form, wherein the second form is configured to allow a set of accounts to edit the second form online.
[0129] Optionally, in this embodiment, the aforementioned set of accounts are accounts that allow online editing of online forms, for example, such as... Figure 6 As shown, group A is the group of accounts mentioned above, including user a, user b, and user c.
[0130] Optionally, in this embodiment, the target prompt information is used to prompt that an online form has been generated. For example, a session message is sent to a group of accounts to prompt that an online form has been generated, or a target prompt message is displayed in the online form display area of the group to prompt that an online form has been generated.
[0131] Optionally, in this embodiment, the first account and the second account may include, but are not limited to, the account used to log in to the target terminal, or other accounts besides the account used to log in to the target terminal, as long as the account is allowed to edit online forms.
[0132] Optionally, in this embodiment, the first online editing instruction and the second online editing instruction may include, but are not limited to, online editing instructions such as modifying, copying, pasting, changing fonts, and changing formats.
[0133] The following specific examples will further explain this application:
[0134] This application may include, but is not limited to, the following modules: image acquisition module, image processing module, online document module, and cloud network module.
[0135] (1) Image acquisition module. This module uses the built-in camera device of a mobile device (phone, tablet, etc.) to take pictures of offline spreadsheet documents (paper spreadsheet documents, projected spreadsheet documents, etc.) and synchronize the images to the cloud backend system via the network.
[0136] (2) Image Processing Module. This module is mainly used for image processing of table document images using image processing techniques (pattern recognition technology, etc.). It uses pattern recognition to extract the content data from the image cells, converts the two sides of each cell image into delimiters, and then concatenates the recognized content and delimiters in sequence to obtain the content vector of each row.
[0137] (3) Online document module. This module mainly divides the received content vector according to the delimiter and writes it into the online document table template in order.
[0138] (4) Network Module. This module mainly connects the image acquisition module, image processing module, and online document module to the network to realize the wireless transmission function of each module.
[0139] The algorithm process of this application includes, but is not limited to, the following stages: table document image acquisition stage, table content extraction stage, table vector sequence concatenation stage, content segmentation stage, and online document generation stage. Figure 9 This is a schematic diagram of another optional method for generating online forms according to an embodiment of this application, such as... Figure 9 As shown, the specific algorithm framework is as follows:
[0140] Step 1: Image Acquisition of Spreadsheet Documents. Using a mobile device's camera, take photos of offline and paper spreadsheet documents to acquire image data, and then synchronize the spreadsheet document images to the cloud backend system via the network.
[0141] Step 2: Table Content Extraction. Input the table document image collected in Step 1. Extract image features using the CNN algorithm and extract the content of each cell in the table document image using the pattern recognition algorithm (OCR algorithm). By recognizing the left and right sides of the cell, convert them into delimiters (semicolon ";", comma ",", vertical line "|", etc.) to obtain the delimiters.
[0142] Step 3: Table Vector Sequence Concatenation Stage. Input the content information and separator information of each cell obtained in Step 2, and concatenate each cell and separator in sequence. If the cell is empty, concatenate two separators, leaving the space between the two separators empty, thereby converting the offline table and paper table into a text vector sequence.
[0143] Step 4: Content Segmentation Stage. The text vector sequence from Step 3 is input into the online document backend system. The online document backend system segments the text vector of each line into a separate text vector sequence based on the delimiter, thus obtaining the text information content matrix.
[0144] Step 5: Online Document Generation Stage. Input the text information matrix from Step 4 and write it sequentially into the online document table template. If the content is empty, the cells in the online document table will also be empty. This will generate the online document table.
[0145] This application can solve, but is not limited to, the following problems:
[0146] (1) This application captures images of a table document by taking pictures with a mobile camera and uploads the images to a cloud-based backend system for image processing. It uses OCR technology to obtain the content of each cell in the table document and converts the left and right sides of each cell into separators, thereby extracting the content of each row and separator in the table document.
[0147] (2) This application concatenates each row of content and separators in sequence to obtain a vector sequence of each row of content and separators in the table. If a cell is empty, then there is no space between two separators.
[0148] (3) This application uses a cloud-based backend system to concatenate each line of content and the vector sequence obtained by the separator, divides it according to the separator, and writes the divided content into each cell of the online document system in sequence. If a blank cell is encountered, the corresponding cell in the online document will also be blank.
[0149] (4) After converting offline documents into online documents, users can quickly log in to the online documents using account IDs such as mobile phone numbers to edit them online. This application can utilize the multi-user shared editing mechanism of online documents to enable multi-user online editing, greatly improving office efficiency.
[0150] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0151] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0152] According to another aspect of the embodiments of this application, an apparatus for generating online forms to implement the above-described online form generation method is also provided. For example... Figure 10 As shown, the device includes:
[0153] The acquisition module 1002 is used to acquire a target image sent by the target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between adjacent cells;
[0154] The recognition module 1004 is used to perform character recognition on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by performing character recognition on each cell in a set of cells displayed in the target image. The set of separators includes the separators obtained by performing character recognition on the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results.
[0155] The generation module 1006 is used to generate an online table based on a set of character recognition results and a set of delimiters, wherein the online table includes a set of character recognition results arranged according to a set of delimiters.
[0156] As an alternative approach, the device generates an online table based on a set of character recognition results and a set of delimiters in the following manner:
[0157] A set of character recognition results and a set of separators are concatenated line by line to obtain the first set of sequences. Each sequence in the first set is formed by concatenating a corresponding row of character recognition information from the set of character recognition results and the set of separators. The corresponding row of recognition information includes the character recognition results obtained from character recognition of the corresponding row of cells and the border lines between those cells in the target table, as well as the separators. The number of sequences in the first set is the same as the number of rows in the target table. An online table is then generated based on the first set of sequences, or...
[0158] The first set of sequences is formed by concatenating a set of character recognition results and a set of separators column by column. Each sequence in the second set is a sequence concatenated based on a set of character recognition results and a corresponding column of recognition information from a set of separators. The corresponding column of recognition information includes the character recognition results obtained by character recognition of the corresponding column of cells in the target table and the border lines between the columns of cells, as well as the separators. The number of sequences in the first set of sequences is the same as the number of columns in the target table. An online table is then generated based on the second set of sequences.
[0159] As an alternative approach, the device is used to concatenate a set of character recognition results and a set of delimiters line by line in the following manner:
[0160] For each line of recognition information in a set of character recognition results and a set of delimiters, perform the following steps, where each line of recognition information is the current line of recognition information:
[0161] The current row recognition information is obtained from a set of character recognition results and a set of delimiters. The current row recognition information includes the character recognition results and delimiters obtained by character recognition of the current row cell and the border lines between the current row cells in the target table.
[0162] If there are character recognition results in the current row of recognition information that indicate that no character was recognized, delete the character recognition results in the current row of recognition information that indicate that no character was recognized, and obtain the target row of recognition information; according to the arrangement order determined by character recognition, concatenate the character recognition results and separators in the target row of recognition information to obtain the sequence in the first set of sequences corresponding to the current row of cells;
[0163] If there is no character recognition result indicating that no character was recognized in the current row of recognition information, the character recognition results and separators in the current row of recognition information are concatenated according to the arrangement order determined by character recognition to obtain the sequence corresponding to the cell in the current row in the first group of sequences.
[0164] As an alternative, the device is used to generate an online table based on the first set of sequences in the following manner:
[0165] Based on the delimiter in each sequence of the first set of sequences, the character recognition result of each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
[0166] As an optional approach, the device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the first set of sequences, thereby obtaining an online table:
[0167] For each sequence in the first group, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0168] In the online table template, determine the current row cell corresponding to the current sequence, where the current row cell corresponding to the current sequence is the next row cell of the target row cell, and the target row cell is the row cell corresponding to the previous sequence of the current sequence.
[0169] Following the order of the current sequence, the content between every two separators in the current sequence is written into the cell of the current row. Specifically, if the content between two separators in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current row. If the content between two separators in the current sequence is empty, the corresponding cell of the current row is set to empty.
[0170] As an optional approach, the device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the first set of sequences, thereby obtaining an online table:
[0171] For each sequence in the first group, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0172] In the online table template, determine the starting cell corresponding to the current sequence. The starting cell is the j-th cell in the i-th row of the online table template. The number of cells that can be written to in each row of the online table template is N. The starting cell corresponding to the current sequence is the cell after the target cell. The target cell is the ending cell corresponding to the previous sequence of the current sequence. i, j, and N are positive integers greater than or equal to 1.
[0173] Starting from the initial cell, following the order in the current sequence, the content between every two delimiters in the current sequence is written line by line into the corresponding cells in the online spreadsheet template that are allowed to write data. Specifically, if the content between two delimiters in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online spreadsheet template that is allowed to write data. If the content between two delimiters in the current sequence is empty, the corresponding cell in the online spreadsheet template that is allowed to write data is set to empty.
[0174] As an alternative approach, the device is used to concatenate a set of character recognition results and a set of delimiters column by column in the following manner:
[0175] For a set of character recognition results and each column of recognition information in a set of delimiters, perform the following steps, wherein each column of recognition information is the current column of recognition information when performing the following steps:
[0176] The current column recognition information is obtained from a set of character recognition results and a set of delimiters. The current column recognition information includes the character recognition results and delimiters obtained by character recognition of the current column cells and the border lines between the current column cells in the target table.
[0177] If there are character recognition results in the current column of recognition information that indicate that no character was recognized, delete the character recognition results in the current column of recognition information that indicate that no character was recognized, and obtain the target column of recognition information; according to the arrangement order determined by character recognition, concatenate the character recognition results and separators in the target column of recognition information to obtain the sequence in the second set of sequences corresponding to the cells in the current column;
[0178] If there is no character recognition result indicating that no character was recognized in the current column of recognition information, the character recognition results and separators in the current column of recognition information are concatenated according to the arrangement order determined by character recognition to obtain the sequence in the second set of sequences corresponding to the cells in the current column.
[0179] As an alternative, the device is used to generate an online table based on the second set of sequences in the following manner:
[0180] Based on the delimiter in each sequence of the second set of sequences, the character recognition result in each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
[0181] As an optional approach, the device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the second set of sequences, thereby obtaining an online table:
[0182] For each sequence in the second set of sequences, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0183] In the online table template, determine the current column cell corresponding to the current sequence, where the current column cell corresponding to the current sequence is the next column cell of the target column cell, and the target column cell is the column cell corresponding to the previous sequence of the current sequence.
[0184] Following the order of the current sequence, the content between every two delimiters in the current sequence is written into the cells of the current column. Specifically, if the content between two delimiters in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current column. If the content between two delimiters in the current sequence is empty, the corresponding cell of the current column is set to empty.
[0185] As an optional approach, the device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the second set of sequences, thereby obtaining an online table:
[0186] For each sequence in the second set of sequences, perform the following steps, where each sequence is the current sequence when performing the following steps:
[0187] In the online table template, determine the starting cell corresponding to the current sequence. The starting cell is the i-th cell in the j-th column of the online table template. The number of cells that can be written to in each column of the online table template is M. The starting cell corresponding to the current sequence is the cell after the target cell. The target cell is the ending cell corresponding to the previous sequence of the current sequence. i, j, and M are positive integers greater than or equal to 1.
[0188] Starting from the initial cell, following the order in the current sequence, the content between every two delimiters in the current sequence is sequentially written column by column into the corresponding cells in the online spreadsheet template that are allowed to write data. Specifically, if the content between two delimiters in the current sequence is a character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online spreadsheet template that is allowed to write data. If the content between two delimiters in the current sequence is empty, the corresponding cell in the online spreadsheet template that is allowed to write data is set to empty.
[0189] As an optional approach, the device is used to perform character recognition on a target image in the following manner, obtaining a set of character recognition results and a set of separators:
[0190] Optical character recognition is performed on each cell in a set of cells displayed in the target image to obtain a set of character recognition results;
[0191] Optical character recognition is performed on the left and / or right border lines of each cell displayed in the target image, and the recognition results are converted into delimiters to obtain a set of delimiters.
[0192] As an alternative, the device is also used for:
[0193] When an online form is set to allow a group of accounts to edit the online form online, a target notification message is pushed to the group of accounts, whereby the target notification message is used to indicate that the online form has been generated;
[0194] In response to a first online editing command from the first account in a group of accounts, the online form is edited online to obtain an edited first form, wherein the first form is set to allow a group of accounts to edit the first form online;
[0195] In response to a second online editing instruction from a second account in a set of accounts, the first form is edited online to obtain an edited second form, wherein the second form is configured to allow a set of accounts to edit the second form online.
[0196] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable media 1111. When the computer program is executed by central processing unit 1101, it performs various functions provided in embodiments of this application.
[0197] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0198] Figure 11 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.
[0199] It should be noted that, Figure 11 The computer system 1100 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0200] like Figure 11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1102 or programs loaded from storage section 1108 into random access memory (RAM). The RAM 1103 also stores various programs and data required for system operation. The CPU 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output interface 1105 (I / O interface) is also connected to the bus 1104.
[0201] The following components are connected to the input / output interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a local area network card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the input / output interface 1105 as needed. Removable media 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on the drive 1110 as needed so that computer programs read from them can be installed into the storage section 1108 as needed.
[0202] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by central processing unit 1101, it performs various functions defined in the system of this application.
[0203] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described online form generation method is also provided, the electronic device being... Figure 1 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 12 As shown, the electronic device includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps of any of the above method embodiments through the computer program.
[0204] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0205] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0206] S1, acquire the target image sent by the target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between adjacent cells;
[0207] S2, perform character recognition on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by performing character recognition on each cell in a set of cells displayed in the target image. The set of separators includes the separators obtained by performing character recognition on the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results.
[0208] S3, Generate an online table based on a set of character recognition results and a set of delimiters, wherein the online table includes a set of character recognition results arranged according to a set of delimiters.
[0209] Alternatively, as those skilled in the art will understand, Figure 12 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 12 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 12 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 12 The different configurations shown.
[0210] The memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the online table generation method and apparatus in this embodiment. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, thereby realizing the above-mentioned online table generation method. The memory 1202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include memory remotely located relative to the processor 1204, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1202 may be used, but is not limited to, to store information such as online tables. As an example, such as Figure 12 As shown, the memory 1202 may include, but is not limited to, the acquisition module 1002, the identification module 1004, and the generation module 1006 in the online table generation device. Furthermore, it may include, but is not limited to, other module units in the online table generation device, which will not be described in detail in this example.
[0211] Optionally, the transmission device 1206 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1206 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1206 is a radio frequency (RF) module, used for wireless communication with the Internet.
[0212] In addition, the aforementioned electronic device also includes: a display 1208 for displaying the aforementioned online table; and a connection bus 1210 for connecting the various module components in the aforementioned electronic device.
[0213] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.
[0214] According to one aspect of this application, a computer-readable storage medium is provided, from which a processor of a computer device reads computer instructions, and the processor executes the computer instructions, causing the computer device to perform the online form generation method provided in various alternative implementations of the above-described online form generation aspect.
[0215] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0216] S1, acquire the target image sent by the target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between adjacent cells;
[0217] S2, perform character recognition on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by performing character recognition on each cell in a set of cells displayed in the target image. The set of separators includes the separators obtained by performing character recognition on the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results.
[0218] S3, Generate an online table based on a set of character recognition results and a set of delimiters, wherein the online table includes a set of character recognition results arranged according to a set of delimiters.
[0219] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0220] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0221] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0222] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0223] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.
[0224] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0225] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0226] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating online forms, characterized in that, include: Acquire a target image sent by a target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between the adjacent cells; The target image is subjected to character recognition to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by performing character recognition on each cell in the set of cells displayed in the target image. The set of separators includes the separators obtained by performing character recognition on the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results. An online table is generated based on the set of character recognition results and the set of separators, wherein the online table includes the set of character recognition results arranged according to the set of separators; The step of generating an online table based on the set of character recognition results and the set of separators includes: concatenating the set of character recognition results and the set of separators row by row to obtain a first set of sequences, wherein each sequence in the first set of sequences is a sequence concatenated based on a corresponding row of recognition information from the set of character recognition results and the set of separators, wherein the corresponding row of recognition information includes character recognition results obtained by character recognition of a corresponding row of cells in the target table and the border lines between the rows of cells, and a separator, wherein the number of sequences in the first set of sequences is the same as the number of rows in the target table; generating the online table based on the first set of sequences; or, concatenating the set of character recognition results and the set of separators column by column to obtain a second set of sequences, wherein each sequence in the second set of sequences is a sequence concatenated based on a corresponding column of recognition information from the set of character recognition results and the set of separators, wherein the corresponding column of recognition information includes character recognition results obtained by character recognition of a corresponding column of cells in the target table and the border lines between the columns of cells, and a separator, wherein the number of sequences in the first set of sequences is the same as the number of columns in the target table; and generating the online table based on the second set of sequences.
2. The method according to claim 1, characterized in that, The step of concatenating the character recognition results and the delimiters line by line includes: For each line of recognition information in the set of character recognition results and the set of separators, the following steps are performed, wherein each line of recognition information is the current line of recognition information when performing the following steps: The current row recognition information is obtained from the set of character recognition results and the set of separators, wherein the current row recognition information includes character recognition results and separators obtained by character recognition of the current row cell and the border lines between the current row cells in the target table; If there is a character recognition result indicating that no character was recognized in the current row of recognition information, delete the character recognition result indicating that no character was recognized in the current row of recognition information to obtain the target row of recognition information; according to the arrangement order determined by the character recognition, concatenate the character recognition result and the separator in the target row of recognition information to obtain the sequence in the first group sequence corresponding to the cell in the current row; If there is no character recognition result indicating that no character was recognized in the current row of recognition information, the character recognition result and the separator in the current row of recognition information are concatenated according to the arrangement order determined by the character recognition to obtain the sequence in the first group of sequences corresponding to the current row cell.
3. The method according to claim 1, characterized in that, The step of generating the online table based on the first set of sequences includes: Based on the delimiter in each sequence of the first set of sequences, the character recognition result in each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
4. The method according to claim 3, characterized in that, The step of writing the character recognition result of each sequence into the corresponding cell of a preset online table template based on the delimiter in each sequence of the first group of sequences to obtain the online table includes: For each sequence in the first group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online form template, determine the current row cell corresponding to the current sequence, wherein the current row cell corresponding to the current sequence is the next row cell of the target row cell, and the target row cell is the row cell corresponding to the previous sequence of the current sequence; According to the arrangement order in the current sequence, the content between every two separators in the current sequence is written into the cell of the current row. When the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current row. When the content between two separators in the current sequence is empty, the corresponding cell of the current row is set to empty.
5. The method according to claim 3, characterized in that, The step of writing the character recognition result of each sequence into the corresponding cell of a preset online table template based on the delimiter in each sequence of the first group of sequences to obtain the online table includes: For each sequence in the first group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online table template, a starting cell corresponding to the current sequence is determined, wherein the starting cell is the j-th cell in the i-th row of the online table template, the number of cells in each row of the online table template that can be written with data is N, the starting cell corresponding to the current sequence is the cell after the target cell, the target cell is the ending cell corresponding to the previous sequence of the current sequence, and i, j, and N are positive integers greater than or equal to 1; Starting from the initial cell, following the order in the current sequence, the content between every two separators in the current sequence is sequentially written line by line into the corresponding cells in the online table template that are allowed to be written to. Specifically, when the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online table template that is allowed to be written to. When the content between two separators in the current sequence is empty, the corresponding cell in the online table template that is allowed to be written to is set to empty.
6. The method according to claim 1, characterized in that, The step of concatenating the character recognition results and the delimiters column by column includes: For each column of recognition information in the set of character recognition results and the set of separators, the following steps are performed, wherein each column of recognition information is the current column of recognition information when performing the following steps: The current column recognition information is obtained from the set of character recognition results and the set of separators, wherein the current column recognition information includes character recognition results and separators obtained by character recognition of the current column cells and the border lines between the current column cells in the target table; If there is a character recognition result indicating that no character was recognized in the current column of recognition information, delete the character recognition result indicating that no character was recognized in the current column of recognition information to obtain a target column of recognition information; according to the arrangement order determined by the character recognition, concatenate the character recognition result and the separator in the target column of recognition information to obtain the sequence in the second set of sequences corresponding to the cells in the current column; If there is no character recognition result indicating that no character was recognized in the current column of recognition information, the character recognition result and the separator in the current column of recognition information are concatenated according to the arrangement order determined by the character recognition to obtain the sequence in the second group sequence corresponding to the cell in the current column.
7. The method according to claim 1, characterized in that, The step of generating the online table based on the second set of sequences includes: Based on the delimiter in each sequence of the second set of sequences, the character recognition result in each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
8. The method according to claim 7, characterized in that, The step of writing the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the second set of sequences to obtain the online table includes: For each sequence in the second group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online table template, determine the current column cell corresponding to the current sequence, wherein the current column cell corresponding to the current sequence is the next column cell of the target column cell, and the target column cell is the column cell corresponding to the previous sequence of the current sequence; According to the arrangement order in the current sequence, the content between every two separators in the current sequence is written into the cells of the current column. When the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current column. When the content between two separators in the current sequence is empty, the corresponding cell of the current column is set to empty.
9. The method according to claim 8, characterized in that, The step of writing the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the second set of sequences to obtain the online table includes: For each sequence in the second group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online table template, a starting cell corresponding to the current sequence is determined, wherein the starting cell is the i-th cell in the j-th column of the online table template, the number of cells in each column of the online table template that can be written to is M, the starting cell corresponding to the current sequence is the cell after the target cell, the target cell is the ending cell corresponding to the previous sequence of the current sequence, and i, j, and M are positive integers greater than or equal to 1; Starting from the initial cell, following the order in the current sequence, the content between every two separators in the current sequence is sequentially written column by column into the corresponding cells in the online table template that are allowed to be written to. Specifically, when the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online table template that is allowed to be written to. When the content between two separators in the current sequence is empty, the corresponding cell in the online table template that is allowed to be written to is set to empty.
10. The method according to any one of claims 1 to 9, characterized in that, The step of performing character recognition on the target image to obtain a set of character recognition results and a set of separators includes: Optical character recognition is performed on each cell in the set of cells displayed in the target image to obtain the set of character recognition results; Optical character recognition is performed on the left and / or right border lines of each cell displayed in the target image, and the recognition results are converted into the separators to obtain the set of separators.
11. The method according to any one of claims 1 to 9, characterized in that, The method further includes: When the online form is set to allow a group of accounts to edit the online form online, a target prompt message is pushed to the group of accounts, wherein the target prompt message is used to indicate that the online form has been generated; In response to a first online editing instruction from the first account in the group of accounts, the online form is edited online to obtain an edited first form, wherein the first form is configured to allow the group of accounts to edit the first form online; In response to a second online editing instruction from a second account in the group of accounts, the first table is edited online to obtain an edited second table, wherein the second table is configured to allow the group of accounts to edit the second table online.
12. An online form generation device, characterized in that, include: The acquisition module is used to acquire a target image sent by a target terminal, wherein the target image includes a target table, the target table includes a set of cells, and adjacent cells in the set of cells are separated by border lines between the adjacent cells; The recognition module is used to perform character recognition on the target image to obtain a set of character recognition results and a set of separators. The set of character recognition results includes the character recognition results obtained by performing character recognition on each cell in the set of cells displayed in the target image. The set of separators includes the separators obtained by performing character recognition on the border lines displayed in the target image. The set of separators is used to separate adjacent character recognition results in the set of character recognition results. A generation module is used to generate an online table based on the set of character recognition results and the set of delimiters, wherein the online table includes the set of character recognition results arranged according to the set of delimiters; The device is used to generate an online table based on the set of character recognition results and the set of separators in the following manner: concatenating the set of character recognition results and the set of separators row by row to obtain a first set of sequences, wherein each sequence in the first set of sequences is a sequence concatenated based on a corresponding row of recognition information from the set of character recognition results and the set of separators, wherein the corresponding row of recognition information includes character recognition results obtained by character recognition of a corresponding row cell and the border lines between the row cells in the target table, and a separator; the number of sequences in the first set of sequences is the same as the number of rows in the target table; generating the online table based on the first set of sequences; or, concatenating the set of character recognition results and the set of separators column by column to obtain a second set of sequences, wherein each sequence in the second set of sequences is a sequence concatenated based on a corresponding column of recognition information from the set of character recognition results and the set of separators, wherein the corresponding column of recognition information includes character recognition results obtained by character recognition of a corresponding column cell and the border lines between the column cells in the target table, and a separator; the number of sequences in the first set of sequences is the same as the number of columns in the target table; generating the online table based on the second set of sequences.
13. The apparatus according to claim 12, characterized in that, The device is used to concatenate the character recognition results and the delimiters line by line in the following manner: For each line of recognition information in the set of character recognition results and the set of separators, the following steps are performed, wherein each line of recognition information is the current line of recognition information when performing the following steps: The current row recognition information is obtained from the set of character recognition results and the set of separators, wherein the current row recognition information includes character recognition results and separators obtained by character recognition of the current row cell and the border lines between the current row cells in the target table; If there is a character recognition result indicating that no character was recognized in the current row of recognition information, delete the character recognition result indicating that no character was recognized in the current row of recognition information to obtain the target row of recognition information; according to the arrangement order determined by the character recognition, concatenate the character recognition result and the separator in the target row of recognition information to obtain the sequence in the first group sequence corresponding to the cell in the current row; If there is no character recognition result indicating that no character was recognized in the current row of recognition information, the character recognition result and the separator in the current row of recognition information are concatenated according to the arrangement order determined by the character recognition to obtain the sequence in the first group of sequences corresponding to the current row cell.
14. The apparatus according to claim 12, characterized in that, The device is used to generate the online table based on the first set of sequences in the following manner: Based on the delimiter in each sequence of the first set of sequences, the character recognition result in each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
15. The apparatus according to claim 14, characterized in that, The device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the first group of sequences, thereby obtaining the online table: For each sequence in the first group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online form template, determine the current row cell corresponding to the current sequence, wherein the current row cell corresponding to the current sequence is the next row cell of the target row cell, and the target row cell is the row cell corresponding to the previous sequence of the current sequence; According to the arrangement order in the current sequence, the content between every two separators in the current sequence is written into the cell of the current row. When the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current row. When the content between two separators in the current sequence is empty, the corresponding cell of the current row is set to empty.
16. The apparatus according to claim 14, characterized in that, The device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the first group of sequences, thereby obtaining the online table: For each sequence in the first group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online table template, a starting cell corresponding to the current sequence is determined, wherein the starting cell is the j-th cell in the i-th row of the online table template, the number of cells in each row of the online table template that can be written with data is N, the starting cell corresponding to the current sequence is the cell after the target cell, the target cell is the ending cell corresponding to the previous sequence of the current sequence, and i, j, and N are positive integers greater than or equal to 1; Starting from the initial cell, following the order in the current sequence, the content between every two separators in the current sequence is sequentially written line by line into the corresponding cells in the online table template that are allowed to be written to. Specifically, when the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online table template that is allowed to be written to. When the content between two separators in the current sequence is empty, the corresponding cell in the online table template that is allowed to be written to is set to empty.
17. The apparatus according to claim 12, characterized in that, The device is used to concatenate the set of character recognition results and the set of separators column by column in the following manner: For each column of recognition information in the set of character recognition results and the set of separators, the following steps are performed, wherein each column of recognition information is the current column of recognition information when performing the following steps: The current column recognition information is obtained from the set of character recognition results and the set of separators, wherein the current column recognition information includes character recognition results and separators obtained by character recognition of the current column cells and the border lines between the current column cells in the target table; If there is a character recognition result indicating that no character was recognized in the current column of recognition information, delete the character recognition result indicating that no character was recognized in the current column of recognition information to obtain a target column of recognition information; according to the arrangement order determined by the character recognition, concatenate the character recognition result and the separator in the target column of recognition information to obtain the sequence in the second set of sequences corresponding to the cells in the current column; If there is no character recognition result indicating that no character was recognized in the current column of recognition information, the character recognition result and the separator in the current column of recognition information are concatenated according to the arrangement order determined by the character recognition to obtain the sequence in the second group sequence corresponding to the cell in the current column.
18. The apparatus according to claim 12, characterized in that, The device is used to generate the online table based on the second set of sequences in the following manner: Based on the delimiter in each sequence of the second set of sequences, the character recognition result in each sequence is written into the corresponding cell in the preset online table template to obtain the online table.
19. The apparatus according to claim 18, characterized in that, The device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the second set of sequences, thereby obtaining the online table: For each sequence in the second group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online table template, determine the current column cell corresponding to the current sequence, wherein the current column cell corresponding to the current sequence is the next column cell of the target column cell, and the target column cell is the column cell corresponding to the previous sequence of the current sequence; According to the arrangement order in the current sequence, the content between every two separators in the current sequence is written into the cells of the current column. When the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell of the current column. When the content between two separators in the current sequence is empty, the corresponding cell of the current column is set to empty.
20. The apparatus according to claim 19, characterized in that, The device is used to write the character recognition result of each sequence into the corresponding cell of a preset online table template according to the delimiter in each sequence of the second set of sequences, thereby obtaining the online table: For each sequence in the second group of sequences, perform the following steps, wherein each sequence is the current sequence when performing the following steps: In the online table template, a starting cell corresponding to the current sequence is determined, wherein the starting cell is the i-th cell in the j-th column of the online table template, the number of cells in each column of the online table template that can be written to is M, the starting cell corresponding to the current sequence is the cell after the target cell, the target cell is the ending cell corresponding to the previous sequence of the current sequence, and i, j, and M are positive integers greater than or equal to 1; Starting from the initial cell, following the order in the current sequence, the content between every two separators in the current sequence is sequentially written column by column into the corresponding cells in the online table template that are allowed to be written to. Specifically, when the content between two separators in the current sequence is the character recognition result and the character recognition result is the recognized character, the recognized character is written into the corresponding cell in the online table template that is allowed to be written to. When the content between two separators in the current sequence is empty, the corresponding cell in the online table template that is allowed to be written to is set to empty.
21. The apparatus according to any one of claims 12 to 20, characterized in that, The device is used to perform character recognition on the target image in the following manner, to obtain a set of character recognition results and a set of separators: Optical character recognition is performed on each cell in the set of cells displayed in the target image to obtain the set of character recognition results; Optical character recognition is performed on the left and / or right border lines of each cell displayed in the target image, and the recognition results are converted into the separators to obtain the set of separators.
22. The apparatus according to any one of claims 12 to 20, characterized in that, The device is also used for: When the online form is set to allow a group of accounts to edit the online form online, a target prompt message is pushed to the group of accounts, wherein the target prompt message is used to indicate that the online form has been generated; In response to a first online editing instruction from the first account in the group of accounts, the online form is edited online to obtain an edited first form, wherein the first form is configured to allow the group of accounts to edit the first form online; In response to a second online editing instruction from a second account in the group of accounts, the first table is edited online to obtain an edited second table, wherein the second table is configured to allow the group of accounts to edit the second table online.
23. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or computer at runtime as described in any one of claims 1 to 11.
24. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 11.
25. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 11 through the computer program.
Citation Information
Patent Citations
Cell identification in table analysis
US6006240A
